@vscode-elements/elements 1.11.1-pre.3 → 1.13.0
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/README.md +95 -21
- package/custom-elements.json +1427 -1313
- package/dist/bundled.js +228 -218
- 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/includes/form-button-widget/FormButtonWidgetBase.d.ts.map +1 -1
- package/dist/includes/form-button-widget/FormButtonWidgetBase.js.map +1 -1
- package/dist/includes/helpers.d.ts +2 -0
- package/dist/includes/helpers.d.ts.map +1 -1
- package/dist/includes/helpers.js +28 -0
- package/dist/includes/helpers.js.map +1 -1
- package/dist/includes/style-property-map.d.ts.map +1 -1
- package/dist/includes/style-property-map.js.map +1 -1
- package/dist/includes/vscode-select/vscode-select-base.d.ts.map +1 -1
- package/dist/includes/vscode-select/vscode-select-base.js +13 -8
- package/dist/includes/vscode-select/vscode-select-base.js.map +1 -1
- package/dist/vscode-badge/vscode-badge.d.ts +7 -6
- package/dist/vscode-badge/vscode-badge.d.ts.map +1 -1
- package/dist/vscode-badge/vscode-badge.js +6 -5
- package/dist/vscode-badge/vscode-badge.js.map +1 -1
- package/dist/vscode-badge/vscode-badge.styles.d.ts.map +1 -1
- package/dist/vscode-badge/vscode-badge.styles.js +22 -10
- package/dist/vscode-badge/vscode-badge.styles.js.map +1 -1
- package/dist/vscode-button/vscode-button.d.ts +11 -11
- package/dist/vscode-button/vscode-button.d.ts.map +1 -1
- package/dist/vscode-button/vscode-button.js +11 -11
- package/dist/vscode-button/vscode-button.js.map +1 -1
- package/dist/vscode-button/vscode-button.styles.d.ts.map +1 -1
- package/dist/vscode-button/vscode-button.styles.js +21 -19
- package/dist/vscode-button/vscode-button.styles.js.map +1 -1
- package/dist/vscode-checkbox/vscode-checkbox.d.ts.map +1 -1
- package/dist/vscode-checkbox/vscode-checkbox.js +1 -1
- package/dist/vscode-checkbox/vscode-checkbox.js.map +1 -1
- package/dist/vscode-checkbox-group/vscode-checkbox-group.d.ts.map +1 -1
- package/dist/vscode-checkbox-group/vscode-checkbox-group.js.map +1 -1
- package/dist/vscode-collapsible/vscode-collapsible.d.ts.map +1 -1
- package/dist/vscode-collapsible/vscode-collapsible.js.map +1 -1
- package/dist/vscode-context-menu/vscode-context-menu.d.ts.map +1 -1
- package/dist/vscode-context-menu/vscode-context-menu.js.map +1 -1
- package/dist/vscode-context-menu-item/vscode-context-menu-item.d.ts.map +1 -1
- package/dist/vscode-context-menu-item/vscode-context-menu-item.js.map +1 -1
- package/dist/vscode-divider/vscode-divider.d.ts.map +1 -1
- package/dist/vscode-divider/vscode-divider.js.map +1 -1
- package/dist/vscode-form-container/vscode-form-container.d.ts.map +1 -1
- package/dist/vscode-form-container/vscode-form-container.js.map +1 -1
- package/dist/vscode-form-group/vscode-form-group.d.ts.map +1 -1
- package/dist/vscode-form-group/vscode-form-group.js.map +1 -1
- package/dist/vscode-form-helper/vscode-form-helper.d.ts.map +1 -1
- package/dist/vscode-form-helper/vscode-form-helper.js.map +1 -1
- package/dist/vscode-form-helper/vscode-form-helper.styles.js +1 -1
- package/dist/vscode-form-helper/vscode-form-helper.styles.js.map +1 -1
- package/dist/vscode-icon/vscode-icon.d.ts.map +1 -1
- package/dist/vscode-icon/vscode-icon.js +1 -1
- package/dist/vscode-icon/vscode-icon.js.map +1 -1
- package/dist/vscode-label/vscode-label.d.ts.map +1 -1
- package/dist/vscode-label/vscode-label.js.map +1 -1
- package/dist/vscode-multi-select/vscode-multi-select.d.ts.map +1 -1
- package/dist/vscode-multi-select/vscode-multi-select.js +3 -4
- package/dist/vscode-multi-select/vscode-multi-select.js.map +1 -1
- package/dist/vscode-option/vscode-option.d.ts.map +1 -1
- package/dist/vscode-option/vscode-option.js.map +1 -1
- package/dist/vscode-progress-ring/vscode-progress-ring.d.ts.map +1 -1
- package/dist/vscode-progress-ring/vscode-progress-ring.js.map +1 -1
- package/dist/vscode-radio/vscode-radio.d.ts.map +1 -1
- package/dist/vscode-radio/vscode-radio.js +1 -1
- package/dist/vscode-radio/vscode-radio.js.map +1 -1
- package/dist/vscode-radio-group/vscode-radio-group.d.ts.map +1 -1
- package/dist/vscode-radio-group/vscode-radio-group.js.map +1 -1
- package/dist/vscode-scrollable/vscode-scrollable.d.ts.map +1 -1
- package/dist/vscode-scrollable/vscode-scrollable.js.map +1 -1
- package/dist/vscode-single-select/vscode-single-select.d.ts.map +1 -1
- package/dist/vscode-single-select/vscode-single-select.js +2 -1
- package/dist/vscode-single-select/vscode-single-select.js.map +1 -1
- package/dist/vscode-split-layout/vscode-split-layout.d.ts +2 -0
- package/dist/vscode-split-layout/vscode-split-layout.d.ts.map +1 -1
- package/dist/vscode-split-layout/vscode-split-layout.js +2 -0
- package/dist/vscode-split-layout/vscode-split-layout.js.map +1 -1
- package/dist/vscode-tab-header/vscode-tab-header.d.ts.map +1 -1
- package/dist/vscode-tab-header/vscode-tab-header.js.map +1 -1
- package/dist/vscode-tab-panel/vscode-tab-panel.d.ts.map +1 -1
- package/dist/vscode-tab-panel/vscode-tab-panel.js.map +1 -1
- package/dist/vscode-table/vscode-table.d.ts +21 -7
- package/dist/vscode-table/vscode-table.d.ts.map +1 -1
- package/dist/vscode-table/vscode-table.js +36 -7
- package/dist/vscode-table/vscode-table.js.map +1 -1
- package/dist/vscode-table-body/vscode-table-body.d.ts.map +1 -1
- package/dist/vscode-table-body/vscode-table-body.js.map +1 -1
- package/dist/vscode-table-cell/vscode-table-cell.d.ts.map +1 -1
- package/dist/vscode-table-cell/vscode-table-cell.js.map +1 -1
- package/dist/vscode-table-header/vscode-table-header.d.ts.map +1 -1
- package/dist/vscode-table-header/vscode-table-header.js.map +1 -1
- package/dist/vscode-table-header-cell/vscode-table-header-cell.d.ts.map +1 -1
- package/dist/vscode-table-header-cell/vscode-table-header-cell.js.map +1 -1
- package/dist/vscode-table-row/vscode-table-row.d.ts.map +1 -1
- package/dist/vscode-table-row/vscode-table-row.js.map +1 -1
- package/dist/vscode-tabs/vscode-tabs.d.ts.map +1 -1
- package/dist/vscode-tabs/vscode-tabs.js.map +1 -1
- package/dist/vscode-textarea/vscode-textarea.d.ts.map +1 -1
- package/dist/vscode-textarea/vscode-textarea.js.map +1 -1
- package/dist/vscode-textfield/vscode-textfield.d.ts +14 -11
- package/dist/vscode-textfield/vscode-textfield.d.ts.map +1 -1
- package/dist/vscode-textfield/vscode-textfield.js +15 -12
- package/dist/vscode-textfield/vscode-textfield.js.map +1 -1
- package/dist/vscode-textfield/vscode-textfield.styles.d.ts.map +1 -1
- package/dist/vscode-textfield/vscode-textfield.styles.js +20 -18
- package/dist/vscode-textfield/vscode-textfield.styles.js.map +1 -1
- package/dist/vscode-tree/vscode-tree.d.ts.map +1 -1
- package/dist/vscode-tree/vscode-tree.js.map +1 -1
- package/package.json +5 -3
- package/vscode.css-custom-data.json +19 -3
- package/vscode.html-custom-data.json +24 -27
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:h,getOwnPropertyNames:c,getOwnPropertySymbols:d,getPrototypeOf:u}=Object,v=globalThis,p=v.trustedTypes,b=p?p.emptyScript:"",f=v.reactiveElementPolyfillSupport,g=(t,e)=>t,m={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},x=(t,e)=>!l(t,e),y={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;class w extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&a(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=h(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);o.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(g("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(g("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(g("properties"))){const t=this.properties,e=[...c(t),...d(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(n(t))}else void 0!==t&&e.push(n(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((s,i)=>{if(e)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of i){const i=document.createElement("style"),o=t.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)}})(s,this.constructor.elementStyles),s}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:m).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:m;this._$Em=i,this[i]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??x)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[g("elementProperties")]=new Map,w[g("finalized")]=new Map,f?.({ReactiveElement:w}),(v.reactiveElementVersions??=[]).push("2.0.4");const k=globalThis,$=k.trustedTypes,_=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,S="?"+B,z=`<${S}>`,A=document,O=()=>A.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,I=t=>j(t)||"function"==typeof t?.[Symbol.iterator],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,T=/"/g,R=/^(?:script|style|textarea|title)$/i,L=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),U=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),H=new WeakMap,K=A.createTreeWalker(A,129);function W(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==_?_.createHTML(e):e}const G=(t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<s;e++){const s=t[e];let l,a,h=-1,c=0;for(;c<s.length&&(n.lastIndex=c,a=n.exec(s),null!==a);)c=n.lastIndex,n===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,h=-1):void 0===a[1]?h=-2:(h=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?D:'"'===a[3]?T:V):n===T||n===V?n=D:n===P||n===N?n=F:(n=D,o=void 0);const d=n===D&&t[e+1].startsWith("/>")?" ":"";r+=n===F?s+z:h>=0?(i.push(l),s.slice(0,h)+C+s.slice(h)+B+d):s+B+(-2===h?e:d)}return[W(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class J{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,h]=G(t,e);if(this.el=J.createElement(a,s),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=K.nextNode())&&l.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(C)){const e=h[r++],s=i.getAttribute(t).split(B),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?tt:"?"===n[1]?et:"@"===n[1]?st:Q}),i.removeAttribute(t)}else t.startsWith(B)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(R.test(i.tagName)){const t=i.textContent.split(B),e=t.length-1;if(e>0){i.textContent=$?$.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],O()),K.nextNode(),l.push({type:2,index:++o});i.append(t[e],O())}}}else if(8===i.nodeType)if(i.data===S)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(B,t+1));)l.push({type:7,index:o}),t+=B.length-1}o++}}static createElement(t,e){const s=A.createElement("template");return s.innerHTML=t,s}}function Y(t,e,s=t,i){if(e===U)return e;let o=void 0!==i?s.o?.[i]:s.l;const r=E(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,s,i)),void 0!==i?(s.o??=[])[i]=o:s.l=o),void 0!==o&&(e=Y(t,o._$AS(t,e.values),o,i)),e}class X{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??A).importNode(e,!0);K.currentNode=i;let o=K.nextNode(),r=0,n=0,l=s[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Z(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new it(o,this,t)),this._$AV.push(e),l=s[++n]}r!==l?.index&&(o=K.nextNode(),r++)}return K.currentNode=A,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}let Z=class t{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,s,i){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Y(this,t,e),E(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):I(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==q&&E(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=J.createElement(W(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new X(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=H.get(t.strings);return void 0===e&&H.set(t.strings,e=new J(t)),e}k(e){j(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,o=0;for(const r of e)o===s.length?s.push(i=new t(this.O(O()),this.O(O()),this,this.options)):i=s[o],i._$AI(r),o++;o<s.length&&(this._$AR(i&&i._$AB.nextSibling,o),s.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this.v=t,this._$AP?.(t))}};class Q{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=q}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(void 0===o)t=Y(this,t,e,0),r=!E(t)||t!==this._$AH&&t!==U,r&&(this._$AH=t);else{const i=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Y(this,i[s+n],e,n),l===U&&(l=this._$AH[n]),r||=!E(l)||l!==this._$AH[n],l===q?t=q:t!==q&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!i&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class et extends Q{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class st extends Q{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=Y(this,t,e,0)??q)===U)return;const s=this._$AH,i=t===q&&s!==q||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==q&&(s===q||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const ot={M:C,P:B,A:S,C:1,L:G,R:X,D:I,V:Y,I:Z,H:Q,N:et,U:st,B:tt,F:it},rt=k.litHtmlPolyfillSupport;rt?.(J,Z),(k.litHtmlVersions??=[]).push("3.2.0");class nt extends w{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=((t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new Z(e.insertBefore(O(),t),t,void 0,s??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return U}}nt._$litElement$=!0,nt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:nt});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:nt}),(globalThis.litElementVersions??=[]).push("4.1.0");const at=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},ht={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x},ct=(t=ht,e,s)=>{const{kind:i,metadata:o}=s;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),r.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const o=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,o,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const o=this[i];e.call(this,s),this.requestUpdate(i,o,t)}}throw Error("Unsupported decorator location: "+i)};function dt(t){return(e,s)=>"object"==typeof s?ct(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}function ut(t){return dt({...t,state:!0,attribute:!1})}const vt=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,s);function pt(t,e){return(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.3"}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=>new o("string"==typeof t?t:t+"",void 0,s),n=(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)},l=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t,{is:a,defineProperty:c,getOwnPropertyDescriptor:h,getOwnPropertyNames:d,getOwnPropertySymbols:u,getPrototypeOf:v}=Object,p=globalThis,b=p.trustedTypes,f=b?b.emptyScript:"",g=p.reactiveElementPolyfillSupport,m=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let 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}},y=(t,e)=>!a(t,e),w={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),p.litPropertyMetadata??=new WeakMap;class k 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=w){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&&c(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=h(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);o.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=v(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,e=[...d(t),...u(t)];for(const 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(l(t))}else void 0!==t&&e.push(l(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:x).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:x;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??y)(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){}}k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[m("elementProperties")]=new Map,k[m("finalized")]=new Map,g?.({ReactiveElement:k}),(p.reactiveElementVersions??=[]).push("2.0.4");const $=globalThis,_=$.trustedTypes,C=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,B="$lit$",S=`lit$${Math.random().toFixed(9).slice(2)}$`,z="?"+S,A=`<${z}>`,O=document,E=()=>O.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,M=t=>I(t)||"function"==typeof t?.[Symbol.iterator],F="[ \t\n\f\r]",P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,N=/>/g,V=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),R=/'/g,T=/"/g,L=/^(?:script|style|textarea|title)$/i,U=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),q=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),K=new WeakMap,W=O.createTreeWalker(O,129);function G(t,e){if(!I(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==C?C.createHTML(e):e}const J=(t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=P;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===P?"!--"===a[1]?n=D:void 0!==a[1]?n=N:void 0!==a[2]?(L.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=V):void 0!==a[3]&&(n=V):n===V?">"===a[0]?(n=o??P,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?V:'"'===a[3]?T:R):n===T||n===R?n=V:n===D||n===N?n=P:(n=V,o=void 0);const d=n===V&&t[e+1].startsWith("/>")?" ":"";r+=n===P?s+A:c>=0?(i.push(l),s.slice(0,c)+B+s.slice(c)+S+d):s+S+(-2===c?e:d)}return[G(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class Y{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]=J(t,e);if(this.el=Y.createElement(a,s),W.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=W.nextNode())&&l.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(B)){const e=c[r++],s=i.getAttribute(t).split(S),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?et:"?"===n[1]?st:"@"===n[1]?it:tt}),i.removeAttribute(t)}else t.startsWith(S)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(L.test(i.tagName)){const t=i.textContent.split(S),e=t.length-1;if(e>0){i.textContent=_?_.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],E()),W.nextNode(),l.push({type:2,index:++o});i.append(t[e],E())}}}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(S,t+1));)l.push({type:7,index:o}),t+=S.length-1}o++}}static createElement(t,e){const s=O.createElement("template");return s.innerHTML=t,s}}function X(t,e,s=t,i){if(e===q)return e;let o=void 0!==i?s.o?.[i]:s.l;const r=j(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=X(t,o._$AS(t,e.values),o,i)),e}class Z{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??O).importNode(e,!0);W.currentNode=i;let o=W.nextNode(),r=0,n=0,l=s[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new Q(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new ot(o,this,t)),this._$AV.push(e),l=s[++n]}r!==l?.index&&(o=W.nextNode(),r++)}return W.currentNode=O,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 Q=class t{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,s,i){this.type=2,this._$AH=H,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=X(this,t,e),j(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):t!==this._$AH&&t!==q&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):M(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!==H&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(O.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=Y.createElement(G(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Z(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new Y(t)),e}k(e){I(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(E()),this.O(E()),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 tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=H,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=H}_$AI(t,e=this,s,i){const o=this.strings;let r=!1;if(void 0===o)t=X(this,t,e,0),r=!j(t)||t!==this._$AH&&t!==q,r&&(this._$AH=t);else{const i=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=X(this,i[s+n],e,n),l===q&&(l=this._$AH[n]),r||=!j(l)||l!==this._$AH[n],l===H?t=H:t!==H&&(t+=(l??"")+o[n+1]),this._$AH[n]=l}r&&!i&&this.j(t)}j(t){t===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===H?void 0:t}}class st extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==H)}}class it extends tt{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=X(this,t,e,0)??H)===q)return;const s=this._$AH,i=t===H&&s!==H||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==H&&(s===H||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 ot{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){X(this,t)}}const rt={M:B,P:S,A:z,C:1,L:J,R:Z,D:M,V:X,I:Q,H:tt,N:st,U:it,B:et,F:ot},nt=$.litHtmlPolyfillSupport;nt?.(Y,Q),($.litHtmlVersions??=[]).push("3.2.0");class lt extends k{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 Q(e.insertBefore(E(),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 q}}lt._$litElement$=!0,lt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:lt});const at=globalThis.litElementPolyfillSupport;at?.({LitElement:lt}),(globalThis.litElementVersions??=[]).push("4.1.0");const ct=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},ht={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:y},dt=(t=ht,e,s)=>{const{kind:i,metadata:o}=s;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),r.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const o=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,o,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const o=this[i];e.call(this,s),this.requestUpdate(i,o,t)}}throw Error("Unsupported decorator location: "+i)};function ut(t){return(e,s)=>"object"==typeof s?dt(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 vt(t){return ut({...t,state:!0,attribute:!1})}const pt=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,s);function bt(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 pt(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 pt(0,0,{get(){return r(this)}})}}let ft;function gt(t){return(e,s)=>{const{slot:i,selector:o}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return pt(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 mt extends lt{constructor(){super(...arguments),this._version="1.13.0"}get version(){return this._version}}var xt=n`
|
|
2
2
|
:host([hidden]) {
|
|
3
3
|
display: none;
|
|
4
4
|
}
|
|
@@ -9,15 +9,15 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
9
9
|
opacity: 0.4;
|
|
10
10
|
pointer-events: none;
|
|
11
11
|
}
|
|
12
|
-
`;const
|
|
12
|
+
`;function yt(){return navigator.userAgent.indexOf("Linux")>-1?'system-ui, "Ubuntu", "Droid Sans", sans-serif':navigator.userAgent.indexOf("Mac")>-1?"-apple-system, BlinkMacSystemFont, sans-serif":navigator.userAgent.indexOf("Windows")>-1?'"Segoe WPC", "Segoe UI", sans-serif':"sans-serif"}const wt=[xt,n`
|
|
13
13
|
:host {
|
|
14
|
-
background-color: var(--vscode-badge-background);
|
|
14
|
+
background-color: var(--vscode-badge-background, #616161);
|
|
15
15
|
border: 1px solid var(--vscode-contrastBorder, transparent);
|
|
16
16
|
border-radius: 2px;
|
|
17
17
|
box-sizing: border-box;
|
|
18
|
-
color: var(--vscode-badge-foreground);
|
|
18
|
+
color: var(--vscode-badge-foreground, #f8f8f8);
|
|
19
19
|
display: inline-block;
|
|
20
|
-
font-family: var(--vscode-font-family);
|
|
20
|
+
font-family: var(--vscode-font-family, ${r(yt())});
|
|
21
21
|
font-size: 11px;
|
|
22
22
|
font-weight: 400;
|
|
23
23
|
line-height: 14px;
|
|
@@ -29,22 +29,32 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
29
29
|
|
|
30
30
|
:host([variant='counter']) {
|
|
31
31
|
border-radius: 11px;
|
|
32
|
-
|
|
33
|
-
height: 18px;
|
|
34
|
-
|
|
35
|
-
padding: 3px
|
|
32
|
+
line-height: 11px;
|
|
33
|
+
min-height: 18px;
|
|
34
|
+
min-width: 18px;
|
|
35
|
+
padding: 3px 6px;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
:host([variant='activity-bar-counter']) {
|
|
39
|
-
background-color: var(--vscode-activityBarBadge-background);
|
|
39
|
+
background-color: var(--vscode-activityBarBadge-background, #0078d4);
|
|
40
40
|
border-radius: 20px;
|
|
41
|
-
color: var(--vscode-activityBarBadge-foreground);
|
|
41
|
+
color: var(--vscode-activityBarBadge-foreground, #ffffff);
|
|
42
42
|
font-size: 9px;
|
|
43
43
|
font-weight: 600;
|
|
44
44
|
line-height: 16px;
|
|
45
45
|
padding: 0 4px;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
|
|
48
|
+
:host([variant='tab-header-counter']) {
|
|
49
|
+
background-color: var(--vscode-activityBarBadge-background, #0078d4);
|
|
50
|
+
border-radius: 10px;
|
|
51
|
+
color: var(--vscode-activityBarBadge-foreground, #ffffff);
|
|
52
|
+
line-height: 10px;
|
|
53
|
+
min-height: 16px;
|
|
54
|
+
min-width: 16px;
|
|
55
|
+
padding: 3px 5px;
|
|
56
|
+
}
|
|
57
|
+
`];var kt=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 $t=class extends mt{constructor(){super(...arguments),this.variant="default"}render(){return U` <slot></slot> `}};$t.styles=wt,kt([ut({reflect:!0})],$t.prototype,"variant",void 0),$t=kt([ct("vscode-badge")],$t);const _t=1,Ct=2,Bt=3,St=t=>(...e)=>({_$litDirective$:t,values:e});class zt{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 At=St(class extends zt{constructor(t){if(super(t),t.type!==_t||"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 q}}),Ot=t=>t??H;const Et=St(class extends zt{constructor(t){if(super(t),this._prevProperties={},t.type!==Bt||"style"!==t.name)throw new Error("The `stylePropertyMap` directive must be used in the `style` property")}update(t,[e]){return Object.entries(e).forEach((([e,s])=>{this._prevProperties[e]!==s&&(e.startsWith("--")?t.element.style.setProperty(e,s):t.element.style[e]=s,this._prevProperties[e]=s)})),q}render(t){return q}}),jt=[xt,n`
|
|
48
58
|
:host {
|
|
49
59
|
color: var(--vscode-icon-foreground);
|
|
50
60
|
display: inline-block;
|
|
@@ -98,40 +108,40 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
98
108
|
animation-timing-function: linear;
|
|
99
109
|
animation-iteration-count: infinite;
|
|
100
110
|
}
|
|
101
|
-
`];var
|
|
102
|
-
class=${
|
|
103
|
-
.style=${
|
|
104
|
-
></span>`,i=this.actionIcon?
|
|
111
|
+
`];var It,Mt=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 Ft=It=class extends mt{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();It.stylesheetHref=t,It.nonce=e}_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}=It,s=U`<span
|
|
112
|
+
class=${At({codicon:!0,["codicon-"+this.name]:!0,spin:this.spin})}
|
|
113
|
+
.style=${Et({animationDuration:String(this.spinDuration)+"s",fontSize:this.size+"px",height:this.size+"px",width:this.size+"px"})}
|
|
114
|
+
></span>`,i=this.actionIcon?U` <button
|
|
105
115
|
class="button"
|
|
106
116
|
@click=${this._onButtonClick}
|
|
107
117
|
aria-label=${this.label}
|
|
108
118
|
>
|
|
109
119
|
${s}
|
|
110
|
-
</button>`:
|
|
120
|
+
</button>`:U` <span class="icon" aria-hidden="true" role="presentation"
|
|
111
121
|
>${s}</span
|
|
112
|
-
>`;return
|
|
122
|
+
>`;return U`
|
|
113
123
|
<link
|
|
114
124
|
rel="stylesheet"
|
|
115
|
-
href=${
|
|
116
|
-
nonce=${
|
|
117
|
-
|
|
125
|
+
href=${Ot(t)}
|
|
126
|
+
nonce=${Ot(e)}
|
|
127
|
+
>
|
|
118
128
|
${i}
|
|
119
|
-
`}};
|
|
129
|
+
`}};Ft.styles=jt,Ft.stylesheetHref="",Ft.nonce="",Mt([ut()],Ft.prototype,"label",void 0),Mt([ut({type:String})],Ft.prototype,"name",void 0),Mt([ut({type:Number})],Ft.prototype,"size",void 0),Mt([ut({type:Boolean,reflect:!0})],Ft.prototype,"spin",void 0),Mt([ut({type:Number,attribute:"spin-duration"})],Ft.prototype,"spinDuration",void 0),Mt([ut({type:Boolean,reflect:!0,attribute:"action-icon"})],Ft.prototype,"actionIcon",void 0),Ft=It=Mt([ct("vscode-icon")],Ft);const Pt=[xt,n`
|
|
120
130
|
:host {
|
|
121
|
-
background-color: var(--vscode-button-background);
|
|
131
|
+
background-color: var(--vscode-button-background, #0078d4);
|
|
122
132
|
border-color: var(
|
|
123
133
|
--vscode-button-border,
|
|
124
|
-
var(--vscode-button-background)
|
|
134
|
+
var(--vscode-button-background, rgba(255, 255, 255, 0.07))
|
|
125
135
|
);
|
|
126
136
|
border-style: solid;
|
|
127
137
|
border-radius: 2px;
|
|
128
138
|
border-width: 1px;
|
|
129
|
-
color: var(--vscode-button-foreground);
|
|
139
|
+
color: var(--vscode-button-foreground, #ffffff);
|
|
130
140
|
cursor: pointer;
|
|
131
141
|
display: inline-block;
|
|
132
|
-
font-family: var(--vscode-font-family);
|
|
133
|
-
font-size: var(--vscode-font-size);
|
|
134
|
-
font-weight: var(--vscode-font-weight);
|
|
142
|
+
font-family: var(--vscode-font-family, ${r(yt())});
|
|
143
|
+
font-size: var(--vscode-font-size, 13px);
|
|
144
|
+
font-weight: var(--vscode-font-weight, normal);
|
|
135
145
|
line-height: 22px;
|
|
136
146
|
overflow: hidden;
|
|
137
147
|
padding: 1px 13px;
|
|
@@ -140,11 +150,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
140
150
|
}
|
|
141
151
|
|
|
142
152
|
:host([secondary]) {
|
|
143
|
-
color: var(--vscode-button-secondaryForeground);
|
|
144
|
-
background-color: var(--vscode-button-secondaryBackground);
|
|
153
|
+
color: var(--vscode-button-secondaryForeground, #cccccc);
|
|
154
|
+
background-color: var(--vscode-button-secondaryBackground, #313131);
|
|
145
155
|
border-color: var(
|
|
146
156
|
--vscode-button-border,
|
|
147
|
-
var(--vscode-button-secondaryBackground)
|
|
157
|
+
var(--vscode-button-secondaryBackground, rgba(255, 255, 255, 0.07))
|
|
148
158
|
);
|
|
149
159
|
}
|
|
150
160
|
|
|
@@ -155,19 +165,19 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
155
165
|
}
|
|
156
166
|
|
|
157
167
|
:host(:hover) {
|
|
158
|
-
background-color: var(--vscode-button-hoverBackground);
|
|
168
|
+
background-color: var(--vscode-button-hoverBackground, #026ec1);
|
|
159
169
|
}
|
|
160
170
|
|
|
161
171
|
:host([disabled]:hover) {
|
|
162
|
-
background-color: var(--vscode-button-background);
|
|
172
|
+
background-color: var(--vscode-button-background, #0078d4);
|
|
163
173
|
}
|
|
164
174
|
|
|
165
175
|
:host([secondary]:hover) {
|
|
166
|
-
background-color: var(--vscode-button-secondaryHoverBackground);
|
|
176
|
+
background-color: var(--vscode-button-secondaryHoverBackground, #3c3c3c);
|
|
167
177
|
}
|
|
168
178
|
|
|
169
179
|
:host([secondary][disabled]:hover) {
|
|
170
|
-
background-color: var(--vscode-button-secondaryBackground);
|
|
180
|
+
background-color: var(--vscode-button-secondaryBackground, #313131);
|
|
171
181
|
}
|
|
172
182
|
|
|
173
183
|
:host(:focus),
|
|
@@ -176,22 +186,22 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
176
186
|
}
|
|
177
187
|
|
|
178
188
|
:host(:focus) {
|
|
179
|
-
background-color: var(--vscode-button-hoverBackground);
|
|
180
|
-
outline: 1px solid var(--vscode-focusBorder);
|
|
189
|
+
background-color: var(--vscode-button-hoverBackground, #026ec1);
|
|
190
|
+
outline: 1px solid var(--vscode-focusBorder, #0078d4);
|
|
181
191
|
outline-offset: 2px;
|
|
182
192
|
}
|
|
183
193
|
|
|
184
194
|
:host([disabled]:focus) {
|
|
185
|
-
background-color: var(--vscode-button-background);
|
|
195
|
+
background-color: var(--vscode-button-background, #0078d4);
|
|
186
196
|
outline: 0;
|
|
187
197
|
}
|
|
188
198
|
|
|
189
199
|
:host([secondary]:focus) {
|
|
190
|
-
background-color: var(--vscode-button-secondaryHoverBackground);
|
|
200
|
+
background-color: var(--vscode-button-secondaryHoverBackground, #3c3c3c);
|
|
191
201
|
}
|
|
192
202
|
|
|
193
203
|
:host([secondary][disabled]:focus) {
|
|
194
|
-
background-color: var(--vscode-button-secondaryBackground);
|
|
204
|
+
background-color: var(--vscode-button-secondaryBackground, #313131);
|
|
195
205
|
}
|
|
196
206
|
|
|
197
207
|
::slotted(*) {
|
|
@@ -234,23 +244,23 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
234
244
|
display: block;
|
|
235
245
|
margin-left: 3px;
|
|
236
246
|
}
|
|
237
|
-
`];var
|
|
247
|
+
`];var Dt=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 Nt=class extends mt{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?U`<vscode-icon
|
|
238
248
|
name=${this.icon}
|
|
239
249
|
?spin=${this.iconSpin}
|
|
240
|
-
spin-duration=${
|
|
250
|
+
spin-duration=${Ot(this.iconSpinDuration)}
|
|
241
251
|
class="icon"
|
|
242
|
-
></vscode-icon>`:
|
|
252
|
+
></vscode-icon>`:H,o=e?U`<vscode-icon
|
|
243
253
|
name=${this.iconAfter}
|
|
244
254
|
?spin=${this.iconAfterSpin}
|
|
245
|
-
spin-duration=${
|
|
255
|
+
spin-duration=${Ot(this.iconAfterSpinDuration)}
|
|
246
256
|
class="icon-after"
|
|
247
|
-
></vscode-icon>`:
|
|
248
|
-
<span class=${
|
|
257
|
+
></vscode-icon>`:H;return U`
|
|
258
|
+
<span class=${At(s)}>
|
|
249
259
|
${i}
|
|
250
260
|
<slot></slot>
|
|
251
261
|
${o}
|
|
252
262
|
</span>
|
|
253
|
-
`}};
|
|
263
|
+
`}};Nt.styles=Pt,Nt.formAssociated=!0,Dt([ut({type:Boolean,reflect:!0})],Nt.prototype,"autofocus",void 0),Dt([ut({type:Number,reflect:!0})],Nt.prototype,"tabIndex",void 0),Dt([ut({type:Boolean,reflect:!0})],Nt.prototype,"secondary",void 0),Dt([ut({reflect:!0})],Nt.prototype,"role",void 0),Dt([ut({type:Boolean,reflect:!0})],Nt.prototype,"disabled",void 0),Dt([ut()],Nt.prototype,"icon",void 0),Dt([ut({type:Boolean,reflect:!0,attribute:"icon-spin"})],Nt.prototype,"iconSpin",void 0),Dt([ut({type:Number,reflect:!0,attribute:"icon-spin-duration"})],Nt.prototype,"iconSpinDuration",void 0),Dt([ut({attribute:"icon-after"})],Nt.prototype,"iconAfter",void 0),Dt([ut({type:Boolean,reflect:!0,attribute:"icon-after-spin"})],Nt.prototype,"iconAfterSpin",void 0),Dt([ut({type:Number,reflect:!0,attribute:"icon-after-spin-duration"})],Nt.prototype,"iconAfterSpinDuration",void 0),Dt([ut({type:Boolean,reflect:!0})],Nt.prototype,"focused",void 0),Dt([ut({type:String,reflect:!0})],Nt.prototype,"name",void 0),Dt([ut({reflect:!0})],Nt.prototype,"type",void 0),Dt([ut()],Nt.prototype,"value",void 0),Nt=Dt([ct("vscode-button")],Nt);var Vt=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 Rt extends mt{constructor(){super(),this.focused=!1,this._prevTabindex=0,this._handleFocus=()=>{this.focused=!0},this._handleBlur=()=>{this.focused=!1}}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)}}Vt([ut({type:Boolean,reflect:!0})],Rt.prototype,"focused",void 0);var Tt=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 Lt=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?U`<span class="label-attr">${this._label}</span>`:U`${H}`}}return Tt([ut()],e.prototype,"label",null),e};var Ut=[n`
|
|
254
264
|
:host {
|
|
255
265
|
color: var(--vsc-foreground-translucent);
|
|
256
266
|
display: inline-block;
|
|
@@ -339,7 +349,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
339
349
|
:host([disabled]) .label {
|
|
340
350
|
cursor: default;
|
|
341
351
|
}
|
|
342
|
-
`];const
|
|
352
|
+
`];const qt=[xt,Ut,n`
|
|
343
353
|
:host(:invalid) .icon,
|
|
344
354
|
:host([invalid]) .icon {
|
|
345
355
|
background-color: var(--vscode-inputValidation-errorBackground);
|
|
@@ -361,7 +371,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
361
371
|
outline: 1px solid var(--vscode-focusBorder);
|
|
362
372
|
outline-offset: -1px;
|
|
363
373
|
}
|
|
364
|
-
`];var
|
|
374
|
+
`];var Ht=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 Kt=class extends(Lt(Rt)){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=At({icon:!0,checked:this.checked,indeterminate:this.indeterminate}),e=At({"label-inner":!0}),s=U`<svg
|
|
365
375
|
width="16"
|
|
366
376
|
height="16"
|
|
367
377
|
viewBox="0 0 16 16"
|
|
@@ -374,7 +384,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
374
384
|
clip-rule="evenodd"
|
|
375
385
|
d="M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"
|
|
376
386
|
/>
|
|
377
|
-
</svg>`,i=this.checked&&!this.indeterminate?s:
|
|
387
|
+
</svg>`,i=this.checked&&!this.indeterminate?s:H,o=this.indeterminate?U`<span class="indeterminate-icon"></span>`:H;return U`
|
|
378
388
|
<div class="wrapper">
|
|
379
389
|
<input
|
|
380
390
|
?autofocus=${this.autofocus}
|
|
@@ -383,7 +393,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
383
393
|
type="checkbox"
|
|
384
394
|
?checked=${this.checked}
|
|
385
395
|
value=${this.value}
|
|
386
|
-
|
|
396
|
+
>
|
|
387
397
|
<div class=${t}>${o}${i}</div>
|
|
388
398
|
<label for="input" class="label" @click=${this._handleClick}>
|
|
389
399
|
<span class=${e}>
|
|
@@ -392,7 +402,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
392
402
|
</span>
|
|
393
403
|
</label>
|
|
394
404
|
</div>
|
|
395
|
-
`}};
|
|
405
|
+
`}};Kt.styles=qt,Kt.formAssociated=!0,Kt.shadowRootOptions={...lt.shadowRootOptions,delegatesFocus:!0},Ht([ut({type:Boolean,reflect:!0})],Kt.prototype,"autofocus",void 0),Ht([ut({type:Boolean,reflect:!0})],Kt.prototype,"checked",null),Ht([ut({type:Boolean,reflect:!0,attribute:"default-checked"})],Kt.prototype,"defaultChecked",void 0),Ht([ut({type:Boolean,reflect:!0})],Kt.prototype,"invalid",void 0),Ht([ut({reflect:!0})],Kt.prototype,"name",void 0),Ht([ut({reflect:!0})],Kt.prototype,"role",void 0),Ht([ut()],Kt.prototype,"value",void 0),Ht([ut({type:Boolean,reflect:!0})],Kt.prototype,"disabled",void 0),Ht([ut({type:Boolean,reflect:!0})],Kt.prototype,"indeterminate",void 0),Ht([ut({type:Boolean,reflect:!0})],Kt.prototype,"required",null),Ht([ut()],Kt.prototype,"type",void 0),Ht([bt("#input")],Kt.prototype,"_inputEl",void 0),Kt=Ht([ct("vscode-checkbox")],Kt);const Wt=[xt,n`
|
|
396
406
|
:host {
|
|
397
407
|
display: block;
|
|
398
408
|
}
|
|
@@ -422,11 +432,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
422
432
|
:host([variant='vertical']) ::slotted(vscode-checkbox:last-child) {
|
|
423
433
|
margin-bottom: 0;
|
|
424
434
|
}
|
|
425
|
-
`];var
|
|
435
|
+
`];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 mt{constructor(){super(...arguments),this.role="group",this.variant="horizontal"}render(){return U`
|
|
426
436
|
<div class="wrapper">
|
|
427
437
|
<slot></slot>
|
|
428
438
|
</div>
|
|
429
|
-
`}};
|
|
439
|
+
`}};Jt.styles=Wt,Gt([ut({reflect:!0})],Jt.prototype,"role",void 0),Gt([ut({reflect:!0})],Jt.prototype,"variant",void 0),Jt=Gt([ct("vscode-checkbox-group")],Jt);const Yt=[xt,n`
|
|
430
440
|
.collapsible {
|
|
431
441
|
background-color: var(--vscode-sideBar-background);
|
|
432
442
|
}
|
|
@@ -515,7 +525,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
515
525
|
.collapsible.open .collapsible-body {
|
|
516
526
|
display: block;
|
|
517
527
|
}
|
|
518
|
-
`];var
|
|
528
|
+
`];var Xt=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Zt=class extends mt{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=At({collapsible:!0,open:this.open}),e=U`<svg
|
|
519
529
|
width="16"
|
|
520
530
|
height="16"
|
|
521
531
|
viewBox="0 0 16 16"
|
|
@@ -528,7 +538,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
528
538
|
clip-rule="evenodd"
|
|
529
539
|
d="M10.072 8.024L5.715 3.667l.618-.62L11 7.716v.618L6.333 13l-.618-.619 4.357-4.357z"
|
|
530
540
|
/>
|
|
531
|
-
</svg>`,s=this.description?
|
|
541
|
+
</svg>`,s=this.description?U`<span class="description">${this.description}</span>`:H;return U`
|
|
532
542
|
<div class=${t}>
|
|
533
543
|
<div
|
|
534
544
|
class="collapsible-header"
|
|
@@ -548,7 +558,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
548
558
|
<slot></slot>
|
|
549
559
|
</div>
|
|
550
560
|
</div>
|
|
551
|
-
`}};
|
|
561
|
+
`}};Zt.styles=Yt,Xt([ut({type:String})],Zt.prototype,"title",void 0),Xt([ut()],Zt.prototype,"description",void 0),Xt([ut({type:Boolean,reflect:!0})],Zt.prototype,"open",void 0),Zt=Xt([ct("vscode-collapsible")],Zt);const Qt=[xt,n`
|
|
552
562
|
:host {
|
|
553
563
|
display: block;
|
|
554
564
|
font-family: var(--vscode-font-family);
|
|
@@ -620,20 +630,20 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
620
630
|
padding: 0 22px;
|
|
621
631
|
text-align: right;
|
|
622
632
|
}
|
|
623
|
-
`];var
|
|
624
|
-
${this.separator?
|
|
633
|
+
`];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 mt{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 U`
|
|
634
|
+
${this.separator?U`
|
|
625
635
|
<div class="context-menu-item separator">
|
|
626
636
|
<span class="ruler"></span>
|
|
627
637
|
</div>
|
|
628
|
-
`:
|
|
638
|
+
`:U`
|
|
629
639
|
<div class="context-menu-item">
|
|
630
640
|
<a @click=${this.onItemClick}>
|
|
631
|
-
${this.label?
|
|
632
|
-
${this.keybinding?
|
|
641
|
+
${this.label?U`<span class="label">${this.label}</span>`:H}
|
|
642
|
+
${this.keybinding?U`<span class="keybinding">${this.keybinding}</span>`:H}
|
|
633
643
|
</a>
|
|
634
644
|
</div>
|
|
635
645
|
`}
|
|
636
|
-
`}};
|
|
646
|
+
`}};ee.styles=Qt,te([ut({type:String})],ee.prototype,"label",void 0),te([ut({type:String})],ee.prototype,"keybinding",void 0),te([ut({type:String})],ee.prototype,"value",void 0),te([ut({type:Boolean,reflect:!0})],ee.prototype,"separator",void 0),te([ut({type:Number})],ee.prototype,"tabindex",void 0),ee=te([ct("vscode-context-menu-item")],ee);const se=[xt,n`
|
|
637
647
|
:host {
|
|
638
648
|
display: block;
|
|
639
649
|
font-family: var(--vscode-font-family);
|
|
@@ -658,9 +668,9 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
658
668
|
.context-menu:focus {
|
|
659
669
|
outline: 0;
|
|
660
670
|
}
|
|
661
|
-
`];var
|
|
671
|
+
`];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 mt{set data(t){this._data=t;const e=[];t.forEach(((t,s)=>{t.separator||e.push(s)})),this._clickableItemIndexes=e}get data(){return this._data}set show(t){this._show=t,this._selectedClickableItemIndex=-1,t&&this.updateComplete.then((()=>{this._wrapperEl&&this._wrapperEl.focus(),requestAnimationFrame((()=>{document.addEventListener("click",this._onClickOutsideBound,{once:!0})}))}))}get show(){return this._show}constructor(){super(),this.preventClose=!1,this.tabIndex=0,this._selectedClickableItemIndex=-1,this._show=!1,this._data=[],this._clickableItemIndexes=[],this._onClickOutsideBound=this._onClickOutside.bind(this),this.addEventListener("keydown",this._onKeyDown)}_onClickOutside(t){t.composedPath().includes(this)||(this.show=!1)}_onKeyDown(t){const{key:e}=t;switch("ArrowUp"!==e&&"ArrowDown"!==e&&"Escape"!==e&&"Enter"!==e||t.preventDefault(),e){case"ArrowUp":this._handleArrowUp();break;case"ArrowDown":this._handleArrowDown();break;case"Escape":this._handleEscape();break;case"Enter":this._handleEnter()}}_handleArrowUp(){0===this._selectedClickableItemIndex?this._selectedClickableItemIndex=this._clickableItemIndexes.length-1:this._selectedClickableItemIndex-=1}_handleArrowDown(){this._selectedClickableItemIndex+1<this._clickableItemIndexes.length?this._selectedClickableItemIndex+=1:this._selectedClickableItemIndex=0}_handleEscape(){this.show=!1,document.removeEventListener("click",this._onClickOutsideBound)}_dispatchSelectEvent(t){const{keybinding:e,label:s,value:i,separator:o,tabindex:r}=t;this.dispatchEvent(new CustomEvent("vsc-context-menu-select",{detail:{keybinding:e,label:s,separator:o,tabindex:r,value:i}}))}_dispatchLegacySelectEvent(t){const{keybinding:e,label:s,value:i,separator:o,tabindex:r}=t,n={keybinding:e,label:s,value:i,separator:o,tabindex:r};this.dispatchEvent(new CustomEvent("vsc-select",{detail:n,bubbles:!0,composed:!0}))}_handleEnter(){if(-1===this._selectedClickableItemIndex)return;const t=this._clickableItemIndexes[this._selectedClickableItemIndex],e=this._wrapperEl.querySelectorAll("vscode-context-menu-item")[t];this._dispatchLegacySelectEvent(e),this._dispatchSelectEvent(e),this.preventClose||(this.show=!1,document.removeEventListener("click",this._onClickOutsideBound))}_onItemClick(t){const e=t.currentTarget;this._dispatchLegacySelectEvent(e),this._dispatchSelectEvent(e),this.preventClose||(this.show=!1)}_onItemMouseOver(t){const e=t.target,s=e.dataset.index?+e.dataset.index:-1,i=this._clickableItemIndexes.findIndex((t=>t===s));-1!==i&&(this._selectedClickableItemIndex=i)}_onItemMouseOut(){this._selectedClickableItemIndex=-1}render(){if(!this._show)return U`${H}`;const t=this._clickableItemIndexes[this._selectedClickableItemIndex];return U`
|
|
662
672
|
<div class="context-menu" tabindex="0">
|
|
663
|
-
${this.data?this.data.map((({label:e="",keybinding:s="",value:i="",separator:o=!1,tabindex:r=0},n)=>
|
|
673
|
+
${this.data?this.data.map((({label:e="",keybinding:s="",value:i="",separator:o=!1,tabindex:r=0},n)=>U`
|
|
664
674
|
<vscode-context-menu-item
|
|
665
675
|
label=${e}
|
|
666
676
|
keybinding=${s}
|
|
@@ -673,9 +683,9 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
673
683
|
@mouseout=${this._onItemMouseOut}
|
|
674
684
|
data-index=${n}
|
|
675
685
|
></vscode-context-menu-item>
|
|
676
|
-
`)):
|
|
686
|
+
`)):U`<slot></slot>`}
|
|
677
687
|
</div>
|
|
678
|
-
`}};
|
|
688
|
+
`}};oe.styles=se,ie([ut({type:Array,attribute:!1})],oe.prototype,"data",null),ie([ut({type:Boolean,reflect:!0,attribute:"prevent-close"})],oe.prototype,"preventClose",void 0),ie([ut({type:Boolean,reflect:!0})],oe.prototype,"show",null),ie([ut({type:Number,reflect:!0})],oe.prototype,"tabIndex",void 0),ie([vt()],oe.prototype,"_selectedClickableItemIndex",void 0),ie([vt()],oe.prototype,"_show",void 0),ie([bt(".context-menu")],oe.prototype,"_wrapperEl",void 0),oe=ie([ct("vscode-context-menu")],oe);const re=[xt,n`
|
|
679
689
|
:host {
|
|
680
690
|
background-color: var(--vscode-foreground);
|
|
681
691
|
display: block;
|
|
@@ -684,16 +694,16 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
684
694
|
margin-top: 10px;
|
|
685
695
|
opacity: 0.4;
|
|
686
696
|
}
|
|
687
|
-
`];var
|
|
697
|
+
`];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 mt{constructor(){super(...arguments),this.role="separator"}render(){return U``}};le.styles=re,ne([ut({reflect:!0})],le.prototype,"role",void 0),le=ne([ct("vscode-divider")],le);const ae=[xt,n`
|
|
688
698
|
:host {
|
|
689
699
|
display: block;
|
|
690
700
|
max-width: 727px;
|
|
691
701
|
}
|
|
692
|
-
`];var
|
|
702
|
+
`];var ce,he=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};!function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(ce||(ce={}));const de=t=>"vscode-checkbox"===t.tagName.toLocaleLowerCase(),ue=t=>"vscode-radio"===t.tagName.toLocaleLowerCase();let ve=class extends mt{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&&(de(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:de(t)&&!t.checked?s[e]=Array.isArray(s[e])?s[e]:[]:ue(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:ue(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===ce.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===ce.HORIZONTAL&&s===ce.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?ce.VERTICAL:ce.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 U`
|
|
693
703
|
<div class="wrapper">
|
|
694
704
|
<slot></slot>
|
|
695
705
|
</div>
|
|
696
|
-
`}};
|
|
706
|
+
`}};ve.styles=ae,he([ut({type:Boolean,reflect:!0})],ve.prototype,"responsive",null),he([ut({type:Number})],ve.prototype,"breakpoint",void 0),he([ut({type:Object})],ve.prototype,"data",null),he([bt(".wrapper")],ve.prototype,"_wrapperElement",void 0),he([gt({selector:"vscode-form-group"})],ve.prototype,"_assignedFormGroups",void 0),ve=he([ct("vscode-form-container")],ve);const pe=[xt,n`
|
|
697
707
|
:host {
|
|
698
708
|
--label-right-margin: 14px;
|
|
699
709
|
--label-width: 150px;
|
|
@@ -778,11 +788,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
778
788
|
::slotted(vscode-button) {
|
|
779
789
|
margin-right: 4px;
|
|
780
790
|
}
|
|
781
|
-
`];var
|
|
791
|
+
`];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 fe=class extends mt{constructor(){super(...arguments),this.variant="horizontal"}render(){return U`
|
|
782
792
|
<div class="wrapper">
|
|
783
793
|
<slot></slot>
|
|
784
794
|
</div>
|
|
785
|
-
`}};
|
|
795
|
+
`}};fe.styles=pe,be([ut({reflect:!0})],fe.prototype,"variant",void 0),fe=be([ct("vscode-form-group")],fe);const ge=[xt,n`
|
|
786
796
|
:host {
|
|
787
797
|
display: block;
|
|
788
798
|
line-height: 1.4em;
|
|
@@ -795,7 +805,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
795
805
|
:host([vertical]) {
|
|
796
806
|
margin-left: 0;
|
|
797
807
|
}
|
|
798
|
-
|
|
808
|
+
`];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};const xe=new CSSStyleSheet;xe.replaceSync("\n vscode-form-helper * {\n margin: 0;\n }\n\n vscode-form-helper *:not(:last-child) {\n margin-bottom: 8px;\n }\n");let ye=class extends mt{constructor(){super(),this._injectLightDOMStyles()}_injectLightDOMStyles(){const t=document.adoptedStyleSheets.find((t=>t===xe));t||document.adoptedStyleSheets.push(xe)}render(){return U`<slot></slot>`}};ye.styles=ge,ye=me([ct("vscode-form-helper")],ye);let we=0;const ke=(t="")=>(we++,`${t}${we}`),$e=[xt,n`
|
|
799
809
|
:host {
|
|
800
810
|
display: block;
|
|
801
811
|
}
|
|
@@ -825,14 +835,14 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
825
835
|
:host([variant='vertical']) ::slotted(vscode-radio:last-child) {
|
|
826
836
|
margin-bottom: 0;
|
|
827
837
|
}
|
|
828
|
-
`];var
|
|
838
|
+
`];var _e=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ce=class extends mt{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 U`
|
|
829
839
|
<div class="wrapper">
|
|
830
840
|
<slot
|
|
831
841
|
@slotchange=${this._onSlotChange}
|
|
832
842
|
@vsc-change=${this._onChange}
|
|
833
843
|
></slot>
|
|
834
844
|
</div>
|
|
835
|
-
`}}
|
|
845
|
+
`}};Ce.styles=$e,_e([ut({reflect:!0})],Ce.prototype,"variant",void 0),_e([ut({reflect:!0})],Ce.prototype,"role",void 0),_e([gt({selector:"vscode-radio"})],Ce.prototype,"_radios",void 0),_e([vt()],Ce.prototype,"_focusedRadio",void 0),_e([vt()],Ce.prototype,"_checkedRadio",void 0),Ce=_e([ct("vscode-radio-group")],Ce);const Be=[xt,n`
|
|
836
846
|
:host {
|
|
837
847
|
display: inline-block;
|
|
838
848
|
height: 40px;
|
|
@@ -954,25 +964,25 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
954
964
|
background-repeat: no-repeat;
|
|
955
965
|
background-position: right bottom;
|
|
956
966
|
}
|
|
957
|
-
`];var
|
|
967
|
+
`];var Se=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 mt{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 U`
|
|
958
968
|
<div
|
|
959
|
-
class=${
|
|
969
|
+
class=${At({shadow:!0,visible:this._shadow})}
|
|
960
970
|
></div>
|
|
961
971
|
<textarea
|
|
962
|
-
autocomplete=${
|
|
972
|
+
autocomplete=${Ot(this.autocomplete)}
|
|
963
973
|
?autofocus=${this.autofocus}
|
|
964
974
|
?disabled=${this.disabled}
|
|
965
975
|
aria-label=${this.label}
|
|
966
976
|
id="textarea"
|
|
967
|
-
class=${
|
|
968
|
-
maxlength=${
|
|
969
|
-
minlength=${
|
|
970
|
-
rows=${
|
|
971
|
-
cols=${
|
|
972
|
-
name=${
|
|
973
|
-
placeholder=${
|
|
977
|
+
class=${At({monospace:this.monospace,"cursor-pointer":this._textareaPointerCursor})}
|
|
978
|
+
maxlength=${Ot(this.maxLength)}
|
|
979
|
+
minlength=${Ot(this.minLength)}
|
|
980
|
+
rows=${Ot(this.rows)}
|
|
981
|
+
cols=${Ot(this.cols)}
|
|
982
|
+
name=${Ot(this.name)}
|
|
983
|
+
placeholder=${Ot(this.placeholder)}
|
|
974
984
|
?readonly=${this.readonly}
|
|
975
|
-
.style=${
|
|
985
|
+
.style=${Et({resize:this.resize})}
|
|
976
986
|
?required=${this.required}
|
|
977
987
|
spellcheck=${this.spellcheck}
|
|
978
988
|
@change=${this._handleChange}
|
|
@@ -981,19 +991,19 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
981
991
|
@scroll=${this._handleScroll}
|
|
982
992
|
.value=${this._value}
|
|
983
993
|
></textarea>
|
|
984
|
-
`}};
|
|
994
|
+
`}};ze.styles=Be,ze.formAssociated=!0,ze.shadowRootOptions={...lt.shadowRootOptions,delegatesFocus:!0},Se([ut()],ze.prototype,"autocomplete",void 0),Se([ut({type:Boolean,reflect:!0})],ze.prototype,"autofocus",void 0),Se([ut({attribute:"default-value"})],ze.prototype,"defaultValue",void 0),Se([ut({type:Boolean,reflect:!0})],ze.prototype,"disabled",void 0),Se([ut({type:Boolean,reflect:!0})],ze.prototype,"invalid",void 0),Se([ut({attribute:!1})],ze.prototype,"label",void 0),Se([ut({type:Number})],ze.prototype,"maxLength",void 0),Se([ut({type:Number})],ze.prototype,"minLength",void 0),Se([ut({type:Number})],ze.prototype,"rows",void 0),Se([ut({type:Number})],ze.prototype,"cols",void 0),Se([ut()],ze.prototype,"name",void 0),Se([ut()],ze.prototype,"placeholder",void 0),Se([ut({type:Boolean,reflect:!0})],ze.prototype,"readonly",void 0),Se([ut()],ze.prototype,"resize",void 0),Se([ut({type:Boolean,reflect:!0})],ze.prototype,"required",void 0),Se([ut({type:Boolean})],ze.prototype,"spellcheck",void 0),Se([ut({type:Boolean,reflect:!0})],ze.prototype,"monospace",void 0),Se([ut()],ze.prototype,"value",null),Se([bt("#textarea")],ze.prototype,"_textareaEl",void 0),Se([vt()],ze.prototype,"_value",void 0),Se([vt()],ze.prototype,"_textareaPointerCursor",void 0),Se([vt()],ze.prototype,"_shadow",void 0),ze=Se([ct("vscode-textarea")],ze);const Ae=r(yt()),Oe=[xt,n`
|
|
985
995
|
:host {
|
|
986
996
|
align-items: center;
|
|
987
|
-
background-color: var(--vscode-settings-textInputBackground);
|
|
997
|
+
background-color: var(--vscode-settings-textInputBackground, #313131);
|
|
988
998
|
border-color: var(
|
|
989
999
|
--vscode-settings-textInputBorder,
|
|
990
|
-
var(--vscode-settings-textInputBackground)
|
|
1000
|
+
var(--vscode-settings-textInputBackground, #3c3c3c)
|
|
991
1001
|
);
|
|
992
1002
|
border-radius: 2px;
|
|
993
1003
|
border-style: solid;
|
|
994
1004
|
border-width: 1px;
|
|
995
1005
|
box-sizing: border-box;
|
|
996
|
-
color: var(--vscode-settings-textInputForeground);
|
|
1006
|
+
color: var(--vscode-settings-textInputForeground, #cccccc);
|
|
997
1007
|
display: inline-flex;
|
|
998
1008
|
max-width: 100%;
|
|
999
1009
|
position: relative;
|
|
@@ -1001,7 +1011,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1001
1011
|
}
|
|
1002
1012
|
|
|
1003
1013
|
:host([focused]) {
|
|
1004
|
-
border-color: var(--vscode-focusBorder);
|
|
1014
|
+
border-color: var(--vscode-focusBorder, #0078d4);
|
|
1005
1015
|
}
|
|
1006
1016
|
|
|
1007
1017
|
:host([invalid]),
|
|
@@ -1011,7 +1021,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1011
1021
|
|
|
1012
1022
|
:host([invalid]) input,
|
|
1013
1023
|
:host(:invalid) input {
|
|
1014
|
-
background-color: var(--vscode-inputValidation-errorBackground);
|
|
1024
|
+
background-color: var(--vscode-inputValidation-errorBackground, #5a1d1d);
|
|
1015
1025
|
}
|
|
1016
1026
|
|
|
1017
1027
|
::slotted([slot='content-before']) {
|
|
@@ -1031,14 +1041,14 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1031
1041
|
}
|
|
1032
1042
|
|
|
1033
1043
|
input {
|
|
1034
|
-
background-color: var(--vscode-settings-textInputBackground);
|
|
1044
|
+
background-color: var(--vscode-settings-textInputBackground, #313131);
|
|
1035
1045
|
border: 0;
|
|
1036
1046
|
box-sizing: border-box;
|
|
1037
|
-
color: var(--vscode-settings-textInputForeground);
|
|
1047
|
+
color: var(--vscode-settings-textInputForeground, #cccccc);
|
|
1038
1048
|
display: block;
|
|
1039
|
-
font-family: var(--vscode-font-family);
|
|
1040
|
-
font-size: var(--vscode-font-size);
|
|
1041
|
-
font-weight: var(--vscode-font-weight);
|
|
1049
|
+
font-family: var(--vscode-font-family, ${Ae});
|
|
1050
|
+
font-size: var(--vscode-font-size, 13px);
|
|
1051
|
+
font-weight: var(--vscode-font-weight, 'normal');
|
|
1042
1052
|
line-height: 18px;
|
|
1043
1053
|
outline: none;
|
|
1044
1054
|
padding-bottom: 3px;
|
|
@@ -1053,7 +1063,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1053
1063
|
}
|
|
1054
1064
|
|
|
1055
1065
|
input::placeholder {
|
|
1056
|
-
color: var(--vscode-input-placeholderForeground);
|
|
1066
|
+
color: var(--vscode-input-placeholderForeground, #989898);
|
|
1057
1067
|
opacity: 1;
|
|
1058
1068
|
}
|
|
1059
1069
|
|
|
@@ -1065,50 +1075,50 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1065
1075
|
}
|
|
1066
1076
|
|
|
1067
1077
|
input[type='file']::file-selector-button {
|
|
1068
|
-
background-color: var(--vscode-button-background);
|
|
1078
|
+
background-color: var(--vscode-button-background, #0078d4);
|
|
1069
1079
|
border: 0;
|
|
1070
1080
|
border-radius: 2px;
|
|
1071
|
-
color: var(--vscode-button-foreground);
|
|
1081
|
+
color: var(--vscode-button-foreground, #ffffff);
|
|
1072
1082
|
cursor: pointer;
|
|
1073
|
-
font-family: var(--vscode-font-family);
|
|
1074
|
-
font-size: var(--vscode-font-size);
|
|
1075
|
-
font-weight: var(--vscode-font-weight);
|
|
1083
|
+
font-family: var(--vscode-font-family, ${Ae});
|
|
1084
|
+
font-size: var(--vscode-font-size, 13px);
|
|
1085
|
+
font-weight: var(--vscode-font-weight, 'normal');
|
|
1076
1086
|
line-height: 20px;
|
|
1077
1087
|
padding: 0 14px;
|
|
1078
1088
|
}
|
|
1079
1089
|
|
|
1080
1090
|
input[type='file']::file-selector-button:hover {
|
|
1081
|
-
background-color: var(--vscode-button-hoverBackground);
|
|
1091
|
+
background-color: var(--vscode-button-hoverBackground, #026ec1);
|
|
1082
1092
|
}
|
|
1083
|
-
`];var
|
|
1093
|
+
`];var Ee=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 je=class extends mt{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 U`
|
|
1084
1094
|
<slot name="content-before"></slot>
|
|
1085
1095
|
<input
|
|
1086
1096
|
id="input"
|
|
1087
1097
|
type=${this.type}
|
|
1088
1098
|
?autofocus=${this.autofocus}
|
|
1089
|
-
autocomplete=${
|
|
1099
|
+
autocomplete=${Ot(this.autocomplete)}
|
|
1090
1100
|
aria-label=${this.label}
|
|
1091
1101
|
?disabled=${this.disabled}
|
|
1092
|
-
max=${
|
|
1093
|
-
maxlength=${
|
|
1094
|
-
min=${
|
|
1095
|
-
minlength=${
|
|
1102
|
+
max=${Ot(this.max)}
|
|
1103
|
+
maxlength=${Ot(this.maxLength)}
|
|
1104
|
+
min=${Ot(this.min)}
|
|
1105
|
+
minlength=${Ot(this.minLength)}
|
|
1096
1106
|
?multiple=${this.multiple}
|
|
1097
|
-
name=${
|
|
1098
|
-
pattern=${
|
|
1099
|
-
placeholder=${
|
|
1107
|
+
name=${Ot(this.name)}
|
|
1108
|
+
pattern=${Ot(this.pattern)}
|
|
1109
|
+
placeholder=${Ot(this.placeholder)}
|
|
1100
1110
|
?readonly=${this.readonly}
|
|
1101
1111
|
?required=${this.required}
|
|
1102
|
-
step=${
|
|
1112
|
+
step=${Ot(this.step)}
|
|
1103
1113
|
.value=${this._value}
|
|
1104
1114
|
@blur=${this._onBlur}
|
|
1105
1115
|
@change=${this._onChange}
|
|
1106
1116
|
@focus=${this._onFocus}
|
|
1107
1117
|
@input=${this._onInput}
|
|
1108
1118
|
@keydown=${this._onKeyDown}
|
|
1109
|
-
|
|
1119
|
+
>
|
|
1110
1120
|
<slot name="content-after"></slot>
|
|
1111
|
-
`}};
|
|
1121
|
+
`}};je.styles=Oe,je.formAssociated=!0,je.shadowRootOptions={...lt.shadowRootOptions,delegatesFocus:!0},Ee([ut()],je.prototype,"autocomplete",void 0),Ee([ut({type:Boolean,reflect:!0})],je.prototype,"autofocus",void 0),Ee([ut({attribute:"default-value"})],je.prototype,"defaultValue",void 0),Ee([ut({type:Boolean,reflect:!0})],je.prototype,"disabled",void 0),Ee([ut({type:Boolean,reflect:!0})],je.prototype,"focused",void 0),Ee([ut({type:Boolean,reflect:!0})],je.prototype,"invalid",void 0),Ee([ut({attribute:!1})],je.prototype,"label",void 0),Ee([ut({type:Number})],je.prototype,"max",void 0),Ee([ut({type:Number})],je.prototype,"maxLength",void 0),Ee([ut({type:Number})],je.prototype,"min",void 0),Ee([ut({type:Number})],je.prototype,"minLength",void 0),Ee([ut({type:Boolean,reflect:!0})],je.prototype,"multiple",void 0),Ee([ut({reflect:!0})],je.prototype,"name",void 0),Ee([ut()],je.prototype,"pattern",void 0),Ee([ut()],je.prototype,"placeholder",void 0),Ee([ut({type:Boolean,reflect:!0})],je.prototype,"readonly",void 0),Ee([ut({type:Boolean,reflect:!0})],je.prototype,"required",void 0),Ee([ut({type:Number})],je.prototype,"step",void 0),Ee([ut({reflect:!0})],je.prototype,"type",null),Ee([ut()],je.prototype,"value",null),Ee([bt("#input")],je.prototype,"_inputEl",void 0),Ee([vt()],je.prototype,"_value",void 0),Ee([vt()],je.prototype,"_type",void 0),je=Ee([ct("vscode-textfield")],je);const Ie=[xt,n`
|
|
1112
1122
|
:host {
|
|
1113
1123
|
color: var(--vscode-foreground);
|
|
1114
1124
|
font-family: var(--vscode-font-family);
|
|
@@ -1136,13 +1146,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1136
1146
|
color: var(--vscode-foreground);
|
|
1137
1147
|
opacity: 0.9;
|
|
1138
1148
|
}
|
|
1139
|
-
`];var
|
|
1149
|
+
`];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 Fe=class extends mt{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=ke("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 Ce||t instanceof Jt)&&t.setAttribute("aria-labelledby",this._id);let e="";this.textContent&&(e=this.textContent.trim()),(t instanceof je||t instanceof ze)&&(t.label=e)}_handleClick(){const t=this._getTarget();t&&"focus"in t&&t.focus()}render(){return U`
|
|
1140
1150
|
<label
|
|
1141
|
-
class=${
|
|
1151
|
+
class=${At({wrapper:!0,required:this.required})}
|
|
1142
1152
|
@click=${this._handleClick}
|
|
1143
1153
|
><slot></slot
|
|
1144
1154
|
></label>
|
|
1145
|
-
`}};
|
|
1155
|
+
`}};Fe.styles=Ie,Me([ut({reflect:!0,attribute:"for"})],Fe.prototype,"htmlFor",null),Me([ut()],Fe.prototype,"id",null),Me([ut({type:Boolean,reflect:!0})],Fe.prototype,"required",void 0),Fe=Me([ct("vscode-label")],Fe);const{I:Pe}=rt,De=()=>document.createComment(""),Ne=(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 Pe(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={},Te=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}},Le=(t,e,s)=>{const i=new Map;for(let o=e;o<=s;o++)i.set(t[o],o);return i},Ue=St(class extends zt{constructor(t){if(super(t),t.type!==Ct)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]),Ne(t,a[p+1],o[d]),d++,p--;else if(l[u]===n[v])a[v]=Ve(o[u],r[v]),Ne(t,o[d],o[u]),u--,v++;else if(void 0===c&&(c=Le(n,v,p),h=Le(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=Ne(t,o[d]);Ve(e,r[v]),a[v]=e}else a[v]=Ve(s,r[v]),Ne(t,o[d],s),o[e]=null;v++}else Te(o[u]),u--;else Te(o[d]),d++;for(;v<=p;){const e=Ne(t,a[p+1]);Ve(e,r[v]),a[v++]=e}for(;d<=u;){const t=o[d++];null!==t&&Te(t)}return this.ut=n,((t,e=Re)=>{t._$AH=e})(t,a),q}}),qe=U`
|
|
1146
1156
|
<span class="icon">
|
|
1147
1157
|
<svg
|
|
1148
1158
|
width="16"
|
|
@@ -1158,17 +1168,17 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1158
1168
|
/>
|
|
1159
1169
|
</svg>
|
|
1160
1170
|
</span>
|
|
1161
|
-
`;var
|
|
1162
|
-
<div class
|
|
1163
|
-
${"above"===this.position?this._renderDescription():
|
|
1171
|
+
`;var He=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let Ke=class extends mt{constructor(){super(...arguments),this.description="",this.selected=!1,this.disabled=!1,this._initialized=!1,this._handleSlotChange=()=>{this._initialized&&this.dispatchEvent(new Event("vsc-option-state-change",{bubbles:!0}))}}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this._initialized=!0}))}willUpdate(t){this._initialized&&(t.has("description")||t.has("value")||t.has("selected")||t.has("disabled"))&&this.dispatchEvent(new Event("vsc-option-state-change",{bubbles:!0}))}render(){return U`<slot @slotchange=${this._handleSlotChange}></slot>`}};Ke.styles=xt,He([ut({type:String})],Ke.prototype,"value",void 0),He([ut({type:String})],Ke.prototype,"description",void 0),He([ut({type:Boolean,reflect:!0})],Ke.prototype,"selected",void 0),He([ut({type:Boolean,reflect:!0})],Ke.prototype,"disabled",void 0),Ke=He([ct("vscode-option")],Ke);const We=(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},Ge=t=>{const e=[];return" "===t?(e.push(U` `),e):(0===t.indexOf(" ")&&e.push(U` `),e.push(U`${t.trimStart().trimEnd()}`),t.lastIndexOf(" ")===t.length-1&&e.push(U` `),e)},Je=(t,e)=>{const s=[],i=e.length;return i<1?U`${t}`:(e.forEach(((o,r)=>{const n=t.substring(o[0],o[1]);0===r&&0!==o[0]&&s.push(...Ge(t.substring(0,e[0][0]))),r>0&&r<i&&o[0]-e[r-1][1]!=0&&s.push(...Ge(t.substring(e[r-1][1],o[0]))),s.push(U`<b>${Ge(n)}</b>`),r===i-1&&o[1]<t.length&&s.push(...Ge(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 Ze extends mt{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?We(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=this._activeIndex>-1?t[this._activeIndex].index:-1,this._value=this._selectedIndex>-1?this._options[this._selectedIndex].value:"",this._dispatchChangeEvent()),this.combobox&&(this._multiple||e||(this._selectedIndex=this._activeIndex>-1?this._filteredOptions[this._activeIndex].index:-1),!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 H;const{description:t}=this._options[this._activeIndex];return t?U`<div class="description">${t}</div>`:H}_renderSelectFace(){return U`${H}`}_renderComboboxFace(){return U`${H}`}_renderDropdownControls(){return U`${H}`}_renderDropdown(){const t=At({dropdown:!0,multiple:this._multiple});return U`
|
|
1172
|
+
<div class=${t}>
|
|
1173
|
+
${"above"===this.position?this._renderDescription():H}
|
|
1164
1174
|
${this._renderOptions()} ${this._renderDropdownControls()}
|
|
1165
|
-
${"below"===this.position?this._renderDescription():
|
|
1175
|
+
${"below"===this.position?this._renderDescription():H}
|
|
1166
1176
|
</div>
|
|
1167
|
-
`}render(){return
|
|
1168
|
-
<slot class="main-slot" @slotchange
|
|
1177
|
+
`}render(){return U`
|
|
1178
|
+
<slot class="main-slot" @slotchange=${this._onSlotChange}></slot>
|
|
1169
1179
|
${this.combobox?this._renderComboboxFace():this._renderSelectFace()}
|
|
1170
|
-
${this.open?this._renderDropdown():
|
|
1171
|
-
`}}
|
|
1180
|
+
${this.open?this._renderDropdown():H}
|
|
1181
|
+
`}}Ye([ut({type:String,reflect:!0,attribute:"aria-expanded"})],Ze.prototype,"ariaExpanded",void 0),Ye([ut({type:Boolean,reflect:!0})],Ze.prototype,"combobox",void 0),Ye([ut({type:Boolean,reflect:!0})],Ze.prototype,"disabled",null),Ye([ut({type:Boolean,reflect:!0})],Ze.prototype,"invalid",void 0),Ye([ut()],Ze.prototype,"filter",null),Ye([ut({type:Boolean,reflect:!0})],Ze.prototype,"focused",void 0),Ye([ut({type:Boolean,reflect:!0})],Ze.prototype,"open",void 0),Ye([ut({type:Array})],Ze.prototype,"options",null),Ye([ut({reflect:!0})],Ze.prototype,"position",void 0),Ye([ut({type:Number,attribute:!0,reflect:!0})],Ze.prototype,"tabIndex",void 0),Ye([gt({flatten:!0,selector:"vscode-option"})],Ze.prototype,"_assignedOptions",void 0),Ye([vt()],Ze.prototype,"_activeIndex",void 0),Ye([vt()],Ze.prototype,"_currentDescription",void 0),Ye([vt()],Ze.prototype,"_filter",void 0),Ye([vt()],Ze.prototype,"_filteredOptions",null),Ye([vt()],Ze.prototype,"_filterPattern",void 0),Ye([vt()],Ze.prototype,"_selectedIndex",void 0),Ye([vt()],Ze.prototype,"_selectedIndexes",void 0),Ye([vt()],Ze.prototype,"_options",void 0),Ye([vt()],Ze.prototype,"_value",void 0),Ye([vt()],Ze.prototype,"_values",void 0),Ye([vt()],Ze.prototype,"_listScrollTop",void 0),Ye([bt(".options")],Ze.prototype,"_listElement",void 0);var Qe=[xt,n`
|
|
1172
1182
|
:host {
|
|
1173
1183
|
display: inline-block;
|
|
1174
1184
|
max-width: 100%;
|
|
@@ -1506,46 +1516,47 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1506
1516
|
:host([position='above']) .description {
|
|
1507
1517
|
border-width: 0 0 1px;
|
|
1508
1518
|
}
|
|
1509
|
-
`],
|
|
1519
|
+
`],ts=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let es=class extends Ze{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 U`<span class="select-face-badge no-item"
|
|
1510
1520
|
>No items selected</span
|
|
1511
|
-
>`;case 1:return
|
|
1521
|
+
>`;case 1:return U`<span class="select-face-badge">1 item selected</span>`;default:return U`<span class="select-face-badge"
|
|
1512
1522
|
>${this._selectedIndexes.length} items selected</span
|
|
1513
|
-
>`}}_renderSelectFace(){return
|
|
1523
|
+
>`}}_renderSelectFace(){return U`
|
|
1514
1524
|
<div
|
|
1515
1525
|
class="select-face face multiselect"
|
|
1516
1526
|
@click=${this._onFaceClick}
|
|
1517
1527
|
tabindex=${this.tabIndex>-1?0:-1}
|
|
1518
1528
|
>
|
|
1519
|
-
${this._renderLabel()} ${
|
|
1529
|
+
${this._renderLabel()} ${qe}
|
|
1520
1530
|
</div>
|
|
1521
|
-
`}_renderComboboxFace(){const t=this._selectedIndex>-1?this._options[this._selectedIndex].label:"";return
|
|
1531
|
+
`}_renderComboboxFace(){const t=this._selectedIndex>-1?this._options[this._selectedIndex].label:"";return U`
|
|
1522
1532
|
<div class="combobox-face face">
|
|
1523
1533
|
${this._renderLabel()}
|
|
1524
1534
|
<input
|
|
1525
1535
|
class="combobox-input"
|
|
1526
1536
|
spellcheck="false"
|
|
1527
1537
|
type="text"
|
|
1538
|
+
autocomplete="off"
|
|
1528
1539
|
.value=${t}
|
|
1529
1540
|
@focus=${this._onComboboxInputFocus}
|
|
1530
1541
|
@input=${this._onComboboxInputInput}
|
|
1531
1542
|
@click=${this._onComboboxInputClick}
|
|
1532
|
-
|
|
1543
|
+
>
|
|
1533
1544
|
<button
|
|
1534
1545
|
class="combobox-button"
|
|
1535
1546
|
type="button"
|
|
1536
1547
|
@click=${this._onComboboxButtonClick}
|
|
1537
1548
|
@keydown=${this._onComboboxButtonKeyDown}
|
|
1538
1549
|
>
|
|
1539
|
-
${
|
|
1550
|
+
${qe}
|
|
1540
1551
|
</button>
|
|
1541
1552
|
</div>
|
|
1542
|
-
`}_renderOptions(){const t=this.combobox?this._filteredOptions:this._options;return
|
|
1553
|
+
`}_renderOptions(){const t=this.combobox?this._filteredOptions:this._options;return U`
|
|
1543
1554
|
<ul
|
|
1544
1555
|
class="options"
|
|
1545
1556
|
@click=${this._onOptionClick}
|
|
1546
1557
|
@mouseover=${this._onOptionMouseOver}
|
|
1547
1558
|
>
|
|
1548
|
-
${
|
|
1559
|
+
${Ue(t,(t=>t.index),((t,e)=>{const s=this._selectedIndexes.includes(t.index),i=At({active:e===this._activeIndex&&!t.disabled,option:!0,selected:s,disabled:t.disabled}),o=At({"checkbox-icon":!0,checked:s});return U`
|
|
1549
1560
|
<li
|
|
1550
1561
|
class=${i}
|
|
1551
1562
|
data-index=${t.index}
|
|
@@ -1553,12 +1564,12 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1553
1564
|
>
|
|
1554
1565
|
<span class=${o}></span>
|
|
1555
1566
|
<span class="option-label"
|
|
1556
|
-
>${t.ranges?.length?
|
|
1567
|
+
>${t.ranges?.length?Je(t.label,t.ranges??[]):t.label}</span
|
|
1557
1568
|
>
|
|
1558
1569
|
</li>
|
|
1559
1570
|
`}))}
|
|
1560
1571
|
</ul>
|
|
1561
|
-
`}_renderDropdownControls(){return
|
|
1572
|
+
`}_renderDropdownControls(){return U`
|
|
1562
1573
|
<div class="dropdown-controls">
|
|
1563
1574
|
<button
|
|
1564
1575
|
type="button"
|
|
@@ -1578,13 +1589,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1578
1589
|
>
|
|
1579
1590
|
<vscode-icon name="clear-all"></vscode-icon>
|
|
1580
1591
|
</button>
|
|
1581
|
-
<vscode-button
|
|
1582
|
-
class="button-accept"
|
|
1583
|
-
@click=${this._onMultiAcceptClick}
|
|
1592
|
+
<vscode-button class="button-accept" @click=${this._onMultiAcceptClick}
|
|
1584
1593
|
>OK</vscode-button
|
|
1585
1594
|
>
|
|
1586
1595
|
</div>
|
|
1587
|
-
`}};
|
|
1596
|
+
`}};es.styles=Qe,es.shadowRootOptions={...lt.shadowRootOptions,delegatesFocus:!0},es.formAssociated=!0,ts([ut({type:Array,attribute:"default-value"})],es.prototype,"defaultValue",void 0),ts([ut({type:Boolean,reflect:!0})],es.prototype,"required",void 0),ts([ut({reflect:!0})],es.prototype,"name",void 0),ts([ut({type:Array,attribute:!1})],es.prototype,"selectedIndexes",null),ts([ut({type:Array})],es.prototype,"value",null),ts([bt(".face")],es.prototype,"_faceElement",void 0),es=ts([ct("vscode-multi-select")],es);const ss=[xt,n`
|
|
1588
1597
|
:host {
|
|
1589
1598
|
align-items: center;
|
|
1590
1599
|
display: block;
|
|
@@ -1630,7 +1639,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1630
1639
|
transform: rotate(1080deg);
|
|
1631
1640
|
}
|
|
1632
1641
|
}
|
|
1633
|
-
`];var
|
|
1642
|
+
`];var is=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 os=class extends mt{constructor(){super(...arguments),this.ariaLabel="Loading",this.ariaLive="assertive",this.role="alert"}render(){return U`<svg class="progress" part="progress" viewBox="0 0 16 16">
|
|
1634
1643
|
<circle
|
|
1635
1644
|
class="background"
|
|
1636
1645
|
part="background"
|
|
@@ -1645,7 +1654,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1645
1654
|
cy="8px"
|
|
1646
1655
|
r="7px"
|
|
1647
1656
|
></circle>
|
|
1648
|
-
</svg>`}};
|
|
1657
|
+
</svg>`}};os.styles=ss,is([ut({reflect:!0,attribute:"aria-label"})],os.prototype,"ariaLabel",void 0),is([ut({reflect:!0,attribute:"aria-live"})],os.prototype,"ariaLive",void 0),is([ut({reflect:!0})],os.prototype,"role",void 0),os=is([ct("vscode-progress-ring")],os);const rs=[xt,Ut,n`
|
|
1649
1658
|
:host(:invalid) .icon,
|
|
1650
1659
|
:host([invalid]) .icon {
|
|
1651
1660
|
background-color: var(--vscode-inputValidation-errorBackground);
|
|
@@ -1672,7 +1681,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1672
1681
|
outline: 1px solid var(--vscode-focusBorder);
|
|
1673
1682
|
outline-offset: -1px;
|
|
1674
1683
|
}
|
|
1675
|
-
`];var
|
|
1684
|
+
`];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 ls=class extends(Lt(Rt)){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=At({icon:!0,checked:this.checked}),e=At({"label-inner":!0,"is-slot-empty":""===this._slottedText});return U`
|
|
1676
1685
|
<div class="wrapper">
|
|
1677
1686
|
<input
|
|
1678
1687
|
?autofocus=${this.autofocus}
|
|
@@ -1682,7 +1691,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1682
1691
|
?checked=${this.checked}
|
|
1683
1692
|
value=${this.value}
|
|
1684
1693
|
tabindex=${this.tabIndex}
|
|
1685
|
-
|
|
1694
|
+
>
|
|
1686
1695
|
<div class=${t}></div>
|
|
1687
1696
|
<label for="input" class="label" @click=${this._handleClick}>
|
|
1688
1697
|
<span class=${e}>
|
|
@@ -1691,43 +1700,44 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1691
1700
|
</span>
|
|
1692
1701
|
</label>
|
|
1693
1702
|
</div>
|
|
1694
|
-
`}};
|
|
1703
|
+
`}};ls.styles=rs,ls.formAssociated=!0,ls.shadowRootOptions={...lt.shadowRootOptions,delegatesFocus:!0},ns([ut({type:Boolean,reflect:!0})],ls.prototype,"autofocus",void 0),ns([ut({type:Boolean,reflect:!0})],ls.prototype,"checked",void 0),ns([ut({type:Boolean,reflect:!0,attribute:"default-checked"})],ls.prototype,"defaultChecked",void 0),ns([ut({type:Boolean,reflect:!0})],ls.prototype,"invalid",void 0),ns([ut({reflect:!0})],ls.prototype,"name",void 0),ns([ut()],ls.prototype,"value",void 0),ns([ut({type:Boolean,reflect:!0})],ls.prototype,"disabled",void 0),ns([ut({type:Boolean,reflect:!0})],ls.prototype,"required",void 0),ns([ut({reflect:!0})],ls.prototype,"role",void 0),ns([ut({type:Number,reflect:!0})],ls.prototype,"tabIndex",void 0),ns([vt()],ls.prototype,"_slottedText",void 0),ns([bt("#input")],ls.prototype,"_inputEl",void 0),ns([ut()],ls.prototype,"type",void 0),ls=ns([ct("vscode-radio")],ls);var as=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 cs=class extends Ze{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 U`
|
|
1695
1704
|
<div
|
|
1696
1705
|
class="select-face face"
|
|
1697
1706
|
@click=${this._onFaceClick}
|
|
1698
1707
|
tabindex=${this.tabIndex>-1?0:-1}
|
|
1699
1708
|
>
|
|
1700
|
-
<span class="text">${t}</span> ${
|
|
1709
|
+
<span class="text">${t}</span> ${qe}
|
|
1701
1710
|
</div>
|
|
1702
|
-
`}_renderComboboxFace(){const t=this._selectedIndex>-1?this._options[this._selectedIndex].label:"";return
|
|
1711
|
+
`}_renderComboboxFace(){const t=this._selectedIndex>-1?this._options[this._selectedIndex].label:"";return U`
|
|
1703
1712
|
<div class="combobox-face face">
|
|
1704
1713
|
<input
|
|
1705
1714
|
class="combobox-input"
|
|
1706
1715
|
spellcheck="false"
|
|
1707
1716
|
type="text"
|
|
1717
|
+
autocomplete="off"
|
|
1708
1718
|
.value=${t}
|
|
1709
1719
|
@focus=${this._onComboboxInputFocus}
|
|
1710
1720
|
@input=${this._onComboboxInputInput}
|
|
1711
1721
|
@click=${this._onComboboxInputClick}
|
|
1712
|
-
|
|
1722
|
+
>
|
|
1713
1723
|
<button
|
|
1714
1724
|
class="combobox-button"
|
|
1715
1725
|
type="button"
|
|
1716
1726
|
@click=${this._onComboboxButtonClick}
|
|
1717
1727
|
@keydown=${this._onComboboxButtonKeyDown}
|
|
1718
1728
|
>
|
|
1719
|
-
${
|
|
1729
|
+
${qe}
|
|
1720
1730
|
</button>
|
|
1721
1731
|
</div>
|
|
1722
|
-
`}_renderOptions(){const t=(this.combobox?this._filteredOptions:this._options).map(((t,e)=>{const s=
|
|
1732
|
+
`}_renderOptions(){const t=(this.combobox?this._filteredOptions:this._options).map(((t,e)=>{const s=At({option:!0,disabled:t.disabled,selected:t.selected,active:e===this._activeIndex&&!t.disabled});return U`
|
|
1723
1733
|
<li
|
|
1724
1734
|
class=${s}
|
|
1725
1735
|
data-index=${t.index}
|
|
1726
1736
|
data-filtered-index=${e}
|
|
1727
1737
|
>
|
|
1728
|
-
${t.ranges?.length?
|
|
1738
|
+
${t.ranges?.length?Je(t.label,t.ranges??[]):t.label}
|
|
1729
1739
|
</li>
|
|
1730
|
-
`}));return
|
|
1740
|
+
`}));return U`
|
|
1731
1741
|
<ul
|
|
1732
1742
|
class="options"
|
|
1733
1743
|
@mouseover=${this._onOptionMouseOver}
|
|
@@ -1735,7 +1745,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1735
1745
|
>
|
|
1736
1746
|
${t}
|
|
1737
1747
|
</ul>
|
|
1738
|
-
`}};
|
|
1748
|
+
`}};cs.styles=Qe,cs.shadowRootOptions={...lt.shadowRootOptions,delegatesFocus:!0},cs.formAssociated=!0,as([ut({attribute:"default-value"})],cs.prototype,"defaultValue",void 0),as([ut({type:String,attribute:!0,reflect:!0})],cs.prototype,"role",void 0),as([ut({reflect:!0})],cs.prototype,"name",void 0),as([ut({type:Number,attribute:"selected-index"})],cs.prototype,"selectedIndex",null),as([ut({type:String})],cs.prototype,"value",null),as([ut({type:Boolean,reflect:!0})],cs.prototype,"required",void 0),as([bt(".face")],cs.prototype,"_face",void 0),cs=as([ct("vscode-single-select")],cs);const hs=[xt,n`
|
|
1739
1749
|
:host {
|
|
1740
1750
|
display: block;
|
|
1741
1751
|
position: relative;
|
|
@@ -1826,22 +1836,22 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1826
1836
|
.content {
|
|
1827
1837
|
overflow: hidden;
|
|
1828
1838
|
}
|
|
1829
|
-
`];var
|
|
1839
|
+
`];var ds=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 us=class extends mt{constructor(){super(...arguments),this.shadow=!0,this.scrolled=!1,this._isDragging=!1,this._thumbHeight=0,this._thumbY=0,this._thumbVisible=!1,this._thumbFade=!1,this._thumbActive=!1,this._scrollThumbStartY=0,this._mouseStartY=0,this._scrollbarVisible=!0,this._scrollbarTrackZ=0,this._resizeObserverCallback=()=>{this._updateScrollbar()},this._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)}_updateScrollbar(){const t=this.getBoundingClientRect(),e=this._contentElement.getBoundingClientRect();t.height>=e.height?this._scrollbarVisible=!1:(this._scrollbarVisible=!0,this._thumbHeight=t.height*(t.height/e.height)),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,this.requestUpdate()}_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._thumbY=s,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._thumbY=i*(e-s)}_onComponentMouseOver(){this._thumbVisible=!0,this._thumbFade=!1}_onComponentMouseOut(){this._thumbActive||(this._thumbVisible=!1,this._thumbFade=!0)}render(){return U`
|
|
1830
1840
|
<div
|
|
1831
1841
|
class="scrollable-container"
|
|
1832
|
-
.style=${
|
|
1842
|
+
.style=${Et({userSelect:this._isDragging?"none":"auto"})}
|
|
1833
1843
|
>
|
|
1834
1844
|
<div
|
|
1835
|
-
class=${
|
|
1836
|
-
.style=${
|
|
1845
|
+
class=${At({shadow:!0,visible:this.scrolled})}
|
|
1846
|
+
.style=${Et({zIndex:String(this._scrollbarTrackZ)})}
|
|
1837
1847
|
></div>
|
|
1838
|
-
${this._isDragging?
|
|
1848
|
+
${this._isDragging?U`<div class="prevent-interaction"></div>`:H}
|
|
1839
1849
|
<div
|
|
1840
|
-
class=${
|
|
1850
|
+
class=${At({"scrollbar-track":!0,hidden:!this._scrollbarVisible})}
|
|
1841
1851
|
>
|
|
1842
1852
|
<div
|
|
1843
|
-
class=${
|
|
1844
|
-
.style=${
|
|
1853
|
+
class=${At({"scrollbar-thumb":!0,visible:this._thumbVisible,fade:this._thumbFade,active:this._thumbActive})}
|
|
1854
|
+
.style=${Et({height:`${this._thumbHeight}px`,top:`${this._thumbY}px`})}
|
|
1845
1855
|
@mousedown=${this._onScrollThumbMouseDown}
|
|
1846
1856
|
></div>
|
|
1847
1857
|
</div>
|
|
@@ -1849,7 +1859,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1849
1859
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
1850
1860
|
</div>
|
|
1851
1861
|
</div>
|
|
1852
|
-
`}};
|
|
1862
|
+
`}};us.styles=hs,ds([ut({type:Boolean,reflect:!0})],us.prototype,"shadow",void 0),ds([ut({type:Boolean,reflect:!0})],us.prototype,"scrolled",void 0),ds([ut({type:Number,attribute:"scroll-pos"})],us.prototype,"scrollPos",null),ds([ut({type:Number,attribute:"scroll-max"})],us.prototype,"scrollMax",null),ds([vt()],us.prototype,"_isDragging",void 0),ds([vt()],us.prototype,"_thumbHeight",void 0),ds([vt()],us.prototype,"_thumbY",void 0),ds([vt()],us.prototype,"_thumbVisible",void 0),ds([vt()],us.prototype,"_thumbFade",void 0),ds([vt()],us.prototype,"_thumbActive",void 0),ds([bt(".content")],us.prototype,"_contentElement",void 0),ds([bt(".scrollbar-thumb",!0)],us.prototype,"_scrollThumbElement",void 0),ds([bt(".scrollable-container")],us.prototype,"_scrollableContainer",void 0),ds([gt()],us.prototype,"_assignedElements",void 0),us=ds([ct("vscode-scrollable")],us);const vs=[xt,n`
|
|
1853
1863
|
:host {
|
|
1854
1864
|
--separator-border: var(--vscode-editorWidget-border, transparent);
|
|
1855
1865
|
|
|
@@ -1956,25 +1966,25 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
1956
1966
|
cursor: ns-resize;
|
|
1957
1967
|
width: 100%;
|
|
1958
1968
|
}
|
|
1959
|
-
`];var
|
|
1960
|
-
<div class=${
|
|
1961
|
-
<div class="start" .style=${
|
|
1969
|
+
`];var ps,bs=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 fs=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}},gs=(t,e)=>0===e?0:Math.min(100,t/e*100),ms=(t,e)=>e*(t/100);let xs=ps=class extends mt{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=gs(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}=fs(this.initialHandlePosition??"50%");this._handlePosition="percent"===o?ms(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?fs(this.handlePosition):fs(this.initialHandlePosition);this._setPosition(e,s),this._initFixedPane()}_handlePositionPropChanged(){if(this.handlePosition&&this._wrapperEl){this._boundRect=this._wrapperEl.getBoundingClientRect();const{value:t,unit:e}=fs(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?ms(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 ps&&t.resetHandlePosition()}))}render(){const{width:t,height:e}=this._boundRect,s="vertical"===this.split?t:e,i="none"!==this.fixedPane?`${this._handlePosition}px`:`${gs(this._handlePosition,s)}%`;let o="";o="start"===this.fixedPane?`0 0 ${this._fixedPaneSize}px`:`1 1 ${gs(this._handlePosition,s)}%`;let r="";r="end"===this.fixedPane?`0 0 ${this._fixedPaneSize}px`:`1 1 ${gs(s-this._handlePosition,s)}%`;const n={left:"vertical"===this.split?i:"0",top:"vertical"===this.split?"0":i},l=this.handleSize??4;"vertical"===this.split&&(n.marginLeft=0-l/2+"px",n.width=`${l}px`),"horizontal"===this.split&&(n.height=`${l}px`,n.marginTop=0-l/2+"px");const a=At({"handle-overlay":!0,active:this._isDragActive,"split-vertical":"vertical"===this.split,"split-horizontal":"horizontal"===this.split}),c=At({handle:!0,hover:this._hover,hide:this._hide,"split-vertical":"vertical"===this.split,"split-horizontal":"horizontal"===this.split}),h={wrapper:!0,horizontal:"horizontal"===this.split};return U`
|
|
1970
|
+
<div class=${At(h)}>
|
|
1971
|
+
<div class="start" .style=${Et({flex:o})}>
|
|
1962
1972
|
<slot name="start" @slotchange=${this._handleSlotChange}></slot>
|
|
1963
1973
|
</div>
|
|
1964
|
-
<div class="end" .style=${
|
|
1974
|
+
<div class="end" .style=${Et({flex:r})}>
|
|
1965
1975
|
<slot name="end" @slotchange=${this._handleSlotChange}></slot>
|
|
1966
1976
|
</div>
|
|
1967
1977
|
<div class=${a}></div>
|
|
1968
1978
|
<div
|
|
1969
|
-
class=${
|
|
1970
|
-
.style=${
|
|
1979
|
+
class=${c}
|
|
1980
|
+
.style=${Et(n)}
|
|
1971
1981
|
@mouseover=${this._handleMouseOver}
|
|
1972
1982
|
@mouseout=${this._handleMouseOut}
|
|
1973
1983
|
@mousedown=${this._handleMouseDown}
|
|
1974
1984
|
@dblclick=${this._handleDblClick}
|
|
1975
1985
|
></div>
|
|
1976
1986
|
</div>
|
|
1977
|
-
`}};
|
|
1987
|
+
`}};xs.styles=vs,bs([ut({reflect:!0})],xs.prototype,"split",null),bs([ut({type:Boolean,reflect:!0,attribute:"reset-on-dbl-click"})],xs.prototype,"resetOnDblClick",void 0),bs([ut({type:Number,reflect:!0,attribute:"handle-size"})],xs.prototype,"handleSize",void 0),bs([ut({reflect:!0,attribute:"initial-handle-position"})],xs.prototype,"initialHandlePosition",void 0),bs([ut({attribute:"handle-position"})],xs.prototype,"handlePosition",null),bs([ut({attribute:"fixed-pane"})],xs.prototype,"fixedPane",null),bs([vt()],xs.prototype,"_handlePosition",void 0),bs([vt()],xs.prototype,"_isDragActive",void 0),bs([vt()],xs.prototype,"_hover",void 0),bs([vt()],xs.prototype,"_hide",void 0),bs([bt(".wrapper")],xs.prototype,"_wrapperEl",void 0),bs([bt(".handle")],xs.prototype,"_handleEl",void 0),bs([gt({slot:"start",selector:"vscode-split-layout"})],xs.prototype,"_nestedLayoutsAtStart",void 0),bs([gt({slot:"end",selector:"vscode-split-layout"})],xs.prototype,"_nestedLayoutsAtEnd",void 0),xs=ps=bs([ct("vscode-split-layout")],xs);const ys=[xt,n`
|
|
1978
1988
|
:host {
|
|
1979
1989
|
border-bottom: 1px solid transparent;
|
|
1980
1990
|
cursor: pointer;
|
|
@@ -2066,18 +2076,18 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2066
2076
|
slot[name='content-after']::slotted(vscode-badge) {
|
|
2067
2077
|
margin-left: 8px;
|
|
2068
2078
|
}
|
|
2069
|
-
`];var
|
|
2079
|
+
`];var ws=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 ks=class extends mt{constructor(){super(...arguments),this.active=!1,this.ariaControls="",this.panel=!1,this.role="tab",this.tabId=-1}attributeChangedCallback(t,e,s){if(super.attributeChangedCallback(t,e,s),"active"===t){const t=null!==s;this.ariaSelected=t?"true":"false",this.tabIndex=t?0:-1}}render(){return U`
|
|
2070
2080
|
<div
|
|
2071
|
-
class=${
|
|
2081
|
+
class=${At({wrapper:!0,active:this.active,panel:this.panel})}
|
|
2072
2082
|
>
|
|
2073
2083
|
<div class="before"><slot name="content-before"></slot></div>
|
|
2074
2084
|
<div class="main"><slot></slot></div>
|
|
2075
2085
|
<div class="after"><slot name="content-after"></slot></div>
|
|
2076
2086
|
<span
|
|
2077
|
-
class=${
|
|
2087
|
+
class=${At({"active-indicator":!0,active:this.active,panel:this.panel})}
|
|
2078
2088
|
></span>
|
|
2079
2089
|
</div>
|
|
2080
|
-
`}};
|
|
2090
|
+
`}};ks.styles=ys,ws([ut({type:Boolean,reflect:!0})],ks.prototype,"active",void 0),ws([ut({reflect:!0,attribute:"aria-controls"})],ks.prototype,"ariaControls",void 0),ws([ut({type:Boolean,reflect:!0})],ks.prototype,"panel",void 0),ws([ut({reflect:!0})],ks.prototype,"role",void 0),ws([ut({type:Number,reflect:!0,attribute:"tab-id"})],ks.prototype,"tabId",void 0),ks=ws([ct("vscode-tab-header")],ks);const $s=[xt,n`
|
|
2081
2091
|
:host {
|
|
2082
2092
|
display: block;
|
|
2083
2093
|
overflow: hidden;
|
|
@@ -2093,7 +2103,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2093
2103
|
:host([panel]) {
|
|
2094
2104
|
background-color: var(--vscode-panel-background);
|
|
2095
2105
|
}
|
|
2096
|
-
`];var
|
|
2106
|
+
`];var _s=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 Cs=class extends mt{constructor(){super(...arguments),this.hidden=!1,this.ariaLabelledby="",this.panel=!1,this.role="tabpanel",this.tabIndex=0}render(){return U` <slot></slot> `}};Cs.styles=$s,_s([ut({type:Boolean,reflect:!0})],Cs.prototype,"hidden",void 0),_s([ut({reflect:!0,attribute:"aria-labelledby"})],Cs.prototype,"ariaLabelledby",void 0),_s([ut({type:Boolean,reflect:!0})],Cs.prototype,"panel",void 0),_s([ut({reflect:!0})],Cs.prototype,"role",void 0),_s([ut({type:Number,reflect:!0})],Cs.prototype,"tabIndex",void 0),Cs=_s([ct("vscode-tab-panel")],Cs);const Bs=[xt,n`
|
|
2097
2107
|
:host {
|
|
2098
2108
|
display: table;
|
|
2099
2109
|
table-layout: fixed;
|
|
@@ -2107,7 +2117,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2107
2117
|
::slotted(vscode-table-row:nth-child(odd)) {
|
|
2108
2118
|
background-color: var(--vsc-row-odd-background);
|
|
2109
2119
|
}
|
|
2110
|
-
`];var
|
|
2120
|
+
`];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 zs=class extends mt{constructor(){super(...arguments),this.role="rowgroup"}render(){return U` <slot></slot> `}};zs.styles=Bs,Ss([ut({reflect:!0})],zs.prototype,"role",void 0),zs=Ss([ct("vscode-table-body")],zs);const As=[xt,n`
|
|
2111
2121
|
:host {
|
|
2112
2122
|
border-bottom-color: var(--vscode-editorGroup-border);
|
|
2113
2123
|
border-bottom-style: solid;
|
|
@@ -2150,21 +2160,21 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2150
2160
|
.column-label {
|
|
2151
2161
|
font-weight: bold;
|
|
2152
2162
|
}
|
|
2153
|
-
`];var
|
|
2163
|
+
`];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 Es=class extends mt{constructor(){super(...arguments),this.role="cell",this.columnLabel="",this.compact=!1}render(){const t=this.columnLabel?U`<div class="column-label" role="presentation">
|
|
2154
2164
|
${this.columnLabel}
|
|
2155
|
-
</div>`:
|
|
2165
|
+
</div>`:H;return U`
|
|
2156
2166
|
<div class="wrapper">
|
|
2157
2167
|
${t}
|
|
2158
2168
|
<slot></slot>
|
|
2159
2169
|
</div>
|
|
2160
|
-
`}};
|
|
2170
|
+
`}};Es.styles=As,Os([ut({reflect:!0})],Es.prototype,"role",void 0),Os([ut({attribute:"column-label"})],Es.prototype,"columnLabel",void 0),Os([ut({type:Boolean,reflect:!0})],Es.prototype,"compact",void 0),Es=Os([ct("vscode-table-cell")],Es);const js=[xt,n`
|
|
2161
2171
|
:host {
|
|
2162
2172
|
background-color: var(--vscode-keybindingTable-headerBackground);
|
|
2163
2173
|
display: table;
|
|
2164
2174
|
table-layout: fixed;
|
|
2165
2175
|
width: 100%;
|
|
2166
2176
|
}
|
|
2167
|
-
`];var
|
|
2177
|
+
`];var Is=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 Ms=class extends mt{constructor(){super(...arguments),this.role="rowgroup"}render(){return U` <slot></slot> `}};Ms.styles=js,Is([ut({reflect:!0})],Ms.prototype,"role",void 0),Ms=Is([ct("vscode-table-header")],Ms);const Fs=[xt,n`
|
|
2168
2178
|
:host {
|
|
2169
2179
|
box-sizing: border-box;
|
|
2170
2180
|
color: var(--vscode-foreground);
|
|
@@ -2189,11 +2199,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2189
2199
|
white-space: inherit;
|
|
2190
2200
|
width: 100%;
|
|
2191
2201
|
}
|
|
2192
|
-
`];var
|
|
2202
|
+
`];var Ps=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 mt{constructor(){super(...arguments),this.role="columnheader"}render(){return U`
|
|
2193
2203
|
<div class="wrapper">
|
|
2194
2204
|
<slot></slot>
|
|
2195
2205
|
</div>
|
|
2196
|
-
`}};
|
|
2206
|
+
`}};Ds.styles=Fs,Ps([ut({reflect:!0})],Ds.prototype,"role",void 0),Ds=Ps([ct("vscode-table-header-cell")],Ds);const Ns=[xt,n`
|
|
2197
2207
|
:host {
|
|
2198
2208
|
border-top-color: var(--vscode-editorGroup-border);
|
|
2199
2209
|
border-top-style: solid;
|
|
@@ -2201,7 +2211,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2201
2211
|
display: var(--vsc-row-display);
|
|
2202
2212
|
width: 100%;
|
|
2203
2213
|
}
|
|
2204
|
-
`];var
|
|
2214
|
+
`];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 mt{constructor(){super(...arguments),this.role="row"}render(){return U` <slot></slot> `}};Rs.styles=Ns,Vs([ut({reflect:!0})],Rs.prototype,"role",void 0),Rs=Vs([ct("vscode-table-row")],Rs);const Ts=(t,e)=>{if("number"!=typeof t||Number.isNaN(t)){if("string"==typeof t&&/^[0-9.]+$/.test(t)){return Number(t)/e*100}if("string"==typeof t&&/^[0-9.]+%$/.test(t))return Number(t.substring(0,t.length-1));if("string"==typeof t&&/^[0-9.]+px$/.test(t)){return Number(t.substring(0,t.length-2))/e*100}return null}return t/e*100},Ls=[xt,n`
|
|
2205
2215
|
:host {
|
|
2206
2216
|
display: block;
|
|
2207
2217
|
--vsc-row-even-background: transparent;
|
|
@@ -2324,11 +2334,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2324
2334
|
position: absolute;
|
|
2325
2335
|
width: 5px;
|
|
2326
2336
|
}
|
|
2327
|
-
`];var
|
|
2337
|
+
`];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 qs=class extends mt{constructor(){super(...arguments),this.role="table",this.resizable=!1,this.responsive=!1,this.bordered=!1,this.borderedColumns=!1,this.borderedRows=!1,this.breakpoint=300,this.minColumnWidth="50px",this.delayedResizing=!1,this.compact=!1,this.zebra=!1,this.zebraOdd=!1,this._sashPositions=[],this._isDragging=!1,this._sashHovers=[],this._columns=[],this._activeSashElementIndex=-1,this._activeSashCursorOffset=0,this._componentX=0,this._componentH=0,this._componentW=0,this._headerCells=[],this._cellsOfFirstRow=[],this._prevHeaderHeight=0,this._prevComponentHeight=0,this._componentResizeObserverCallback=()=>{this._memoizeComponentDimensions(),this._updateResizeHandlersSize(),this.responsive&&this._toggleCompactView()},this._headerResizeObserverCallback=()=>{this._updateResizeHandlersSize()},this._bodyResizeObserverCallback=()=>{let t=0,e=0;const s=this.getBoundingClientRect().height;this._assignedHeaderElements&&this._assignedHeaderElements.length&&(t=this._assignedHeaderElements[0].getBoundingClientRect().height),this._assignedBodyElements&&this._assignedBodyElements.length&&(e=this._assignedBodyElements[0].getBoundingClientRect().height);const i=e-t-s;this._scrollableElement.style.height=i>0?s-t+"px":"auto"},this._onResizingMouseMove=t=>{t.stopPropagation(),this._updateActiveSashPosition(t.pageX),this.delayedResizing?this._resizeColumns(!1):this._resizeColumns(!0)},this._onResizingMouseUp=t=>{this._resizeColumns(!0),this._updateActiveSashPosition(t.pageX),this._sashHovers[this._activeSashElementIndex]=!1,this._isDragging=!1,this._activeSashElementIndex=-1,document.removeEventListener("mousemove",this._onResizingMouseMove),document.removeEventListener("mouseup",this._onResizingMouseUp)}}set columns(t){this._columns=t,this.isConnected&&this._initDefaultColumnSizes()}get columns(){return this._columns}connectedCallback(){super.connectedCallback(),this._memoizeComponentDimensions(),this._initDefaultColumnSizes()}disconnectedCallback(){super.disconnectedCallback(),this._componentResizeObserver?.unobserve(this),this._componentResizeObserver?.disconnect(),this._bodyResizeObserver?.disconnect()}_px2Percent(t){return t/this._componentW*100}_percent2Px(t){return this._componentW*t/100}_memoizeComponentDimensions(){const t=this.getBoundingClientRect();this._componentH=t.height,this._componentW=t.width,this._componentX=t.x}_queryHeaderCells(){const t=this._assignedHeaderElements;return t&&t[0]?Array.from(t[0].querySelectorAll("vscode-table-header-cell")):[]}_getHeaderCells(){return this._headerCells.length||(this._headerCells=this._queryHeaderCells()),this._headerCells}_queryCellsOfFirstRow(){const t=this._assignedBodyElements;return t&&t[0]?Array.from(t[0].querySelectorAll("vscode-table-row:first-child vscode-table-cell")):[]}_getCellsOfFirstRow(){return this._cellsOfFirstRow.length||(this._cellsOfFirstRow=this._queryCellsOfFirstRow()),this._cellsOfFirstRow}_initResizeObserver(){this._componentResizeObserver=new ResizeObserver(this._componentResizeObserverCallback),this._componentResizeObserver.observe(this),this._headerResizeObserver=new ResizeObserver(this._headerResizeObserverCallback),this._headerResizeObserver.observe(this._headerElement)}_calcColWidthPercentages(){const t=this._getHeaderCells().length;let e=this.columns.slice(0,t);const s=e.filter((t=>"auto"===t)).length+t-e.length;let i=100;if(e=e.map((t=>{const e=Ts(t,this._componentW);return null===e?"auto":(i-=e,e)})),e.length<t)for(let s=e.length;s<t;s++)e.push("auto");return e=e.map((t=>"auto"===t?i/s:t)),e}_initHeaderCellSizes(t){this._getHeaderCells().forEach(((e,s)=>{e.style.width=`${t[s]}%`}))}_initBodyColumnSizes(t){this._getCellsOfFirstRow().forEach(((e,s)=>{e.style.width=`${t[s]}%`}))}_initSashes(t){const e=t.length;let s=0;this._sashPositions=[],t.forEach(((t,i)=>{if(i<e-1){const e=s+t;this._sashPositions.push(e),s=e}}))}_initDefaultColumnSizes(){const t=this._calcColWidthPercentages();this._initHeaderCellSizes(t),this._initBodyColumnSizes(t),this._initSashes(t)}_updateResizeHandlersSize(){const t=this._headerElement.getBoundingClientRect();if(t.height===this._prevHeaderHeight&&this._componentH===this._prevComponentHeight)return;this._prevHeaderHeight=t.height,this._prevComponentHeight=this._componentH;const e=this._componentH-t.height;this._sashVisibleElements.forEach((s=>{s.style.height=`${e}px`,s.style.top=`${t.height}px`}))}_applyCompactViewColumnLabels(){const t=this._getHeaderCells().map((t=>t.innerText));this.querySelectorAll("vscode-table-row").forEach((e=>{e.querySelectorAll("vscode-table-cell").forEach(((e,s)=>{e.columnLabel=t[s],e.compact=!0}))}))}_clearCompactViewColumnLabels(){this.querySelectorAll("vscode-table-cell").forEach((t=>{t.columnLabel="",t.compact=!1}))}_toggleCompactView(){const t=this.getBoundingClientRect().width<this.breakpoint;this.compact!==t&&(this.compact=t,t?this._applyCompactViewColumnLabels():this._clearCompactViewColumnLabels())}_onHeaderSlotChange(){this._headerCells=this._queryHeaderCells()}_onBodySlotChange(){if(this._initDefaultColumnSizes(),this._initResizeObserver(),this._updateResizeHandlersSize(),!this._bodyResizeObserver){const t=this._assignedBodyElements[0]??null;t&&(this._bodyResizeObserver=new ResizeObserver(this._bodyResizeObserverCallback),this._bodyResizeObserver.observe(t))}}_onSashMouseOver(t){if(this._isDragging)return;const e=t.currentTarget,s=Number(e.dataset.index);this._sashHovers[s]=!0,this.requestUpdate()}_onSashMouseOut(t){if(t.stopPropagation(),this._isDragging)return;const e=t.currentTarget,s=Number(e.dataset.index);this._sashHovers[s]=!1,this.requestUpdate()}_onSashMouseDown(t){t.stopPropagation();const{pageX:e,currentTarget:s}=t,i=s,o=Number(i.dataset.index),r=i.getBoundingClientRect().x;this._isDragging=!0,this._activeSashElementIndex=o,this._sashHovers[this._activeSashElementIndex]=!0,this._activeSashCursorOffset=this._px2Percent(e-r);const n=this._getHeaderCells();this._headerCellsToResize=[],this._headerCellsToResize.push(n[o]),n[o+1]&&(this._headerCellsToResize[1]=n[o+1]);const l=this._bodySlot.assignedElements()[0].querySelectorAll("vscode-table-row:first-child > vscode-table-cell");this._cellsToResize=[],this._cellsToResize.push(l[o]),l[o+1]&&this._cellsToResize.push(l[o+1]),document.addEventListener("mousemove",this._onResizingMouseMove),document.addEventListener("mouseup",this._onResizingMouseUp)}_updateActiveSashPosition(t){const{prevSashPos:e,nextSashPos:s}=this._getSashPositions();let i=Ts(this.minColumnWidth,this._componentW);null===i&&(i=0);const o=e?e+i:i,r=s?s-i:100-i;let n=this._px2Percent(t-this._componentX-this._percent2Px(this._activeSashCursorOffset));n=Math.max(n,o),n=Math.min(n,r),this._sashPositions[this._activeSashElementIndex]=n,this.requestUpdate()}_getSashPositions(){return{sashPos:this._sashPositions[this._activeSashElementIndex],prevSashPos:this._sashPositions[this._activeSashElementIndex-1]||0,nextSashPos:this._sashPositions[this._activeSashElementIndex+1]||100}}_resizeColumns(t=!0){const{sashPos:e,prevSashPos:s,nextSashPos:i}=this._getSashPositions(),o=`${e-s}%`,r=`${i-e}%`;this._headerCellsToResize[0].style.width=o,this._headerCellsToResize[1]&&(this._headerCellsToResize[1].style.width=r),t&&(this._cellsToResize[0].style.width=o,this._cellsToResize[1]&&(this._cellsToResize[1].style.width=r))}render(){const t=this._sashPositions.map(((t,e)=>{const s=At({sash:!0,hover:this._sashHovers[e],resizable:this.resizable}),i=`${t}%`;return this.resizable?U`
|
|
2328
2338
|
<div
|
|
2329
2339
|
class=${s}
|
|
2330
2340
|
data-index=${e}
|
|
2331
|
-
.style=${
|
|
2341
|
+
.style=${Et({left:i})}
|
|
2332
2342
|
@mousedown=${this._onSashMouseDown}
|
|
2333
2343
|
@mouseover=${this._onSashMouseOver}
|
|
2334
2344
|
@mouseout=${this._onSashMouseOut}
|
|
@@ -2336,13 +2346,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2336
2346
|
<div class="sash-visible"></div>
|
|
2337
2347
|
<div class="sash-clickable"></div>
|
|
2338
2348
|
</div>
|
|
2339
|
-
`:
|
|
2349
|
+
`:U`<div
|
|
2340
2350
|
class=${s}
|
|
2341
2351
|
data-index=${e}
|
|
2342
|
-
.style=${
|
|
2352
|
+
.style=${Et({left:i})}
|
|
2343
2353
|
>
|
|
2344
2354
|
<div class="sash-visible"></div>
|
|
2345
|
-
</div>`})),e=
|
|
2355
|
+
</div>`})),e=At({wrapper:!0,"select-disabled":this._isDragging,"resize-cursor":this._isDragging,"compact-view":this.compact});return U`
|
|
2346
2356
|
<div class=${e}>
|
|
2347
2357
|
<div class="header" @slotchange=${this._onHeaderSlotChange}>
|
|
2348
2358
|
<slot name="caption"></slot>
|
|
@@ -2357,7 +2367,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2357
2367
|
</vscode-scrollable>
|
|
2358
2368
|
${t}
|
|
2359
2369
|
</div>
|
|
2360
|
-
`}};
|
|
2370
|
+
`}};qs.styles=Ls,Us([ut({reflect:!0})],qs.prototype,"role",void 0),Us([ut({type:Boolean,reflect:!0})],qs.prototype,"resizable",void 0),Us([ut({type:Boolean,reflect:!0})],qs.prototype,"responsive",void 0),Us([ut({type:Boolean,reflect:!0})],qs.prototype,"bordered",void 0),Us([ut({type:Boolean,reflect:!0,attribute:"bordered-columns"})],qs.prototype,"borderedColumns",void 0),Us([ut({type:Boolean,reflect:!0,attribute:"bordered-rows"})],qs.prototype,"borderedRows",void 0),Us([ut({type:Number})],qs.prototype,"breakpoint",void 0),Us([ut({type:Array})],qs.prototype,"columns",null),Us([ut({attribute:"min-column-width"})],qs.prototype,"minColumnWidth",void 0),Us([ut({type:Boolean,reflect:!0,attribute:"delayed-resizing"})],qs.prototype,"delayedResizing",void 0),Us([ut({type:Boolean,reflect:!0})],qs.prototype,"compact",void 0),Us([ut({type:Boolean,reflect:!0})],qs.prototype,"zebra",void 0),Us([ut({type:Boolean,reflect:!0,attribute:"zebra-odd"})],qs.prototype,"zebraOdd",void 0),Us([bt('slot[name="body"]')],qs.prototype,"_bodySlot",void 0),Us([bt(".header")],qs.prototype,"_headerElement",void 0),Us([bt(".scrollable")],qs.prototype,"_scrollableElement",void 0),Us([function(t){return(e,s)=>pt(0,0,{get(){return(this.renderRoot??(ft??=document.createDocumentFragment())).querySelectorAll(t)}})}(".sash-visible")],qs.prototype,"_sashVisibleElements",void 0),Us([gt({slot:"header",flatten:!0,selector:"vscode-table-header"})],qs.prototype,"_assignedHeaderElements",void 0),Us([gt({slot:"body",flatten:!0,selector:"vscode-table-body"})],qs.prototype,"_assignedBodyElements",void 0),Us([vt()],qs.prototype,"_sashPositions",void 0),Us([vt()],qs.prototype,"_isDragging",void 0),qs=Us([ct("vscode-table")],qs);const Hs=[xt,n`
|
|
2361
2371
|
:host {
|
|
2362
2372
|
display: block;
|
|
2363
2373
|
}
|
|
@@ -2389,9 +2399,9 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2389
2399
|
display: block;
|
|
2390
2400
|
margin-left: auto;
|
|
2391
2401
|
}
|
|
2392
|
-
`];var
|
|
2402
|
+
`];var Ks=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 Ws=class extends mt{constructor(){super(),this.panel=!1,this.role="tablist",this.selectedIndex=0,this._tabHeaders=[],this._tabPanels=[],this._componentId="",this._tabFocus=0,this._componentId=ke()}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 ks));t.length>0&&t.forEach((t=>t.setAttribute("slot","header")))}_onMainSlotChange(){this._moveHeadersToHeaderSlot(),this._tabPanels=this._mainSlotElements.filter((t=>t instanceof Cs)),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 ks)),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 ks));e&&(this.selectedIndex=e.tabId,this._setActiveTab(),this._dispatchSelectEvent())}render(){return U`
|
|
2393
2403
|
<div
|
|
2394
|
-
class=${
|
|
2404
|
+
class=${At({header:!0,panel:this.panel})}
|
|
2395
2405
|
@click=${this._onHeaderClick}
|
|
2396
2406
|
@keydown=${this._onHeaderKeyDown}
|
|
2397
2407
|
>
|
|
@@ -2399,7 +2409,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2399
2409
|
<slot name="addons"></slot>
|
|
2400
2410
|
</div>
|
|
2401
2411
|
<slot @slotchange=${this._onMainSlotChange}></slot>
|
|
2402
|
-
`}};
|
|
2412
|
+
`}};Ws.styles=Hs,Ks([ut({type:Boolean,reflect:!0})],Ws.prototype,"panel",void 0),Ks([ut({reflect:!0})],Ws.prototype,"role",void 0),Ks([ut({type:Number,reflect:!0,attribute:"selected-index"})],Ws.prototype,"selectedIndex",void 0),Ks([gt({slot:"header"})],Ws.prototype,"_headerSlotElements",void 0),Ks([gt()],Ws.prototype,"_mainSlotElements",void 0),Ws=Ks([ct("vscode-tabs")],Ws);const Gs=[xt,n`
|
|
2403
2413
|
:host {
|
|
2404
2414
|
--hover-outline-color: transparent;
|
|
2405
2415
|
--hover-outline-style: solid;
|
|
@@ -2645,65 +2655,65 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
|
|
|
2645
2655
|
:host([indent-guides]) ul ul.has-active-item:before {
|
|
2646
2656
|
background-color: var(--vscode-tree-indentGuidesStroke);
|
|
2647
2657
|
}
|
|
2648
|
-
`];var
|
|
2658
|
+
`];var Js=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,e=[])=>{const s=[];return t.forEach(((t,i)=>{const o=[...e,i],r={...t,path:o};t.subItems&&(r.subItems=Ys(t.subItems,o)),s.push(r)})),s},Xs=t=>!!(t.subItems&&Array.isArray(t.subItems)&&t?.subItems?.length>0);let Zs=class extends mt{constructor(){super(...arguments),this.indent=8,this.arrows=!1,this.multiline=!1,this.tabindex=0,this.indentGuides=!1,this._data=[],this._selectedItem=null,this._focusedItem=null,this._selectedBranch=null,this._focusedBranch=null,this._handleComponentKeyDownBound=this._handleComponentKeyDown.bind(this)}set data(t){const e=this._data;this._data=Ys(t),this.requestUpdate("data",e)}get data(){return this._data}closeAll(){this._closeSubTreeRecursively(this.data),this.requestUpdate()}deselectAll(){this._deselectItemsRecursively(this.data),this.requestUpdate()}getItemByPath(t){return this._getItemByPath(t)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleComponentKeyDownBound)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleComponentKeyDownBound)}_getItemByPath(t){let e=this._data,s=null;return t.forEach(((i,o)=>{o===t.length-1?s=e[i]:e=e[i].subItems})),s}_handleActionClick(t){t.stopPropagation();const e=t.target,s=e.dataset.itemPath,i=e.dataset.index;let o=null,r="",n="";if(s){const t=s.split("/").map((t=>Number(t)));if(o=this._getItemByPath(t),o?.actions){const t=Number(i);o.actions[t]&&(r=o.actions[t].actionId)}o?.value&&(n=o.value)}this.dispatchEvent(new CustomEvent("vsc-run-action",{detail:{actionId:r,item:o,value:n}})),this.dispatchEvent(new CustomEvent("vsc-tree-action",{detail:{actionId:r,item:o,value:n}}))}_renderIconVariant(t){const{type:e,value:s}=t;return"themeicon"===e?U`<vscode-icon name=${s} class="theme-icon"></vscode-icon>`:U`<span
|
|
2649
2659
|
class="image-icon"
|
|
2650
|
-
.style=${
|
|
2651
|
-
></span>`}_renderIcon(t){const e={branch:{value:"folder",type:"themeicon"},open:{value:"folder-opened",type:"themeicon"},leaf:{value:"file",type:"themeicon"}};if(t.iconUrls)t.iconUrls.branch&&(e.branch={value:t.iconUrls.branch,type:"image"}),t.iconUrls.leaf&&(e.leaf={value:t.iconUrls.leaf,type:"image"}),t.iconUrls.open&&(e.open={value:t.iconUrls.open,type:"image"});else if("object"==typeof t.icons)t.icons.branch&&(e.branch={value:t.icons.branch,type:"themeicon"}),t.icons.leaf&&(e.leaf={value:t.icons.leaf,type:"themeicon"}),t.icons.open&&(e.open={value:t.icons.open,type:"themeicon"});else if(!t.icons)return
|
|
2660
|
+
.style=${Et({backgroundImage:`url(${s})`})}
|
|
2661
|
+
></span>`}_renderIcon(t){const e={branch:{value:"folder",type:"themeicon"},open:{value:"folder-opened",type:"themeicon"},leaf:{value:"file",type:"themeicon"}};if(t.iconUrls)t.iconUrls.branch&&(e.branch={value:t.iconUrls.branch,type:"image"}),t.iconUrls.leaf&&(e.leaf={value:t.iconUrls.leaf,type:"image"}),t.iconUrls.open&&(e.open={value:t.iconUrls.open,type:"image"});else if("object"==typeof t.icons)t.icons.branch&&(e.branch={value:t.icons.branch,type:"themeicon"}),t.icons.leaf&&(e.leaf={value:t.icons.leaf,type:"themeicon"}),t.icons.open&&(e.open={value:t.icons.open,type:"themeicon"});else if(!t.icons)return U`${H}`;return Xs(t)?t.open?this._renderIconVariant(e.open):this._renderIconVariant(e.branch):this._renderIconVariant(e.leaf)}_renderArrow(t){if(!this.arrows||!Xs(t))return U`${H}`;const{open:e=!1}=t;return U`
|
|
2652
2662
|
<div class="arrow-container">
|
|
2653
2663
|
<vscode-icon name=${e?"chevron-down":"chevron-right"} class="icon-arrow"></vscode-icon>
|
|
2654
2664
|
</div>
|
|
2655
|
-
`}_renderActions(t){const e=[];return t.actions&&Array.isArray(t.actions)&&t.actions.forEach(((s,i)=>{if(s.icon){const o=
|
|
2665
|
+
`}_renderActions(t){const e=[];return t.actions&&Array.isArray(t.actions)&&t.actions.forEach(((s,i)=>{if(s.icon){const o=U`<vscode-icon
|
|
2656
2666
|
name=${s.icon}
|
|
2657
2667
|
action-icon
|
|
2658
|
-
title=${
|
|
2659
|
-
data-item-path=${
|
|
2668
|
+
title=${Ot(s.tooltip)}
|
|
2669
|
+
data-item-path=${Ot(t.path?.join("/"))}
|
|
2660
2670
|
data-index=${i}
|
|
2661
2671
|
class="action-icon"
|
|
2662
2672
|
@click=${this._handleActionClick}
|
|
2663
|
-
></vscode-icon>`;e.push(o)}})),e.length>0?
|
|
2673
|
+
></vscode-icon>`;e.push(o)}})),e.length>0?U`<div class="actions">${e}</div>`:U`${H}`}_renderDecorations(t){const e=[];return t.decorations&&Array.isArray(t.decorations)&&t.decorations.forEach((t=>{const{appearance:s="text",visibleWhen:i="always",content:o="",color:r="",focusedColor:n="",hoverColor:l="",selectedColor:a=""}=t,c=`visible-when-${i}`,h={};switch(r&&(h["--color"]=r),n&&(h["--focused-color"]=n),l&&(h["--hover-color"]=l),a&&(h["--selected-color"]=a),s){case"counter-badge":e.push(U`<vscode-badge
|
|
2664
2674
|
variant="counter"
|
|
2665
|
-
class=${["counter-badge",
|
|
2675
|
+
class=${["counter-badge",c].join(" ")}
|
|
2666
2676
|
part="counter-badge-decoration"
|
|
2667
2677
|
>${o}</vscode-badge
|
|
2668
|
-
>`);break;case"filled-circle":e.push(
|
|
2678
|
+
>`);break;case"filled-circle":e.push(U`<vscode-icon
|
|
2669
2679
|
name="circle-filled"
|
|
2670
2680
|
size="14"
|
|
2671
|
-
class=${["filled-circle",
|
|
2681
|
+
class=${["filled-circle",c].join(" ")}
|
|
2672
2682
|
part="filled-circle-decoration"
|
|
2673
|
-
.style=${
|
|
2674
|
-
></vscode-icon>`);break;case"text":e.push(
|
|
2675
|
-
class=${["decoration-text",
|
|
2683
|
+
.style=${Et(h)}
|
|
2684
|
+
></vscode-icon>`);break;case"text":e.push(U`<div
|
|
2685
|
+
class=${["decoration-text",c].join(" ")}
|
|
2676
2686
|
part="caption-decoration"
|
|
2677
|
-
.style=${
|
|
2687
|
+
.style=${Et(h)}
|
|
2678
2688
|
>
|
|
2679
2689
|
${o}
|
|
2680
|
-
</div>`)}})),e.length>0?
|
|
2690
|
+
</div>`)}})),e.length>0?U`<div class="decorations" part="decorations">
|
|
2681
2691
|
${e}
|
|
2682
|
-
</div>`:
|
|
2683
|
-
.style=${
|
|
2684
|
-
class=${
|
|
2692
|
+
</div>`:U`${H}`}_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?U`<ul
|
|
2693
|
+
.style=${Et({"--indent-guide-pos":`${x}px`})}
|
|
2694
|
+
class=${At({"has-active-item":d||u})}
|
|
2685
2695
|
>
|
|
2686
|
-
${this._renderTree(a,
|
|
2687
|
-
</ul>`:
|
|
2688
|
-
<li data-path=${
|
|
2696
|
+
${this._renderTree(a,c)}
|
|
2697
|
+
</ul>`:H,w=o?U`<span class="description" part="description">${o}</span>`:H,k=this._renderActions(t),$=this._renderDecorations(t);return p.push(h),n&&v.push("selected"),l&&v.push("focused"),U`
|
|
2698
|
+
<li data-path=${c.join("/")} class=${p.join(" ")}>
|
|
2689
2699
|
<div
|
|
2690
2700
|
class=${v.join(" ")}
|
|
2691
|
-
.style=${
|
|
2701
|
+
.style=${Et({paddingLeft:`${f+3}px`})}
|
|
2692
2702
|
>
|
|
2693
2703
|
${g}${m}<span
|
|
2694
2704
|
class="text-content"
|
|
2695
2705
|
part="text-content"
|
|
2696
|
-
title=${
|
|
2706
|
+
title=${Ot(r)}
|
|
2697
2707
|
>${i}${w}</span
|
|
2698
2708
|
>
|
|
2699
2709
|
${k} ${$}
|
|
2700
2710
|
</div>
|
|
2701
2711
|
${y}
|
|
2702
2712
|
</li>
|
|
2703
|
-
`}_renderTree(t,e=[]){const s=[];return t?(t.forEach(((t,i)=>{const o=[...e,i],r=
|
|
2713
|
+
`}_renderTree(t,e=[]){const s=[];return t?(t.forEach(((t,i)=>{const o=[...e,i],r=Xs(t)?"branch":"leaf",{selected:n=!1,focused:l=!1,hasFocusedItem:a=!1,hasSelectedItem:c=!1}=t;n&&(this._selectedItem=t),l&&(this._focusedItem=t),s.push(this._renderTreeItem(t,{path:o,itemType:r,hasFocusedItem:a,hasSelectedItem:c}))})),s):H}_selectItem(t){this._selectedItem&&(this._selectedItem.selected=!1),this._focusedItem&&(this._focusedItem.focused=!1),this._selectedItem=t,t.selected=!0,this._focusedItem=t,t.focused=!0,this._selectedBranch&&(this._selectedBranch.hasSelectedItem=!1);let e=null;if(t.path?.length&&t.path.length>1&&(e=this._getItemByPath(t.path.slice(0,-1))),Xs(t))this._selectedBranch=t,t.hasSelectedItem=!0,t.open=!t.open,t.open?(this._selectedBranch=t,t.hasSelectedItem=!0):e&&(this._selectedBranch=e,e.hasSelectedItem=!0);else if(t.path?.length&&t.path.length>1){const e=this._getItemByPath(t.path.slice(0,-1));e&&(this._selectedBranch=e,e.hasSelectedItem=!0)}else this._selectedBranch=t,t.hasSelectedItem=!0;this._emitSelectEvent(this._selectedItem,this._selectedItem.path.join("/")),this.requestUpdate()}_focusItem(t){this._focusedItem&&(this._focusedItem.focused=!1),this._focusedItem=t,t.focused=!0;const e=!!t?.subItems?.length;this._focusedBranch&&(this._focusedBranch.hasFocusedItem=!1);let s=null;t.path?.length&&t.path.length>1&&(s=this._getItemByPath(t.path.slice(0,-1))),e?t.open?(this._focusedBranch=t,t.hasFocusedItem=!0):!t.open&&s&&(this._focusedBranch=s,s.hasFocusedItem=!0):s&&(this._focusedBranch=s,s.hasFocusedItem=!0)}_closeSubTreeRecursively(t){t.forEach((t=>{t.open=!1,t.subItems&&t.subItems.length>0&&this._closeSubTreeRecursively(t.subItems)}))}_deselectItemsRecursively(t){t.forEach((t=>{t.selected&&(t.selected=!1),t.subItems&&t.subItems.length>0&&this._deselectItemsRecursively(t.subItems)}))}_emitSelectEvent(t,e){const{icons:s,label:i,open:o,value:r}=t,n={icons:s,itemType:Xs(t)?"branch":"leaf",label:i,open:o||!1,value:r||i,path:e};this.dispatchEvent(new CustomEvent("vsc-select",{bubbles:!0,composed:!0,detail:n})),this.dispatchEvent(new CustomEvent("vsc-tree-select",{detail:n}))}_focusPrevItem(){if(!this._focusedItem)return void this._focusItem(this._data[0]);const{path:t}=this._focusedItem;if(t&&t?.length>0){const e=t[t.length-1],s=t.length>1;if(e>0){const s=[...t];s[s.length-1]=e-1;const i=this._getItemByPath(s);let o=i;if(i?.open&&i.subItems?.length){const{subItems:t}=i;o=t[t.length-1]}this._focusItem(o)}else if(s){const e=[...t];e.pop(),this._focusItem(this._getItemByPath(e))}}else this._focusItem(this._data[0])}_focusNextItem(){if(!this._focusedItem)return void this._focusItem(this._data[0]);const{path:t,open:e}=this._focusedItem;if(e&&Array.isArray(this._focusedItem.subItems)&&this._focusedItem.subItems.length>0)return void this._focusItem(this._focusedItem.subItems[0]);const s=[...t];s[s.length-1]+=1;let i=this._getItemByPath(s);i?this._focusItem(i):(s.pop(),s.length>0&&(s[s.length-1]+=1,i=this._getItemByPath(s),i&&this._focusItem(i)))}_handleClick(t){const e=t.composedPath().find((t=>t.tagName&&"LI"===t.tagName.toUpperCase()));if(e){const t=(e.dataset.path||"").split("/").map((t=>Number(t))),s=this._getItemByPath(t);this._selectItem(s)}else this._focusedItem&&(this._focusedItem.focused=!1),this._focusedItem=null}_handleComponentKeyDown(t){const e=t.key;[" ","ArrowDown","ArrowUp","Enter","Escape"].includes(t.key)&&(t.stopPropagation(),t.preventDefault()),"Escape"===e&&(this._focusedItem=null),"ArrowUp"===e&&this._focusPrevItem(),"ArrowDown"===e&&this._focusNextItem(),"Enter"!==e&&" "!==e||this._focusedItem&&this._selectItem(this._focusedItem)}render(){const t=At({multi:this.multiline,single:!this.multiline,wrapper:!0,"has-not-focused-item":!this._focusedItem,"selection-none":!this._selectedItem,"selection-single":null!==this._selectedItem});return U`
|
|
2704
2714
|
<div @click=${this._handleClick} class=${t}>
|
|
2705
2715
|
<ul>
|
|
2706
2716
|
${this._renderTree(this._data)}
|
|
2707
2717
|
</ul>
|
|
2708
2718
|
</div>
|
|
2709
|
-
`}};
|
|
2719
|
+
`}};Zs.styles=Gs,Js([ut({type:Array,reflect:!1})],Zs.prototype,"data",null),Js([ut({type:Number})],Zs.prototype,"indent",void 0),Js([ut({type:Boolean,reflect:!0})],Zs.prototype,"arrows",void 0),Js([ut({type:Boolean,reflect:!0})],Zs.prototype,"multiline",void 0),Js([ut({type:Number,reflect:!0})],Zs.prototype,"tabindex",void 0),Js([ut({type:Boolean,reflect:!0,attribute:"indent-guides"})],Zs.prototype,"indentGuides",void 0),Js([vt()],Zs.prototype,"_selectedItem",void 0),Js([vt()],Zs.prototype,"_focusedItem",void 0),Js([vt()],Zs.prototype,"_selectedBranch",void 0),Js([vt()],Zs.prototype,"_focusedBranch",void 0),Zs=Js([ct("vscode-tree")],Zs);export{$t as VscodeBadge,Nt as VscodeButton,Kt as VscodeCheckbox,Jt as VscodeCheckboxGroup,Zt as VscodeCollapsible,oe as VscodeContextMenu,ee as VscodeContextMenuItem,le as VscodeDivider,ve as VscodeFormContainer,fe as VscodeFormGroup,ye as VscodeFormHelper,Ft as VscodeIcon,Fe as VscodeLabel,es as VscodeMultiSelect,Ke as VscodeOption,os as VscodeProgressRing,ls as VscodeRadio,Ce as VscodeRadioGroup,us as VscodeScrollable,cs as VscodeSingleSelect,xs as VscodeSplitLayout,ks as VscodeTabHeader,Cs as VscodeTabPanel,qs as VscodeTable,zs as VscodeTableBody,Es as VscodeTableCell,Ms as VscodeTableHeader,Ds as VscodeTableHeaderCell,Rs as VscodeTableRow,Ws as VscodeTabs,ze as VscodeTextarea,je as VscodeTextfield,Zs as VscodeTree};
|