@vscode-elements/elements 1.11.0 → 1.11.1-pre.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 +47 -65
- package/dist/bundled.js +102 -98
- package/dist/includes/VscElement.d.ts.map +1 -1
- package/dist/includes/VscElement.js +1 -1
- package/dist/includes/VscElement.js.map +1 -1
- package/dist/vscode-icon/vscode-icon.d.ts +2 -1
- package/dist/vscode-icon/vscode-icon.d.ts.map +1 -1
- package/dist/vscode-icon/vscode-icon.js +14 -8
- package/dist/vscode-icon/vscode-icon.js.map +1 -1
- package/dist/vscode-icon/vscode-icon.styles.d.ts.map +1 -1
- package/dist/vscode-icon/vscode-icon.styles.js +4 -0
- package/dist/vscode-icon/vscode-icon.styles.js.map +1 -1
- package/dist/vscode-scrollable/vscode-scrollable.d.ts +3 -4
- package/dist/vscode-scrollable/vscode-scrollable.d.ts.map +1 -1
- package/dist/vscode-scrollable/vscode-scrollable.js +19 -28
- package/dist/vscode-scrollable/vscode-scrollable.js.map +1 -1
- package/dist/vscode-scrollable/vscode-scrollable.styles.d.ts.map +1 -1
- package/dist/vscode-scrollable/vscode-scrollable.styles.js +5 -1
- package/dist/vscode-scrollable/vscode-scrollable.styles.js.map +1 -1
- package/dist/vscode-textarea/vscode-textarea.d.ts.map +1 -1
- package/dist/vscode-textarea/vscode-textarea.js +2 -3
- package/dist/vscode-textarea/vscode-textarea.js.map +1 -1
- package/package.json +2 -2
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],M="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,N=/>/g,D=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,R=/"/g,T=/^(?: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=F;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===F?"!--"===a[1]?n=P:void 0!==a[1]?n=N:void 0!==a[2]?(T.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=D):void 0!==a[3]&&(n=D):n===D?">"===a[0]?(n=o??F,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]?R:V):n===R||n===V?n=D:n===P||n===N?n=F:(n=D,o=void 0);const d=n===D&&t[e+1].startsWith("/>")?" ":"";r+=n===F?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(T.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.11.0"}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: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)}$`,z="?"+B,S=`<${z}>`,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],M="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,N=/>/g,D=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),T=/'/g,V=/"/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=F;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===F?"!--"===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??F,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]?V:T):n===V||n===T?n=D:n===P||n===N?n=F:(n=D,o=void 0);const d=n===D&&t[e+1].startsWith("/>")?" ":"";r+=n===F?s+S: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===z)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 Z(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=Z(t,o._$AS(t,e.values),o,i)),e}class Y{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 X(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 X=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=Z(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 Y(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=Z(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=Z(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=Z(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){Z(this,t)}}const ot={M:C,P:B,A:z,C:1,L:G,R:Y,D:I,V:Z,I:X,H:Q,N:et,U:st,B:tt,F:it},rt=k.litHtmlPolyfillSupport;rt?.(J,X),(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 X(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(s,i,o)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof i?s:o??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return vt(0,0,{get(){let s=t.call(this);return void 0===s&&(s=r(this),(null!==s||this.hasUpdated)&&e.call(this,s)),s}})}return vt(0,0,{get(){return r(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.11.1-pre.1"}get version(){return this._version}}var mt=r`
|
|
2
2
|
:host([hidden]) {
|
|
3
3
|
display: none;
|
|
4
4
|
}
|
|
@@ -44,14 +44,18 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
44
44
|
line-height: 16px;
|
|
45
45
|
padding: 0 4px;
|
|
46
46
|
}
|
|
47
|
-
`];var yt=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 wt=class extends gt{constructor(){super(...arguments),this.variant="default"}render(){return L` <slot></slot> `}};wt.styles=xt,yt([dt({reflect:!0})],wt.prototype,"variant",void 0),wt=yt([at("vscode-badge")],wt);const kt=1,$t=2,_t=t=>(...e)=>({_$litDirective$:t,values:e});class Ct{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this.t=t,this._$AM=e,this.i=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Bt=_t(class extends Ct{constructor(t){if(super(t),t.type!==kt||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const s=t.element.classList;for(const t of this.st)t in e||(s.remove(t),this.st.delete(t));for(const t in e){const i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(s.add(t),this.st.add(t)):(s.remove(t),this.st.delete(t)))}return U}}),
|
|
47
|
+
`];var yt=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 wt=class extends gt{constructor(){super(...arguments),this.variant="default"}render(){return L` <slot></slot> `}};wt.styles=xt,yt([dt({reflect:!0})],wt.prototype,"variant",void 0),wt=yt([at("vscode-badge")],wt);const kt=1,$t=2,_t=t=>(...e)=>({_$litDirective$:t,values:e});class Ct{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this.t=t,this._$AM=e,this.i=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Bt=_t(class extends Ct{constructor(t){if(super(t),t.type!==kt||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const s=t.element.classList;for(const t of this.st)t in e||(s.remove(t),this.st.delete(t));for(const t in e){const i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(s.add(t),this.st.add(t)):(s.remove(t),this.st.delete(t)))}return U}}),zt=t=>t??q,St=[mt,r`
|
|
48
48
|
:host {
|
|
49
49
|
color: var(--vscode-icon-foreground);
|
|
50
50
|
display: inline-block;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.codicon[class*='codicon-'] {
|
|
54
|
+
animation-duration: var(--spin-duration) !important;
|
|
54
55
|
display: block;
|
|
56
|
+
font-size: var(--size);
|
|
57
|
+
height: var(--size);
|
|
58
|
+
width: var(--size);
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
.icon,
|
|
@@ -98,9 +102,8 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
98
102
|
animation-timing-function: linear;
|
|
99
103
|
animation-iteration-count: infinite;
|
|
100
104
|
}
|
|
101
|
-
`];var
|
|
105
|
+
`];var At,Ot=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 Et=At=class extends gt{constructor(){super(...arguments),this.label="",this.name="",this.size=16,this.spin=!1,this.spinDuration=1.5,this.actionIcon=!1,this._onButtonClick=t=>{this.dispatchEvent(new CustomEvent("vsc-click",{detail:{originalEvent:t}}))}}connectedCallback(){super.connectedCallback();const{href:t,nonce:e}=this._getStylesheetConfig();At.stylesheetHref=t,At.nonce=e}willUpdate(t){t.has("size")&&this.style.setProperty("--size",`${this.size}px`),t.has("spinDuration")&&this.style.setProperty("--spin-duration",`${this.spinDuration}s`)}_getStylesheetConfig(){const t=document.getElementById("vscode-codicon-stylesheet"),e=t?.getAttribute("href")||void 0,s=t?.nonce||void 0;if(!t){let t="[VSCode Elements] To use the Icon component, the codicons.css file must be included in the page with the id `vscode-codicon-stylesheet`! ";t+="See https://vscode-elements.github.io/components/icon/ for more details.",console.warn(t)}return{nonce:s,href:e}}render(){const{stylesheetHref:t,nonce:e}=At,s=L`<span
|
|
102
106
|
class=${Bt({codicon:!0,["codicon-"+this.name]:!0,spin:this.spin})}
|
|
103
|
-
style=${At({animationDuration:String(this.spinDuration)+"s",fontSize:this.size+"px",height:this.size+"px",width:this.size+"px"})}
|
|
104
107
|
></span>`,i=this.actionIcon?L` <button
|
|
105
108
|
class="button"
|
|
106
109
|
@click=${this._onButtonClick}
|
|
@@ -112,11 +115,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
112
115
|
>`;return L`
|
|
113
116
|
<link
|
|
114
117
|
rel="stylesheet"
|
|
115
|
-
href=${
|
|
116
|
-
nonce=${
|
|
118
|
+
href=${zt(t)}
|
|
119
|
+
nonce=${zt(e)}
|
|
117
120
|
/>
|
|
118
121
|
${i}
|
|
119
|
-
`}};
|
|
122
|
+
`}};Et.styles=St,Et.stylesheetHref="",Et.nonce="",Ot([dt()],Et.prototype,"label",void 0),Ot([dt({type:String})],Et.prototype,"name",void 0),Ot([dt({type:Number})],Et.prototype,"size",void 0),Ot([dt({type:Boolean,reflect:!0})],Et.prototype,"spin",void 0),Ot([dt({type:Number,attribute:"spin-duration"})],Et.prototype,"spinDuration",void 0),Ot([dt({type:Boolean,reflect:!0,attribute:"action-icon"})],Et.prototype,"actionIcon",void 0),Et=At=Ot([at("vscode-icon")],Et);const jt=[mt,r`
|
|
120
123
|
:host {
|
|
121
124
|
background-color: var(--vscode-button-background);
|
|
122
125
|
border-color: var(
|
|
@@ -234,15 +237,15 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
234
237
|
display: block;
|
|
235
238
|
margin-left: 3px;
|
|
236
239
|
}
|
|
237
|
-
`];var
|
|
240
|
+
`];var It=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 Mt=class extends gt{get form(){return this._internals.form}constructor(){super(),this.autofocus=!1,this.tabIndex=0,this.secondary=!1,this.role="button",this.disabled=!1,this.icon="",this.iconSpin=!1,this.iconAfter="",this.iconAfterSpin=!1,this.focused=!1,this.name=void 0,this.type="button",this.value="",this._prevTabindex=0,this._handleFocus=()=>{this.focused=!0},this._handleBlur=()=>{this.focused=!1},this.addEventListener("keydown",this._handleKeyDown.bind(this)),this.addEventListener("click",this._handleClick.bind(this)),this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.autofocus&&(this.tabIndex<0&&(this.tabIndex=0),this.updateComplete.then((()=>{this.focus(),this.requestUpdate()}))),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}update(t){super.update(t),t.has("value")&&this._internals.setFormValue(this.value),t.has("disabled")&&(this.disabled?(this._prevTabindex=this.tabIndex,this.tabIndex=-1):this.tabIndex=this._prevTabindex)}_executeAction(){"submit"===this.type&&this._internals.form&&this._internals.form.requestSubmit(),"reset"===this.type&&this._internals.form&&this._internals.form.reset()}_handleKeyDown(t){if(("Enter"===t.key||" "===t.key)&&!this.hasAttribute("disabled")){this.dispatchEvent(new CustomEvent("vsc-click",{detail:{originalEvent:new MouseEvent("click")}}));const t=new MouseEvent("click",{bubbles:!0,cancelable:!0});t.synthetic=!0,this.dispatchEvent(t),this._executeAction()}}_handleClick(t){t.synthetic||this.hasAttribute("disabled")||(this.dispatchEvent(new CustomEvent("vsc-click",{detail:{originalEvent:t}})),this._executeAction())}render(){const t=""!==this.icon,e=""!==this.iconAfter,s={wrapper:!0,"has-icon-before":t,"has-icon-after":e},i=t?L`<vscode-icon
|
|
238
241
|
name=${this.icon}
|
|
239
242
|
?spin=${this.iconSpin}
|
|
240
|
-
spin-duration=${
|
|
243
|
+
spin-duration=${zt(this.iconSpinDuration)}
|
|
241
244
|
class="icon"
|
|
242
245
|
></vscode-icon>`:q,o=e?L`<vscode-icon
|
|
243
246
|
name=${this.iconAfter}
|
|
244
247
|
?spin=${this.iconAfterSpin}
|
|
245
|
-
spin-duration=${
|
|
248
|
+
spin-duration=${zt(this.iconAfterSpinDuration)}
|
|
246
249
|
class="icon-after"
|
|
247
250
|
></vscode-icon>`:q;return L`
|
|
248
251
|
<span class=${Bt(s)}>
|
|
@@ -250,7 +253,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
250
253
|
<slot></slot>
|
|
251
254
|
${o}
|
|
252
255
|
</span>
|
|
253
|
-
`}};
|
|
256
|
+
`}};Mt.styles=jt,Mt.formAssociated=!0,It([dt({type:Boolean,reflect:!0})],Mt.prototype,"autofocus",void 0),It([dt({type:Number,reflect:!0})],Mt.prototype,"tabIndex",void 0),It([dt({type:Boolean,reflect:!0})],Mt.prototype,"secondary",void 0),It([dt({reflect:!0})],Mt.prototype,"role",void 0),It([dt({type:Boolean,reflect:!0})],Mt.prototype,"disabled",void 0),It([dt()],Mt.prototype,"icon",void 0),It([dt({type:Boolean,reflect:!0,attribute:"icon-spin"})],Mt.prototype,"iconSpin",void 0),It([dt({type:Number,reflect:!0,attribute:"icon-spin-duration"})],Mt.prototype,"iconSpinDuration",void 0),It([dt({attribute:"icon-after"})],Mt.prototype,"iconAfter",void 0),It([dt({type:Boolean,reflect:!0,attribute:"icon-after-spin"})],Mt.prototype,"iconAfterSpin",void 0),It([dt({type:Number,reflect:!0,attribute:"icon-after-spin-duration"})],Mt.prototype,"iconAfterSpinDuration",void 0),It([dt({type:Boolean,reflect:!0})],Mt.prototype,"focused",void 0),It([dt({type:String,reflect:!0})],Mt.prototype,"name",void 0),It([dt({reflect:!0})],Mt.prototype,"type",void 0),It([dt()],Mt.prototype,"value",void 0),Mt=It([at("vscode-button")],Mt);const Ft="__vscode-webview-elements_custom-properties__";let Pt;const Nt=()=>{Dt(Tt())},Dt=t=>{const e=document.getElementById(Ft);if(e)e.innerHTML=t;else{const e=document.createElement("style");e.setAttribute("id",Ft),e.innerHTML=t,document.querySelector("head")?.appendChild(e)}},Tt=()=>{const t=document.documentElement.style.getPropertyValue("--vscode-foreground");let e="";var s,i;return t?/rgba\([0-9, .]+\)/g.test(t)?e=t:(s=t.trim(),i=.9,e=`rgba(${parseInt(s.substring(1,3),16)}, ${parseInt(s.substring(3,5),16)}, ${parseInt(s.substring(5,7),16)}, ${i})`):e="rgba(0, 0, 0, 0.9)",`:root{--vsc-foreground-translucent: ${e};}`};function Vt(){Pt||(Pt=new MutationObserver(Nt),Pt.observe(document.documentElement,{attributes:!0,attributeFilter:["style"]})),Dt(Tt())}var Rt=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};class Lt extends gt{constructor(){super(),this.focused=!1,this._prevTabindex=0,this._handleFocus=()=>{this.focused=!0},this._handleBlur=()=>{this.focused=!1},Vt()}connectedCallback(){super.connectedCallback(),this.addEventListener("focus",this._handleFocus),this.addEventListener("blur",this._handleBlur)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this._handleFocus),this.removeEventListener("blur",this._handleBlur)}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),"disabled"===t&&this.hasAttribute("disabled")?(this._prevTabindex=this.tabIndex,this.tabIndex=-1):"disabled"!==t||this.hasAttribute("disabled")||(this.tabIndex=this._prevTabindex)}}Rt([dt({type:Boolean,reflect:!0})],Lt.prototype,"focused",void 0);var Ut=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 qt=t=>{class e extends t{constructor(){super(...arguments),this._label="",this._slottedText=""}set label(t){this._label=t,""===this._slottedText&&this.setAttribute("aria-label",t)}get label(){return this._label}_handleSlotChange(){this._slottedText=this.textContent?this.textContent.trim():"",""!==this._slottedText&&this.setAttribute("aria-label",this._slottedText)}_renderLabelAttribute(){return""===this._slottedText?L`<span class="label-attr">${this._label}</span>`:L`${q}`}}return Ut([dt()],e.prototype,"label",null),e};var Ht=[r`
|
|
254
257
|
:host {
|
|
255
258
|
color: var(--vsc-foreground-translucent);
|
|
256
259
|
display: inline-block;
|
|
@@ -338,7 +341,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
338
341
|
:host([disabled]) .label {
|
|
339
342
|
cursor: default;
|
|
340
343
|
}
|
|
341
|
-
`],
|
|
344
|
+
`],Kt=r`
|
|
342
345
|
::slotted(*) {
|
|
343
346
|
margin: 0;
|
|
344
347
|
}
|
|
@@ -356,7 +359,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
356
359
|
::slotted(.error) {
|
|
357
360
|
color: var(--vscode-errorForeground);
|
|
358
361
|
}
|
|
359
|
-
`;const
|
|
362
|
+
`;const Wt=[mt,Ht,r`
|
|
360
363
|
:host(:invalid) .icon,
|
|
361
364
|
:host([invalid]) .icon {
|
|
362
365
|
background-color: var(--vscode-inputValidation-errorBackground);
|
|
@@ -378,7 +381,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
378
381
|
outline: 1px solid var(--vscode-focusBorder);
|
|
379
382
|
outline-offset: -1px;
|
|
380
383
|
}
|
|
381
|
-
`,
|
|
384
|
+
`,Kt];var Gt=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 Jt=class extends(qt(Lt)){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
385
|
width="16"
|
|
383
386
|
height="16"
|
|
384
387
|
viewBox="0 0 16 16"
|
|
@@ -409,7 +412,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
409
412
|
</span>
|
|
410
413
|
</label>
|
|
411
414
|
</div>
|
|
412
|
-
`}};
|
|
415
|
+
`}};Jt.styles=Wt,Jt.formAssociated=!0,Jt.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},Gt([dt({type:Boolean,reflect:!0})],Jt.prototype,"autofocus",void 0),Gt([dt({type:Boolean,reflect:!0})],Jt.prototype,"checked",null),Gt([dt({type:Boolean,reflect:!0,attribute:"default-checked"})],Jt.prototype,"defaultChecked",void 0),Gt([dt({type:Boolean,reflect:!0})],Jt.prototype,"invalid",void 0),Gt([dt({reflect:!0})],Jt.prototype,"name",void 0),Gt([dt({reflect:!0})],Jt.prototype,"role",void 0),Gt([dt()],Jt.prototype,"value",void 0),Gt([dt({type:Boolean,reflect:!0})],Jt.prototype,"disabled",void 0),Gt([dt({type:Boolean,reflect:!0})],Jt.prototype,"indeterminate",void 0),Gt([dt({type:Boolean,reflect:!0})],Jt.prototype,"required",null),Gt([dt()],Jt.prototype,"type",void 0),Gt([pt("#input")],Jt.prototype,"_inputEl",void 0),Jt=Gt([at("vscode-checkbox")],Jt);const Zt=[mt,r`
|
|
413
416
|
:host {
|
|
414
417
|
display: block;
|
|
415
418
|
}
|
|
@@ -439,11 +442,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
439
442
|
:host([variant='vertical']) ::slotted(vscode-checkbox:last-child) {
|
|
440
443
|
margin-bottom: 0;
|
|
441
444
|
}
|
|
442
|
-
`,
|
|
445
|
+
`,Kt];var Yt=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 Xt=class extends gt{constructor(){super(...arguments),this.role="group",this.variant="horizontal"}render(){return L`
|
|
443
446
|
<div class="wrapper">
|
|
444
447
|
<slot></slot>
|
|
445
448
|
</div>
|
|
446
|
-
`}};
|
|
449
|
+
`}};Xt.styles=Zt,Yt([dt({reflect:!0})],Xt.prototype,"role",void 0),Yt([dt({reflect:!0})],Xt.prototype,"variant",void 0),Xt=Yt([at("vscode-checkbox-group")],Xt);const Qt=[mt,r`
|
|
447
450
|
.collapsible {
|
|
448
451
|
background-color: var(--vscode-sideBar-background);
|
|
449
452
|
}
|
|
@@ -532,7 +535,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
532
535
|
.collapsible.open .collapsible-body {
|
|
533
536
|
display: block;
|
|
534
537
|
}
|
|
535
|
-
`];var
|
|
538
|
+
`];var te=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 ee=class extends gt{constructor(){super(...arguments),this.title="",this.description="",this.open=!1}_emitToggleEvent(){this.dispatchEvent(new CustomEvent("vsc-collapsible-toggle",{detail:{open:this.open}}))}_onHeaderClick(){this.open=!this.open,this._emitToggleEvent()}_onHeaderKeyDown(t){"Enter"===t.key&&(this.open=!this.open,this._emitToggleEvent())}render(){const t=Bt({collapsible:!0,open:this.open}),e=L`<svg
|
|
536
539
|
width="16"
|
|
537
540
|
height="16"
|
|
538
541
|
viewBox="0 0 16 16"
|
|
@@ -565,7 +568,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
565
568
|
<slot></slot>
|
|
566
569
|
</div>
|
|
567
570
|
</div>
|
|
568
|
-
`}};
|
|
571
|
+
`}};ee.styles=Qt,te([dt({type:String})],ee.prototype,"title",void 0),te([dt()],ee.prototype,"description",void 0),te([dt({type:Boolean,reflect:!0})],ee.prototype,"open",void 0),ee=te([at("vscode-collapsible")],ee);const se=[mt,r`
|
|
569
572
|
:host {
|
|
570
573
|
display: block;
|
|
571
574
|
font-family: var(--vscode-font-family);
|
|
@@ -637,7 +640,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
637
640
|
padding: 0 22px;
|
|
638
641
|
text-align: right;
|
|
639
642
|
}
|
|
640
|
-
`];var
|
|
643
|
+
`];var ie=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 oe=class extends gt{constructor(){super(...arguments),this.label="",this.keybinding="",this.value="",this.separator=!1,this.tabindex=0}onItemClick(){this.dispatchEvent(new CustomEvent("vsc-click",{detail:{label:this.label,keybinding:this.keybinding,value:this.value||this.label,separator:this.separator,tabindex:this.tabindex},bubbles:!0,composed:!0}))}render(){return L`
|
|
641
644
|
${this.separator?L`
|
|
642
645
|
<div class="context-menu-item separator">
|
|
643
646
|
<span class="ruler"></span>
|
|
@@ -650,7 +653,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
650
653
|
</a>
|
|
651
654
|
</div>
|
|
652
655
|
`}
|
|
653
|
-
`}};
|
|
656
|
+
`}};oe.styles=se,ie([dt({type:String})],oe.prototype,"label",void 0),ie([dt({type:String})],oe.prototype,"keybinding",void 0),ie([dt({type:String})],oe.prototype,"value",void 0),ie([dt({type:Boolean,reflect:!0})],oe.prototype,"separator",void 0),ie([dt({type:Number})],oe.prototype,"tabindex",void 0),oe=ie([at("vscode-context-menu-item")],oe);const re=[mt,r`
|
|
654
657
|
:host {
|
|
655
658
|
display: block;
|
|
656
659
|
font-family: var(--vscode-font-family);
|
|
@@ -675,7 +678,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
675
678
|
.context-menu:focus {
|
|
676
679
|
outline: 0;
|
|
677
680
|
}
|
|
678
|
-
`];var
|
|
681
|
+
`];var ne=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 le=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(){return this._show?L`
|
|
679
682
|
<div class="context-menu" tabindex="0">
|
|
680
683
|
${this.data?this.data.map((({label:t="",keybinding:e="",value:s="",separator:i=!1,tabindex:o=0},r)=>L`
|
|
681
684
|
<vscode-context-menu-item
|
|
@@ -691,7 +694,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
691
694
|
></vscode-context-menu-item>
|
|
692
695
|
`)):L`<slot></slot>`}
|
|
693
696
|
</div>
|
|
694
|
-
`:L`${q}`}};
|
|
697
|
+
`:L`${q}`}};le.styles=re,ne([dt({type:Array,attribute:!1})],le.prototype,"data",null),ne([dt({type:Boolean,reflect:!0,attribute:"prevent-close"})],le.prototype,"preventClose",void 0),ne([dt({type:Boolean,reflect:!0})],le.prototype,"show",null),ne([dt({type:Number,reflect:!0})],le.prototype,"tabIndex",void 0),ne([ut()],le.prototype,"_selectedClickableItemIndex",void 0),ne([ut()],le.prototype,"_show",void 0),ne([pt(".context-menu")],le.prototype,"_wrapperEl",void 0),le=ne([at("vscode-context-menu")],le);const ae=[mt,r`
|
|
695
698
|
:host {
|
|
696
699
|
background-color: var(--vscode-foreground);
|
|
697
700
|
display: block;
|
|
@@ -700,16 +703,16 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
700
703
|
margin-top: 10px;
|
|
701
704
|
opacity: 0.4;
|
|
702
705
|
}
|
|
703
|
-
`];var
|
|
706
|
+
`];var ce=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 he=class extends gt{constructor(){super(...arguments),this.role="separator"}render(){return L``}};he.styles=ae,ce([dt({reflect:!0})],he.prototype,"role",void 0),he=ce([at("vscode-divider")],he);const de=[mt,r`
|
|
704
707
|
:host {
|
|
705
708
|
display: block;
|
|
706
709
|
max-width: 727px;
|
|
707
710
|
}
|
|
708
|
-
`];var
|
|
711
|
+
`];var ue,ve=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};!function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(ue||(ue={}));const pe=t=>"vscode-checkbox"===t.tagName.toLocaleLowerCase(),be=t=>"vscode-radio"===t.tagName.toLocaleLowerCase();let fe=class extends gt{constructor(){super(...arguments),this.breakpoint=490,this._responsive=!1,this._firstUpdateComplete=!1,this._resizeObserverCallbackBound=this._resizeObserverCallback.bind(this)}set responsive(t){this._responsive=t,this._firstUpdateComplete&&(t?this._activateResponsiveLayout():this._deactivateResizeObserver())}get responsive(){return this._responsive}get data(){return this._collectFormData()}_collectFormData(){const t=["vscode-textfield","vscode-textarea","vscode-single-select","vscode-multi-select","vscode-checkbox","vscode-radio"].join(","),e=this.querySelectorAll(t),s={};return e.forEach((t=>{if(!t.hasAttribute("name"))return;const e=t.getAttribute("name");e&&(pe(t)&&t.checked?s[e]=Array.isArray(s[e])?[...s[e],t.value]:[t.value]:"vscode-multi-select"===t.tagName.toLocaleLowerCase()?s[e]=t.value:pe(t)&&!t.checked?s[e]=Array.isArray(s[e])?s[e]:[]:be(t)&&t.checked||(t=>["vscode-textfield","vscode-textarea"].includes(t.tagName.toLocaleLowerCase()))(t)||(t=>"vscode-single-select"===t.tagName.toLocaleLowerCase())(t)?s[e]=t.value:be(t)&&!t.checked&&(s[e]=s[e]?s[e]:""))})),s}_toggleCompactLayout(t){this._assignedFormGroups.forEach((e=>{e.dataset.originalVariant||(e.dataset.originalVariant=e.variant);const s=e.dataset.originalVariant;t===ue.VERTICAL&&"horizontal"===s?e.variant="vertical":e.variant=s;e.querySelectorAll("vscode-checkbox-group, vscode-radio-group").forEach((e=>{e.dataset.originalVariant||(e.dataset.originalVariant=e.variant);const s=e.dataset.originalVariant;t===ue.HORIZONTAL&&s===ue.HORIZONTAL?e.variant="horizontal":e.variant="vertical"}))}))}_resizeObserverCallback(t){let e=0;for(const s of t)e=s.contentRect.width;const s=e<this.breakpoint?ue.VERTICAL:ue.HORIZONTAL;s!==this._currentFormGroupLayout&&(this._toggleCompactLayout(s),this._currentFormGroupLayout=s)}_activateResponsiveLayout(){this._resizeObserver=new ResizeObserver(this._resizeObserverCallbackBound),this._resizeObserver.observe(this._wrapperElement)}_deactivateResizeObserver(){this._resizeObserver?.disconnect(),this._resizeObserver=null}firstUpdated(){this._firstUpdateComplete=!0,this._responsive&&this._activateResponsiveLayout()}render(){return L`
|
|
709
712
|
<div class="wrapper">
|
|
710
713
|
<slot></slot>
|
|
711
714
|
</div>
|
|
712
|
-
`}};
|
|
715
|
+
`}};fe.styles=de,ve([dt({type:Boolean,reflect:!0})],fe.prototype,"responsive",null),ve([dt({type:Number})],fe.prototype,"breakpoint",void 0),ve([dt({type:Object})],fe.prototype,"data",null),ve([pt(".wrapper")],fe.prototype,"_wrapperElement",void 0),ve([ft({selector:"vscode-form-group"})],fe.prototype,"_assignedFormGroups",void 0),fe=ve([at("vscode-form-container")],fe);const ge=[mt,r`
|
|
713
716
|
:host {
|
|
714
717
|
--label-right-margin: 14px;
|
|
715
718
|
--label-width: 150px;
|
|
@@ -794,11 +797,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
794
797
|
::slotted(vscode-button) {
|
|
795
798
|
margin-right: 4px;
|
|
796
799
|
}
|
|
797
|
-
`];var
|
|
800
|
+
`];var me=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 xe=class extends gt{constructor(){super(...arguments),this.variant="horizontal"}render(){return L`
|
|
798
801
|
<div class="wrapper">
|
|
799
802
|
<slot></slot>
|
|
800
803
|
</div>
|
|
801
|
-
`}};
|
|
804
|
+
`}};xe.styles=ge,me([dt({reflect:!0})],xe.prototype,"variant",void 0),xe=me([at("vscode-form-group")],xe);const ye=[mt,r`
|
|
802
805
|
:host {
|
|
803
806
|
color: var(--vsc-foreground-translucent);
|
|
804
807
|
display: block;
|
|
@@ -810,7 +813,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
810
813
|
:host([vertical]) {
|
|
811
814
|
margin-left: 0;
|
|
812
815
|
}
|
|
813
|
-
`,
|
|
816
|
+
`,Kt];var we=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 ke=class extends gt{constructor(){super(),Vt()}render(){return L`<slot></slot>`}};ke.styles=ye,ke=we([at("vscode-form-helper")],ke);let $e=0;const _e=(t="")=>($e++,`${t}${$e}`),Ce=[mt,r`
|
|
814
817
|
:host {
|
|
815
818
|
display: block;
|
|
816
819
|
}
|
|
@@ -840,14 +843,14 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
840
843
|
:host([variant='vertical']) ::slotted(vscode-radio:last-child) {
|
|
841
844
|
margin-bottom: 0;
|
|
842
845
|
}
|
|
843
|
-
`];var
|
|
846
|
+
`];var Be=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 ze=class extends gt{constructor(){super(...arguments),this.variant="horizontal",this.role="radiogroup",this._focusedRadio=-1,this._checkedRadio=-1,this._firstContentLoaded=!1,this._onKeyDownBound=this._onKeyDown.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._onKeyDownBound)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._onKeyDownBound)}_uncheckPreviousChecked(t,e){-1!==t&&(this._radios[t].checked=!1),-1!==e&&(this._radios[e].tabIndex=-1)}_afterCheck(){this._focusedRadio=this._checkedRadio,this._radios[this._checkedRadio].checked=!0,this._radios[this._checkedRadio].tabIndex=0,this._radios[this._checkedRadio].focus()}_checkPrev(){const t=this._radios.findIndex((t=>t.checked)),e=this._radios.findIndex((t=>t.focused)),s=-1!==e?e:t;this._uncheckPreviousChecked(t,e),this._checkedRadio=-1===s?this._radios.length-1:s-1>=0?s-1:this._radios.length-1,this._afterCheck()}_checkNext(){const t=this._radios.findIndex((t=>t.checked)),e=this._radios.findIndex((t=>t.focused)),s=-1!==e?e:t;this._uncheckPreviousChecked(t,e),-1===s?this._checkedRadio=0:s+1<this._radios.length?this._checkedRadio=s+1:this._checkedRadio=0,this._afterCheck()}_onKeyDown(t){const{key:e}=t;["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"].includes(e)&&t.preventDefault(),"ArrowRight"!==e&&"ArrowDown"!==e||this._checkNext(),"ArrowLeft"!==e&&"ArrowUp"!==e||this._checkPrev()}_onChange(t){const e=this._radios.findIndex((e=>e===t.target));-1!==e&&(-1!==this._focusedRadio&&(this._radios[this._focusedRadio].tabIndex=-1),-1!==this._checkedRadio&&this._checkedRadio!==e&&(this._radios[this._checkedRadio].checked=!1),this._focusedRadio=e,this._checkedRadio=e,this._radios[e].tabIndex=0)}_onSlotChange(){if(!this._firstContentLoaded){const t=this._radios.findIndex((t=>t.autofocus));t>-1&&(this._focusedRadio=t),this._firstContentLoaded=!0}this._radios.forEach(((t,e)=>{this._focusedRadio>-1?t.tabIndex=e===this._focusedRadio?0:-1:t.tabIndex=0===e?0:-1}))}render(){return L`
|
|
844
847
|
<div class="wrapper">
|
|
845
848
|
<slot
|
|
846
849
|
@slotchange=${this._onSlotChange}
|
|
847
850
|
@vsc-change=${this._onChange}
|
|
848
851
|
></slot>
|
|
849
852
|
</div>
|
|
850
|
-
`}};
|
|
853
|
+
`}};ze.styles=Ce,Be([dt({reflect:!0})],ze.prototype,"variant",void 0),Be([dt({reflect:!0})],ze.prototype,"role",void 0),Be([ft({selector:"vscode-radio"})],ze.prototype,"_radios",void 0),Be([ut()],ze.prototype,"_focusedRadio",void 0),Be([ut()],ze.prototype,"_checkedRadio",void 0),ze=Be([at("vscode-radio-group")],ze);const Se=[mt,r`
|
|
851
854
|
:host {
|
|
852
855
|
display: inline-block;
|
|
853
856
|
height: 40px;
|
|
@@ -969,25 +972,25 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
969
972
|
background-repeat: no-repeat;
|
|
970
973
|
background-position: right bottom;
|
|
971
974
|
}
|
|
972
|
-
`];var
|
|
975
|
+
`];var Ae=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 Oe=class extends gt{set value(t){this._value=t,this._internals.setFormValue(t)}get value(){return this._value}get wrappedElement(){return this._textareaEl}get form(){return this._internals.form}get type(){return"textarea"}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}set minlength(t){this.minLength=t}get minlength(){return this.minLength}set maxlength(t){this.maxLength=t}get maxlength(){return this.maxLength}constructor(){super(),this.autocomplete=void 0,this.autofocus=!1,this.defaultValue="",this.disabled=!1,this.invalid=!1,this.label="",this.maxLength=void 0,this.minLength=void 0,this.rows=void 0,this.cols=void 0,this.name=void 0,this.placeholder=void 0,this.readonly=!1,this.resize="none",this.required=!1,this.spellcheck=!1,this.monospace=!1,this._value="",this._textareaPointerCursor=!1,this._shadow=!1,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._textareaEl.checkValidity(),this._setValidityFromInput(),this._internals.setFormValue(this._textareaEl.value)}))}updated(t){const e=["maxLength","minLength","required"];for(const s of t.keys())if(e.includes(String(s))){this.updateComplete.then((()=>{this._setValidityFromInput()}));break}}formResetCallback(){this.value=this.defaultValue}formStateRestoreCallback(t,e){this.updateComplete.then((()=>{this._value=t}))}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}_setValidityFromInput(){this._internals.setValidity(this._textareaEl.validity,this._textareaEl.validationMessage,this._textareaEl)}_dataChanged(){this._value=this._textareaEl.value,this._internals.setFormValue(this._textareaEl.value)}_handleChange(t){this._dataChanged(),this._setValidityFromInput(),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("vsc-change",{detail:{data:this.value,originalEvent:t}}))}_handleInput(t){this._dataChanged(),this._setValidityFromInput(),this.dispatchEvent(new CustomEvent("vsc-input",{detail:{data:t.data,originalEvent:t}}))}_handleMouseMove(t){if(this._textareaEl.clientHeight>=this._textareaEl.scrollHeight)return void(this._textareaPointerCursor=!1);const e=this._textareaEl.getBoundingClientRect(),s=t.clientX;this._textareaPointerCursor=s>=e.left+e.width-14-2}_handleScroll(){this._shadow=this._textareaEl.scrollTop>0}render(){return L`
|
|
973
976
|
<div
|
|
974
977
|
class=${Bt({shadow:!0,visible:this._shadow})}
|
|
975
978
|
></div>
|
|
976
979
|
<textarea
|
|
977
|
-
autocomplete=${
|
|
980
|
+
autocomplete=${zt(this.autocomplete)}
|
|
978
981
|
?autofocus=${this.autofocus}
|
|
979
982
|
?disabled=${this.disabled}
|
|
980
983
|
aria-label=${this.label}
|
|
981
984
|
id="textarea"
|
|
982
985
|
class=${Bt({monospace:this.monospace,"cursor-pointer":this._textareaPointerCursor})}
|
|
983
|
-
maxlength=${
|
|
984
|
-
minlength=${
|
|
985
|
-
rows=${
|
|
986
|
-
cols=${
|
|
987
|
-
name=${
|
|
988
|
-
placeholder=${
|
|
986
|
+
maxlength=${zt(this.maxLength)}
|
|
987
|
+
minlength=${zt(this.minLength)}
|
|
988
|
+
rows=${zt(this.rows)}
|
|
989
|
+
cols=${zt(this.cols)}
|
|
990
|
+
name=${zt(this.name)}
|
|
991
|
+
placeholder=${zt(this.placeholder)}
|
|
989
992
|
?readonly=${this.readonly}
|
|
990
|
-
style=${
|
|
993
|
+
.style=${{resize:this.resize}}
|
|
991
994
|
?required=${this.required}
|
|
992
995
|
spellcheck=${this.spellcheck}
|
|
993
996
|
@change=${this._handleChange}
|
|
@@ -996,7 +999,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
996
999
|
@scroll=${this._handleScroll}
|
|
997
1000
|
.value=${this._value}
|
|
998
1001
|
></textarea>
|
|
999
|
-
`}};
|
|
1002
|
+
`}};Oe.styles=Se,Oe.formAssociated=!0,Oe.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},Ae([dt()],Oe.prototype,"autocomplete",void 0),Ae([dt({type:Boolean,reflect:!0})],Oe.prototype,"autofocus",void 0),Ae([dt({attribute:"default-value"})],Oe.prototype,"defaultValue",void 0),Ae([dt({type:Boolean,reflect:!0})],Oe.prototype,"disabled",void 0),Ae([dt({type:Boolean,reflect:!0})],Oe.prototype,"invalid",void 0),Ae([dt({attribute:!1})],Oe.prototype,"label",void 0),Ae([dt({type:Number})],Oe.prototype,"maxLength",void 0),Ae([dt({type:Number})],Oe.prototype,"minLength",void 0),Ae([dt({type:Number})],Oe.prototype,"rows",void 0),Ae([dt({type:Number})],Oe.prototype,"cols",void 0),Ae([dt()],Oe.prototype,"name",void 0),Ae([dt()],Oe.prototype,"placeholder",void 0),Ae([dt({type:Boolean,reflect:!0})],Oe.prototype,"readonly",void 0),Ae([dt()],Oe.prototype,"resize",void 0),Ae([dt({type:Boolean,reflect:!0})],Oe.prototype,"required",void 0),Ae([dt({type:Boolean})],Oe.prototype,"spellcheck",void 0),Ae([dt({type:Boolean,reflect:!0})],Oe.prototype,"monospace",void 0),Ae([dt()],Oe.prototype,"value",null),Ae([pt("#textarea")],Oe.prototype,"_textareaEl",void 0),Ae([ut()],Oe.prototype,"_value",void 0),Ae([ut()],Oe.prototype,"_textareaPointerCursor",void 0),Ae([ut()],Oe.prototype,"_shadow",void 0),Oe=Ae([at("vscode-textarea")],Oe);const Ee=[mt,r`
|
|
1000
1003
|
:host {
|
|
1001
1004
|
align-items: center;
|
|
1002
1005
|
background-color: var(--vscode-settings-textInputBackground);
|
|
@@ -1095,27 +1098,27 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1095
1098
|
input[type='file']::file-selector-button:hover {
|
|
1096
1099
|
background-color: var(--vscode-button-hoverBackground);
|
|
1097
1100
|
}
|
|
1098
|
-
`];var
|
|
1101
|
+
`];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 Ie=class extends gt{set type(t){this._type=["color","date","datetime-local","email","file","month","number","password","search","tel","text","time","url","week"].includes(t)?t:"text"}get type(){return this._type}set value(t){"file"!==this.type&&(this._value=t,this._internals.setFormValue(t)),this.updateComplete.then((()=>{this._setValidityFromInput()}))}get value(){return this._value}set minlength(t){this.minLength=t}get minlength(){return this.minLength}set maxlength(t){this.maxLength=t}get maxlength(){return this.maxLength}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._setValidityFromInput(),this._internals.checkValidity()}reportValidity(){return this._setValidityFromInput(),this._internals.reportValidity()}get wrappedElement(){return this._inputEl}constructor(){super(),this.autocomplete=void 0,this.autofocus=!1,this.defaultValue="",this.disabled=!1,this.focused=!1,this.invalid=!1,this.label="",this.max=void 0,this.maxLength=void 0,this.min=void 0,this.minLength=void 0,this.multiple=!1,this.name=void 0,this.pattern=void 0,this.placeholder=void 0,this.readonly=!1,this.required=!1,this.step=void 0,this._value="",this._type="text",this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._inputEl.checkValidity(),this._setValidityFromInput(),this._internals.setFormValue(this._inputEl.value)}))}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s);["max","maxlength","min","minlength","pattern","required","step"].includes(t)&&this.updateComplete.then((()=>{this._setValidityFromInput()}))}formResetCallback(){this.value=this.defaultValue,this.requestUpdate()}formStateRestoreCallback(t,e){this.value=t}_dataChanged(){if(this._value=this._inputEl.value,"file"===this.type&&this._inputEl.files)for(const t of this._inputEl.files)this._internals.setFormValue(t);else this._internals.setFormValue(this._inputEl.value)}_setValidityFromInput(){this._inputEl&&this._internals.setValidity(this._inputEl.validity,this._inputEl.validationMessage,this._inputEl)}_onInput(t){this._dataChanged(),this._setValidityFromInput(),this.dispatchEvent(new CustomEvent("vsc-input",{detail:{data:t.data,originalEvent:t}}))}_onChange(t){this._dataChanged(),this._setValidityFromInput(),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("vsc-change",{detail:{data:this.value,originalEvent:t}}))}_onFocus(){this.focused=!0}_onBlur(){this.focused=!1}_onKeyDown(t){"Enter"===t.key&&this._internals.form&&this._internals.form?.requestSubmit()}render(){return L`
|
|
1099
1102
|
<slot name="content-before"></slot>
|
|
1100
1103
|
<input
|
|
1101
1104
|
id="input"
|
|
1102
1105
|
type=${this.type}
|
|
1103
1106
|
?autofocus=${this.autofocus}
|
|
1104
|
-
autocomplete=${
|
|
1107
|
+
autocomplete=${zt(this.autocomplete)}
|
|
1105
1108
|
aria-label=${this.label}
|
|
1106
1109
|
?disabled=${this.disabled}
|
|
1107
|
-
max=${
|
|
1108
|
-
maxlength=${
|
|
1109
|
-
min=${
|
|
1110
|
-
minlength=${
|
|
1110
|
+
max=${zt(this.max)}
|
|
1111
|
+
maxlength=${zt(this.maxLength)}
|
|
1112
|
+
min=${zt(this.min)}
|
|
1113
|
+
minlength=${zt(this.minLength)}
|
|
1111
1114
|
?multiple=${this.multiple}
|
|
1112
|
-
name=${
|
|
1113
|
-
pattern=${
|
|
1114
|
-
placeholder=${
|
|
1115
|
+
name=${zt(this.name)}
|
|
1116
|
+
pattern=${zt(this.pattern)}
|
|
1117
|
+
placeholder=${zt(this.placeholder)}
|
|
1115
1118
|
?readonly=${this.readonly}
|
|
1116
1119
|
?required=${this.required}
|
|
1117
|
-
step=${
|
|
1118
|
-
value=${
|
|
1120
|
+
step=${zt(this.step)}
|
|
1121
|
+
value=${zt("file"!==this.type?this._value:void 0)}
|
|
1119
1122
|
@blur=${this._onBlur}
|
|
1120
1123
|
@change=${this._onChange}
|
|
1121
1124
|
@focus=${this._onFocus}
|
|
@@ -1123,7 +1126,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1123
1126
|
@keydown=${this._onKeyDown}
|
|
1124
1127
|
/>
|
|
1125
1128
|
<slot name="content-after"></slot>
|
|
1126
|
-
`}};
|
|
1129
|
+
`}};Ie.styles=Ee,Ie.formAssociated=!0,Ie.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},je([dt()],Ie.prototype,"autocomplete",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"autofocus",void 0),je([dt({attribute:"default-value"})],Ie.prototype,"defaultValue",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"disabled",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"focused",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"invalid",void 0),je([dt({attribute:!1})],Ie.prototype,"label",void 0),je([dt({type:Number})],Ie.prototype,"max",void 0),je([dt({type:Number})],Ie.prototype,"maxLength",void 0),je([dt({type:Number})],Ie.prototype,"min",void 0),je([dt({type:Number})],Ie.prototype,"minLength",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"multiple",void 0),je([dt({reflect:!0})],Ie.prototype,"name",void 0),je([dt()],Ie.prototype,"pattern",void 0),je([dt()],Ie.prototype,"placeholder",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"readonly",void 0),je([dt({type:Boolean,reflect:!0})],Ie.prototype,"required",void 0),je([dt({type:Number})],Ie.prototype,"step",void 0),je([dt({reflect:!0})],Ie.prototype,"type",null),je([dt()],Ie.prototype,"value",null),je([pt("#input")],Ie.prototype,"_inputEl",void 0),je([ut()],Ie.prototype,"_value",void 0),je([ut()],Ie.prototype,"_type",void 0),Ie=je([at("vscode-textfield")],Ie);const Me=[mt,r`
|
|
1127
1130
|
:host {
|
|
1128
1131
|
color: var(--vscode-foreground);
|
|
1129
1132
|
font-family: var(--vscode-font-family);
|
|
@@ -1151,13 +1154,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1151
1154
|
color: var(--vscode-foreground);
|
|
1152
1155
|
opacity: 0.9;
|
|
1153
1156
|
}
|
|
1154
|
-
`];var
|
|
1157
|
+
`];var Fe=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 Pe=class extends gt{constructor(){super(...arguments),this.required=!1,this._id="",this._htmlFor="",this._connected=!1}set htmlFor(t){this._htmlFor=t,this.setAttribute("for",t),this._connected&&this._connectWithTarget()}get htmlFor(){return this._htmlFor}set id(t){this._id=t}get id(){return this._id}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s)}connectedCallback(){super.connectedCallback(),this._connected=!0,""===this._id&&(this._id=_e("vscode-label-"),this.setAttribute("id",this._id)),this._connectWithTarget()}_getTarget(){let t=null;if(this._htmlFor){const e=this.getRootNode({composed:!1});e&&(t=e.querySelector(`#${this._htmlFor}`))}return t}async _connectWithTarget(){await this.updateComplete;const t=this._getTarget();(t instanceof ze||t instanceof Xt)&&t.setAttribute("aria-labelledby",this._id);let e="";this.textContent&&(e=this.textContent.trim()),(t instanceof Ie||t instanceof Oe)&&(t.label=e)}_handleClick(){const t=this._getTarget();t&&"focus"in t&&t.focus()}render(){return L`
|
|
1155
1158
|
<label
|
|
1156
1159
|
class=${Bt({wrapper:!0,required:this.required})}
|
|
1157
1160
|
@click=${this._handleClick}
|
|
1158
1161
|
><slot></slot
|
|
1159
1162
|
></label>
|
|
1160
|
-
`}};
|
|
1163
|
+
`}};Pe.styles=Me,Fe([dt({reflect:!0,attribute:"for"})],Pe.prototype,"htmlFor",null),Fe([dt()],Pe.prototype,"id",null),Fe([dt({type:Boolean,reflect:!0})],Pe.prototype,"required",void 0),Pe=Fe([at("vscode-label")],Pe);const{I:Ne}=ot,De=()=>document.createComment(""),Te=(t,e,s)=>{const i=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=i.insertBefore(De(),o),r=i.insertBefore(De(),o);s=new Ne(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},Ve=(t,e,s=t)=>(t._$AI(e,s),t),Re={},Le=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}},Ue=(t,e,s)=>{const i=new Map;for(let o=e;o<=s;o++)i.set(t[o],o);return i},qe=_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,h,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]=Ve(o[d],r[v]),d++,v++;else if(l[u]===n[p])a[p]=Ve(o[u],r[p]),u--,p--;else if(l[d]===n[p])a[p]=Ve(o[d],r[p]),Te(t,a[p+1],o[d]),d++,p--;else if(l[u]===n[v])a[v]=Ve(o[u],r[v]),Te(t,o[d],o[u]),u--,v++;else if(void 0===c&&(c=Ue(n,v,p),h=Ue(l,d,u)),c.has(l[d]))if(c.has(l[u])){const e=h.get(n[v]),s=void 0!==e?o[e]:null;if(null===s){const e=Te(t,o[d]);Ve(e,r[v]),a[v]=e}else a[v]=Ve(s,r[v]),Te(t,o[d],s),o[e]=null;v++}else Le(o[u]),u--;else Le(o[d]),d++;for(;v<=p;){const e=Te(t,a[p+1]);Ve(e,r[v]),a[v++]=e}for(;d<=u;){const t=o[d++];null!==t&&Le(t)}return this.ut=n,((t,e=Re)=>{t._$AH=e})(t,a),U}}),He=L`
|
|
1161
1164
|
<span class="icon">
|
|
1162
1165
|
<svg
|
|
1163
1166
|
width="16"
|
|
@@ -1173,7 +1176,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1173
1176
|
/>
|
|
1174
1177
|
</svg>
|
|
1175
1178
|
</span>
|
|
1176
|
-
`;var
|
|
1179
|
+
`;var Ke=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 We=class extends gt{constructor(){super(...arguments),this.description="",this.selected=!1,this.disabled=!1,this._initialized=!1,this._handleSlotChange=()=>{this._initialized&&this.dispatchEvent(new Event("vsc-option-state-change",{bubbles:!0}))}}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._initialized=!0}))}willUpdate(t){this._initialized&&(t.has("description")||t.has("value")||t.has("selected")||t.has("disabled"))&&this.dispatchEvent(new Event("vsc-option-state-change",{bubbles:!0}))}render(){return L`<slot @slotchange=${this._handleSlotChange}></slot>`}};We.styles=mt,Ke([dt({type:String})],We.prototype,"value",void 0),Ke([dt({type:String})],We.prototype,"description",void 0),Ke([dt({type:Boolean,reflect:!0})],We.prototype,"selected",void 0),Ke([dt({type:Boolean,reflect:!0})],We.prototype,"disabled",void 0),We=Ke([at("vscode-option")],We);const Ge=(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},Je=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)},Ze=(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(...Je(t.substring(0,e[0][0]))),r>0&&r<i&&o[0]-e[r-1][1]!=0&&s.push(...Je(t.substring(e[r-1][1],o[0]))),s.push(L`<b>${Je(n)}</b>`),r===i-1&&o[1]<t.length&&s.push(...Je(t.substring(o[1],t.length)))})),s)};var Ye=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 Xe=22;class Qe extends gt{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})))}constructor(){super(),this.ariaExpanded="false",this.combobox=!1,this.invalid=!1,this.focused=!1,this.open=!1,this.position="below",this.tabIndex=0,this._activeIndex=-1,this._currentDescription="",this._filter="fuzzy",this._filterPattern="",this._selectedIndex=-1,this._selectedIndexes=[],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)},this.addEventListener("vsc-option-state-change",(t=>{t.stopPropagation(),this._setStateFromSlottedElements(),this.requestUpdate()}))}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?Ge(this._options,this._filterPattern,this._filter):this._options}get _currentOptions(){return this.combobox?this._filteredOptions:this._options}_setStateFromSlottedElements(){const t=[];let e=0;const s=this._assignedOptions??[],i=[],o=[];this._valueOptionIndexMap={},s.forEach(((s,r)=>{const{innerText:n,description:l,disabled:a}=s,c="string"==typeof s.value?s.value:n.trim(),h=s.selected??!1,d={label:n.trim(),value:c,description:l,selected:h,index:e,disabled:a};e=t.push(d),h&&!this._multiple&&(this._activeIndex=r),h&&(i.push(t.length-1),o.push(c)),this._valueOptionIndexMap[d.value]=d.index})),this._options=t,i.length>0&&(this._selectedIndex=i[0],this._selectedIndexes=i,this._value=o[0],this._values=o),this._multiple||this.combobox||0!==i.length||(this._selectedIndex=this._options.length>0?0:-1)}async _toggleDropdown(t){this.open=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*Xe))),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.open),this._multiple&&(this._activeIndex=0)}_toggleComboboxDropdown(){this._filterPattern="",this._toggleDropdown(!this.open),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.open;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.open){if(this.open&&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*Xe)}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*Xe;"down"===t&&s+Xe>=34+e&&(this._listElement.scrollTop=(this._activeIndex-9)*Xe),"up"===t&&s<=e-Xe&&this._scrollActiveElementToTop()}_onArrowUpKeyDown(){if(this.open){if(this._activeIndex<=0)return;this._activeIndex-=1,this._adjustOptionListScrollPos("up")}}_onArrowDownKeyDown(){if(this.open){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(){this._setStateFromSlottedElements(),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
1180
|
<div class="${t}">
|
|
1178
1181
|
${"above"===this.position?this._renderDescription():q}
|
|
1179
1182
|
${this._renderOptions()} ${this._renderDropdownControls()}
|
|
@@ -1183,7 +1186,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1183
1186
|
<slot class="main-slot" @slotchange="${this._onSlotChange}"></slot>
|
|
1184
1187
|
${this.combobox?this._renderComboboxFace():this._renderSelectFace()}
|
|
1185
1188
|
${this.open?this._renderDropdown():q}
|
|
1186
|
-
`}}
|
|
1189
|
+
`}}Ye([dt({type:String,reflect:!0,attribute:"aria-expanded"})],Qe.prototype,"ariaExpanded",void 0),Ye([dt({type:Boolean,reflect:!0})],Qe.prototype,"combobox",void 0),Ye([dt({type:Boolean,reflect:!0})],Qe.prototype,"disabled",null),Ye([dt({type:Boolean,reflect:!0})],Qe.prototype,"invalid",void 0),Ye([dt()],Qe.prototype,"filter",null),Ye([dt({type:Boolean,reflect:!0})],Qe.prototype,"focused",void 0),Ye([dt({type:Boolean,reflect:!0})],Qe.prototype,"open",void 0),Ye([dt({type:Array})],Qe.prototype,"options",null),Ye([dt({reflect:!0})],Qe.prototype,"position",void 0),Ye([dt({type:Number,attribute:!0,reflect:!0})],Qe.prototype,"tabIndex",void 0),Ye([ft({flatten:!0,selector:"vscode-option"})],Qe.prototype,"_assignedOptions",void 0),Ye([ut()],Qe.prototype,"_activeIndex",void 0),Ye([ut()],Qe.prototype,"_currentDescription",void 0),Ye([ut()],Qe.prototype,"_filter",void 0),Ye([ut()],Qe.prototype,"_filteredOptions",null),Ye([ut()],Qe.prototype,"_filterPattern",void 0),Ye([ut()],Qe.prototype,"_selectedIndex",void 0),Ye([ut()],Qe.prototype,"_selectedIndexes",void 0),Ye([ut()],Qe.prototype,"_options",void 0),Ye([ut()],Qe.prototype,"_value",void 0),Ye([ut()],Qe.prototype,"_values",void 0),Ye([ut()],Qe.prototype,"_listScrollTop",void 0),Ye([pt(".options")],Qe.prototype,"_listElement",void 0);var ts=[mt,r`
|
|
1187
1190
|
:host {
|
|
1188
1191
|
display: inline-block;
|
|
1189
1192
|
max-width: 100%;
|
|
@@ -1521,7 +1524,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1521
1524
|
:host([position='above']) .description {
|
|
1522
1525
|
border-width: 0 0 1px;
|
|
1523
1526
|
}
|
|
1524
|
-
`],
|
|
1527
|
+
`],es=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 ss=class extends Qe{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);if(this._options[s]){if(this._options[s].disabled)return;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
1528
|
>No items selected</span
|
|
1526
1529
|
>`;case 1:return L`<span class="select-face-badge">1 item selected</span>`;default:return L`<span class="select-face-badge"
|
|
1527
1530
|
>${this._selectedIndexes.length} items selected</span
|
|
@@ -1531,7 +1534,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1531
1534
|
@click=${this._onFaceClick}
|
|
1532
1535
|
tabindex=${this.tabIndex>-1?0:-1}
|
|
1533
1536
|
>
|
|
1534
|
-
${this._renderLabel()} ${
|
|
1537
|
+
${this._renderLabel()} ${He}
|
|
1535
1538
|
</div>
|
|
1536
1539
|
`}_renderComboboxFace(){const t=this._selectedIndex>-1?this._options[this._selectedIndex].label:"";return L`
|
|
1537
1540
|
<div class="combobox-face face">
|
|
@@ -1551,7 +1554,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1551
1554
|
@click=${this._onComboboxButtonClick}
|
|
1552
1555
|
@keydown=${this._onComboboxButtonKeyDown}
|
|
1553
1556
|
>
|
|
1554
|
-
${
|
|
1557
|
+
${He}
|
|
1555
1558
|
</button>
|
|
1556
1559
|
</div>
|
|
1557
1560
|
`}_renderOptions(){const t=this.combobox?this._filteredOptions:this._options;return L`
|
|
@@ -1560,7 +1563,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1560
1563
|
@click=${this._onOptionClick}
|
|
1561
1564
|
@mouseover=${this._onOptionMouseOver}
|
|
1562
1565
|
>
|
|
1563
|
-
${
|
|
1566
|
+
${qe(t,(t=>t.index),((t,e)=>{const s=this._selectedIndexes.includes(t.index),i=Bt({active:e===this._activeIndex&&!t.disabled,option:!0,selected:s,disabled:t.disabled}),o=Bt({"checkbox-icon":!0,checked:s});return L`
|
|
1564
1567
|
<li
|
|
1565
1568
|
class=${i}
|
|
1566
1569
|
data-index=${t.index}
|
|
@@ -1568,7 +1571,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1568
1571
|
>
|
|
1569
1572
|
<span class=${o}></span>
|
|
1570
1573
|
<span class="option-label"
|
|
1571
|
-
>${t.ranges?.length?
|
|
1574
|
+
>${t.ranges?.length?Ze(t.label,t.ranges??[]):t.label}</span
|
|
1572
1575
|
>
|
|
1573
1576
|
</li>
|
|
1574
1577
|
`}))}
|
|
@@ -1599,7 +1602,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1599
1602
|
>OK</vscode-button
|
|
1600
1603
|
>
|
|
1601
1604
|
</div>
|
|
1602
|
-
`}};
|
|
1605
|
+
`}};ss.styles=ts,ss.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},ss.formAssociated=!0,es([dt({type:Array,attribute:"default-value"})],ss.prototype,"defaultValue",void 0),es([dt({type:Boolean,reflect:!0})],ss.prototype,"required",void 0),es([dt({reflect:!0})],ss.prototype,"name",void 0),es([dt({type:Array,attribute:!1})],ss.prototype,"selectedIndexes",null),es([dt({type:Array})],ss.prototype,"value",null),es([pt(".face")],ss.prototype,"_faceElement",void 0),ss=es([at("vscode-multi-select")],ss);const is=[mt,r`
|
|
1603
1606
|
:host {
|
|
1604
1607
|
align-items: center;
|
|
1605
1608
|
display: block;
|
|
@@ -1645,7 +1648,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1645
1648
|
transform: rotate(1080deg);
|
|
1646
1649
|
}
|
|
1647
1650
|
}
|
|
1648
|
-
`];var
|
|
1651
|
+
`];var 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 gt{constructor(){super(...arguments),this.ariaLabel="Loading",this.ariaLive="assertive",this.role="alert"}render(){return L`<svg class="progress" part="progress" viewBox="0 0 16 16">
|
|
1649
1652
|
<circle
|
|
1650
1653
|
class="background"
|
|
1651
1654
|
part="background"
|
|
@@ -1660,7 +1663,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1660
1663
|
cy="8px"
|
|
1661
1664
|
r="7px"
|
|
1662
1665
|
></circle>
|
|
1663
|
-
</svg>`}};
|
|
1666
|
+
</svg>`}};rs.styles=is,os([dt({reflect:!0,attribute:"aria-label"})],rs.prototype,"ariaLabel",void 0),os([dt({reflect:!0,attribute:"aria-live"})],rs.prototype,"ariaLive",void 0),os([dt({reflect:!0})],rs.prototype,"role",void 0),rs=os([at("vscode-progress-ring")],rs);const ns=[mt,Ht,r`
|
|
1664
1667
|
:host(:invalid) .icon,
|
|
1665
1668
|
:host([invalid]) .icon {
|
|
1666
1669
|
background-color: var(--vscode-inputValidation-errorBackground);
|
|
@@ -1687,7 +1690,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1687
1690
|
outline: 1px solid var(--vscode-focusBorder);
|
|
1688
1691
|
outline-offset: -1px;
|
|
1689
1692
|
}
|
|
1690
|
-
`,
|
|
1693
|
+
`,Kt];var ls=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 as=class extends(qt(Lt)){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
1694
|
<div class="wrapper">
|
|
1692
1695
|
<input
|
|
1693
1696
|
?autofocus=${this.autofocus}
|
|
@@ -1706,13 +1709,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1706
1709
|
</span>
|
|
1707
1710
|
</label>
|
|
1708
1711
|
</div>
|
|
1709
|
-
`}};
|
|
1712
|
+
`}};as.styles=ns,as.formAssociated=!0,as.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},ls([dt({type:Boolean,reflect:!0})],as.prototype,"autofocus",void 0),ls([dt({type:Boolean,reflect:!0})],as.prototype,"checked",void 0),ls([dt({type:Boolean,reflect:!0,attribute:"default-checked"})],as.prototype,"defaultChecked",void 0),ls([dt({type:Boolean,reflect:!0})],as.prototype,"invalid",void 0),ls([dt({reflect:!0})],as.prototype,"name",void 0),ls([dt()],as.prototype,"value",void 0),ls([dt({type:Boolean,reflect:!0})],as.prototype,"disabled",void 0),ls([dt({type:Boolean,reflect:!0})],as.prototype,"required",void 0),ls([dt({reflect:!0})],as.prototype,"role",void 0),ls([dt({type:Number,reflect:!0})],as.prototype,"tabIndex",void 0),ls([ut()],as.prototype,"_slottedText",void 0),ls([pt("#input")],as.prototype,"_inputEl",void 0),ls([dt()],as.prototype,"type",void 0),as=ls([at("vscode-radio")],as);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 hs=class extends Qe{set selectedIndex(t){this._selectedIndex=t,this._value=this._options[this._selectedIndex]?this._options[this._selectedIndex].value:""}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._value=t,this._requestedValueToSetLater=""):(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._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._options.length>0?this._internals.setFormValue(this._options[this._selectedIndex].value):this._internals.setFormValue(null)}_onArrowUpKeyDown(){super._onArrowUpKeyDown(),this.open||this._selectedIndex<=0||(this._filterPattern="",this._selectedIndex-=1,this._activeIndex=this._selectedIndex,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onArrowDownKeyDown(){super._onArrowDownKeyDown(),this.open||this._selectedIndex>=this._options.length-1||(this._filterPattern="",this._selectedIndex+=1,this._activeIndex=this._selectedIndex,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onEnterKeyDown(){super._onEnterKeyDown(),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._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(){const t=this._options[this._selectedIndex]?.label??"";return L`
|
|
1710
1713
|
<div
|
|
1711
1714
|
class="select-face face"
|
|
1712
1715
|
@click=${this._onFaceClick}
|
|
1713
1716
|
tabindex=${this.tabIndex>-1?0:-1}
|
|
1714
1717
|
>
|
|
1715
|
-
<span class="text">${t}</span> ${
|
|
1718
|
+
<span class="text">${t}</span> ${He}
|
|
1716
1719
|
</div>
|
|
1717
1720
|
`}_renderComboboxFace(){const t=this._selectedIndex>-1?this._options[this._selectedIndex].label:"";return L`
|
|
1718
1721
|
<div class="combobox-face face">
|
|
@@ -1731,7 +1734,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1731
1734
|
@click=${this._onComboboxButtonClick}
|
|
1732
1735
|
@keydown=${this._onComboboxButtonKeyDown}
|
|
1733
1736
|
>
|
|
1734
|
-
${
|
|
1737
|
+
${He}
|
|
1735
1738
|
</button>
|
|
1736
1739
|
</div>
|
|
1737
1740
|
`}_renderOptions(){const t=(this.combobox?this._filteredOptions:this._options).map(((t,e)=>{const s=Bt({option:!0,disabled:t.disabled,selected:t.selected,active:e===this._activeIndex&&!t.disabled});return L`
|
|
@@ -1740,7 +1743,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1740
1743
|
data-index=${t.index}
|
|
1741
1744
|
data-filtered-index=${e}
|
|
1742
1745
|
>
|
|
1743
|
-
${t.ranges?.length?
|
|
1746
|
+
${t.ranges?.length?Ze(t.label,t.ranges??[]):t.label}
|
|
1744
1747
|
</li>
|
|
1745
1748
|
`}));return L`
|
|
1746
1749
|
<ul
|
|
@@ -1750,7 +1753,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1750
1753
|
>
|
|
1751
1754
|
${t}
|
|
1752
1755
|
</ul>
|
|
1753
|
-
`}};
|
|
1756
|
+
`}};hs.styles=ts,hs.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},hs.formAssociated=!0,cs([dt({attribute:"default-value"})],hs.prototype,"defaultValue",void 0),cs([dt({type:String,attribute:!0,reflect:!0})],hs.prototype,"role",void 0),cs([dt({reflect:!0})],hs.prototype,"name",void 0),cs([dt({type:Number,attribute:"selected-index"})],hs.prototype,"selectedIndex",null),cs([dt({type:String})],hs.prototype,"value",null),cs([dt({type:Boolean,reflect:!0})],hs.prototype,"required",void 0),cs([pt(".face")],hs.prototype,"_face",void 0),hs=cs([at("vscode-single-select")],hs);const ds=[mt,r`
|
|
1754
1757
|
:host {
|
|
1755
1758
|
display: block;
|
|
1756
1759
|
position: relative;
|
|
@@ -1761,6 +1764,10 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1761
1764
|
overflow: auto;
|
|
1762
1765
|
}
|
|
1763
1766
|
|
|
1767
|
+
.scrollable-container.dragging {
|
|
1768
|
+
user-select: none;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1764
1771
|
.scrollable-container::-webkit-scrollbar {
|
|
1765
1772
|
cursor: default;
|
|
1766
1773
|
width: 0;
|
|
@@ -1792,7 +1799,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1792
1799
|
right: 0;
|
|
1793
1800
|
top: 0;
|
|
1794
1801
|
width: 10px;
|
|
1795
|
-
z-index: 100;
|
|
1802
|
+
z-index: var(--scrollbar-track-z, 100);
|
|
1796
1803
|
}
|
|
1797
1804
|
|
|
1798
1805
|
.scrollbar-track.hidden {
|
|
@@ -1841,20 +1848,17 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1841
1848
|
.content {
|
|
1842
1849
|
overflow: hidden;
|
|
1843
1850
|
}
|
|
1844
|
-
`];var
|
|
1851
|
+
`];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 gt{constructor(){super(...arguments),this.shadow=!0,this.scrolled=!1,this._isDragging=!1,this._thumbVisible=!1,this._thumbFade=!1,this._thumbActive=!1,this._scrollbarTrackZ=0,this._scrollThumbStartY=0,this._mouseStartY=0,this._scrollbarVisible=!0,this._resizeObserverCallback=()=>{this._updateScrollbar()},this._onSlotChange=()=>{this._zIndexFix()},this._onScrollThumbMouseMoveBound=this._onScrollThumbMouseMove.bind(this),this._onScrollThumbMouseUpBound=this._onScrollThumbMouseUp.bind(this),this._onComponentMouseOverBound=this._onComponentMouseOver.bind(this),this._onComponentMouseOutBound=this._onComponentMouseOut.bind(this)}set scrollPos(t){this._scrollableContainer.scrollTop=t}get scrollPos(){return this._scrollableContainer?this._scrollableContainer.scrollTop:0}get scrollMax(){return this._scrollableContainer?this._scrollableContainer.scrollHeight:0}connectedCallback(){super.connectedCallback(),this._hostResizeObserver=new ResizeObserver(this._resizeObserverCallback),this._contentResizeObserver=new ResizeObserver(this._resizeObserverCallback),this.requestUpdate(),this.updateComplete.then((()=>{this._scrollableContainer.addEventListener("scroll",this._onScrollableContainerScroll.bind(this)),this._hostResizeObserver.observe(this),this._contentResizeObserver.observe(this._contentElement)})),this.addEventListener("mouseover",this._onComponentMouseOverBound),this.addEventListener("mouseout",this._onComponentMouseOutBound)}disconnectedCallback(){super.disconnectedCallback(),this._hostResizeObserver.unobserve(this),this._hostResizeObserver.disconnect(),this._contentResizeObserver.unobserve(this._contentElement),this._contentResizeObserver.disconnect(),this.removeEventListener("mouseover",this._onComponentMouseOverBound),this.removeEventListener("mouseout",this._onComponentMouseOutBound)}willUpdate(t){t.has("_scrollbarTrackZ")&&this.style.setProperty("--scrollbar-track-z",this._scrollbarTrackZ.toString())}_updateScrollbar(){const t=this.getBoundingClientRect(),e=this._contentElement.getBoundingClientRect();t.height>=e.height?this._scrollbarVisible=!1:(this._scrollbarVisible=!0,this._scrollThumbElement.style.height=t.height*(t.height/e.height)+"px"),this.requestUpdate()}_zIndexFix(){let t=0;this._assignedElements.forEach((e=>{if("style"in e){const s=window.getComputedStyle(e).zIndex;/([0-9-])+/g.test(s)&&(t=Number(s)>t?Number(s):t)}})),this._scrollbarTrackZ=t+1}_onScrollThumbMouseDown(t){const e=this.getBoundingClientRect(),s=this._scrollThumbElement.getBoundingClientRect();this._mouseStartY=t.screenY,this._scrollThumbStartY=s.top-e.top,this._isDragging=!0,this._thumbActive=!0,document.addEventListener("mousemove",this._onScrollThumbMouseMoveBound),document.addEventListener("mouseup",this._onScrollThumbMouseUpBound)}_onScrollThumbMouseMove(t){const e=this._scrollThumbStartY+(t.screenY-this._mouseStartY);let s=0;const i=this.getBoundingClientRect().height,o=this._scrollThumbElement.getBoundingClientRect().height,r=this._contentElement.getBoundingClientRect().height;s=e<0?0:e>i-o?i-o:e,this._scrollThumbElement.style.top=`${s}px`,this._scrollableContainer.scrollTop=s/(i-o)*(r-i)}_onScrollThumbMouseUp(t){this._isDragging=!1,this._thumbActive=!1;const e=this.getBoundingClientRect(),{x:s,y:i,width:o,height:r}=e,{pageX:n,pageY:l}=t;(n>s+o||n<s||l>i+r||l<i)&&(this._thumbFade=!0,this._thumbVisible=!1),document.removeEventListener("mousemove",this._onScrollThumbMouseMoveBound),document.removeEventListener("mouseup",this._onScrollThumbMouseUpBound)}_onScrollableContainerScroll(){const t=this._scrollableContainer.scrollTop;this.scrolled=t>0;const e=this.getBoundingClientRect().height,s=this._scrollThumbElement.getBoundingClientRect().height,i=t/(this._contentElement.getBoundingClientRect().height-e);this._scrollThumbElement.style.top=i*(e-s)+"px"}_onComponentMouseOver(){this._thumbVisible=!0,this._thumbFade=!1}_onComponentMouseOut(){this._thumbActive||(this._thumbVisible=!1,this._thumbFade=!0)}render(){return L`
|
|
1845
1852
|
<div
|
|
1846
|
-
class
|
|
1847
|
-
style=${At({"user-select":this._isDragging?"none":"auto"})}
|
|
1853
|
+
class=${Bt({"scrollable-container":!0,dragging:this._isDragging})}
|
|
1848
1854
|
>
|
|
1849
1855
|
<div class=${Bt({shadow:!0,visible:this.scrolled})}></div>
|
|
1850
1856
|
${this._isDragging?L`<div class="prevent-interaction"></div>`:q}
|
|
1851
1857
|
<div
|
|
1852
1858
|
class=${Bt({"scrollbar-track":!0,hidden:!this._scrollbarVisible})}
|
|
1853
|
-
style=${At({"z-index":String(this._scrollbarTrackZ)})}
|
|
1854
1859
|
>
|
|
1855
1860
|
<div
|
|
1856
1861
|
class=${Bt({"scrollbar-thumb":!0,visible:this._thumbVisible,fade:this._thumbFade,active:this._thumbActive})}
|
|
1857
|
-
style=${At({height:`${this._thumbHeight}px`,top:`${this._thumbY}px`})}
|
|
1858
1862
|
@mousedown=${this._onScrollThumbMouseDown}
|
|
1859
1863
|
></div>
|
|
1860
1864
|
</div>
|
|
@@ -1862,7 +1866,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1862
1866
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
1863
1867
|
</div>
|
|
1864
1868
|
</div>
|
|
1865
|
-
`}};
|
|
1869
|
+
`}};vs.styles=ds,us([dt({type:Boolean,reflect:!0})],vs.prototype,"shadow",void 0),us([dt({type:Boolean,reflect:!0})],vs.prototype,"scrolled",void 0),us([dt({type:Number,attribute:"scroll-pos"})],vs.prototype,"scrollPos",null),us([dt({type:Number,attribute:"scroll-max"})],vs.prototype,"scrollMax",null),us([ut()],vs.prototype,"_isDragging",void 0),us([ut()],vs.prototype,"_thumbVisible",void 0),us([ut()],vs.prototype,"_thumbFade",void 0),us([ut()],vs.prototype,"_thumbActive",void 0),us([ut()],vs.prototype,"_scrollbarTrackZ",void 0),us([pt(".content")],vs.prototype,"_contentElement",void 0),us([pt(".scrollbar-thumb",!0)],vs.prototype,"_scrollThumbElement",void 0),us([pt(".scrollable-container")],vs.prototype,"_scrollableContainer",void 0),us([ft()],vs.prototype,"_assignedElements",void 0),vs=us([at("vscode-scrollable")],vs);const ps="important",bs=" !"+ps,fs=_t(class extends Ct{constructor(t){if(super(t),t.type!==kt||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ft.add(t);const e="string"==typeof i&&i.endsWith(bs);t.includes("-")||e?s.setProperty(t,e?i.slice(0,-11):i,e?ps:""):s[t]=i}}return U}}),gs=[mt,r`
|
|
1866
1870
|
:host {
|
|
1867
1871
|
--separator-border: var(--vscode-editorWidget-border, transparent);
|
|
1868
1872
|
|
|
@@ -1969,12 +1973,12 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1969
1973
|
cursor: ns-resize;
|
|
1970
1974
|
width: 100%;
|
|
1971
1975
|
}
|
|
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,c=l?e-i:s-o;this._handlePosition=Math.max(0,Math.min(c-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=
|
|
1976
|
+
`];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,c=l?e-i:s-o;this._handlePosition=Math.max(0,Math.min(c-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=fs(n),c=Bt({"handle-overlay":!0,active:this._isDragActive,"split-vertical":"vertical"===this.split,"split-horizontal":"horizontal"===this.split}),h=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
1977
|
<div class=${Bt(d)}>
|
|
1974
|
-
<div class="start" style=${
|
|
1978
|
+
<div class="start" style=${fs({flex:o})}>
|
|
1975
1979
|
<slot name="start" @slotchange=${this._handleSlotChange}></slot>
|
|
1976
1980
|
</div>
|
|
1977
|
-
<div class="end" style=${
|
|
1981
|
+
<div class="end" style=${fs({flex:r})}>
|
|
1978
1982
|
<slot name="end" @slotchange=${this._handleSlotChange}></slot>
|
|
1979
1983
|
</div>
|
|
1980
1984
|
<div class=${c}></div>
|
|
@@ -2090,7 +2094,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2090
2094
|
class=${Bt({"active-indicator":!0,active:this.active,panel:this.panel})}
|
|
2091
2095
|
></span>
|
|
2092
2096
|
</div>
|
|
2093
|
-
`}};Bs.styles=_s,Cs([dt({type:Boolean,reflect:!0})],Bs.prototype,"active",void 0),Cs([dt({reflect:!0,attribute:"aria-controls"})],Bs.prototype,"ariaControls",void 0),Cs([dt({type:Boolean,reflect:!0})],Bs.prototype,"panel",void 0),Cs([dt({reflect:!0})],Bs.prototype,"role",void 0),Cs([dt({type:Number,reflect:!0,attribute:"tab-id"})],Bs.prototype,"tabId",void 0),Bs=Cs([at("vscode-tab-header")],Bs);const
|
|
2097
|
+
`}};Bs.styles=_s,Cs([dt({type:Boolean,reflect:!0})],Bs.prototype,"active",void 0),Cs([dt({reflect:!0,attribute:"aria-controls"})],Bs.prototype,"ariaControls",void 0),Cs([dt({type:Boolean,reflect:!0})],Bs.prototype,"panel",void 0),Cs([dt({reflect:!0})],Bs.prototype,"role",void 0),Cs([dt({type:Number,reflect:!0,attribute:"tab-id"})],Bs.prototype,"tabId",void 0),Bs=Cs([at("vscode-tab-header")],Bs);const zs=[mt,r`
|
|
2094
2098
|
:host {
|
|
2095
2099
|
display: block;
|
|
2096
2100
|
overflow: hidden;
|
|
@@ -2106,7 +2110,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2106
2110
|
:host([panel]) {
|
|
2107
2111
|
background-color: var(--vscode-panel-background);
|
|
2108
2112
|
}
|
|
2109
|
-
`];var
|
|
2113
|
+
`];var Ss=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 As=class extends gt{constructor(){super(...arguments),this.hidden=!1,this.ariaLabelledby="",this.panel=!1,this.role="tabpanel",this.tabIndex=0}render(){return L` <slot></slot> `}};As.styles=zs,Ss([dt({type:Boolean,reflect:!0})],As.prototype,"hidden",void 0),Ss([dt({reflect:!0,attribute:"aria-labelledby"})],As.prototype,"ariaLabelledby",void 0),Ss([dt({type:Boolean,reflect:!0})],As.prototype,"panel",void 0),Ss([dt({reflect:!0})],As.prototype,"role",void 0),Ss([dt({type:Number,reflect:!0})],As.prototype,"tabIndex",void 0),As=Ss([at("vscode-tab-panel")],As);const Os=[mt,r`
|
|
2110
2114
|
:host {
|
|
2111
2115
|
display: table;
|
|
2112
2116
|
table-layout: fixed;
|
|
@@ -2177,7 +2181,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2177
2181
|
table-layout: fixed;
|
|
2178
2182
|
width: 100%;
|
|
2179
2183
|
}
|
|
2180
|
-
`];var Ns=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 gt{constructor(){super(...arguments),this.role="rowgroup"}render(){return L` <slot></slot> `}};Ds.styles=Ps,Ns([dt({reflect:!0})],Ds.prototype,"role",void 0),Ds=Ns([at("vscode-table-header")],Ds);const
|
|
2184
|
+
`];var Ns=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 gt{constructor(){super(...arguments),this.role="rowgroup"}render(){return L` <slot></slot> `}};Ds.styles=Ps,Ns([dt({reflect:!0})],Ds.prototype,"role",void 0),Ds=Ns([at("vscode-table-header")],Ds);const Ts=[mt,r`
|
|
2181
2185
|
:host {
|
|
2182
2186
|
box-sizing: border-box;
|
|
2183
2187
|
color: var(--vscode-foreground);
|
|
@@ -2202,11 +2206,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2202
2206
|
white-space: inherit;
|
|
2203
2207
|
width: 100%;
|
|
2204
2208
|
}
|
|
2205
|
-
`];var
|
|
2209
|
+
`];var Vs=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 gt{constructor(){super(...arguments),this.role="columnheader"}render(){return L`
|
|
2206
2210
|
<div class="wrapper">
|
|
2207
2211
|
<slot></slot>
|
|
2208
2212
|
</div>
|
|
2209
|
-
`}};
|
|
2213
|
+
`}};Rs.styles=Ts,Vs([dt({reflect:!0})],Rs.prototype,"role",void 0),Rs=Vs([at("vscode-table-header-cell")],Rs);const Ls=[mt,r`
|
|
2210
2214
|
:host {
|
|
2211
2215
|
border-top-color: var(--vscode-editorGroup-border);
|
|
2212
2216
|
border-top-style: solid;
|
|
@@ -2341,7 +2345,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2341
2345
|
<div
|
|
2342
2346
|
class=${s}
|
|
2343
2347
|
data-index=${e}
|
|
2344
|
-
style=${
|
|
2348
|
+
style=${fs({left:i})}
|
|
2345
2349
|
@mousedown=${this._onSashMouseDown}
|
|
2346
2350
|
@mouseover=${this._onSashMouseOver}
|
|
2347
2351
|
@mouseout=${this._onSashMouseOut}
|
|
@@ -2352,7 +2356,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2352
2356
|
`:L`<div
|
|
2353
2357
|
class=${s}
|
|
2354
2358
|
data-index=${e}
|
|
2355
|
-
style=${
|
|
2359
|
+
style=${fs({left:i})}
|
|
2356
2360
|
>
|
|
2357
2361
|
<div class="sash-visible"></div>
|
|
2358
2362
|
</div>`})),e=Bt({wrapper:!0,"select-disabled":this._isDragging,"resize-cursor":this._isDragging,"compact-view":this.compact});return L`
|
|
@@ -2402,7 +2406,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2402
2406
|
display: block;
|
|
2403
2407
|
margin-left: auto;
|
|
2404
2408
|
}
|
|
2405
|
-
`];var
|
|
2409
|
+
`];var Zs=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 Ys=class extends gt{constructor(){super(),this.panel=!1,this.role="tablist",this.selectedIndex=0,this._tabHeaders=[],this._tabPanels=[],this._componentId="",this._tabFocus=0,this._componentId=_e()}attributeChangedCallback(t,e,s){super.attributeChangedCallback(t,e,s),"selected-index"===t&&this._setActiveTab(),"panel"===t&&(this._tabHeaders.forEach((t=>t.panel=null!==s)),this._tabPanels.forEach((t=>t.panel=null!==s)))}_dispatchSelectEvent(){this.dispatchEvent(new CustomEvent("vsc-select",{detail:{selectedIndex:this.selectedIndex},composed:!0})),this.dispatchEvent(new CustomEvent("vsc-tabs-select",{detail:{selectedIndex:this.selectedIndex},composed:!0}))}_setActiveTab(){this._tabFocus=this.selectedIndex,this._tabPanels.forEach(((t,e)=>{t.hidden=e!==this.selectedIndex})),this._tabHeaders.forEach(((t,e)=>{t.active=e===this.selectedIndex}))}_focusPrevTab(){0===this._tabFocus?this._tabFocus=this._tabHeaders.length-1:this._tabFocus-=1}_focusNextTab(){this._tabFocus===this._tabHeaders.length-1?this._tabFocus=0:this._tabFocus+=1}_onHeaderKeyDown(t){"ArrowLeft"!==t.key&&"ArrowRight"!==t.key||(t.preventDefault(),this._tabHeaders[this._tabFocus].setAttribute("tabindex","-1"),"ArrowLeft"===t.key?this._focusPrevTab():"ArrowRight"===t.key&&this._focusNextTab(),this._tabHeaders[this._tabFocus].setAttribute("tabindex","0"),this._tabHeaders[this._tabFocus].focus()),"Enter"===t.key&&(t.preventDefault(),this.selectedIndex=this._tabFocus,this._dispatchSelectEvent())}_moveHeadersToHeaderSlot(){const t=this._mainSlotElements.filter((t=>t instanceof Bs));t.length>0&&t.forEach((t=>t.setAttribute("slot","header")))}_onMainSlotChange(){this._moveHeadersToHeaderSlot(),this._tabPanels=this._mainSlotElements.filter((t=>t instanceof As)),this._tabPanels.forEach(((t,e)=>{t.ariaLabelledby=`t${this._componentId}-h${e}`,t.id=`t${this._componentId}-p${e}`,t.panel=this.panel})),this._setActiveTab()}_onHeaderSlotChange(){this._tabHeaders=this._headerSlotElements.filter((t=>t instanceof Bs)),this._tabHeaders.forEach(((t,e)=>{t.tabId=e,t.id=`t${this._componentId}-h${e}`,t.ariaControls=`t${this._componentId}-p${e}`,t.panel=this.panel,t.active=e===this.selectedIndex}))}_onHeaderClick(t){const e=t.composedPath().find((t=>t instanceof Bs));e&&(this.selectedIndex=e.tabId,this._setActiveTab(),this._dispatchSelectEvent())}render(){return L`
|
|
2406
2410
|
<div
|
|
2407
2411
|
class=${Bt({header:!0,panel:this.panel})}
|
|
2408
2412
|
@click=${this._onHeaderClick}
|
|
@@ -2412,7 +2416,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2412
2416
|
<slot name="addons"></slot>
|
|
2413
2417
|
</div>
|
|
2414
2418
|
<slot @slotchange=${this._onMainSlotChange}></slot>
|
|
2415
|
-
`}};
|
|
2419
|
+
`}};Ys.styles=Js,Zs([dt({type:Boolean,reflect:!0})],Ys.prototype,"panel",void 0),Zs([dt({reflect:!0})],Ys.prototype,"role",void 0),Zs([dt({type:Number,reflect:!0,attribute:"selected-index"})],Ys.prototype,"selectedIndex",void 0),Zs([ft({slot:"header"})],Ys.prototype,"_headerSlotElements",void 0),Zs([ft()],Ys.prototype,"_mainSlotElements",void 0),Ys=Zs([at("vscode-tabs")],Ys);const Xs=[mt,r`
|
|
2416
2420
|
:host {
|
|
2417
2421
|
--hover-outline-color: transparent;
|
|
2418
2422
|
--hover-outline-style: solid;
|
|
@@ -2668,8 +2672,8 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2668
2672
|
`}_renderActions(t){const e=[];return t.actions&&Array.isArray(t.actions)&&t.actions.forEach(((s,i)=>{if(s.icon){const o=L`<vscode-icon
|
|
2669
2673
|
name=${s.icon}
|
|
2670
2674
|
action-icon
|
|
2671
|
-
title=${
|
|
2672
|
-
data-item-path=${
|
|
2675
|
+
title=${zt(s.tooltip)}
|
|
2676
|
+
data-item-path=${zt(t.path?.join("/"))}
|
|
2673
2677
|
data-index=${i}
|
|
2674
2678
|
class="action-icon"
|
|
2675
2679
|
@click=${this._handleActionClick}
|
|
@@ -2683,17 +2687,17 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2683
2687
|
size="14"
|
|
2684
2688
|
class=${["filled-circle",c].join(" ")}
|
|
2685
2689
|
part="filled-circle-decoration"
|
|
2686
|
-
style=${
|
|
2690
|
+
style=${fs(h)}
|
|
2687
2691
|
></vscode-icon>`);break;case"text":e.push(L`<div
|
|
2688
2692
|
class=${["decoration-text",c].join(" ")}
|
|
2689
2693
|
part="caption-decoration"
|
|
2690
|
-
style=${
|
|
2694
|
+
style=${fs(h)}
|
|
2691
2695
|
>
|
|
2692
2696
|
${o}
|
|
2693
2697
|
</div>`)}})),e.length>0?L`<div class="decorations" part="decorations">
|
|
2694
2698
|
${e}
|
|
2695
2699
|
</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:c,itemType:h,hasFocusedItem:d=!1,hasSelectedItem:u=!1}=e,v=["contents"],p=s?["open"]:[],b=(c.length-1)*this.indent,f=this.arrows&&"leaf"===h?30+b:b,g=this._renderArrow(t),m=this._renderIcon(t),x=this.arrows?b+16:b+3,y=s&&"branch"===h?L`<ul
|
|
2696
|
-
style=${
|
|
2700
|
+
style=${fs({"--indent-guide-pos":`${x}px`})}
|
|
2697
2701
|
class=${Bt({"has-active-item":d||u})}
|
|
2698
2702
|
>
|
|
2699
2703
|
${this._renderTree(a,c)}
|
|
@@ -2701,12 +2705,12 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2701
2705
|
<li data-path=${c.join("/")} class=${p.join(" ")}>
|
|
2702
2706
|
<div
|
|
2703
2707
|
class=${v.join(" ")}
|
|
2704
|
-
style=${
|
|
2708
|
+
style=${fs({paddingLeft:`${f+3}px`})}
|
|
2705
2709
|
>
|
|
2706
2710
|
${g}${m}<span
|
|
2707
2711
|
class="text-content"
|
|
2708
2712
|
part="text-content"
|
|
2709
|
-
title=${
|
|
2713
|
+
title=${zt(r)}
|
|
2710
2714
|
>${i}${w}</span
|
|
2711
2715
|
>
|
|
2712
2716
|
${k} ${$}
|
|
@@ -2719,4 +2723,4 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2719
2723
|
${this._renderTree(this._data)}
|
|
2720
2724
|
</ul>
|
|
2721
2725
|
</div>
|
|
2722
|
-
`}};si.styles=
|
|
2726
|
+
`}};si.styles=Xs,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,Mt as VscodeButton,Jt as VscodeCheckbox,Xt as VscodeCheckboxGroup,ee as VscodeCollapsible,le as VscodeContextMenu,oe as VscodeContextMenuItem,he as VscodeDivider,fe as VscodeFormContainer,xe as VscodeFormGroup,ke as VscodeFormHelper,Et as VscodeIcon,Pe as VscodeLabel,ss as VscodeMultiSelect,We as VscodeOption,rs as VscodeProgressRing,as as VscodeRadio,ze as VscodeRadioGroup,vs as VscodeScrollable,hs as VscodeSingleSelect,$s as VscodeSplitLayout,Bs as VscodeTabHeader,As as VscodeTabPanel,Gs as VscodeTable,js as VscodeTableBody,Fs as VscodeTableCell,Ds as VscodeTableHeader,Rs as VscodeTableHeaderCell,qs as VscodeTableRow,Ys as VscodeTabs,Oe as VscodeTextarea,Ie as VscodeTextfield,si as VscodeTree};
|