import{B as e,D as t,G as n,H as r,I as i,K as a,L as o,M as s,N as c,P as l,Q as u,R as d,S as f,T as p,X as m,Y as h,_ as g,c as _,et as v,g as y,it as b,j as x,k as S,nt as C,ot as w,p as T,tt as E,u as D,x as O,z as k}from"./button-cHQg_W3T.js";import"./text-button-C2sIslq4.js";import{r as A}from"./shared-styles-CHEAAivb.js";import{t as j}from"./configStore-DKmopNuy.js";import{t as M}from"./sysStore-C3n4eqxo.js";import"./icon-button-CCnpFE5u.js";import{t as N}from"./filled-tonal-icon-button-CEGAGtut.js";import"./outlined-text-field-DV4I6NGb.js";import"./filled-button-CaNdISwP.js";var P=3600*24*365;function F(){return typeof document>`u`||!document.cookie?{}:document.cookie.split(`;`).reduce((e,t)=>{let[n,...r]=t.trim().split(`=`);return n&&(e[decodeURIComponent(n)]=decodeURIComponent(r.join(`=`))),e},{})}function I(e){return F()[e]??null}function L(e,t){typeof document>`u`||(document.cookie=`${encodeURIComponent(e)}=${encodeURIComponent(t)}; Max-Age=${P}; Path=/; SameSite=Lax`)}var R=y(O),z=class extends R{get rippleDisabled(){return this.disabled||this.softDisabled}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.alwaysFocusable=!1,this.label=``,this.hasIcon=!1,this.addEventListener(`click`,this.handleClick.bind(this))}focus(e){this.disabled&&!this.alwaysFocusable||super.focus(e)}render(){return p`
      <div class="container ${g(this.getContainerClasses())}">
        ${this.renderContainerContent()}
      </div>
    `}updated(e){e.has(`disabled`)&&e.get(`disabled`)!==void 0&&this.dispatchEvent(new Event(`update-focus`,{bubbles:!0}))}getContainerClasses(){return{disabled:this.disabled||this.softDisabled,"has-icon":this.hasIcon}}renderContainerContent(){return p`
      ${this.renderOutline()}
      <md-focus-ring part="focus-ring" for=${this.primaryId}></md-focus-ring>
      <md-ripple
        for=${this.primaryId}
        ?disabled=${this.rippleDisabled}></md-ripple>
      ${this.renderPrimaryAction(this.renderPrimaryContent())}
    `}renderOutline(){return p`<span class="outline"></span>`}renderLeadingIcon(){return p`<slot name="icon" @slotchange=${this.handleIconChange}></slot>`}renderPrimaryContent(){return p`
      <span class="leading icon" aria-hidden="true">
        ${this.renderLeadingIcon()}
      </span>
      <span class="label">
        <span class="label-text" id="label">
          ${this.label?this.label:p`<slot></slot>`}
        </span>
      </span>
      <span class="touch"></span>
    `}handleIconChange(e){this.hasIcon=e.target.assignedElements({flatten:!0}).length>0}handleClick(e){if(this.softDisabled||this.disabled&&this.alwaysFocusable){e.stopImmediatePropagation(),e.preventDefault();return}}};z.shadowRootOptions={...O.shadowRootOptions,delegatesFocus:!0},l([x({type:Boolean,reflect:!0})],z.prototype,`disabled`,void 0),l([x({type:Boolean,attribute:`soft-disabled`,reflect:!0})],z.prototype,`softDisabled`,void 0),l([x({type:Boolean,attribute:`always-focusable`})],z.prototype,`alwaysFocusable`,void 0),l([x()],z.prototype,`label`,void 0),l([x({type:Boolean,reflect:!0,attribute:`has-icon`})],z.prototype,`hasIcon`,void 0);var B=class extends O{get chips(){return this.childElements.filter(e=>e instanceof z)}constructor(){super(),this.internals=this.attachInternals(),this.addEventListener(`focusin`,this.updateTabIndices.bind(this)),this.addEventListener(`update-focus`,this.updateTabIndices.bind(this)),this.addEventListener(`keydown`,this.handleKeyDown.bind(this)),this.internals.role=`toolbar`}render(){return p`<slot @slotchange=${this.updateTabIndices}></slot>`}handleKeyDown(e){let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Home`,i=e.key===`End`;if(!t&&!n&&!r&&!i)return;let{chips:a}=this;if(a.length<2)return;if(e.preventDefault(),r||i){a[r?0:a.length-1].focus({trailing:i}),this.updateTabIndices();return}let o=getComputedStyle(this).direction===`rtl`?t:n,s=a.find(e=>e.matches(`:focus-within`));if(!s){(o?a[0]:a[a.length-1]).focus({trailing:!o}),this.updateTabIndices();return}let c=a.indexOf(s),l=o?c+1:c-1;for(;l!==c;){l>=a.length?l=0:l<0&&(l=a.length-1);let e=a[l];if(e.disabled&&!e.alwaysFocusable){o?l++:l--;continue}e.focus({trailing:!o}),this.updateTabIndices();break}}updateTabIndices(){let{chips:e}=this,t;for(let n of e){let e=n.alwaysFocusable||!n.disabled;if(n.matches(`:focus-within`)&&e){t=n;continue}e&&!t&&(t=n),n.tabIndex=-1}t&&(t.tabIndex=0)}};l([t()],B.prototype,`childElements`,void 0);var V=s`:host{display:flex;flex-wrap:wrap;gap:8px}
`,H=class extends B{};H.styles=[V],H=l([c(`md-chip-set`)],H);var U=`aria-label-remove`,W=class extends z{get ariaLabelRemove(){if(this.hasAttribute(U))return this.getAttribute(U);let{ariaLabel:e}=this;return e||this.label?`Remove ${e||this.label}`:null}set ariaLabelRemove(e){e!==this.ariaLabelRemove&&(e===null?this.removeAttribute(U):this.setAttribute(U,e),this.requestUpdate())}constructor(){super(),this.handleTrailingActionFocus=this.handleTrailingActionFocus.bind(this),this.addEventListener(`keydown`,this.handleKeyDown.bind(this))}focus(e){if((this.alwaysFocusable||!this.disabled)&&e?.trailing&&this.trailingAction){this.trailingAction.focus(e);return}super.focus(e)}renderContainerContent(){return p`
      ${super.renderContainerContent()}
      ${this.renderTrailingAction(this.handleTrailingActionFocus)}
    `}handleKeyDown(e){let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`;if(!t&&!n||!this.primaryAction||!this.trailingAction)return;let r=getComputedStyle(this).direction===`rtl`?t:n,i=this.primaryAction?.matches(`:focus-within`),a=this.trailingAction?.matches(`:focus-within`);r&&a||!r&&i||(e.preventDefault(),e.stopPropagation(),(r?this.trailingAction:this.primaryAction).focus())}handleTrailingActionFocus(){let{primaryAction:e,trailingAction:t}=this;!e||!t||(e.tabIndex=-1,t.addEventListener(`focusout`,()=>{e.tabIndex=0},{once:!0}))}};function G({ariaLabel:e,disabled:t,focusListener:n,tabbable:r=!1}){return p`
    <span id="remove-label" hidden aria-hidden="true">Remove</span>
    <button
      class="trailing action"
      aria-label=${e||f}
      aria-labelledby=${e?f:`remove-label label`}
      tabindex=${r?f:-1}
      @click=${ee}
      @focus=${n}>
      <md-focus-ring part="trailing-focus-ring"></md-focus-ring>
      <md-ripple ?disabled=${t}></md-ripple>
      <span class="trailing icon" aria-hidden="true">
        <slot name="remove-trailing-icon">
          <svg viewBox="0 96 960 960">
            <path
              d="m249 849-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z" />
          </svg>
        </slot>
      </span>
      <span class="touch"></span>
    </button>
  `}function ee(e){this.disabled||this.softDisabled||(e.stopPropagation(),this.dispatchEvent(new Event(`remove`,{cancelable:!0}))&&this.remove())}var K=class extends W{constructor(){super(...arguments),this.avatar=!1,this.href=``,this.target=``,this.removeOnly=!1,this.selected=!1}get primaryId(){return this.href?`link`:this.removeOnly?``:`button`}get rippleDisabled(){return!this.href&&(this.disabled||this.softDisabled)}get primaryAction(){return this.removeOnly?null:this.renderRoot.querySelector(`.primary.action`)}getContainerClasses(){return{...super.getContainerClasses(),avatar:this.avatar,disabled:!this.href&&(this.disabled||this.softDisabled),link:!!this.href,selected:this.selected,"has-trailing":!0}}renderPrimaryAction(e){let{ariaLabel:t}=this;return this.href?p`
        <a
          class="primary action"
          id="link"
          aria-label=${t||f}
          href=${this.href}
          target=${this.target||f}
          >${e}</a
        >
      `:this.removeOnly?p`
        <span class="primary action" aria-label=${t||f}>
          ${e}
        </span>
      `:p`
      <button
        class="primary action"
        id="button"
        aria-label=${t||f}
        aria-disabled=${this.softDisabled||f}
        ?disabled=${this.disabled&&!this.alwaysFocusable}
        type="button"
        >${e}</button
      >
    `}renderTrailingAction(e){return G({focusListener:e,ariaLabel:this.ariaLabelRemove,disabled:!this.href&&(this.disabled||this.softDisabled),tabbable:this.removeOnly})}};l([x({type:Boolean})],K.prototype,`avatar`,void 0),l([x()],K.prototype,`href`,void 0),l([x()],K.prototype,`target`,void 0),l([x({type:Boolean,attribute:`remove-only`})],K.prototype,`removeOnly`,void 0),l([x({type:Boolean,reflect:!0})],K.prototype,`selected`,void 0),l([S(`.trailing.action`)],K.prototype,`trailingAction`,void 0);var te=s`:host{--_container-height: var(--md-input-chip-container-height, 32px);--_disabled-label-text-color: var(--md-input-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-input-chip-disabled-label-text-opacity, 0.38);--_disabled-selected-container-color: var(--md-input-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-input-chip-disabled-selected-container-opacity, 0.12);--_label-text-font: var(--md-input-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-input-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-input-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-input-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-container-color: var(--md-input-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-focus-label-text-color: var(--md-input-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-input-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-input-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-input-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-input-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-outline-width: var(--md-input-chip-selected-outline-width, 0px);--_selected-pressed-label-text-color: var(--md-input-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-input-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-opacity: var(--md-input-chip-selected-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-input-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-input-chip-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-input-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-input-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-input-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-input-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-input-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-input-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-input-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-input-chip-outline-width, 1px);--_pressed-label-text-color: var(--md-input-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-input-chip-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-input-chip-pressed-state-layer-opacity, 0.12);--_avatar-shape: var(--md-input-chip-avatar-shape, var(--md-sys-shape-corner-full, 9999px));--_avatar-size: var(--md-input-chip-avatar-size, 24px);--_disabled-avatar-opacity: var(--md-input-chip-disabled-avatar-opacity, 0.38);--_disabled-leading-icon-color: var(--md-input-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-input-chip-disabled-leading-icon-opacity, 0.38);--_icon-size: var(--md-input-chip-icon-size, 18px);--_selected-focus-leading-icon-color: var(--md-input-chip-selected-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-leading-icon-color: var(--md-input-chip-selected-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-leading-icon-color: var(--md-input-chip-selected-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-leading-icon-color: var(--md-input-chip-selected-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-input-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-input-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-input-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-input-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-input-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-input-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-input-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-input-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-input-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-input-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-input-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-input-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-input-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-input-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-input-chip-leading-space, 16px);--_trailing-space: var(--md-input-chip-trailing-space, 16px);--_icon-label-space: var(--md-input-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-input-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-input-chip-with-trailing-icon-trailing-space, 8px)}:host([avatar]){--_container-shape-start-start: var( --md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-start-end: var( --md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-end: var( --md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-start: var( --md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) )}.avatar .primary.action{padding-inline-start:4px}.avatar .leading.icon ::slotted(:first-child){border-radius:var(--_avatar-shape);height:var(--_avatar-size);width:var(--_avatar-size)}.disabled.avatar .leading.icon{opacity:var(--_disabled-avatar-opacity)}@media(forced-colors: active){.link .outline{border-color:ActiveText}.disabled.avatar .leading.icon{opacity:1}}
`,q=s`.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}:where(.selected)::before{background:var(--_selected-container-color)}:where(.selected) .outline{border-width:var(--_selected-outline-width)}:where(.selected.disabled)::before{background:var(--_disabled-selected-container-color);opacity:var(--_disabled-selected-container-opacity)}:where(.selected) .label{color:var(--_selected-label-text-color)}:where(.selected:hover) .label{color:var(--_selected-hover-label-text-color)}:where(.selected:focus) .label{color:var(--_selected-focus-label-text-color)}:where(.selected:active) .label{color:var(--_selected-pressed-label-text-color)}:where(.selected) .leading.icon{color:var(--_selected-leading-icon-color)}:where(.selected:hover) .leading.icon{color:var(--_selected-hover-leading-icon-color)}:where(.selected:focus) .leading.icon{color:var(--_selected-focus-leading-icon-color)}:where(.selected:active) .leading.icon{color:var(--_selected-pressed-leading-icon-color)}@media(forced-colors: active){:where(.selected:not(.elevated))::before{border:1px solid CanvasText}:where(.selected) .outline{border-width:1px}}
`,ne=s`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);display:inline-flex;height:var(--_container-height);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}:host(:is([disabled],[soft-disabled])){pointer-events:none}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.container{border-radius:inherit;box-sizing:border-box;display:flex;height:100%;position:relative;width:100%}.container::before{border-radius:inherit;content:"";inset:0;pointer-events:none;position:absolute}.container:not(.disabled){cursor:pointer}.container.disabled{pointer-events:none}.cell{display:flex}.action{align-items:baseline;appearance:none;background:none;border:none;border-radius:inherit;display:flex;outline:none;padding:0;position:relative;text-decoration:none}.primary.action{min-width:0;padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space)}.has-icon .primary.action{padding-inline-start:var(--_with-leading-icon-leading-space)}.touch{height:48px;inset:50% 0 0;position:absolute;transform:translateY(-50%);width:100%}:host([touch-target=none]) .touch{display:none}.outline{border:var(--_outline-width) solid var(--_outline-color);border-radius:inherit;inset:0;pointer-events:none;position:absolute}:where(:focus) .outline{border-color:var(--_focus-outline-color)}:where(.disabled) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}md-ripple{border-radius:inherit}.label,.icon,.touch{z-index:1}.label{align-items:center;color:var(--_label-text-color);display:flex;font-family:var(--_label-text-font);font-size:var(--_label-text-size);font-weight:var(--_label-text-weight);height:100%;line-height:var(--_label-text-line-height);overflow:hidden;user-select:none}.label-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(:hover) .label{color:var(--_hover-label-text-color)}:where(:focus) .label{color:var(--_focus-label-text-color)}:where(:active) .label{color:var(--_pressed-label-text-color)}:where(.disabled) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}.icon{align-self:center;display:flex;fill:currentColor;position:relative}.icon ::slotted(:first-child){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size)}.leading.icon{color:var(--_leading-icon-color)}.leading.icon ::slotted(*),.leading.icon svg{margin-inline-end:var(--_icon-label-space)}:where(:hover) .leading.icon{color:var(--_hover-leading-icon-color)}:where(:focus) .leading.icon{color:var(--_focus-leading-icon-color)}:where(:active) .leading.icon{color:var(--_pressed-leading-icon-color)}:where(.disabled) .leading.icon{color:var(--_disabled-leading-icon-color);opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){:where(.disabled) :is(.label,.outline,.leading.icon){color:GrayText;opacity:1}}a,button{text-transform:inherit}a,button:not(:disabled,[aria-disabled=true]){cursor:inherit}
`,re=s`.trailing.action{align-items:center;justify-content:center;padding-inline-start:var(--_icon-label-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}.trailing.action :is(md-ripple,md-focus-ring){border-radius:50%;height:calc(1.3333333333*var(--_icon-size));width:calc(1.3333333333*var(--_icon-size))}.trailing.action md-focus-ring{inset:unset}.has-trailing .primary.action{padding-inline-end:0}.trailing.icon{color:var(--_trailing-icon-color);height:var(--_icon-size);width:var(--_icon-size)}:where(:hover) .trailing.icon{color:var(--_hover-trailing-icon-color)}:where(:focus) .trailing.icon{color:var(--_focus-trailing-icon-color)}:where(:active) .trailing.icon{color:var(--_pressed-trailing-icon-color)}:where(.disabled) .trailing.icon{color:var(--_disabled-trailing-icon-color);opacity:var(--_disabled-trailing-icon-opacity)}:where(.selected) .trailing.icon{color:var(--_selected-trailing-icon-color)}:where(.selected:hover) .trailing.icon{color:var(--_selected-hover-trailing-icon-color)}:where(.selected:focus) .trailing.icon{color:var(--_selected-focus-trailing-icon-color)}:where(.selected:active) .trailing.icon{color:var(--_selected-pressed-trailing-icon-color)}@media(forced-colors: active){.trailing.icon{color:ButtonText}:where(.disabled) .trailing.icon{color:GrayText;opacity:1}}
`,J=class extends K{};J.styles=[ne,re,q,te],J=l([c(`md-input-chip`)],J);var Y=n(`<md-icon-button class=add-btn title="Add tag"><md-icon><svg viewBox="0 0 24 24"><path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z">`,!0,!1,!1),X=n(`<div class=chip-input-wrapper><md-chip-set></md-chip-set><div class=input-row><input type=text class=chip-input-field enterkeyhint=done>`,!0,!1,!1),ie=n(`<md-input-chip remove-only>`,!0,!1,!1);function ae(e){let[t,n]=b(``),o;function s(n){n.key===`Enter`||n.key===`,`||n.key===` `?(n.preventDefault(),c()):n.key===`Backspace`&&t()===``&&e.values.length>0&&l(e.values.length-1)}function c(){let r=t().trim();if(r){if(!e.values.includes(r)){let t=[...e.values,r];e.onValuesChange(t)}n(``)}}function l(t){let n=e.values.filter((e,n)=>n!==t);e.onValuesChange(n)}return(()=>{var d=X(),f=d.firstChild,p=f.nextSibling,g=p.firstChild;return f._$owner=w(),k(f,u(h,{get each(){return e.values},children:(e,t)=>(()=>{var n=ie();return i(n,`remove`,()=>l(t())),n.label=e,n._$owner=w(),n})()})),g.addEventListener(`focus`,()=>{setTimeout(()=>{o?.scrollIntoView({behavior:`smooth`,block:`center`})},300)}),g.addEventListener(`blur`,c),g.$$keydown=s,g.$$input=e=>n(e.currentTarget.value),a(e=>o=e,g),k(p,u(m,{get when(){return t().trim().length>0},get children(){var e=Y(),t=e.firstChild;return e.$$click=c,e._$owner=w(),t._$owner=w(),e}}),null),C(t=>{var n=e.values.length>0,i=e.placeholder||`Add item...`;return n!==t.e&&f.classList.toggle(`chip-set-has-values`,t.e=n),i!==t.t&&r(g,`placeholder`,t.t=i),t},{e:void 0,t:void 0}),C(()=>g.value=t()),d})()}d([`input`,`keydown`,`click`]);var oe=n(`<div class=dialog-container><md-dialog class=transparent-scrim><div slot=headline></div><div slot=content></div><div slot=actions><md-text-button></md-text-button><md-text-button></md-text-button></div></md-dialog><md-dialog class=transparent-scrim><div slot=headline></div><div slot=content></div><div slot=actions><md-text-button></md-text-button><md-text-button>`,!0,!1,!1),se=n(`<div class=config-container><section class=config-group><div class=config-card><div class=card-header><div class=card-icon><md-icon><svg viewBox="0 0 24 24"><path></path></svg></md-icon></div><div class=card-text><span class=card-title></span><span class=card-desc></span></div></div><div class=input-stack><md-outlined-text-field class=full-width-field><md-icon slot=leading-icon><svg viewBox="0 0 24 24"><path></path></svg></md-icon></md-outlined-text-field></div></div><div class=config-card><div class=card-header><div class=card-icon><md-icon><svg viewBox="0 0 24 24"><path></path></svg></md-icon></div><div class=card-text><span class=card-title></span><span class=card-desc></span></div></div><div class=input-stack><md-outlined-text-field class=full-width-field><md-icon slot=leading-icon><svg viewBox="0 0 24 24"><path></path></svg></md-icon></md-outlined-text-field></div></div></section><section class=config-group><div class=config-card><div class=card-header><div class=card-icon><md-icon><svg viewBox="0 0 24 24"><path></path></svg></md-icon></div><div class=card-text><span class=card-title></span><span class=card-desc></span></div></div><div class=p-input></div></div></section><section class=config-group><div class=config-card><div class=card-header><div class=card-icon><md-icon><svg viewBox="0 0 24 24"><path></path></svg></md-icon></div><div class=card-text><span class=card-title></span><span class=card-desc></span></div></div><div class=mode-selector></div></div></section><section class=config-group><div class=options-grid><button><md-ripple></md-ripple><div class=tile-top><div class=tile-icon><md-icon><svg viewBox="0 0 24 24"><path></path></svg></md-icon></div></div><div class=tile-bottom><span class=tile-label></span></div></button><button><md-ripple></md-ripple><div class=tile-top><div class=tile-icon><md-icon><svg viewBox="0 0 24 24"><path></path></svg></md-icon></div></div><div class=tile-bottom><span class=tile-label></span></div></button></div></section><section class=config-group><div class=webui-label></div><div class=options-grid><button class="option-tile clickable error"><md-ripple></md-ripple><div class=tile-top><div class=tile-icon><md-icon><svg viewBox="0 0 24 24"><path></path></svg></md-icon></div></div><div class=tile-bottom><span class=tile-label></span></div></button></div></section><section class=config-group><div class=webui-label></div><div class=options-grid><button type=button><md-ripple></md-ripple><div class=tile-top><div class=tile-icon><md-icon><svg viewBox="0 0 24 24"><path></path></svg></md-icon></div></div><div class=tile-bottom><span class=tile-label>`,!0,!1,!1),ce=n(`<md-filled-tonal-icon-button><md-icon><svg viewBox="0 0 24 24"><path>`,!0,!1,!1),le=n(`<div class=spacer>`),ue=n(`<md-filled-button><md-icon slot=icon><svg viewBox="0 0 24 24"><path>`,!0,!1,!1),de=n(`<button><md-ripple></md-ripple><div class=mode-info><span class=mode-title></span><span class=mode-desc></span></div><div class=mode-check><md-icon><svg viewBox="0 0 24 24"><path d=M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z>`,!0,!1,!1),Z=`mhm_hymofs_warning_ack`;function Q(){let[t,n]=b(``),[i,s]=b(A.enabled),[c,l]=b(A.enabled),[d,f]=b(!1),[p,m]=b(!1),[g,y]=b(!1),x,S=e=>!e||e.startsWith(`/`)&&e.length>1,O=E(()=>!S(j.config.moduledir)),P=E(()=>t()?JSON.stringify(j.config)!==t()||c()!==i():!1);v(()=>{!j.loading&&j.config&&(!t()||t()===JSON.stringify(j.config))&&n(JSON.stringify(j.config))});function F(e,t){j.config={...j.config,[e]:t}}function R(){let e=A.enabled;s(e),l(e)}async function z(e=!1){if(O()){T.showToast(T.L.config.invalidPath,`error`);return}if(await j.saveConfig(),c()!==i()){y(!0);try{await _.setHymofsEnabled(c()),await A.refreshStatus(),c()&&e&&L(Z,`1`),T.showToast(c()?T.L.config?.hymofsEnabledSuccess||`HymoFS enabled`:T.L.config?.hymofsDisabledSuccess||`HymoFS disabled`,`success`),s(c())}catch(e){T.showToast(e?.message||T.L.config?.saveFailed||`Failed to save`,`error`)}finally{y(!1)}}m(!1),n(JSON.stringify(j.config))}function B(){let e=c(),t=i();if(e&&!t&&I(Z)!==`1`){m(!0);return}z()}function V(){j.loadConfig().then(()=>{n(JSON.stringify(j.config)),R()})}function H(){f(!1),j.resetConfig().then(()=>{n(JSON.stringify(j.config)),R()})}function U(){l(e=>!e)}function W(){z(!0)}function G(e){let t=j.config[e],n=!t;F(e,n),_.saveConfig({...j.config,[e]:n}).catch(()=>{F(e,t),T.showToast(T.L.config?.saveFailed||`Failed to update setting`,`error`)})}function ee(e){F(`overlay_mode`,e)}let K=E(()=>{let e=M.storage?.supported_modes,t;return t=e&&Array.isArray(e)?e:M.systemInfo?.supported_overlay_modes??[`tmpfs`,`ext4`],M.systemInfo?.tmpfs_xattr_supported===!1&&(t=t.filter(e=>e!==`tmpfs`)),t}),te={tmpfs:`RAM-based. Fastest I/O, reset on reboot.`,ext4:`Loopback image. Persistent, saves RAM.`};return[(()=>{var e=oe(),t=e.firstChild,n=t.firstChild,r=n.nextSibling,i=r.nextSibling.firstChild,a=i.nextSibling,o=t.nextSibling,s=o.firstChild,c=s.nextSibling,l=c.nextSibling.firstChild,u=l.nextSibling;return t.addEventListener(`close`,()=>f(!1)),t._$owner=w(),k(n,()=>T.L.config?.resetConfigTitle??`Reset Configuration?`),k(r,()=>T.L.config?.resetConfigConfirm??`This will reset all backend settings to defaults. Continue?`),i.$$click=()=>f(!1),i._$owner=w(),k(i,()=>T.L.common?.cancel??`Cancel`),a.$$click=H,a._$owner=w(),k(a,()=>T.L.config?.resetConfig??`Reset Config`),o.addEventListener(`close`,()=>m(!1)),o._$owner=w(),k(s,()=>T.L.config?.hymofsWarningTitle??`Enable Experimental HymoFS?`),k(c,()=>T.L.config?.hymofsWarningBody??`HymoFS is experimental. Enabling it will expose the HymoFS tab, allow HymoFS-backed module routing, and permit LKM autoload. Continue only if you know what you are testing.`),l.$$click=()=>m(!1),l._$owner=w(),k(l,()=>T.L.common?.cancel??`Cancel`),u.$$click=W,u._$owner=w(),k(u,()=>T.L.config?.hymofsEnableConfirm??`Enable HymoFS`),C(e=>{var n=d(),r=p();return n!==e.e&&(t.open=e.e=n),r!==e.t&&(o.open=e.t=r),e},{e:void 0,t:void 0}),e})(),(()=>{var e=se(),t=e.firstChild,n=t.firstChild,i=n.firstChild,s=i.firstChild,l=s.firstChild,d=l.firstChild.firstChild,p=s.nextSibling.firstChild,m=p.nextSibling,_=i.nextSibling.firstChild,v=_.firstChild,y=v.firstChild.firstChild,b=n.nextSibling.firstChild,S=b.firstChild,E=S.firstChild,M=E.firstChild.firstChild,N=S.nextSibling.firstChild,P=N.nextSibling,I=b.nextSibling.firstChild,L=I.firstChild,R=L.firstChild.firstChild,z=t.nextSibling,B=z.firstChild.firstChild,V=B.firstChild,H=V.firstChild,W=H.firstChild.firstChild,q=V.nextSibling.firstChild,ne=q.nextSibling,re=B.nextSibling,J=z.nextSibling,Y=J.firstChild.firstChild,X=Y.firstChild,ie=X.firstChild,oe=ie.firstChild.firstChild,ce=X.nextSibling.firstChild,le=ce.nextSibling,ue=Y.nextSibling,Z=J.nextSibling,Q=Z.firstChild.firstChild,fe=Q.firstChild,pe=fe.nextSibling,me=pe.firstChild.firstChild,he=me.firstChild.firstChild,ge=pe.nextSibling.firstChild,_e=Q.nextSibling,ve=_e.firstChild,ye=ve.nextSibling,be=ye.firstChild.firstChild,xe=be.firstChild.firstChild,Se=ye.nextSibling.firstChild,Ce=Z.nextSibling,we=Ce.firstChild,Te=we.nextSibling.firstChild,Ee=Te.firstChild,De=Ee.nextSibling,Oe=De.firstChild.firstChild,ke=Oe.firstChild.firstChild,Ae=De.nextSibling.firstChild,je=Ce.nextSibling.firstChild,$=je.nextSibling.firstChild,Me=$.firstChild,Ne=Me.nextSibling,Pe=Ne.firstChild.firstChild,Fe=Pe.firstChild.firstChild,Ie=Ne.nextSibling.firstChild;return l._$owner=w(),k(p,()=>T.L.config.moduleDir),k(m,()=>T.L.config?.moduleDirDesc??`Set the directory where modules are stored`),_.$$input=e=>F(`moduledir`,e.currentTarget.value),_._$owner=w(),v._$owner=w(),E._$owner=w(),k(N,()=>T.L.config.mountSource),k(P,()=>T.L.config?.mountSourceDesc??`Global mount source namespace (e.g. KSU)`),I.addEventListener(`focus`,()=>{setTimeout(()=>{x?.scrollIntoView({behavior:`smooth`,block:`center`})},300)}),I.$$input=e=>F(`mountsource`,e.currentTarget.value),a(e=>x=e,I),I._$owner=w(),L._$owner=w(),H._$owner=w(),k(q,()=>T.L.config.partitions),k(ne,()=>T.L.config?.partitionsDesc??`Add partitions to mount`),k(re,u(ae,{get values(){return j.config.partitions},placeholder:`e.g. product, system_ext...`,onValuesChange:e=>F(`partitions`,e)})),ie._$owner=w(),k(ce,()=>T.L.config?.overlayMode||`Overlay Mode`),k(le,()=>T.L.config?.overlayModeDesc||`Select backing storage strategy`),k(ue,u(h,{get each(){return K()},children:e=>(()=>{var t=de(),n=t.firstChild,r=n.nextSibling,i=r.firstChild,a=i.nextSibling,s=r.nextSibling.firstChild;return t.$$click=()=>ee(e),n._$owner=w(),k(i,()=>T.L.config?.[`mode_${e}`]||e),k(a,()=>T.L.config?.[`mode_${e}Desc`]||te[e]),s._$owner=w(),C(()=>o(t,`mode-item ${j.config.overlay_mode===e?`selected`:``}`)),t})()})),Q.$$click=()=>G(`disable_umount`),fe._$owner=w(),me._$owner=w(),k(ge,()=>T.L.config.disableUmount),_e.$$click=()=>G(`enable_overlay_fallback`),ve._$owner=w(),be._$owner=w(),k(Se,()=>T.L.config?.enableOverlayFallback||`Enable Overlay Fallback`),k(we,()=>T.L.config?.webui||`WebUI`),Te.$$click=()=>f(!0),Ee._$owner=w(),Oe._$owner=w(),k(Ae,()=>T.L.config?.resetConfig||`Reset Config`),k(je,()=>T.L.config?.experimentalFeatures||`Experimental Features`),$.$$click=U,Me._$owner=w(),Pe._$owner=w(),k(Ie,()=>T.L.config?.hymofsMasterTitle??`Experimental HymoFS`),C(e=>{var t=D.modules,n=T.L.config.moduleDir,i=O(),a=O()?T.L.config?.invalidModuleDir||`Invalid Path`:``,s=D.modules,l=D.ksu,u=T.L.config.mountSource,f=D.ksu,p=D.storage,m=D.save,h=`option-tile clickable tertiary ${j.config.disable_umount?`active`:``}`,v=D.anchor,b=`option-tile clickable tertiary ${j.config.enable_overlay_fallback?`active`:``}`,x=D.shield,S=j.saving,C=D.replay,w=`option-tile clickable secondary ${c()?`active`:``}`,E=g()||A.loading,k=c(),N=T.L.config?.hymofsMasterSwitch||`Enable HymoFS`,P=c()?D.snowflake_filled:D.snowflake;return t!==e.e&&r(d,`d`,e.e=t),n!==e.t&&(_.label=e.t=n),i!==e.a&&(_.error=e.a=i),a!==e.o&&(_.supportingText=e.o=a),s!==e.i&&r(y,`d`,e.i=s),l!==e.n&&r(M,`d`,e.n=l),u!==e.s&&(I.label=e.s=u),f!==e.h&&r(R,`d`,e.h=f),p!==e.r&&r(W,`d`,e.r=p),m!==e.d&&r(oe,`d`,e.d=m),h!==e.l&&o(Q,e.l=h),v!==e.u&&r(he,`d`,e.u=v),b!==e.c&&o(_e,e.c=b),x!==e.w&&r(xe,`d`,e.w=x),S!==e.m&&(Te.disabled=e.m=S),C!==e.f&&r(ke,`d`,e.f=C),w!==e.y&&o($,e.y=w),E!==e.g&&($.disabled=e.g=E),k!==e.p&&r($,`aria-pressed`,e.p=k),N!==e.b&&r($,`aria-label`,e.b=N),P!==e.T&&r(Fe,`d`,e.T=P),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0,T:void 0}),C(()=>_.value=j.config.moduledir),C(()=>I.value=j.config.mountsource),e})(),u(N,{get children(){return[(()=>{var e=ce(),t=e.firstChild,n=t.firstChild.firstChild;return e.$$click=V,e._$owner=w(),t._$owner=w(),C(t=>{var i=j.loading,a=T.L.config.reload,o=D.refresh;return i!==t.e&&(e.disabled=t.e=i),a!==t.t&&(e.title=t.t=a),o!==t.a&&r(n,`d`,t.a=o),t},{e:void 0,t:void 0,a:void 0}),e})(),le(),(()=>{var t=ue(),n=t.firstChild,i=n.firstChild.firstChild;return t.$$click=B,t._$owner=w(),n._$owner=w(),k(t,(()=>{var t=e(()=>!!j.saving);return()=>t()?T.L.common.saving:T.L.config.save})(),null),C(e=>{var n=j.saving||!P(),a=D.save;return n!==e.e&&(t.disabled=e.e=n),a!==e.t&&r(i,`d`,e.t=a),e},{e:void 0,t:void 0}),t})()]}})]}d([`click`,`input`]);export{Q as default};