var k=Object.defineProperty;var I=(n,e)=>{for(var t in e)k(n,t,{get:e[t],enumerable:!0})};var g={};I(g,{OptionPure:()=>p,SelectPure:()=>o});function v(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?v=function(t){return typeof t}:v=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(n)}function a(n,e,t){var i=t.value;if(typeof i!="function")throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(v(i)));var r=!1;return{configurable:!0,get:function(){if(r||this===n.prototype||this.hasOwnProperty(e)||typeof i!="function")return i;var d=i.bind(this);return r=!0,Object.defineProperty(this,e,{configurable:!0,get:function(){return d},set:function(C){i=C,delete this[e]}}),r=!1,d},set:function(d){i=d}}}import{LitElement as _,html as $}from"lit";import{ifDefined as P}from"lit-html/directives/if-defined.js";import{customElement as D}from"lit/decorators/custom-element.js";import{property as f}from"lit/decorators/property.js";var b={ENTER:"Enter",TAB:"Tab"};var y=()=>{};var O={label:"",value:"",select:y,unselect:y,disabled:!1,hidden:!1,selected:!1};import{css as E}from"lit";var x=E` .select-wrapper { position: relative; } .select { bottom: 0; display: flex; flex-wrap: wrap; left: 0; position: absolute; right: 0; top: 0; width: var(--select-width, 100%); } .label:focus { outline: var(--select-outline, 2px solid #e3e3e3); } .label:after { border-bottom: 1px solid var(--color, #000); border-right: 1px solid var(--color, #000); box-sizing: border-box; content: ""; display: block; height: 10px; margin-top: -2px; transform: rotate(45deg); transition: 0.2s ease-in-out; width: 10px; } .label.visible:after { margin-bottom: -4px; margin-top: 0; transform: rotate(225deg); } select { -webkit-appearance: none; -moz-appearance: none; appearance: none; position: relative; opacity: 0; } select[multiple] { z-index: 0; } select, .label { align-items: center; background-color: var(--background-color, #fff); border-radius: var(--border-radius, 4px); border: var(--border-width, 1px) solid var(--border-color, #000); box-sizing: border-box; color: var(--color, #000); cursor: pointer; display: flex; font-family: var(--font-family, inherit); font-size: var(--font-size, 14px); font-weight: var(--font-weight, 400); min-height: var(--select-height, 44px); justify-content: space-between; padding: var(--padding, 0 10px); width: 100%; z-index: 1; } @media only screen and (hover: none) and (pointer: coarse){ select { z-index: 2; } } .dropdown { background-color: var(--border-color, #000); border-radius: var(--border-radius, 4px); border: var(--border-width, 1px) solid var(--border-color, #000); display: none; flex-direction: column; gap: var(--border-width, 1px); justify-content: space-between; max-height: calc(var(--select-height, 44px) * var(--dropdown-items, 4) + var(--border-width, 1px) * calc(var(--dropdown-items, 4) - 1)); overflow-y: scroll; position: absolute; top: calc(var(--select-height, 44px) + var(--dropdown-gap, 0px)); width: calc(100% - var(--border-width, 1px) * 2); z-index: var(--dropdown-z-index, 2); } .dropdown.visible { display: flex; z-index: 100; } .disabled { background-color: var(--disabled-background-color, #bdc3c7); color: var(--disabled-color, #ecf0f1); cursor: default; } .multi-selected { background-color: var(--selected-background-color, #e3e3e3); border-radius: var(--border-radius, 4px); color: var(--selected-color, #000); display: flex; gap: 8px; justify-content: space-between; padding: 2px 4px; } .multi-selected-wrapper { display: flex; flex-wrap: wrap; gap: 4px; width: calc(100% - 30px); } .cross:after { content: '\\00d7'; display: inline-block; height: 100%; text-align: center; width: 12px; } `;import{css as L}from"lit";var S=L` .option { align-items: center; background-color: var(--background-color, #fff); box-sizing: border-box; color: var(--color, #000); cursor: pointer; display: flex; font-family: var(--font-family, inherit); font-size: var(--font-size, 14px); font-weight: var(--font-weight, 400); min-height: var(--select-height, 44px); justify-content: flex-start; padding: var(--padding, 0 10px); width: 100%; } .option:not(.disabled):focus, .option:not(.disabled):not(.selected):hover { background-color: var(--hover-background-color, #e3e3e3); color: var(--hover-color, #000); } .selected { background-color: var(--selected-background-color, #e3e3e3); color: var(--selected-color, #000); } .disabled { background-color: var(--disabled-background-color, #e3e3e3); color: var(--disabled-color, #000); cursor: default; } `;var u=function(n,e,t,i){var r=arguments.length,s=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,i);else for(var h=n.length-1;h>=0;h--)(d=n[h])&&(s=(r<3?d(s):r>3?d(e,t,s):d(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s},p=class extends _{constructor(){super(...arguments),this.isSelected=!1,this.isDisabled=!1,this.isHidden=!1,this.optionValue="",this.displayedLabel="",this.optionIndex=-1}static get styles(){return S}connectedCallback(){super.connectedCallback(),this.isSelected=this.getAttribute("selected")!==null,this.isDisabled=this.getAttribute("disabled")!==null,this.isHidden=this.getAttribute("hidden")!==null,this.optionValue=this.getAttribute("value")||"",this.assignDisplayedLabel(),this.fireOnReadyCallback()}getOption(){return{label:this.displayedLabel,value:this.optionValue,select:this.select,unselect:this.unselect,selected:this.isSelected,disabled:this.isDisabled,hidden:this.isHidden}}select(){this.isSelected=!0,this.setAttribute("selected","")}unselect(){this.isSelected=!1,this.removeAttribute("selected")}setOnReadyCallback(e,t){this.onReady=e,this.optionIndex=t}setOnSelectCallback(e){this.onSelect=e}render(){let e=["option"];return this.isSelected&&e.push("selected"),this.isDisabled&&e.push("disabled"),$`