@vscode-elements/elements 2.3.1-pre.1 → 2.3.1

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.
package/dist/bundled.js CHANGED
@@ -1,4 +1,4 @@
1
- const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),s=new WeakMap;let o=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=s.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&s.set(i,t))}return t}toString(){return this.cssText}};const r=t=>new o("string"==typeof t?t:t+"",void 0,i),n=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new o(s,t,i)},l=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return r(e)})(t):t,{is:a,defineProperty:h,getOwnPropertyDescriptor:c,getOwnPropertyNames:d,getOwnPropertySymbols:u,getPrototypeOf:p}=Object,v=globalThis,b=v.trustedTypes,f=b?b.emptyScript:"",g=v.reactiveElementPolyfillSupport,m=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},w=(t,e)=>!a(t,e),y={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:w};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;let k=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&h(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const r=s?.call(this);o?.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,e=[...d(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((i,s)=>{if(e)i.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of s){const s=document.createElement("style"),o=t.litNonce;void 0!==o&&s.setAttribute("nonce",o),s.textContent=e.cssText,i.appendChild(s)}})(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:x).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=s,this[s]=o.fromAttribute(e,t.type)??this._$Ej?.get(s)??null,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const s=this.constructor,o=this[t];if(i??=s.getPropertyOptions(t),!((i.hasChanged??w)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[m("elementProperties")]=new Map,k[m("finalized")]=new Map,g?.({ReactiveElement:k}),(v.reactiveElementVersions??=[]).push("2.1.0");const $=globalThis,_=$.trustedTypes,S=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,B="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+C,A=`<${O}>`,z=document,E=()=>z.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,M="[ \t\n\f\r]",P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,F=/>/g,V=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),T=/'/g,N=/"/g,R=/^(?:script|style|textarea|title)$/i,L=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),U=L(1),G=L(2),H=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),W=new WeakMap,K=z.createTreeWalker(z,129);function X(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(e):e}const J=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=P;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,a=n.exec(i),null!==a);)c=n.lastIndex,n===P?"!--"===a[1]?n=D:void 0!==a[1]?n=F:void 0!==a[2]?(R.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=V):void 0!==a[3]&&(n=V):n===V?">"===a[0]?(n=o??P,h=-1):void 0===a[1]?h=-2:(h=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?V:'"'===a[3]?N:T):n===N||n===T?n=V:n===D||n===F?n=P:(n=V,o=void 0);const d=n===V&&t[e+1].startsWith("/>")?" ":"";r+=n===P?i+A:h>=0?(s.push(l),i.slice(0,h)+B+i.slice(h)+C+d):i+C+(-2===h?e:d)}return[X(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class Y{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,h]=J(t,e);if(this.el=Y.createElement(a,i),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=K.nextNode())&&l.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(B)){const e=h[r++],i=s.getAttribute(t).split(C),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?et:"?"===n[1]?it:"@"===n[1]?st:tt}),s.removeAttribute(t)}else t.startsWith(C)&&(l.push({type:6,index:o}),s.removeAttribute(t));if(R.test(s.tagName)){const t=s.textContent.split(C),e=t.length-1;if(e>0){s.textContent=_?_.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],E()),K.nextNode(),l.push({type:2,index:++o});s.append(t[e],E())}}}else if(8===s.nodeType)if(s.data===O)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(C,t+1));)l.push({type:7,index:o}),t+=C.length-1}o++}}static createElement(t,e){const i=z.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,s){if(e===H)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const r=I(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=Z(t,o._$AS(t,e.values),o,s)),e}class Q{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),I(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==H&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>j(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==q&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=Y.createElement(X(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??z).importNode(e,!0);K.currentNode=s;let o=K.nextNode(),r=0,n=0,l=i[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Q(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new ot(o,this,t)),this._$AV.push(e),l=i[++n]}r!==l?.index&&(o=K.nextNode(),r++)}return K.currentNode=z,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new Y(t)),e}k(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Q(this.O(E()),this.O(E()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=Z(this,t,e,0),r=!I(t)||t!==this._$AH&&t!==H,r&&(this._$AH=t);else{const s=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Z(this,s[i+n],e,n),l===H&&(l=this._$AH[n]),r||=!I(l)||l!==this._$AH[n],l===q?t=q:t!==q&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!s&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class it extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class st extends tt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??q)===H)return;const i=this._$AH,s=t===q&&i!==q||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==q&&(i===q||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ot{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const rt={I:Q},nt=$.litHtmlPolyfillSupport;nt?.(Y,Q),($.litHtmlVersions??=[]).push("3.3.0");const lt=(t,e,i)=>{const s=i?.renderBefore??e;let o=s._$litPart$;if(void 0===o){const t=i?.renderBefore??null;s._$litPart$=o=new Q(e.insertBefore(E(),t),t,void 0,i??{})}return o._$AI(t),o},at=globalThis;let ht=class extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return H}};ht._$litElement$=!0,ht.finalized=!0,at.litElementHydrateSupport?.({LitElement:ht});const ct=at.litElementPolyfillSupport;ct?.({LitElement:ht}),(at.litElementVersions??=[]).push("4.2.0");const dt={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:w},ut=(t=dt,e,i)=>{const{kind:s,metadata:o}=i;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),r.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,o,t)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const o=this[s];e.call(this,i),this.requestUpdate(s,o,t)}}throw Error("Unsupported decorator location: "+s)};function pt(t){return(e,i)=>"object"==typeof i?ut(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function vt(t){return pt({...t,state:!0,attribute:!1})}const bt=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,i);function ft(t,e){return(i,s,o)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof s?i:o??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return bt(0,0,{get(){let i=t.call(this);return void 0===i&&(i=r(this),(null!==i||this.hasUpdated)&&e.call(this,i)),i}})}return bt(0,0,{get(){return r(this)}})}}let gt;function mt(t){return(e,i)=>{const{slot:s,selector:o}=t??{},r="slot"+(s?`[name=${s}]`:":not([name])");return bt(0,0,{get(){const e=this.renderRoot?.querySelector(r),i=e?.assignedElements(t)??[];return void 0===o?i:i.filter((t=>t.matches(o)))}})}}const xt="2.3.1-pre.1",wt="__vscodeElements_disableRegistryWarning__";class yt extends ht{get version(){return xt}}const kt=t=>e=>{if(!customElements.get(t))return void customElements.define(t,e);if(wt in window)return;const i=document.createElement(t),s=i?.version;let o="";s?s!==xt?(o+="is already registered by a different version of VSCode Elements. ",o+=`This version is "${xt}", while the other one is "${s}".`):o+=`is already registered by the same version of VSCode Elements (${xt}).`:o+="is already registered by an unknown custom element handler class.",console.warn(`[VSCode Elements] ${t} ${o}\nTo suppress this warning, set window.${wt} to true`)};var $t=n`
1
+ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),s=new WeakMap;let o=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=s.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&s.set(i,t))}return t}toString(){return this.cssText}};const r=t=>new o("string"==typeof t?t:t+"",void 0,i),n=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new o(s,t,i)},l=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return r(e)})(t):t,{is:a,defineProperty:h,getOwnPropertyDescriptor:c,getOwnPropertyNames:d,getOwnPropertySymbols:u,getPrototypeOf:p}=Object,v=globalThis,b=v.trustedTypes,f=b?b.emptyScript:"",g=v.reactiveElementPolyfillSupport,m=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},w=(t,e)=>!a(t,e),y={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:w};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;let k=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&h(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const r=s?.call(this);o?.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,e=[...d(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((i,s)=>{if(e)i.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of s){const s=document.createElement("style"),o=t.litNonce;void 0!==o&&s.setAttribute("nonce",o),s.textContent=e.cssText,i.appendChild(s)}})(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:x).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=s,this[s]=o.fromAttribute(e,t.type)??this._$Ej?.get(s)??null,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const s=this.constructor,o=this[t];if(i??=s.getPropertyOptions(t),!((i.hasChanged??w)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[m("elementProperties")]=new Map,k[m("finalized")]=new Map,g?.({ReactiveElement:k}),(v.reactiveElementVersions??=[]).push("2.1.0");const $=globalThis,_=$.trustedTypes,S=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,B="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+C,A=`<${O}>`,z=document,E=()=>z.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,M="[ \t\n\f\r]",P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,F=/>/g,V=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),T=/'/g,N=/"/g,R=/^(?:script|style|textarea|title)$/i,L=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),U=L(1),G=L(2),H=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),W=new WeakMap,K=z.createTreeWalker(z,129);function X(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(e):e}const J=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=P;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,a=n.exec(i),null!==a);)c=n.lastIndex,n===P?"!--"===a[1]?n=D:void 0!==a[1]?n=F:void 0!==a[2]?(R.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=V):void 0!==a[3]&&(n=V):n===V?">"===a[0]?(n=o??P,h=-1):void 0===a[1]?h=-2:(h=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?V:'"'===a[3]?N:T):n===N||n===T?n=V:n===D||n===F?n=P:(n=V,o=void 0);const d=n===V&&t[e+1].startsWith("/>")?" ":"";r+=n===P?i+A:h>=0?(s.push(l),i.slice(0,h)+B+i.slice(h)+C+d):i+C+(-2===h?e:d)}return[X(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class Y{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,h]=J(t,e);if(this.el=Y.createElement(a,i),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=K.nextNode())&&l.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(B)){const e=h[r++],i=s.getAttribute(t).split(C),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?et:"?"===n[1]?it:"@"===n[1]?st:tt}),s.removeAttribute(t)}else t.startsWith(C)&&(l.push({type:6,index:o}),s.removeAttribute(t));if(R.test(s.tagName)){const t=s.textContent.split(C),e=t.length-1;if(e>0){s.textContent=_?_.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],E()),K.nextNode(),l.push({type:2,index:++o});s.append(t[e],E())}}}else if(8===s.nodeType)if(s.data===O)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(C,t+1));)l.push({type:7,index:o}),t+=C.length-1}o++}}static createElement(t,e){const i=z.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,s){if(e===H)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const r=I(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=Z(t,o._$AS(t,e.values),o,s)),e}class Q{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),I(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==H&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>j(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==q&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=Y.createElement(X(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??z).importNode(e,!0);K.currentNode=s;let o=K.nextNode(),r=0,n=0,l=i[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Q(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new ot(o,this,t)),this._$AV.push(e),l=i[++n]}r!==l?.index&&(o=K.nextNode(),r++)}return K.currentNode=z,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new Y(t)),e}k(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Q(this.O(E()),this.O(E()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=Z(this,t,e,0),r=!I(t)||t!==this._$AH&&t!==H,r&&(this._$AH=t);else{const s=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Z(this,s[i+n],e,n),l===H&&(l=this._$AH[n]),r||=!I(l)||l!==this._$AH[n],l===q?t=q:t!==q&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!s&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class it extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class st extends tt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??q)===H)return;const i=this._$AH,s=t===q&&i!==q||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==q&&(i===q||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ot{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const rt={I:Q},nt=$.litHtmlPolyfillSupport;nt?.(Y,Q),($.litHtmlVersions??=[]).push("3.3.0");const lt=(t,e,i)=>{const s=i?.renderBefore??e;let o=s._$litPart$;if(void 0===o){const t=i?.renderBefore??null;s._$litPart$=o=new Q(e.insertBefore(E(),t),t,void 0,i??{})}return o._$AI(t),o},at=globalThis;let ht=class extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return H}};ht._$litElement$=!0,ht.finalized=!0,at.litElementHydrateSupport?.({LitElement:ht});const ct=at.litElementPolyfillSupport;ct?.({LitElement:ht}),(at.litElementVersions??=[]).push("4.2.0");const dt={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:w},ut=(t=dt,e,i)=>{const{kind:s,metadata:o}=i;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),r.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,o,t)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const o=this[s];e.call(this,i),this.requestUpdate(s,o,t)}}throw Error("Unsupported decorator location: "+s)};function pt(t){return(e,i)=>"object"==typeof i?ut(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function vt(t){return pt({...t,state:!0,attribute:!1})}const bt=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,i);function ft(t,e){return(i,s,o)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof s?i:o??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return bt(0,0,{get(){let i=t.call(this);return void 0===i&&(i=r(this),(null!==i||this.hasUpdated)&&e.call(this,i)),i}})}return bt(0,0,{get(){return r(this)}})}}let gt;function mt(t){return(e,i)=>{const{slot:s,selector:o}=t??{},r="slot"+(s?`[name=${s}]`:":not([name])");return bt(0,0,{get(){const e=this.renderRoot?.querySelector(r),i=e?.assignedElements(t)??[];return void 0===o?i:i.filter((t=>t.matches(o)))}})}}const xt="2.3.1",wt="__vscodeElements_disableRegistryWarning__";class yt extends ht{get version(){return xt}}const kt=t=>e=>{if(!customElements.get(t))return void customElements.define(t,e);if(wt in window)return;const i=document.createElement(t),s=i?.version;let o="";s?s!==xt?(o+="is already registered by a different version of VSCode Elements. ",o+=`This version is "${xt}", while the other one is "${s}".`):o+=`is already registered by the same version of VSCode Elements (${xt}).`:o+="is already registered by an unknown custom element handler class.",console.warn(`[VSCode Elements] ${t} ${o}\nTo suppress this warning, set window.${wt} to true`)};var $t=n`
2
2
  :host([hidden]) {
3
3
  display: none;
4
4
  }
@@ -1045,7 +1045,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1045
1045
  clip-rule="evenodd"
1046
1046
  d="M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"
1047
1047
  />
1048
- </svg>`,{I:je}=rt,Me=()=>document.createComment(""),Pe=(t,e,i)=>{const s=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Me(),o),r=s.insertBefore(Me(),o);i=new je(e,r,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,n=r!==t;if(n){let e;i._$AQ?.(t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==o||n){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,o),t=e}}}return i},De=(t,e,i=t)=>(t._$AI(e,i),t),Fe={},Ve=t=>{t._$AP?.(!1,!0);let e=t._$AA;const i=t._$AB.nextSibling;for(;e!==i;){const t=e.nextSibling;e.remove(),e=t}},Te=(t,e,i)=>{const s=new Map;for(let o=e;o<=i;o++)s.set(t[o],o);return s},Ne=Et(class extends It{constructor(t){if(super(t),t.type!==At)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let s;void 0===i?i=e:void 0!==e&&(s=e);const o=[],r=[];let n=0;for(const e of t)o[n]=s?s(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:o}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,s]){const o=(t=>t._$AH)(t),{values:r,keys:n}=this.dt(e,i,s);if(!Array.isArray(o))return this.ut=n,r;const l=this.ut??=[],a=[];let h,c,d=0,u=o.length-1,p=0,v=r.length-1;for(;d<=u&&p<=v;)if(null===o[d])d++;else if(null===o[u])u--;else if(l[d]===n[p])a[p]=De(o[d],r[p]),d++,p++;else if(l[u]===n[v])a[v]=De(o[u],r[v]),u--,v--;else if(l[d]===n[v])a[v]=De(o[d],r[v]),Pe(t,a[v+1],o[d]),d++,v--;else if(l[u]===n[p])a[p]=De(o[u],r[p]),Pe(t,o[d],o[u]),u--,p++;else if(void 0===h&&(h=Te(n,p,v),c=Te(l,d,u)),h.has(l[d]))if(h.has(l[u])){const e=c.get(n[p]),i=void 0!==e?o[e]:null;if(null===i){const e=Pe(t,o[d]);De(e,r[p]),a[p]=e}else a[p]=De(i,r[p]),Pe(t,o[d],i),o[e]=null;p++}else Ve(o[u]),u--;else Ve(o[d]),d++;for(;p<=v;){const e=Pe(t,a[v+1]);De(e,r[p]),a[p++]=e}for(;d<=u;){const t=o[d++];null!==t&&Ve(t)}return this.ut=n,((t,e=Fe)=>{t._$AH=e})(t,a),H}});var Re=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Le=class extends yt{constructor(){super(...arguments),this.description="",this.selected=!1,this.disabled=!1,this._initialized=!1,this._handleSlotChange=()=>{this._initialized&&this.dispatchEvent(new Event("vsc-option-state-change",{bubbles:!0}))}}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._initialized=!0}))}willUpdate(t){this._initialized&&(t.has("description")||t.has("value")||t.has("selected")||t.has("disabled"))&&this.dispatchEvent(new Event("vsc-option-state-change",{bubbles:!0}))}render(){return U`<slot @slotchange=${this._handleSlotChange}></slot>`}};Le.styles=$t,Re([pt({type:String})],Le.prototype,"value",void 0),Re([pt({type:String})],Le.prototype,"description",void 0),Re([pt({type:Boolean,reflect:!0})],Le.prototype,"selected",void 0),Re([pt({type:Boolean,reflect:!0})],Le.prototype,"disabled",void 0),Le=Re([kt("vscode-option")],Le);const Ue=(t,e)=>{const i={match:!1,ranges:[]},s=t.toLowerCase(),o=e.toLowerCase(),r=s.split(" ");let n=0;return r.forEach(((e,s)=>{if(s>0&&(n+=r[s-1].length+1),i.match)return;const l=e.indexOf(o),a=o.length;0===l&&(i.match=!0,i.ranges.push([n+l,Math.min(n+l+a,t.length)]))})),i},Ge=(t,e)=>{const i={match:!1,ranges:[]};return 0===t.toLowerCase().indexOf(e.toLowerCase())&&(i.match=!0,i.ranges=[[0,e.length]]),i},He=(t,e)=>{const i={match:!1,ranges:[]},s=t.toLowerCase().indexOf(e.toLowerCase());return s>-1&&(i.match=!0,i.ranges=[[s,s+e.length]]),i},qe=(t,e)=>{const i={match:!1,ranges:[]};let s=0,o=0;const r=e.length-1,n=t.toLowerCase(),l=e.toLowerCase();for(let t=0;t<=r;t++){if(o=n.indexOf(l[t],s),-1===o)return{match:!1,ranges:[]};i.match=!0,i.ranges.push([o,o+1]),s=o+1}return i},We=t=>{const e=[];return" "===t?(e.push(U`&nbsp;`),e):(0===t.indexOf(" ")&&e.push(U`&nbsp;`),e.push(U`${t.trimStart().trimEnd()}`),t.lastIndexOf(" ")===t.length-1&&e.push(U`&nbsp;`),e)};class Ke{constructor(t){this._activeIndex=-1,this._options=[],this._filterPattern="",this._filterMethod="fuzzy",this._combobox=!1,this._indexByValue=new Map,this._indexByLabel=new Map,this._selectedIndex=-1,this._selectedIndexes=new Set,this._multiSelect=!1,this._numOfVisibleOptions=0,(this._host=t).addController(this)}hostConnected(){}get activeIndex(){return this._activeIndex}set activeIndex(t){this._activeIndex=t,this._host.requestUpdate()}get relativeActiveIndex(){return this._options[this._activeIndex]?.filteredIndex??-1}set comboboxMode(t){this._combobox=t,this._host.requestUpdate()}get comboboxMode(){return this._combobox}get multiSelect(){return this._multiSelect}set multiSelect(t){this._selectedIndex=-1,this._selectedIndexes.clear(),this._multiSelect=t,this._host.requestUpdate()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){-1!==this._selectedIndex&&(this._options[this._selectedIndex].selected??=!1);const e=this.getOptionByIndex(t);this._selectedIndex=e?t:-1,this._host.requestUpdate()}get selectedIndexes(){return Array.from(this._selectedIndexes)}set selectedIndexes(t){this._selectedIndexes.forEach((t=>{this._options[t].selected=!1})),this._selectedIndexes=new Set(t),t.forEach((t=>{void 0!==this._options[t]&&(this._options[t].selected=!0)})),this._host.requestUpdate()}set value(t){if(this._multiSelect){const e=t.map((t=>this._indexByValue.get(t))).filter((t=>void 0!==t));this._selectedIndexes=new Set(e)}else this._selectedIndex=this._indexByValue.get(t)??-1;this._host.requestUpdate()}get value(){return this._multiSelect?this._selectedIndexes.size>0?Array.from(this._selectedIndexes).map((t=>this._options[t].value)):[]:this._selectedIndex>-1?this._options[this._selectedIndex].value:""}set multiSelectValue(t){const e=t.map((t=>this._indexByValue.get(t))).filter((t=>void 0!==t));this._selectedIndexes=new Set(e)}get multiSelectValue(){return this._selectedIndexes.size>0?Array.from(this._selectedIndexes).map((t=>this._options[t].value)):[]}get filterPattern(){return this._filterPattern}set filterPattern(t){t!==this._filterPattern&&(this._filterPattern=t,this._updateState())}get filterMethod(){return this._filterMethod}set filterMethod(t){t!==this._filterMethod&&(this._filterMethod=t,this._updateState())}get options(){return this._options}get numOfVisibleOptions(){return this._numOfVisibleOptions}get numOptions(){return this._options.length}populate(t){this._indexByValue.clear(),this._indexByLabel.clear(),this._options=t.map(((t,e)=>(this._indexByValue.set(t.value??"",e),this._indexByLabel.set(t.label??"",e),{description:t.description??"",disabled:t.disabled??!1,label:t.label??"",selected:t.selected??!1,value:t.value??"",index:e,filteredIndex:e,ranges:[],visible:!0}))),this._numOfVisibleOptions=this._options.length}add(t){const e=this._options.length,{description:i,disabled:s,label:o,selected:r,value:n}=t;let l=!0,a=[];if(this._combobox&&""!==this._filterPattern){const t=this._searchByPattern(o??"");l=t.match,a=t.ranges}this._indexByValue.set(n??"",e),this._indexByLabel.set(o??"",e),r&&(this._selectedIndex=e,this._selectedIndexes.add(e),this._activeIndex=e),this._options.push({index:e,filteredIndex:e,description:i??"",disabled:s??!1,label:o??"",selected:r??!1,value:n??"",visible:l,ranges:a}),l&&(this._numOfVisibleOptions+=1)}clear(){this._options=[],this._indexByValue.clear(),this._indexByLabel.clear(),this._numOfVisibleOptions=0}getIsIndexSelected(t){return this._multiSelect?this._selectedIndexes.has(t):this._selectedIndex===t}expandMultiSelection(t){t.forEach((t=>{const e=this._indexByValue.get(t)??-1;-1!==e&&this._selectedIndexes.add(e)})),this._host.requestUpdate()}toggleActiveMultiselectOption(){const t=this._options[this._activeIndex]??null;if(!t)return;this._selectedIndexes.has(t.index)?this._selectedIndexes.delete(t.index):this._selectedIndexes.add(t.index),this._host.requestUpdate()}toggleOptionSelected(t){const e=this._selectedIndexes.has(t);this._options[t].selected=!this._options[t].selected,e?this._selectedIndexes.delete(t):this._selectedIndexes.add(t),this._host.requestUpdate()}getActiveOption(){return this._options[this._activeIndex]??null}getSelectedOption(){return this._options[this._selectedIndex]??null}getOptionByIndex(t){return this._options[t]??null}findOptionIndex(t){return this._indexByValue.get(t)??-1}getOptionByValue(t,e=!1){const i=this._indexByValue.get(t)??-1;return-1===i?null:e||this._options[i].visible?this._options[i]:null}getOptionByLabel(t){const e=this._indexByLabel.get(t)??-1;return-1===e?null:this._options[e]}next(t){let e=-1;for(let i=(t??this._activeIndex)+1;i<this._options.length;i++)if(this._options[i]&&!this._options[i].disabled&&this._options[i].visible){e=i;break}return e>-1?this._options[e]:null}prev(t){let e=-1;for(let i=(t??this._activeIndex)-1;i>=0;i--)if(this._options[i]&&!this._options[i].disabled&&this._options[i].visible){e=i;break}return e>-1?this._options[e]:null}activateDefault(){if(this._multiSelect){if(this._selectedIndexes.size>0){const t=this._selectedIndexes.values().next();this._activeIndex=t.value?t.value:0}}else this._selectedIndex>-1?this._activeIndex=this._selectedIndex:this._activeIndex=0;this._host.requestUpdate()}selectAll(){this._multiSelect&&(this._options.forEach(((t,e)=>{this._options[e].selected=!0,this._selectedIndexes.add(e)})),this._host.requestUpdate())}selectNone(){this._multiSelect&&(this._options.forEach(((t,e)=>{this._options[e].selected=!1})),this._selectedIndexes.clear(),this._host.requestUpdate())}_searchByPattern(t){let e;switch(this._filterMethod){case"startsWithPerTerm":e=Ue(t,this._filterPattern);break;case"startsWith":e=Ge(t,this._filterPattern);break;case"contains":e=He(t,this._filterPattern);break;default:e=qe(t,this._filterPattern)}return e}_updateState(){if(this._combobox&&""!==this._filterPattern){let t=-1;this._numOfVisibleOptions=0,this._options.forEach((({label:e},i)=>{const s=this._searchByPattern(e);this._options[i].visible=s.match,this._options[i].ranges=s.ranges,this._options[i].filteredIndex=s.match?++t:-1,s.match&&(this._numOfVisibleOptions+=1)}))}else this._options.forEach(((t,e)=>{this._options[e].visible=!0,this._options[e].ranges=[]})),this._numOfVisibleOptions=this._options.length;this._host.requestUpdate()}}const Xe=[$t,n`
1048
+ </svg>`,{I:je}=rt,Me=()=>document.createComment(""),Pe=(t,e,i)=>{const s=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Me(),o),r=s.insertBefore(Me(),o);i=new je(e,r,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,n=r!==t;if(n){let e;i._$AQ?.(t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==o||n){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,o),t=e}}}return i},De=(t,e,i=t)=>(t._$AI(e,i),t),Fe={},Ve=t=>{t._$AP?.(!1,!0);let e=t._$AA;const i=t._$AB.nextSibling;for(;e!==i;){const t=e.nextSibling;e.remove(),e=t}},Te=(t,e,i)=>{const s=new Map;for(let o=e;o<=i;o++)s.set(t[o],o);return s},Ne=Et(class extends It{constructor(t){if(super(t),t.type!==At)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let s;void 0===i?i=e:void 0!==e&&(s=e);const o=[],r=[];let n=0;for(const e of t)o[n]=s?s(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:o}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,s]){const o=(t=>t._$AH)(t),{values:r,keys:n}=this.dt(e,i,s);if(!Array.isArray(o))return this.ut=n,r;const l=this.ut??=[],a=[];let h,c,d=0,u=o.length-1,p=0,v=r.length-1;for(;d<=u&&p<=v;)if(null===o[d])d++;else if(null===o[u])u--;else if(l[d]===n[p])a[p]=De(o[d],r[p]),d++,p++;else if(l[u]===n[v])a[v]=De(o[u],r[v]),u--,v--;else if(l[d]===n[v])a[v]=De(o[d],r[v]),Pe(t,a[v+1],o[d]),d++,v--;else if(l[u]===n[p])a[p]=De(o[u],r[p]),Pe(t,o[d],o[u]),u--,p++;else if(void 0===h&&(h=Te(n,p,v),c=Te(l,d,u)),h.has(l[d]))if(h.has(l[u])){const e=c.get(n[p]),i=void 0!==e?o[e]:null;if(null===i){const e=Pe(t,o[d]);De(e,r[p]),a[p]=e}else a[p]=De(i,r[p]),Pe(t,o[d],i),o[e]=null;p++}else Ve(o[u]),u--;else Ve(o[d]),d++;for(;p<=v;){const e=Pe(t,a[v+1]);De(e,r[p]),a[p++]=e}for(;d<=u;){const t=o[d++];null!==t&&Ve(t)}return this.ut=n,((t,e=Fe)=>{t._$AH=e})(t,a),H}});var Re=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Le=class extends yt{constructor(){super(...arguments),this.description="",this.selected=!1,this.disabled=!1,this._initialized=!1,this._handleSlotChange=()=>{this._initialized&&this.dispatchEvent(new Event("vsc-option-state-change",{bubbles:!0}))}}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._initialized=!0}))}willUpdate(t){this._initialized&&(t.has("description")||t.has("value")||t.has("selected")||t.has("disabled"))&&this.dispatchEvent(new Event("vsc-option-state-change",{bubbles:!0}))}render(){return U`<slot @slotchange=${this._handleSlotChange}></slot>`}};Le.styles=$t,Re([pt({type:String})],Le.prototype,"value",void 0),Re([pt({type:String})],Le.prototype,"description",void 0),Re([pt({type:Boolean,reflect:!0})],Le.prototype,"selected",void 0),Re([pt({type:Boolean,reflect:!0})],Le.prototype,"disabled",void 0),Le=Re([kt("vscode-option")],Le);const Ue=(t,e)=>{const i={match:!1,ranges:[]},s=t.toLowerCase(),o=e.toLowerCase(),r=s.split(" ");let n=0;return r.forEach(((e,s)=>{if(s>0&&(n+=r[s-1].length+1),i.match)return;const l=e.indexOf(o),a=o.length;0===l&&(i.match=!0,i.ranges.push([n+l,Math.min(n+l+a,t.length)]))})),i},Ge=(t,e)=>{const i={match:!1,ranges:[]};return 0===t.toLowerCase().indexOf(e.toLowerCase())&&(i.match=!0,i.ranges=[[0,e.length]]),i},He=(t,e)=>{const i={match:!1,ranges:[]},s=t.toLowerCase().indexOf(e.toLowerCase());return s>-1&&(i.match=!0,i.ranges=[[s,s+e.length]]),i},qe=(t,e)=>{const i={match:!1,ranges:[]};let s=0,o=0;const r=e.length-1,n=t.toLowerCase(),l=e.toLowerCase();for(let t=0;t<=r;t++){if(o=n.indexOf(l[t],s),-1===o)return{match:!1,ranges:[]};i.match=!0,i.ranges.push([o,o+1]),s=o+1}return i},We=t=>{const e=[];return" "===t?(e.push(U`&nbsp;`),e):(0===t.indexOf(" ")&&e.push(U`&nbsp;`),e.push(U`${t.trimStart().trimEnd()}`),t.lastIndexOf(" ")===t.length-1&&e.push(U`&nbsp;`),e)};class Ke{constructor(t){this._activeIndex=-1,this._options=[],this._filterPattern="",this._filterMethod="fuzzy",this._combobox=!1,this._indexByValue=new Map,this._indexByLabel=new Map,this._selectedIndex=-1,this._selectedIndexes=new Set,this._multiSelect=!1,this._numOfVisibleOptions=0,(this._host=t).addController(this)}hostConnected(){}get activeIndex(){return this._activeIndex}set activeIndex(t){this._activeIndex=t,this._host.requestUpdate()}get relativeActiveIndex(){return this._options[this._activeIndex]?.filteredIndex??-1}set comboboxMode(t){this._combobox=t,this._host.requestUpdate()}get comboboxMode(){return this._combobox}get multiSelect(){return this._multiSelect}set multiSelect(t){this._selectedIndex=-1,this._selectedIndexes.clear(),this._multiSelect=t,this._host.requestUpdate()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){-1!==this._selectedIndex&&this._options[this._selectedIndex]&&(this._options[this._selectedIndex].selected??=!1);const e=this.getOptionByIndex(t);this._selectedIndex=e?t:-1,this._host.requestUpdate()}get selectedIndexes(){return Array.from(this._selectedIndexes)}set selectedIndexes(t){this._selectedIndexes.forEach((t=>{this._options[t].selected=!1})),this._selectedIndexes=new Set(t),t.forEach((t=>{void 0!==this._options[t]&&(this._options[t].selected=!0)})),this._host.requestUpdate()}set value(t){if(this._multiSelect){const e=t.map((t=>this._indexByValue.get(t))).filter((t=>void 0!==t));this._selectedIndexes=new Set(e)}else this._selectedIndex=this._indexByValue.get(t)??-1;this._host.requestUpdate()}get value(){return this._multiSelect?this._selectedIndexes.size>0?Array.from(this._selectedIndexes).filter((t=>t>=0&&t<this._options.length)).map((t=>this._options[t].value)):[]:this._selectedIndex>-1&&this._selectedIndex<this._options.length?this._options[this._selectedIndex].value:""}set multiSelectValue(t){const e=t.map((t=>this._indexByValue.get(t))).filter((t=>void 0!==t));this._selectedIndexes=new Set(e)}get multiSelectValue(){return this._selectedIndexes.size>0?Array.from(this._selectedIndexes).map((t=>this._options[t].value)):[]}get filterPattern(){return this._filterPattern}set filterPattern(t){t!==this._filterPattern&&(this._filterPattern=t,this._updateState())}get filterMethod(){return this._filterMethod}set filterMethod(t){t!==this._filterMethod&&(this._filterMethod=t,this._updateState())}get options(){return this._options}get numOfVisibleOptions(){return this._numOfVisibleOptions}get numOptions(){return this._options.length}populate(t){this._indexByValue.clear(),this._indexByLabel.clear(),this._options=t.map(((t,e)=>(this._indexByValue.set(t.value??"",e),this._indexByLabel.set(t.label??"",e),{description:t.description??"",disabled:t.disabled??!1,label:t.label??"",selected:t.selected??!1,value:t.value??"",index:e,filteredIndex:e,ranges:[],visible:!0}))),this._numOfVisibleOptions=this._options.length}add(t){const e=this._options.length,{description:i,disabled:s,label:o,selected:r,value:n}=t;let l=!0,a=[];if(this._combobox&&""!==this._filterPattern){const t=this._searchByPattern(o??"");l=t.match,a=t.ranges}this._indexByValue.set(n??"",e),this._indexByLabel.set(o??"",e),r&&(this._selectedIndex=e,this._selectedIndexes.add(e),this._activeIndex=e),this._options.push({index:e,filteredIndex:e,description:i??"",disabled:s??!1,label:o??"",selected:r??!1,value:n??"",visible:l,ranges:a}),l&&(this._numOfVisibleOptions+=1)}clear(){this._options=[],this._indexByValue.clear(),this._indexByLabel.clear(),this._numOfVisibleOptions=0,this._selectedIndex=-1,this._selectedIndexes.clear(),this._activeIndex=-1}getIsIndexSelected(t){return this._multiSelect?this._selectedIndexes.has(t):this._selectedIndex===t}expandMultiSelection(t){t.forEach((t=>{const e=this._indexByValue.get(t)??-1;-1!==e&&this._selectedIndexes.add(e)})),this._host.requestUpdate()}toggleActiveMultiselectOption(){const t=this._options[this._activeIndex]??null;if(!t)return;this._selectedIndexes.has(t.index)?this._selectedIndexes.delete(t.index):this._selectedIndexes.add(t.index),this._host.requestUpdate()}toggleOptionSelected(t){const e=this._selectedIndexes.has(t);this._options[t].selected=!this._options[t].selected,e?this._selectedIndexes.delete(t):this._selectedIndexes.add(t),this._host.requestUpdate()}getActiveOption(){return this._options[this._activeIndex]??null}getSelectedOption(){return this._options[this._selectedIndex]??null}getOptionByIndex(t){return this._options[t]??null}findOptionIndex(t){return this._indexByValue.get(t)??-1}getOptionByValue(t,e=!1){const i=this._indexByValue.get(t)??-1;return-1===i?null:e||this._options[i].visible?this._options[i]:null}getOptionByLabel(t){const e=this._indexByLabel.get(t)??-1;return-1===e?null:this._options[e]}next(t){let e=-1;for(let i=(t??this._activeIndex)+1;i<this._options.length;i++)if(this._options[i]&&!this._options[i].disabled&&this._options[i].visible){e=i;break}return e>-1?this._options[e]:null}prev(t){let e=-1;for(let i=(t??this._activeIndex)-1;i>=0;i--)if(this._options[i]&&!this._options[i].disabled&&this._options[i].visible){e=i;break}return e>-1?this._options[e]:null}activateDefault(){if(this._multiSelect){if(this._selectedIndexes.size>0){const t=this._selectedIndexes.values().next();this._activeIndex=t.value?t.value:0}}else this._selectedIndex>-1?this._activeIndex=this._selectedIndex:this._activeIndex=0;this._host.requestUpdate()}selectAll(){this._multiSelect&&(this._options.forEach(((t,e)=>{this._options[e].selected=!0,this._selectedIndexes.add(e)})),this._host.requestUpdate())}selectNone(){this._multiSelect&&(this._options.forEach(((t,e)=>{this._options[e].selected=!1})),this._selectedIndexes.clear(),this._host.requestUpdate())}_searchByPattern(t){let e;switch(this._filterMethod){case"startsWithPerTerm":e=Ue(t,this._filterPattern);break;case"startsWith":e=Ge(t,this._filterPattern);break;case"contains":e=He(t,this._filterPattern);break;default:e=qe(t,this._filterPattern)}return e}_updateState(){if(this._combobox&&""!==this._filterPattern){let t=-1;this._numOfVisibleOptions=0,this._options.forEach((({label:e},i)=>{const s=this._searchByPattern(e);this._options[i].visible=s.match,this._options[i].ranges=s.ranges,this._options[i].filteredIndex=s.match?++t:-1,s.match&&(this._numOfVisibleOptions+=1)}))}else this._options.forEach(((t,e)=>{this._options[e].visible=!0,this._options[e].ranges=[]})),this._numOfVisibleOptions=this._options.length;this._host.requestUpdate()}}const Xe=[$t,n`
1049
1049
  :host {
1050
1050
  display: block;
1051
1051
  position: relative;
@@ -1148,7 +1148,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1148
1148
  .content {
1149
1149
  overflow: hidden;
1150
1150
  }
1151
- `];var Je=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Ye=class extends yt{set scrollPos(t){this._scrollPos=this._limitScrollPos(t),this._updateScrollbar(),this._updateThumbPosition(),this.requestUpdate()}get scrollPos(){return this._scrollPos}get scrollMax(){return this._scrollableContainer?this._scrollableContainer.scrollHeight-this._scrollableContainer.clientHeight:0}constructor(){super(),this.alwaysVisible=!1,this.fastScrollSensitivity=5,this.minThumbSize=20,this.mouseWheelScrollSensitivity=1,this.shadow=!0,this.scrolled=!1,this._scrollPos=0,this._isDragging=!1,this._thumbHeight=0,this._thumbY=0,this._thumbVisible=!1,this._thumbFade=!1,this._thumbActive=!1,this._scrollThumbStartY=0,this._mouseStartY=0,this._scrollbarVisible=!0,this._scrollbarTrackZ=0,this._resizeObserverCallback=()=>{this._updateScrollbar(),this._updateThumbPosition()},this._handleSlotChange=()=>{this._updateScrollbar(),this._updateThumbPosition(),this._zIndexFix()},this._handleScrollThumbMouseMove=t=>{const e=this._scrollThumbStartY+(t.screenY-this._mouseStartY);this._thumbY=this._limitThumbPos(e),this.scrollPos=this._calculateScrollPosFromThumbPos(this._thumbY),this.dispatchEvent(new CustomEvent("vsc-scrollable-scroll",{detail:this.scrollPos}))},this._handleScrollThumbMouseUp=t=>{this._isDragging=!1,this._thumbActive=!1;const e=this.getBoundingClientRect(),{x:i,y:s,width:o,height:r}=e,{pageX:n,pageY:l}=t;(n>i+o||n<i||l>s+r||l<s)&&(this._thumbFade=!0,this._thumbVisible=!1),document.removeEventListener("mousemove",this._handleScrollThumbMouseMove),document.removeEventListener("mouseup",this._handleScrollThumbMouseUp)},this._handleComponentMouseOver=()=>{this._thumbVisible=!0,this._thumbFade=!1},this._handleComponentMouseOut=()=>{this._thumbActive||(this._thumbVisible=!1,this._thumbFade=!0)},this._handleComponentWheel=t=>{t.preventDefault();const e=t.altKey?this.mouseWheelScrollSensitivity*this.fastScrollSensitivity:this.mouseWheelScrollSensitivity;this.scrollPos=this._limitScrollPos(this.scrollPos+t.deltaY*e),this.dispatchEvent(new CustomEvent("vsc-scrollable-scroll",{detail:this.scrollPos}))},this._handleScrollableContainerScroll=t=>{t.currentTarget&&(this.scrollPos=t.currentTarget.scrollTop)},this.addEventListener("mouseover",this._handleComponentMouseOver),this.addEventListener("mouseout",this._handleComponentMouseOut),this.addEventListener("wheel",this._handleComponentWheel)}connectedCallback(){super.connectedCallback(),this._hostResizeObserver=new ResizeObserver(this._resizeObserverCallback),this._contentResizeObserver=new ResizeObserver(this._resizeObserverCallback),this.requestUpdate(),this.updateComplete.then((()=>{this._hostResizeObserver.observe(this),this._contentResizeObserver.observe(this._contentElement),this._updateThumbPosition()}))}disconnectedCallback(){super.disconnectedCallback(),this._hostResizeObserver.unobserve(this),this._hostResizeObserver.disconnect(),this._contentResizeObserver.unobserve(this._contentElement),this._contentResizeObserver.disconnect()}firstUpdated(t){this._updateThumbPosition()}_calcThumbHeight(){const t=this.offsetHeight,e=t*(t/(this._contentElement?.offsetHeight??0));return Math.max(this.minThumbSize,e)}_updateScrollbar(){const t=this._contentElement?.offsetHeight??0;this.offsetHeight>=t?this._scrollbarVisible=!1:(this._scrollbarVisible=!0,this._thumbHeight=this._calcThumbHeight()),this.requestUpdate()}_zIndexFix(){let t=0;this._assignedElements.forEach((e=>{if("style"in e){const i=window.getComputedStyle(e).zIndex;/([0-9-])+/g.test(i)&&(t=Number(i)>t?Number(i):t)}})),this._scrollbarTrackZ=t+1,this.requestUpdate()}_updateThumbPosition(){if(!this._scrollableContainer)return;this.scrolled=this.scrollPos>0;const t=this.offsetHeight,e=this._thumbHeight,i=this._contentElement.offsetHeight-t,s=this.scrollPos/i,o=t-e;this._thumbY=Math.min(s*(t-e),o)}_calculateScrollPosFromThumbPos(t){const e=this.getBoundingClientRect().height,i=t/(e-this._scrollThumbElement.getBoundingClientRect().height)*(this._contentElement.getBoundingClientRect().height-e);return this._limitScrollPos(i)}_limitScrollPos(t){return t<0?0:t>this.scrollMax?this.scrollMax:t}_limitThumbPos(t){const e=this.getBoundingClientRect().height,i=this._scrollThumbElement.getBoundingClientRect().height;return t<0?0:t>e-i?e-i:t}_handleScrollThumbMouseDown(t){const e=this.getBoundingClientRect(),i=this._scrollThumbElement.getBoundingClientRect();this._mouseStartY=t.screenY,this._scrollThumbStartY=i.top-e.top,this._isDragging=!0,this._thumbActive=!0,document.addEventListener("mousemove",this._handleScrollThumbMouseMove),document.addEventListener("mouseup",this._handleScrollThumbMouseUp)}_handleScrollbarTrackPress(t){t.target===t.currentTarget&&(this._thumbY=t.offsetY-this._thumbHeight/2,this.scrollPos=this._calculateScrollPosFromThumbPos(this._thumbY))}render(){return U`
1151
+ `];var Je=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Ye=class extends yt{set scrollPos(t){this._scrollPos=this._limitScrollPos(t),this._updateScrollbar(),this._updateThumbPosition(),this.requestUpdate()}get scrollPos(){return this._scrollPos}get scrollMax(){return this._scrollableContainer?this._scrollableContainer.scrollHeight-this._scrollableContainer.clientHeight:0}constructor(){super(),this.alwaysVisible=!1,this.fastScrollSensitivity=5,this.minThumbSize=20,this.mouseWheelScrollSensitivity=1,this.shadow=!0,this.scrolled=!1,this._scrollPos=0,this._isDragging=!1,this._thumbHeight=0,this._thumbY=0,this._thumbVisible=!1,this._thumbFade=!1,this._thumbActive=!1,this._componentHeight=0,this._contentHeight=0,this._scrollThumbStartY=0,this._mouseStartY=0,this._scrollbarVisible=!0,this._scrollbarTrackZ=0,this._resizeObserverCallback=()=>{this._componentHeight=this.offsetHeight,this._contentHeight=this._contentElement.offsetHeight,this._updateScrollbar(),this._updateThumbPosition()},this._handleSlotChange=()=>{this._updateScrollbar(),this._updateThumbPosition(),this._zIndexFix()},this._handleScrollThumbMouseMove=t=>{const e=this._scrollThumbStartY+(t.screenY-this._mouseStartY);this._thumbY=this._limitThumbPos(e),this.scrollPos=this._calculateScrollPosFromThumbPos(this._thumbY),this.dispatchEvent(new CustomEvent("vsc-scrollable-scroll",{detail:this.scrollPos}))},this._handleScrollThumbMouseUp=t=>{this._isDragging=!1,this._thumbActive=!1;const e=this.getBoundingClientRect(),{x:i,y:s,width:o,height:r}=e,{pageX:n,pageY:l}=t;(n>i+o||n<i||l>s+r||l<s)&&(this._thumbFade=!0,this._thumbVisible=!1),document.removeEventListener("mousemove",this._handleScrollThumbMouseMove),document.removeEventListener("mouseup",this._handleScrollThumbMouseUp)},this._handleComponentMouseOver=()=>{this._thumbVisible=!0,this._thumbFade=!1},this._handleComponentMouseOut=()=>{this._thumbActive||(this._thumbVisible=!1,this._thumbFade=!0)},this._handleComponentWheel=t=>{if(this._contentHeight<=this._componentHeight)return;t.preventDefault();const e=t.altKey?this.mouseWheelScrollSensitivity*this.fastScrollSensitivity:this.mouseWheelScrollSensitivity;this.scrollPos=this._limitScrollPos(this.scrollPos+t.deltaY*e),this.dispatchEvent(new CustomEvent("vsc-scrollable-scroll",{detail:this.scrollPos}))},this._handleScrollableContainerScroll=t=>{t.currentTarget&&(this.scrollPos=t.currentTarget.scrollTop)},this.addEventListener("mouseover",this._handleComponentMouseOver),this.addEventListener("mouseout",this._handleComponentMouseOut),this.addEventListener("wheel",this._handleComponentWheel)}connectedCallback(){super.connectedCallback(),this._hostResizeObserver=new ResizeObserver(this._resizeObserverCallback),this._contentResizeObserver=new ResizeObserver(this._resizeObserverCallback),this.requestUpdate(),this.updateComplete.then((()=>{this._hostResizeObserver.observe(this),this._contentResizeObserver.observe(this._contentElement),this._updateThumbPosition()}))}disconnectedCallback(){super.disconnectedCallback(),this._hostResizeObserver.unobserve(this),this._hostResizeObserver.disconnect(),this._contentResizeObserver.unobserve(this._contentElement),this._contentResizeObserver.disconnect()}firstUpdated(t){this._updateThumbPosition()}_calcThumbHeight(){const t=this.offsetHeight,e=t*(t/(this._contentElement?.offsetHeight??0));return Math.max(this.minThumbSize,e)}_updateScrollbar(){const t=this._contentElement?.offsetHeight??0;this.offsetHeight>=t?this._scrollbarVisible=!1:(this._scrollbarVisible=!0,this._thumbHeight=this._calcThumbHeight()),this.requestUpdate()}_zIndexFix(){let t=0;this._assignedElements.forEach((e=>{if("style"in e){const i=window.getComputedStyle(e).zIndex;/([0-9-])+/g.test(i)&&(t=Number(i)>t?Number(i):t)}})),this._scrollbarTrackZ=t+1,this.requestUpdate()}_updateThumbPosition(){if(!this._scrollableContainer)return;this.scrolled=this.scrollPos>0;const t=this.offsetHeight,e=this._thumbHeight,i=this._contentElement.offsetHeight-t,s=this.scrollPos/i,o=t-e;this._thumbY=Math.min(s*(t-e),o)}_calculateScrollPosFromThumbPos(t){const e=this.getBoundingClientRect().height,i=t/(e-this._scrollThumbElement.getBoundingClientRect().height)*(this._contentElement.getBoundingClientRect().height-e);return this._limitScrollPos(i)}_limitScrollPos(t){return t<0?0:t>this.scrollMax?this.scrollMax:t}_limitThumbPos(t){const e=this.getBoundingClientRect().height,i=this._scrollThumbElement.getBoundingClientRect().height;return t<0?0:t>e-i?e-i:t}_handleScrollThumbMouseDown(t){const e=this.getBoundingClientRect(),i=this._scrollThumbElement.getBoundingClientRect();this._mouseStartY=t.screenY,this._scrollThumbStartY=i.top-e.top,this._isDragging=!0,this._thumbActive=!0,document.addEventListener("mousemove",this._handleScrollThumbMouseMove),document.addEventListener("mouseup",this._handleScrollThumbMouseUp)}_handleScrollbarTrackPress(t){t.target===t.currentTarget&&(this._thumbY=t.offsetY-this._thumbHeight/2,this.scrollPos=this._calculateScrollPosFromThumbPos(this._thumbY))}render(){return U`
1152
1152
  <div
1153
1153
  class="scrollable-container"
1154
1154
  .style=${Pt({userSelect:this._isDragging?"none":"auto"})}
@@ -1639,16 +1639,16 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1639
1639
  :host([position='above']) .description {
1640
1640
  border-width: 0 0 1px;
1641
1641
  }
1642
- `],ii=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let si=class extends ti{set selectedIndexes(t){this._opts.selectedIndexes=t}get selectedIndexes(){return this._opts.selectedIndexes}set value(t){this._opts.multiSelectValue=t,this._opts.selectedIndexes.length>0?this._requestedValueToSetLater=[]:this._requestedValueToSetLater=Array.isArray(t)?t:[t],this._setFormValue(),this._manageRequired()}get value(){return this._opts.multiSelectValue}get form(){return this._internals.form}get type(){return"select-multiple"}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}selectAll(){this._opts.selectAll()}selectNone(){this._opts.selectNone()}constructor(){super(),this.defaultValue=[],this.required=!1,this.name=void 0,this._requestedValueToSetLater=[],this._onOptionClick=t=>{const e=t.composedPath().find((t=>"matches"in t&&t.matches("li.option")));if(!e)return;if(e.classList.contains("placeholder"))return void this._createAndSelectSuggestedOption();const i=Number(e.dataset.index);this._opts.toggleOptionSelected(i),this._setFormValue(),this._manageRequired(),this._dispatchChangeEvent()},this._opts.multiSelect=!0,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._setDefaultValue(),this._manageRequired()}))}formResetCallback(){this.updateComplete.then((()=>{this.value=this.defaultValue}))}formStateRestoreCallback(t,e){const i=Array.from(t.entries()).map((t=>String(t[1])));this.updateComplete.then((()=>{this.value=i}))}_setDefaultValue(){if(Array.isArray(this.defaultValue)&&this.defaultValue.length>0){const t=this.defaultValue.map((t=>String(t)));this.value=t}}_dispatchChangeEvent(){super._dispatchChangeEvent()}_onFaceClick(){super._onFaceClick(),this._opts.activeIndex=0}_toggleComboboxDropdown(){super._toggleComboboxDropdown(),this._opts.activeIndex=-1}_manageRequired(){const{value:t}=this;0===t.length&&this.required?this._internals.setValidity({valueMissing:!0},"Please select an item in the list.",this._faceElement):this._internals.setValidity({})}_setFormValue(){const t=new FormData;this._values.forEach((e=>{t.append(this.name??"",e)})),this._internals.setFormValue(t)}async _createAndSelectSuggestedOption(){super._createAndSelectSuggestedOption();const t=this._createSuggestedOption();await this.updateComplete,this.selectedIndexes=[...this.selectedIndexes,t],this._dispatchChangeEvent();const e=new CustomEvent("vsc-multi-select-create-option",{detail:{value:this._opts.getOptionByIndex(t)?.value??""}});this.dispatchEvent(e),this.open=!1,this._isPlaceholderOptionActive=!1}_onSlotChange(){super._onSlotChange(),this._requestedValueToSetLater.length>0&&(this._opts.expandMultiSelection(this._requestedValueToSetLater),this._requestedValueToSetLater=this._requestedValueToSetLater.filter((t=>-1===this._opts.findOptionIndex(t))))}_onEnterKeyDown(t){super._onEnterKeyDown(t),this.open?this._isPlaceholderOptionActive?this._createAndSelectSuggestedOption():(this._opts.toggleActiveMultiselectOption(),this._setFormValue(),this._manageRequired(),this._dispatchChangeEvent()):(this._opts.filterPattern="",this.open=!0)}_onMultiAcceptClick(){this.open=!1}_onMultiDeselectAllClick(){this._opts.selectedIndexes=[],this._values=[],this._options=this._options.map((t=>({...t,selected:!1}))),this._manageRequired(),this._dispatchChangeEvent()}_onMultiSelectAllClick(){this._opts.selectedIndexes=[],this._values=[],this._options=this._options.map((t=>({...t,selected:!0}))),this._options.forEach(((t,e)=>{this._selectedIndexes.push(e),this._values.push(t.value),this._dispatchChangeEvent()})),this._setFormValue(),this._manageRequired()}_renderLabel(){return 0===this._opts.selectedIndexes.length?U`<span class="select-face-badge no-item">0 Selected</span>`:U`<span class="select-face-badge"
1642
+ `],ii=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let si=class extends ti{set selectedIndexes(t){this._opts.selectedIndexes=t}get selectedIndexes(){return this._opts.selectedIndexes}set value(t){this._opts.multiSelectValue=t,this._opts.selectedIndexes.length>0?this._requestedValueToSetLater=[]:this._requestedValueToSetLater=Array.isArray(t)?t:[t],this._setFormValue(),this._manageRequired()}get value(){return this._opts.multiSelectValue}get form(){return this._internals.form}get type(){return"select-multiple"}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}selectAll(){this._opts.selectAll()}selectNone(){this._opts.selectNone()}constructor(){super(),this.defaultValue=[],this.required=!1,this.name=void 0,this._requestedValueToSetLater=[],this._onOptionClick=t=>{const e=t.composedPath().find((t=>"matches"in t&&t.matches("li.option")));if(!e)return;if(e.classList.contains("placeholder"))return void this._createAndSelectSuggestedOption();const i=Number(e.dataset.index);this._opts.toggleOptionSelected(i),this._setFormValue(),this._manageRequired(),this._dispatchChangeEvent()},this._opts.multiSelect=!0,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._setDefaultValue(),this._manageRequired()}))}formResetCallback(){this.updateComplete.then((()=>{this.value=this.defaultValue}))}formStateRestoreCallback(t,e){const i=Array.from(t.entries()).map((t=>String(t[1])));this.updateComplete.then((()=>{this.value=i}))}_setDefaultValue(){if(Array.isArray(this.defaultValue)&&this.defaultValue.length>0){const t=this.defaultValue.map((t=>String(t)));this.value=t}}_dispatchChangeEvent(){super._dispatchChangeEvent()}_onFaceClick(){super._onFaceClick(),this._opts.activeIndex=0}_toggleComboboxDropdown(){super._toggleComboboxDropdown(),this._opts.activeIndex=-1}_manageRequired(){const{value:t}=this;0===t.length&&this.required?this._internals.setValidity({valueMissing:!0},"Please select an item in the list.",this._faceElement):this._internals.setValidity({})}_setFormValue(){const t=new FormData;this._values.forEach((e=>{t.append(this.name??"",e)})),this._internals.setFormValue(t)}async _createAndSelectSuggestedOption(){super._createAndSelectSuggestedOption();const t=this._createSuggestedOption();await this.updateComplete,this.selectedIndexes=[...this.selectedIndexes,t],this._dispatchChangeEvent();const e=new CustomEvent("vsc-multi-select-create-option",{detail:{value:this._opts.getOptionByIndex(t)?.value??""}});this.dispatchEvent(e),this.open=!1,this._isPlaceholderOptionActive=!1}_onSlotChange(){super._onSlotChange(),this._requestedValueToSetLater.length>0&&(this._opts.expandMultiSelection(this._requestedValueToSetLater),this._requestedValueToSetLater=this._requestedValueToSetLater.filter((t=>-1===this._opts.findOptionIndex(t))))}_onEnterKeyDown(t){super._onEnterKeyDown(t),this.open?this._isPlaceholderOptionActive?this._createAndSelectSuggestedOption():(this._opts.toggleActiveMultiselectOption(),this._setFormValue(),this._manageRequired(),this._dispatchChangeEvent()):(this._opts.filterPattern="",this.open=!0)}_onMultiAcceptClick(){this.open=!1}_onMultiDeselectAllClick(){this._opts.selectedIndexes=[],this._values=[],this._options=this._options.map((t=>({...t,selected:!1}))),this._manageRequired(),this._dispatchChangeEvent()}_onMultiSelectAllClick(){this._opts.selectedIndexes=[],this._values=[],this._options=this._options.map((t=>({...t,selected:!0}))),this._options.forEach(((t,e)=>{this._selectedIndexes.push(e),this._values.push(t.value),this._dispatchChangeEvent()})),this._setFormValue(),this._manageRequired()}_onComboboxInputBlur(){super._onComboboxInputBlur(),this._opts.filterPattern=""}_renderLabel(){return 0===this._opts.selectedIndexes.length?U`<span class="select-face-badge no-item">0 Selected</span>`:U`<span class="select-face-badge"
1643
1643
  >${this._opts.selectedIndexes.length} Selected</span
1644
- >`}_renderComboboxFace(){let t="";if(this._isBeingFiltered)t=this._opts.filterPattern;else{const e=this._opts.getSelectedOption();t=e?.label??""}const e=this._opts.activeIndex>-1?`op-${this._opts.activeIndex}`:"",i=this.open?"true":"false";return U`
1644
+ >`}_renderComboboxFace(){const t=this._opts.activeIndex>-1?`op-${this._opts.activeIndex}`:"",e=this.open?"true":"false";return U`
1645
1645
  <div class="combobox-face face">
1646
1646
  ${this._opts.multiSelect?this._renderLabel():q}
1647
1647
  <input
1648
- aria-activedescendant=${e}
1648
+ aria-activedescendant=${t}
1649
1649
  aria-autocomplete="list"
1650
1650
  aria-controls="select-listbox"
1651
- aria-expanded=${i}
1651
+ aria-expanded=${e}
1652
1652
  aria-haspopup="listbox"
1653
1653
  aria-label=${Mt(this.label)}
1654
1654
  class="combobox-input"
@@ -1656,7 +1656,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1656
1656
  spellcheck="false"
1657
1657
  type="text"
1658
1658
  autocomplete="off"
1659
- .value=${t}
1659
+ .value=${this._opts.filterPattern}
1660
1660
  @focus=${this._onComboboxInputFocus}
1661
1661
  @blur=${this._onComboboxInputBlur}
1662
1662
  @input=${this._onComboboxInputInput}
@@ -3194,7 +3194,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
3194
3194
  clip-rule="evenodd"
3195
3195
  d="M10.072 8.024L5.715 3.667l.618-.62L11 7.716v.618L6.333 13l-.618-.619 4.357-4.357z"
3196
3196
  />
3197
- </svg>`;function Fs(t){return t.parentElement&&t.parentElement instanceof Vs?t.parentElement:null}let Vs=class extends yt{set selected(t){this._selected=t,this._treeContextState.selectedItems.add(this),this.ariaSelected=t?"true":"false"}get selected(){return this._selected}set path(t){this._path=t}get path(){return this._path}constructor(){super(),this.active=!1,this.branch=!1,this.hasActiveItem=!1,this.hasSelectedItem=!1,this.highlightedGuides=!1,this.open=!1,this.level=0,this._selected=!1,this._path=[],this._hasBranchIcon=!1,this._hasBranchOpenedIcon=!1,this._hasLeafIcon=!1,this._treeContextState={isShiftPressed:!1,selectedItems:new Set,allItems:null,itemListUpToDate:!1,focusedItem:null,prevFocusedItem:null,hasBranchItem:!1,rootElement:null,activeItem:null},this._handleMainSlotChange=()=>{this._mainSlotChange(),this._treeContextState.itemListUpToDate=!1},this._handleComponentFocus=()=>{this._treeContextState.focusedItem&&this._treeContextState.focusedItem!==this&&(this._treeContextState.isShiftPressed||(this._treeContextState.prevFocusedItem=this._treeContextState.focusedItem),this._treeContextState.focusedItem=null),this._treeContextState.focusedItem=this},this._internals=this.attachInternals(),this.addEventListener("focus",this._handleComponentFocus)}connectedCallback(){super.connectedCallback(),this._mainSlotChange(),this.role="treeitem",this.ariaDisabled="false"}willUpdate(t){t.has("active")&&this._toggleActiveState(),(t.has("open")||t.has("branch"))&&this._setAriaExpanded()}_setAriaExpanded(){this.branch?this.ariaExpanded=this.open?"true":"false":this.ariaExpanded=null}_setHasActiveItemFlagOnParent(t,e){const i=Fs(t);i&&(i.hasActiveItem=e)}_toggleActiveState(){this.active?(this._treeContextState.activeItem&&(this._treeContextState.activeItem.active=!1,this._setHasActiveItemFlagOnParent(this._treeContextState.activeItem,!1)),this._treeContextState.activeItem=this,this._setHasActiveItemFlagOnParent(this,!0),this.tabIndex=0,this._internals.states.add("active")):(this._treeContextState.activeItem===this&&(this._treeContextState.activeItem=null,this._setHasActiveItemFlagOnParent(this,!1)),this.tabIndex=-1,this._internals.states.delete("active"))}_selectItem(t){const{selectedItems:e}=this._treeContextState,{multiSelect:i}=this._configContext;i&&t?this.selected?(this.selected=!1,e.delete(this)):(this.selected=!0,e.add(this)):(e.forEach((t=>t.selected=!1)),e.clear(),this.selected=!0,e.add(this))}_selectRange(){const t=this._treeContextState.prevFocusedItem;if(!t||t===this)return;this._treeContextState.itemListUpToDate||(this._treeContextState.allItems=this._treeContextState.rootElement.querySelectorAll("vscode-tree-item"),this._treeContextState.allItems&&this._treeContextState.allItems.forEach(((t,e)=>{t.dataset.score=e.toString()})),this._treeContextState.itemListUpToDate=!0);let e=+(t.dataset.score??-1),i=+(this.dataset.score??-1);e>i&&([e,i]=[i,e]),this._treeContextState.selectedItems.forEach((t=>t.selected=!1)),this._treeContextState.selectedItems.clear(),this._selectItemsAndAllVisibleDescendants(e,i)}_selectItemsAndAllVisibleDescendants(t,e){let i=t;for(;i<=e;)if(this._treeContextState.allItems){const t=this._treeContextState.allItems[i];if(t.branch&&!t.open){t.selected=!0;i+=t.querySelectorAll("vscode-tree-item").length}else t.branch&&t.open?(t.selected=!0,i+=this._selectItemsAndAllVisibleDescendants(i+1,e)):(t.selected=!0,i+=1)}return i}_mainSlotChange(){this._initiallyAssignedTreeItems.forEach((t=>{t.setAttribute("slot","children")}))}_handleChildrenSlotChange(){$s(this,this._childrenTreeItems),this._treeContextState.rootElement&&this._treeContextState.rootElement.updateHasBranchItemFlag()}_handleContentClick(t){t.stopPropagation();const e=t.ctrlKey,i=t.shiftKey;i&&this._configContext.multiSelect?(this._selectRange(),this._treeContextState.emitSelectEvent?.(),this.updateComplete.then((()=>{this._treeContextState.highlightIndentGuides?.()}))):(this._selectItem(e),this._treeContextState.emitSelectEvent?.(),this.updateComplete.then((()=>{this._treeContextState.highlightIndentGuides?.()})),this._configContext.expandMode===As&&(!this.branch||this._configContext.multiSelect&&e||(this.open=!this.open))),this.active=!0,i||(this._treeContextState.prevFocusedItem=this)}_handleDoubleClick(t){this._configContext.expandMode===zs&&(!this.branch||this._configContext.multiSelect&&t.ctrlKey||(this.open=!this.open))}_handleIconSlotChange(t){const e=t.target,i=e.assignedElements().length>0;switch(e.name){case"icon-branch":this._hasBranchIcon=i;break;case"icon-branch-opened":this._hasBranchOpenedIcon=i;break;case"icon-leaf":this._hasLeafIcon=i}}render(){const{hideArrows:t,indent:e,indentGuides:i}=this._configContext,{hasBranchItem:s}=this._treeContextState;let o=3+this.level*e;const r=t?3:13,n=3+this.level*e+r;this.branch||t||!s||(o+=30);const l=this._hasBranchIcon&&this.branch||this._hasBranchOpenedIcon&&this.branch&&this.open||this._hasLeafIcon&&!this.branch,a={wrapper:!0,active:this.active},h={children:!0,guide:i!==Es,"default-guide":i!==Es,"highlighted-guide":this.highlightedGuides},c={"icon-container":!0,"has-icon":l};return U` <div class="root">
3197
+ </svg>`;function Fs(t){return t.parentElement&&t.parentElement instanceof Vs?t.parentElement:null}let Vs=class extends yt{set selected(t){this._selected=t,this._treeContextState.selectedItems.add(this),this.ariaSelected=t?"true":"false"}get selected(){return this._selected}set path(t){this._path=t}get path(){return this._path}constructor(){super(),this.active=!1,this.branch=!1,this.hasActiveItem=!1,this.hasSelectedItem=!1,this.highlightedGuides=!1,this.open=!1,this.level=0,this._selected=!1,this._path=[],this._hasBranchIcon=!1,this._hasBranchOpenedIcon=!1,this._hasLeafIcon=!1,this._treeContextState={isShiftPressed:!1,selectedItems:new Set,allItems:null,itemListUpToDate:!1,focusedItem:null,prevFocusedItem:null,hasBranchItem:!1,rootElement:null,activeItem:null},this._handleMainSlotChange=()=>{this._mainSlotChange(),this._treeContextState.itemListUpToDate=!1},this._handleComponentFocus=()=>{this._treeContextState.focusedItem&&this._treeContextState.focusedItem!==this&&(this._treeContextState.isShiftPressed||(this._treeContextState.prevFocusedItem=this._treeContextState.focusedItem),this._treeContextState.focusedItem=null),this._treeContextState.focusedItem=this},this._internals=this.attachInternals(),this.addEventListener("focus",this._handleComponentFocus)}connectedCallback(){super.connectedCallback(),this._mainSlotChange(),this.role="treeitem",this.ariaDisabled="false"}willUpdate(t){t.has("active")&&this._toggleActiveState(),(t.has("open")||t.has("branch"))&&this._setAriaExpanded()}_setAriaExpanded(){this.branch?this.ariaExpanded=this.open?"true":"false":this.ariaExpanded=null}_setHasActiveItemFlagOnParent(t,e){const i=Fs(t);i&&(i.hasActiveItem=e)}_toggleActiveState(){this.active?(this._treeContextState.activeItem&&(this._treeContextState.activeItem.active=!1,this._setHasActiveItemFlagOnParent(this._treeContextState.activeItem,!1)),this._treeContextState.activeItem=this,this._setHasActiveItemFlagOnParent(this,!0),this.tabIndex=0,this._internals.states.add("active")):(this._treeContextState.activeItem===this&&(this._treeContextState.activeItem=null,this._setHasActiveItemFlagOnParent(this,!1)),this.tabIndex=-1,this._internals.states.delete("active"))}_selectItem(t){const{selectedItems:e}=this._treeContextState,{multiSelect:i}=this._configContext;i&&t?this.selected?(this.selected=!1,e.delete(this)):(this.selected=!0,e.add(this)):(e.forEach((t=>t.selected=!1)),e.clear(),this.selected=!0,e.add(this))}_selectRange(){const t=this._treeContextState.prevFocusedItem;if(!t||t===this)return;this._treeContextState.itemListUpToDate||(this._treeContextState.allItems=this._treeContextState.rootElement.querySelectorAll("vscode-tree-item"),this._treeContextState.allItems&&this._treeContextState.allItems.forEach(((t,e)=>{t.dataset.score=e.toString()})),this._treeContextState.itemListUpToDate=!0);let e=+(t.dataset.score??-1),i=+(this.dataset.score??-1);e>i&&([e,i]=[i,e]),this._treeContextState.selectedItems.forEach((t=>t.selected=!1)),this._treeContextState.selectedItems.clear(),this._selectItemsAndAllVisibleDescendants(e,i)}_selectItemsAndAllVisibleDescendants(t,e){let i=t;for(;i<=e;)if(this._treeContextState.allItems){const t=this._treeContextState.allItems[i];if(t.branch&&!t.open){t.selected=!0;i+=t.querySelectorAll("vscode-tree-item").length}else t.branch&&t.open?(t.selected=!0,i+=this._selectItemsAndAllVisibleDescendants(i+1,e)):(t.selected=!0,i+=1)}return i}_mainSlotChange(){this._initiallyAssignedTreeItems.forEach((t=>{t.setAttribute("slot","children")}))}_handleChildrenSlotChange(){$s(this,this._childrenTreeItems),this._treeContextState.rootElement&&this._treeContextState.rootElement.updateHasBranchItemFlag()}_handleContentClick(t){t.stopPropagation();const e=t.ctrlKey||t.metaKey,i=t.shiftKey;i&&this._configContext.multiSelect?(this._selectRange(),this._treeContextState.emitSelectEvent?.(),this.updateComplete.then((()=>{this._treeContextState.highlightIndentGuides?.()}))):(this._selectItem(e),this._treeContextState.emitSelectEvent?.(),this.updateComplete.then((()=>{this._treeContextState.highlightIndentGuides?.()})),this._configContext.expandMode===As&&(!this.branch||this._configContext.multiSelect&&e||(this.open=!this.open))),this.active=!0,i||(this._treeContextState.prevFocusedItem=this)}_handleDoubleClick(t){this._configContext.expandMode===zs&&(!this.branch||this._configContext.multiSelect&&(t.ctrlKey||t.metaKey)||(this.open=!this.open))}_handleIconSlotChange(t){const e=t.target,i=e.assignedElements().length>0;switch(e.name){case"icon-branch":this._hasBranchIcon=i;break;case"icon-branch-opened":this._hasBranchOpenedIcon=i;break;case"icon-leaf":this._hasLeafIcon=i}}render(){const{hideArrows:t,indent:e,indentGuides:i}=this._configContext,{hasBranchItem:s}=this._treeContextState;let o=3+this.level*e;const r=t?3:13,n=3+this.level*e+r;this.branch||t||!s||(o+=30);const l=this._hasBranchIcon&&this.branch||this._hasBranchOpenedIcon&&this.branch&&this.open||this._hasLeafIcon&&!this.branch,a={wrapper:!0,active:this.active},h={children:!0,guide:i!==Es,"default-guide":i!==Es,"highlighted-guide":this.highlightedGuides},c={"icon-container":!0,"has-icon":l};return U` <div class="root">
3198
3198
  <div
3199
3199
  class=${jt(a)}
3200
3200
  @click=${this._handleContentClick}
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
- const VERSION = '2.3.1-pre.1';
2
+ const VERSION = '2.3.1';
3
3
  const CONFIG_KEY = '__vscodeElements_disableRegistryWarning__';
4
4
  export class VscElement extends LitElement {
5
5
  /** VSCode Elements version */
@@ -1 +1 @@
1
- {"version":3,"file":"VscElement.js","sourceRoot":"","sources":["../../src/includes/VscElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAE/B,MAAM,OAAO,GAAG,aAAa,CAAC;AAC9B,MAAM,UAAU,GAAG,2CAA2C,CAAC;AAE/D,MAAM,OAAO,UAAW,SAAQ,UAAU;IACxC,8BAA8B;IAC9B,IAAI,OAAO;QACT,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AASD;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAe,EAAE,EAAE;IAC/C,OAAO,CAAC,aAAiC,EAAE,EAAE;QAC3C,MAAM,kBAAkB,GAAG,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAEvD,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxB,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,aAAyC,CAAC,CAAC;YAC1E,OAAO;QACT,CAAC;QAED,IAAI,UAAU,IAAI,MAAM,EAAE,CAAC;YACzB,OAAO;QACT,CAAC;QAED,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC3C,MAAM,cAAc,GAAI,EAAiB,EAAE,OAAO,CAAC;QACnD,IAAI,OAAO,GAAG,EAAE,CAAC;QAEjB,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,OAAO;gBACL,mEAAmE,CAAC;QACxE,CAAC;aAAM,IAAI,cAAc,KAAK,OAAO,EAAE,CAAC;YACtC,OAAO;gBACL,mEAAmE,CAAC;YACtE,OAAO,IAAI,oBAAoB,OAAO,8BAA8B,cAAc,IAAI,CAAC;QACzF,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,iEAAiE,OAAO,IAAI,CAAC;QAC1F,CAAC;QAED,sCAAsC;QACtC,OAAO,CAAC,IAAI,CACV,qBAAqB,OAAO,IAAI,OAAO,0CAA0C,UAAU,UAAU,CACtG,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {LitElement} from 'lit';\n\nconst VERSION = '2.3.1-pre.1';\nconst CONFIG_KEY = '__vscodeElements_disableRegistryWarning__';\n\nexport class VscElement extends LitElement {\n /** VSCode Elements version */\n get version(): string {\n return VERSION;\n }\n}\n\ntype CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nexport type Constructor<T> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n};\n\n/**\n * Own implementation of Lit's customElement decorator.\n */\nexport const customElement = (tagName: string) => {\n return (classOrTarget: CustomElementClass) => {\n const customElementClass = customElements.get(tagName);\n\n if (!customElementClass) {\n customElements.define(tagName, classOrTarget as CustomElementConstructor);\n return;\n }\n\n if (CONFIG_KEY in window) {\n return;\n }\n\n const el = document.createElement(tagName);\n const anotherVersion = (el as VscElement)?.version;\n let message = '';\n\n if (!anotherVersion) {\n message +=\n 'is already registered by an unknown custom element handler class.';\n } else if (anotherVersion !== VERSION) {\n message +=\n 'is already registered by a different version of VSCode Elements. ';\n message += `This version is \"${VERSION}\", while the other one is \"${anotherVersion}\".`;\n } else {\n message += `is already registered by the same version of VSCode Elements (${VERSION}).`;\n }\n\n // eslint-disable-next-line no-console\n console.warn(\n `[VSCode Elements] ${tagName} ${message}\\nTo suppress this warning, set window.${CONFIG_KEY} to true`\n );\n };\n};\n"]}
1
+ {"version":3,"file":"VscElement.js","sourceRoot":"","sources":["../../src/includes/VscElement.ts"],"names":[],"mappings":"AAA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';\nconst CONFIG_KEY = '__vscodeElements_disableRegistryWarning__';\n\nexport class VscElement extends LitElement {\n /** VSCode Elements version */\n get version(): string {\n return VERSION;\n }\n}\n\ntype CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nexport type Constructor<T> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n};\n\n/**\n * Own implementation of Lit's customElement decorator.\n */\nexport const customElement = (tagName: string) => {\n return (classOrTarget: CustomElementClass) => {\n const customElementClass = customElements.get(tagName);\n\n if (!customElementClass) {\n customElements.define(tagName, classOrTarget as CustomElementConstructor);\n return;\n }\n\n if (CONFIG_KEY in window) {\n return;\n }\n\n const el = document.createElement(tagName);\n const anotherVersion = (el as VscElement)?.version;\n let message = '';\n\n if (!anotherVersion) {\n message +=\n 'is already registered by an unknown custom element handler class.';\n } else if (anotherVersion !== VERSION) {\n message +=\n 'is already registered by a different version of VSCode Elements. ';\n message += `This version is \"${VERSION}\", while the other one is \"${anotherVersion}\".`;\n } else {\n message += `is already registered by the same version of VSCode Elements (${VERSION}).`;\n }\n\n // eslint-disable-next-line no-console\n console.warn(\n `[VSCode Elements] ${tagName} ${message}\\nTo suppress this warning, set window.${CONFIG_KEY} to true`\n );\n };\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"OptionListController.d.ts","sourceRoot":"","sources":["../../../src/includes/vscode-select/OptionListController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,sBAAsB,EAAC,MAAM,KAAK,CAAC;AAC/D,OAAO,EAAC,YAAY,EAAE,cAAc,EAAE,MAAM,EAAC,MAAM,SAAS,CAAC;AAS7D,qBAAa,oBAAqB,YAAW,kBAAkB;IAC7D,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,KAAK,CAAyB;IACtC,OAAO,CAAC,QAAQ,CAAwB;IACxC,OAAO,CAAC,cAAc,CAAM;IAC5B,OAAO,CAAC,aAAa,CAAyB;IAC9C,OAAO,CAA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EAAE,MAAM;IAsClB,KAAK;IAUL,kBAAkB,CAAC,KAAK,EAAE,MAAM;IAQhC,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE;IAYrC,6BAA6B;IAkB7B,oBAAoB,CAAC,QAAQ,EAAE,MAAM;IAarC,eAAe,IAAI,cAAc,GAAG,IAAI;IAIxC,iBAAiB,IAAI,cAAc,GAAG,IAAI;IAI1C,gBAAgB,CAAC,KAAK,EAAE,MAAM;IAI9B,eAAe,CAAC,KAAK,EAAE,MAAM;IAI7B,gBAAgB,CACd,KAAK,EAAE,MAAM,EACb,oBAAoB,UAAQ,GAC3B,cAAc,GAAG,IAAI;IAcxB,gBAAgB,CAAC,KAAK,EAAE,MAAM;IAU9B,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI;IAkB/C,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI;IAmB/C,eAAe;IAkBf,SAAS;IAaT,UAAU;IAiBV,OAAO,CAAC,gBAAgB;IAoBxB,OAAO,CAAC,YAAY;CA6BrB"}
@@ -46,7 +46,7 @@ export class OptionListController {
46
46
  return this._selectedIndex;
47
47
  }
48
48
  set selectedIndex(index) {
49
- if (this._selectedIndex !== -1) {
49
+ if (this._selectedIndex !== -1 && this._options[this._selectedIndex]) {
50
50
  this._options[this._selectedIndex].selected ??= false;
51
51
  }
52
52
  const op = this.getOptionByIndex(index);
@@ -83,11 +83,14 @@ export class OptionListController {
83
83
  get value() {
84
84
  if (this._multiSelect) {
85
85
  return this._selectedIndexes.size > 0
86
- ? Array.from(this._selectedIndexes).map((v) => this._options[v].value)
86
+ ? Array.from(this._selectedIndexes)
87
+ .filter((i) => i >= 0 && i < this._options.length)
88
+ .map((v) => this._options[v].value)
87
89
  : [];
88
90
  }
89
91
  else {
90
- return this._selectedIndex > -1
92
+ return this._selectedIndex > -1 &&
93
+ this._selectedIndex < this._options.length
91
94
  ? this._options[this._selectedIndex].value
92
95
  : '';
93
96
  }
@@ -189,6 +192,9 @@ export class OptionListController {
189
192
  this._indexByValue.clear();
190
193
  this._indexByLabel.clear();
191
194
  this._numOfVisibleOptions = 0;
195
+ this._selectedIndex = -1;
196
+ this._selectedIndexes.clear();
197
+ this._activeIndex = -1;
192
198
  }
193
199
  getIsIndexSelected(index) {
194
200
  if (this._multiSelect) {
@@ -1 +1 @@
1
- {"version":3,"file":"OptionListController.js","sourceRoot":"","sources":["../../../src/includes/vscode-select/OptionListController.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,WAAW,EAEX,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AAEnB,MAAM,OAAO,oBAAoB;IAc/B,YAAY,IAA4B;QAbhC,iBAAY,GAAG,CAAC,CAAC,CAAC;QAElB,aAAQ,GAAqB,EAAE,CAAC;QAChC,mBAAc,GAAG,EAAE,CAAC;QACpB,kBAAa,GAAiB,OAAO,CAAC;QACtC,cAAS,GAAG,KAAK,CAAC;QAClB,kBAAa,GAAwB,IAAI,GAAG,EAAE,CAAC;QAC/C,kBAAa,GAAwB,IAAI,GAAG,EAAE,CAAC;QAC/C,mBAAc,GAAG,CAAC,CAAC,CAAC;QACpB,qBAAgB,GAAgB,IAAI,GAAG,EAAE,CAAC;QAC1C,iBAAY,GAAG,KAAK,CAAC;QACrB,yBAAoB,GAAG,CAAC,CAAC;QAG/B,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAED,aAAa,KAAU,CAAC;IAExB,yBAAyB;IAEzB,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW,CAAC,KAAa;QAC3B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;IAED,IAAI,mBAAmB;QACrB,OAAO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a,GAAG,MAAM,CAAC,KAAK;oBAC3C,CAAC,CAAC,EAAE,qBAAqB;oBACzB,CAAC,CAAC,CAAC,CAAC,CAAC;gBAEP,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;oBACjB,IAAI,CAAC,oBAAoB,IAAI,CAAC,CAAC;gBACjC,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;CAGF","sourcesContent":["import {ReactiveController, ReactiveControllerHost} from 'lit';\nimport {FilterMethod, InternalOption, Option} from './types';\nimport {\n containsSearch,\n fuzzySearch,\n SearchResult,\n startsWithPerTermSearch,\n startsWithSearch,\n} from './helpers';\n\nexport class OptionListController implements ReactiveController {\n private _activeIndex = -1;\n private _host: ReactiveControllerHost;\n private _options: InternalOption[] = [];\n private _filterPattern = '';\n private _filterMethod: FilterMethod = 'fuzzy';\n private _combobox = false;\n private _indexByValue: Map<string, number> = new Map();\n private _indexByLabel: Map<string, number> = new Map();\n private _selectedIndex = -1;\n private _selectedIndexes: Set<number> = new Set();\n private _multiSelect = false;\n private _numOfVisibleOptions = 0;\n\n constructor(host: ReactiveControllerHost) {\n (this._host = host).addController(this);\n }\n\n hostConnected(): void {}\n\n //#region getters/setters\n\n get activeIndex(): number {\n return this._activeIndex;\n }\n\n set activeIndex(index: number) {\n this._activeIndex = index;\n this._host.requestUpdate();\n }\n\n get relativeActiveIndex(): number {\n return this._options[this._activeIndex]?.filteredIndex ?? -1;\n }\n\n set comboboxMode(enabled: boolean) {\n this._combobox = enabled;\n this._host.requestUpdate();\n }\n\n get comboboxMode() {\n return this._combobox;\n }\n\n get multiSelect() {\n return this._multiSelect;\n }\n\n set multiSelect(multiSelect: boolean) {\n this._selectedIndex = -1;\n this._selectedIndexes.clear();\n this._multiSelect = multiSelect;\n this._host.requestUpdate();\n }\n\n get selectedIndex() {\n return this._selectedIndex;\n }\n\n set selectedIndex(index: number) {\n if (this._selectedIndex !== -1) {\n this._options[this._selectedIndex].selected ??= false;\n }\n\n const op = this.getOptionByIndex(index);\n\n this._selectedIndex = op ? index : -1;\n this._host.requestUpdate();\n }\n\n get selectedIndexes() {\n return Array.from(this._selectedIndexes);\n }\n\n set selectedIndexes(value: number[]) {\n this._selectedIndexes.forEach((v) => {\n this._options[v].selected = false;\n });\n\n this._selectedIndexes = new Set(value);\n\n value.forEach((v) => {\n if (this._options[v] !== undefined) {\n this._options[v].selected = true;\n }\n });\n\n this._host.requestUpdate();\n }\n\n set value(newValue: string | string[]) {\n if (this._multiSelect) {\n const valueList = (newValue as string[])\n .map((v) => this._indexByValue.get(v))\n .filter((v) => v !== undefined);\n\n this._selectedIndexes = new Set(valueList);\n } else {\n this._selectedIndex = this._indexByValue.get(newValue as string) ?? -1;\n }\n this._host.requestUpdate();\n }\n\n get value(): string | string[] {\n if (this._multiSelect) {\n return this._selectedIndexes.size > 0\n ? Array.from(this._selectedIndexes).map((v) => this._options[v].value)\n : [];\n } else {\n return this._selectedIndex > -1\n ? this._options[this._selectedIndex].value\n : '';\n }\n }\n\n set multiSelectValue(newValue: string[]) {\n const valueList = (newValue as string[])\n .map((v) => this._indexByValue.get(v))\n .filter((v) => v !== undefined);\n\n this._selectedIndexes = new Set(valueList);\n }\n\n get multiSelectValue(): string[] {\n return this._selectedIndexes.size > 0\n ? Array.from(this._selectedIndexes).map((v) => this._options[v].value)\n : [];\n }\n\n get filterPattern() {\n return this._filterPattern;\n }\n\n set filterPattern(pattern: string) {\n if (pattern !== this._filterPattern) {\n this._filterPattern = pattern;\n this._updateState();\n }\n }\n\n get filterMethod(): FilterMethod {\n return this._filterMethod;\n }\n\n set filterMethod(method: FilterMethod) {\n if (method !== this._filterMethod) {\n this._filterMethod = method;\n this._updateState();\n }\n }\n\n get options(): InternalOption[] {\n return this._options;\n }\n\n get numOfVisibleOptions() {\n return this._numOfVisibleOptions;\n }\n\n get numOptions() {\n return this._options.length;\n }\n\n //#endregion\n\n //#region public functions\n\n populate(options: Option[]) {\n this._indexByValue.clear();\n this._indexByLabel.clear();\n\n this._options = options.map((op, index) => {\n this._indexByValue.set(op.value ?? '', index);\n this._indexByLabel.set(op.label ?? '', index);\n\n return {\n description: op.description ?? '',\n disabled: op.disabled ?? false,\n label: op.label ?? '',\n selected: op.selected ?? false,\n value: op.value ?? '',\n index,\n filteredIndex: index,\n ranges: [],\n visible: true,\n };\n });\n\n this._numOfVisibleOptions = this._options.length;\n }\n\n add(option: Option) {\n const nextIndex = this._options.length;\n const {description, disabled, label, selected, value} = option;\n let visible = true;\n let ranges: [number, number][] = [];\n\n if (this._combobox && this._filterPattern !== '') {\n const res = this._searchByPattern(label ?? '');\n visible = res.match;\n ranges = res.ranges;\n }\n\n this._indexByValue.set(value ?? '', nextIndex);\n this._indexByLabel.set(label ?? '', nextIndex);\n\n if (selected) {\n this._selectedIndex = nextIndex;\n this._selectedIndexes.add(nextIndex);\n this._activeIndex = nextIndex;\n }\n\n this._options.push({\n index: nextIndex,\n filteredIndex: nextIndex,\n description: description ?? '',\n disabled: disabled ?? false,\n label: label ?? '',\n selected: selected ?? false,\n value: value ?? '',\n visible,\n ranges,\n });\n\n if (visible) {\n this._numOfVisibleOptions += 1;\n }\n }\n\n clear() {\n this._options = [];\n this._indexByValue.clear();\n this._indexByLabel.clear();\n this._numOfVisibleOptions = 0;\n }\n\n getIsIndexSelected(index: number) {\n if (this._multiSelect) {\n return this._selectedIndexes.has(index);\n } else {\n return this._selectedIndex === index;\n }\n }\n\n expandMultiSelection(values: string[]) {\n values.forEach((v) => {\n const foundIndex = this._indexByValue.get(v) ?? -1;\n\n if (foundIndex !== -1) {\n this._selectedIndexes.add(foundIndex);\n }\n });\n\n this._host.requestUpdate();\n }\n\n toggleActiveMultiselectOption() {\n const activeOption = this._options[this._activeIndex] ?? null;\n\n if (!activeOption) {\n return;\n }\n\n const checked = this._selectedIndexes.has(activeOption.index);\n\n if (checked) {\n this._selectedIndexes.delete(activeOption.index);\n } else {\n this._selectedIndexes.add(activeOption.index);\n }\n\n this._host.requestUpdate();\n }\n\n toggleOptionSelected(optIndex: number) {\n const checked = this._selectedIndexes.has(optIndex);\n this._options[optIndex].selected = !this._options[optIndex].selected;\n\n if (checked) {\n this._selectedIndexes.delete(optIndex);\n } else {\n this._selectedIndexes.add(optIndex);\n }\n\n this._host.requestUpdate();\n }\n\n getActiveOption(): InternalOption | null {\n return this._options[this._activeIndex] ?? null;\n }\n\n getSelectedOption(): InternalOption | null {\n return this._options[this._selectedIndex] ?? null;\n }\n\n getOptionByIndex(index: number) {\n return this._options[index] ?? null;\n }\n\n findOptionIndex(value: string) {\n return this._indexByValue.get(value) ?? -1;\n }\n\n getOptionByValue(\n value: string,\n includeHiddenOptions = false\n ): InternalOption | null {\n const index = this._indexByValue.get(value) ?? -1;\n\n if (index === -1) {\n return null;\n }\n\n if (!includeHiddenOptions) {\n return this._options[index].visible ? this._options[index] : null;\n }\n\n return this._options[index];\n }\n\n getOptionByLabel(label: string) {\n const index = this._indexByLabel.get(label) ?? -1;\n\n if (index === -1) {\n return null;\n }\n\n return this._options[index];\n }\n\n next(fromIndex?: number): InternalOption | null {\n const from = fromIndex ?? this._activeIndex;\n let nextIndex = -1;\n\n for (let i = from + 1; i < this._options.length; i++) {\n if (\n this._options[i] &&\n !this._options[i].disabled &&\n this._options[i].visible\n ) {\n nextIndex = i;\n break;\n }\n }\n\n return nextIndex > -1 ? this._options[nextIndex] : null;\n }\n\n prev(fromIndex?: number): InternalOption | null {\n const from = fromIndex ?? this._activeIndex;\n\n let prevIndex = -1;\n\n for (let i = from - 1; i >= 0; i--) {\n if (\n this._options[i] &&\n !this._options[i].disabled &&\n this._options[i].visible\n ) {\n prevIndex = i;\n break;\n }\n }\n\n return prevIndex > -1 ? this._options[prevIndex] : null;\n }\n\n activateDefault() {\n if (this._multiSelect) {\n if (this._selectedIndexes.size > 0) {\n const indexes = this._selectedIndexes.values();\n const first = indexes.next();\n this._activeIndex = first.value ? first.value : 0;\n }\n } else {\n if (this._selectedIndex > -1) {\n this._activeIndex = this._selectedIndex;\n } else {\n this._activeIndex = 0;\n }\n }\n\n this._host.requestUpdate();\n }\n\n selectAll() {\n if (!this._multiSelect) {\n return;\n }\n\n this._options.forEach((_, i) => {\n this._options[i].selected = true;\n this._selectedIndexes.add(i);\n });\n\n this._host.requestUpdate();\n }\n\n selectNone() {\n if (!this._multiSelect) {\n return;\n }\n\n this._options.forEach((_, i) => {\n this._options[i].selected = false;\n });\n this._selectedIndexes.clear();\n\n this._host.requestUpdate();\n }\n\n //#endregion\n\n //#region private functions\n\n private _searchByPattern(text: string) {\n let result: SearchResult;\n\n switch (this._filterMethod) {\n case 'startsWithPerTerm':\n result = startsWithPerTermSearch(text, this._filterPattern);\n break;\n case 'startsWith':\n result = startsWithSearch(text, this._filterPattern);\n break;\n case 'contains':\n result = containsSearch(text, this._filterPattern);\n break;\n default:\n result = fuzzySearch(text, this._filterPattern);\n }\n\n return result;\n }\n\n private _updateState() {\n if (!this._combobox || this._filterPattern === '') {\n this._options.forEach((_, i) => {\n this._options[i].visible = true;\n this._options[i].ranges = [];\n });\n this._numOfVisibleOptions = this._options.length;\n } else {\n let filteredListNextIndex = -1;\n this._numOfVisibleOptions = 0;\n\n this._options.forEach(({label}, i) => {\n const result = this._searchByPattern(label);\n this._options[i].visible = result.match;\n this._options[i].ranges = result.ranges;\n this._options[i].filteredIndex = result.match\n ? ++filteredListNextIndex\n : -1;\n\n if (result.match) {\n this._numOfVisibleOptions += 1;\n }\n });\n }\n\n this._host.requestUpdate();\n }\n\n //#endregion\n}\n"]}
1
+ {"version":3,"file":"OptionListController.js","sourceRoot":"","sources":["../../../src/includes/vscode-select/OptionListController.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,WAAW,EAEX,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AAEnB,MAAM,OAAO,oBAAoB;IAc/B,YAAY,IAA4B;QAbhC,iBAAY,GAAG,CAAC,CAAC,CAA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P,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;oBACjB,IAAI,CAAC,oBAAoB,IAAI,CAAC,CAAC;gBACjC,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;CAGF","sourcesContent":["import {ReactiveController, ReactiveControllerHost} from 'lit';\nimport {FilterMethod, InternalOption, Option} from './types';\nimport {\n containsSearch,\n fuzzySearch,\n SearchResult,\n startsWithPerTermSearch,\n startsWithSearch,\n} from './helpers';\n\nexport class OptionListController implements ReactiveController {\n private _activeIndex = -1;\n private _host: ReactiveControllerHost;\n private _options: InternalOption[] = [];\n private _filterPattern = '';\n private _filterMethod: FilterMethod = 'fuzzy';\n private _combobox = false;\n private _indexByValue: Map<string, number> = new Map();\n private _indexByLabel: Map<string, number> = new Map();\n private _selectedIndex = -1;\n private _selectedIndexes: Set<number> = new Set();\n private _multiSelect = false;\n private _numOfVisibleOptions = 0;\n\n constructor(host: ReactiveControllerHost) {\n (this._host = host).addController(this);\n }\n\n hostConnected(): void {}\n\n //#region getters/setters\n\n get activeIndex(): number {\n return this._activeIndex;\n }\n\n set activeIndex(index: number) {\n this._activeIndex = index;\n this._host.requestUpdate();\n }\n\n get relativeActiveIndex(): number {\n return this._options[this._activeIndex]?.filteredIndex ?? -1;\n }\n\n set comboboxMode(enabled: boolean) {\n this._combobox = enabled;\n this._host.requestUpdate();\n }\n\n get comboboxMode() {\n return this._combobox;\n }\n\n get multiSelect() {\n return this._multiSelect;\n }\n\n set multiSelect(multiSelect: boolean) {\n this._selectedIndex = -1;\n this._selectedIndexes.clear();\n this._multiSelect = multiSelect;\n this._host.requestUpdate();\n }\n\n get selectedIndex() {\n return this._selectedIndex;\n }\n\n set selectedIndex(index: number) {\n if (this._selectedIndex !== -1 && this._options[this._selectedIndex]) {\n this._options[this._selectedIndex].selected ??= false;\n }\n\n const op = this.getOptionByIndex(index);\n\n this._selectedIndex = op ? index : -1;\n this._host.requestUpdate();\n }\n\n get selectedIndexes() {\n return Array.from(this._selectedIndexes);\n }\n\n set selectedIndexes(value: number[]) {\n this._selectedIndexes.forEach((v) => {\n this._options[v].selected = false;\n });\n\n this._selectedIndexes = new Set(value);\n\n value.forEach((v) => {\n if (this._options[v] !== undefined) {\n this._options[v].selected = true;\n }\n });\n\n this._host.requestUpdate();\n }\n\n set value(newValue: string | string[]) {\n if (this._multiSelect) {\n const valueList = (newValue as string[])\n .map((v) => this._indexByValue.get(v))\n .filter((v) => v !== undefined);\n\n this._selectedIndexes = new Set(valueList);\n } else {\n this._selectedIndex = this._indexByValue.get(newValue as string) ?? -1;\n }\n this._host.requestUpdate();\n }\n\n get value(): string | string[] {\n if (this._multiSelect) {\n return this._selectedIndexes.size > 0\n ? Array.from(this._selectedIndexes)\n .filter((i) => i >= 0 && i < this._options.length)\n .map((v) => this._options[v].value)\n : [];\n } else {\n return this._selectedIndex > -1 &&\n this._selectedIndex < this._options.length\n ? this._options[this._selectedIndex].value\n : '';\n }\n }\n\n set multiSelectValue(newValue: string[]) {\n const valueList = (newValue as string[])\n .map((v) => this._indexByValue.get(v))\n .filter((v) => v !== undefined);\n\n this._selectedIndexes = new Set(valueList);\n }\n\n get multiSelectValue(): string[] {\n return this._selectedIndexes.size > 0\n ? Array.from(this._selectedIndexes).map((v) => this._options[v].value)\n : [];\n }\n\n get filterPattern() {\n return this._filterPattern;\n }\n\n set filterPattern(pattern: string) {\n if (pattern !== this._filterPattern) {\n this._filterPattern = pattern;\n this._updateState();\n }\n }\n\n get filterMethod(): FilterMethod {\n return this._filterMethod;\n }\n\n set filterMethod(method: FilterMethod) {\n if (method !== this._filterMethod) {\n this._filterMethod = method;\n this._updateState();\n }\n }\n\n get options(): InternalOption[] {\n return this._options;\n }\n\n get numOfVisibleOptions() {\n return this._numOfVisibleOptions;\n }\n\n get numOptions() {\n return this._options.length;\n }\n\n //#endregion\n\n //#region public functions\n\n populate(options: Option[]) {\n this._indexByValue.clear();\n this._indexByLabel.clear();\n\n this._options = options.map((op, index) => {\n this._indexByValue.set(op.value ?? '', index);\n this._indexByLabel.set(op.label ?? '', index);\n\n return {\n description: op.description ?? '',\n disabled: op.disabled ?? false,\n label: op.label ?? '',\n selected: op.selected ?? false,\n value: op.value ?? '',\n index,\n filteredIndex: index,\n ranges: [],\n visible: true,\n };\n });\n\n this._numOfVisibleOptions = this._options.length;\n }\n\n add(option: Option) {\n const nextIndex = this._options.length;\n const {description, disabled, label, selected, value} = option;\n let visible = true;\n let ranges: [number, number][] = [];\n\n if (this._combobox && this._filterPattern !== '') {\n const res = this._searchByPattern(label ?? '');\n visible = res.match;\n ranges = res.ranges;\n }\n\n this._indexByValue.set(value ?? '', nextIndex);\n this._indexByLabel.set(label ?? '', nextIndex);\n\n if (selected) {\n this._selectedIndex = nextIndex;\n this._selectedIndexes.add(nextIndex);\n this._activeIndex = nextIndex;\n }\n\n this._options.push({\n index: nextIndex,\n filteredIndex: nextIndex,\n description: description ?? '',\n disabled: disabled ?? false,\n label: label ?? '',\n selected: selected ?? false,\n value: value ?? '',\n visible,\n ranges,\n });\n\n if (visible) {\n this._numOfVisibleOptions += 1;\n }\n }\n\n clear() {\n this._options = [];\n this._indexByValue.clear();\n this._indexByLabel.clear();\n this._numOfVisibleOptions = 0;\n this._selectedIndex = -1;\n this._selectedIndexes.clear();\n this._activeIndex = -1;\n }\n\n getIsIndexSelected(index: number) {\n if (this._multiSelect) {\n return this._selectedIndexes.has(index);\n } else {\n return this._selectedIndex === index;\n }\n }\n\n expandMultiSelection(values: string[]) {\n values.forEach((v) => {\n const foundIndex = this._indexByValue.get(v) ?? -1;\n\n if (foundIndex !== -1) {\n this._selectedIndexes.add(foundIndex);\n }\n });\n\n this._host.requestUpdate();\n }\n\n toggleActiveMultiselectOption() {\n const activeOption = this._options[this._activeIndex] ?? null;\n\n if (!activeOption) {\n return;\n }\n\n const checked = this._selectedIndexes.has(activeOption.index);\n\n if (checked) {\n this._selectedIndexes.delete(activeOption.index);\n } else {\n this._selectedIndexes.add(activeOption.index);\n }\n\n this._host.requestUpdate();\n }\n\n toggleOptionSelected(optIndex: number) {\n const checked = this._selectedIndexes.has(optIndex);\n this._options[optIndex].selected = !this._options[optIndex].selected;\n\n if (checked) {\n this._selectedIndexes.delete(optIndex);\n } else {\n this._selectedIndexes.add(optIndex);\n }\n\n this._host.requestUpdate();\n }\n\n getActiveOption(): InternalOption | null {\n return this._options[this._activeIndex] ?? null;\n }\n\n getSelectedOption(): InternalOption | null {\n return this._options[this._selectedIndex] ?? null;\n }\n\n getOptionByIndex(index: number) {\n return this._options[index] ?? null;\n }\n\n findOptionIndex(value: string) {\n return this._indexByValue.get(value) ?? -1;\n }\n\n getOptionByValue(\n value: string,\n includeHiddenOptions = false\n ): InternalOption | null {\n const index = this._indexByValue.get(value) ?? -1;\n\n if (index === -1) {\n return null;\n }\n\n if (!includeHiddenOptions) {\n return this._options[index].visible ? this._options[index] : null;\n }\n\n return this._options[index];\n }\n\n getOptionByLabel(label: string) {\n const index = this._indexByLabel.get(label) ?? -1;\n\n if (index === -1) {\n return null;\n }\n\n return this._options[index];\n }\n\n next(fromIndex?: number): InternalOption | null {\n const from = fromIndex ?? this._activeIndex;\n let nextIndex = -1;\n\n for (let i = from + 1; i < this._options.length; i++) {\n if (\n this._options[i] &&\n !this._options[i].disabled &&\n this._options[i].visible\n ) {\n nextIndex = i;\n break;\n }\n }\n\n return nextIndex > -1 ? this._options[nextIndex] : null;\n }\n\n prev(fromIndex?: number): InternalOption | null {\n const from = fromIndex ?? this._activeIndex;\n\n let prevIndex = -1;\n\n for (let i = from - 1; i >= 0; i--) {\n if (\n this._options[i] &&\n !this._options[i].disabled &&\n this._options[i].visible\n ) {\n prevIndex = i;\n break;\n }\n }\n\n return prevIndex > -1 ? this._options[prevIndex] : null;\n }\n\n activateDefault() {\n if (this._multiSelect) {\n if (this._selectedIndexes.size > 0) {\n const indexes = this._selectedIndexes.values();\n const first = indexes.next();\n this._activeIndex = first.value ? first.value : 0;\n }\n } else {\n if (this._selectedIndex > -1) {\n this._activeIndex = this._selectedIndex;\n } else {\n this._activeIndex = 0;\n }\n }\n\n this._host.requestUpdate();\n }\n\n selectAll() {\n if (!this._multiSelect) {\n return;\n }\n\n this._options.forEach((_, i) => {\n this._options[i].selected = true;\n this._selectedIndexes.add(i);\n });\n\n this._host.requestUpdate();\n }\n\n selectNone() {\n if (!this._multiSelect) {\n return;\n }\n\n this._options.forEach((_, i) => {\n this._options[i].selected = false;\n });\n this._selectedIndexes.clear();\n\n this._host.requestUpdate();\n }\n\n //#endregion\n\n //#region private functions\n\n private _searchByPattern(text: string) {\n let result: SearchResult;\n\n switch (this._filterMethod) {\n case 'startsWithPerTerm':\n result = startsWithPerTermSearch(text, this._filterPattern);\n break;\n case 'startsWith':\n result = startsWithSearch(text, this._filterPattern);\n break;\n case 'contains':\n result = containsSearch(text, this._filterPattern);\n break;\n default:\n result = fuzzySearch(text, this._filterPattern);\n }\n\n return result;\n }\n\n private _updateState() {\n if (!this._combobox || this._filterPattern === '') {\n this._options.forEach((_, i) => {\n this._options[i].visible = true;\n this._options[i].ranges = [];\n });\n this._numOfVisibleOptions = this._options.length;\n } else {\n let filteredListNextIndex = -1;\n this._numOfVisibleOptions = 0;\n\n this._options.forEach(({label}, i) => {\n const result = this._searchByPattern(label);\n this._options[i].visible = result.match;\n this._options[i].ranges = result.ranges;\n this._options[i].filteredIndex = result.match\n ? ++filteredListNextIndex\n : -1;\n\n if (result.match) {\n this._numOfVisibleOptions += 1;\n }\n });\n }\n\n this._host.requestUpdate();\n }\n\n //#endregion\n}\n"]}
@@ -83,6 +83,7 @@ export declare class VscodeMultiSelect extends VscodeSelectBase implements Assoc
83
83
  private _onMultiAcceptClick;
84
84
  private _onMultiDeselectAllClick;
85
85
  private _onMultiSelectAllClick;
86
+ protected _onComboboxInputBlur(): void;
86
87
  private _renderLabel;
87
88
  protected _renderComboboxFace(): TemplateResult;
88
89
  protected _renderSelectFace(): TemplateResult;
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AAmB;IAI3B,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,sBAAsB;cAcX,oBAAoB,IAAI,IAAI;IAO/C,OAAO,CAAC,YAAY;cAWD,mBAAmB,IAAI,cAAc;cAyCrC,iBAAiB,IAAI,cAAc;cAyBnC,uBAAuB,IAAI,cAAc;IAgCnD,MAAM,IAAI,cAAc;CAUlC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;IAED,UAAU,2BAA2B;QACnC,gCAAgC,EAAE,+BAA+B,CAAC;KACnE;CACF"}
@@ -240,6 +240,10 @@ let VscodeMultiSelect = class VscodeMultiSelect extends VscodeSelectBase {
240
240
  this._setFormValue();
241
241
  this._manageRequired();
242
242
  }
243
+ _onComboboxInputBlur() {
244
+ super._onComboboxInputBlur();
245
+ this._opts.filterPattern = '';
246
+ }
243
247
  //#endregion
244
248
  //#region render functions
245
249
  _renderLabel() {
@@ -253,14 +257,6 @@ let VscodeMultiSelect = class VscodeMultiSelect extends VscodeSelectBase {
253
257
  }
254
258
  }
255
259
  _renderComboboxFace() {
256
- let inputVal = '';
257
- if (this._isBeingFiltered) {
258
- inputVal = this._opts.filterPattern;
259
- }
260
- else {
261
- const op = this._opts.getSelectedOption();
262
- inputVal = op?.label ?? '';
263
- }
264
260
  const activeDescendant = this._opts.activeIndex > -1 ? `op-${this._opts.activeIndex}` : '';
265
261
  const expanded = this.open ? 'true' : 'false';
266
262
  return html `
@@ -278,7 +274,7 @@ let VscodeMultiSelect = class VscodeMultiSelect extends VscodeSelectBase {
278
274
  spellcheck="false"
279
275
  type="text"
280
276
  autocomplete="off"
281
- .value=${inputVal}
277
+ .value=${this._opts.filterPattern}
282
278
  @focus=${this._onComboboxInputFocus}
283
279
  @blur=${this._onComboboxInputBlur}
284
280
  @input=${this._onComboboxInputInput}