@vscode-elements/elements 1.8.1 → 1.9.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/custom-elements.json +117 -55
- package/dist/bundled.js +28 -27
- package/dist/includes/VscElement.js +1 -1
- package/dist/includes/VscElement.js.map +1 -1
- package/dist/includes/vscode-select/vscode-select-base.d.ts.map +1 -1
- package/dist/includes/vscode-select/vscode-select-base.js +3 -2
- package/dist/includes/vscode-select/vscode-select-base.js.map +1 -1
- package/dist/vscode-checkbox/vscode-checkbox.d.ts +1 -1
- package/dist/vscode-checkbox/vscode-checkbox.d.ts.map +1 -1
- package/dist/vscode-checkbox/vscode-checkbox.js +5 -4
- package/dist/vscode-checkbox/vscode-checkbox.js.map +1 -1
- package/dist/vscode-context-menu/vscode-context-menu.d.ts +4 -0
- package/dist/vscode-context-menu/vscode-context-menu.d.ts.map +1 -1
- package/dist/vscode-context-menu/vscode-context-menu.js +16 -5
- package/dist/vscode-context-menu/vscode-context-menu.js.map +1 -1
- package/dist/vscode-divider/vscode-divider.styles.d.ts.map +1 -1
- package/dist/vscode-divider/vscode-divider.styles.js +2 -1
- package/dist/vscode-divider/vscode-divider.styles.js.map +1 -1
- package/dist/vscode-multi-select/vscode-multi-select.d.ts +3 -1
- package/dist/vscode-multi-select/vscode-multi-select.d.ts.map +1 -1
- package/dist/vscode-multi-select/vscode-multi-select.js +26 -2
- package/dist/vscode-multi-select/vscode-multi-select.js.map +1 -1
- package/dist/vscode-option/vscode-option.d.ts +1 -1
- package/dist/vscode-option/vscode-option.d.ts.map +1 -1
- package/dist/vscode-option/vscode-option.js +0 -1
- package/dist/vscode-option/vscode-option.js.map +1 -1
- package/dist/vscode-radio/vscode-radio.d.ts +1 -1
- package/dist/vscode-radio/vscode-radio.d.ts.map +1 -1
- package/dist/vscode-radio/vscode-radio.js +5 -4
- package/dist/vscode-radio/vscode-radio.js.map +1 -1
- package/dist/vscode-single-select/vscode-single-select.d.ts +1 -0
- package/dist/vscode-single-select/vscode-single-select.d.ts.map +1 -1
- package/dist/vscode-single-select/vscode-single-select.js +11 -0
- package/dist/vscode-single-select/vscode-single-select.js.map +1 -1
- package/package.json +2 -2
- package/vscode.html-custom-data.json +10 -3
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,s=Symbol(),i=new WeakMap;let o=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=i.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&i.set(s,t))}return t}toString(){return this.cssText}};const r=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,s,i)=>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.")})(s)+t[i+1]),t[0]);return new o(i,t,s)},n=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,s))(e)})(t):t,{is:l,defineProperty:a,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:d,getPrototypeOf:u}=Object,v=globalThis,p=v.trustedTypes,b=p?p.emptyScript:"",f=v.reactiveElementPolyfillSupport,g=(t,e)=>t,m={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},x=(t,e)=>!l(t,e),y={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;class w 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.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&a(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);o.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(g("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(g("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(g("properties"))){const t=this.properties,e=[...h(t),...d(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(n(t))}else void 0!==t&&e.push(n(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"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 s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((s,i)=>{if(e)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of i){const i=document.createElement("style"),o=t.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)}})(s,this.constructor.elementStyles),s}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,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:m).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:m;this._$Em=i,this[i]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??x)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){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,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],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._$EU()}catch(e){throw t=!1,this._$EU(),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)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[g("elementProperties")]=new Map,w[g("finalized")]=new Map,f?.({ReactiveElement:w}),(v.reactiveElementVersions??=[]).push("2.0.4");const k=globalThis,$=k.trustedTypes,_=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,S="?"+B,z=`<${S}>`,A=document,O=()=>A.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,I=t=>j(t)||"function"==typeof t?.[Symbol.iterator],F="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,N=/>/g,D=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,T=/"/g,R=/^(?:script|style|textarea|title)$/i,L=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),U=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),H=new WeakMap,K=A.createTreeWalker(A,129);function W(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==_?_.createHTML(e):e}const G=(t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=M;for(let e=0;e<s;e++){const s=t[e];let l,a,c=-1,h=0;for(;h<s.length&&(n.lastIndex=h,a=n.exec(s),null!==a);)h=n.lastIndex,n===M?"!--"===a[1]?n=P:void 0!==a[1]?n=N:void 0!==a[2]?(R.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=D):void 0!==a[3]&&(n=D):n===D?">"===a[0]?(n=o??M,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?D:'"'===a[3]?T:V):n===T||n===V?n=D:n===P||n===N?n=M:(n=D,o=void 0);const d=n===D&&t[e+1].startsWith("/>")?" ":"";r+=n===M?s+z:c>=0?(i.push(l),s.slice(0,c)+C+s.slice(c)+B+d):s+B+(-2===c?e:d)}return[W(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class J{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,c]=G(t,e);if(this.el=J.createElement(a,s),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=K.nextNode())&&l.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(C)){const e=c[r++],s=i.getAttribute(t).split(B),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?tt:"?"===n[1]?et:"@"===n[1]?st:Q}),i.removeAttribute(t)}else t.startsWith(B)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(R.test(i.tagName)){const t=i.textContent.split(B),e=t.length-1;if(e>0){i.textContent=$?$.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],O()),K.nextNode(),l.push({type:2,index:++o});i.append(t[e],O())}}}else if(8===i.nodeType)if(i.data===S)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(B,t+1));)l.push({type:7,index:o}),t+=B.length-1}o++}}static createElement(t,e){const s=A.createElement("template");return s.innerHTML=t,s}}function Y(t,e,s=t,i){if(e===U)return e;let o=void 0!==i?s.o?.[i]:s.l;const r=E(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,s,i)),void 0!==i?(s.o??=[])[i]=o:s.l=o),void 0!==o&&(e=Y(t,o._$AS(t,e.values),o,i)),e}class X{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:s}=this._$AD,i=(t?.creationScope??A).importNode(e,!0);K.currentNode=i;let o=K.nextNode(),r=0,n=0,l=s[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Z(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new it(o,this,t)),this._$AV.push(e),l=s[++n]}r!==l?.index&&(o=K.nextNode(),r++)}return K.currentNode=A,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}let Z=class t{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,s,i){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=i?.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=Y(this,t,e),E(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):I(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&&E(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=J.createElement(W(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new X(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=H.get(t.strings);return void 0===e&&H.set(t.strings,e=new J(t)),e}k(e){j(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,o=0;for(const r of e)o===s.length?s.push(i=new t(this.O(O()),this.O(O()),this,this.options)):i=s[o],i._$AI(r),o++;o<s.length&&(this._$AR(i&&i._$AB.nextSibling,o),s.length=o)}_$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.v=t,this._$AP?.(t))}};class Q{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=q}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(void 0===o)t=Y(this,t,e,0),r=!E(t)||t!==this._$AH&&t!==U,r&&(this._$AH=t);else{const i=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Y(this,i[s+n],e,n),l===U&&(l=this._$AH[n]),r||=!E(l)||l!==this._$AH[n],l===q?t=q:t!==q&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!i&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class et extends Q{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class st extends Q{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=Y(this,t,e,0)??q)===U)return;const s=this._$AH,i=t===q&&s!==q||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==q&&(s===q||i);i&&this.element.removeEventListener(this.name,this,s),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 it{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const ot={M:C,P:B,A:S,C:1,L:G,R:X,D:I,V:Y,I:Z,H:Q,N:et,U:st,B:tt,F:it},rt=k.litHtmlPolyfillSupport;rt?.(J,Z),(k.litHtmlVersions??=[]).push("3.2.0");class nt extends w{constructor(){super(...arguments),this.renderOptions={host:this},this.o=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.o=((t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new Z(e.insertBefore(O(),t),t,void 0,s??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return U}}nt._$litElement$=!0,nt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:nt});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:nt}),(globalThis.litElementVersions??=[]).push("4.1.0");const at=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},ct={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x},ht=(t=ct,e,s)=>{const{kind:i,metadata:o}=s;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),r.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const o=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,o,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const o=this[i];e.call(this,s),this.requestUpdate(i,o,t)}}throw Error("Unsupported decorator location: "+i)};function dt(t){return(e,s)=>"object"==typeof s?ht(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}function ut(t){return dt({...t,state:!0,attribute:!1})}const vt=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,s);function pt(t,e){return(e,s,i)=>vt(0,0,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let bt;function ft(t){return(e,s)=>{const{slot:i,selector:o}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return vt(0,0,{get(){const e=this.renderRoot?.querySelector(r),s=e?.assignedElements(t)??[];return void 0===o?s:s.filter((t=>t.matches(o)))}})}}class gt extends nt{constructor(){super(...arguments),this._version="1.8.1"}get version(){return this._version}}var mt=r`
|
|
1
|
+
const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),i=new WeakMap;let o=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=i.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&i.set(s,t))}return t}toString(){return this.cssText}};const r=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,s,i)=>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.")})(s)+t[i+1]),t[0]);return new o(i,t,s)},n=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,s))(e)})(t):t,{is:l,defineProperty:a,getOwnPropertyDescriptor:h,getOwnPropertyNames:c,getOwnPropertySymbols:d,getPrototypeOf:u}=Object,v=globalThis,p=v.trustedTypes,b=p?p.emptyScript:"",f=v.reactiveElementPolyfillSupport,g=(t,e)=>t,m={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},x=(t,e)=>!l(t,e),y={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;class w 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.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&a(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=h(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);o.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(g("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(g("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(g("properties"))){const t=this.properties,e=[...c(t),...d(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(n(t))}else void 0!==t&&e.push(n(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"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 s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((s,i)=>{if(e)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of i){const i=document.createElement("style"),o=t.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)}})(s,this.constructor.elementStyles),s}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,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:m).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:m;this._$Em=i,this[i]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??x)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){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,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],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._$EU()}catch(e){throw t=!1,this._$EU(),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)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[g("elementProperties")]=new Map,w[g("finalized")]=new Map,f?.({ReactiveElement:w}),(v.reactiveElementVersions??=[]).push("2.0.4");const k=globalThis,$=k.trustedTypes,_=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,S="?"+B,z=`<${S}>`,A=document,O=()=>A.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,I=t=>j(t)||"function"==typeof t?.[Symbol.iterator],F="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,N=/>/g,D=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,T=/"/g,R=/^(?:script|style|textarea|title)$/i,L=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),U=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),H=new WeakMap,K=A.createTreeWalker(A,129);function W(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==_?_.createHTML(e):e}const G=(t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=M;for(let e=0;e<s;e++){const s=t[e];let l,a,h=-1,c=0;for(;c<s.length&&(n.lastIndex=c,a=n.exec(s),null!==a);)c=n.lastIndex,n===M?"!--"===a[1]?n=P:void 0!==a[1]?n=N:void 0!==a[2]?(R.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=D):void 0!==a[3]&&(n=D):n===D?">"===a[0]?(n=o??M,h=-1):void 0===a[1]?h=-2:(h=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?D:'"'===a[3]?T:V):n===T||n===V?n=D:n===P||n===N?n=M:(n=D,o=void 0);const d=n===D&&t[e+1].startsWith("/>")?" ":"";r+=n===M?s+z:h>=0?(i.push(l),s.slice(0,h)+C+s.slice(h)+B+d):s+B+(-2===h?e:d)}return[W(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class J{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,h]=G(t,e);if(this.el=J.createElement(a,s),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=K.nextNode())&&l.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(C)){const e=h[r++],s=i.getAttribute(t).split(B),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?tt:"?"===n[1]?et:"@"===n[1]?st:Q}),i.removeAttribute(t)}else t.startsWith(B)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(R.test(i.tagName)){const t=i.textContent.split(B),e=t.length-1;if(e>0){i.textContent=$?$.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],O()),K.nextNode(),l.push({type:2,index:++o});i.append(t[e],O())}}}else if(8===i.nodeType)if(i.data===S)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(B,t+1));)l.push({type:7,index:o}),t+=B.length-1}o++}}static createElement(t,e){const s=A.createElement("template");return s.innerHTML=t,s}}function Y(t,e,s=t,i){if(e===U)return e;let o=void 0!==i?s.o?.[i]:s.l;const r=E(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,s,i)),void 0!==i?(s.o??=[])[i]=o:s.l=o),void 0!==o&&(e=Y(t,o._$AS(t,e.values),o,i)),e}class X{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:s}=this._$AD,i=(t?.creationScope??A).importNode(e,!0);K.currentNode=i;let o=K.nextNode(),r=0,n=0,l=s[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Z(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new it(o,this,t)),this._$AV.push(e),l=s[++n]}r!==l?.index&&(o=K.nextNode(),r++)}return K.currentNode=A,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}let Z=class t{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,s,i){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=i?.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=Y(this,t,e),E(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):I(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&&E(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=J.createElement(W(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new X(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=H.get(t.strings);return void 0===e&&H.set(t.strings,e=new J(t)),e}k(e){j(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,o=0;for(const r of e)o===s.length?s.push(i=new t(this.O(O()),this.O(O()),this,this.options)):i=s[o],i._$AI(r),o++;o<s.length&&(this._$AR(i&&i._$AB.nextSibling,o),s.length=o)}_$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.v=t,this._$AP?.(t))}};class Q{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=q}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(void 0===o)t=Y(this,t,e,0),r=!E(t)||t!==this._$AH&&t!==U,r&&(this._$AH=t);else{const i=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Y(this,i[s+n],e,n),l===U&&(l=this._$AH[n]),r||=!E(l)||l!==this._$AH[n],l===q?t=q:t!==q&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!i&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class et extends Q{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class st extends Q{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=Y(this,t,e,0)??q)===U)return;const s=this._$AH,i=t===q&&s!==q||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==q&&(s===q||i);i&&this.element.removeEventListener(this.name,this,s),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 it{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const ot={M:C,P:B,A:S,C:1,L:G,R:X,D:I,V:Y,I:Z,H:Q,N:et,U:st,B:tt,F:it},rt=k.litHtmlPolyfillSupport;rt?.(J,Z),(k.litHtmlVersions??=[]).push("3.2.0");class nt extends w{constructor(){super(...arguments),this.renderOptions={host:this},this.o=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.o=((t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new Z(e.insertBefore(O(),t),t,void 0,s??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return U}}nt._$litElement$=!0,nt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:nt});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:nt}),(globalThis.litElementVersions??=[]).push("4.1.0");const at=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},ht={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x},ct=(t=ht,e,s)=>{const{kind:i,metadata:o}=s;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),r.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const o=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,o,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const o=this[i];e.call(this,s),this.requestUpdate(i,o,t)}}throw Error("Unsupported decorator location: "+i)};function dt(t){return(e,s)=>"object"==typeof s?ct(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}function ut(t){return dt({...t,state:!0,attribute:!1})}const vt=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,s);function pt(t,e){return(e,s,i)=>vt(0,0,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let bt;function ft(t){return(e,s)=>{const{slot:i,selector:o}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return vt(0,0,{get(){const e=this.renderRoot?.querySelector(r),s=e?.assignedElements(t)??[];return void 0===o?s:s.filter((t=>t.matches(o)))}})}}class gt extends nt{constructor(){super(...arguments),this._version="1.9.1"}get version(){return this._version}}var mt=r`
|
|
2
2
|
:host([hidden]) {
|
|
3
3
|
display: none;
|
|
4
4
|
}
|
|
@@ -378,7 +378,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
378
378
|
outline: 1px solid var(--focus-border);
|
|
379
379
|
outline-offset: -1px;
|
|
380
380
|
}
|
|
381
|
-
`,Jt];var Xt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Zt=class extends(Wt(Ht)){set checked(t){this._checked=t,this._manageRequired(),this.requestUpdate()}get checked(){return this._checked}set required(t){this._required=t,this._manageRequired(),this.requestUpdate()}get required(){return this._required}get form(){return this._internals.form}get
|
|
381
|
+
`,Jt];var Xt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Zt=class extends(Wt(Ht)){set checked(t){this._checked=t,this._manageRequired(),this.requestUpdate()}get checked(){return this._checked}set required(t){this._required=t,this._manageRequired(),this.requestUpdate()}get required(){return this._required}get form(){return this._internals.form}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()}constructor(){super(),this.autofocus=!1,this._checked=!1,this.defaultChecked=!1,this.invalid=!1,this.name=void 0,this.role="checkbox",this.value="",this.disabled=!1,this.indeterminate=!1,this._required=!1,this.type="checkbox",this._handleClick=t=>{t.preventDefault(),this.disabled||this._toggleState()},this._handleKeyDown=t=>{this.disabled||"Enter"!==t.key&&" "!==t.key||(t.preventDefault()," "===t.key&&this._toggleState(),"Enter"===t.key&&this._internals.form?.requestSubmit())},this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyDown),this.updateComplete.then((()=>{this._manageRequired(),this._setActualFormValue()}))}disconnectedCallback(){this.removeEventListener("keydown",this._handleKeyDown)}update(t){super.update(t),t.has("checked")&&(this.ariaChecked=this.checked?"true":"false")}formResetCallback(){this.checked=this.defaultChecked}formStateRestoreCallback(t,e){t&&(this.checked=!0)}_setActualFormValue(){let t="";t=this.checked?this.value?this.value:"on":null,this._internals.setFormValue(t)}_toggleState(){this.checked=!this.checked,this.indeterminate=!1,this._setActualFormValue(),this._manageRequired(),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent("vsc-change",{detail:{checked:this.checked,label:this.label,value:this.value},bubbles:!0,composed:!0}))}_manageRequired(){!this.checked&&this.required?this._internals.setValidity({valueMissing:!0},"Please check this box if you want to proceed.",this._inputEl??void 0):this._internals.setValidity({})}render(){const t=Bt({icon:!0,checked:this.checked,indeterminate:this.indeterminate}),e=Bt({"label-inner":!0}),s=L`<svg
|
|
382
382
|
width="16"
|
|
383
383
|
height="16"
|
|
384
384
|
viewBox="0 0 16 16"
|
|
@@ -409,7 +409,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
409
409
|
</span>
|
|
410
410
|
</label>
|
|
411
411
|
</div>
|
|
412
|
-
`}};Zt.styles=Yt,Zt.formAssociated=!0,Zt.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},Xt([dt({type:Boolean,reflect:!0})],Zt.prototype,"autofocus",void 0),Xt([dt({type:Boolean,reflect:!0})],Zt.prototype,"checked",null),Xt([dt({type:Boolean,reflect:!0,attribute:"default-checked"})],Zt.prototype,"defaultChecked",void 0),Xt([dt({type:Boolean,reflect:!0})],Zt.prototype,"invalid",void 0),Xt([dt({reflect:!0})],Zt.prototype,"name",void 0),Xt([dt({reflect:!0})],Zt.prototype,"role",void 0),Xt([dt()],Zt.prototype,"value",void 0),Xt([dt({type:Boolean,reflect:!0})],Zt.prototype,"disabled",void 0),Xt([dt({type:Boolean,reflect:!0})],Zt.prototype,"indeterminate",void 0),Xt([dt({type:Boolean,reflect:!0})],Zt.prototype,"required",null),Xt([pt("#input")],Zt.prototype,"_inputEl",void 0),Zt=Xt([at("vscode-checkbox")],Zt);const Qt=[mt,r`
|
|
412
|
+
`}};Zt.styles=Yt,Zt.formAssociated=!0,Zt.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},Xt([dt({type:Boolean,reflect:!0})],Zt.prototype,"autofocus",void 0),Xt([dt({type:Boolean,reflect:!0})],Zt.prototype,"checked",null),Xt([dt({type:Boolean,reflect:!0,attribute:"default-checked"})],Zt.prototype,"defaultChecked",void 0),Xt([dt({type:Boolean,reflect:!0})],Zt.prototype,"invalid",void 0),Xt([dt({reflect:!0})],Zt.prototype,"name",void 0),Xt([dt({reflect:!0})],Zt.prototype,"role",void 0),Xt([dt()],Zt.prototype,"value",void 0),Xt([dt({type:Boolean,reflect:!0})],Zt.prototype,"disabled",void 0),Xt([dt({type:Boolean,reflect:!0})],Zt.prototype,"indeterminate",void 0),Xt([dt({type:Boolean,reflect:!0})],Zt.prototype,"required",null),Xt([dt()],Zt.prototype,"type",void 0),Xt([pt("#input")],Zt.prototype,"_inputEl",void 0),Zt=Xt([at("vscode-checkbox")],Zt);const Qt=[mt,r`
|
|
413
413
|
:host {
|
|
414
414
|
display: block;
|
|
415
415
|
}
|
|
@@ -675,7 +675,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
675
675
|
.context-menu:focus {
|
|
676
676
|
outline: 0;
|
|
677
677
|
}
|
|
678
|
-
`];var
|
|
678
|
+
`];var he=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let ce=class extends gt{set data(t){this._data=t;const e=[];t.forEach(((t,s)=>{t.separator||e.push(s)})),this._clickableItemIndexes=e}get data(){return this._data}set show(t){this._show=t,this._selectedClickableItemIndex=-1,t&&this.updateComplete.then((()=>{this._wrapperEl&&this._wrapperEl.focus(),requestAnimationFrame((()=>{document.addEventListener("click",this._onClickOutsideBound,{once:!0})}))}))}get show(){return this._show}constructor(){super(),this.preventClose=!1,this.tabIndex=0,this._selectedClickableItemIndex=-1,this._show=!1,this._data=[],this._clickableItemIndexes=[],this._onClickOutsideBound=this._onClickOutside.bind(this),this.addEventListener("keydown",this._onKeyDown)}_onClickOutside(t){t.composedPath().includes(this)||(this.show=!1)}_onKeyDown(t){const{key:e}=t;switch("ArrowUp"!==e&&"ArrowDown"!==e&&"Escape"!==e&&"Enter"!==e||t.preventDefault(),e){case"ArrowUp":this._handleArrowUp();break;case"ArrowDown":this._handleArrowDown();break;case"Escape":this._handleEscape();break;case"Enter":this._handleEnter()}}_handleArrowUp(){0===this._selectedClickableItemIndex?this._selectedClickableItemIndex=this._clickableItemIndexes.length-1:this._selectedClickableItemIndex-=1}_handleArrowDown(){this._selectedClickableItemIndex+1<this._clickableItemIndexes.length?this._selectedClickableItemIndex+=1:this._selectedClickableItemIndex=0}_handleEscape(){this.show=!1,document.removeEventListener("click",this._onClickOutsideBound)}_dispatchSelectEvent(t){const{keybinding:e,label:s,value:i,separator:o,tabindex:r}=t;this.dispatchEvent(new CustomEvent("vsc-context-menu-select",{detail:{keybinding:e,label:s,separator:o,tabindex:r,value:i}}))}_dispatchLegacySelectEvent(t){const{keybinding:e,label:s,value:i,separator:o,tabindex:r}=t,n={keybinding:e,label:s,value:i,separator:o,tabindex:r};this.dispatchEvent(new CustomEvent("vsc-select",{detail:n,bubbles:!0,composed:!0}))}_handleEnter(){if(-1===this._selectedClickableItemIndex)return;const t=this._clickableItemIndexes[this._selectedClickableItemIndex],e=this._wrapperEl.querySelectorAll("vscode-context-menu-item")[t];this._dispatchLegacySelectEvent(e),this._dispatchSelectEvent(e),this.preventClose||(this.show=!1,document.removeEventListener("click",this._onClickOutsideBound))}_onItemClick(t){const e=t.currentTarget;this._dispatchLegacySelectEvent(e),this._dispatchSelectEvent(e),this.preventClose||(this.show=!1)}_onItemMouseOver(t){const e=t.target,s=e.dataset.index?+e.dataset.index:-1,i=this._clickableItemIndexes.findIndex((t=>t===s));-1!==i&&(this._selectedClickableItemIndex=i)}_onItemMouseOut(){this._selectedClickableItemIndex=-1}render(){if(!this._show)return L`${q}`;const t=this._clickableItemIndexes[this._selectedClickableItemIndex];return L`
|
|
679
679
|
<div class="context-menu" tabindex="0">
|
|
680
680
|
${this.data?this.data.map((({label:e="",keybinding:s="",value:i="",separator:o=!1,tabindex:r=0},n)=>L`
|
|
681
681
|
<vscode-context-menu-item
|
|
@@ -692,13 +692,14 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
692
692
|
></vscode-context-menu-item>
|
|
693
693
|
`)):L`<slot></slot>`}
|
|
694
694
|
</div>
|
|
695
|
-
`}};
|
|
695
|
+
`}};ce.styles=ae,he([dt({type:Array,attribute:!1})],ce.prototype,"data",null),he([dt({type:Boolean,reflect:!0,attribute:"prevent-close"})],ce.prototype,"preventClose",void 0),he([dt({type:Boolean,reflect:!0})],ce.prototype,"show",null),he([dt({type:Number,reflect:!0})],ce.prototype,"tabIndex",void 0),he([ut()],ce.prototype,"_selectedClickableItemIndex",void 0),he([ut()],ce.prototype,"_show",void 0),he([pt(".context-menu")],ce.prototype,"_wrapperEl",void 0),ce=he([at("vscode-context-menu")],ce);const de=[mt,r`
|
|
696
696
|
:host {
|
|
697
|
-
background-color: var(--vscode-
|
|
697
|
+
background-color: var(--vscode-foreground);
|
|
698
698
|
display: block;
|
|
699
699
|
height: 1px;
|
|
700
700
|
margin-bottom: 10px;
|
|
701
701
|
margin-top: 10px;
|
|
702
|
+
opacity: 0.4;
|
|
702
703
|
}
|
|
703
704
|
`];var ue=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let ve=class extends gt{constructor(){super(...arguments),this.role="separator"}render(){return L``}};ve.styles=de,ue([dt({reflect:!0})],ve.prototype,"role",void 0),ve=ue([at("vscode-divider")],ve);const pe=[mt,r`
|
|
704
705
|
:host {
|
|
@@ -1157,7 +1158,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1157
1158
|
@click=${this._handleClick}
|
|
1158
1159
|
><slot></slot
|
|
1159
1160
|
></label>
|
|
1160
|
-
`}};Ve.styles=Ne,De([dt({reflect:!0,attribute:"for"})],Ve.prototype,"htmlFor",null),De([dt()],Ve.prototype,"id",null),De([dt({type:Boolean,reflect:!0})],Ve.prototype,"required",void 0),Ve=De([at("vscode-label")],Ve);const{I:Te}=ot,Re=()=>document.createComment(""),Le=(t,e,s)=>{const i=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=i.insertBefore(Re(),o),r=i.insertBefore(Re(),o);s=new Te(e,r,t,t.options)}else{const e=s._$AB.nextSibling,r=s._$AM,n=r!==t;if(n){let e;s._$AQ?.(t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==r._$AU&&s._$AP(e)}if(e!==o||n){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;i.insertBefore(t,o),t=e}}}return s},Ue=(t,e,s=t)=>(t._$AI(e,s),t),qe={},He=t=>{t._$AP?.(!1,!0);let e=t._$AA;const s=t._$AB.nextSibling;for(;e!==s;){const t=e.nextSibling;e.remove(),e=t}},Ke=(t,e,s)=>{const i=new Map;for(let o=e;o<=s;o++)i.set(t[o],o);return i},We=_t(class extends Ct{constructor(t){if(super(t),t.type!==$t)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const o=[],r=[];let n=0;for(const e of t)o[n]=i?i(e,n):n,r[n]=s(e,n),n++;return{values:r,keys:o}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,i]){const o=(t=>t._$AH)(t),{values:r,keys:n}=this.dt(e,s,i);if(!Array.isArray(o))return this.ut=n,r;const l=this.ut??=[],a=[];let c,
|
|
1161
|
+
`}};Ve.styles=Ne,De([dt({reflect:!0,attribute:"for"})],Ve.prototype,"htmlFor",null),De([dt()],Ve.prototype,"id",null),De([dt({type:Boolean,reflect:!0})],Ve.prototype,"required",void 0),Ve=De([at("vscode-label")],Ve);const{I:Te}=ot,Re=()=>document.createComment(""),Le=(t,e,s)=>{const i=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=i.insertBefore(Re(),o),r=i.insertBefore(Re(),o);s=new Te(e,r,t,t.options)}else{const e=s._$AB.nextSibling,r=s._$AM,n=r!==t;if(n){let e;s._$AQ?.(t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==r._$AU&&s._$AP(e)}if(e!==o||n){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;i.insertBefore(t,o),t=e}}}return s},Ue=(t,e,s=t)=>(t._$AI(e,s),t),qe={},He=t=>{t._$AP?.(!1,!0);let e=t._$AA;const s=t._$AB.nextSibling;for(;e!==s;){const t=e.nextSibling;e.remove(),e=t}},Ke=(t,e,s)=>{const i=new Map;for(let o=e;o<=s;o++)i.set(t[o],o);return i},We=_t(class extends Ct{constructor(t){if(super(t),t.type!==$t)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const o=[],r=[];let n=0;for(const e of t)o[n]=i?i(e,n):n,r[n]=s(e,n),n++;return{values:r,keys:o}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,i]){const o=(t=>t._$AH)(t),{values:r,keys:n}=this.dt(e,s,i);if(!Array.isArray(o))return this.ut=n,r;const l=this.ut??=[],a=[];let h,c,d=0,u=o.length-1,v=0,p=r.length-1;for(;d<=u&&v<=p;)if(null===o[d])d++;else if(null===o[u])u--;else if(l[d]===n[v])a[v]=Ue(o[d],r[v]),d++,v++;else if(l[u]===n[p])a[p]=Ue(o[u],r[p]),u--,p--;else if(l[d]===n[p])a[p]=Ue(o[d],r[p]),Le(t,a[p+1],o[d]),d++,p--;else if(l[u]===n[v])a[v]=Ue(o[u],r[v]),Le(t,o[d],o[u]),u--,v++;else if(void 0===h&&(h=Ke(n,v,p),c=Ke(l,d,u)),h.has(l[d]))if(h.has(l[u])){const e=c.get(n[v]),s=void 0!==e?o[e]:null;if(null===s){const e=Le(t,o[d]);Ue(e,r[v]),a[v]=e}else a[v]=Ue(s,r[v]),Le(t,o[d],s),o[e]=null;v++}else He(o[u]),u--;else He(o[d]),d++;for(;v<=p;){const e=Le(t,a[p+1]);Ue(e,r[v]),a[v++]=e}for(;d<=u;){const t=o[d++];null!==t&&He(t)}return this.ut=n,((t,e=qe)=>{t._$AH=e})(t,a),U}}),Ge=L`
|
|
1161
1162
|
<span class="icon">
|
|
1162
1163
|
<svg
|
|
1163
1164
|
width="16"
|
|
@@ -1173,7 +1174,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1173
1174
|
/>
|
|
1174
1175
|
</svg>
|
|
1175
1176
|
</span>
|
|
1176
|
-
`;var Je=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ye=class extends gt{constructor(){super(...arguments),this.
|
|
1177
|
+
`;var Je=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ye=class extends gt{constructor(){super(...arguments),this.description="",this.selected=!1,this.disabled=!1}render(){return L`<slot></slot>`}};Ye.styles=mt,Je([dt({type:String})],Ye.prototype,"value",void 0),Je([dt({type:String})],Ye.prototype,"description",void 0),Je([dt({type:Boolean,reflect:!0})],Ye.prototype,"selected",void 0),Je([dt({type:Boolean,reflect:!0})],Ye.prototype,"disabled",void 0),Ye=Je([at("vscode-option")],Ye);const Xe=(t,e,s)=>{const i=[];return t.forEach((t=>{let o;switch(s){case"startsWithPerTerm":o=((t,e)=>{const s={match:!1,ranges:[]},i=t.toLowerCase(),o=e.toLowerCase(),r=i.split(" ");let n=0;return r.forEach(((e,i)=>{if(i>0&&(n+=r[i-1].length+1),s.match)return;const l=e.indexOf(o),a=o.length;0===l&&(s.match=!0,s.ranges.push([n+l,Math.min(n+l+a,t.length)]))})),s})(t.label,e);break;case"startsWith":o=((t,e)=>{const s={match:!1,ranges:[]};return 0===t.toLowerCase().indexOf(e.toLowerCase())&&(s.match=!0,s.ranges=[[0,e.length]]),s})(t.label,e);break;case"contains":o=((t,e)=>{const s={match:!1,ranges:[]},i=t.toLowerCase().indexOf(e.toLowerCase());return i>-1&&(s.match=!0,s.ranges=[[i,i+e.length]]),s})(t.label,e);break;default:o=((t,e)=>{const s={match:!1,ranges:[]};let i=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],i),-1===o)return{match:!1,ranges:[]};s.match=!0,s.ranges.push([o,o+1]),i=o+1}return s})(t.label,e)}o.match&&i.push({...t,ranges:o.ranges})})),i},Ze=t=>{const e=[];return" "===t?(e.push(L` `),e):(0===t.indexOf(" ")&&e.push(L` `),e.push(L`${t.trimStart().trimEnd()}`),t.lastIndexOf(" ")===t.length-1&&e.push(L` `),e)},Qe=(t,e)=>{const s=[],i=e.length;return i<1?L`${t}`:(e.forEach(((o,r)=>{const n=t.substring(o[0],o[1]);0===r&&0!==o[0]&&s.push(...Ze(t.substring(0,e[0][0]))),r>0&&r<i&&o[0]-e[r-1][1]!=0&&s.push(...Ze(t.substring(e[r-1][1],o[0]))),s.push(L`<b>${Ze(n)}</b>`),r===i-1&&o[1]<t.length&&s.push(...Ze(t.substring(o[1],t.length)))})),s)};var ts=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};const es=22;class ss extends gt{constructor(){super(...arguments),this.ariaExpanded="false",this.combobox=!1,this.invalid=!1,this.focused=!1,this.position="below",this.tabIndex=0,this._activeIndex=-1,this._currentDescription="",this._filter="fuzzy",this._filterPattern="",this._selectedIndex=-1,this._selectedIndexes=[],this._showDropdown=!1,this._options=[],this._value="",this._values=[],this._listScrollTop=0,this._multiple=!1,this._valueOptionIndexMap={},this._isHoverForbidden=!1,this._disabled=!1,this._originalTabIndex=void 0,this._onClickOutside=t=>{const e=t.composedPath().findIndex((t=>t===this));-1===e&&(this._toggleDropdown(!1),window.removeEventListener("click",this._onClickOutside))},this._onMouseMove=()=>{this._isHoverForbidden=!1,window.removeEventListener("mousemove",this._onMouseMove)}}set disabled(t){this._disabled=t,this.ariaDisabled=t?"true":"false",!0===t?(this._originalTabIndex=this.tabIndex,this.tabIndex=-1):(this.tabIndex=this._originalTabIndex??0,this._originalTabIndex=void 0),this.requestUpdate()}get disabled(){return this._disabled}set filter(t){["contains","fuzzy","startsWith","startsWithPerTerm"].includes(t)?this._filter=t:(this._filter="fuzzy",console.warn(`[VSCode Webview Elements] Invalid filter: "${t}", fallback to default. Valid values are: "contains", "fuzzy", "startsWith", "startsWithPerm".`,this))}get filter(){return this._filter}set options(t){this._options=t.map(((t,e)=>({...t,index:e})))}get options(){return this._options.map((({label:t,value:e,description:s,selected:i,disabled:o})=>({label:t,value:e,description:s,selected:i,disabled:o})))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._onComponentKeyDown),this.addEventListener("focus",this._onComponentFocus),this.addEventListener("blur",this._onComponentBlur)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._onComponentKeyDown),this.removeEventListener("focus",this._onComponentFocus),this.removeEventListener("blur",this._onComponentBlur)}get _filteredOptions(){return this.combobox&&""!==this._filterPattern?Xe(this._options,this._filterPattern,this._filter):this._options}get _currentOptions(){return this.combobox?this._filteredOptions:this._options}_addOptionsFromSlottedElements(){const t=[];let e=0;const s=this._assignedOptions??[],i={selectedIndexes:[],values:[]};return this._valueOptionIndexMap={},s.forEach((s=>{const{innerText:o,description:r,disabled:n}=s,l="string"==typeof s.value?s.value:o.trim(),a=s.selected??!1,h={label:o.trim(),value:l,description:r,selected:a,index:e,disabled:n};e=t.push(h),a&&(i.selectedIndexes.push(t.length-1),i.values.push(l)),this._valueOptionIndexMap[h.value]=h.index})),this._options=t,i}async _toggleDropdown(t){this._showDropdown=t,this.ariaExpanded=String(t),!t||this._multiple||this.combobox||(this._activeIndex=this._selectedIndex,this._activeIndex>9&&(await this.updateComplete,this._listElement.scrollTop=Math.floor(this._activeIndex*es))),t?window.addEventListener("click",this._onClickOutside):window.removeEventListener("click",this._onClickOutside)}_dispatchChangeEvent(){this._multiple?this.dispatchEvent(new CustomEvent("vsc-change",{detail:{selectedIndexes:this._selectedIndexes,value:this._values}})):this.dispatchEvent(new CustomEvent("vsc-change",{detail:{selectedIndex:this._selectedIndex,value:this._value}})),this.dispatchEvent(new Event("change")),this.dispatchEvent(new Event("input"))}_onFaceClick(){this._toggleDropdown(!this._showDropdown),this._multiple&&(this._activeIndex=0)}_toggleComboboxDropdown(){this._filterPattern="",this._toggleDropdown(!this._showDropdown),this._multiple&&(this._activeIndex=-1)}_onComboboxButtonClick(){this._toggleComboboxDropdown()}_onComboboxButtonKeyDown(t){"Enter"===t.key&&this._toggleComboboxDropdown()}_onOptionMouseOver(t){if(this._isHoverForbidden)return;const e=t.target;e.matches(".option")&&(this._activeIndex=Number(this.combobox?e.dataset.filteredIndex:e.dataset.index))}_onEnterKeyDown(){const t=this.combobox?this._filteredOptions:this._options,e=!this._showDropdown;this._toggleDropdown(e),this._multiple||e||this._selectedIndex===this._activeIndex||(this._selectedIndex=t[this._activeIndex].index,this._value=this._options[this._selectedIndex].value,this._dispatchChangeEvent()),this.combobox&&(this._multiple||e||(this._selectedIndex=this._filteredOptions[this._activeIndex].index),!this._multiple&&e&&this.updateComplete.then((()=>{this._scrollActiveElementToTop()}))),this._multiple&&e&&(this._activeIndex=0)}_onSpaceKeyDown(){if(this._showDropdown){if(this._showDropdown&&this._multiple&&this._activeIndex>-1){const t=this.combobox?this._filteredOptions:this._options,{selected:e}=t[this._activeIndex];t[this._activeIndex].selected=!e,this._selectedIndexes=[],t.forEach((({index:t,selected:e})=>{e&&this._selectedIndexes.push(t)}))}}else this._toggleDropdown(!0)}_scrollActiveElementToTop(){this._listElement.scrollTop=Math.floor(this._activeIndex*es)}async _adjustOptionListScrollPos(t){if((this.combobox?this._filteredOptions.length:this._options.length)<=10)return;this._isHoverForbidden=!0,window.addEventListener("mousemove",this._onMouseMove),this._listElement||await this.updateComplete;const e=this._listElement.scrollTop,s=this._activeIndex*es;"down"===t&&s+es>=34+e&&(this._listElement.scrollTop=(this._activeIndex-9)*es),"up"===t&&s<=e-es&&this._scrollActiveElementToTop()}_onArrowUpKeyDown(){if(this._showDropdown){if(this._activeIndex<=0)return;this._activeIndex-=1,this._adjustOptionListScrollPos("up")}}_onArrowDownKeyDown(){if(this._showDropdown){if(this._activeIndex>=this._currentOptions.length-1)return;this._activeIndex+=1,this._adjustOptionListScrollPos("down")}}_onComponentKeyDown(t){[" ","ArrowUp","ArrowDown","Escape"].includes(t.key)&&(t.stopPropagation(),t.preventDefault()),"Enter"===t.key&&this._onEnterKeyDown()," "===t.key&&this._onSpaceKeyDown(),"Escape"===t.key&&this._toggleDropdown(!1),"ArrowUp"===t.key&&this._onArrowUpKeyDown(),"ArrowDown"===t.key&&this._onArrowDownKeyDown()}_onComponentFocus(){this.focused=!0}_onComponentBlur(){this.focused=!1}_onSlotChange(){const t=this._addOptionsFromSlottedElements();t.selectedIndexes.length>0&&(this._selectedIndex=t.selectedIndexes[0],this._selectedIndexes=t.selectedIndexes,this._value=t.values[0],this._values=t.values),this._multiple||this.combobox||0!==t.selectedIndexes.length||(this._selectedIndex=this._options.length>0?0:-1),this.requestUpdate()}_onComboboxInputFocus(t){t.target.select()}_onComboboxInputInput(t){this._filterPattern=t.target.value,this._activeIndex=-1,this._toggleDropdown(!0)}_onComboboxInputClick(){this._toggleDropdown(!0)}_renderOptions(){return[]}_renderDescription(){if(!this._options[this._activeIndex])return q;const{description:t}=this._options[this._activeIndex];return t?L`<div class="description">${t}</div>`:q}_renderSelectFace(){return L`${q}`}_renderComboboxFace(){return L`${q}`}_renderDropdownControls(){return L`${q}`}_renderDropdown(){const t=Bt({dropdown:!0,multiple:this._multiple});return L`
|
|
1177
1178
|
<div class="${t}">
|
|
1178
1179
|
${"above"===this.position?this._renderDescription():q}
|
|
1179
1180
|
${this._renderOptions()} ${this._renderDropdownControls()}
|
|
@@ -1521,7 +1522,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1521
1522
|
:host([position='above']) .description {
|
|
1522
1523
|
border-width: 0 0 1px;
|
|
1523
1524
|
}
|
|
1524
|
-
`],os=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let rs=class extends ss{set selectedIndexes(t){this._selectedIndexes=t}get selectedIndexes(){return this._selectedIndexes}set value(t){const e=t.map((t=>String(t)));this._values=
|
|
1525
|
+
`],os=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let rs=class extends ss{set selectedIndexes(t){this._selectedIndexes=t}get selectedIndexes(){return this._selectedIndexes}set value(t){const e=Array.isArray(t)?t.map((t=>String(t))):[String(t)];this._values=[],this._selectedIndexes.forEach((t=>{this._options[t].selected=!1})),this._selectedIndexes=[],e.forEach((t=>{"number"==typeof this._valueOptionIndexMap[t]&&(this._selectedIndexes.push(this._valueOptionIndexMap[t]),this._options[this._valueOptionIndexMap[t]].selected=!0,this._values.push(t))})),this._selectedIndexes.length>0?this._requestedValueToSetLater=[]:this._requestedValueToSetLater=Array.isArray(t)?t:[t],this._setFormValue(),this._manageRequired()}get value(){return this._values}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()}constructor(){super(),this.defaultValue=[],this.required=!1,this.name=void 0,this._requestedValueToSetLater=[],this._multiple=!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 s=Array.from(t.entries()).map((t=>String(t[1])));this.updateComplete.then((()=>{this.value=s}))}_setDefaultValue(){if(Array.isArray(this.defaultValue)&&this.defaultValue.length>0){const t=this.defaultValue.map((t=>String(t)));this.value=t}}_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)}_onSlotChange(){super._onSlotChange(),this._requestedValueToSetLater.length>0&&this.options.forEach(((t,e)=>{this._requestedValueToSetLater.includes(t.value)&&(this._selectedIndexes.push(e),this._values.push(t.value),this._options[e].selected=!0,this._requestedValueToSetLater=this._requestedValueToSetLater.filter((e=>e!==t.value)))}))}_onOptionClick(t){const e=t.composedPath().find((t=>"matches"in t&&t.matches("li.option")));if(!e)return;const s=Number(e.dataset.index);this._options[s]&&(this._options[s].selected=!this._options[s].selected),this._selectedIndexes=[],this._values=[],this._options.forEach((t=>{t.selected&&(this._selectedIndexes.push(t.index),this._values.push(t.value))})),this._setFormValue(),this._manageRequired(),this._dispatchChangeEvent()}_onMultiAcceptClick(){this._toggleDropdown(!1)}_onMultiDeselectAllClick(){this._selectedIndexes=[],this._values=[],this._options=this._options.map((t=>({...t,selected:!1}))),this._manageRequired(),this._dispatchChangeEvent()}_onMultiSelectAllClick(){this._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(){switch(this._selectedIndexes.length){case 0:return L`<span class="select-face-badge no-item"
|
|
1525
1526
|
>No items selected</span
|
|
1526
1527
|
>`;case 1:return L`<span class="select-face-badge">1 item selected</span>`;default:return L`<span class="select-face-badge"
|
|
1527
1528
|
>${this._selectedIndexes.length} items selected</span
|
|
@@ -1660,7 +1661,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1660
1661
|
cy="8px"
|
|
1661
1662
|
r="7px"
|
|
1662
1663
|
></circle>
|
|
1663
|
-
</svg>`}};as.styles=ns,ls([dt({reflect:!0,attribute:"aria-label"})],as.prototype,"ariaLabel",void 0),ls([dt({reflect:!0,attribute:"aria-live"})],as.prototype,"ariaLive",void 0),ls([dt({reflect:!0})],as.prototype,"role",void 0),as=ls([at("vscode-progress-ring")],as);const
|
|
1664
|
+
</svg>`}};as.styles=ns,ls([dt({reflect:!0,attribute:"aria-label"})],as.prototype,"ariaLabel",void 0),ls([dt({reflect:!0,attribute:"aria-live"})],as.prototype,"ariaLive",void 0),ls([dt({reflect:!0})],as.prototype,"role",void 0),as=ls([at("vscode-progress-ring")],as);const hs=[mt,Gt,r`
|
|
1664
1665
|
:host(:invalid) .icon,
|
|
1665
1666
|
:host([invalid]) .icon {
|
|
1666
1667
|
background-color: var(--vscode-inputValidation-errorBackground);
|
|
@@ -1687,7 +1688,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1687
1688
|
outline: 1px solid var(--vscode-focusBorder);
|
|
1688
1689
|
outline-offset: -1px;
|
|
1689
1690
|
}
|
|
1690
|
-
`,Jt];var
|
|
1691
|
+
`,Jt];var cs=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let ds=class extends(Wt(Ht)){constructor(){super(),this.autofocus=!1,this.checked=!1,this.defaultChecked=!1,this.invalid=!1,this.name="",this.value="",this.disabled=!1,this.required=!1,this.role="radio",this.tabIndex=0,this._slottedText="",this.type="radio",this._handleClick=()=>{this.disabled||this.checked||(this._checkButton(),this._handleValueChange(),this._dispatchCustomEvent(),this.dispatchEvent(new Event("change",{bubbles:!0})))},this._handleKeyDown=t=>{this.disabled||"Enter"!==t.key&&" "!==t.key||(t.preventDefault()," "!==t.key||this.checked||(this.checked=!0,this._handleValueChange(),this._dispatchCustomEvent(),this.dispatchEvent(new Event("change",{bubbles:!0}))),"Enter"===t.key&&this._internals.form?.requestSubmit())},this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyDown),this.addEventListener("click",this._handleClick),this._handleValueChange()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("click",this._handleClick)}update(t){super.update(t),t.has("checked")&&this._handleValueChange(),t.has("required")&&this._handleValueChange()}get form(){return this._internals.form}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()}formResetCallback(){this._getRadios().forEach((t=>{t.checked=t.defaultChecked})),this.updateComplete.then((()=>{this._handleValueChange()}))}formStateRestoreCallback(t,e){this.value===t&&""!==t&&(this.checked=!0)}_dispatchCustomEvent(){this.dispatchEvent(new CustomEvent("vsc-change",{detail:{checked:this.checked,label:this.label,value:this.value},bubbles:!0,composed:!0}))}_getRadios(){const t=this.getRootNode({composed:!0});if(!t)return[];const e=t.querySelectorAll(`vscode-radio[name="${this.name}"]`);return Array.from(e)}_uncheckOthers(t){t.forEach((t=>{t!==this&&(t.checked=!1)}))}_checkButton(){const t=this._getRadios();this.checked=!0,t.forEach((t=>{t!==this&&(t.checked=!1)}))}setComponentValidity(t){t?this._internals.setValidity({}):this._internals.setValidity({valueMissing:!0},"Please select one of these options.",this._inputEl)}_setGroupValidity(t,e){this.updateComplete.then((()=>{t.forEach((t=>{t.setComponentValidity(e)}))}))}_setActualFormValue(){let t="";t=this.checked?this.value?this.value:"on":null,this._internals.setFormValue(t)}_handleValueChange(){const t=this._getRadios(),e=t.some((t=>t.required));if(this._setActualFormValue(),this.checked)this._uncheckOthers(t),this._setGroupValidity(t,!0);else{const s=!!t.find((t=>t.checked)),i=e&&!s;this._setGroupValidity(t,!i)}}render(){const t=Bt({icon:!0,checked:this.checked}),e=Bt({"label-inner":!0,"is-slot-empty":""===this._slottedText});return L`
|
|
1691
1692
|
<div class="wrapper">
|
|
1692
1693
|
<input
|
|
1693
1694
|
?autofocus=${this.autofocus}
|
|
@@ -1706,7 +1707,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1706
1707
|
</span>
|
|
1707
1708
|
</label>
|
|
1708
1709
|
</div>
|
|
1709
|
-
`}};ds.styles=
|
|
1710
|
+
`}};ds.styles=hs,ds.formAssociated=!0,ds.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},cs([dt({type:Boolean,reflect:!0})],ds.prototype,"autofocus",void 0),cs([dt({type:Boolean,reflect:!0})],ds.prototype,"checked",void 0),cs([dt({type:Boolean,reflect:!0,attribute:"default-checked"})],ds.prototype,"defaultChecked",void 0),cs([dt({type:Boolean,reflect:!0})],ds.prototype,"invalid",void 0),cs([dt({reflect:!0})],ds.prototype,"name",void 0),cs([dt()],ds.prototype,"value",void 0),cs([dt({type:Boolean,reflect:!0})],ds.prototype,"disabled",void 0),cs([dt({type:Boolean,reflect:!0})],ds.prototype,"required",void 0),cs([dt({reflect:!0})],ds.prototype,"role",void 0),cs([dt({type:Number,reflect:!0})],ds.prototype,"tabIndex",void 0),cs([ut()],ds.prototype,"_slottedText",void 0),cs([pt("#input")],ds.prototype,"_inputEl",void 0),cs([dt()],ds.prototype,"type",void 0),ds=cs([at("vscode-radio")],ds);var us=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let vs=class extends ss{set selectedIndex(t){this._selectedIndex=t,this._value=this._options[this._selectedIndex]?this._options[this._selectedIndex].value:"",this._labelText=this._options[this._selectedIndex]?this._options[this._selectedIndex].label:""}get selectedIndex(){return this._selectedIndex}set value(t){this._options[this._selectedIndex]&&(this._options[this._selectedIndex].selected=!1),this._selectedIndex=this._options.findIndex((e=>e.value===t)),this._selectedIndex>-1?(this._options[this._selectedIndex].selected=!0,this._labelText=this._options[this._selectedIndex].label,this._value=t,this._requestedValueToSetLater=""):(this._labelText="",this._value="",this._requestedValueToSetLater=t)}get value(){return this._options[this._selectedIndex]?this._options[this._selectedIndex]?.value??"":""}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()}updateInputValue(){if(!this.combobox)return;const t=this.renderRoot.querySelector(".combobox-input");t&&(t.value=this._options[this._selectedIndex]?this._options[this._selectedIndex].label:"")}constructor(){super(),this.defaultValue="",this.role="listbox",this.name=void 0,this.required=!1,this._labelText="",this._requestedValueToSetLater="",this._multiple=!1,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._manageRequired()}))}formResetCallback(){this.value=this.defaultValue}formStateRestoreCallback(t,e){this.updateComplete.then((()=>{this.value=t}))}get type(){return"select-one"}get form(){return this._internals.form}_onSlotChange(){if(super._onSlotChange(),this._requestedValueToSetLater){const t=this._options.findIndex((t=>t.value===this._requestedValueToSetLater));t>0&&(this._selectedIndex=t,this._requestedValueToSetLater="")}this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex]?.label??""),this._selectedIndex>-1&&this._options.length>0?this._internals.setFormValue(this._options[this._selectedIndex].value):this._internals.setFormValue(null)}_onArrowUpKeyDown(){super._onArrowUpKeyDown(),this._showDropdown||this._selectedIndex<=0||(this._filterPattern="",this._selectedIndex-=1,this._activeIndex=this._selectedIndex,this._labelText=this._options[this._selectedIndex].label,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onArrowDownKeyDown(){super._onArrowDownKeyDown(),this._showDropdown||this._selectedIndex>=this._options.length-1||(this._filterPattern="",this._selectedIndex+=1,this._activeIndex=this._selectedIndex,this._labelText=this._options[this._selectedIndex].label,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onEnterKeyDown(){super._onEnterKeyDown(),this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex].label),this.updateInputValue(),this._internals.setFormValue(this._value),this._manageRequired()}_onOptionClick(t){const e=t.composedPath().find((t=>t?.matches("li.option")));e&&!e.matches(".disabled")&&(this._selectedIndex=Number(e.dataset.index),this._value=this._options[this._selectedIndex].value,this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex].label),this._toggleDropdown(!1),this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_manageRequired(){const{value:t}=this;""===t&&this.required?this._internals.setValidity({valueMissing:!0},"Please select an item in the list.",this._face):this._internals.setValidity({})}_renderSelectFace(){return L`
|
|
1710
1711
|
<div
|
|
1711
1712
|
class="select-face face"
|
|
1712
1713
|
@click="${this._onFaceClick}"
|
|
@@ -1969,7 +1970,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1969
1970
|
cursor: ns-resize;
|
|
1970
1971
|
width: 100%;
|
|
1971
1972
|
}
|
|
1972
|
-
`];var ms,xs=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};const ys=t=>{if(!t)return{value:0,unit:"pixel"};let e,s;t.endsWith("%")?(e="percent",s=+t.substring(0,t.length-1)):t.endsWith("px")?(e="pixel",s=+t.substring(0,t.length-2)):(e="pixel",s=+t);return{unit:e,value:isNaN(s)?0:s}},ws=(t,e)=>0===e?0:Math.min(100,t/e*100),ks=(t,e)=>e*(t/100);let $s=ms=class extends gt{set split(t){this._split=t,this.resetHandlePosition()}get split(){return this._split}set handlePosition(t){this._rawHandlePosition=t,this._handlePositionPropChanged()}get handlePosition(){return this._rawHandlePosition}set fixedPane(t){this._fixedPane=t,this._fixedPanePropChanged()}get fixedPane(){return this._fixedPane}constructor(){super(),this._split="vertical",this.resetOnDblClick=!1,this.handleSize=4,this.initialHandlePosition="50%",this._fixedPane="none",this._handlePosition=0,this._isDragActive=!1,this._hover=!1,this._hide=!1,this._boundRect=new DOMRect,this._handleOffset=0,this._wrapperObserved=!1,this._fixedPaneSize=0,this._handleResize=t=>{const e=t[0].contentRect,{width:s,height:i}=e;this._boundRect=e;const o="vertical"===this.split?s:i;"start"===this.fixedPane&&(this._handlePosition=this._fixedPaneSize),"end"===this.fixedPane&&(this._handlePosition=o-this._fixedPaneSize)},this._handleMouseUp=t=>{this._isDragActive=!1,t.target!==this&&(this._hover=!1,this._hide=!0),window.removeEventListener("mouseup",this._handleMouseUp),window.removeEventListener("mousemove",this._handleMouseMove);const{width:e,height:s}=this._boundRect,i="vertical"===this.split?e:s,o=ws(this._handlePosition,i);this.dispatchEvent(new CustomEvent("vsc-split-layout-change",{detail:{position:this._handlePosition,positionInPercentage:o},composed:!0}))},this._handleMouseMove=t=>{const{clientX:e,clientY:s}=t,{left:i,top:o,height:r,width:n}=this._boundRect,l="vertical"===this.split,a=l?n:r,
|
|
1973
|
+
`];var ms,xs=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};const ys=t=>{if(!t)return{value:0,unit:"pixel"};let e,s;t.endsWith("%")?(e="percent",s=+t.substring(0,t.length-1)):t.endsWith("px")?(e="pixel",s=+t.substring(0,t.length-2)):(e="pixel",s=+t);return{unit:e,value:isNaN(s)?0:s}},ws=(t,e)=>0===e?0:Math.min(100,t/e*100),ks=(t,e)=>e*(t/100);let $s=ms=class extends gt{set split(t){this._split=t,this.resetHandlePosition()}get split(){return this._split}set handlePosition(t){this._rawHandlePosition=t,this._handlePositionPropChanged()}get handlePosition(){return this._rawHandlePosition}set fixedPane(t){this._fixedPane=t,this._fixedPanePropChanged()}get fixedPane(){return this._fixedPane}constructor(){super(),this._split="vertical",this.resetOnDblClick=!1,this.handleSize=4,this.initialHandlePosition="50%",this._fixedPane="none",this._handlePosition=0,this._isDragActive=!1,this._hover=!1,this._hide=!1,this._boundRect=new DOMRect,this._handleOffset=0,this._wrapperObserved=!1,this._fixedPaneSize=0,this._handleResize=t=>{const e=t[0].contentRect,{width:s,height:i}=e;this._boundRect=e;const o="vertical"===this.split?s:i;"start"===this.fixedPane&&(this._handlePosition=this._fixedPaneSize),"end"===this.fixedPane&&(this._handlePosition=o-this._fixedPaneSize)},this._handleMouseUp=t=>{this._isDragActive=!1,t.target!==this&&(this._hover=!1,this._hide=!0),window.removeEventListener("mouseup",this._handleMouseUp),window.removeEventListener("mousemove",this._handleMouseMove);const{width:e,height:s}=this._boundRect,i="vertical"===this.split?e:s,o=ws(this._handlePosition,i);this.dispatchEvent(new CustomEvent("vsc-split-layout-change",{detail:{position:this._handlePosition,positionInPercentage:o},composed:!0}))},this._handleMouseMove=t=>{const{clientX:e,clientY:s}=t,{left:i,top:o,height:r,width:n}=this._boundRect,l="vertical"===this.split,a=l?n:r,h=l?e-i:s-o;this._handlePosition=Math.max(0,Math.min(h-this._handleOffset+this.handleSize/2,a)),"start"===this.fixedPane&&(this._fixedPaneSize=this._handlePosition),"end"===this.fixedPane&&(this._fixedPaneSize=a-this._handlePosition)},this._resizeObserver=new ResizeObserver(this._handleResize)}resetHandlePosition(){if(!this._wrapperEl)return void(this._handlePosition=0);const{width:t,height:e}=this._wrapperEl.getBoundingClientRect(),s="vertical"===this.split?t:e,{value:i,unit:o}=ys(this.initialHandlePosition??"50%");this._handlePosition="percent"===o?ks(i,s):i}connectedCallback(){super.connectedCallback()}firstUpdated(t){"none"!==this.fixedPane&&(this._resizeObserver.observe(this._wrapperEl),this._wrapperObserved=!0),this._boundRect=this._wrapperEl.getBoundingClientRect();const{value:e,unit:s}=this.handlePosition?ys(this.handlePosition):ys(this.initialHandlePosition);this._setPosition(e,s),this._initFixedPane()}_handlePositionPropChanged(){if(this.handlePosition&&this._wrapperEl){this._boundRect=this._wrapperEl.getBoundingClientRect();const{value:t,unit:e}=ys(this.handlePosition);this._setPosition(t,e)}}_fixedPanePropChanged(){this._wrapperEl&&this._initFixedPane()}_initFixedPane(){if("none"===this.fixedPane)this._wrapperObserved&&(this._resizeObserver.unobserve(this._wrapperEl),this._wrapperObserved=!1);else{const{width:t,height:e}=this._boundRect,s="vertical"===this.split?t:e;this._fixedPaneSize="start"===this.fixedPane?this._handlePosition:s-this._handlePosition,this._wrapperObserved||(this._resizeObserver.observe(this._wrapperEl),this._wrapperObserved=!0)}}_setPosition(t,e){const{width:s,height:i}=this._boundRect,o="vertical"===this.split?s:i;this._handlePosition="percent"===e?ks(t,o):t}_handleMouseOver(){this._hover=!0,this._hide=!1}_handleMouseOut(t){1!==t.buttons&&(this._hover=!1,this._hide=!0)}_handleMouseDown(t){t.stopPropagation(),t.preventDefault(),this._boundRect=this._wrapperEl.getBoundingClientRect();const{left:e,top:s}=this._boundRect,{left:i,top:o}=this._handleEl.getBoundingClientRect(),r=t.clientX-e,n=t.clientY-s;"vertical"===this.split&&(this._handleOffset=r-(i-e)),"horizontal"===this.split&&(this._handleOffset=n-(o-s)),this._isDragActive=!0,window.addEventListener("mouseup",this._handleMouseUp),window.addEventListener("mousemove",this._handleMouseMove)}_handleDblClick(){this.resetOnDblClick&&this.resetHandlePosition()}_handleSlotChange(){[...this._nestedLayoutsAtStart,...this._nestedLayoutsAtEnd].forEach((t=>{t instanceof ms&&t.resetHandlePosition()}))}render(){const{width:t,height:e}=this._boundRect,s="vertical"===this.split?t:e,i="none"!==this.fixedPane?`${this._handlePosition}px`:`${ws(this._handlePosition,s)}%`;let o="";o="start"===this.fixedPane?`0 0 ${this._fixedPaneSize}px`:`1 1 ${ws(this._handlePosition,s)}%`;let r="";r="end"===this.fixedPane?`0 0 ${this._fixedPaneSize}px`:`1 1 ${ws(s-this._handlePosition,s)}%`;const n={left:"vertical"===this.split?i:"0",top:"vertical"===this.split?"0":i},l=this.handleSize??4;"vertical"===this.split&&(n.marginLeft=0-l/2+"px",n.width=`${l}px`),"horizontal"===this.split&&(n.height=`${l}px`,n.marginTop=0-l/2+"px");const a=At(n),h=Bt({"handle-overlay":!0,active:this._isDragActive,"split-vertical":"vertical"===this.split,"split-horizontal":"horizontal"===this.split}),c=Bt({handle:!0,hover:this._hover,hide:this._hide,"split-vertical":"vertical"===this.split,"split-horizontal":"horizontal"===this.split}),d={wrapper:!0,horizontal:"horizontal"===this.split};return L`
|
|
1973
1974
|
<div class="${Bt(d)}">
|
|
1974
1975
|
<div class="start" style="${At({flex:o})}">
|
|
1975
1976
|
<slot name="start" @slotchange=${this._handleSlotChange}></slot>
|
|
@@ -1977,9 +1978,9 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1977
1978
|
<div class="end" style="${At({flex:r})}">
|
|
1978
1979
|
<slot name="end" @slotchange=${this._handleSlotChange}></slot>
|
|
1979
1980
|
</div>
|
|
1980
|
-
<div class="${
|
|
1981
|
+
<div class="${h}"></div>
|
|
1981
1982
|
<div
|
|
1982
|
-
class="${
|
|
1983
|
+
class="${c}"
|
|
1983
1984
|
style="${a}"
|
|
1984
1985
|
@mouseover="${this._handleMouseOver}"
|
|
1985
1986
|
@mouseout="${this._handleMouseOut}"
|
|
@@ -2673,32 +2674,32 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2673
2674
|
data-index=${i}
|
|
2674
2675
|
class="action-icon"
|
|
2675
2676
|
@click=${this._handleActionClick}
|
|
2676
|
-
></vscode-icon>`;e.push(o)}})),e.length>0?L`<div class="actions">${e}</div>`:L`${q}`}_renderDecorations(t){const e=[];return t.decorations&&Array.isArray(t.decorations)&&t.decorations.forEach((t=>{const{appearance:s="text",visibleWhen:i="always",content:o="",color:r="",focusedColor:n="",hoverColor:l="",selectedColor:a=""}=t,
|
|
2677
|
+
></vscode-icon>`;e.push(o)}})),e.length>0?L`<div class="actions">${e}</div>`:L`${q}`}_renderDecorations(t){const e=[];return t.decorations&&Array.isArray(t.decorations)&&t.decorations.forEach((t=>{const{appearance:s="text",visibleWhen:i="always",content:o="",color:r="",focusedColor:n="",hoverColor:l="",selectedColor:a=""}=t,h=`visible-when-${i}`,c={};switch(r&&(c["--color"]=r),n&&(c["--focused-color"]=n),l&&(c["--hover-color"]=l),a&&(c["--selected-color"]=a),s){case"counter-badge":e.push(L`<vscode-badge
|
|
2677
2678
|
variant="counter"
|
|
2678
|
-
class=${["counter-badge",
|
|
2679
|
+
class=${["counter-badge",h].join(" ")}
|
|
2679
2680
|
part="counter-badge-decoration"
|
|
2680
2681
|
>${o}</vscode-badge
|
|
2681
2682
|
>`);break;case"filled-circle":e.push(L`<vscode-icon
|
|
2682
2683
|
name="circle-filled"
|
|
2683
2684
|
size="14"
|
|
2684
|
-
class=${["filled-circle",
|
|
2685
|
+
class=${["filled-circle",h].join(" ")}
|
|
2685
2686
|
part="filled-circle-decoration"
|
|
2686
|
-
style=${At(
|
|
2687
|
+
style=${At(c)}
|
|
2687
2688
|
></vscode-icon>`);break;case"text":e.push(L`<div
|
|
2688
|
-
class=${["decoration-text",
|
|
2689
|
+
class=${["decoration-text",h].join(" ")}
|
|
2689
2690
|
part="caption-decoration"
|
|
2690
|
-
style=${At(
|
|
2691
|
+
style=${At(c)}
|
|
2691
2692
|
>
|
|
2692
2693
|
${o}
|
|
2693
2694
|
</div>`)}})),e.length>0?L`<div class="decorations" part="decorations">
|
|
2694
2695
|
${e}
|
|
2695
|
-
</div>`:L`${q}`}_renderTreeItem(t,e){const{open:s=!1,label:i,description:o="",tooltip:r,selected:n=!1,focused:l=!1,subItems:a=[]}=t,{path:
|
|
2696
|
+
</div>`:L`${q}`}_renderTreeItem(t,e){const{open:s=!1,label:i,description:o="",tooltip:r,selected:n=!1,focused:l=!1,subItems:a=[]}=t,{path:h,itemType:c,hasFocusedItem:d=!1,hasSelectedItem:u=!1}=e,v=["contents"],p=s?["open"]:[],b=(h.length-1)*this.indent,f=this.arrows&&"leaf"===c?30+b:b,g=this._renderArrow(t),m=this._renderIcon(t),x=this.arrows?b+16:b+3,y=s&&"branch"===c?L`<ul
|
|
2696
2697
|
style=${At({"--indent-guide-pos":`${x}px`})}
|
|
2697
2698
|
class=${Bt({"has-active-item":d||u})}
|
|
2698
2699
|
>
|
|
2699
|
-
${this._renderTree(a,
|
|
2700
|
-
</ul>`:q,w=o?L`<span class="description" part="description">${o}</span>`:q,k=this._renderActions(t),$=this._renderDecorations(t);return p.push(
|
|
2701
|
-
<li data-path="${
|
|
2700
|
+
${this._renderTree(a,h)}
|
|
2701
|
+
</ul>`:q,w=o?L`<span class="description" part="description">${o}</span>`:q,k=this._renderActions(t),$=this._renderDecorations(t);return p.push(c),n&&v.push("selected"),l&&v.push("focused"),L`
|
|
2702
|
+
<li data-path="${h.join("/")}" class="${p.join(" ")}">
|
|
2702
2703
|
<div
|
|
2703
2704
|
class="${v.join(" ")}"
|
|
2704
2705
|
style="${At({paddingLeft:`${f+3}px`})}"
|
|
@@ -2713,10 +2714,10 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2713
2714
|
</div>
|
|
2714
2715
|
${y}
|
|
2715
2716
|
</li>
|
|
2716
|
-
`}_renderTree(t,e=[]){const s=[];return t?(t.forEach(((t,i)=>{const o=[...e,i],r=ei(t)?"branch":"leaf",{selected:n=!1,focused:l=!1,hasFocusedItem:a=!1,hasSelectedItem:
|
|
2717
|
+
`}_renderTree(t,e=[]){const s=[];return t?(t.forEach(((t,i)=>{const o=[...e,i],r=ei(t)?"branch":"leaf",{selected:n=!1,focused:l=!1,hasFocusedItem:a=!1,hasSelectedItem:h=!1}=t;n&&(this._selectedItem=t),l&&(this._focusedItem=t),s.push(this._renderTreeItem(t,{path:o,itemType:r,hasFocusedItem:a,hasSelectedItem:h}))})),s):q}_selectItem(t){this._selectedItem&&(this._selectedItem.selected=!1),this._focusedItem&&(this._focusedItem.focused=!1),this._selectedItem=t,t.selected=!0,this._focusedItem=t,t.focused=!0,this._selectedBranch&&(this._selectedBranch.hasSelectedItem=!1);let e=null;if(t.path?.length&&t.path.length>1&&(e=this._getItemByPath(t.path.slice(0,-1))),ei(t))this._selectedBranch=t,t.hasSelectedItem=!0,t.open=!t.open,t.open?(this._selectedBranch=t,t.hasSelectedItem=!0):e&&(this._selectedBranch=e,e.hasSelectedItem=!0);else if(t.path?.length&&t.path.length>1){const e=this._getItemByPath(t.path.slice(0,-1));e&&(this._selectedBranch=e,e.hasSelectedItem=!0)}else this._selectedBranch=t,t.hasSelectedItem=!0;this._emitSelectEvent(this._selectedItem,this._selectedItem.path.join("/")),this.requestUpdate()}_focusItem(t){this._focusedItem&&(this._focusedItem.focused=!1),this._focusedItem=t,t.focused=!0;const e=!!t?.subItems?.length;this._focusedBranch&&(this._focusedBranch.hasFocusedItem=!1);let s=null;t.path?.length&&t.path.length>1&&(s=this._getItemByPath(t.path.slice(0,-1))),e?t.open?(this._focusedBranch=t,t.hasFocusedItem=!0):!t.open&&s&&(this._focusedBranch=s,s.hasFocusedItem=!0):s&&(this._focusedBranch=s,s.hasFocusedItem=!0)}_closeSubTreeRecursively(t){t.forEach((t=>{t.open=!1,t.subItems&&t.subItems.length>0&&this._closeSubTreeRecursively(t.subItems)}))}_deselectItemsRecursively(t){t.forEach((t=>{t.selected&&(t.selected=!1),t.subItems&&t.subItems.length>0&&this._deselectItemsRecursively(t.subItems)}))}_emitSelectEvent(t,e){const{icons:s,label:i,open:o,value:r}=t,n={icons:s,itemType:ei(t)?"branch":"leaf",label:i,open:o||!1,value:r||i,path:e};this.dispatchEvent(new CustomEvent("vsc-select",{bubbles:!0,composed:!0,detail:n})),this.dispatchEvent(new CustomEvent("vsc-tree-select",{detail:n}))}_focusPrevItem(){if(!this._focusedItem)return void this._focusItem(this._data[0]);const{path:t}=this._focusedItem;if(t&&t?.length>0){const e=t[t.length-1],s=t.length>1;if(e>0){const s=[...t];s[s.length-1]=e-1;const i=this._getItemByPath(s);let o=i;if(i?.open&&i.subItems?.length){const{subItems:t}=i;o=t[t.length-1]}this._focusItem(o)}else if(s){const e=[...t];e.pop(),this._focusItem(this._getItemByPath(e))}}else this._focusItem(this._data[0])}_focusNextItem(){if(!this._focusedItem)return void this._focusItem(this._data[0]);const{path:t,open:e}=this._focusedItem;if(e&&Array.isArray(this._focusedItem.subItems)&&this._focusedItem.subItems.length>0)return void this._focusItem(this._focusedItem.subItems[0]);const s=[...t];s[s.length-1]+=1;let i=this._getItemByPath(s);i?this._focusItem(i):(s.pop(),s.length>0&&(s[s.length-1]+=1,i=this._getItemByPath(s),i&&this._focusItem(i)))}_handleClick(t){const e=t.composedPath().find((t=>t.tagName&&"LI"===t.tagName.toUpperCase()));if(e){const t=(e.dataset.path||"").split("/").map((t=>Number(t))),s=this._getItemByPath(t);this._selectItem(s)}else this._focusedItem&&(this._focusedItem.focused=!1),this._focusedItem=null}_handleComponentKeyDown(t){const e=t.key;[" ","ArrowDown","ArrowUp","Enter","Escape"].includes(t.key)&&(t.stopPropagation(),t.preventDefault()),"Escape"===e&&(this._focusedItem=null),"ArrowUp"===e&&this._focusPrevItem(),"ArrowDown"===e&&this._focusNextItem(),"Enter"!==e&&" "!==e||this._focusedItem&&this._selectItem(this._focusedItem)}render(){const t=Bt({multi:this.multiline,single:!this.multiline,wrapper:!0,"has-not-focused-item":!this._focusedItem,"selection-none":!this._selectedItem,"selection-single":null!==this._selectedItem});return L`
|
|
2717
2718
|
<div @click="${this._handleClick}" class="${t}">
|
|
2718
2719
|
<ul>
|
|
2719
2720
|
${this._renderTree(this._data)}
|
|
2720
2721
|
</ul>
|
|
2721
2722
|
</div>
|
|
2722
|
-
`}};si.styles=Zs,Qs([dt({type:Array,reflect:!1})],si.prototype,"data",null),Qs([dt({type:Number})],si.prototype,"indent",void 0),Qs([dt({type:Boolean,reflect:!0})],si.prototype,"arrows",void 0),Qs([dt({type:Boolean,reflect:!0})],si.prototype,"multiline",void 0),Qs([dt({type:Number,reflect:!0})],si.prototype,"tabindex",void 0),Qs([dt({type:Boolean,reflect:!0,attribute:"indent-guides"})],si.prototype,"indentGuides",void 0),Qs([ut()],si.prototype,"_selectedItem",void 0),Qs([ut()],si.prototype,"_focusedItem",void 0),Qs([ut()],si.prototype,"_selectedBranch",void 0),Qs([ut()],si.prototype,"_focusedBranch",void 0),si=Qs([at("vscode-tree")],si);export{wt as VscodeBadge,Nt as VscodeButton,Zt as VscodeCheckbox,ee as VscodeCheckboxGroup,oe as VscodeCollapsible,
|
|
2723
|
+
`}};si.styles=Zs,Qs([dt({type:Array,reflect:!1})],si.prototype,"data",null),Qs([dt({type:Number})],si.prototype,"indent",void 0),Qs([dt({type:Boolean,reflect:!0})],si.prototype,"arrows",void 0),Qs([dt({type:Boolean,reflect:!0})],si.prototype,"multiline",void 0),Qs([dt({type:Number,reflect:!0})],si.prototype,"tabindex",void 0),Qs([dt({type:Boolean,reflect:!0,attribute:"indent-guides"})],si.prototype,"indentGuides",void 0),Qs([ut()],si.prototype,"_selectedItem",void 0),Qs([ut()],si.prototype,"_focusedItem",void 0),Qs([ut()],si.prototype,"_selectedBranch",void 0),Qs([ut()],si.prototype,"_focusedBranch",void 0),si=Qs([at("vscode-tree")],si);export{wt as VscodeBadge,Nt as VscodeButton,Zt as VscodeCheckbox,ee as VscodeCheckboxGroup,oe as VscodeCollapsible,ce as VscodeContextMenu,le as VscodeContextMenuItem,ve as VscodeDivider,xe as VscodeFormContainer,ke as VscodeFormGroup,Ce as VscodeFormHelper,Ft as VscodeIcon,Ve as VscodeLabel,rs as VscodeMultiSelect,Ye as VscodeOption,as as VscodeProgressRing,ds as VscodeRadio,Oe as VscodeRadioGroup,fs as VscodeScrollable,vs as VscodeSingleSelect,$s as VscodeSplitLayout,Bs as VscodeTabHeader,As as VscodeTabPanel,Gs as VscodeTable,js as VscodeTableBody,Ms as VscodeTableCell,Ds as VscodeTableHeader,Rs as VscodeTableHeaderCell,qs as VscodeTableRow,Xs as VscodeTabs,Ie as VscodeTextarea,Pe as VscodeTextfield,si as VscodeTree};
|
|
@@ -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,UAAW,SAAQ,UAAU;IAA1C;;QACU,aAAQ,GAAG,OAAO,CAAC;IAM7B,CAAC;IAJC,0BAA0B;IAC1B,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF","sourcesContent":["import {LitElement} from 'lit';\n\nexport class VscElement extends LitElement {\n private _version = '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,UAAW,SAAQ,UAAU;IAA1C;;QACU,aAAQ,GAAG,OAAO,CAAC;IAM7B,CAAC;IAJC,0BAA0B;IAC1B,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF","sourcesContent":["import {LitElement} from 'lit';\n\nexport class VscElement extends LitElement {\n private _version = '1.9.1';\n\n /** VSC Element version */\n get version() {\n return this._version;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vscode-select-base.d.ts","sourceRoot":"","sources":["../../../src/includes/vscode-select/vscode-select-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,cAAc,EAAC,MAAM,KAAK,CAAC;AAGlD,OAAO,8BAA8B,CAAC;AACtC,OAAO,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,YAAY,CAAC;AAErE,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAE5C,UAAU,cAAc;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAMD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAC9C,gBAAgB;IAEhB,YAAY,SAAW;IAGvB,QAAQ,UAAS;IAEjB,IACI,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAa7B;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;OAEG;IAEH,OAAO,UAAS;IAEhB;;;;;;;;;OASG;IACH,IACI,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,mBAAmB,EAiBxE;IACD,IAAI,MAAM,IAAI,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,mBAAmB,CAEtE;IAGD,OAAO,UAAS;IAEhB;;;OAGG;IACH,IACI,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAEzB;IACD,IAAI,OAAO,IAAI,MAAM,EAAE,CAUtB;IAED;;OAEG;IAEH,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAW;IAEtC,gBAAgB;IAEhB,QAAQ,SAAK;IAMb,OAAO,CAAC,gBAAgB,CAAkB;IAE1C,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAQ5B,SAAS,CAAC,YAAY,SAAM;IAG5B,SAAS,CAAC,mBAAmB,SAAM;IAGnC,SAAS,CAAC,OAAO,EAAE,YAAY,CAAW;IAG1C,SAAS,KAAK,gBAAgB,IAAI,cAAc,EAAE,CAUjD;IAGD,SAAS,CAAC,cAAc,SAAM;IAG9B,SAAS,CAAC,cAAc,SAAM;IAG9B,SAAS,CAAC,gBAAgB,EAAE,MAAM,EAAE,CAAM;IAG1C,SAAS,CAAC,aAAa,UAAS;IAGhC,SAAS,CAAC,QAAQ,EAAE,cAAc,EAAE,CAAM;IAG1C,SAAS,CAAC,MAAM,SAAM;IAGtB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,CAAM;IAGjC,SAAS,CAAC,cAAc,SAAK;IAG7B,OAAO,CAAC,YAAY,CAAoB;IAExC,gBAAgB;IAChB,SAAS,CAAC,SAAS,UAAS;IAE5B;;;;OAIG;IACH,SAAS,CAAC,oBAAoB,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAM;IAE7D,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,iBAAiB,CAAiC;IAE1D,SAAS,KAAK,eAAe,IAAI,cAAc,EAAE,CAEhD;IAED,SAAS,CAAC,8BAA8B,IAAI,cAAc;cAsC1C,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBhE,SAAS,CAAC,oBAAoB,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"vscode-select-base.d.ts","sourceRoot":"","sources":["../../../src/includes/vscode-select/vscode-select-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,cAAc,EAAC,MAAM,KAAK,CAAC;AAGlD,OAAO,8BAA8B,CAAC;AACtC,OAAO,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,YAAY,CAAC;AAErE,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAE5C,UAAU,cAAc;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAMD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IAC9C,gBAAgB;IAEhB,YAAY,SAAW;IAGvB,QAAQ,UAAS;IAEjB,IACI,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAa7B;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;OAEG;IAEH,OAAO,UAAS;IAEhB;;;;;;;;;OASG;IACH,IACI,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,mBAAmB,EAiBxE;IACD,IAAI,MAAM,IAAI,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,mBAAmB,CAEtE;IAGD,OAAO,UAAS;IAEhB;;;OAGG;IACH,IACI,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAEzB;IACD,IAAI,OAAO,IAAI,MAAM,EAAE,CAUtB;IAED;;OAEG;IAEH,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAW;IAEtC,gBAAgB;IAEhB,QAAQ,SAAK;IAMb,OAAO,CAAC,gBAAgB,CAAkB;IAE1C,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAQ5B,SAAS,CAAC,YAAY,SAAM;IAG5B,SAAS,CAAC,mBAAmB,SAAM;IAGnC,SAAS,CAAC,OAAO,EAAE,YAAY,CAAW;IAG1C,SAAS,KAAK,gBAAgB,IAAI,cAAc,EAAE,CAUjD;IAGD,SAAS,CAAC,cAAc,SAAM;IAG9B,SAAS,CAAC,cAAc,SAAM;IAG9B,SAAS,CAAC,gBAAgB,EAAE,MAAM,EAAE,CAAM;IAG1C,SAAS,CAAC,aAAa,UAAS;IAGhC,SAAS,CAAC,QAAQ,EAAE,cAAc,EAAE,CAAM;IAG1C,SAAS,CAAC,MAAM,SAAM;IAGtB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,CAAM;IAGjC,SAAS,CAAC,cAAc,SAAK;IAG7B,OAAO,CAAC,YAAY,CAAoB;IAExC,gBAAgB;IAChB,SAAS,CAAC,SAAS,UAAS;IAE5B;;;;OAIG;IACH,SAAS,CAAC,oBAAoB,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAM;IAE7D,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,iBAAiB,CAAiC;IAE1D,SAAS,KAAK,eAAe,IAAI,cAAc,EAAE,CAEhD;IAED,SAAS,CAAC,8BAA8B,IAAI,cAAc;cAsC1C,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBhE,SAAS,CAAC,oBAAoB,IAAI,IAAI;IA0BtC,SAAS,CAAC,YAAY,IAAI,IAAI;IAQ9B,OAAO,CAAC,eAAe,CAQrB;IAEF,OAAO,CAAC,YAAY,CAGlB;IAEF,OAAO,CAAC,uBAAuB;IAS/B,SAAS,CAAC,sBAAsB,IAAI,IAAI;IAIxC,SAAS,CAAC,wBAAwB,CAAC,EAAE,EAAE,aAAa,GAAG,IAAI;IAM3D,SAAS,CAAC,kBAAkB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI;IAgBlD,SAAS,CAAC,eAAe,IAAI,IAAI;IAiCjC,OAAO,CAAC,eAAe;IAqBvB,OAAO,CAAC,yBAAyB;YAInB,0BAA0B;IAiCxC,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAWnC,SAAS,CAAC,mBAAmB,IAAI,IAAI;IAWrC,OAAO,CAAC,mBAAmB;IA2B3B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,gBAAgB;IAIxB,SAAS,CAAC,aAAa,IAAI,IAAI;IAqB/B,SAAS,CAAC,qBAAqB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI;IAIrD,SAAS,CAAC,qBAAqB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI;IAMrD,SAAS,CAAC,qBAAqB,IAAI,IAAI;IAIvC,SAAS,CAAC,cAAc,IAAI,cAAc,GAAG,cAAc,EAAE;IAI7D,OAAO,CAAC,kBAAkB;IAY1B,SAAS,CAAC,iBAAiB,IAAI,cAAc;IAI7C,SAAS,CAAC,mBAAmB,IAAI,cAAc;IAI/C,SAAS,CAAC,uBAAuB,IAAI,cAAc;IAInD,OAAO,CAAC,eAAe;IAevB,MAAM,IAAI,cAAc;CAOzB"}
|
|
@@ -161,7 +161,7 @@ export class VscodeSelectBase extends VscElement {
|
|
|
161
161
|
this._valueOptionIndexMap = {};
|
|
162
162
|
optionElements.forEach((el) => {
|
|
163
163
|
const { innerText, description, disabled } = el;
|
|
164
|
-
const value =
|
|
164
|
+
const value = typeof el.value === 'string' ? el.value : innerText.trim();
|
|
165
165
|
const selected = el.selected ?? false;
|
|
166
166
|
const op = {
|
|
167
167
|
label: innerText.trim(),
|
|
@@ -218,6 +218,7 @@ export class VscodeSelectBase extends VscElement {
|
|
|
218
218
|
}));
|
|
219
219
|
}
|
|
220
220
|
this.dispatchEvent(new Event('change'));
|
|
221
|
+
this.dispatchEvent(new Event('input'));
|
|
221
222
|
}
|
|
222
223
|
_onFaceClick() {
|
|
223
224
|
this._toggleDropdown(!this._showDropdown);
|
|
@@ -377,7 +378,7 @@ export class VscodeSelectBase extends VscElement {
|
|
|
377
378
|
if (!this._multiple &&
|
|
378
379
|
!this.combobox &&
|
|
379
380
|
stat.selectedIndexes.length === 0) {
|
|
380
|
-
this._selectedIndex = 0;
|
|
381
|
+
this._selectedIndex = this._options.length > 0 ? 0 : -1;
|
|
381
382
|
}
|
|
382
383
|
this.requestUpdate();
|
|
383
384
|
}
|