@vscode-elements/elements 1.6.2-pre.2 → 1.6.2

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.
@@ -24,7 +24,7 @@
24
24
  "text": "string"
25
25
  },
26
26
  "privacy": "private",
27
- "default": "'1.6.2-pre.2'"
27
+ "default": "'1.6.2'"
28
28
  },
29
29
  {
30
30
  "kind": "field",
@@ -293,7 +293,7 @@
293
293
  "text": "string"
294
294
  },
295
295
  "privacy": "private",
296
- "default": "'1.6.2-pre.2'",
296
+ "default": "'1.6.2'",
297
297
  "inheritedFrom": {
298
298
  "name": "VscElement",
299
299
  "module": "src/includes/VscElement.ts"
@@ -579,7 +579,7 @@
579
579
  "text": "string"
580
580
  },
581
581
  "privacy": "private",
582
- "default": "'1.6.2-pre.2'",
582
+ "default": "'1.6.2'",
583
583
  "inheritedFrom": {
584
584
  "name": "VscElement",
585
585
  "module": "src/includes/VscElement.ts"
@@ -1070,7 +1070,7 @@
1070
1070
  "text": "string"
1071
1071
  },
1072
1072
  "privacy": "private",
1073
- "default": "'1.6.2-pre.2'",
1073
+ "default": "'1.6.2'",
1074
1074
  "inheritedFrom": {
1075
1075
  "name": "VscElement",
1076
1076
  "module": "src/includes/VscElement.ts"
@@ -1285,7 +1285,7 @@
1285
1285
  "text": "string"
1286
1286
  },
1287
1287
  "privacy": "private",
1288
- "default": "'1.6.2-pre.2'",
1288
+ "default": "'1.6.2'",
1289
1289
  "inheritedFrom": {
1290
1290
  "name": "VscElement",
1291
1291
  "module": "src/includes/VscElement.ts"
@@ -1467,7 +1467,7 @@
1467
1467
  "text": "string"
1468
1468
  },
1469
1469
  "privacy": "private",
1470
- "default": "'1.6.2-pre.2'",
1470
+ "default": "'1.6.2'",
1471
1471
  "inheritedFrom": {
1472
1472
  "name": "VscElement",
1473
1473
  "module": "src/includes/VscElement.ts"
@@ -1770,7 +1770,7 @@
1770
1770
  "text": "string"
1771
1771
  },
1772
1772
  "privacy": "private",
1773
- "default": "'1.6.2-pre.2'",
1773
+ "default": "'1.6.2'",
1774
1774
  "inheritedFrom": {
1775
1775
  "name": "VscElement",
1776
1776
  "module": "src/includes/VscElement.ts"
@@ -1960,7 +1960,7 @@
1960
1960
  "text": "string"
1961
1961
  },
1962
1962
  "privacy": "private",
1963
- "default": "'1.6.2-pre.2'",
1963
+ "default": "'1.6.2'",
1964
1964
  "inheritedFrom": {
1965
1965
  "name": "VscElement",
1966
1966
  "module": "src/includes/VscElement.ts"
@@ -2096,7 +2096,7 @@
2096
2096
  "text": "string"
2097
2097
  },
2098
2098
  "privacy": "private",
2099
- "default": "'1.6.2-pre.2'",
2099
+ "default": "'1.6.2'",
2100
2100
  "inheritedFrom": {
2101
2101
  "name": "VscElement",
2102
2102
  "module": "src/includes/VscElement.ts"
@@ -2314,7 +2314,7 @@
2314
2314
  "text": "string"
2315
2315
  },
2316
2316
  "privacy": "private",
2317
- "default": "'1.6.2-pre.2'",
2317
+ "default": "'1.6.2'",
2318
2318
  "inheritedFrom": {
2319
2319
  "name": "VscElement",
2320
2320
  "module": "src/includes/VscElement.ts"
@@ -2446,7 +2446,7 @@
2446
2446
  "text": "string"
2447
2447
  },
2448
2448
  "privacy": "private",
2449
- "default": "'1.6.2-pre.2'",
2449
+ "default": "'1.6.2'",
2450
2450
  "inheritedFrom": {
2451
2451
  "name": "VscElement",
2452
2452
  "module": "src/includes/VscElement.ts"
@@ -2546,7 +2546,7 @@
2546
2546
  "text": "string"
2547
2547
  },
2548
2548
  "privacy": "private",
2549
- "default": "'1.6.2-pre.2'",
2549
+ "default": "'1.6.2'",
2550
2550
  "inheritedFrom": {
2551
2551
  "name": "VscElement",
2552
2552
  "module": "src/includes/VscElement.ts"
@@ -2744,7 +2744,7 @@
2744
2744
  "text": "string"
2745
2745
  },
2746
2746
  "privacy": "private",
2747
- "default": "'1.6.2-pre.2'",
2747
+ "default": "'1.6.2'",
2748
2748
  "inheritedFrom": {
2749
2749
  "name": "VscElement",
2750
2750
  "module": "src/includes/VscElement.ts"
@@ -2964,7 +2964,7 @@
2964
2964
  "text": "string"
2965
2965
  },
2966
2966
  "privacy": "private",
2967
- "default": "'1.6.2-pre.2'",
2967
+ "default": "'1.6.2'",
2968
2968
  "inheritedFrom": {
2969
2969
  "name": "VscElement",
2970
2970
  "module": "src/includes/VscElement.ts"
@@ -4057,7 +4057,7 @@
4057
4057
  "text": "string"
4058
4058
  },
4059
4059
  "privacy": "private",
4060
- "default": "'1.6.2-pre.2'",
4060
+ "default": "'1.6.2'",
4061
4061
  "inheritedFrom": {
4062
4062
  "name": "VscElement",
4063
4063
  "module": "src/includes/VscElement.ts"
@@ -4300,7 +4300,7 @@
4300
4300
  "text": "string"
4301
4301
  },
4302
4302
  "privacy": "private",
4303
- "default": "'1.6.2-pre.2'",
4303
+ "default": "'1.6.2'",
4304
4304
  "inheritedFrom": {
4305
4305
  "name": "VscElement",
4306
4306
  "module": "src/includes/VscElement.ts"
@@ -4448,7 +4448,7 @@
4448
4448
  "text": "string"
4449
4449
  },
4450
4450
  "privacy": "private",
4451
- "default": "'1.6.2-pre.2'",
4451
+ "default": "'1.6.2'",
4452
4452
  "inheritedFrom": {
4453
4453
  "name": "VscElement",
4454
4454
  "module": "src/includes/VscElement.ts"
@@ -4915,7 +4915,7 @@
4915
4915
  "text": "string"
4916
4916
  },
4917
4917
  "privacy": "private",
4918
- "default": "'1.6.2-pre.2'",
4918
+ "default": "'1.6.2'",
4919
4919
  "inheritedFrom": {
4920
4920
  "name": "VscElement",
4921
4921
  "module": "src/includes/VscElement.ts"
@@ -5227,7 +5227,7 @@
5227
5227
  "text": "string"
5228
5228
  },
5229
5229
  "privacy": "private",
5230
- "default": "'1.6.2-pre.2'",
5230
+ "default": "'1.6.2'",
5231
5231
  "inheritedFrom": {
5232
5232
  "name": "VscElement",
5233
5233
  "module": "src/includes/VscElement.ts"
@@ -5609,7 +5609,7 @@
5609
5609
  "text": "string"
5610
5610
  },
5611
5611
  "privacy": "private",
5612
- "default": "'1.6.2-pre.2'",
5612
+ "default": "'1.6.2'",
5613
5613
  "inheritedFrom": {
5614
5614
  "name": "VscElement",
5615
5615
  "module": "src/includes/VscElement.ts"
@@ -6677,7 +6677,7 @@
6677
6677
  "text": "string"
6678
6678
  },
6679
6679
  "privacy": "private",
6680
- "default": "'1.6.2-pre.2'",
6680
+ "default": "'1.6.2'",
6681
6681
  "inheritedFrom": {
6682
6682
  "name": "VscElement",
6683
6683
  "module": "src/includes/VscElement.ts"
@@ -7116,7 +7116,7 @@
7116
7116
  "text": "string"
7117
7117
  },
7118
7118
  "privacy": "private",
7119
- "default": "'1.6.2-pre.2'",
7119
+ "default": "'1.6.2'",
7120
7120
  "inheritedFrom": {
7121
7121
  "name": "VscElement",
7122
7122
  "module": "src/includes/VscElement.ts"
@@ -7276,7 +7276,7 @@
7276
7276
  "text": "string"
7277
7277
  },
7278
7278
  "privacy": "private",
7279
- "default": "'1.6.2-pre.2'",
7279
+ "default": "'1.6.2'",
7280
7280
  "inheritedFrom": {
7281
7281
  "name": "VscElement",
7282
7282
  "module": "src/includes/VscElement.ts"
@@ -7408,7 +7408,7 @@
7408
7408
  "text": "string"
7409
7409
  },
7410
7410
  "privacy": "private",
7411
- "default": "'1.6.2-pre.2'",
7411
+ "default": "'1.6.2'",
7412
7412
  "inheritedFrom": {
7413
7413
  "name": "VscElement",
7414
7414
  "module": "src/includes/VscElement.ts"
@@ -8098,7 +8098,7 @@
8098
8098
  "text": "string"
8099
8099
  },
8100
8100
  "privacy": "private",
8101
- "default": "'1.6.2-pre.2'",
8101
+ "default": "'1.6.2'",
8102
8102
  "inheritedFrom": {
8103
8103
  "name": "VscElement",
8104
8104
  "module": "src/includes/VscElement.ts"
@@ -8282,7 +8282,7 @@
8282
8282
  "text": "string"
8283
8283
  },
8284
8284
  "privacy": "private",
8285
- "default": "'1.6.2-pre.2'",
8285
+ "default": "'1.6.2'",
8286
8286
  "inheritedFrom": {
8287
8287
  "name": "VscElement",
8288
8288
  "module": "src/includes/VscElement.ts"
@@ -8401,7 +8401,7 @@
8401
8401
  "text": "string"
8402
8402
  },
8403
8403
  "privacy": "private",
8404
- "default": "'1.6.2-pre.2'",
8404
+ "default": "'1.6.2'",
8405
8405
  "inheritedFrom": {
8406
8406
  "name": "VscElement",
8407
8407
  "module": "src/includes/VscElement.ts"
@@ -8511,7 +8511,7 @@
8511
8511
  "text": "string"
8512
8512
  },
8513
8513
  "privacy": "private",
8514
- "default": "'1.6.2-pre.2'",
8514
+ "default": "'1.6.2'",
8515
8515
  "inheritedFrom": {
8516
8516
  "name": "VscElement",
8517
8517
  "module": "src/includes/VscElement.ts"
@@ -8606,7 +8606,7 @@
8606
8606
  "text": "string"
8607
8607
  },
8608
8608
  "privacy": "private",
8609
- "default": "'1.6.2-pre.2'",
8609
+ "default": "'1.6.2'",
8610
8610
  "inheritedFrom": {
8611
8611
  "name": "VscElement",
8612
8612
  "module": "src/includes/VscElement.ts"
@@ -8695,7 +8695,7 @@
8695
8695
  "text": "string"
8696
8696
  },
8697
8697
  "privacy": "private",
8698
- "default": "'1.6.2-pre.2'",
8698
+ "default": "'1.6.2'",
8699
8699
  "inheritedFrom": {
8700
8700
  "name": "VscElement",
8701
8701
  "module": "src/includes/VscElement.ts"
@@ -8944,7 +8944,7 @@
8944
8944
  "text": "string"
8945
8945
  },
8946
8946
  "privacy": "private",
8947
- "default": "'1.6.2-pre.2'",
8947
+ "default": "'1.6.2'",
8948
8948
  "inheritedFrom": {
8949
8949
  "name": "VscElement",
8950
8950
  "module": "src/includes/VscElement.ts"
@@ -9452,7 +9452,7 @@
9452
9452
  "text": "string"
9453
9453
  },
9454
9454
  "privacy": "private",
9455
- "default": "'1.6.2-pre.2'",
9455
+ "default": "'1.6.2'",
9456
9456
  "inheritedFrom": {
9457
9457
  "name": "VscElement",
9458
9458
  "module": "src/includes/VscElement.ts"
@@ -10077,7 +10077,7 @@
10077
10077
  "text": "string"
10078
10078
  },
10079
10079
  "privacy": "private",
10080
- "default": "'1.6.2-pre.2'",
10080
+ "default": "'1.6.2'",
10081
10081
  "inheritedFrom": {
10082
10082
  "name": "VscElement",
10083
10083
  "module": "src/includes/VscElement.ts"
@@ -10813,7 +10813,7 @@
10813
10813
  "text": "string"
10814
10814
  },
10815
10815
  "privacy": "private",
10816
- "default": "'1.6.2-pre.2'",
10816
+ "default": "'1.6.2'",
10817
10817
  "inheritedFrom": {
10818
10818
  "name": "VscElement",
10819
10819
  "module": "src/includes/VscElement.ts"
@@ -10983,7 +10983,7 @@
10983
10983
  "text": "string"
10984
10984
  },
10985
10985
  "privacy": "private",
10986
- "default": "'1.6.2-pre.2'",
10986
+ "default": "'1.6.2'",
10987
10987
  "inheritedFrom": {
10988
10988
  "name": "VscElement",
10989
10989
  "module": "src/includes/VscElement.ts"
@@ -11964,7 +11964,7 @@
11964
11964
  "text": "string"
11965
11965
  },
11966
11966
  "privacy": "private",
11967
- "default": "'1.6.2-pre.2'",
11967
+ "default": "'1.6.2'",
11968
11968
  "inheritedFrom": {
11969
11969
  "name": "VscElement",
11970
11970
  "module": "src/includes/VscElement.ts"
package/dist/bundled.js CHANGED
@@ -1,4 +1,4 @@
1
- const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),i=new WeakMap;let o=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=i.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&i.set(s,t))}return t}toString(){return this.cssText}};const r=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new o(i,t,s)},n=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,s))(e)})(t):t,{is:l,defineProperty:a,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:d,getPrototypeOf:u}=Object,v=globalThis,p=v.trustedTypes,b=p?p.emptyScript:"",f=v.reactiveElementPolyfillSupport,g=(t,e)=>t,m={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},x=(t,e)=>!l(t,e),y={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;class w extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&a(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);o.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(g("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(g("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(g("properties"))){const t=this.properties,e=[...h(t),...d(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(n(t))}else void 0!==t&&e.push(n(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((s,i)=>{if(e)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of i){const i=document.createElement("style"),o=t.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)}})(s,this.constructor.elementStyles),s}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:m).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:m;this._$Em=i,this[i]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??x)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[g("elementProperties")]=new Map,w[g("finalized")]=new Map,f?.({ReactiveElement:w}),(v.reactiveElementVersions??=[]).push("2.0.4");const k=globalThis,$=k.trustedTypes,_=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,S="?"+B,z=`<${S}>`,A=document,O=()=>A.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,I=t=>j(t)||"function"==typeof t?.[Symbol.iterator],M="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,N=/>/g,P=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),T=/'/g,V=/"/g,R=/^(?:script|style|textarea|title)$/i,L=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),U=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),q=new WeakMap,K=A.createTreeWalker(A,129);function W(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==_?_.createHTML(e):e}const G=(t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<s;e++){const s=t[e];let l,a,c=-1,h=0;for(;h<s.length&&(n.lastIndex=h,a=n.exec(s),null!==a);)h=n.lastIndex,n===F?"!--"===a[1]?n=D:void 0!==a[1]?n=N:void 0!==a[2]?(R.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=P):void 0!==a[3]&&(n=P):n===P?">"===a[0]?(n=o??F,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?P:'"'===a[3]?V:T):n===V||n===T?n=P:n===D||n===N?n=F:(n=P,o=void 0);const d=n===P&&t[e+1].startsWith("/>")?" ":"";r+=n===F?s+z:c>=0?(i.push(l),s.slice(0,c)+C+s.slice(c)+B+d):s+B+(-2===c?e:d)}return[W(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class J{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,c]=G(t,e);if(this.el=J.createElement(a,s),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=K.nextNode())&&l.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(C)){const e=c[r++],s=i.getAttribute(t).split(B),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?tt:"?"===n[1]?et:"@"===n[1]?st:Q}),i.removeAttribute(t)}else t.startsWith(B)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(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=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=Y(this,t,e),E(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):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!==H&&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=q.get(t.strings);return void 0===e&&q.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=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=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===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 tt extends Q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===H?void 0:t}}class et extends Q{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==H)}}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)??H)===U)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 it{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const ot={M:C,P:B,A:S,C:1,L:G,R:X,D:I,V:Y,I:Z,H:Q,N:et,U:st,B:tt,F:it},rt=k.litHtmlPolyfillSupport;rt?.(J,Z),(k.litHtmlVersions??=[]).push("3.2.0");class nt extends w{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=((t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new Z(e.insertBefore(O(),t),t,void 0,s??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return U}}nt._$litElement$=!0,nt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:nt});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:nt}),(globalThis.litElementVersions??=[]).push("4.1.0");const at=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},ct={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x},ht=(t=ct,e,s)=>{const{kind:i,metadata:o}=s;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),r.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const o=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,o,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const o=this[i];e.call(this,s),this.requestUpdate(i,o,t)}}throw Error("Unsupported decorator location: "+i)};function dt(t){return(e,s)=>"object"==typeof s?ht(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}function ut(t){return dt({...t,state:!0,attribute:!1})}const vt=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,s);function pt(t,e){return(e,s,i)=>vt(0,0,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let bt;function ft(t){return(e,s)=>{const{slot:i,selector:o}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return vt(0,0,{get(){const e=this.renderRoot?.querySelector(r),s=e?.assignedElements(t)??[];return void 0===o?s:s.filter((t=>t.matches(o)))}})}}class gt extends nt{constructor(){super(...arguments),this._version="1.6.2-pre.2"}get version(){return this._version}}var mt=r`
1
+ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),i=new WeakMap;let o=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=i.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&i.set(s,t))}return t}toString(){return this.cssText}};const r=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new o(i,t,s)},n=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,s))(e)})(t):t,{is:l,defineProperty:a,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:d,getPrototypeOf:u}=Object,v=globalThis,p=v.trustedTypes,b=p?p.emptyScript:"",f=v.reactiveElementPolyfillSupport,g=(t,e)=>t,m={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},x=(t,e)=>!l(t,e),y={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;class w extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&a(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const r=i?.call(this);o.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(g("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(g("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(g("properties"))){const t=this.properties,e=[...h(t),...d(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(n(t))}else void 0!==t&&e.push(n(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((s,i)=>{if(e)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of i){const i=document.createElement("style"),o=t.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)}})(s,this.constructor.elementStyles),s}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:m).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:m;this._$Em=i,this[i]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??x)(this[t],e))return;this.P(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[g("elementProperties")]=new Map,w[g("finalized")]=new Map,f?.({ReactiveElement:w}),(v.reactiveElementVersions??=[]).push("2.0.4");const k=globalThis,$=k.trustedTypes,_=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,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,D=/-->/g,N=/>/g,P=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),T=/'/g,V=/"/g,R=/^(?:script|style|textarea|title)$/i,L=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),U=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),q=new WeakMap,K=A.createTreeWalker(A,129);function W(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==_?_.createHTML(e):e}const G=(t,e)=>{const s=t.length-1,i=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<s;e++){const s=t[e];let l,a,c=-1,h=0;for(;h<s.length&&(n.lastIndex=h,a=n.exec(s),null!==a);)h=n.lastIndex,n===F?"!--"===a[1]?n=D:void 0!==a[1]?n=N:void 0!==a[2]?(R.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=P):void 0!==a[3]&&(n=P):n===P?">"===a[0]?(n=o??F,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?P:'"'===a[3]?V:T):n===V||n===T?n=P:n===D||n===N?n=F:(n=P,o=void 0);const d=n===P&&t[e+1].startsWith("/>")?" ":"";r+=n===F?s+z:c>=0?(i.push(l),s.slice(0,c)+C+s.slice(c)+B+d):s+B+(-2===c?e:d)}return[W(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class J{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,c]=G(t,e);if(this.el=J.createElement(a,s),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=K.nextNode())&&l.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(C)){const e=c[r++],s=i.getAttribute(t).split(B),n=/([.?@])?(.*)/.exec(e);l.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?tt:"?"===n[1]?et:"@"===n[1]?st:Q}),i.removeAttribute(t)}else t.startsWith(B)&&(l.push({type:6,index:o}),i.removeAttribute(t));if(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=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=Y(this,t,e),E(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):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!==H&&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=q.get(t.strings);return void 0===e&&q.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=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=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===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 tt extends Q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===H?void 0:t}}class et extends Q{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==H)}}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)??H)===U)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 it{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const ot={M:C,P:B,A:S,C:1,L:G,R:X,D:I,V:Y,I:Z,H:Q,N:et,U:st,B:tt,F:it},rt=k.litHtmlPolyfillSupport;rt?.(J,Z),(k.litHtmlVersions??=[]).push("3.2.0");class nt extends w{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=((t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new Z(e.insertBefore(O(),t),t,void 0,s??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return U}}nt._$litElement$=!0,nt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:nt});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:nt}),(globalThis.litElementVersions??=[]).push("4.1.0");const at=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},ct={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x},ht=(t=ct,e,s)=>{const{kind:i,metadata:o}=s;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),r.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const o=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,o,t)},init(e){return void 0!==e&&this.P(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const o=this[i];e.call(this,s),this.requestUpdate(i,o,t)}}throw Error("Unsupported decorator location: "+i)};function dt(t){return(e,s)=>"object"==typeof s?ht(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}function ut(t){return dt({...t,state:!0,attribute:!1})}const vt=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,s);function pt(t,e){return(e,s,i)=>vt(0,0,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let bt;function ft(t){return(e,s)=>{const{slot:i,selector:o}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return vt(0,0,{get(){const e=this.renderRoot?.querySelector(r),s=e?.assignedElements(t)??[];return void 0===o?s:s.filter((t=>t.matches(o)))}})}}class gt extends nt{constructor(){super(...arguments),this._version="1.6.2"}get version(){return this._version}}var mt=r`
2
2
  :host([hidden]) {
3
3
  display: none;
4
4
  }
@@ -1660,7 +1660,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1660
1660
  </span>
1661
1661
  </label>
1662
1662
  </div>
1663
- `}};ds.styles=cs,ds.formAssociated=!0,ds.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},hs([dt({type:Boolean,reflect:!0})],ds.prototype,"autofocus",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"checked",void 0),hs([dt({type:Boolean,reflect:!0,attribute:"default-checked"})],ds.prototype,"defaultChecked",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"invalid",void 0),hs([dt({reflect:!0})],ds.prototype,"name",void 0),hs([dt()],ds.prototype,"value",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"disabled",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"required",void 0),hs([dt({reflect:!0})],ds.prototype,"role",void 0),hs([dt({type:Number,reflect:!0})],ds.prototype,"tabIndex",void 0),hs([ut()],ds.prototype,"_slottedText",void 0),hs([pt("#input")],ds.prototype,"_inputEl",void 0),ds=hs([at("vscode-radio")],ds);var us=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let vs=class extends ts{set selectedIndex(t){this._selectedIndex=t,this._value=this._options[this._selectedIndex]?this._options[this._selectedIndex].value:"",this._labelText=this._options[this._selectedIndex]?this._options[this._selectedIndex].label:""}get selectedIndex(){return this._selectedIndex}set value(t){this._options[this._selectedIndex]&&(this._options[this._selectedIndex].selected=!1),this._selectedIndex=this._options.findIndex((e=>e.value===t)),this._selectedIndex>-1?(this._options[this._selectedIndex].selected=!0,this._labelText=this._options[this._selectedIndex].label,this._value=t):(this._labelText="",this._value="")}get value(){return this._options[this._selectedIndex]?this._options[this._selectedIndex]?.value??"":""}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}updateInputValue(){if(!this.combobox)return;const t=this.renderRoot.querySelector(".combobox-input");t&&(t.value=this._options[this._selectedIndex]?this._options[this._selectedIndex].label:"")}constructor(){super(),this.defaultValue="",this.role="listbox",this.name=void 0,this.required=!1,this._labelText="",this._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(){super._onSlotChange(),this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex]?.label??"")}_onArrowUpKeyDown(){super._onArrowUpKeyDown(),this._showDropdown||this._selectedIndex<=0||(this._filterPattern="",this._selectedIndex-=1,this._activeIndex=this._selectedIndex,this._labelText=this._options[this._selectedIndex].label,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onArrowDownKeyDown(){super._onArrowDownKeyDown(),this._showDropdown||this._selectedIndex>=this._options.length-1||(this._filterPattern="",this._selectedIndex+=1,this._activeIndex=this._selectedIndex,this._labelText=this._options[this._selectedIndex].label,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onEnterKeyDown(){super._onEnterKeyDown(),this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex].label),this.updateInputValue(),this._internals.setFormValue(this._value),this._manageRequired()}_onOptionClick(t){const e=t.composedPath().find((t=>t?.matches("li.option")));e&&!e.matches(".disabled")&&(this._selectedIndex=Number(e.dataset.index),this._value=this._options[this._selectedIndex].value,this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex].label),this._toggleDropdown(!1),this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_manageRequired(){const{value:t}=this;""===t&&this.required?this._internals.setValidity({valueMissing:!0},"Please select an item in the list."):this._internals.setValidity({})}_renderLabel(){const t=this._labelText||L`<span class="empty-label-placeholder"></span>`;return L`<span class="text">${t}</span>`}_renderSelectFace(){return L`
1663
+ `}};ds.styles=cs,ds.formAssociated=!0,ds.shadowRootOptions={...nt.shadowRootOptions,delegatesFocus:!0},hs([dt({type:Boolean,reflect:!0})],ds.prototype,"autofocus",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"checked",void 0),hs([dt({type:Boolean,reflect:!0,attribute:"default-checked"})],ds.prototype,"defaultChecked",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"invalid",void 0),hs([dt({reflect:!0})],ds.prototype,"name",void 0),hs([dt()],ds.prototype,"value",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"disabled",void 0),hs([dt({type:Boolean,reflect:!0})],ds.prototype,"required",void 0),hs([dt({reflect:!0})],ds.prototype,"role",void 0),hs([dt({type:Number,reflect:!0})],ds.prototype,"tabIndex",void 0),hs([ut()],ds.prototype,"_slottedText",void 0),hs([pt("#input")],ds.prototype,"_inputEl",void 0),ds=hs([at("vscode-radio")],ds);var us=function(t,e,s,i){for(var o,r=arguments.length,n=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,s,n):o(e,s))||n);return r>3&&n&&Object.defineProperty(e,s,n),n};let vs=class extends ts{set selectedIndex(t){this._selectedIndex=t,this._value=this._options[this._selectedIndex]?this._options[this._selectedIndex].value:"",this._labelText=this._options[this._selectedIndex]?this._options[this._selectedIndex].label:""}get selectedIndex(){return this._selectedIndex}set value(t){this._options[this._selectedIndex]&&(this._options[this._selectedIndex].selected=!1),this._selectedIndex=this._options.findIndex((e=>e.value===t)),this._selectedIndex>-1?(this._options[this._selectedIndex].selected=!0,this._labelText=this._options[this._selectedIndex].label,this._value=t):(this._labelText="",this._value="")}get value(){return this._options[this._selectedIndex]?this._options[this._selectedIndex]?.value??"":""}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}updateInputValue(){if(!this.combobox)return;const t=this.renderRoot.querySelector(".combobox-input");t&&(t.value=this._options[this._selectedIndex]?this._options[this._selectedIndex].label:"")}constructor(){super(),this.defaultValue="",this.role="listbox",this.name=void 0,this.required=!1,this._labelText="",this._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(){super._onSlotChange(),this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex]?.label??""),this._selectedIndex>-1&&this._options.length>0?this._internals.setFormValue(this._options[this._selectedIndex].value):this._internals.setFormValue(null)}_onArrowUpKeyDown(){super._onArrowUpKeyDown(),this._showDropdown||this._selectedIndex<=0||(this._filterPattern="",this._selectedIndex-=1,this._activeIndex=this._selectedIndex,this._labelText=this._options[this._selectedIndex].label,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onArrowDownKeyDown(){super._onArrowDownKeyDown(),this._showDropdown||this._selectedIndex>=this._options.length-1||(this._filterPattern="",this._selectedIndex+=1,this._activeIndex=this._selectedIndex,this._labelText=this._options[this._selectedIndex].label,this._value=this._options[this._selectedIndex].value,this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_onEnterKeyDown(){super._onEnterKeyDown(),this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex].label),this.updateInputValue(),this._internals.setFormValue(this._value),this._manageRequired()}_onOptionClick(t){const e=t.composedPath().find((t=>t?.matches("li.option")));e&&!e.matches(".disabled")&&(this._selectedIndex=Number(e.dataset.index),this._value=this._options[this._selectedIndex].value,this._selectedIndex>-1&&(this._labelText=this._options[this._selectedIndex].label),this._toggleDropdown(!1),this._internals.setFormValue(this._value),this._manageRequired(),this._dispatchChangeEvent())}_manageRequired(){const{value:t}=this;""===t&&this.required?this._internals.setValidity({valueMissing:!0},"Please select an item in the list."):this._internals.setValidity({})}_renderLabel(){const t=this._labelText||L`<span class="empty-label-placeholder"></span>`;return L`<span class="text">${t}</span>`}_renderSelectFace(){return L`
1664
1664
  <div
1665
1665
  class="select-face"
1666
1666
  @click="${this._onFaceClick}"
@@ -1 +1 @@
1
- {"version":3,"file":"VscElement.d.ts","sourceRoot":"","sources":["../../src/includes/VscElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAE/B,qBAAa,UAAW,SAAQ,UAAU;IACxC,OAAO,CAAC,QAAQ,CAAiB;IAEjC,0BAA0B;IAC1B,IAAI,OAAO,WAEV;CACF"}
1
+ {"version":3,"file":"VscElement.d.ts","sourceRoot":"","sources":["../../src/includes/VscElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAE/B,qBAAa,UAAW,SAAQ,UAAU;IACxC,OAAO,CAAC,QAAQ,CAAW;IAE3B,0BAA0B;IAC1B,IAAI,OAAO,WAEV;CACF"}
@@ -2,7 +2,7 @@ import { LitElement } from 'lit';
2
2
  export class VscElement extends LitElement {
3
3
  constructor() {
4
4
  super(...arguments);
5
- this._version = '1.6.2-pre.2';
5
+ this._version = '1.6.2';
6
6
  }
7
7
  /** VSC Element version */
8
8
  get version() {
@@ -1 +1 @@
1
- {"version":3,"file":"VscElement.js","sourceRoot":"","sources":["../../src/includes/VscElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAE/B,MAAM,OAAO,UAAW,SAAQ,UAAU;IAA1C;;QACU,aAAQ,GAAG,aAAa,CAAC;IAMnC,CAAC;IAJC,0BAA0B;IAC1B,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF","sourcesContent":["import {LitElement} from 'lit';\n\nexport class VscElement extends LitElement {\n private _version = '1.6.2-pre.2';\n\n /** VSC Element version */\n get version() {\n return this._version;\n }\n}\n"]}
1
+ {"version":3,"file":"VscElement.js","sourceRoot":"","sources":["../../src/includes/VscElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAE/B,MAAM,OAAO,UAAW,SAAQ,UAAU;IAA1C;;QACU,aAAQ,GAAG,OAAO,CAAC;IAM7B,CAAC;IAJC,0BAA0B;IAC1B,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF","sourcesContent":["import {LitElement} from 'lit';\n\nexport class VscElement extends LitElement {\n private _version = '1.6.2';\n\n /** VSC Element version */\n get version() {\n return this._version;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"vscode-single-select.d.ts","sourceRoot":"","sources":["../../src/vscode-single-select/vscode-single-select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,cAAc,EAAC,MAAM,KAAK,CAAC;AAIrD,OAAO,EAAC,gBAAgB,EAAC,MAAM,iDAAiD,CAAC;AAEjF,OAAO,EAAC,qBAAqB,EAAC,MAAM,sCAAsC,CAAC;AAG3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH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AI;IAQzB,gBAAgB;IAChB,iBAAiB,IAAI,IAAI;IAIzB,gBAAgB;IAChB,wBAAwB,CACtB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,SAAS,GAAG,cAAc,GAChC,IAAI;IAMP,gBAAgB;IAChB,IAAI,IAAI,IAAI,YAAY,CAEvB;IAED,IAAI,IAAI,IAAI,eAAe,GAAG,IAAI,CAEjC;IAED,SAAS,CAAC,aAAa,IAAI,IAAI;IAc/B,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAiBnC,SAAS,CAAC,mBAAmB,IAAI,IAAI;IAiBrC,SAAS,CAAC,eAAe,IAAI,IAAI;IAYjC,OAAO,CAAC,cAAc;IAuBtB,OAAO,CAAC,eAAe;IAcvB,OAAO,CAAC,YAAY;IAOpB,SAAS,CAAC,iBAAiB,IAAI,cAAc;IAY7C,SAAS,CAAC,mBAAmB,IAAI,cAAc;IA2B/C,SAAS,CAAC,cAAc,IAAI,cAAc;CAgC3C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,kBAAkB,CAAC;KAC5C;CACF"}
@@ -153,6 +153,12 @@ let VscodeSingleSelect = class VscodeSingleSelect extends VscodeSelectBase {
153
153
  if (this._selectedIndex > -1) {
154
154
  this._labelText = this._options[this._selectedIndex]?.label ?? '';
155
155
  }
156
+ if (this._selectedIndex > -1 && this._options.length > 0) {
157
+ this._internals.setFormValue(this._options[this._selectedIndex].value);
158
+ }
159
+ else {
160
+ this._internals.setFormValue(null);
161
+ }
156
162
  }
157
163
  _onArrowUpKeyDown() {
158
164
  super._onArrowUpKeyDown();
@@ -271,7 +277,7 @@ let VscodeSingleSelect = class VscodeSingleSelect extends VscodeSelectBase {
271
277
  data-index="${op.index}"
272
278
  data-filtered-index="${index}"
273
279
  >
274
- ${op.ranges?.length ?? 0 > 0
280
+ ${(op.ranges?.length ?? 0 > 0)
275
281
  ? highlightRanges(op.label, op.ranges ?? [])
276
282
  : op.label}
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AAI,CAAC,cAAc;;UAE3B,OAAO;;KAEZ,CAAC;IACJ,CAAC;;AAvTM,yBAAM,GAAG,MAAM,AAAT,CAAU;AAEvB,gBAAgB;AACA,oCAAiB,GAAmB;IAClD,GAAG,UAAU,CAAC,iBAAiB;IAC/B,cAAc,EAAE,IAAI;CACrB,AAHgC,CAG/B;AAEF,gBAAgB;AACT,iCAAc,GAAG,IAAI,AAAP,CAAQ;AAG7B;IADC,QAAQ,CAAC,EAAC,SAAS,EAAE,eAAe,EAAC,CAAC;wDACrB;AAIlB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;gDACxC;AAGjB;IADC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;gDACW;AAGrC;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAC,CAAC;uDASrD;AAMD;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;+CAgBxB;AAUD;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;oDACxB;AAuBT;IADP,KAAK,EAAE;sDACgB;AAxFb,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CA4T9B","sourcesContent":["import {html, LitElement, TemplateResult} from 'lit';\nimport {customElement, property, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {chevronDownIcon} from '../includes/vscode-select/template-elements.js';\nimport {VscodeSelectBase} from '../includes/vscode-select/vscode-select-base.js';\nimport styles from './vscode-single-select.styles.js';\nimport {AssociatedFormControl} from '../includes/AssociatedFormControl.js';\nimport {highlightRanges} from '../includes/vscode-select/helpers.js';\n\n/**\n * Allows to select an item from multiple options.\n *\n * When participating in a form, it supports the `:invalid` pseudo class. Otherwise the error styles\n * can be applied through the `invalid` property.\n *\n * ## Types\n *\n * ```typescript\n *interface Option {\n * label: string;\n * value: string;\n * description: string;\n * selected: boolean;\n * disabled: boolean;\n *}\n * ```\n * @prop {boolean} invalid\n * @attr {boolean} invalid\n * @attr name - Name which is used as a variable name in the data of the form-container.\n * @cssprop [--dropdown-z-index=2]\n * @cssprop --vscode-badge-background\n * @cssprop --vscode-badge-foreground\n * @cssprop --vscode-settings-dropdownBorder\n * @cssprop --vscode-settings-checkboxBackground\n * @cssprop --vscode-settings-dropdownBackground\n * @cssprop --vscode-settings-dropdownListBorder\n * @cssprop --vscode-focusBorder\n * @cssprop --vscode-foreground\n * @cssprop --vscode-font-family\n * @cssprop --vscode-font-size\n * @cssprop --vscode-font-weight\n * @cssprop --vscode-list-activeSelectionBackground\n * @cssprop --vscode-list-activeSelectionForeground\n * @cssprop --vscode-list-focusOutline\n * @cssprop --vscode-list-highlightForeground\n * @cssprop --vscode-list-focusHighlightForeground\n * @cssprop --vscode-list-hoverBackground\n * @cssprop --vscode-list-hoverForeground\n * @cssprop --vscode-list-hoverBackground\n * @cssprop --vscode-settings-textInputBackground\n */\n@customElement('vscode-single-select')\nexport class VscodeSingleSelect\n extends VscodeSelectBase\n implements AssociatedFormControl\n{\n static styles = styles;\n\n /** @internal */\n static override shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /** @internal */\n static formAssociated = true;\n\n @property({attribute: 'default-value'})\n defaultValue = '';\n\n /** @internal */\n @property({type: String, attribute: true, reflect: true})\n role = 'listbox';\n\n @property({reflect: true})\n name: string | undefined = undefined;\n\n @property({type: Number, attribute: 'selected-index'})\n set selectedIndex(val: number) {\n this._selectedIndex = val;\n this._value = this._options[this._selectedIndex]\n ? this._options[this._selectedIndex].value\n : '';\n this._labelText = this._options[this._selectedIndex]\n ? this._options[this._selectedIndex].label\n : '';\n }\n get selectedIndex(): number {\n return this._selectedIndex;\n }\n\n @property({type: String})\n set value(val: string) {\n if (this._options[this._selectedIndex]) {\n this._options[this._selectedIndex].selected = false;\n }\n\n this._selectedIndex = this._options.findIndex((op) => op.value === val);\n\n if (this._selectedIndex > -1) {\n this._options[this._selectedIndex].selected = true;\n this._labelText = this._options[this._selectedIndex].label;\n this._value = val;\n } else {\n this._labelText = '';\n this._value = '';\n }\n }\n get value(): string {\n if (this._options[this._selectedIndex]) {\n return this._options[this._selectedIndex]?.value ?? '';\n }\n\n return '';\n }\n\n @property({type: Boolean, reflect: true})\n required = false;\n\n get validity(): ValidityState {\n return this._internals.validity;\n }\n\n get validationMessage(): string {\n return this._internals.validationMessage;\n }\n\n get willValidate() {\n return this._internals.willValidate;\n }\n\n checkValidity(): boolean {\n return this._internals.checkValidity();\n }\n\n reportValidity(): boolean {\n return this._internals.reportValidity();\n }\n\n @state()\n private _labelText = '';\n\n private _internals: ElementInternals;\n\n private updateInputValue() {\n if (!this.combobox) {\n return;\n }\n\n const input = this.renderRoot.querySelector(\n '.combobox-input'\n ) as HTMLInputElement;\n\n if (input) {\n input.value = this._options[this._selectedIndex]\n ? this._options[this._selectedIndex].label\n : '';\n }\n }\n\n constructor() {\n super();\n /** @internal */\n this._multiple = false;\n this._internals = this.attachInternals();\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.updateComplete.then(() => {\n this._manageRequired();\n });\n }\n\n /** @internal */\n formResetCallback(): void {\n this.value = this.defaultValue;\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string,\n _mode: 'restore' | 'autocomplete'\n ): void {\n this.updateComplete.then(() => {\n this.value = state;\n });\n }\n\n /** @internal */\n get type(): 'select-one' {\n return 'select-one';\n }\n\n get form(): HTMLFormElement | null {\n return this._internals.form;\n }\n\n protected _onSlotChange(): void {\n super._onSlotChange();\n\n if (this._selectedIndex > -1) {\n this._labelText = this._options[this._selectedIndex]?.label ?? '';\n }\n }\n\n protected _onArrowUpKeyDown(): void {\n super._onArrowUpKeyDown();\n\n if (this._showDropdown || this._selectedIndex <= 0) {\n return;\n }\n\n this._filterPattern = '';\n this._selectedIndex -= 1;\n this._activeIndex = this._selectedIndex;\n this._labelText = this._options[this._selectedIndex].label;\n this._value = this._options[this._selectedIndex].value;\n this._internals.setFormValue(this._value);\n this._manageRequired();\n this._dispatchChangeEvent();\n }\n\n protected _onArrowDownKeyDown(): void {\n super._onArrowDownKeyDown();\n\n if (this._showDropdown || this._selectedIndex >= this._options.length - 1) {\n return;\n }\n\n this._filterPattern = '';\n this._selectedIndex += 1;\n this._activeIndex = this._selectedIndex;\n this._labelText = this._options[this._selectedIndex].label;\n this._value = this._options[this._selectedIndex].value;\n this._internals.setFormValue(this._value);\n this._manageRequired();\n this._dispatchChangeEvent();\n }\n\n protected _onEnterKeyDown(): void {\n super._onEnterKeyDown();\n\n if (this._selectedIndex > -1) {\n this._labelText = this._options[this._selectedIndex].label;\n }\n\n this.updateInputValue();\n this._internals.setFormValue(this._value);\n this._manageRequired();\n }\n\n private _onOptionClick(ev: MouseEvent) {\n const composedPath = ev.composedPath();\n const optEl = composedPath.find((et) =>\n (et as HTMLElement)?.matches('li.option')\n ) as HTMLElement | undefined;\n\n if (!optEl || optEl.matches('.disabled')) {\n return;\n }\n\n this._selectedIndex = Number((optEl as HTMLElement).dataset.index);\n this._value = this._options[this._selectedIndex].value;\n\n if (this._selectedIndex > -1) {\n this._labelText = this._options[this._selectedIndex].label;\n }\n\n this._toggleDropdown(false);\n this._internals.setFormValue(this._value);\n this._manageRequired();\n this._dispatchChangeEvent();\n }\n\n private _manageRequired() {\n const {value} = this;\n if (value === '' && this.required) {\n this._internals.setValidity(\n {\n valueMissing: true,\n },\n 'Please select an item in the list.'\n );\n } else {\n this._internals.setValidity({});\n }\n }\n\n private _renderLabel() {\n const labelContent =\n this._labelText || html`<span class=\"empty-label-placeholder\"></span>`;\n\n return html`<span class=\"text\">${labelContent}</span>`;\n }\n\n protected _renderSelectFace(): TemplateResult {\n return html`\n <div\n class=\"select-face\"\n @click=\"${this._onFaceClick}\"\n tabindex=\"${this.tabIndex > -1 ? 0 : -1}\"\n >\n ${this._renderLabel()} ${chevronDownIcon}\n </div>\n `;\n }\n\n protected _renderComboboxFace(): TemplateResult {\n const inputVal =\n this._selectedIndex > -1 ? this._options[this._selectedIndex].label : '';\n\n return html`\n <div class=\"combobox-face\">\n <input\n class=\"combobox-input\"\n spellcheck=\"false\"\n type=\"text\"\n .value=\"${inputVal}\"\n @focus=\"${this._onComboboxInputFocus}\"\n @input=\"${this._onComboboxInputInput}\"\n @click=${this._onComboboxInputClick}\n />\n <button\n class=\"combobox-button\"\n type=\"button\"\n @click=\"${this._onComboboxButtonClick}\"\n @keydown=\"${this._onComboboxButtonKeyDown}\"\n >\n ${chevronDownIcon}\n </button>\n </div>\n `;\n }\n\n protected _renderOptions(): TemplateResult {\n const list = this.combobox ? this._filteredOptions : this._options;\n const options = list.map((op, index) => {\n const classes = classMap({\n option: true,\n active: index === this._activeIndex && !op.disabled,\n disabled: op.disabled,\n });\n\n return html`\n <li\n class=\"${classes}\"\n data-index=\"${op.index}\"\n data-filtered-index=\"${index}\"\n >\n ${op.ranges?.length ?? 0 > 0\n ? highlightRanges(op.label, op.ranges ?? [])\n : op.label}\n </li>\n `;\n });\n\n return html`\n <ul\n class=\"options\"\n @mouseover=\"${this._onOptionMouseOver}\"\n @click=\"${this._onOptionClick}\"\n >\n ${options}\n </ul>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'vscode-single-select': VscodeSingleSelect;\n }\n}\n"]}
1
+ {"version":3,"file":"vscode-single-select.js","sourceRoot":"","sources":["../../src/vscode-single-select/vscode-single-select.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,IAAI,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AACrD,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,eAAe,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IAAI,CAAC,cAAc;;UAE3B,OAAO;;KAEZ,CAAC;IACJ,CAAC;;AA7TM,yBAAM,GAAG,MAAM,AAAT,CAAU;AAEvB,gBAAgB;AACA,oCAAiB,GAAmB;IAClD,GAAG,UAAU,CAAC,iBAAiB;IAC/B,cAAc,EAAE,IAAI;CACrB,AAHgC,CAG/B;AAEF,gBAAgB;AACT,iCAAc,GAAG,IAAI,AAAP,CAAQ;AAG7B;IADC,QAAQ,CAAC,EAAC,SAAS,EAAE,eAAe,EAAC,CAAC;wDACrB;AAIlB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;gDACxC;AAGjB;IADC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;gDACW;AAGrC;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAC,CAAC;uDASrD;AAMD;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;+CAgBxB;AAUD;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;oDACxB;AAuBT;IADP,KAAK,EAAE;sDACgB;AAxFb,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CAkU9B","sourcesContent":["import {html, LitElement, TemplateResult} from 'lit';\nimport {customElement, property, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {chevronDownIcon} from '../includes/vscode-select/template-elements.js';\nimport {VscodeSelectBase} from '../includes/vscode-select/vscode-select-base.js';\nimport styles from './vscode-single-select.styles.js';\nimport {AssociatedFormControl} from '../includes/AssociatedFormControl.js';\nimport {highlightRanges} from '../includes/vscode-select/helpers.js';\n\n/**\n * Allows to select an item from multiple options.\n *\n * When participating in a form, it supports the `:invalid` pseudo class. Otherwise the error styles\n * can be applied through the `invalid` property.\n *\n * ## Types\n *\n * ```typescript\n *interface Option {\n * label: string;\n * value: string;\n * description: string;\n * selected: boolean;\n * disabled: boolean;\n *}\n * ```\n * @prop {boolean} invalid\n * @attr {boolean} invalid\n * @attr name - Name which is used as a variable name in the data of the form-container.\n * @cssprop [--dropdown-z-index=2]\n * @cssprop --vscode-badge-background\n * @cssprop --vscode-badge-foreground\n * @cssprop --vscode-settings-dropdownBorder\n * @cssprop --vscode-settings-checkboxBackground\n * @cssprop --vscode-settings-dropdownBackground\n * @cssprop --vscode-settings-dropdownListBorder\n * @cssprop --vscode-focusBorder\n * @cssprop --vscode-foreground\n * @cssprop --vscode-font-family\n * @cssprop --vscode-font-size\n * @cssprop --vscode-font-weight\n * @cssprop --vscode-list-activeSelectionBackground\n * @cssprop --vscode-list-activeSelectionForeground\n * @cssprop --vscode-list-focusOutline\n * @cssprop --vscode-list-highlightForeground\n * @cssprop --vscode-list-focusHighlightForeground\n * @cssprop --vscode-list-hoverBackground\n * @cssprop --vscode-list-hoverForeground\n * @cssprop --vscode-list-hoverBackground\n * @cssprop --vscode-settings-textInputBackground\n */\n@customElement('vscode-single-select')\nexport class VscodeSingleSelect\n extends VscodeSelectBase\n implements AssociatedFormControl\n{\n static styles = styles;\n\n /** @internal */\n static override shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /** @internal */\n static formAssociated = true;\n\n @property({attribute: 'default-value'})\n defaultValue = '';\n\n /** @internal */\n @property({type: String, attribute: true, reflect: true})\n role = 'listbox';\n\n @property({reflect: true})\n name: string | undefined = undefined;\n\n @property({type: Number, attribute: 'selected-index'})\n set selectedIndex(val: number) {\n this._selectedIndex = val;\n this._value = this._options[this._selectedIndex]\n ? this._options[this._selectedIndex].value\n : '';\n this._labelText = this._options[this._selectedIndex]\n ? this._options[this._selectedIndex].label\n : '';\n }\n get selectedIndex(): number {\n return this._selectedIndex;\n }\n\n @property({type: String})\n set value(val: string) {\n if (this._options[this._selectedIndex]) {\n this._options[this._selectedIndex].selected = false;\n }\n\n this._selectedIndex = this._options.findIndex((op) => op.value === val);\n\n if (this._selectedIndex > -1) {\n this._options[this._selectedIndex].selected = true;\n this._labelText = this._options[this._selectedIndex].label;\n this._value = val;\n } else {\n this._labelText = '';\n this._value = '';\n }\n }\n get value(): string {\n if (this._options[this._selectedIndex]) {\n return this._options[this._selectedIndex]?.value ?? '';\n }\n\n return '';\n }\n\n @property({type: Boolean, reflect: true})\n required = false;\n\n get validity(): ValidityState {\n return this._internals.validity;\n }\n\n get validationMessage(): string {\n return this._internals.validationMessage;\n }\n\n get willValidate() {\n return this._internals.willValidate;\n }\n\n checkValidity(): boolean {\n return this._internals.checkValidity();\n }\n\n reportValidity(): boolean {\n return this._internals.reportValidity();\n }\n\n @state()\n private _labelText = '';\n\n private _internals: ElementInternals;\n\n private updateInputValue() {\n if (!this.combobox) {\n return;\n }\n\n const input = this.renderRoot.querySelector(\n '.combobox-input'\n ) as HTMLInputElement;\n\n if (input) {\n input.value = this._options[this._selectedIndex]\n ? this._options[this._selectedIndex].label\n : '';\n }\n }\n\n constructor() {\n super();\n /** @internal */\n this._multiple = false;\n this._internals = this.attachInternals();\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n this.updateComplete.then(() => {\n this._manageRequired();\n });\n }\n\n /** @internal */\n formResetCallback(): void {\n this.value = this.defaultValue;\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string,\n _mode: 'restore' | 'autocomplete'\n ): void {\n this.updateComplete.then(() => {\n this.value = state;\n });\n }\n\n /** @internal */\n get type(): 'select-one' {\n return 'select-one';\n }\n\n get form(): HTMLFormElement | null {\n return this._internals.form;\n }\n\n protected _onSlotChange(): void {\n super._onSlotChange();\n\n if (this._selectedIndex > -1) {\n this._labelText = this._options[this._selectedIndex]?.label ?? '';\n }\n\n if (this._selectedIndex > -1 && this._options.length > 0) {\n this._internals.setFormValue(this._options[this._selectedIndex].value);\n } else {\n this._internals.setFormValue(null);\n }\n }\n\n protected _onArrowUpKeyDown(): void {\n super._onArrowUpKeyDown();\n\n if (this._showDropdown || this._selectedIndex <= 0) {\n return;\n }\n\n this._filterPattern = '';\n this._selectedIndex -= 1;\n this._activeIndex = this._selectedIndex;\n this._labelText = this._options[this._selectedIndex].label;\n this._value = this._options[this._selectedIndex].value;\n this._internals.setFormValue(this._value);\n this._manageRequired();\n this._dispatchChangeEvent();\n }\n\n protected _onArrowDownKeyDown(): void {\n super._onArrowDownKeyDown();\n\n if (this._showDropdown || this._selectedIndex >= this._options.length - 1) {\n return;\n }\n\n this._filterPattern = '';\n this._selectedIndex += 1;\n this._activeIndex = this._selectedIndex;\n this._labelText = this._options[this._selectedIndex].label;\n this._value = this._options[this._selectedIndex].value;\n this._internals.setFormValue(this._value);\n this._manageRequired();\n this._dispatchChangeEvent();\n }\n\n protected _onEnterKeyDown(): void {\n super._onEnterKeyDown();\n\n if (this._selectedIndex > -1) {\n this._labelText = this._options[this._selectedIndex].label;\n }\n\n this.updateInputValue();\n this._internals.setFormValue(this._value);\n this._manageRequired();\n }\n\n private _onOptionClick(ev: MouseEvent) {\n const composedPath = ev.composedPath();\n const optEl = composedPath.find((et) =>\n (et as HTMLElement)?.matches('li.option')\n ) as HTMLElement | undefined;\n\n if (!optEl || optEl.matches('.disabled')) {\n return;\n }\n\n this._selectedIndex = Number((optEl as HTMLElement).dataset.index);\n this._value = this._options[this._selectedIndex].value;\n\n if (this._selectedIndex > -1) {\n this._labelText = this._options[this._selectedIndex].label;\n }\n\n this._toggleDropdown(false);\n this._internals.setFormValue(this._value);\n this._manageRequired();\n this._dispatchChangeEvent();\n }\n\n private _manageRequired() {\n const {value} = this;\n if (value === '' && this.required) {\n this._internals.setValidity(\n {\n valueMissing: true,\n },\n 'Please select an item in the list.'\n );\n } else {\n this._internals.setValidity({});\n }\n }\n\n private _renderLabel() {\n const labelContent =\n this._labelText || html`<span class=\"empty-label-placeholder\"></span>`;\n\n return html`<span class=\"text\">${labelContent}</span>`;\n }\n\n protected _renderSelectFace(): TemplateResult {\n return html`\n <div\n class=\"select-face\"\n @click=\"${this._onFaceClick}\"\n tabindex=\"${this.tabIndex > -1 ? 0 : -1}\"\n >\n ${this._renderLabel()} ${chevronDownIcon}\n </div>\n `;\n }\n\n protected _renderComboboxFace(): TemplateResult {\n const inputVal =\n this._selectedIndex > -1 ? this._options[this._selectedIndex].label : '';\n\n return html`\n <div class=\"combobox-face\">\n <input\n class=\"combobox-input\"\n spellcheck=\"false\"\n type=\"text\"\n .value=\"${inputVal}\"\n @focus=\"${this._onComboboxInputFocus}\"\n @input=\"${this._onComboboxInputInput}\"\n @click=${this._onComboboxInputClick}\n />\n <button\n class=\"combobox-button\"\n type=\"button\"\n @click=\"${this._onComboboxButtonClick}\"\n @keydown=\"${this._onComboboxButtonKeyDown}\"\n >\n ${chevronDownIcon}\n </button>\n </div>\n `;\n }\n\n protected _renderOptions(): TemplateResult {\n const list = this.combobox ? this._filteredOptions : this._options;\n const options = list.map((op, index) => {\n const classes = classMap({\n option: true,\n active: index === this._activeIndex && !op.disabled,\n disabled: op.disabled,\n });\n\n return html`\n <li\n class=\"${classes}\"\n data-index=\"${op.index}\"\n data-filtered-index=\"${index}\"\n >\n ${(op.ranges?.length ?? 0 > 0)\n ? highlightRanges(op.label, op.ranges ?? [])\n : op.label}\n </li>\n `;\n });\n\n return html`\n <ul\n class=\"options\"\n @mouseover=\"${this._onOptionMouseOver}\"\n @click=\"${this._onOptionClick}\"\n >\n ${options}\n </ul>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'vscode-single-select': VscodeSingleSelect;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vscode-elements/elements",
3
- "version": "1.6.2-pre.2",
3
+ "version": "1.6.2",
4
4
  "description": "Webcomponents for creating Visual Studio Code extensions",
5
5
  "main": "dist/main.js",
6
6
  "module": "dist/main.js",
@@ -153,6 +153,7 @@
153
153
  "@types/node": "^22.6.1",
154
154
  "@typescript-eslint/eslint-plugin": "^8.7.0",
155
155
  "@typescript-eslint/parser": "^8.7.0",
156
+ "@vscode-elements/webview-playground": "^1.1.1",
156
157
  "@vscode/codicons": "^0.0.36",
157
158
  "@web/dev-server": "^0.4.6",
158
159
  "@web/dev-server-esbuild": "^1.0.2",