@cas-smartdesign/token-selector 0.16.2 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/docs/doc.mjs CHANGED
@@ -1,12 +1,12 @@
1
- (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function t(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=t(s);fetch(s.href,o)}})();const po="modulepreload",fo=function(i,e){return new URL(i,e).href},Wi={},Nt=function(e,t,n){let s=Promise.resolve();if(t&&t.length>0){const o=document.getElementsByTagName("link");s=Promise.all(t.map(r=>{if(r=fo(r,n),r in Wi)return;Wi[r]=!0;const a=r.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!n)for(let h=o.length-1;h>=0;h--){const p=o[h];if(p.href===r&&(!a||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const d=document.createElement("link");if(d.rel=a?"stylesheet":po,a||(d.as="script",d.crossOrigin=""),d.href=r,document.head.appendChild(d),a)return new Promise((h,p)=>{d.addEventListener("load",h),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${r}`)))})}))}return s.then(()=>e()).catch(o=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=o,window.dispatchEvent(r),!r.defaultPrevented)throw o})},go=`<div id="remove-only-example" class="example-root">
1
+ (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();const ho="modulepreload",po=function(i,e){return new URL(i,e).href},Wi={},Bt=function(e,t,n){let s=Promise.resolve();if(t&&t.length>0){const r=document.getElementsByTagName("link");s=Promise.all(t.map(o=>{if(o=po(o,n),o in Wi)return;Wi[o]=!0;const a=o.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!n)for(let h=r.length-1;h>=0;h--){const p=r[h];if(p.href===o&&(!a||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const d=document.createElement("link");if(d.rel=a?"stylesheet":ho,a||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),a)return new Promise((h,p)=>{d.addEventListener("load",h),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${o}`)))})}))}return s.then(()=>e()).catch(r=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=r,window.dispatchEvent(o),!o.defaultPrevented)throw r})},fo=`<div id="remove-only-example" class="example-root">
2
2
  <sd-token-selector selection-mode="remove-only"></sd-token-selector>
3
3
  <h4>Maximum two visible lines</h4>
4
4
  <sd-token-selector selection-mode="remove-only" style="max-height: 68px; overflow: auto"></sd-token-selector>
5
5
  <h4>Disabled</h4>
6
6
  <sd-token-selector selection-mode="remove-only" aria-disabled="true"></sd-token-selector>
7
7
  </div>
8
- `,mo=`<h3 id="remove-only-token-viewer">Remove only token viewer</h3>
9
- `,jt=`.example-root {
8
+ `,go=`<h3 id="remove-only-token-viewer">Remove only token viewer</h3>
9
+ `,zt=`.example-root {
10
10
  width: 100%;
11
11
  max-width: 600px;
12
12
  }
@@ -51,7 +51,7 @@ sd-token-selector:focus-within sd-token[aria-current="true"][type$="-tag"] {
51
51
  sd-token-selector[drop] {
52
52
  --input-wrapper-background-color: #dfeff9;
53
53
  }
54
- `,vo=`import TokenSelector from "@cas-smartdesign/token-selector";
54
+ `,mo=`import TokenSelector from "@cas-smartdesign/token-selector";
55
55
  import { getItems } from "token-provider";
56
56
 
57
57
  TokenSelector.ensureDefined();
@@ -64,7 +64,7 @@ document.querySelectorAll("#remove-only-example sd-token-selector").forEach((sel
64
64
  });
65
65
  }
66
66
  });
67
- `,vi=`import { TokenData } from "@cas-smartdesign/token-selector";
67
+ `,bi=`import { TokenData } from "@cas-smartdesign/token-selector";
68
68
 
69
69
  const demoSvg = "./demo.svg";
70
70
 
@@ -102,7 +102,7 @@ export function getItems(editable: boolean): TokenData[] {
102
102
  });
103
103
  return items;
104
104
  }
105
- `,bo={mainContent:go,description:mo,css:jt,initializer:{content:vo,type:"typescript",initialize:()=>Nt(()=>import("./1_remove_only.js"),__vite__mapDeps([0,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:vi}]},yo=Object.freeze(Object.defineProperty({__proto__:null,default:bo},Symbol.toStringTag,{value:"Module"})),wo=`<div id="multi-select-example" class="example-root">
105
+ `,vo={mainContent:fo,description:go,css:zt,initializer:{content:mo,type:"typescript",initialize:()=>Bt(()=>import("./1_remove_only.js"),__vite__mapDeps([0,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:bi}]},bo=Object.freeze(Object.defineProperty({__proto__:null,default:vo},Symbol.toStringTag,{value:"Module"})),yo=`<div id="multi-select-example" class="example-root">
106
106
  <sd-token-selector>
107
107
  <sd-button icon="edit.svg" slot="additional-content"></sd-button>
108
108
  </sd-token-selector>
@@ -114,8 +114,8 @@ export function getItems(editable: boolean): TokenData[] {
114
114
  <sd-button aria-disabled="true" icon="edit.svg" slot="additional-content"></sd-button>
115
115
  </sd-token-selector>
116
116
  </div>
117
- `,xo=`<h3 id="editable-token-selector">Editable token selector</h3>
118
- `,ko=`import "@cas-smartdesign/button";
117
+ `,wo=`<h3 id="editable-token-selector">Editable token selector</h3>
118
+ `,xo=`import "@cas-smartdesign/button";
119
119
  import { Button } from "@cas-smartdesign/button";
120
120
  import TokenSelector from "@cas-smartdesign/token-selector";
121
121
  import { getItems } from "token-provider";
@@ -139,7 +139,7 @@ document.querySelectorAll("#multi-select-example sd-token-selector").forEach((el
139
139
 
140
140
  editButton.addEventListener("click", () => tokenSelector.openSuggestions());
141
141
  });
142
- `,Eo={mainContent:wo,description:xo,css:jt,initializer:{content:ko,type:"typescript",initialize:()=>Nt(()=>import("./2_multi_select.js"),__vite__mapDeps([2,3,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:vi}]},So=Object.freeze(Object.defineProperty({__proto__:null,default:Eo},Symbol.toStringTag,{value:"Module"})),_o=`<div id="editable-input-attributes-example" class="example-root">
142
+ `,ko={mainContent:yo,description:wo,css:zt,initializer:{content:xo,type:"typescript",initialize:()=>Bt(()=>import("./2_multi_select.js"),__vite__mapDeps([2,3,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:bi}]},Eo=Object.freeze(Object.defineProperty({__proto__:null,default:ko},Symbol.toStringTag,{value:"Module"})),So=`<div id="editable-input-attributes-example" class="example-root">
143
143
  <sd-token-selector placeholder="Default"
144
144
  ><sd-button icon="edit.svg" slot="additional-content"></sd-button
145
145
  ></sd-token-selector>
@@ -153,8 +153,8 @@ document.querySelectorAll("#multi-select-example sd-token-selector").forEach((el
153
153
  ><sd-button icon="edit.svg" slot="additional-content"></sd-button
154
154
  ></sd-token-selector>
155
155
  </div>
156
- `,Ao=`<h3 id="editable-token-selector-with-various-input-attributes">Editable token selector with various input attributes</h3>
157
- `,$o=`import "@cas-smartdesign/button";
156
+ `,_o=`<h3 id="editable-token-selector-with-various-input-attributes">Editable token selector with various input attributes</h3>
157
+ `,Ao=`import "@cas-smartdesign/button";
158
158
  import { Button } from "@cas-smartdesign/button";
159
159
  import { ValidationLevel } from "@cas-smartdesign/field-validation-message";
160
160
  import TokenSelector from "@cas-smartdesign/token-selector";
@@ -192,7 +192,7 @@ document.querySelectorAll("#editable-input-attributes-example sd-token-selector"
192
192
 
193
193
  editButton.addEventListener("click", () => tokenSelector.openSuggestions());
194
194
  });
195
- `,Co={mainContent:_o,description:Ao,css:jt,initializer:{content:$o,type:"typescript",initialize:()=>Nt(()=>import("./3_editable_input_attributes.js"),__vite__mapDeps([4,3,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:vi}]},Oo=Object.freeze(Object.defineProperty({__proto__:null,default:Co},Symbol.toStringTag,{value:"Module"})),Io=`<div id="dnd-example" class="example-root">
195
+ `,$o={mainContent:So,description:_o,css:zt,initializer:{content:Ao,type:"typescript",initialize:()=>Bt(()=>import("./3_editable_input_attributes.js"),__vite__mapDeps([4,3,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:bi}]},Co=Object.freeze(Object.defineProperty({__proto__:null,default:$o},Symbol.toStringTag,{value:"Module"})),Io=`<div id="dnd-example" class="example-root">
196
196
  <sd-token-selector input-label="First selector"
197
197
  ><sd-button icon="edit.svg" slot="additional-content"></sd-button
198
198
  ></sd-token-selector>
@@ -206,8 +206,8 @@ document.querySelectorAll("#editable-input-attributes-example sd-token-selector"
206
206
  ><sd-button icon="edit.svg" slot="additional-content"></sd-button
207
207
  ></sd-token-selector>
208
208
  </div>
209
- `,To=`<h3 id="drag-and-drop-example">Drag and drop example</h3>
210
- `,Lo=`import "@cas-smartdesign/button";
209
+ `,Oo=`<h3 id="drag-and-drop-example">Drag and drop example</h3>
210
+ `,To=`import "@cas-smartdesign/button";
211
211
  import TokenSelector, { TokenData, generator } from "@cas-smartdesign/token-selector";
212
212
  import { getItems as getDefaultItems } from "../token-provider";
213
213
 
@@ -276,16 +276,19 @@ document.querySelectorAll("#dnd-example sd-token-selector").forEach((tokenSelect
276
276
  setUpWithSharedTokens(tokenSelector);
277
277
  }
278
278
  });
279
- `,Po={mainContent:Io,description:To,css:jt,initializer:{content:Lo,type:"typescript",initialize:()=>Nt(()=>import("./4_dnd.js"),__vite__mapDeps([5,3,1]),import.meta.url)}},Ro=Object.freeze(Object.defineProperty({__proto__:null,default:Po},Symbol.toStringTag,{value:"Module"})),Mo=`<div id="other-example" class="example-root">
279
+ `,Lo={mainContent:Io,description:Oo,css:zt,initializer:{content:To,type:"typescript",initialize:()=>Bt(()=>import("./4_dnd.js"),__vite__mapDeps([5,3,1]),import.meta.url)}},Ro=Object.freeze(Object.defineProperty({__proto__:null,default:Lo},Symbol.toStringTag,{value:"Module"})),Po=`<div id="other-example" class="example-root">
280
280
  <sd-token-selector input-label="Additional content" additional-icons
281
281
  ><sd-button icon="edit.svg" slot="additional-content"></sd-button
282
282
  ></sd-token-selector>
283
283
  <sd-token-selector input-label="Search also in description" search-also-in-description
284
284
  ><sd-button icon="edit.svg" slot="additional-content"></sd-button
285
285
  ></sd-token-selector>
286
+ <sd-token-selector class="many-tokens" input-label="Thousands of tokens" search-also-in-description
287
+ ><sd-button icon="edit.svg" slot="additional-content"></sd-button
288
+ ></sd-token-selector>
286
289
  </div>
287
- `,Do=`<h3 id="additional-examples">Additional examples</h3>
288
- `,No=`.overlap-indicator {
290
+ `,Mo=`<h3 id="additional-examples">Additional examples</h3>
291
+ `,Do=`.overlap-indicator {
289
292
  width: 4px;
290
293
  background-color: #999999;
291
294
  }
@@ -295,7 +298,7 @@ document.querySelectorAll("#dnd-example sd-token-selector").forEach((tokenSelect
295
298
  .overlap-indicator.blocked {
296
299
  background-color: #cc0000;
297
300
  }
298
- `,jo=`import "@cas-smartdesign/button";
301
+ `,No=`import "@cas-smartdesign/button";
299
302
  import { Button } from "@cas-smartdesign/button";
300
303
  import TokenSelector, { TokenData, generator } from "@cas-smartdesign/token-selector";
301
304
  import { getItems, OverlapStatus, InvitationStatus, ExtendedTokenData } from "./token-provider";
@@ -346,6 +349,12 @@ document.querySelectorAll("#other-example sd-token-selector").forEach((el) => {
346
349
  };
347
350
  tokenSelector.items = getItems();
348
351
  tokenSelector.selectedIndexes = [0, 1, 2, 3];
352
+ } else if (tokenSelector.classList.contains("many-tokens")) {
353
+ const items = [];
354
+ for (let index = 1; index <= 5000; index++) {
355
+ items.push({ caption: "Token_" + Math.random().toString(36).substring(7), description: String(index) });
356
+ }
357
+ tokenSelector.items = items;
349
358
  } else {
350
359
  tokenSelector.items = getDefaultItems(true);
351
360
  }
@@ -383,7 +392,7 @@ document.querySelectorAll("#other-example sd-token-selector").forEach((el) => {
383
392
 
384
393
  editButton.addEventListener("click", () => tokenSelector.openSuggestions());
385
394
  });
386
- `,Bo=`import { TokenData } from "@cas-smartdesign/token-selector";
395
+ `,jo=`import { TokenData } from "@cas-smartdesign/token-selector";
387
396
 
388
397
  export enum InvitationStatus {
389
398
  Accept = "accept",
@@ -434,13 +443,13 @@ export function getItems(): ExtendedTokenData[] {
434
443
  });
435
444
  return items;
436
445
  }
437
- `,zo={mainContent:Mo,description:Do,css:No+jt,initializer:{content:jo,type:"typescript",initialize:()=>Nt(()=>import("./5_other.js"),__vite__mapDeps([6,3,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:Bo}]},Uo=Object.freeze(Object.defineProperty({__proto__:null,default:zo},Symbol.toStringTag,{value:"Module"}));const an=window,bi=an.ShadowRoot&&(an.ShadyCSS===void 0||an.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yi=Symbol(),qi=new WeakMap;let zs=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==yi)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(bi&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=qi.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&qi.set(t,e))}return e}toString(){return this.cssText}};const ht=i=>new zs(typeof i=="string"?i:i+"",void 0,yi),wi=(i,...e)=>{const t=i.length===1?i[0]:e.reduce((n,s,o)=>n+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+i[o+1],i[0]);return new zs(t,i,yi)},Fo=(i,e)=>{bi?i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const n=document.createElement("style"),s=an.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=t.cssText,i.appendChild(n)})},Vi=bi?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return ht(t)})(i):i;var Dn;const fn=window,Gi=fn.trustedTypes,Ho=Gi?Gi.emptyScript:"",Ki=fn.reactiveElementPolyfillSupport,Kn={toAttribute(i,e){switch(e){case Boolean:i=i?Ho:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Us=(i,e)=>e!==i&&(e==e||i==i),Nn={attribute:!0,type:String,converter:Kn,reflect:!1,hasChanged:Us},Zn="finalized";let et=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,n)=>{const s=this._$Ep(n,t);s!==void 0&&(this._$Ev.set(s,n),e.push(s))}),e}static createProperty(e,t=Nn){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():"__"+e,s=this.getPropertyDescriptor(e,n,t);s!==void 0&&Object.defineProperty(this.prototype,e,s)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(s){const o=this[e];this[t]=s,this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Nn}static finalize(){if(this.hasOwnProperty(Zn))return!1;this[Zn]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,n=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of n)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const s of n)t.unshift(Vi(s))}else e!==void 0&&t.push(Vi(e));return t}static _$Ep(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,n;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)===null||n===void 0||n.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Fo(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostConnected)===null||n===void 0?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostDisconnected)===null||n===void 0?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=Nn){var s;const o=this.constructor._$Ep(e,n);if(o!==void 0&&n.reflect===!0){const r=(((s=n.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?n.converter:Kn).toAttribute(t,n.type);this._$El=e,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(e,t){var n;const s=this.constructor,o=s._$Ev.get(e);if(o!==void 0&&this._$El!==o){const r=s.getPropertyOptions(o),a=typeof r.converter=="function"?{fromAttribute:r.converter}:((n=r.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?r.converter:Kn;this._$El=o,this[o]=a.fromAttribute(t,r.type),this._$El=null}}requestUpdate(e,t,n){let s=!0;e!==void 0&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||Us)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,n))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,o)=>this[o]=s),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(e=this._$ES)===null||e===void 0||e.forEach(s=>{var o;return(o=s.hostUpdate)===null||o===void 0?void 0:o.call(s)}),this.update(n)):this._$Ek()}catch(s){throw t=!1,this._$Ek(),s}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(n=>{var s;return(s=n.hostUpdated)===null||s===void 0?void 0:s.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,n)=>this._$EO(n,this[n],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};et[Zn]=!0,et.elementProperties=new Map,et.elementStyles=[],et.shadowRootOptions={mode:"open"},Ki==null||Ki({ReactiveElement:et}),((Dn=fn.reactiveElementVersions)!==null&&Dn!==void 0?Dn:fn.reactiveElementVersions=[]).push("1.6.3");var jn;const gn=window,nt=gn.trustedTypes,Zi=nt?nt.createPolicy("lit-html",{createHTML:i=>i}):void 0,Xn="$lit$",Le=`lit$${(Math.random()+"").slice(9)}$`,Fs="?"+Le,Wo=`<${Fs}>`,He=document,Et=()=>He.createComment(""),St=i=>i===null||typeof i!="object"&&typeof i!="function",Hs=Array.isArray,qo=i=>Hs(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",Bn=`[
438
- \f\r]`,gt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Xi=/-->/g,Ji=/>/g,je=RegExp(`>|${Bn}(?:([^\\s"'>=/]+)(${Bn}*=${Bn}*(?:[^
439
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Yi=/'/g,Qi=/"/g,Ws=/^(?:script|style|textarea|title)$/i,Vo=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),X=Vo(1),We=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),es=new WeakMap,ze=He.createTreeWalker(He,129,null,!1);function qs(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zi!==void 0?Zi.createHTML(e):e}const Go=(i,e)=>{const t=i.length-1,n=[];let s,o=e===2?"<svg>":"",r=gt;for(let a=0;a<t;a++){const l=i[a];let c,d,h=-1,p=0;for(;p<l.length&&(r.lastIndex=p,d=r.exec(l),d!==null);)p=r.lastIndex,r===gt?d[1]==="!--"?r=Xi:d[1]!==void 0?r=Ji:d[2]!==void 0?(Ws.test(d[2])&&(s=RegExp("</"+d[2],"g")),r=je):d[3]!==void 0&&(r=je):r===je?d[0]===">"?(r=s??gt,h=-1):d[1]===void 0?h=-2:(h=r.lastIndex-d[2].length,c=d[1],r=d[3]===void 0?je:d[3]==='"'?Qi:Yi):r===Qi||r===Yi?r=je:r===Xi||r===Ji?r=gt:(r=je,s=void 0);const m=r===je&&i[a+1].startsWith("/>")?" ":"";o+=r===gt?l+Wo:h>=0?(n.push(c),l.slice(0,h)+Xn+l.slice(h)+Le+m):l+Le+(h===-2?(n.push(void 0),a):m)}return[qs(i,o+(i[t]||"<?>")+(e===2?"</svg>":"")),n]};class _t{constructor({strings:e,_$litType$:t},n){let s;this.parts=[];let o=0,r=0;const a=e.length-1,l=this.parts,[c,d]=Go(e,t);if(this.el=_t.createElement(c,n),ze.currentNode=this.el.content,t===2){const h=this.el.content,p=h.firstChild;p.remove(),h.append(...p.childNodes)}for(;(s=ze.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const h=[];for(const p of s.getAttributeNames())if(p.endsWith(Xn)||p.startsWith(Le)){const m=d[r++];if(h.push(p),m!==void 0){const E=s.getAttribute(m.toLowerCase()+Xn).split(Le),w=/([.?@])?(.*)/.exec(m);l.push({type:1,index:o,name:w[2],strings:E,ctor:w[1]==="."?Zo:w[1]==="?"?Jo:w[1]==="@"?Yo:Sn})}else l.push({type:6,index:o})}for(const p of h)s.removeAttribute(p)}if(Ws.test(s.tagName)){const h=s.textContent.split(Le),p=h.length-1;if(p>0){s.textContent=nt?nt.emptyScript:"";for(let m=0;m<p;m++)s.append(h[m],Et()),ze.nextNode(),l.push({type:2,index:++o});s.append(h[p],Et())}}}else if(s.nodeType===8)if(s.data===Fs)l.push({type:2,index:o});else{let h=-1;for(;(h=s.data.indexOf(Le,h+1))!==-1;)l.push({type:7,index:o}),h+=Le.length-1}o++}}static createElement(e,t){const n=He.createElement("template");return n.innerHTML=e,n}}function it(i,e,t=i,n){var s,o,r,a;if(e===We)return e;let l=n!==void 0?(s=t._$Co)===null||s===void 0?void 0:s[n]:t._$Cl;const c=St(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==c&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),c===void 0?l=void 0:(l=new c(i),l._$AT(i,t,n)),n!==void 0?((r=(a=t)._$Co)!==null&&r!==void 0?r:a._$Co=[])[n]=l:t._$Cl=l),l!==void 0&&(e=it(i,l._$AS(i,e.values),l,n)),e}class Ko{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:n},parts:s}=this._$AD,o=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:He).importNode(n,!0);ze.currentNode=o;let r=ze.nextNode(),a=0,l=0,c=s[0];for(;c!==void 0;){if(a===c.index){let d;c.type===2?d=new Bt(r,r.nextSibling,this,e):c.type===1?d=new c.ctor(r,c.name,c.strings,this,e):c.type===6&&(d=new Qo(r,this,e)),this._$AV.push(d),c=s[++l]}a!==(c==null?void 0:c.index)&&(r=ze.nextNode(),a++)}return ze.currentNode=He,o}v(e){let t=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class Bt{constructor(e,t,n,s){var o;this.type=2,this._$AH=z,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=s,this._$Cp=(o=s==null?void 0:s.isConnected)===null||o===void 0||o}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=it(this,e,t),St(e)?e===z||e==null||e===""?(this._$AH!==z&&this._$AR(),this._$AH=z):e!==this._$AH&&e!==We&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):qo(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==z&&St(this._$AH)?this._$AA.nextSibling.data=e:this.$(He.createTextNode(e)),this._$AH=e}g(e){var t;const{values:n,_$litType$:s}=e,o=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=_t.createElement(qs(s.h,s.h[0]),this.options)),s);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===o)this._$AH.v(n);else{const r=new Ko(o,this),a=r.u(this.options);r.v(n),this.$(a),this._$AH=r}}_$AC(e){let t=es.get(e.strings);return t===void 0&&es.set(e.strings,t=new _t(e)),t}T(e){Hs(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,s=0;for(const o of e)s===t.length?t.push(n=new Bt(this.k(Et()),this.k(Et()),this,this.options)):n=t[s],n._$AI(o),s++;s<t.length&&(this._$AR(n&&n._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,t);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}let Sn=class{constructor(e,t,n,s,o){this.type=1,this._$AH=z,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,s){const o=this.strings;let r=!1;if(o===void 0)e=it(this,e,t,0),r=!St(e)||e!==this._$AH&&e!==We,r&&(this._$AH=e);else{const a=e;let l,c;for(e=o[0],l=0;l<o.length-1;l++)c=it(this,a[n+l],t,l),c===We&&(c=this._$AH[l]),r||(r=!St(c)||c!==this._$AH[l]),c===z?e=z:e!==z&&(e+=(c??"")+o[l+1]),this._$AH[l]=c}r&&!s&&this.j(e)}j(e){e===z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}};class Zo extends Sn{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===z?void 0:e}}const Xo=nt?nt.emptyScript:"";class Jo extends Sn{constructor(){super(...arguments),this.type=4}j(e){e&&e!==z?this.element.setAttribute(this.name,Xo):this.element.removeAttribute(this.name)}}let Yo=class extends Sn{constructor(e,t,n,s,o){super(e,t,n,s,o),this.type=5}_$AI(e,t=this){var n;if((e=(n=it(this,e,t,0))!==null&&n!==void 0?n:z)===We)return;const s=this._$AH,o=e===z&&s!==z||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,r=e!==z&&(s===z||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;typeof this._$AH=="function"?this._$AH.call((n=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&n!==void 0?n:this.element,e):this._$AH.handleEvent(e)}};class Qo{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){it(this,e)}}const ts=gn.litHtmlPolyfillSupport;ts==null||ts(_t,Bt),((jn=gn.litHtmlVersions)!==null&&jn!==void 0?jn:gn.litHtmlVersions=[]).push("2.8.0");const ea=(i,e,t)=>{var n,s;const o=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:e;let r=o._$litPart$;if(r===void 0){const a=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=r=new Bt(e.insertBefore(Et(),a),a,void 0,t??{})}return r._$AI(i),r};var zn,Un;let be=class extends et{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ea(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return We}};be.finalized=!0,be._$litElement$=!0,(zn=globalThis.litElementHydrateSupport)===null||zn===void 0||zn.call(globalThis,{LitElement:be});const ns=globalThis.litElementPolyfillSupport;ns==null||ns({LitElement:be});((Un=globalThis.litElementVersions)!==null&&Un!==void 0?Un:globalThis.litElementVersions=[]).push("3.3.3");const ta=(i,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,i)}},na=(i,e,t)=>{e.constructor.createProperty(t,i)};function y(i){return(e,t)=>t!==void 0?na(i,e,t):ta(i,e)}const le=i=>i??z,ia=":host{display:inline-block;font-size:13px;line-height:20px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;color:#111;contain:content}:host([hidden]){display:none!important}:host([level=warn i]){color:#555}:host([level=suggest i]){color:#bf8800}:host([level=error i]){color:#cc0017}:host([level=warn]){color:#555}:host([level=suggest]){color:#bf8800}:host([level=error]){color:#cc0017}.icon{height:12px;width:12px;padding-right:4px;margin-bottom:-1px}",sa="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cstyle%20id='style3'%3e%20.st0{fill:%23fff}.st1{fill:%23c00}%20%3c/style%3e%3cg%20id='g5'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20id='path9'/%3e%3c/g%3e%3cg%20id='g11'%3e%3cpath%20class='st0'%20id='rect13'%20d='M5.5%202.5h1v4h-1z'/%3e%3cpath%20class='st1'%20d='M6%203v3-3m1-1H5v5h2V2z'%20id='path15'/%3e%3c/g%3e%3cg%20id='g17'%3e%3cpath%20class='st0'%20id='rect19'%20d='M5.5%208.5h1v1h-1z'/%3e%3cpath%20class='st1'%20id='polygon21'%20d='M7%208H5v2h2V8z'/%3e%3c/g%3e%3c/svg%3e",ra="data:image/svg+xml,%3csvg%20id='Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cstyle%3e%20.st0{fill:%23bf8800}%20%3c/style%3e%3cpath%20class='st0'%20d='M12%20.8l11%2019.8v1.3H1v-1.3L12%20.8zm.8-.6h-1.6L0%2020v3h24v-3L12.8.2z'/%3e%3cpath%20class='st0'%20d='M11%208h2v8h-2zm0%2010h2v2h-2z'/%3e%3c/svg%3e",oa="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20fill='%23555'/%3e%3cpath%20d='M6%209V6v3m-1%201h2V5H5v5zm2-8H5v2h2z'%20class='st1'%20fill='%23555'/%3e%3c/svg%3e";var aa=Object.defineProperty,la=Object.getOwnPropertyDescriptor,xi=(i,e,t,n)=>{for(var s=n>1?void 0:n?la(e,t):e,o=i.length-1,r;o>=0;o--)(r=i[o])&&(s=(n?r(e,t,s):r(s))||s);return n&&s&&aa(e,t,s),s},Ye;const At=(Ye=class extends be{static parseLevel(i){if(i){const e=Object.keys($t).find(t=>t.toLowerCase()===i.toLowerCase());return e&&$t[e]}}static get styles(){return[wi`
440
- ${ht(ia)}
441
- `]}render(){return X`${this.iconToUse&&X`<img class="icon" src="${this.iconToUse}">`}${this.message}`}get iconToUse(){return this.icon||this._defaultIconPath}shouldUpdate(i){return i.has("level")&&(this._defaultIconPath=this.iconForLevel,!this.icon)?!0:super.shouldUpdate(i)}get iconForLevel(){switch(Ye.parseLevel(this.level)){case"warn":return oa;case"suggest":return ra;case"error":return sa;default:return null}}},Ye.ID="sd-field-validation-message",Ye.levelConverter={fromAttribute(i){return Ye.parseLevel(i)},toAttribute(i){return i&&i.toLowerCase()}},Ye);xi([y({type:String,attribute:!0})],At.prototype,"message",2);xi([y({type:String,attribute:!0})],At.prototype,"icon",2);xi([y({converter:At.levelConverter,reflect:!0})],At.prototype,"level",2);let ln=At;var $t=(i=>(i.Warn="warn",i.Suggest="suggest",i.Error="error",i))($t||{});customElements.get(ln.ID)||customElements.define(ln.ID,ln);const ca=":host{display:inline-flex;position:relative;cursor:text;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;color:#111;contain:layout style;flex-direction:column}:host([hidden]),:host([type=hidden]){display:none!important}:host([effective-disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([effective-disabled]) .unfocused-line,:host([effective-disabled]) .focused-line{border-bottom-style:dashed}:host(:not([effective-disabled]):focus) .focused-line,:host(:not([effective-disabled])[focused]) .focused-line{transform:none;transition:transform .25s}:host(:not([effective-disabled]):focus) .label.float,:host(:not([effective-disabled])[focused]) .label.float{color:var(--sd-input-focused-color, #1467ba)}:host([inactive]) .input{pointer-events:none}:host([effective-disabled]:focus),:host([effective-disabled][focused]){box-shadow:0 0 0 1px #111}:host(:not([effective-disabled])[validationlevel]) .focused-line{transform:none;transition:transform .25s}:host([validationlevel=warn i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn i]) .label,:host([validationlevel=warn i]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest i]) .label,:host([validationlevel=suggest i]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error i]) .label,:host([validationlevel=error i]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}:host([validationlevel=warn]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn]) .label,:host([validationlevel=warn]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest]) .label,:host([validationlevel=suggest]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error]) .label,:host([validationlevel=error]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}.validation-message-wrapper{position:relative}.validation-message{position:absolute;left:0;right:0}.label.float{transform:translateY(-75%) scale(.75);width:133%}.label:not(.float){max-width:100%}.floated-label-placeholder{height:20px;width:100%}.label{position:absolute;top:0;left:0;line-height:24px;pointer-events:none;color:var(--sd-input-color, #767676);transition:transform .25s,width .25s;transform-origin:left top}.input-wrapper{position:relative;display:flex;flex-direction:row;align-items:center;background-color:var(--input-wrapper-background-color)}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-wrapper{flex-direction:column;align-items:baseline}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-container{width:100%}:host([extended-prefix]:not(:focus-within)) .input-container,:host([extended-prefix][effective-disabled]) .input-container{width:0px}.input-container{line-height:var(--sd-input-line-height, 24px);flex:1 1 auto}.input{width:100%;background:var(--sd-input-background, transparent);font-family:inherit;font-size:inherit;text-align:inherit;color:inherit;border:none;outline:none;resize:none;padding-left:0;padding-right:0}.input:-webkit-autofill{animation-name:onautofillstart}.input:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{0%{outline:none}}@keyframes onautofillcancel{0%{outline:none}}.label,input.input,.validation-message{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}.input::-ms-clear{display:none}.input::placeholder{color:var(--sd-input-color, #767676)}.input:-ms-input-placeholder{color:var(--sd-input-color, #767676)}.input::-ms-input-placeholder{color:var(--sd-input-color, #767676)}.underline{height:2px;width:100%;position:relative}.unfocused-line,.focused-line{position:absolute;top:0;right:0;bottom:0;left:0}.unfocused-line{border-bottom:1px solid var(--sd-input-underline-color, #959595)}.focused-line{border-bottom:2px solid var(--sd-input-focused-color, #1467ba);transform-origin:center center;transform:scale3d(0,1,1)}.prefix,.suffix{display:flex;flex-wrap:nowrap}.prefix ::slotted(*),.suffix ::slotted(*){display:flex}";var da=Object.defineProperty,ua=Object.getOwnPropertyDescriptor,Z=(i,e,t,n)=>{for(var s=n>1?void 0:n?ua(e,t):e,o=i.length-1,r;o>=0;o--)(r=i[o])&&(s=(n?r(e,t,s):r(s))||s);return n&&s&&da(e,t,s),s};const ha="sd-lit-input",is="delegatesFocus"in window.ShadowRoot.prototype;let pa=0;var ke;const V=(ke=class extends be{constructor(){super(),this.rows=1,this.effectiveDisabled=!1,this.type="text",this.autocomplete="off";const i=pa++;this._validationMessageId=ke.ID+"_message_"+i,this._inputId=ke.ID+"_input_"+i,this.attachInternals&&!this.activeShadyDOM&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabIndex")||(this.tabIndex=0)}firstUpdated(i){super.firstUpdated(i),this.initAutocompleted(this.inputElement),this.updateInitialValue(),this.hasAttribute("disabled")&&(this.disabled=!0),this.inputElement.oninput=e=>{this.autocompleted=e.inputType==="insertReplacementText"||!("data"in e),this.currentText=this.inputElement.value,this.fireValueChange(!0)},this.inputElement.onchange=()=>this.fireValueChange(),is||(this.inputElement.onfocus=()=>this.setAttribute("focused",""),this.inputElement.onblur=()=>this.removeAttribute("focused"),this.addEventListener("focus",e=>{e.target===this&&this.inputElement.focus()})),this.addEventListener("keydown",e=>{var t,n;e.key=="Enter"&&((n=(t=this._internals)==null?void 0:t.form)==null||n.requestSubmit())}),this._initialized=!0}initAutocompleted(i){const e=t=>{/^onautofillstart(-sd-lit-input-\d+|\s?)$/.test(t.animationName)?this.autocompleted=!0:/^onautofillcancel(-sd-lit-input-\d+|\s?)$/.test(t.animationName)&&(this.autocompleted=!1)};this.activeShadyDOM?(this._needsAutocompletedCheck=!0,this.activeShadyDOM.nativeMethods.addEventListener.call(i,"animationstart",e)):i.addEventListener("animationstart",e)}get activeShadyDOM(){const i=window.ShadyDOM;return i&&i.inUse?i:null}updateInitialValue(){typeof this.currentText<"u"?this.value=this.currentText:this.value=this.getAttribute("value"),this.value&&(this.currentText=this.inputElement.value),this._initialValue=this.value}get disabled(){return this.hasAttribute("disabled")}set disabled(i){i?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this._internals||(this.effectiveDisabled=i)}get inputElement(){return this.shadowRoot&&!this._inputElement&&(this._inputElement=this.shadowRoot.querySelector(".input")),this._inputElement}get value(){return this.inputElement&&this.inputElement.value}set value(i){this.currentText=i||"",this.inputElement&&(this.inputElement.value=this.currentText),this.setFormValue(this.currentText)}get selectionStart(){return this.inputElement?this.inputElement.selectionStart:0}focus(){this.inputElement?this.inputElement.focus():super.focus()}select(){this.inputElement&&this.inputElement.select()}setSelectionRange(i,e){this.updateComplete.then(()=>{this.inputElement&&this.inputElement.setSelectionRange(i,e)})}static get styles(){return[wi`
442
- ${ht(ca)}
443
- `]}render(){let i;return this.rows===1?i=X`
446
+ `,Bo={mainContent:Po,description:Mo,css:Do+zt,initializer:{content:No,type:"typescript",initialize:()=>Bt(()=>import("./5_other.js"),__vite__mapDeps([6,3,1]),import.meta.url)},additionalSources:[{type:"source",language:"typescript",label:"token-provider.ts",content:jo}]},zo=Object.freeze(Object.defineProperty({__proto__:null,default:Bo},Symbol.toStringTag,{value:"Module"}));const cn=window,yi=cn.ShadowRoot&&(cn.ShadyCSS===void 0||cn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,wi=Symbol(),qi=new WeakMap;let zs=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==wi)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(yi&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=qi.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&qi.set(t,e))}return e}toString(){return this.cssText}};const Ze=i=>new zs(typeof i=="string"?i:i+"",void 0,wi),_n=(i,...e)=>{const t=i.length===1?i[0]:e.reduce((n,s,r)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+i[r+1],i[0]);return new zs(t,i,wi)},Uo=(i,e)=>{yi?i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const n=document.createElement("style"),s=cn.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=t.cssText,i.appendChild(n)})},Vi=yi?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return Ze(t)})(i):i;var jn;const gn=window,Gi=gn.trustedTypes,Ho=Gi?Gi.emptyScript:"",Ki=gn.reactiveElementPolyfillSupport,Xn={toAttribute(i,e){switch(e){case Boolean:i=i?Ho:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Us=(i,e)=>e!==i&&(e==e||i==i),Bn={attribute:!0,type:String,converter:Xn,reflect:!1,hasChanged:Us},Jn="finalized";let st=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,n)=>{const s=this._$Ep(n,t);s!==void 0&&(this._$Ev.set(s,n),e.push(s))}),e}static createProperty(e,t=Bn){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():"__"+e,s=this.getPropertyDescriptor(e,n,t);s!==void 0&&Object.defineProperty(this.prototype,e,s)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(s){const r=this[e];this[t]=s,this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Bn}static finalize(){if(this.hasOwnProperty(Jn))return!1;this[Jn]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,n=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of n)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const s of n)t.unshift(Vi(s))}else e!==void 0&&t.push(Vi(e));return t}static _$Ep(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,n;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)===null||n===void 0||n.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Uo(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostConnected)===null||n===void 0?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostDisconnected)===null||n===void 0?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=Bn){var s;const r=this.constructor._$Ep(e,n);if(r!==void 0&&n.reflect===!0){const o=(((s=n.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?n.converter:Xn).toAttribute(t,n.type);this._$El=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(e,t){var n;const s=this.constructor,r=s._$Ev.get(e);if(r!==void 0&&this._$El!==r){const o=s.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?o.converter:Xn;this._$El=r,this[r]=a.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,n){let s=!0;e!==void 0&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||Us)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,n))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,r)=>this[r]=s),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(e=this._$ES)===null||e===void 0||e.forEach(s=>{var r;return(r=s.hostUpdate)===null||r===void 0?void 0:r.call(s)}),this.update(n)):this._$Ek()}catch(s){throw t=!1,this._$Ek(),s}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(n=>{var s;return(s=n.hostUpdated)===null||s===void 0?void 0:s.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,n)=>this._$EO(n,this[n],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};st[Jn]=!0,st.elementProperties=new Map,st.elementStyles=[],st.shadowRootOptions={mode:"open"},Ki==null||Ki({ReactiveElement:st}),((jn=gn.reactiveElementVersions)!==null&&jn!==void 0?jn:gn.reactiveElementVersions=[]).push("1.6.3");var zn;const mn=window,ot=mn.trustedTypes,Zi=ot?ot.createPolicy("lit-html",{createHTML:i=>i}):void 0,Yn="$lit$",Pe=`lit$${(Math.random()+"").slice(9)}$`,Hs="?"+Pe,Fo=`<${Hs}>`,Ve=document,At=()=>Ve.createComment(""),$t=i=>i===null||typeof i!="object"&&typeof i!="function",Fs=Array.isArray,Wo=i=>Fs(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",Un=`[
447
+ \f\r]`,bt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Xi=/-->/g,Ji=/>/g,Ue=RegExp(`>|${Un}(?:([^\\s"'>=/]+)(${Un}*=${Un}*(?:[^
448
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Yi=/'/g,Qi=/"/g,Ws=/^(?:script|style|textarea|title)$/i,qo=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),Z=qo(1),Ge=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),es=new WeakMap,Fe=Ve.createTreeWalker(Ve,129,null,!1);function qs(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zi!==void 0?Zi.createHTML(e):e}const Vo=(i,e)=>{const t=i.length-1,n=[];let s,r=e===2?"<svg>":"",o=bt;for(let a=0;a<t;a++){const l=i[a];let c,d,h=-1,p=0;for(;p<l.length&&(o.lastIndex=p,d=o.exec(l),d!==null);)p=o.lastIndex,o===bt?d[1]==="!--"?o=Xi:d[1]!==void 0?o=Ji:d[2]!==void 0?(Ws.test(d[2])&&(s=RegExp("</"+d[2],"g")),o=Ue):d[3]!==void 0&&(o=Ue):o===Ue?d[0]===">"?(o=s??bt,h=-1):d[1]===void 0?h=-2:(h=o.lastIndex-d[2].length,c=d[1],o=d[3]===void 0?Ue:d[3]==='"'?Qi:Yi):o===Qi||o===Yi?o=Ue:o===Xi||o===Ji?o=bt:(o=Ue,s=void 0);const m=o===Ue&&i[a+1].startsWith("/>")?" ":"";r+=o===bt?l+Fo:h>=0?(n.push(c),l.slice(0,h)+Yn+l.slice(h)+Pe+m):l+Pe+(h===-2?(n.push(void 0),a):m)}return[qs(i,r+(i[t]||"<?>")+(e===2?"</svg>":"")),n]};class Ct{constructor({strings:e,_$litType$:t},n){let s;this.parts=[];let r=0,o=0;const a=e.length-1,l=this.parts,[c,d]=Vo(e,t);if(this.el=Ct.createElement(c,n),Fe.currentNode=this.el.content,t===2){const h=this.el.content,p=h.firstChild;p.remove(),h.append(...p.childNodes)}for(;(s=Fe.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const h=[];for(const p of s.getAttributeNames())if(p.endsWith(Yn)||p.startsWith(Pe)){const m=d[o++];if(h.push(p),m!==void 0){const E=s.getAttribute(m.toLowerCase()+Yn).split(Pe),w=/([.?@])?(.*)/.exec(m);l.push({type:1,index:r,name:w[2],strings:E,ctor:w[1]==="."?Ko:w[1]==="?"?Xo:w[1]==="@"?Jo:An})}else l.push({type:6,index:r})}for(const p of h)s.removeAttribute(p)}if(Ws.test(s.tagName)){const h=s.textContent.split(Pe),p=h.length-1;if(p>0){s.textContent=ot?ot.emptyScript:"";for(let m=0;m<p;m++)s.append(h[m],At()),Fe.nextNode(),l.push({type:2,index:++r});s.append(h[p],At())}}}else if(s.nodeType===8)if(s.data===Hs)l.push({type:2,index:r});else{let h=-1;for(;(h=s.data.indexOf(Pe,h+1))!==-1;)l.push({type:7,index:r}),h+=Pe.length-1}r++}}static createElement(e,t){const n=Ve.createElement("template");return n.innerHTML=e,n}}function at(i,e,t=i,n){var s,r,o,a;if(e===Ge)return e;let l=n!==void 0?(s=t._$Co)===null||s===void 0?void 0:s[n]:t._$Cl;const c=$t(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==c&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),c===void 0?l=void 0:(l=new c(i),l._$AT(i,t,n)),n!==void 0?((o=(a=t)._$Co)!==null&&o!==void 0?o:a._$Co=[])[n]=l:t._$Cl=l),l!==void 0&&(e=at(i,l._$AS(i,e.values),l,n)),e}class Go{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:n},parts:s}=this._$AD,r=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:Ve).importNode(n,!0);Fe.currentNode=r;let o=Fe.nextNode(),a=0,l=0,c=s[0];for(;c!==void 0;){if(a===c.index){let d;c.type===2?d=new Ut(o,o.nextSibling,this,e):c.type===1?d=new c.ctor(o,c.name,c.strings,this,e):c.type===6&&(d=new Yo(o,this,e)),this._$AV.push(d),c=s[++l]}a!==(c==null?void 0:c.index)&&(o=Fe.nextNode(),a++)}return Fe.currentNode=Ve,r}v(e){let t=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class Ut{constructor(e,t,n,s){var r;this.type=2,this._$AH=z,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=s,this._$Cp=(r=s==null?void 0:s.isConnected)===null||r===void 0||r}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=at(this,e,t),$t(e)?e===z||e==null||e===""?(this._$AH!==z&&this._$AR(),this._$AH=z):e!==this._$AH&&e!==Ge&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Wo(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==z&&$t(this._$AH)?this._$AA.nextSibling.data=e:this.$(Ve.createTextNode(e)),this._$AH=e}g(e){var t;const{values:n,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=Ct.createElement(qs(s.h,s.h[0]),this.options)),s);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===r)this._$AH.v(n);else{const o=new Go(r,this),a=o.u(this.options);o.v(n),this.$(a),this._$AH=o}}_$AC(e){let t=es.get(e.strings);return t===void 0&&es.set(e.strings,t=new Ct(e)),t}T(e){Fs(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,s=0;for(const r of e)s===t.length?t.push(n=new Ut(this.k(At()),this.k(At()),this,this.options)):n=t[s],n._$AI(r),s++;s<t.length&&(this._$AR(n&&n._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,t);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}let An=class{constructor(e,t,n,s,r){this.type=1,this._$AH=z,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,s){const r=this.strings;let o=!1;if(r===void 0)e=at(this,e,t,0),o=!$t(e)||e!==this._$AH&&e!==Ge,o&&(this._$AH=e);else{const a=e;let l,c;for(e=r[0],l=0;l<r.length-1;l++)c=at(this,a[n+l],t,l),c===Ge&&(c=this._$AH[l]),o||(o=!$t(c)||c!==this._$AH[l]),c===z?e=z:e!==z&&(e+=(c??"")+r[l+1]),this._$AH[l]=c}o&&!s&&this.j(e)}j(e){e===z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}};class Ko extends An{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===z?void 0:e}}const Zo=ot?ot.emptyScript:"";let Xo=class extends An{constructor(){super(...arguments),this.type=4}j(e){e&&e!==z?this.element.setAttribute(this.name,Zo):this.element.removeAttribute(this.name)}},Jo=class extends An{constructor(e,t,n,s,r){super(e,t,n,s,r),this.type=5}_$AI(e,t=this){var n;if((e=(n=at(this,e,t,0))!==null&&n!==void 0?n:z)===Ge)return;const s=this._$AH,r=e===z&&s!==z||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==z&&(s===z||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;typeof this._$AH=="function"?this._$AH.call((n=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&n!==void 0?n:this.element,e):this._$AH.handleEvent(e)}};class Yo{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){at(this,e)}}const ts=mn.litHtmlPolyfillSupport;ts==null||ts(Ct,Ut),((zn=mn.litHtmlVersions)!==null&&zn!==void 0?zn:mn.litHtmlVersions=[]).push("2.8.0");const Qo=(i,e,t)=>{var n,s;const r=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:e;let o=r._$litPart$;if(o===void 0){const a=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:null;r._$litPart$=o=new Ut(e.insertBefore(At(),a),a,void 0,t??{})}return o._$AI(i),o};var Hn,Fn;let ue=class extends st{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Qo(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return Ge}};ue.finalized=!0,ue._$litElement$=!0,(Hn=globalThis.litElementHydrateSupport)===null||Hn===void 0||Hn.call(globalThis,{LitElement:ue});const ns=globalThis.litElementPolyfillSupport;ns==null||ns({LitElement:ue});((Fn=globalThis.litElementVersions)!==null&&Fn!==void 0?Fn:globalThis.litElementVersions=[]).push("3.3.3");const ea=(i,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,i)}},ta=(i,e,t)=>{e.constructor.createProperty(t,i)};function b(i){return(e,t)=>t!==void 0?ta(i,e,t):ea(i,e)}const le=i=>i??z,na=":host{display:inline-block;font-size:13px;line-height:20px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;color:#111;contain:content}:host([hidden]){display:none!important}:host([level=warn i]){color:#555}:host([level=suggest i]){color:#bf8800}:host([level=error i]){color:#cc0017}:host([level=warn]){color:#555}:host([level=suggest]){color:#bf8800}:host([level=error]){color:#cc0017}.icon{height:12px;width:12px;padding-right:4px;margin-bottom:-1px}",ia="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cstyle%20id='style3'%3e%20.st0{fill:%23fff}.st1{fill:%23c00}%20%3c/style%3e%3cg%20id='g5'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20id='path9'/%3e%3c/g%3e%3cg%20id='g11'%3e%3cpath%20class='st0'%20id='rect13'%20d='M5.5%202.5h1v4h-1z'/%3e%3cpath%20class='st1'%20d='M6%203v3-3m1-1H5v5h2V2z'%20id='path15'/%3e%3c/g%3e%3cg%20id='g17'%3e%3cpath%20class='st0'%20id='rect19'%20d='M5.5%208.5h1v1h-1z'/%3e%3cpath%20class='st1'%20id='polygon21'%20d='M7%208H5v2h2V8z'/%3e%3c/g%3e%3c/svg%3e",sa="data:image/svg+xml,%3csvg%20id='Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cstyle%3e%20.st0{fill:%23bf8800}%20%3c/style%3e%3cpath%20class='st0'%20d='M12%20.8l11%2019.8v1.3H1v-1.3L12%20.8zm.8-.6h-1.6L0%2020v3h24v-3L12.8.2z'/%3e%3cpath%20class='st0'%20d='M11%208h2v8h-2zm0%2010h2v2h-2z'/%3e%3c/svg%3e",ra="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3e%3cpath%20class='st1'%20d='M6%20.9c2.8%200%205.1%202.3%205.1%205.1S8.8%2011.1%206%2011.1.9%208.8.9%206%203.2.9%206%20.9m0-1C2.7-.1-.1%202.7-.1%206s2.7%206.1%206.1%206.1%206.1-2.7%206.1-6.1S9.3-.1%206-.1z'%20fill='%23555'/%3e%3cpath%20d='M6%209V6v3m-1%201h2V5H5v5zm2-8H5v2h2z'%20class='st1'%20fill='%23555'/%3e%3c/svg%3e";var oa=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,xi=(i,e,t,n)=>{for(var s=n>1?void 0:n?aa(e,t):e,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=(n?o(e,t,s):o(s))||s);return n&&s&&oa(e,t,s),s},nt;const It=(nt=class extends ue{static parseLevel(i){if(i){const e=Object.keys(Ot).find(t=>t.toLowerCase()===i.toLowerCase());return e&&Ot[e]}}static get styles(){return[_n`
449
+ ${Ze(na)}
450
+ `]}render(){return Z`${this.iconToUse&&Z`<img class="icon" src="${this.iconToUse}">`}${this.message}`}get iconToUse(){return this.icon||this._defaultIconPath}shouldUpdate(i){return i.has("level")&&(this._defaultIconPath=this.iconForLevel,!this.icon)?!0:super.shouldUpdate(i)}get iconForLevel(){switch(nt.parseLevel(this.level)){case"warn":return ra;case"suggest":return sa;case"error":return ia;default:return null}}},nt.ID="sd-field-validation-message",nt.levelConverter={fromAttribute(i){return nt.parseLevel(i)},toAttribute(i){return i&&i.toLowerCase()}},nt);xi([b({type:String,attribute:!0})],It.prototype,"message",2);xi([b({type:String,attribute:!0})],It.prototype,"icon",2);xi([b({converter:It.levelConverter,reflect:!0})],It.prototype,"level",2);let dn=It;var Ot=(i=>(i.Warn="warn",i.Suggest="suggest",i.Error="error",i))(Ot||{});customElements.get(dn.ID)||customElements.define(dn.ID,dn);const la=":host{display:inline-flex;position:relative;cursor:text;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;color:#111;contain:layout style;flex-direction:column}:host([hidden]),:host([type=hidden]){display:none!important}:host([effective-disabled]){opacity:.6;cursor:default;filter:grayscale(100%)}:host([effective-disabled]) .unfocused-line,:host([effective-disabled]) .focused-line{border-bottom-style:dashed}:host(:not([effective-disabled]):focus) .focused-line,:host(:not([effective-disabled])[focused]) .focused-line{transform:none;transition:transform .25s}:host(:not([effective-disabled]):focus) .label.float,:host(:not([effective-disabled])[focused]) .label.float{color:var(--sd-input-focused-color, #1467ba)}:host([inactive]) .input{pointer-events:none}:host([effective-disabled]:focus),:host([effective-disabled][focused]){box-shadow:0 0 0 1px #111}:host(:not([effective-disabled])[validationlevel]) .focused-line{transform:none;transition:transform .25s}:host([validationlevel=warn i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn i]) .label,:host([validationlevel=warn i]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest i]) .label,:host([validationlevel=suggest i]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error i]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error i]) .label,:host([validationlevel=error i]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}:host([validationlevel=warn]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #555555)}:host([validationlevel=warn]) .label,:host([validationlevel=warn]) .validation-message{color:var(--sd-input-validation-color, #555555)!important}:host([validationlevel=suggest]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #bf8800)}:host([validationlevel=suggest]) .label,:host([validationlevel=suggest]) .validation-message{color:var(--sd-input-validation-color, #bf8800)!important}:host([validationlevel=error]) .focused-line{border-bottom-color:var(--sd-input-validation-color, #cc0017)}:host([validationlevel=error]) .label,:host([validationlevel=error]) .validation-message{color:var(--sd-input-validation-color, #cc0017)!important}.validation-message-wrapper{position:relative}.validation-message{position:absolute;left:0;right:0}.label.float{transform:translateY(-75%) scale(.75);width:133%}.label:not(.float){max-width:100%}.floated-label-placeholder{height:20px;width:100%}.label{position:absolute;top:0;left:0;line-height:24px;pointer-events:none;color:var(--sd-input-color, #767676);transition:transform .25s,width .25s;transform-origin:left top}.input-wrapper{position:relative;display:flex;flex-direction:row;align-items:center;background-color:var(--input-wrapper-background-color)}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-wrapper{flex-direction:column;align-items:baseline}:host([extended-prefix]:focus-within:not([effective-disabled])) .input-container{width:100%}:host([extended-prefix]:not(:focus-within)) .input-container,:host([extended-prefix][effective-disabled]) .input-container{width:0px}.input-container{line-height:var(--sd-input-line-height, 24px);flex:1 1 auto}.input{width:100%;background:var(--sd-input-background, transparent);font-family:inherit;font-size:inherit;text-align:inherit;color:inherit;border:none;outline:none;resize:none;padding-left:0;padding-right:0}.input:-webkit-autofill{animation-name:onautofillstart}.input:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{0%{outline:none}}@keyframes onautofillcancel{0%{outline:none}}.label,input.input,.validation-message{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}.input::-ms-clear{display:none}.input::placeholder{color:var(--sd-input-color, #767676)}.input:-ms-input-placeholder{color:var(--sd-input-color, #767676)}.input::-ms-input-placeholder{color:var(--sd-input-color, #767676)}.underline{height:2px;width:100%;position:relative}.unfocused-line,.focused-line{position:absolute;top:0;right:0;bottom:0;left:0}.unfocused-line{border-bottom:1px solid var(--sd-input-underline-color, #959595)}.focused-line{border-bottom:2px solid var(--sd-input-focused-color, #1467ba);transform-origin:center center;transform:scale3d(0,1,1)}.prefix,.suffix{display:flex;flex-wrap:nowrap}.prefix ::slotted(*),.suffix ::slotted(*){display:flex}";var ca=Object.defineProperty,da=Object.getOwnPropertyDescriptor,X=(i,e,t,n)=>{for(var s=n>1?void 0:n?da(e,t):e,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=(n?o(e,t,s):o(s))||s);return n&&s&&ca(e,t,s),s};const ua="sd-lit-input",is="delegatesFocus"in window.ShadowRoot.prototype;let ha=0;var ke;const V=(ke=class extends ue{constructor(){super(),this.rows=1,this.effectiveDisabled=!1,this.type="text",this.autocomplete="off";const i=ha++;this._validationMessageId=ke.ID+"_message_"+i,this._inputId=ke.ID+"_input_"+i,this.attachInternals&&!this.activeShadyDOM&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabIndex")||(this.tabIndex=0)}firstUpdated(i){super.firstUpdated(i),this.initAutocompleted(this.inputElement),this.updateInitialValue(),this.hasAttribute("disabled")&&(this.disabled=!0),this.inputElement.oninput=e=>{this.autocompleted=e.inputType==="insertReplacementText"||!("data"in e),this.currentText=this.inputElement.value,this.fireValueChange(!0)},this.inputElement.onchange=()=>this.fireValueChange(),is||(this.inputElement.onfocus=()=>this.setAttribute("focused",""),this.inputElement.onblur=()=>this.removeAttribute("focused"),this.addEventListener("focus",e=>{e.target===this&&this.inputElement.focus()})),this.addEventListener("keydown",e=>{var t,n;e.key=="Enter"&&((n=(t=this._internals)==null?void 0:t.form)==null||n.requestSubmit())}),this._initialized=!0}initAutocompleted(i){const e=t=>{/^onautofillstart(-sd-lit-input-\d+|\s?)$/.test(t.animationName)?this.autocompleted=!0:/^onautofillcancel(-sd-lit-input-\d+|\s?)$/.test(t.animationName)&&(this.autocompleted=!1)};this.activeShadyDOM?(this._needsAutocompletedCheck=!0,this.activeShadyDOM.nativeMethods.addEventListener.call(i,"animationstart",e)):i.addEventListener("animationstart",e)}get activeShadyDOM(){const i=window.ShadyDOM;return i&&i.inUse?i:null}updateInitialValue(){typeof this.currentText<"u"?this.value=this.currentText:this.value=this.getAttribute("value"),this.value&&(this.currentText=this.inputElement.value),this._initialValue=this.value}get disabled(){return this.hasAttribute("disabled")}set disabled(i){i?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this._internals||(this.effectiveDisabled=i)}get inputElement(){return this.shadowRoot&&!this._inputElement&&(this._inputElement=this.shadowRoot.querySelector(".input")),this._inputElement}get value(){return this.inputElement&&this.inputElement.value}set value(i){this.currentText=i||"",this.inputElement&&(this.inputElement.value=this.currentText),this.setFormValue(this.currentText)}get selectionStart(){return this.inputElement?this.inputElement.selectionStart:0}focus(){this.inputElement?this.inputElement.focus():super.focus()}select(){this.inputElement&&this.inputElement.select()}setSelectionRange(i,e){this.updateComplete.then(()=>{this.inputElement&&this.inputElement.setSelectionRange(i,e)})}static get styles(){return[_n`
451
+ ${Ze(la)}
452
+ `]}render(){let i;return this.rows===1?i=Z`
444
453
  <input
445
454
  id=${this._inputId}
446
455
  class="input"
@@ -457,7 +466,7 @@ export function getItems(): ExtendedTokenData[] {
457
466
  aria-invalid=${le(!!this.validationMessage||void 0)}
458
467
  aria-label=${le(this.sdAriaLabel||void 0)}
459
468
  />
460
- `:i=X`
469
+ `:i=Z`
461
470
  <textarea
462
471
  id=${this._inputId}
463
472
  class="input"
@@ -474,12 +483,12 @@ export function getItems(): ExtendedTokenData[] {
474
483
  aria-invalid=${le(!!this.validationMessage||void 0)}
475
484
  aria-label=${le(this.sdAriaLabel||void 0)}
476
485
  ></textarea>
477
- `,X`
478
- ${this.label?X` <div class="floated-label-placeholder" aria-hidden="true">&nbsp;</div> `:z}
486
+ `,Z`
487
+ ${this.label?Z` <div class="floated-label-placeholder" aria-hidden="true">&nbsp;</div> `:z}
479
488
  <div class="input-wrapper">
480
489
  <span class="prefix"><slot name="prefix"></slot></span>
481
490
  <div class="input-container" style="position:${this.shouldFloat()?"static":"relative"};">
482
- ${this.label&&X`
491
+ ${this.label&&Z`
483
492
  <label for="${this._inputId}" class="label ${this.shouldFloat()?"float":""}"
484
493
  >${this.label}</label
485
494
  >
@@ -493,7 +502,7 @@ export function getItems(): ExtendedTokenData[] {
493
502
  <div class="focused-line"></div>
494
503
  </div>
495
504
  <div class="validation-message-wrapper" aria-hidden="true">
496
- ${this.validationMessage&&X`
505
+ ${this.validationMessage&&Z`
497
506
  <sd-field-validation-message
498
507
  id=${this._validationMessageId}
499
508
  class="validation-message"
@@ -504,11 +513,11 @@ export function getItems(): ExtendedTokenData[] {
504
513
  </sd-field-validation-message>
505
514
  `}
506
515
  </div>
507
- `}updated(i){super.updated(i),this._needsAutocompletedCheck&&!this.autocompleted&&setTimeout(()=>{try{this.autocompleted=this.autocompleted||!!this.shadowRoot.querySelector(":-webkit-autofill")}catch{}},0)}update(i){var e,t;if(super.update(i),i.has("validationMessage")&&(this.validationMessage?(this.validationLevel||(this.validationLevel=$t.Error),(e=this._internals)==null||e.setValidity({customError:!0},this.validationMessage)):(this.validationLevel=null,(t=this._internals)==null||t.setValidity({}))),this._initialized&&i.has("rows"))throw Error("rows attribute cannot be changed after the input is attached to the DOM")}fireValueChange(i){this.dispatchEvent(new CustomEvent(`${i?"immediate-":""}value-change`,{detail:{value:this.value}})),this.setFormValue(this.value)}shouldFloat(){return this.alwaysFloatLabel||this.currentText||this.placeholder||this.autocompleted}setFormValue(i){var e;(e=this._internals)==null||e.setFormValue(i)}formResetCallback(){this.value=this._initialValue}formDisabledCallback(i){this.effectiveDisabled=i||this.hasAttribute("disabled")}formAssociatedCallback(i){this._needsAutocompletedCheck=!0}formStateRestoreCallback(i,e){typeof i=="string"&&(this.value=i)}},ke.ID=ha,ke.DEFAULT_MAX_LENGTH=524288,ke.formAssociated=!0,ke.shadowRootOptions={...be.shadowRootOptions,delegatesFocus:is},ke);Z([y({type:String,reflect:!0})],V.prototype,"label",2);Z([y({type:String,attribute:!0})],V.prototype,"validationMessage",2);Z([y({type:String,attribute:!0})],V.prototype,"validationIconSrc",2);Z([y({type:$t,attribute:!0,reflect:!0})],V.prototype,"validationLevel",2);Z([y({type:String,hasChanged(i,e){return e!=null&&e!=i}})],V.prototype,"currentText",2);Z([y({type:Boolean,attribute:!0})],V.prototype,"alwaysFloatLabel",2);Z([y({type:Boolean,attribute:!0})],V.prototype,"autocompleted",2);Z([y({type:Number,attribute:!0})],V.prototype,"rows",2);Z([y({type:Boolean,reflect:!0,attribute:"effective-disabled"})],V.prototype,"effectiveDisabled",2);Z([y({type:Boolean,reflect:!0,attribute:"extended-prefix"})],V.prototype,"extendedPrefix",2);Z([y({type:String,reflect:!0})],V.prototype,"type",2);Z([y({type:String,reflect:!0})],V.prototype,"placeholder",2);Z([y({type:String,reflect:!0})],V.prototype,"sdAriaLabel",2);Z([y({type:Number,reflect:!0})],V.prototype,"maxlength",2);Z([y({type:Boolean,reflect:!0})],V.prototype,"readonly",2);Z([y({type:Boolean,reflect:!0})],V.prototype,"required",2);Z([y({type:String,reflect:!0})],V.prototype,"name",2);Z([y({type:Boolean,reflect:!0})],V.prototype,"inactive",2);Z([y({type:String,attribute:!0})],V.prototype,"autocomplete",2);let Fn=V;customElements.get(Fn.ID)||customElements.define(Fn.ID,Fn);const fa={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Vs=i=>(...e)=>({_$litDirective$:i,values:e});let ga=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};let mn=class extends ga{constructor(e){if(super(e),this.et=z,e.type!==fa.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===z||e==null)return this.ft=void 0,this.et=e;if(e===We)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}};mn.directiveName="unsafeHTML",mn.resultType=1;const ma=Vs(mn);let Gs=class{static showImage(e,t,n,s){let o;if(s||!(e instanceof HTMLImageElement)?o=r=>e.style.backgroundImage=this.prepareSrc(r):o=r=>e.src=r,o(n),t){const r=()=>{o(t)},a=new Image;a.addEventListener("load",r),a.src=t,a.complete&&(a.removeEventListener("load",r),r())}}static prepareSrc(e){return e?e.startsWith("url")?e:`url("${e}")`:null}};const va=':host{display:block;contain:strict;height:50px}:host([selected]){background-color:#d3e6fa}:host(:not([selected]):hover),:host(:not([selected])[focused]){background-color:#e7f1fa}@media (forced-colors: active){:host([selected]){outline:4px solid}:host(:not([selected]):hover){outline:4px dotted}:host(:not([selected])[focused]){outline:4px dashed}}:host([enable-line-clamp]) .labels>:only-child{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;word-wrap:break-word}.container{display:flex;height:100%;box-sizing:border-box}.container .level-indicator{width:7px;height:100%}.container .level-indicator.level-0{background-color:#a0c3ef}.container .level-indicator.level-1{background-color:#e7c374}.container .level-indicator.level-2{background-color:#bfd596}.container .level-indicator.level-3{background-color:#fd998d}.container .level-indicator.level-4{background-color:#c6e8f5}.container .level-indicator.level-5{background-color:#fde3a4}.container .level-indicator.level-6{background-color:#dcbfe0}.side-content{display:flex;align-items:center;flex-grow:0}.labels{display:flex;flex-direction:column;justify-content:center;flex:1 1 0px;height:100%;line-height:normal;overflow:hidden;padding:var(--sd-list-item-label-content-padding, 0 8px)}.caption,.description{width:100%;font-family:var(--sd-list-item-font-family, "Segoe UI", "Lucida Sans", Arial, sans-serif);font-style:normal;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-decoration:var(--sd-list-item-text-decoration, inherit)}.caption em,.description em{font-weight:bolder}.caption{font-size:var(--sd-list-item-caption-font-size, 16px);color:var(--sd-list-item-caption-text-color, #111);font-weight:var(--sd-list-item-caption-font-weight, normal)}.description{font-size:var(--sd-list-item-description-font-size, 13px);color:var(--sd-list-item-description-text-color, #767676);font-weight:var(--sd-list-item-description-font-weight, normal)}.icon-wrapper{width:var(--sd-list-item-icon-wrapper-width, 45px);height:100%;display:flex;align-items:center;justify-content:center}.icon-wrapper .icon{min-height:var(--sd-list-item-icon-size, 24px);min-width:var(--sd-list-item-icon-size, 24px);background-repeat:no-repeat;background-position:center;background-size:cover}';var ba=Object.defineProperty,ya=Object.getOwnPropertyDescriptor,ie=(i,e,t,n)=>{for(var s=n>1?void 0:n?ya(e,t):e,o=i.length-1,r;o>=0;o--)(r=i[o])&&(s=(n?r(e,t,s):r(s))||s);return n&&s&&ba(e,t,s),s},Be;const ee=(Be=class extends be{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[wi`
508
- ${ht(va)}
509
- `]}render(){return X`
516
+ `}updated(i){super.updated(i),this._needsAutocompletedCheck&&!this.autocompleted&&setTimeout(()=>{try{this.autocompleted=this.autocompleted||!!this.shadowRoot.querySelector(":-webkit-autofill")}catch{}},0)}update(i){var e,t;if(super.update(i),i.has("validationMessage")&&(this.validationMessage?(this.validationLevel||(this.validationLevel=Ot.Error),(e=this._internals)==null||e.setValidity({customError:!0},this.validationMessage)):(this.validationLevel=null,(t=this._internals)==null||t.setValidity({}))),this._initialized&&i.has("rows"))throw Error("rows attribute cannot be changed after the input is attached to the DOM")}fireValueChange(i){this.dispatchEvent(new CustomEvent(`${i?"immediate-":""}value-change`,{detail:{value:this.value}})),this.setFormValue(this.value)}shouldFloat(){return this.alwaysFloatLabel||this.currentText||this.placeholder||this.autocompleted}setFormValue(i){var e;(e=this._internals)==null||e.setFormValue(i)}formResetCallback(){this.value=this._initialValue}formDisabledCallback(i){this.effectiveDisabled=i||this.hasAttribute("disabled")}formAssociatedCallback(i){this._needsAutocompletedCheck=!0}formStateRestoreCallback(i,e){typeof i=="string"&&(this.value=i)}},ke.ID=ua,ke.DEFAULT_MAX_LENGTH=524288,ke.formAssociated=!0,ke.shadowRootOptions={...ue.shadowRootOptions,delegatesFocus:is},ke);X([b({type:String,reflect:!0})],V.prototype,"label",2);X([b({type:String,attribute:!0})],V.prototype,"validationMessage",2);X([b({type:String,attribute:!0})],V.prototype,"validationIconSrc",2);X([b({type:Ot,attribute:!0,reflect:!0})],V.prototype,"validationLevel",2);X([b({type:String,hasChanged(i,e){return e!=null&&e!=i}})],V.prototype,"currentText",2);X([b({type:Boolean,attribute:!0})],V.prototype,"alwaysFloatLabel",2);X([b({type:Boolean,attribute:!0})],V.prototype,"autocompleted",2);X([b({type:Number,attribute:!0})],V.prototype,"rows",2);X([b({type:Boolean,reflect:!0,attribute:"effective-disabled"})],V.prototype,"effectiveDisabled",2);X([b({type:Boolean,reflect:!0,attribute:"extended-prefix"})],V.prototype,"extendedPrefix",2);X([b({type:String,reflect:!0})],V.prototype,"type",2);X([b({type:String,reflect:!0})],V.prototype,"placeholder",2);X([b({type:String,reflect:!0})],V.prototype,"sdAriaLabel",2);X([b({type:Number,reflect:!0})],V.prototype,"maxlength",2);X([b({type:Boolean,reflect:!0})],V.prototype,"readonly",2);X([b({type:Boolean,reflect:!0})],V.prototype,"required",2);X([b({type:String,reflect:!0})],V.prototype,"name",2);X([b({type:Boolean,reflect:!0})],V.prototype,"inactive",2);X([b({type:String,attribute:!0})],V.prototype,"autocomplete",2);let Wn=V;customElements.get(Wn.ID)||customElements.define(Wn.ID,Wn);const pa={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Vs=i=>(...e)=>({_$litDirective$:i,values:e});let fa=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};class vn extends fa{constructor(e){if(super(e),this.et=z,e.type!==pa.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===z||e==null)return this.ft=void 0,this.et=e;if(e===Ge)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}vn.directiveName="unsafeHTML",vn.resultType=1;const ga=Vs(vn);let Gs=class{static showImage(e,t,n,s){let r;if(s||!(e instanceof HTMLImageElement)?r=o=>e.style.backgroundImage=this.prepareSrc(o):r=o=>e.src=o,r(n),t){const o=()=>{r(t)},a=new Image;a.addEventListener("load",o),a.src=t,a.complete&&(a.removeEventListener("load",o),o())}}static prepareSrc(e){return e?e.startsWith("url")?e:`url("${e}")`:null}};const ma=':host{display:block;contain:strict;height:50px}:host([selected]){background-color:#d3e6fa}:host(:not([selected]):hover),:host(:not([selected])[focused]){background-color:#e7f1fa}@media (forced-colors: active){:host([selected]){outline:4px solid}:host(:not([selected]):hover){outline:4px dotted}:host(:not([selected])[focused]){outline:4px dashed}}:host([enable-line-clamp]) .labels>:only-child{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;word-wrap:break-word}.container{display:flex;height:100%;box-sizing:border-box}.container .level-indicator{width:7px;height:100%}.container .level-indicator.level-0{background-color:#a0c3ef}.container .level-indicator.level-1{background-color:#e7c374}.container .level-indicator.level-2{background-color:#bfd596}.container .level-indicator.level-3{background-color:#fd998d}.container .level-indicator.level-4{background-color:#c6e8f5}.container .level-indicator.level-5{background-color:#fde3a4}.container .level-indicator.level-6{background-color:#dcbfe0}.side-content{display:flex;align-items:center;flex-grow:0}.labels{display:flex;flex-direction:column;justify-content:center;flex:1 1 0px;height:100%;line-height:normal;overflow:hidden;padding:var(--sd-list-item-label-content-padding, 0 8px)}.caption,.description{width:100%;font-family:var(--sd-list-item-font-family, "Segoe UI", "Lucida Sans", Arial, sans-serif);font-style:normal;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-decoration:var(--sd-list-item-text-decoration, inherit)}.caption em,.description em{font-weight:bolder}.caption{font-size:var(--sd-list-item-caption-font-size, 16px);color:var(--sd-list-item-caption-text-color, #111);font-weight:var(--sd-list-item-caption-font-weight, normal)}.description{font-size:var(--sd-list-item-description-font-size, 13px);color:var(--sd-list-item-description-text-color, #767676);font-weight:var(--sd-list-item-description-font-weight, normal)}.icon-wrapper{width:var(--sd-list-item-icon-wrapper-width, 45px);height:100%;display:flex;align-items:center;justify-content:center}.icon-wrapper .icon{min-height:var(--sd-list-item-icon-size, 24px);min-width:var(--sd-list-item-icon-size, 24px);background-repeat:no-repeat;background-position:center;background-size:cover}';var va=Object.defineProperty,ba=Object.getOwnPropertyDescriptor,ie=(i,e,t,n)=>{for(var s=n>1?void 0:n?ba(e,t):e,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=(n?o(e,t,s):o(s))||s);return n&&s&&va(e,t,s),s},He;const ee=(He=class extends ue{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[_n`
517
+ ${Ze(ma)}
518
+ `]}render(){return Z`
510
519
  <div class="container">
511
- ${this.getLevelIndicators().map((i,e)=>X` <div class="level-indicator level-${e}"></div> `)}
520
+ ${this.getLevelIndicators().map((i,e)=>Z` <div class="level-indicator level-${e}"></div> `)}
512
521
  <div class="side-content">
513
522
  <slot name="left-content"></slot>
514
523
  ${this.renderIcon()}
@@ -521,7 +530,7 @@ export function getItems(): ExtendedTokenData[] {
521
530
  <slot name="right-content"></slot>
522
531
  </div>
523
532
  </div>
524
- `}renderIcon(){if(this.icon||this.iconPlaceholder){const i=this.iconBackgroundColor!=null?`background-color:${this.iconBackgroundColor}`:void 0;return X`
533
+ `}renderIcon(){if(this.icon||this.iconPlaceholder){const i=this.iconBackgroundColor!=null?`background-color:${this.iconBackgroundColor}`:void 0;return Z`
525
534
  <div
526
535
  class="icon-wrapper"
527
536
  @pointerdown="${this.handleIconClick}"
@@ -532,70 +541,44 @@ export function getItems(): ExtendedTokenData[] {
532
541
  >
533
542
  <div class="icon"></div>
534
543
  </div>
535
- `}return z}renderLabel(i,e,t){return e?X`
544
+ `}return z}renderLabel(i,e,t){return e?Z`
536
545
  <div class="${i}" title="${le(t)}">
537
- ${this.contentMode==="html"?ma(e):e}
546
+ ${this.contentMode==="html"?ga(e):e}
538
547
  </div>
539
- `:z}updated(i){super.updated(i),(i.has("icon")||i.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&Gs.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),i.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){const i=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let e=0;const t=this.shadowRoot.querySelector(".caption");t&&(e+=t.scrollWidth-t.clientWidth);const n=this.shadowRoot.querySelector(".description");return n&&(e=Math.max(e,n.scrollWidth-n.clientWidth)),e>0&&e++,i&&this.setAttribute("enable-line-clamp",""),e}handleIconClick(i){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",i))&&i.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},Be.ID="sd-list-item",Be.ensureDefined=()=>{customElements.get(Be.ID)||customElements.define(Be.ID,Be)},Be);ie([y({type:String})],ee.prototype,"caption",2);ie([y({type:String})],ee.prototype,"description",2);ie([y({type:Boolean})],ee.prototype,"selected",2);ie([y({type:String})],ee.prototype,"icon",2);ie([y({type:String})],ee.prototype,"iconBackgroundColor",2);ie([y({type:String})],ee.prototype,"iconPlaceholder",2);ie([y({type:Number})],ee.prototype,"level",2);ie([y()],ee.prototype,"contentMode",2);ie([y({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],ee.prototype,"enableLineClamp",2);ie([y({type:Boolean,reflect:!0,attribute:"aria-disabled"})],ee.prototype,"disabled",2);ie([y({type:String,attribute:"icon-attr-aria-label"})],ee.prototype,"iconAttrAriaLabel",2);ie([y({type:String,reflect:!0})],ee.prototype,"role",2);ie([y({type:String,attribute:"caption-attr-title"})],ee.prototype,"captionAttrTitle",2);ie([y({type:String,attribute:"description-attr-title"})],ee.prototype,"descriptionAttrTitle",2);ie([y({type:String,attribute:"icon-attr-title"})],ee.prototype,"iconAttrTitle",2);let Ct=ee;const Ks=(i,e)=>{const t=document.createElement(Ct.ID);if(i){if(t.caption=i.caption,t.description=i.description,t.icon=i.icon,t.iconBackgroundColor=i.iconBackgroundColor,t.iconPlaceholder=i.iconPlaceholder,t.level=i.level,t.disabled=i.disabled,i.contentMode&&(t.contentMode=i.contentMode),i.leftContentGenerator){const n=i.leftContentGenerator(i,t);n&&(n.slot="left-content",t.appendChild(n))}if(i.rightContentGenerator){const n=i.rightContentGenerator(i,t);n&&(n.slot="right-content",t.appendChild(n))}}return t};Ct.ensureDefined();var se="top",he="bottom",pe="right",re="left",ki="auto",zt=[se,he,pe,re],st="start",Ot="end",wa="clippingParents",Zs="viewport",mt="popper",xa="reference",ss=zt.reduce(function(i,e){return i.concat([e+"-"+st,e+"-"+Ot])},[]),Xs=[].concat(zt,[ki]).reduce(function(i,e){return i.concat([e,e+"-"+st,e+"-"+Ot])},[]),ka="beforeRead",Ea="read",Sa="afterRead",_a="beforeMain",Aa="main",$a="afterMain",Ca="beforeWrite",Oa="write",Ia="afterWrite",Ta=[ka,Ea,Sa,_a,Aa,$a,Ca,Oa,Ia];function Ae(i){return i?(i.nodeName||"").toLowerCase():null}function ce(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var e=i.ownerDocument;return e&&e.defaultView||window}return i}function qe(i){var e=ce(i).Element;return i instanceof e||i instanceof Element}function ue(i){var e=ce(i).HTMLElement;return i instanceof e||i instanceof HTMLElement}function Ei(i){if(typeof ShadowRoot>"u")return!1;var e=ce(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function La(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},s=e.attributes[t]||{},o=e.elements[t];!ue(o)||!Ae(o)||(Object.assign(o.style,n),Object.keys(s).forEach(function(r){var a=s[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function Pa(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var s=e.elements[n],o=e.attributes[n]||{},r=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]),a=r.reduce(function(l,c){return l[c]="",l},{});!ue(s)||!Ae(s)||(Object.assign(s.style,a),Object.keys(o).forEach(function(l){s.removeAttribute(l)}))})}}const Ra={name:"applyStyles",enabled:!0,phase:"write",fn:La,effect:Pa,requires:["computeStyles"]};function _e(i){return i.split("-")[0]}var Ue=Math.max,vn=Math.min,rt=Math.round;function Jn(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Js(){return!/^((?!chrome|android).)*safari/i.test(Jn())}function ot(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var n=i.getBoundingClientRect(),s=1,o=1;e&&ue(i)&&(s=i.offsetWidth>0&&rt(n.width)/i.offsetWidth||1,o=i.offsetHeight>0&&rt(n.height)/i.offsetHeight||1);var r=qe(i)?ce(i):window,a=r.visualViewport,l=!Js()&&t,c=(n.left+(l&&a?a.offsetLeft:0))/s,d=(n.top+(l&&a?a.offsetTop:0))/o,h=n.width/s,p=n.height/o;return{width:h,height:p,top:d,right:c+h,bottom:d+p,left:c,x:c,y:d}}function Si(i){var e=ot(i),t=i.offsetWidth,n=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:n}}function Ys(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&Ei(t)){var n=e;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Oe(i){return ce(i).getComputedStyle(i)}function Ma(i){return["table","td","th"].indexOf(Ae(i))>=0}function Re(i){return((qe(i)?i.ownerDocument:i.document)||window.document).documentElement}function _n(i){return Ae(i)==="html"?i:i.assignedSlot||i.parentNode||(Ei(i)?i.host:null)||Re(i)}function rs(i){return!ue(i)||Oe(i).position==="fixed"?null:i.offsetParent}function Da(i){var e=/firefox/i.test(Jn()),t=/Trident/i.test(Jn());if(t&&ue(i)){var n=Oe(i);if(n.position==="fixed")return null}var s=_n(i);for(Ei(s)&&(s=s.host);ue(s)&&["html","body"].indexOf(Ae(s))<0;){var o=Oe(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function Ut(i){for(var e=ce(i),t=rs(i);t&&Ma(t)&&Oe(t).position==="static";)t=rs(t);return t&&(Ae(t)==="html"||Ae(t)==="body"&&Oe(t).position==="static")?e:t||Da(i)||e}function _i(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function wt(i,e,t){return Ue(i,vn(e,t))}function Na(i,e,t){var n=wt(i,e,t);return n>t?t:n}function Qs(){return{top:0,right:0,bottom:0,left:0}}function er(i){return Object.assign({},Qs(),i)}function tr(i,e){return e.reduce(function(t,n){return t[n]=i,t},{})}var ja=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,er(typeof e!="number"?e:tr(e,zt))};function Ba(i){var e,t=i.state,n=i.name,s=i.options,o=t.elements.arrow,r=t.modifiersData.popperOffsets,a=_e(t.placement),l=_i(a),c=[re,pe].indexOf(a)>=0,d=c?"height":"width";if(!(!o||!r)){var h=ja(s.padding,t),p=Si(o),m=l==="y"?se:re,E=l==="y"?he:pe,w=t.rects.reference[d]+t.rects.reference[l]-r[l]-t.rects.popper[d],f=r[l]-t.rects.reference[l],$=Ut(o),T=$?l==="y"?$.clientHeight||0:$.clientWidth||0:0,L=w/2-f/2,x=h[m],A=T-p[d]-h[E],O=T/2-p[d]/2+L,P=wt(x,O,A),M=l;t.modifiersData[n]=(e={},e[M]=P,e.centerOffset=P-O,e)}}function za(i){var e=i.state,t=i.options,n=t.element,s=n===void 0?"[data-popper-arrow]":n;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||Ys(e.elements.popper,s)&&(e.elements.arrow=s))}const Ua={name:"arrow",enabled:!0,phase:"main",fn:Ba,effect:za,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function at(i){return i.split("-")[1]}var Fa={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ha(i,e){var t=i.x,n=i.y,s=e.devicePixelRatio||1;return{x:rt(t*s)/s||0,y:rt(n*s)/s||0}}function os(i){var e,t=i.popper,n=i.popperRect,s=i.placement,o=i.variation,r=i.offsets,a=i.position,l=i.gpuAcceleration,c=i.adaptive,d=i.roundOffsets,h=i.isFixed,p=r.x,m=p===void 0?0:p,E=r.y,w=E===void 0?0:E,f=typeof d=="function"?d({x:m,y:w}):{x:m,y:w};m=f.x,w=f.y;var $=r.hasOwnProperty("x"),T=r.hasOwnProperty("y"),L=re,x=se,A=window;if(c){var O=Ut(t),P="clientHeight",M="clientWidth";if(O===ce(t)&&(O=Re(t),Oe(O).position!=="static"&&a==="absolute"&&(P="scrollHeight",M="scrollWidth")),O=O,s===se||(s===re||s===pe)&&o===Ot){x=he;var I=h&&O===A&&A.visualViewport?A.visualViewport.height:O[P];w-=I-n.height,w*=l?1:-1}if(s===re||(s===se||s===he)&&o===Ot){L=pe;var j=h&&O===A&&A.visualViewport?A.visualViewport.width:O[M];m-=j-n.width,m*=l?1:-1}}var q=Object.assign({position:a},c&&Fa),te=d===!0?Ha({x:m,y:w},ce(t)):{x:m,y:w};if(m=te.x,w=te.y,l){var G;return Object.assign({},q,(G={},G[x]=T?"0":"",G[L]=$?"0":"",G.transform=(A.devicePixelRatio||1)<=1?"translate("+m+"px, "+w+"px)":"translate3d("+m+"px, "+w+"px, 0)",G))}return Object.assign({},q,(e={},e[x]=T?w+"px":"",e[L]=$?m+"px":"",e.transform="",e))}function Wa(i){var e=i.state,t=i.options,n=t.gpuAcceleration,s=n===void 0?!0:n,o=t.adaptive,r=o===void 0?!0:o,a=t.roundOffsets,l=a===void 0?!0:a,c={placement:_e(e.placement),variation:at(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,os(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,os(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const qa={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Wa,data:{}};var Gt={passive:!0};function Va(i){var e=i.state,t=i.instance,n=i.options,s=n.scroll,o=s===void 0?!0:s,r=n.resize,a=r===void 0?!0:r,l=ce(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(d){d.addEventListener("scroll",t.update,Gt)}),a&&l.addEventListener("resize",t.update,Gt),function(){o&&c.forEach(function(d){d.removeEventListener("scroll",t.update,Gt)}),a&&l.removeEventListener("resize",t.update,Gt)}}const Ga={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Va,data:{}};var Ka={left:"right",right:"left",bottom:"top",top:"bottom"};function cn(i){return i.replace(/left|right|bottom|top/g,function(e){return Ka[e]})}var Za={start:"end",end:"start"};function as(i){return i.replace(/start|end/g,function(e){return Za[e]})}function Ai(i){var e=ce(i),t=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:t,scrollTop:n}}function $i(i){return ot(Re(i)).left+Ai(i).scrollLeft}function Xa(i,e){var t=ce(i),n=Re(i),s=t.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=Js();(c||!c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+$i(i),y:l}}function Ja(i){var e,t=Re(i),n=Ai(i),s=(e=i.ownerDocument)==null?void 0:e.body,o=Ue(t.scrollWidth,t.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Ue(t.scrollHeight,t.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+$i(i),l=-n.scrollTop;return Oe(s||t).direction==="rtl"&&(a+=Ue(t.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Ci(i){var e=Oe(i),t=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+n)}function nr(i){return["html","body","#document"].indexOf(Ae(i))>=0?i.ownerDocument.body:ue(i)&&Ci(i)?i:nr(_n(i))}function xt(i,e){var t;e===void 0&&(e=[]);var n=nr(i),s=n===((t=i.ownerDocument)==null?void 0:t.body),o=ce(n),r=s?[o].concat(o.visualViewport||[],Ci(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(xt(_n(r)))}function Yn(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Ya(i,e){var t=ot(i,!1,e==="fixed");return t.top=t.top+i.clientTop,t.left=t.left+i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top,t}function ls(i,e,t){return e===Zs?Yn(Xa(i,t)):qe(e)?Ya(e,t):Yn(Ja(Re(i)))}function Qa(i){var e=xt(_n(i)),t=["absolute","fixed"].indexOf(Oe(i).position)>=0,n=t&&ue(i)?Ut(i):i;return qe(n)?e.filter(function(s){return qe(s)&&Ys(s,n)&&Ae(s)!=="body"}):[]}function el(i,e,t,n){var s=e==="clippingParents"?Qa(i):[].concat(e),o=[].concat(s,[t]),r=o[0],a=o.reduce(function(l,c){var d=ls(i,c,n);return l.top=Ue(d.top,l.top),l.right=vn(d.right,l.right),l.bottom=vn(d.bottom,l.bottom),l.left=Ue(d.left,l.left),l},ls(i,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ir(i){var e=i.reference,t=i.element,n=i.placement,s=n?_e(n):null,o=n?at(n):null,r=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2,l;switch(s){case se:l={x:r,y:e.y-t.height};break;case he:l={x:r,y:e.y+e.height};break;case pe:l={x:e.x+e.width,y:a};break;case re:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=s?_i(s):null;if(c!=null){var d=c==="y"?"height":"width";switch(o){case st:l[c]=l[c]-(e[d]/2-t[d]/2);break;case Ot:l[c]=l[c]+(e[d]/2-t[d]/2);break}}return l}function It(i,e){e===void 0&&(e={});var t=e,n=t.placement,s=n===void 0?i.placement:n,o=t.strategy,r=o===void 0?i.strategy:o,a=t.boundary,l=a===void 0?wa:a,c=t.rootBoundary,d=c===void 0?Zs:c,h=t.elementContext,p=h===void 0?mt:h,m=t.altBoundary,E=m===void 0?!1:m,w=t.padding,f=w===void 0?0:w,$=er(typeof f!="number"?f:tr(f,zt)),T=p===mt?xa:mt,L=i.rects.popper,x=i.elements[E?T:p],A=el(qe(x)?x:x.contextElement||Re(i.elements.popper),l,d,r),O=ot(i.elements.reference),P=ir({reference:O,element:L,strategy:"absolute",placement:s}),M=Yn(Object.assign({},L,P)),I=p===mt?M:O,j={top:A.top-I.top+$.top,bottom:I.bottom-A.bottom+$.bottom,left:A.left-I.left+$.left,right:I.right-A.right+$.right},q=i.modifiersData.offset;if(p===mt&&q){var te=q[s];Object.keys(j).forEach(function(G){var ge=[pe,he].indexOf(G)>=0?1:-1,ne=[se,he].indexOf(G)>=0?"y":"x";j[G]+=te[ne]*ge})}return j}function tl(i,e){e===void 0&&(e={});var t=e,n=t.placement,s=t.boundary,o=t.rootBoundary,r=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?Xs:l,d=at(n),h=d?a?ss:ss.filter(function(E){return at(E)===d}):zt,p=h.filter(function(E){return c.indexOf(E)>=0});p.length===0&&(p=h);var m=p.reduce(function(E,w){return E[w]=It(i,{placement:w,boundary:s,rootBoundary:o,padding:r})[_e(w)],E},{});return Object.keys(m).sort(function(E,w){return m[E]-m[w]})}function nl(i){if(_e(i)===ki)return[];var e=cn(i);return[as(i),e,as(e)]}function il(i){var e=i.state,t=i.options,n=i.name;if(!e.modifiersData[n]._skip){for(var s=t.mainAxis,o=s===void 0?!0:s,r=t.altAxis,a=r===void 0?!0:r,l=t.fallbackPlacements,c=t.padding,d=t.boundary,h=t.rootBoundary,p=t.altBoundary,m=t.flipVariations,E=m===void 0?!0:m,w=t.allowedAutoPlacements,f=e.options.placement,$=_e(f),T=$===f,L=l||(T||!E?[cn(f)]:nl(f)),x=[f].concat(L).reduce(function(me,H){return me.concat(_e(H)===ki?tl(e,{placement:H,boundary:d,rootBoundary:h,padding:c,flipVariations:E,allowedAutoPlacements:w}):H)},[]),A=e.rects.reference,O=e.rects.popper,P=new Map,M=!0,I=x[0],j=0;j<x.length;j++){var q=x[j],te=_e(q),G=at(q)===st,ge=[se,he].indexOf(te)>=0,ne=ge?"width":"height",J=It(e,{placement:q,boundary:d,rootBoundary:h,altBoundary:p,padding:c}),u=ge?G?pe:re:G?he:se;A[ne]>O[ne]&&(u=cn(u));var v=cn(u),k=[];if(o&&k.push(J[te]<=0),a&&k.push(J[u]<=0,J[v]<=0),k.every(function(me){return me})){I=q,M=!1;break}P.set(q,k)}if(M)for(var C=E?3:1,B=function(H){var Y=x.find(function(De){var we=P.get(De);if(we)return we.slice(0,H).every(function(Ke){return Ke})});if(Y)return I=Y,"break"},K=C;K>0;K--){var oe=B(K);if(oe==="break")break}e.placement!==I&&(e.modifiersData[n]._skip=!0,e.placement=I,e.reset=!0)}}const sl={name:"flip",enabled:!0,phase:"main",fn:il,requiresIfExists:["offset"],data:{_skip:!1}};function cs(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function ds(i){return[se,pe,he,re].some(function(e){return i[e]>=0})}function rl(i){var e=i.state,t=i.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=It(e,{elementContext:"reference"}),a=It(e,{altBoundary:!0}),l=cs(r,n),c=cs(a,s,o),d=ds(l),h=ds(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const ol={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:rl};function al(i,e,t){var n=_e(i),s=[re,se].indexOf(n)>=0?-1:1,o=typeof t=="function"?t(Object.assign({},e,{placement:i})):t,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[re,pe].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}function ll(i){var e=i.state,t=i.options,n=i.name,s=t.offset,o=s===void 0?[0,0]:s,r=Xs.reduce(function(d,h){return d[h]=al(h,e.rects,o),d},{}),a=r[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}const cl={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ll};function dl(i){var e=i.state,t=i.name;e.modifiersData[t]=ir({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const ul={name:"popperOffsets",enabled:!0,phase:"read",fn:dl,data:{}};function hl(i){return i==="x"?"y":"x"}function pl(i){var e=i.state,t=i.options,n=i.name,s=t.mainAxis,o=s===void 0?!0:s,r=t.altAxis,a=r===void 0?!1:r,l=t.boundary,c=t.rootBoundary,d=t.altBoundary,h=t.padding,p=t.tether,m=p===void 0?!0:p,E=t.tetherOffset,w=E===void 0?0:E,f=It(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:d}),$=_e(e.placement),T=at(e.placement),L=!T,x=_i($),A=hl(x),O=e.modifiersData.popperOffsets,P=e.rects.reference,M=e.rects.popper,I=typeof w=="function"?w(Object.assign({},e.rects,{placement:e.placement})):w,j=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),q=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,te={x:0,y:0};if(O){if(o){var G,ge=x==="y"?se:re,ne=x==="y"?he:pe,J=x==="y"?"height":"width",u=O[x],v=u+f[ge],k=u-f[ne],C=m?-M[J]/2:0,B=T===st?P[J]:M[J],K=T===st?-M[J]:-P[J],oe=e.elements.arrow,me=m&&oe?Si(oe):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Qs(),Y=H[ge],De=H[ne],we=wt(0,P[J],me[J]),Ke=L?P[J]/2-C-we-Y-j.mainAxis:B-we-Y-j.mainAxis,Rn=L?-P[J]/2+C+we+De+j.mainAxis:K+we+De+j.mainAxis,pt=e.elements.arrow&&Ut(e.elements.arrow),Mn=pt?x==="y"?pt.clientTop||0:pt.clientLeft||0:0,Wt=(G=q==null?void 0:q[x])!=null?G:0,Ze=u+Ke-Wt-Mn,qt=u+Rn-Wt,ae=wt(m?vn(v,Ze):v,u,m?Ue(k,qt):k);O[x]=ae,te[x]=ae-u}if(a){var Vt,ft=x==="x"?se:re,S=x==="x"?he:pe,xe=O[A],W=A==="y"?"height":"width",D=xe+f[ft],Ne=xe-f[S],ve=[se,re].indexOf($)!==-1,Xe=(Vt=q==null?void 0:q[A])!=null?Vt:0,Je=ve?D:xe-P[W]-M[W]-Xe+j.altAxis,g=ve?xe+P[W]+M[W]-Xe-j.altAxis:Ne,b=m&&ve?Na(Je,xe,g):wt(m?Je:D,xe,m?g:Ne);O[A]=b,te[A]=b-xe}e.modifiersData[n]=te}}const fl={name:"preventOverflow",enabled:!0,phase:"main",fn:pl,requiresIfExists:["offset"]};function gl(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function ml(i){return i===ce(i)||!ue(i)?Ai(i):gl(i)}function vl(i){var e=i.getBoundingClientRect(),t=rt(e.width)/i.offsetWidth||1,n=rt(e.height)/i.offsetHeight||1;return t!==1||n!==1}function bl(i,e,t){t===void 0&&(t=!1);var n=ue(e),s=ue(e)&&vl(e),o=Re(e),r=ot(i,s,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!t)&&((Ae(e)!=="body"||Ci(o))&&(a=ml(e)),ue(e)?(l=ot(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=$i(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function yl(i){var e=new Map,t=new Set,n=[];i.forEach(function(o){e.set(o.name,o)});function s(o){t.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&s(l)}}),n.push(o)}return i.forEach(function(o){t.has(o.name)||s(o)}),n}function wl(i){var e=yl(i);return Ta.reduce(function(t,n){return t.concat(e.filter(function(s){return s.phase===n}))},[])}function xl(i){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(i())})})),e}}function kl(i){var e=i.reduce(function(t,n){var s=t[n.name];return t[n.name]=s?Object.assign({},s,n,{options:Object.assign({},s.options,n.options),data:Object.assign({},s.data,n.data)}):n,t},{});return Object.keys(e).map(function(t){return e[t]})}var us={placement:"bottom",modifiers:[],strategy:"absolute"};function hs(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function El(i){i===void 0&&(i={});var e=i,t=e.defaultModifiers,n=t===void 0?[]:t,s=e.defaultOptions,o=s===void 0?us:s;return function(a,l,c){c===void 0&&(c=o);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},us,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},h=[],p=!1,m={state:d,setOptions:function($){var T=typeof $=="function"?$(d.options):$;w(),d.options=Object.assign({},o,d.options,T),d.scrollParents={reference:qe(a)?xt(a):a.contextElement?xt(a.contextElement):[],popper:xt(l)};var L=wl(kl([].concat(n,d.options.modifiers)));return d.orderedModifiers=L.filter(function(x){return x.enabled}),E(),m.update()},forceUpdate:function(){if(!p){var $=d.elements,T=$.reference,L=$.popper;if(hs(T,L)){d.rects={reference:bl(T,Ut(L),d.options.strategy==="fixed"),popper:Si(L)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(j){return d.modifiersData[j.name]=Object.assign({},j.data)});for(var x=0;x<d.orderedModifiers.length;x++){if(d.reset===!0){d.reset=!1,x=-1;continue}var A=d.orderedModifiers[x],O=A.fn,P=A.options,M=P===void 0?{}:P,I=A.name;typeof O=="function"&&(d=O({state:d,options:M,name:I,instance:m})||d)}}}},update:xl(function(){return new Promise(function(f){m.forceUpdate(),f(d)})}),destroy:function(){w(),p=!0}};if(!hs(a,l))return m;m.setOptions(c).then(function(f){!p&&c.onFirstUpdate&&c.onFirstUpdate(f)});function E(){d.orderedModifiers.forEach(function(f){var $=f.name,T=f.options,L=T===void 0?{}:T,x=f.effect;if(typeof x=="function"){var A=x({state:d,name:$,instance:m,options:L}),O=function(){};h.push(A||O)}})}function w(){h.forEach(function(f){return f()}),h=[]}return m}}var Sl=[Ga,ul,qa,Ra,cl,sl,fl,Ua,ol],_l=El({defaultModifiers:Sl});const Al=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="12" viewBox="0 0 24 12">\r
548
+ `:z}updated(i){super.updated(i),(i.has("icon")||i.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&Gs.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),i.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){const i=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let e=0;const t=this.shadowRoot.querySelector(".caption");t&&(e+=t.scrollWidth-t.clientWidth);const n=this.shadowRoot.querySelector(".description");return n&&(e=Math.max(e,n.scrollWidth-n.clientWidth)),e>0&&e++,i&&this.setAttribute("enable-line-clamp",""),e}handleIconClick(i){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",i))&&i.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},He.ID="sd-list-item",He.ensureDefined=()=>{customElements.get(He.ID)||customElements.define(He.ID,He)},He);ie([b({type:String})],ee.prototype,"caption",2);ie([b({type:String})],ee.prototype,"description",2);ie([b({type:Boolean})],ee.prototype,"selected",2);ie([b({type:String})],ee.prototype,"icon",2);ie([b({type:String})],ee.prototype,"iconBackgroundColor",2);ie([b({type:String})],ee.prototype,"iconPlaceholder",2);ie([b({type:Number})],ee.prototype,"level",2);ie([b()],ee.prototype,"contentMode",2);ie([b({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],ee.prototype,"enableLineClamp",2);ie([b({type:Boolean,reflect:!0,attribute:"aria-disabled"})],ee.prototype,"disabled",2);ie([b({type:String,attribute:"icon-attr-aria-label"})],ee.prototype,"iconAttrAriaLabel",2);ie([b({type:String,reflect:!0})],ee.prototype,"role",2);ie([b({type:String,attribute:"caption-attr-title"})],ee.prototype,"captionAttrTitle",2);ie([b({type:String,attribute:"description-attr-title"})],ee.prototype,"descriptionAttrTitle",2);ie([b({type:String,attribute:"icon-attr-title"})],ee.prototype,"iconAttrTitle",2);let rt=ee;const Ks=(i,e)=>{const t=document.createElement(rt.ID);if(i){if(t.caption=i.caption,t.description=i.description,t.icon=i.icon,t.iconBackgroundColor=i.iconBackgroundColor,t.iconPlaceholder=i.iconPlaceholder,t.level=i.level,t.disabled=i.disabled,i.contentMode&&(t.contentMode=i.contentMode),i.leftContentGenerator){const n=i.leftContentGenerator(i,t);n&&(n.slot="left-content",t.appendChild(n))}if(i.rightContentGenerator){const n=i.rightContentGenerator(i,t);n&&(n.slot="right-content",t.appendChild(n))}}return t};rt.ensureDefined();var se="top",pe="bottom",fe="right",re="left",ki="auto",Ht=[se,pe,fe,re],lt="start",Tt="end",ya="clippingParents",Zs="viewport",yt="popper",wa="reference",ss=Ht.reduce(function(i,e){return i.concat([e+"-"+lt,e+"-"+Tt])},[]),Xs=[].concat(Ht,[ki]).reduce(function(i,e){return i.concat([e,e+"-"+lt,e+"-"+Tt])},[]),xa="beforeRead",ka="read",Ea="afterRead",Sa="beforeMain",_a="main",Aa="afterMain",$a="beforeWrite",Ca="write",Ia="afterWrite",Oa=[xa,ka,Ea,Sa,_a,Aa,$a,Ca,Ia];function Ae(i){return i?(i.nodeName||"").toLowerCase():null}function ce(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var e=i.ownerDocument;return e&&e.defaultView||window}return i}function Ke(i){var e=ce(i).Element;return i instanceof e||i instanceof Element}function he(i){var e=ce(i).HTMLElement;return i instanceof e||i instanceof HTMLElement}function Ei(i){if(typeof ShadowRoot>"u")return!1;var e=ce(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function Ta(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},s=e.attributes[t]||{},r=e.elements[t];!he(r)||!Ae(r)||(Object.assign(r.style,n),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function La(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var s=e.elements[n],r=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]),a=o.reduce(function(l,c){return l[c]="",l},{});!he(s)||!Ae(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const Ra={name:"applyStyles",enabled:!0,phase:"write",fn:Ta,effect:La,requires:["computeStyles"]};function _e(i){return i.split("-")[0]}var We=Math.max,bn=Math.min,ct=Math.round;function Qn(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Js(){return!/^((?!chrome|android).)*safari/i.test(Qn())}function dt(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var n=i.getBoundingClientRect(),s=1,r=1;e&&he(i)&&(s=i.offsetWidth>0&&ct(n.width)/i.offsetWidth||1,r=i.offsetHeight>0&&ct(n.height)/i.offsetHeight||1);var o=Ke(i)?ce(i):window,a=o.visualViewport,l=!Js()&&t,c=(n.left+(l&&a?a.offsetLeft:0))/s,d=(n.top+(l&&a?a.offsetTop:0))/r,h=n.width/s,p=n.height/r;return{width:h,height:p,top:d,right:c+h,bottom:d+p,left:c,x:c,y:d}}function Si(i){var e=dt(i),t=i.offsetWidth,n=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:n}}function Ys(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&Ei(t)){var n=e;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ie(i){return ce(i).getComputedStyle(i)}function Pa(i){return["table","td","th"].indexOf(Ae(i))>=0}function De(i){return((Ke(i)?i.ownerDocument:i.document)||window.document).documentElement}function $n(i){return Ae(i)==="html"?i:i.assignedSlot||i.parentNode||(Ei(i)?i.host:null)||De(i)}function rs(i){return!he(i)||Ie(i).position==="fixed"?null:i.offsetParent}function Ma(i){var e=/firefox/i.test(Qn()),t=/Trident/i.test(Qn());if(t&&he(i)){var n=Ie(i);if(n.position==="fixed")return null}var s=$n(i);for(Ei(s)&&(s=s.host);he(s)&&["html","body"].indexOf(Ae(s))<0;){var r=Ie(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function Ft(i){for(var e=ce(i),t=rs(i);t&&Pa(t)&&Ie(t).position==="static";)t=rs(t);return t&&(Ae(t)==="html"||Ae(t)==="body"&&Ie(t).position==="static")?e:t||Ma(i)||e}function _i(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function Et(i,e,t){return We(i,bn(e,t))}function Da(i,e,t){var n=Et(i,e,t);return n>t?t:n}function Qs(){return{top:0,right:0,bottom:0,left:0}}function er(i){return Object.assign({},Qs(),i)}function tr(i,e){return e.reduce(function(t,n){return t[n]=i,t},{})}var Na=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,er(typeof e!="number"?e:tr(e,Ht))};function ja(i){var e,t=i.state,n=i.name,s=i.options,r=t.elements.arrow,o=t.modifiersData.popperOffsets,a=_e(t.placement),l=_i(a),c=[re,fe].indexOf(a)>=0,d=c?"height":"width";if(!(!r||!o)){var h=Na(s.padding,t),p=Si(r),m=l==="y"?se:re,E=l==="y"?pe:fe,w=t.rects.reference[d]+t.rects.reference[l]-o[l]-t.rects.popper[d],f=o[l]-t.rects.reference[l],$=Ft(r),T=$?l==="y"?$.clientHeight||0:$.clientWidth||0:0,L=w/2-f/2,x=h[m],A=T-p[d]-h[E],I=T/2-p[d]/2+L,R=Et(x,I,A),M=l;t.modifiersData[n]=(e={},e[M]=R,e.centerOffset=R-I,e)}}function Ba(i){var e=i.state,t=i.options,n=t.element,s=n===void 0?"[data-popper-arrow]":n;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||Ys(e.elements.popper,s)&&(e.elements.arrow=s))}const za={name:"arrow",enabled:!0,phase:"main",fn:ja,effect:Ba,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ut(i){return i.split("-")[1]}var Ua={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ha(i,e){var t=i.x,n=i.y,s=e.devicePixelRatio||1;return{x:ct(t*s)/s||0,y:ct(n*s)/s||0}}function os(i){var e,t=i.popper,n=i.popperRect,s=i.placement,r=i.variation,o=i.offsets,a=i.position,l=i.gpuAcceleration,c=i.adaptive,d=i.roundOffsets,h=i.isFixed,p=o.x,m=p===void 0?0:p,E=o.y,w=E===void 0?0:E,f=typeof d=="function"?d({x:m,y:w}):{x:m,y:w};m=f.x,w=f.y;var $=o.hasOwnProperty("x"),T=o.hasOwnProperty("y"),L=re,x=se,A=window;if(c){var I=Ft(t),R="clientHeight",M="clientWidth";if(I===ce(t)&&(I=De(t),Ie(I).position!=="static"&&a==="absolute"&&(R="scrollHeight",M="scrollWidth")),I=I,s===se||(s===re||s===fe)&&r===Tt){x=pe;var O=h&&I===A&&A.visualViewport?A.visualViewport.height:I[R];w-=O-n.height,w*=l?1:-1}if(s===re||(s===se||s===pe)&&r===Tt){L=fe;var j=h&&I===A&&A.visualViewport?A.visualViewport.width:I[M];m-=j-n.width,m*=l?1:-1}}var q=Object.assign({position:a},c&&Ua),te=d===!0?Ha({x:m,y:w},ce(t)):{x:m,y:w};if(m=te.x,w=te.y,l){var G;return Object.assign({},q,(G={},G[x]=T?"0":"",G[L]=$?"0":"",G.transform=(A.devicePixelRatio||1)<=1?"translate("+m+"px, "+w+"px)":"translate3d("+m+"px, "+w+"px, 0)",G))}return Object.assign({},q,(e={},e[x]=T?w+"px":"",e[L]=$?m+"px":"",e.transform="",e))}function Fa(i){var e=i.state,t=i.options,n=t.gpuAcceleration,s=n===void 0?!0:n,r=t.adaptive,o=r===void 0?!0:r,a=t.roundOffsets,l=a===void 0?!0:a,c={placement:_e(e.placement),variation:ut(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,os(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,os(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Wa={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fa,data:{}};var Zt={passive:!0};function qa(i){var e=i.state,t=i.instance,n=i.options,s=n.scroll,r=s===void 0?!0:s,o=n.resize,a=o===void 0?!0:o,l=ce(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach(function(d){d.addEventListener("scroll",t.update,Zt)}),a&&l.addEventListener("resize",t.update,Zt),function(){r&&c.forEach(function(d){d.removeEventListener("scroll",t.update,Zt)}),a&&l.removeEventListener("resize",t.update,Zt)}}const Va={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qa,data:{}};var Ga={left:"right",right:"left",bottom:"top",top:"bottom"};function un(i){return i.replace(/left|right|bottom|top/g,function(e){return Ga[e]})}var Ka={start:"end",end:"start"};function as(i){return i.replace(/start|end/g,function(e){return Ka[e]})}function Ai(i){var e=ce(i),t=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:t,scrollTop:n}}function $i(i){return dt(De(i)).left+Ai(i).scrollLeft}function Za(i,e){var t=ce(i),n=De(i),s=t.visualViewport,r=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var c=Js();(c||!c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+$i(i),y:l}}function Xa(i){var e,t=De(i),n=Ai(i),s=(e=i.ownerDocument)==null?void 0:e.body,r=We(t.scrollWidth,t.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=We(t.scrollHeight,t.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+$i(i),l=-n.scrollTop;return Ie(s||t).direction==="rtl"&&(a+=We(t.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function Ci(i){var e=Ie(i),t=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+n)}function nr(i){return["html","body","#document"].indexOf(Ae(i))>=0?i.ownerDocument.body:he(i)&&Ci(i)?i:nr($n(i))}function St(i,e){var t;e===void 0&&(e=[]);var n=nr(i),s=n===((t=i.ownerDocument)==null?void 0:t.body),r=ce(n),o=s?[r].concat(r.visualViewport||[],Ci(n)?n:[]):n,a=e.concat(o);return s?a:a.concat(St($n(o)))}function ei(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Ja(i,e){var t=dt(i,!1,e==="fixed");return t.top=t.top+i.clientTop,t.left=t.left+i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top,t}function ls(i,e,t){return e===Zs?ei(Za(i,t)):Ke(e)?Ja(e,t):ei(Xa(De(i)))}function Ya(i){var e=St($n(i)),t=["absolute","fixed"].indexOf(Ie(i).position)>=0,n=t&&he(i)?Ft(i):i;return Ke(n)?e.filter(function(s){return Ke(s)&&Ys(s,n)&&Ae(s)!=="body"}):[]}function Qa(i,e,t,n){var s=e==="clippingParents"?Ya(i):[].concat(e),r=[].concat(s,[t]),o=r[0],a=r.reduce(function(l,c){var d=ls(i,c,n);return l.top=We(d.top,l.top),l.right=bn(d.right,l.right),l.bottom=bn(d.bottom,l.bottom),l.left=We(d.left,l.left),l},ls(i,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ir(i){var e=i.reference,t=i.element,n=i.placement,s=n?_e(n):null,r=n?ut(n):null,o=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2,l;switch(s){case se:l={x:o,y:e.y-t.height};break;case pe:l={x:o,y:e.y+e.height};break;case fe:l={x:e.x+e.width,y:a};break;case re:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=s?_i(s):null;if(c!=null){var d=c==="y"?"height":"width";switch(r){case lt:l[c]=l[c]-(e[d]/2-t[d]/2);break;case Tt:l[c]=l[c]+(e[d]/2-t[d]/2);break}}return l}function Lt(i,e){e===void 0&&(e={});var t=e,n=t.placement,s=n===void 0?i.placement:n,r=t.strategy,o=r===void 0?i.strategy:r,a=t.boundary,l=a===void 0?ya:a,c=t.rootBoundary,d=c===void 0?Zs:c,h=t.elementContext,p=h===void 0?yt:h,m=t.altBoundary,E=m===void 0?!1:m,w=t.padding,f=w===void 0?0:w,$=er(typeof f!="number"?f:tr(f,Ht)),T=p===yt?wa:yt,L=i.rects.popper,x=i.elements[E?T:p],A=Qa(Ke(x)?x:x.contextElement||De(i.elements.popper),l,d,o),I=dt(i.elements.reference),R=ir({reference:I,element:L,strategy:"absolute",placement:s}),M=ei(Object.assign({},L,R)),O=p===yt?M:I,j={top:A.top-O.top+$.top,bottom:O.bottom-A.bottom+$.bottom,left:A.left-O.left+$.left,right:O.right-A.right+$.right},q=i.modifiersData.offset;if(p===yt&&q){var te=q[s];Object.keys(j).forEach(function(G){var me=[fe,pe].indexOf(G)>=0?1:-1,ne=[se,pe].indexOf(G)>=0?"y":"x";j[G]+=te[ne]*me})}return j}function el(i,e){e===void 0&&(e={});var t=e,n=t.placement,s=t.boundary,r=t.rootBoundary,o=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?Xs:l,d=ut(n),h=d?a?ss:ss.filter(function(E){return ut(E)===d}):Ht,p=h.filter(function(E){return c.indexOf(E)>=0});p.length===0&&(p=h);var m=p.reduce(function(E,w){return E[w]=Lt(i,{placement:w,boundary:s,rootBoundary:r,padding:o})[_e(w)],E},{});return Object.keys(m).sort(function(E,w){return m[E]-m[w]})}function tl(i){if(_e(i)===ki)return[];var e=un(i);return[as(i),e,as(e)]}function nl(i){var e=i.state,t=i.options,n=i.name;if(!e.modifiersData[n]._skip){for(var s=t.mainAxis,r=s===void 0?!0:s,o=t.altAxis,a=o===void 0?!0:o,l=t.fallbackPlacements,c=t.padding,d=t.boundary,h=t.rootBoundary,p=t.altBoundary,m=t.flipVariations,E=m===void 0?!0:m,w=t.allowedAutoPlacements,f=e.options.placement,$=_e(f),T=$===f,L=l||(T||!E?[un(f)]:tl(f)),x=[f].concat(L).reduce(function(ve,F){return ve.concat(_e(F)===ki?el(e,{placement:F,boundary:d,rootBoundary:h,padding:c,flipVariations:E,allowedAutoPlacements:w}):F)},[]),A=e.rects.reference,I=e.rects.popper,R=new Map,M=!0,O=x[0],j=0;j<x.length;j++){var q=x[j],te=_e(q),G=ut(q)===lt,me=[se,pe].indexOf(te)>=0,ne=me?"width":"height",J=Lt(e,{placement:q,boundary:d,rootBoundary:h,altBoundary:p,padding:c}),u=me?G?fe:re:G?pe:se;A[ne]>I[ne]&&(u=un(u));var v=un(u),k=[];if(r&&k.push(J[te]<=0),a&&k.push(J[u]<=0,J[v]<=0),k.every(function(ve){return ve})){O=q,M=!1;break}R.set(q,k)}if(M)for(var C=E?3:1,B=function(F){var Y=x.find(function(Be){var we=R.get(Be);if(we)return we.slice(0,F).every(function(Ye){return Ye})});if(Y)return O=Y,"break"},K=C;K>0;K--){var oe=B(K);if(oe==="break")break}e.placement!==O&&(e.modifiersData[n]._skip=!0,e.placement=O,e.reset=!0)}}const il={name:"flip",enabled:!0,phase:"main",fn:nl,requiresIfExists:["offset"],data:{_skip:!1}};function cs(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function ds(i){return[se,fe,pe,re].some(function(e){return i[e]>=0})}function sl(i){var e=i.state,t=i.name,n=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=Lt(e,{elementContext:"reference"}),a=Lt(e,{altBoundary:!0}),l=cs(o,n),c=cs(a,s,r),d=ds(l),h=ds(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const rl={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sl};function ol(i,e,t){var n=_e(i),s=[re,se].indexOf(n)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},e,{placement:i})):t,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[re,fe].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function al(i){var e=i.state,t=i.options,n=i.name,s=t.offset,r=s===void 0?[0,0]:s,o=Xs.reduce(function(d,h){return d[h]=ol(h,e.rects,r),d},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=o}const ll={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:al};function cl(i){var e=i.state,t=i.name;e.modifiersData[t]=ir({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const dl={name:"popperOffsets",enabled:!0,phase:"read",fn:cl,data:{}};function ul(i){return i==="x"?"y":"x"}function hl(i){var e=i.state,t=i.options,n=i.name,s=t.mainAxis,r=s===void 0?!0:s,o=t.altAxis,a=o===void 0?!1:o,l=t.boundary,c=t.rootBoundary,d=t.altBoundary,h=t.padding,p=t.tether,m=p===void 0?!0:p,E=t.tetherOffset,w=E===void 0?0:E,f=Lt(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:d}),$=_e(e.placement),T=ut(e.placement),L=!T,x=_i($),A=ul(x),I=e.modifiersData.popperOffsets,R=e.rects.reference,M=e.rects.popper,O=typeof w=="function"?w(Object.assign({},e.rects,{placement:e.placement})):w,j=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),q=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,te={x:0,y:0};if(I){if(r){var G,me=x==="y"?se:re,ne=x==="y"?pe:fe,J=x==="y"?"height":"width",u=I[x],v=u+f[me],k=u-f[ne],C=m?-M[J]/2:0,B=T===lt?R[J]:M[J],K=T===lt?-M[J]:-R[J],oe=e.elements.arrow,ve=m&&oe?Si(oe):{width:0,height:0},F=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Qs(),Y=F[me],Be=F[ne],we=Et(0,R[J],ve[J]),Ye=L?R[J]/2-C-we-Y-j.mainAxis:B-we-Y-j.mainAxis,Dn=L?-R[J]/2+C+we+Be+j.mainAxis:K+we+Be+j.mainAxis,mt=e.elements.arrow&&Ft(e.elements.arrow),Nn=mt?x==="y"?mt.clientTop||0:mt.clientLeft||0:0,Vt=(G=q==null?void 0:q[x])!=null?G:0,Qe=u+Ye-Vt-Nn,Gt=u+Dn-Vt,ae=Et(m?bn(v,Qe):v,u,m?We(k,Gt):k);I[x]=ae,te[x]=ae-u}if(a){var Kt,vt=x==="x"?se:re,S=x==="x"?pe:fe,xe=I[A],W=A==="y"?"height":"width",D=xe+f[vt],ze=xe-f[S],be=[se,re].indexOf($)!==-1,et=(Kt=q==null?void 0:q[A])!=null?Kt:0,tt=be?D:xe-R[W]-M[W]-et+j.altAxis,g=be?xe+R[W]+M[W]-et-j.altAxis:ze,y=m&&be?Da(tt,xe,g):Et(m?tt:D,xe,m?g:ze);I[A]=y,te[A]=y-xe}e.modifiersData[n]=te}}const pl={name:"preventOverflow",enabled:!0,phase:"main",fn:hl,requiresIfExists:["offset"]};function fl(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function gl(i){return i===ce(i)||!he(i)?Ai(i):fl(i)}function ml(i){var e=i.getBoundingClientRect(),t=ct(e.width)/i.offsetWidth||1,n=ct(e.height)/i.offsetHeight||1;return t!==1||n!==1}function vl(i,e,t){t===void 0&&(t=!1);var n=he(e),s=he(e)&&ml(e),r=De(e),o=dt(i,s,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!t)&&((Ae(e)!=="body"||Ci(r))&&(a=gl(e)),he(e)?(l=dt(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=$i(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function bl(i){var e=new Map,t=new Set,n=[];i.forEach(function(r){e.set(r.name,r)});function s(r){t.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&s(l)}}),n.push(r)}return i.forEach(function(r){t.has(r.name)||s(r)}),n}function yl(i){var e=bl(i);return Oa.reduce(function(t,n){return t.concat(e.filter(function(s){return s.phase===n}))},[])}function wl(i){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(i())})})),e}}function xl(i){var e=i.reduce(function(t,n){var s=t[n.name];return t[n.name]=s?Object.assign({},s,n,{options:Object.assign({},s.options,n.options),data:Object.assign({},s.data,n.data)}):n,t},{});return Object.keys(e).map(function(t){return e[t]})}var us={placement:"bottom",modifiers:[],strategy:"absolute"};function hs(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function kl(i){i===void 0&&(i={});var e=i,t=e.defaultModifiers,n=t===void 0?[]:t,s=e.defaultOptions,r=s===void 0?us:s;return function(a,l,c){c===void 0&&(c=r);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},us,r),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},h=[],p=!1,m={state:d,setOptions:function($){var T=typeof $=="function"?$(d.options):$;w(),d.options=Object.assign({},r,d.options,T),d.scrollParents={reference:Ke(a)?St(a):a.contextElement?St(a.contextElement):[],popper:St(l)};var L=yl(xl([].concat(n,d.options.modifiers)));return d.orderedModifiers=L.filter(function(x){return x.enabled}),E(),m.update()},forceUpdate:function(){if(!p){var $=d.elements,T=$.reference,L=$.popper;if(hs(T,L)){d.rects={reference:vl(T,Ft(L),d.options.strategy==="fixed"),popper:Si(L)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(j){return d.modifiersData[j.name]=Object.assign({},j.data)});for(var x=0;x<d.orderedModifiers.length;x++){if(d.reset===!0){d.reset=!1,x=-1;continue}var A=d.orderedModifiers[x],I=A.fn,R=A.options,M=R===void 0?{}:R,O=A.name;typeof I=="function"&&(d=I({state:d,options:M,name:O,instance:m})||d)}}}},update:wl(function(){return new Promise(function(f){m.forceUpdate(),f(d)})}),destroy:function(){w(),p=!0}};if(!hs(a,l))return m;m.setOptions(c).then(function(f){!p&&c.onFirstUpdate&&c.onFirstUpdate(f)});function E(){d.orderedModifiers.forEach(function(f){var $=f.name,T=f.options,L=T===void 0?{}:T,x=f.effect;if(typeof x=="function"){var A=x({state:d,name:$,instance:m,options:L}),I=function(){};h.push(A||I)}})}function w(){h.forEach(function(f){return f()}),h=[]}return m}}var El=[Va,dl,Wa,Ra,ll,il,pl,za,rl],Sl=kl({defaultModifiers:El});const _l=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="12" viewBox="0 0 24 12">\r
540
549
  <path d="M0 0l11.96 12L24 0z" fill="#999" class="arrow-border"/>\r
541
550
  <path d="M12 11L1 0h22z" fill="#f2f2f2" class="arrow-background"/>\r
542
551
  </svg>\r
543
- `,$l=navigator.userAgent.indexOf("Trident")!==-1,ps=1,fs="sd-popover-open",sr=class extends HTMLElement{constructor(){super(...arguments),this._open=!1,this._firstUpdated=!1,this.toggle=()=>{this.open=!this.open},this.show=()=>{this.open=!0},this.hide=()=>{this.open=!1},this.hideIfExternalTarget=e=>{const t=e.target;(!(t instanceof HTMLElement)||!this._container.contains(t)&&!this.targetElement.contains(t))&&this.hide()}}get triggerType(){return this.getAttribute("trigger-type")}set triggerType(e){e?this.setAttribute("trigger-type",e):this.removeAttribute("trigger-type")}get placement(){return this.getAttribute("placement")}set placement(e){e?this.setAttribute("placement",e):this.removeAttribute("placement")}get targetElement(){return this._targetElement}set targetElement(e){this.removeTargetEventListener(this.targetElement),this._targetElement&&this._targetElement.getAttribute("aria-expanded")=="true"&&this._targetElement.setAttribute("aria-expanded","false"),this._targetElement=e,e.setAttribute("aria-expanded","false"),this.addTargetEventListener(this.targetElement),this.updatePopper()}get targetSelector(){return this.getAttribute("target-selector")}set targetSelector(e){e?this.setAttribute("target-selector",e):this.removeAttribute("target-selector")}get modal(){return this.hasAttribute("modal")}set modal(e){e?this.setAttribute("modal",""):this.removeAttribute("modal")}get popoverFor(){return this.getAttribute("popover-for")}set popoverFor(e){e?this.setAttribute("popover-for",e):this.removeAttribute("popover-for")}get flipPriority(){return this._flipPriority}set flipPriority(e){e&&e.length>0?this._flipPriority=e:this._flipPriority=null,this.reConfigurePopper()}get offset(){return this.getAttribute("offset")?parseInt(this.getAttribute("offset")):0}set offset(e){e?this.setAttribute("offset",e.toString()):this.removeAttribute("offset"),this.reConfigurePopper()}reConfigurePopper(){this._popper&&this.configurePopper()}get noArrow(){return this.hasAttribute("no-arrow")}set noArrow(e){e?this.setAttribute("no-arrow",""):this.removeAttribute("no-arrow")}static get observedAttributes(){return["placement","target-selector","trigger-type"]}attributeChangedCallback(e,t){switch(e){case"placement":{this.updatePopper();break}case"trigger-type":{this.removeTargetEventListener(this.targetElement),this.addTargetEventListener(this.targetElement);break}case"target-selector":{this.handleTargetSelectorChange(t);break}}}connectedCallback(){this._firstUpdated||(this.firstUpdated(),this._firstUpdated=!0),this.targetElement?this.addTargetEventListener(this.targetElement):this.targetSelector&&requestAnimationFrame(()=>{this.isConnected&&this.handleTargetSelectorChange(null)}),this._arrow=document.createElement("div"),this._arrow.classList.add("popover-arrow"),this._arrow.setAttribute("data-popper-arrow",""),this._arrow.style.display="flex",this._arrow.innerHTML=Al}disconnectedCallback(){this.targetElement&&(this.removeTargetEventListener(this.targetElement),this.removeTargetClassForOpen(this.targetElement)),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}firstUpdated(){this.style.display="none",this.triggerType=this.triggerType||"click",this.placement=this.placement||"auto"}get open(){return this._open}set open(e){e!==this._open&&(this._open=e,this.handleOpenChange())}handleOpenChange(){this.open?(this._popper||this.configurePopper(),this._container.innerHTML="",this.popoverFor&&this._container.setAttribute("popover-for",this.popoverFor),this.content&&(this._container.prepend(this.content),Object.assign(this.content.style,{position:"relative",display:"block",zIndex:1}),window.requestAnimationFrame(()=>{let e=getComputedStyle(this.content).backgroundColor;e=="rgba(0, 0, 0, 0)"&&(this.content.style.background=e="#f2f2f2"),this._arrow.querySelector(".arrow-background").style.fill=e})),this.ensureArrowIsAdded(),this.ownerDocument.body.appendChild(this._container),this.updatePopper(),this.setAttribute("open",""),this.modal&&(window.addEventListener("click",this.hideIfExternalTarget,{capture:!0}),window.addEventListener("focus",this.hideIfExternalTarget,{capture:!0})),this.targetElement&&(this.addTargetClassForOpen(this.targetElement),this.targetElement.setAttribute("aria-expanded","true")),this.dispatchEvent(new CustomEvent("open"))):(this.ownerDocument.body.removeChild(this._container),this.removeAttribute("open"),window.removeEventListener("click",this.hideIfExternalTarget,{capture:!0}),window.removeEventListener("focus",this.hideIfExternalTarget,{capture:!0}),this.targetElement&&(this.removeTargetClassForOpen(this.targetElement),this.targetElement.setAttribute("aria-expanded","false")),this.dispatchEvent(new CustomEvent("close")))}handleTargetSelectorChange(e){const t=document.querySelector(e);t&&(this.removeTargetEventListener(t),this.removeTargetClassForOpen(t)),this.targetSelector&&(this.targetElement=document.querySelector(this.targetSelector),this.addTargetEventListener(this.targetElement))}addTargetEventListener(e){if(e)switch(this.triggerType){case"hover":{e.addEventListener("mouseenter",this.show),e.addEventListener("mouseleave",this.hide);break}case"click":{e.addEventListener("click",this.toggle);break}}}removeTargetEventListener(e){if(e)switch(this.triggerType){case"hover":{e.removeEventListener("mouseenter",this.show),e.removeEventListener("mouseleave",this.hide);break}case"click":{e.removeEventListener("click",this.toggle);break}}}configurePopper(){this.createContentContainer(),this.ensureArrowIsAdded();const e=this,t={placement:e.placement,strategy:"absolute",modifiers:[{name:"computeStyles",options:{gpuAcceleration:!$l}},{name:"flip",options:{fallbackPlacements:e._flipPriority}},{name:"offset",options:{offset:()=>[0,e.noArrow?0+e.offset:this._arrow.clientHeight+e.offset]}},{name:"arrow",options:{padding:6}},{name:"resetArrowStyles",enabled:!0,phase:"beforeWrite",fn({state:n}){Object.assign(e._arrow.style,{top:n.styles.arrow.top||"",left:n.styles.arrow.left||"",bottom:n.styles.arrow.bottom||"",right:n.styles.arrow.right||""})}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn({state:n}){e.updateArrow(n.placement)}}]};this._popper=_l(this.targetElement,this._container,t)}createContentContainer(){this._container=document.createElement("div"),this._container.classList.add("popover-container"),this._container.tabIndex=0,this._resizeObserver&&this._resizeObserver.disconnect(),this._resizeObserver=new ResizeObserver(()=>{this._popper&&this._popper.update()}),this._resizeObserver.observe(this._container),Object.assign(this._container.style,{boxShadow:`0 4px 5px 0 rgba(0, 0, 0, 0.14),
552
+ `,Al=navigator.userAgent.indexOf("Trident")!==-1,ps=1,fs="sd-popover-open",sr=class extends HTMLElement{constructor(){super(...arguments),this._open=!1,this._firstUpdated=!1,this.toggle=()=>{this.open=!this.open},this.show=()=>{this.open=!0},this.hide=()=>{this.open=!1},this.hideIfExternalTarget=e=>{const t=e.target;(!(t instanceof HTMLElement)||!this._container.contains(t)&&!this.targetElement.contains(t))&&this.hide()}}get triggerType(){return this.getAttribute("trigger-type")}set triggerType(e){e?this.setAttribute("trigger-type",e):this.removeAttribute("trigger-type")}get placement(){return this.getAttribute("placement")}set placement(e){e?this.setAttribute("placement",e):this.removeAttribute("placement")}get targetElement(){return this._targetElement}set targetElement(e){this.removeTargetEventListener(this.targetElement),this._targetElement&&this._targetElement.getAttribute("aria-expanded")=="true"&&this._targetElement.setAttribute("aria-expanded","false"),this._targetElement=e,e&&e.setAttribute("aria-expanded","false"),this.addTargetEventListener(this.targetElement),this.updatePopper()}get targetSelector(){return this.getAttribute("target-selector")}set targetSelector(e){e?this.setAttribute("target-selector",e):this.removeAttribute("target-selector")}get modal(){return this.hasAttribute("modal")}set modal(e){e?this.setAttribute("modal",""):this.removeAttribute("modal")}get popoverFor(){return this.getAttribute("popover-for")}set popoverFor(e){e?this.setAttribute("popover-for",e):this.removeAttribute("popover-for")}get flipPriority(){return this._flipPriority}set flipPriority(e){e&&e.length>0?this._flipPriority=e:this._flipPriority=null,this.reConfigurePopper()}get offset(){return this.getAttribute("offset")?parseInt(this.getAttribute("offset")):0}set offset(e){e?this.setAttribute("offset",e.toString()):this.removeAttribute("offset"),this.reConfigurePopper()}reConfigurePopper(){this._popper&&this.configurePopper()}get noArrow(){return this.hasAttribute("no-arrow")}set noArrow(e){e?this.setAttribute("no-arrow",""):this.removeAttribute("no-arrow")}static get observedAttributes(){return["placement","target-selector","trigger-type"]}attributeChangedCallback(e,t){switch(e){case"placement":{this.updatePopper();break}case"trigger-type":{this.removeTargetEventListener(this.targetElement),this.addTargetEventListener(this.targetElement);break}case"target-selector":{this.handleTargetSelectorChange(t);break}}}connectedCallback(){this._firstUpdated||(this.firstUpdated(),this._firstUpdated=!0),this.targetElement?this.addTargetEventListener(this.targetElement):this.targetSelector&&requestAnimationFrame(()=>{this.isConnected&&this.handleTargetSelectorChange(null)}),this._arrow=document.createElement("div"),this._arrow.classList.add("popover-arrow"),this._arrow.setAttribute("data-popper-arrow",""),this._arrow.style.display="flex",this._arrow.innerHTML=_l}disconnectedCallback(){this.targetElement&&(this.removeTargetEventListener(this.targetElement),this.removeTargetClassForOpen(this.targetElement)),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}firstUpdated(){this.style.display="none",this.triggerType=this.triggerType||"click",this.placement=this.placement||"auto"}get open(){return this._open}set open(e){e!==this._open&&(this._open=e,this.handleOpenChange())}handleOpenChange(){this.open?(this._popper||this.configurePopper(),this._container.innerHTML="",this.popoverFor&&this._container.setAttribute("popover-for",this.popoverFor),this.content&&(this._container.prepend(this.content),Object.assign(this.content.style,{position:"relative",display:"block",zIndex:1}),window.requestAnimationFrame(()=>{let e=getComputedStyle(this.content).backgroundColor;e=="rgba(0, 0, 0, 0)"&&(this.content.style.background=e="#f2f2f2"),this._arrow.querySelector(".arrow-background").style.fill=e})),this.ensureArrowIsAdded(),this.ownerDocument.body.appendChild(this._container),this.updatePopper(),this.setAttribute("open",""),this.modal&&(window.addEventListener("click",this.hideIfExternalTarget,{capture:!0}),window.addEventListener("focus",this.hideIfExternalTarget,{capture:!0})),this.targetElement&&(this.addTargetClassForOpen(this.targetElement),this.targetElement.setAttribute("aria-expanded","true")),this.dispatchEvent(new CustomEvent("open"))):(this.ownerDocument.body.removeChild(this._container),this.removeAttribute("open"),window.removeEventListener("click",this.hideIfExternalTarget,{capture:!0}),window.removeEventListener("focus",this.hideIfExternalTarget,{capture:!0}),this.targetElement&&(this.removeTargetClassForOpen(this.targetElement),this.targetElement.setAttribute("aria-expanded","false")),this.dispatchEvent(new CustomEvent("close")))}handleTargetSelectorChange(e){const t=document.querySelector(e);t&&(this.removeTargetEventListener(t),this.removeTargetClassForOpen(t)),this.targetSelector&&(this.targetElement=document.querySelector(this.targetSelector),this.addTargetEventListener(this.targetElement))}addTargetEventListener(e){if(e)switch(this.triggerType){case"hover":{e.addEventListener("mouseenter",this.show),e.addEventListener("mouseleave",this.hide);break}case"click":{e.addEventListener("click",this.toggle);break}}}removeTargetEventListener(e){if(e)switch(this.triggerType){case"hover":{e.removeEventListener("mouseenter",this.show),e.removeEventListener("mouseleave",this.hide);break}case"click":{e.removeEventListener("click",this.toggle);break}}}configurePopper(){this.createContentContainer(),this.ensureArrowIsAdded();const e=this,t={placement:e.placement,strategy:"absolute",modifiers:[{name:"computeStyles",options:{gpuAcceleration:!Al}},{name:"flip",options:{fallbackPlacements:e._flipPriority}},{name:"offset",options:{offset:()=>[0,e.noArrow?0+e.offset:this._arrow.clientHeight+e.offset]}},{name:"arrow",options:{padding:6}},{name:"resetArrowStyles",enabled:!0,phase:"beforeWrite",fn({state:n}){Object.assign(e._arrow.style,{top:n.styles.arrow.top||"",left:n.styles.arrow.left||"",bottom:n.styles.arrow.bottom||"",right:n.styles.arrow.right||""})}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn({state:n}){e.updateArrow(n.placement)}}]};this._popper=Sl(this.targetElement,this._container,t)}createContentContainer(){this._container=document.createElement("div"),this._container.classList.add("popover-container"),this._container.tabIndex=0,this._resizeObserver&&this._resizeObserver.disconnect(),this._resizeObserver=new ResizeObserver(()=>{this._popper&&this._popper.update()}),this._resizeObserver.observe(this._container),Object.assign(this._container.style,{boxShadow:`0 4px 5px 0 rgba(0, 0, 0, 0.14),
544
553
  0 1px 10px 0 rgba(0, 0, 0, 0.12),
545
- 0 2px 4px -1px rgba(0, 0, 0, 0.4)`,border:"1px solid #999",boxSizing:"border-box",zIndex:2e4})}ensureArrowIsAdded(){!this.noArrow&&!this._container.contains(this._arrow)&&this._container.appendChild(this._arrow)}updatePopper(){this._popper&&(this._popper.state.elements.reference=this.targetElement,this._popper.state.options.placement=this.placement,this.open&&this._popper.update())}updateArrow(e){if(this._arrow){const t=this.getArrowVariant(e);if(this._arrow.setAttribute("variant",t),this._content){const n=this._arrow.querySelector("svg"),s=this._arrow.clientWidth,o=this._arrow.clientHeight,r=`-${o-ps}px`,a=(s-o)/2,l=`-${o+a-ps}px`;switch(t){case"bottom":{this._arrow.style.top=r,n.style.transform="rotate(180deg)";break}case"top":{this._arrow.style.bottom=r,n.style.transform="rotate(0deg)";break}case"left":{this._arrow.style.right=l,n.style.transform="rotate(270deg)";break}case"right":{this._arrow.style.left=l,n.style.transform="rotate(90deg)";break}}}}}getArrowVariant(e){if(e.indexOf("bottom")!==-1)return"bottom";if(e.indexOf("top")!==-1)return"top";if(e.indexOf("left")!==-1)return"left";if(e.indexOf("right")!==-1)return"right"}get content(){return this._content||(this._content=this.firstElementChild,this._content.setAttribute("data-popper-content","")),this._content}addTargetClassForOpen(e){e&&e.classList.add(fs)}removeTargetClassForOpen(e){e&&e.classList.remove(fs)}};sr.ID="sd-popover";let dn=sr;customElements.get(dn.ID)||customElements.define(dn.ID,dn);const rr=class un extends HTMLElement{memoizedTemplate(){const e=this.is();if(un.TEMPLATE_CACHE[e])return un.TEMPLATE_CACHE[e];const t=this.template();return window.ShadyCSS&&window.ShadyCSS.prepareTemplate(t,this.is()),un.TEMPLATE_CACHE[e]=t,t}connectedCallback(){const e=this.memoizedTemplate();window.ShadyCSS&&window.ShadyCSS.styleElement(this),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(e.content,!0)),requestAnimationFrame(()=>this.dispatchEvent(new CustomEvent("ready"))))}whenReady(e){this.shadowRoot?e():this.addEventListener("ready",()=>e())}};rr.TEMPLATE_CACHE={};let Cl=rr;const Ol=`<style>
546
- :host {
547
- background-color: var(--sd-list-base-background-color, white);
548
- }
549
-
550
- .container {
551
- width: 100%;
552
- height: 100%;
553
- }
554
-
555
- :host(:focus) {
556
- outline: none;
557
- }
558
-
559
- :host(:focus-visible) ::slotted([focused]) {
560
- box-shadow: 0 0 0 1px #1467ba inset;
561
- }
562
-
563
- .container ::slotted(*) {
564
- display: block;
565
- box-sizing: border-box;
566
- }
567
-
568
- .container ::slotted(:not(:last-of-type)) {
569
- border-bottom: 1px solid #d9d9d9;
570
- }
571
- </style>
572
-
573
- <div class="container">
574
- <slot name="items"></slot>
575
- <slot id="default-slot"></slot>
576
- </div>
577
- `;let Il=0;const tt=class Qn extends Cl{constructor(){super(),this._items=[],this._selectedIndexes=[],this._itemGenerator=Ks,this.onDefaultSlotChange=()=>{let e=0;this.defaultSlot.assignedElements().forEach(t=>{this.isSeparator(t)||this.initListItem(t,e++)}),this.updateFocusedElement()},this.handleKeyDown=e=>{let t=!0;switch(e.key){case"ArrowDown":case"Down":this.focusIndex=Math.min(this.getListItems.length-1,this.focusIndex+1);break;case"ArrowUp":case"Up":this.focusIndex=Math.max(0,this.focusIndex-1);break;case"Enter":case"Space":case" ":this.handleSelection(this.focusIndex,e.metaKey||e.ctrlKey);break;case"End":case"PageDown":this.focusIndex=this.items.length-1;break;case"Home":case"PageUp":this.focusIndex=0;break;default:t=!1;break}t&&(e.preventDefault(),e.stopPropagation())},this._fallbackId=Qn.ID+"_"+Il++,this.addEventListener("pointerup",e=>{this.focusIndex=this.getListItems.indexOf(e.target),this.updateFocusedElement()}),this.addEventListener("focus",()=>{this.matches(":focus-visible")&&(this.focusIndex==-1?(this.selectedIndexes&&(this.focusIndex=this.selectedIndexes[0]),this.focusIndex==-1&&this.childElementCount>0&&(this.focusIndex=0)):this.updateFocusedElement())}),this.addEventListener("blur",()=>this.removeFocusedItemAttributes())}get items(){return this._items}set items(e){this._items=e,this.render()}get itemGenerator(){return this._itemGenerator}set itemGenerator(e){this._itemGenerator=e,this.render()}get selectionType(){return this.getAttribute("selection-type")}set selectionType(e){e?this.setAttribute("selection-type",e):this.removeAttribute("selection-type")}get focusIndex(){return this.hasAttribute("focus-index")?Number(this.getAttribute("focus-index")):-1}set focusIndex(e){0<=e&&e<this.getListItems.length?this.setAttribute("focus-index",e.toString()):this.removeAttribute("focus-index")}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(e){this.toggleAttribute("focus-target",e)}getListItem(e){return this.shadowRoot?this.getListItems[e]:null}get getListItems(){return Array.prototype.slice.call(this.children).filter(e=>!this.isSeparator(e))}get selectedIndexes(){return this._selectedIndexes}set selectedIndexes(e){const t=this._selectedIndexes||[];this._selectedIndexes=e||[],t.filter(n=>!this._selectedIndexes.includes(n)).forEach(n=>{this.setSelectedAttr(this.getListItem(n),!1)}),this._selectedIndexes.filter(n=>!t.includes(n)).forEach(n=>{this.setSelectedAttr(this.getListItem(n),!0)})}static get observedAttributes(){return["focus-index","focus-target"]}is(){return Qn.ID}template(){const e=document.createElement("template");return e.innerHTML=Ol,e}removeFocusedItemAttributes(){if(this.focusIndex!=-1){const e=this.getListItem(this.focusIndex);e&&(e.removeAttribute("focused"),this.removeAttribute("aria-activedescendant"))}}connectedCallback(){super.connectedCallback(),this.defaultSlot.addEventListener("slotchange",this.onDefaultSlotChange),this.hasAttribute("role")||this.setAttribute("role","listbox"),this.id||(this.id=this._fallbackId),this.render(),this.addEventListener("keydown",this.handleKeyDown),this.selectionType||(this.selectionType="trigger-only")}get defaultSlot(){return this.shadowRoot.querySelector("#default-slot")}isSeparator(e){return e.tagName=="HR"||e.getAttribute("role")=="separator"}attributeChangedCallback(e,t,n){if(e==="focus-index"){const s=this.getListItem(t);s&&s.removeAttribute("focused"),this.updateFocusedElement()}else e==="focus-target"&&(this.focusTarget?this.updateFocusedElement():document.activeElement!=this&&this.removeFocusedItemAttributes())}increaseWidthIfNeeded(){window.requestAnimationFrame(()=>{let e=Number.MAX_SAFE_INTEGER;const t=getComputedStyle(this).maxWidth,n=this.offsetWidth;t.endsWith("px")&&(e=Number.parseInt(t)-n);const s=this.style.width;if(e==0||s.endsWith("px")&&n<Number.parseInt(s))this.enableLineClampOnItemsIfNeeded();else{const o=[...this.querySelectorAll("[slot='items']")].map(a=>{if(a instanceof Ct){a.enableLineClamp=!1;const l=a.missingWidthForTexts;return l>e&&(a.enableLineClamp=!0),l}}),r=Math.max(...o);if(r>0){const a=n+r;this.style.width=`${a}px`,this.offsetWidth<a&&this.enableLineClampOnItemsIfNeeded()}}})}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[slot='items']").forEach(e=>{e instanceof Ct&&(e.enableLineClamp=e.enableLineClamp||e.missingWidthForTexts>0)})}render(){if(!this.isConnected||!this.items)return;this.querySelectorAll("[slot='items']").forEach(n=>{this.removeChild(n)});const e=document.createDocumentFragment();let t=0;this.items.forEach((n,s)=>{const o=this.itemGenerator(n,s);this.isSeparator(o)||this.initListItem(o,t++),o.slot="items",e.appendChild(o)}),this.appendChild(e),this.updateFocusedElement()}initListItem(e,t){this.setSelectedAttr(e,this.selectedIndexes.includes(t)),e.addEventListener("click",n=>{this.handleItemClick(n,t)}),e.addEventListener("mousedown",n=>{n.button==1&&n.preventDefault()}),e.addEventListener("auxclick",n=>{this.handleItemClick(n,t)}),(!e.id||e.id.startsWith(this.id+"_item_"))&&(e.id=this.id+"_item_"+t)}ensureItemVisible(e){const t=e.getBoundingClientRect(),n=this.getBoundingClientRect();t.bottom>n.bottom?this.scrollTop+=t.bottom-n.bottom:t.top<n.top&&(this.scrollTop-=n.top-t.top)}updateFocusedElement(){const e=this.getListItem(this.focusIndex);e&&(this.focusTarget||document.activeElement==this)?(e.setAttribute("focused",""),this.setAttribute("aria-activedescendant",e.id),this.ensureItemVisible(e)):this.removeAttribute("aria-activedescendant")}handleItemClick(e,t){if(e.button!==null){const n=e.type=="auxclick"&&e.button==1||e.metaKey||e.ctrlKey;(e.button==0||e.button==1)&&this.handleSelection(t,n)}}handleSelection(e,t){const n=this.items[e];if(!n||n.disabled)return;const s=this.getListItem(e),o=this.isSelected(s);this.selectionType!=="trigger-only"&&(this.selectionType==="single"?this.selectedIndexes=o?[]:[e]:this.toggleSelection(s)?this._selectedIndexes.push(e):this.removeFromSelectedIndexes(e)),this.focusIndex=e,this.dispatchEvent(new CustomEvent("selection",{detail:{index:e,selected:this.selectionType=="trigger-only"||!o,hasModifier:t},bubbles:!0,composed:!0}))}removeFromSelectedIndexes(e){const t=this._selectedIndexes.indexOf(e);t!==-1&&this._selectedIndexes.splice(t,1)}toggleSelection(e){const t=!e.hasAttribute("selected");return this.setSelectedAttr(e,t),t}setSelectedAttr(e,t){e&&(t?e.setAttribute("selected",""):e.removeAttribute("selected"),e.setAttribute("aria-selected",String(t)))}isSelected(e){return e.hasAttribute("selected")}};tt.ID="sd-list",tt.ensureDefined=()=>{Ct.ensureDefined(),customElements.get(tt.ID)||customElements.define(tt.ID,tt)};let ei=tt;ei.ensureDefined();let Tl=class or{constructor(e,t){this.eventTarget=e,this.keydownHandler=t,this.catchedKeys=["Down","ArrowDown","Up","ArrowUp","Enter"],this.markAsFocusTargetHandler=()=>this.eventTarget.setAttribute("focus-target",""),this.unmarkAsFocusTargetHandler=()=>this.eventTarget.removeAttribute("focus-target"),this.delegateKeyDownEvent=n=>{if(this.catchedKeys.indexOf(n.key)!==-1){const s=n.key.toLocaleLowerCase();let o=0;const r=s.includes("enter");r||(o=s.includes("down")?1:-1),this.keydownHandler(n,o,r),n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}}}static delegateTo(e){return new or(e,t=>e.dispatchEvent(new KeyboardEvent(t.type,t)))}connect(e){var t,n;if(e!=null){e.addEventListener("keydown",this.delegateKeyDownEvent),e.addEventListener("focus",this.markAsFocusTargetHandler),e.addEventListener("blur",this.unmarkAsFocusTargetHandler);const s=document.activeElement;(e.contains(s)||(n=(t=e.shadowRoot)==null?void 0:t.activeElement)!=null&&n.contains(s))&&this.markAsFocusTargetHandler()}}disconnect(e){e!=null&&(e.removeEventListener("keydown",this.delegateKeyDownEvent),e.removeEventListener("focus",this.markAsFocusTargetHandler),e.removeEventListener("blur",this.unmarkAsFocusTargetHandler),this.unmarkAsFocusTargetHandler())}};class Ll{constructor(e,t,n,s){this.inputElement=e,this.notSelectedTokensProvider=t,this.initializeCallback=s,this.filter=(o,r)=>o?r.filter(a=>a.disabled||a.deactivated?!1:a.caption&&a.caption.toLowerCase().includes(o)):r,ei.ensureDefined(),this._tokenList=new ei,this._tokenList.style.minWidth="250px",this._tokenList.addEventListener("selection",o=>{const r=o.detail.index,a=this._suggestItems[r];n(a),this.hide()}),new Tl(this._tokenList,(o,r,a)=>{this._tokenList.dispatchEvent(new KeyboardEvent(o.type,o)),!a&&!this.isOpened&&this.show()}).connect(e)}show(){this.inputElement.effectiveDisabled||(this.popover,this._suggestItems=this.filterItems((this.inputElement.value||"").toLowerCase()),this._suggestItems.length==0?this.hide():(this._tokenList.items=this._suggestItems.map(e=>({...e,contentMode:"text"})),this._tokenList.focusIndex=-1,Object.assign(this._tokenList.style,{minWidth:`${Math.max(this.popover.targetElement.offsetWidth,250)}px`}),this.popover.show()))}refreshItems(){this.isOpened&&(this._suggestItems=this.filterItems((this.inputElement.value||"").toLowerCase()),this._suggestItems.length==0?this.hide():this._tokenList.items=this._suggestItems.map(e=>({...e,contentMode:"text"})))}filterItems(e){const t=this.notSelectedTokensProvider();return this.filter(e,t)}hide(){var e;this._suggestItems=[],this._tokenList.items=[],(e=this._popover)==null||e.hide()}get list(){return this._tokenList}get popover(){return this._popover||(this._popover=this.createPopover(),this.initializeCallback(this)),this._popover}createPopover(){const e=new dn;return e.setAttribute("trigger-type","manual"),e.setAttribute("placement","bottom-start"),e.setAttribute("modal",""),e.setAttribute("popover-for","token-autosuggest-popover"),e.setAttribute("offset","-2"),e.targetElement=this.inputElement,e.appendChild(this._tokenList),e}get isOpened(){return this._popover&&this._popover.hasAttribute("open")}get focusedSuggestToken(){return this._suggestItems[this._tokenList.focusIndex]}}class ti extends mn{}ti.directiveName="unsafeSVG",ti.resultType=2;const Pl=Vs(ti),Rl=":host{flex-shrink:0;max-width:100%}.container{display:flex;height:28px;background-color:var(--token-background-color, #f3f3f3);border:var(--token-border);box-sizing:border-box}.container .icon-wrapper{display:flex;flex-shrink:0;justify-content:center;align-items:center;width:28px;height:100%;overflow:hidden;background-color:var(--token-icon-background-color, transparent)}.container .icon-wrapper .icon{height:100%;width:100%;object-fit:contain;background-size:cover;background-repeat:no-repeat;background-position:center}.container .value{display:inline-block;align-self:center;padding:0 8px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container .delete-button-wrapper{display:flex;align-self:center;height:16px;width:16px;padding-right:8px;opacity:.5}.container .delete-button-wrapper:hover{cursor:pointer;filter:brightness(10%);opacity:1}",Ml=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">\r
554
+ 0 2px 4px -1px rgba(0, 0, 0, 0.4)`,border:"1px solid #999",boxSizing:"border-box",zIndex:2e4})}ensureArrowIsAdded(){!this.noArrow&&!this._container.contains(this._arrow)&&this._container.appendChild(this._arrow)}updatePopper(){this._popper&&(this._popper.state.elements.reference=this.targetElement,this._popper.state.options.placement=this.placement,this.open&&this._popper.update())}updateArrow(e){if(this._arrow){const t=this.getArrowVariant(e);if(this._arrow.setAttribute("variant",t),this._content){const n=this._arrow.querySelector("svg"),s=this._arrow.clientWidth,r=this._arrow.clientHeight,o=`-${r-ps}px`,a=(s-r)/2,l=`-${r+a-ps}px`;switch(t){case"bottom":{this._arrow.style.top=o,n.style.transform="rotate(180deg)";break}case"top":{this._arrow.style.bottom=o,n.style.transform="rotate(0deg)";break}case"left":{this._arrow.style.right=l,n.style.transform="rotate(270deg)";break}case"right":{this._arrow.style.left=l,n.style.transform="rotate(90deg)";break}}}}}getArrowVariant(e){if(e.indexOf("bottom")!==-1)return"bottom";if(e.indexOf("top")!==-1)return"top";if(e.indexOf("left")!==-1)return"left";if(e.indexOf("right")!==-1)return"right"}get content(){return this._content||(this._content=this.firstElementChild,this._content.setAttribute("data-popper-content","")),this._content}addTargetClassForOpen(e){e&&e.classList.add(fs)}removeTargetClassForOpen(e){e&&e.classList.remove(fs)}};sr.ID="sd-popover";let hn=sr;customElements.get(hn.ID)||customElements.define(hn.ID,hn);class $l{getOffsetForIndexAndAlignment(e,t,n,s,r,o){const a=Math.max(0,o*s),l=Math.min(a,e*s),c=Math.max(0,e*s-r+s);switch(t){case"start":return l;case"end":return c;case"center":{const d=Math.round(c+(l-c)/2);return d<Math.ceil(r/2)?0:d>a+Math.floor(r/2)?a:d}case"auto":default:return n>=c&&n<=l?n:n<c?c:l}}debounce(e){let t;return(...n)=>{t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{e(...n),t=null})}}}const Cl=new $l,Il=":host{display:block;position:relative;contain:layout}:host(:focus){outline:none}:host(:focus-visible) ::slotted([focused]){box-shadow:0 0 0 1px #1467ba inset}.container{width:100%}.container>::slotted(*){width:100%;position:absolute;box-sizing:border-box}.container>::slotted(:not([last])){border-bottom:1px solid #d9d9d9}";var Ol=Object.defineProperty,Tl=Object.getOwnPropertyDescriptor,Ne=(i,e,t,n)=>{for(var s=n>1?void 0:n?Tl(e,t):e,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=(n?o(e,t,s):o(s))||s);return n&&s&&Ol(e,t,s),s};let Ll=0;var Re;const Te=(Re=class extends ue{constructor(){super(),this.items=[],this.selectionType="trigger-only",this.id=Re.ID+"_"+Ll++,this.role="listbox",this.itemGenerator=Ks,this._lastKnownScrollTop=0,this._lastRenderedScrollTop=0,this._itemsRenderData=[],this._elementCache=new Map,this._visibleItemsNum=0,this._selectedIndices=[],this._focusIndex=-1,this._lastKnownHeight=0,this.onScroll=()=>{this._lastKnownScrollTop=this.scrollTop;const i=this._lastRenderedScrollTop-this._lastKnownScrollTop;Math.abs(i)>=this.itemHeight&&(this._lastRenderedScrollTop=this._lastKnownScrollTop,this.requestUpdate())},this.handleKeyDown=i=>{let e=!0;switch(i.key){case"Down":case"ArrowDown":this.focusIndex=this.normalizeIndex(this.focusIndex+1);break;case"Up":case"ArrowUp":this.focusIndex=this.normalizeIndex(this.focusIndex-1);break;case"Enter":this.handleSelection(this.focusIndex,i.metaKey||i.ctrlKey);break;case"End":this.focusIndex=this.itemCount-1;break;case"PageDown":this.focusIndex=this.normalizeIndex(this.focusIndex+this._visibleItemsNum-1);break;case"Home":this.focusIndex=0;break;case"PageUp":this.focusIndex=this.normalizeIndex(this.focusIndex-this._visibleItemsNum+1);break;default:e=!1;break}e&&(i.preventDefault(),i.stopPropagation())},this._resizeObserver=new ResizeObserver(()=>{this._lastKnownHeight!==this.offsetHeight&&(this._lastKnownHeight=this.offsetHeight,this.requestUpdate())})}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(i){this.toggleAttribute("focus-target",i)}get focusIndex(){return this._focusIndex}set focusIndex(i){if(i>=-1&&i<this.itemCount){const e=this._focusIndex;this._focusIndex=i,(i<=this._firstVisibleIndex||this._lastVisibleIndex<=i)&&this.scrollToItem(i),e!=i&&(i==-1&&this.removeAttribute("aria-activedescendant"),this.requestUpdate("focusIndex",e))}}get selectedIndices(){return this._selectedIndices}set selectedIndices(i){i?this._selectedIndices=i.map(e=>Number(e)):this._selectedIndices=[],this.requestUpdate("selectedIndices")}scrollToItem(i,e="auto"){this.scrollTop=Cl.getOffsetForIndexAndAlignment(this.normalizeIndex(i),e,this.scrollTop,this.itemHeight,this.height,this.itemCount),this._lastKnownScrollTop=this.scrollTop}getListItem(i){return!this.shadowRoot||i<this._firstVisibleIndex||this._lastVisibleIndex<i?null:this.querySelector(`[item-index="${i}"]`)}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this),this.scrollTop!==this._lastKnownScrollTop&&(this.scrollTop=this._lastKnownScrollTop,this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.disconnect()}firstUpdated(i){super.firstUpdated(i),this.addEventListener("scroll",this.onScroll),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick),this.addEventListener("mousedown",e=>{e.button==1&&e.preventDefault()}),this.addEventListener("auxclick",this.handleClick),this.addEventListener("focus",()=>{this.matches(":focus-visible")&&(this.focusIndex==-1?(this.selectedIndices&&(this.focusIndex=this.selectedIndices[0]),this.focusIndex==-1&&this.itemCount>0&&(this.focusIndex=0)):this.updateFocusedItemAttributes())}),this.addEventListener("blur",()=>{this.focusIndex!=-1&&this.updateFocusedItemAttributes()}),this.selectedIndices.length>0&&this.scrollToItem(this.selectedIndices[0],"center")}updateFocusedItemAttributes(){const i=this.getListItem(this.focusIndex);i&&(this.focusTarget||document.activeElement==this?(i.setAttribute("focused",""),this.setAttribute("aria-activedescendant",i.id)):(i.removeAttribute("focused"),this.removeAttribute("aria-activedescendant")))}static get styles(){return[_n`
555
+ ${Ze(Il)}
556
+ `]}render(){return this.updateItemsRenderData(),Z`
557
+ <div class="container" style="height: ${this.itemCount*this.itemHeight}px">
558
+ <slot name="items"></slot>
559
+ </div>
560
+ `}updated(i){if(super.updated(i),this._lastRenderedScrollTop=this._lastKnownScrollTop,this.updateItems(),(this._increaseWidthOnNextRenderIfNeeded||this._reachedMaxWidth)&&this._firstVisibleIndex<this._lastVisibleIndex)if(this.querySelector("[item-index]"))this.adjustWidthIfNeeded();else{const e=new MutationObserver(()=>{this.adjustWidthIfNeeded(),e.disconnect()});e.observe(this)}}adjustWidthIfNeeded(){this._increaseWidthOnNextRenderIfNeeded?(this._increaseWidthOnNextRenderIfNeeded=!1,window.requestAnimationFrame(()=>{const i=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(i==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;const e=[...this.querySelectorAll("[item-index]")].map(n=>{if(n instanceof rt){n.enableLineClamp=!1;const s=n.missingWidthForTexts;return s>i&&(n.enableLineClamp=!0),s}}),t=Math.max(...e);t>0&&(this.style.width=`${this.offsetWidth+t}px`)}})):this._reachedMaxWidth&&this.enableLineClampOnItemsIfNeeded()}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[item-index]").forEach(i=>{i instanceof rt&&(i.enableLineClamp=i.enableLineClamp||i.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){const i=[...this.querySelectorAll("[item-index]")],e=new Map,t=document.createDocumentFragment();for(const n of this._itemsRenderData){const s=this.renderItem(n);s.parentElement||t.appendChild(s),e.set(n.dataHash,s);const r=i.indexOf(s);r!==-1&&i.splice(r,1)}this.appendChild(t);for(const n of i)n instanceof rt&&(n.enableLineClamp=!1),this.removeChild(n);e.forEach((n,s)=>{this._elementCache.set(s,n)})}renderItem({index:i,top:e,dataHash:t,data:n}){let s;return n?this._elementCache.has(t)?(s=this._elementCache.get(t),this._elementCache.delete(t)):(s=this.itemGenerator(n,i),s.setAttribute("slot","items")):(s=document.createElement("div"),s.setAttribute("placeholder-item",""),s.setAttribute("slot","items")),Object.assign(s.style,{transform:`translateY(${e}px)`,height:`${this.itemHeight}px`}),s.setAttribute("item-index",i.toString()),s.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),s.setAttribute("aria-posinset",String(i+1)),(!s.id||s.id.startsWith(this.id+"_item_"))&&(s.id=this.id+"_item_"+i),this.itemCount-1==i?s.setAttribute("last",""):s.removeAttribute("last"),this.updateSelectedAttribute(i,s),this.updateFocusedAttribute(i,s),s}updateFocusedAttribute(i,e){this.focusIndex==i&&(this.focusTarget||document.activeElement==this)?(e.setAttribute("focused",""),this.setAttribute("aria-activedescendant",e.id)):e.removeAttribute("focused")}updateSelectedAttribute(i,e){const t=this.selectedIndices.indexOf(i)!==-1;t?e.setAttribute("selected",""):e.removeAttribute("selected"),e.setAttribute("aria-selected",String(t))}updateItemsRenderData(){if(this._itemsRenderData=[],this._visibleItemsNum=Math.min(Math.ceil(this.height/this.itemHeight),this.itemCount),this._visibleItemsNum>0){this._firstVisibleIndex=this.normalizeIndex(Math.floor(this._lastKnownScrollTop/this.itemHeight)),this._lastVisibleIndex=this.normalizeIndex(this._firstVisibleIndex+this._visibleItemsNum);const i=this.normalizeIndex(this._firstVisibleIndex-2),e=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(i,e);for(let t=i;t<=e;t++){const n=t-i,s=this.items[n];let r;s?r=JSON.stringify(s):r=`placeholder-${n}`,this._itemsRenderData.push({index:t,top:this.itemHeight*t,physicalIndex:n,dataHash:r,data:s})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(i){return Math.max(0,Math.min(i,this.itemCount-1))}get height(){return this.offsetHeight}requestData(i,e){!Number.isNaN(i)&&!Number.isNaN(e)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:i,stopIndex:e}}))}handleSelection(i,e){if(i<0||this.itemCount<=i)return;const t=i%this._visibleItemsNum,n=this.items[t];if(!n||n.disabled)return;let s=!0;if(this.selectionType!=="trigger-only"){const r=this.selectedIndices.indexOf(i);s=r==-1,s?this.selectionType==="single"?this.selectedIndices=[i]:this.selectedIndices.push(i):this.selectedIndices.splice(r,1),this.requestUpdate("selectedIndices")}this.focusIndex=i,this.dispatchSelectionEvent(i,s,e)}dispatchSelectionEvent(i,e,t){this.dispatchEvent(new CustomEvent("selection",{detail:{index:i,selected:e,hasModifier:t}}))}handleClick(i){const e=i.composedPath().find(t=>t.hasAttribute&&t.hasAttribute("item-index"));if(e){const t=parseInt(e.getAttribute("item-index"));if(Number.isInteger(t)){if(i.button==0||i.button==1){const n=i.type=="auxclick"&&i.button==1||i.metaKey||i.ctrlKey;this.handleSelection(t,n)}this.focusIndex=t}}}},Re.ID="sd-virtual-list",Re.ensureDefined=()=>{rt.ensureDefined(),customElements.get(Re.ID)||customElements.define(Re.ID,Re)},Re);Ne([b({type:Number,attribute:"item-height",reflect:!0})],Te.prototype,"itemHeight",2);Ne([b({type:Number})],Te.prototype,"itemCount",2);Ne([b({type:Array,attribute:!1})],Te.prototype,"items",2);Ne([b({type:String,attribute:"selection-type",reflect:!0,noAccessor:!0})],Te.prototype,"selectionType",2);Ne([b({type:String,attribute:!0,reflect:!0})],Te.prototype,"id",2);Ne([b({type:String,reflect:!0})],Te.prototype,"role",2);Ne([b({type:Number,attribute:"focus-index",reflect:!0})],Te.prototype,"focusIndex",1);Ne([b({type:Array,attribute:!1})],Te.prototype,"selectedIndices",1);let ti=Te;ti.ensureDefined();let Rl=class rr{constructor(e,t){this.eventTarget=e,this.keydownHandler=t,this.catchedKeys=["Down","ArrowDown","Up","ArrowUp","Enter"],this.markAsFocusTargetHandler=()=>this.eventTarget.setAttribute("focus-target",""),this.unmarkAsFocusTargetHandler=()=>this.eventTarget.removeAttribute("focus-target"),this.delegateKeyDownEvent=n=>{if(this.catchedKeys.indexOf(n.key)!==-1){const s=n.key.toLocaleLowerCase();let r=0;const o=s.includes("enter");o||(r=s.includes("down")?1:-1),this.keydownHandler(n,r,o),n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}}}static delegateTo(e){return new rr(e,t=>e.dispatchEvent(new KeyboardEvent(t.type,t)))}connect(e){var t,n;if(e!=null){e.addEventListener("keydown",this.delegateKeyDownEvent),e.addEventListener("focus",this.markAsFocusTargetHandler),e.addEventListener("blur",this.unmarkAsFocusTargetHandler);const s=document.activeElement;(e.contains(s)||(n=(t=e.shadowRoot)==null?void 0:t.activeElement)!=null&&n.contains(s))&&this.markAsFocusTargetHandler()}}disconnect(e){e!=null&&(e.removeEventListener("keydown",this.delegateKeyDownEvent),e.removeEventListener("focus",this.markAsFocusTargetHandler),e.removeEventListener("blur",this.unmarkAsFocusTargetHandler),this.unmarkAsFocusTargetHandler())}};class Pl{constructor(e,t,n,s){this.inputElement=e,this.notSelectedTokensProvider=t,this.initializeCallback=s,this.filter=(r,o)=>r?o.filter(a=>a.disabled||a.deactivated?!1:a.caption&&a.caption.toLowerCase().includes(r)):o,ti.ensureDefined(),this._tokenList=new ti,this._tokenList.style.minWidth="250px",this._tokenList.style.maxHeight="49vh",this._tokenList.itemHeight=50,this._tokenList.addEventListener("selection",r=>{const o=r.detail.index,a=this._suggestItems[o];n(a),this.hide()}),this._tokenList.addEventListener("data-request",r=>{this.lastRequestedStartIndex=r.detail.startIndex,this.lastRequestedStopIndex=r.detail.stopIndex,this._tokenList.items=this._suggestItems.slice(this.lastRequestedStartIndex,this.lastRequestedStopIndex+1)}),new Rl(this._tokenList,(r,o,a)=>{this._tokenList.dispatchEvent(new KeyboardEvent(r.type,r)),!a&&!this.isOpened&&this.show()}).connect(e)}show(){this.inputElement.effectiveDisabled||(this.popover,this._suggestItems=this.filterItems((this.inputElement.value||"").toLowerCase()),this._suggestItems.length==0?this.hide():(this._tokenList.itemCount=this._suggestItems.length,this._tokenList.focusIndex=-1,requestAnimationFrame(()=>{this.lastRequestedStartIndex!=null&&(this._tokenList.items=this._suggestItems.slice(this.lastRequestedStartIndex,this.lastRequestedStopIndex+1))}),Object.assign(this._tokenList.style,{minWidth:`${Math.max(this.popover.targetElement.offsetWidth,250)}px`}),this.popover.show()))}refreshItems(){this.isOpened&&(this._suggestItems=this.filterItems((this.inputElement.value||"").toLowerCase()),this._suggestItems.length==0?this.hide():(this._tokenList.itemCount=this._suggestItems.length,this._tokenList.items=[]))}filterItems(e){const t=this.notSelectedTokensProvider();return this.filter(e,t)}hide(){var e;this._suggestItems=[],this._tokenList.itemCount=0,this._tokenList.items=[],(e=this._popover)==null||e.hide()}get list(){return this._tokenList}get popover(){return this._popover||(this._popover=this.createPopover(),this.initializeCallback(this)),this._popover}createPopover(){const e=new hn;return e.setAttribute("trigger-type","manual"),e.setAttribute("placement","bottom-start"),e.setAttribute("modal",""),e.setAttribute("popover-for","token-autosuggest-popover"),e.setAttribute("offset","-2"),e.targetElement=this.inputElement,e.appendChild(this._tokenList),e}get isOpened(){return this._popover&&this._popover.hasAttribute("open")}get focusedSuggestToken(){return this._suggestItems[this._tokenList.focusIndex]}}class ni extends vn{}ni.directiveName="unsafeSVG",ni.resultType=2;const Ml=Vs(ni),Dl=":host{flex-shrink:0;max-width:100%}.container{display:flex;height:28px;background-color:var(--token-background-color, #f3f3f3);border:var(--token-border);box-sizing:border-box}.container .icon-wrapper{display:flex;flex-shrink:0;justify-content:center;align-items:center;width:28px;height:100%;overflow:hidden;background-color:var(--token-icon-background-color, transparent)}.container .icon-wrapper .icon{height:100%;width:100%;object-fit:contain;background-size:cover;background-repeat:no-repeat;background-position:center}.container .value{display:inline-block;align-self:center;padding:0 8px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container .delete-button-wrapper{display:flex;align-self:center;height:16px;width:16px;padding-right:8px;opacity:.5}.container .delete-button-wrapper:hover{cursor:pointer;filter:brightness(10%);opacity:1}",Nl=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">\r
578
561
  <path d="m3.5 12.5 9-9m-9 0 9 9" style="fill:none;stroke:#333;stroke-linecap:square;stroke-width:1.1px"/>\r
579
- </svg>`;var Dl=Object.defineProperty,Nl=Object.getOwnPropertyDescriptor,Me=(i,e,t,n)=>{for(var s=n>1?void 0:n?Nl(e,t):e,o=i.length-1,r;o>=0;o--)(r=i[o])&&(s=(n?r(e,t,s):r(s))||s);return n&&s&&Dl(e,t,s),s};const Oi={fromAttribute:i=>i=="true",toAttribute:i=>i};var Ce;const Te=(Ce=class extends be{constructor(){super(...arguments),this.value="",this.type="",this.icon="",this.iconPlaceholder="",this.iconBackgroundColor="",this._checked=!1}static get styles(){return ht(Rl)}set checked(e){const t=this._checked;this._checked=!this.disabled&&e,this.requestUpdate("checked",t)}get checked(){return this._checked}firstUpdated(e){super.firstUpdated(e),this.tabIndex=-1,this.setAttribute("role","option"),this.setAttribute("aria-selected","true"),this.addEventListener("click",n=>{n.stopPropagation(),n.getModifierState("Control")?this.checked=!this.checked:(this.checked=!0,this._tokenClickHandler&&this._tokenClickHandler(this.index))});const t=this.shadowRoot.querySelector(".delete-button-wrapper");t&&t.addEventListener("click",n=>{n.stopPropagation(),this._tokenDeleteHandler&&this._tokenDeleteHandler(this.index)})}render(){return X`
562
+ </svg>`;var jl=Object.defineProperty,Bl=Object.getOwnPropertyDescriptor,je=(i,e,t,n)=>{for(var s=n>1?void 0:n?Bl(e,t):e,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=(n?o(e,t,s):o(s))||s);return n&&s&&jl(e,t,s),s};const Ii={fromAttribute:i=>i=="true",toAttribute:i=>i};var Ce;const Le=(Ce=class extends ue{constructor(){super(...arguments),this.value="",this.type="",this.icon="",this.iconPlaceholder="",this.iconBackgroundColor="",this._checked=!1}static get styles(){return Ze(Dl)}set checked(e){const t=this._checked;this._checked=!this.disabled&&e,this.requestUpdate("checked",t)}get checked(){return this._checked}firstUpdated(e){super.firstUpdated(e),this.tabIndex=-1,this.setAttribute("role","option"),this.setAttribute("aria-selected","true"),this.addEventListener("click",n=>{n.stopPropagation(),n.getModifierState("Control")?this.checked=!this.checked:(this.checked=!0,this._tokenClickHandler&&this._tokenClickHandler(this.index))});const t=this.shadowRoot.querySelector(".delete-button-wrapper");t&&t.addEventListener("click",n=>{n.stopPropagation(),this._tokenDeleteHandler&&this._tokenDeleteHandler(this.index)})}render(){return Z`
580
563
  <div class="container">
581
564
  <slot name="before-icon"></slot>
582
565
  ${this.renderIcon()}
583
566
  <slot name="after-icon"></slot>
584
567
  <div class="value">${this.value}</div>
585
- ${this.disabled?z:X` <div class="delete-button-wrapper">${Pl(Ml)}</div> `}
568
+ ${this.disabled?z:Z` <div class="delete-button-wrapper">${Ml(Nl)}</div> `}
586
569
  </div>
587
- `}renderIcon(){if(this.icon||this.iconPlaceholder){const e=this.iconBackgroundColor!=null?`--token-icon-background-color: ${this.iconBackgroundColor}`:void 0;return X`
570
+ `}renderIcon(){if(this.icon||this.iconPlaceholder){const e=this.iconBackgroundColor!=null?`--token-icon-background-color: ${this.iconBackgroundColor}`:void 0;return Z`
588
571
  <div class="icon-wrapper" style="${le(e)}" role="img">
589
572
  <div class="icon"></div>
590
573
  </div>
591
- `}return z}updated(e){super.updated(e),(e.has("icon")||e.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&Gs.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),e.has("disabled")&&!this.disabled&&this.checked&&(this.checked=!1)}setClickHandler(e){this._tokenClickHandler=e}setDeleteHandler(e){this._tokenDeleteHandler=e}},Ce.ID="sd-token",Ce.ensureDefined=()=>{customElements.get(Ce.ID)||customElements.define(Ce.ID,Ce)},Ce);Me([y({type:String,attribute:!0,reflect:!0})],Te.prototype,"value",2);Me([y({type:String,attribute:!0,reflect:!0})],Te.prototype,"type",2);Me([y({type:String})],Te.prototype,"icon",2);Me([y({type:String})],Te.prototype,"iconPlaceholder",2);Me([y({type:String})],Te.prototype,"iconBackgroundColor",2);Me([y({converter:Oi,reflect:!0,attribute:"aria-disabled"})],Te.prototype,"disabled",2);Me([y({converter:Oi,reflect:!0,attribute:"aria-current"})],Te.prototype,"current",2);Me([y({converter:Oi,reflect:!0,attribute:"aria-checked"})],Te.prototype,"checked",1);let An=Te;const jl=(i,e)=>{const t=document.createElement(An.ID);return i&&(t.value=i.caption,t.type=i.type,t.icon=i.icon,t.iconPlaceholder=i.iconPlaceholder,t.iconBackgroundColor=i.iconBackgroundColor,t.disabled=i.disabled,t.index=e),t};An.ensureDefined();const Kt="web application/json";class Bl{constructor(e,t,n){navigator.clipboard&&(e.addEventListener("copy",()=>{t()||this.writeToClipboard(e)}),e.addEventListener("cut",()=>{t()||(e.removeSelectionOrActiveToken(),this.writeToClipboard(e))}),e.addEventListener("paste",()=>{e.disabled||this.readFromClipboard(n)}))}writeToClipboard(e){const t=e.querySelectorAll("[slot='items'][aria-checked='true']"),n=[];if(t.length>0)t.forEach(s=>n.push(s.index));else if(e.activeTokenIndex!=-1){const s=e.activeTokenElement;s&&n.push(s.index)}if(n.length>0){const s=JSON.stringify(n.map(r=>e.items[r])),o=new Blob([s],{type:Kt});navigator.clipboard.write([new ClipboardItem({[Kt]:o})])}}async readFromClipboard(e){const t=await navigator.clipboard.read();for(const n of t)if(n.types.includes(Kt)){const o=await(await n.getType(Kt)).text(),r=JSON.parse(o);Array.isArray(r)&&e(r)}}}const zl=":host{display:flex;contain:layout style}:host .additonal-content::slotted(*){align-self:end;flex-shrink:0}:host([drop]) ::slotted(*){pointer-events:none}:host(:not([readonly])) ::slotted(sd-token:last-of-type){margin-right:24px;margin-bottom:4px}.container{display:flex;flex-wrap:wrap;gap:8px;flex-grow:1;min-width:0;margin-top:auto}.container .placeholder{color:#767676;line-height:24px;align-self:flex-end}.input{flex-grow:1;min-width:0;width:100%;margin-top:auto}.input .token-wrapper{display:flex;flex-wrap:wrap;flex:1 0 auto;width:100%;gap:8px}";class Ul{constructor(e,t){this.tokenSelector=e;const n=new Map,s=o=>{const r=o.target;if(!e.contains(r)){const a=o.addedIndexes;a&&e.removeTokens(a.map(l=>n.get(l)))}n.clear()};e.addEventListener("dragstart",o=>{const r=o.target;if(r instanceof An){if(r.disabled){o.preventDefault();return}r.setAttribute("aria-checked","true");const a=e.querySelectorAll("[slot='items'][aria-checked='true']");if(a.length>0){const l=Array.from(a).filter(c=>!c.disabled).map((c,d)=>(n.set(d,c.index),e.items[c.index]));if(o.dataTransfer.setData("text/sd-token-selector",JSON.stringify(l)),o.dataTransfer.dropEffect="move",o.dataTransfer.effectAllowed="move",a.length>1){const c=this.createCustomDragImage(r,l.length);o.dataTransfer.setDragImage(c,-14,-14)}window.addEventListener("drop",s,{once:!0})}}}),e.addEventListener("dragenter",o=>{e.setAttribute("drop",""),o.preventDefault()}),e.addEventListener("dragover",o=>o.preventDefault()),e.addEventListener("dragleave",o=>{o.target==e&&e.removeAttribute("drop")}),e.addEventListener("drop",o=>{e.removeAttribute("drop");const r=o.dataTransfer.getData("text/sd-token-selector");if(r)try{const a=JSON.parse(r);Array.isArray(a)&&(o.addedIndexes=t(a),o.preventDefault())}catch{}}),e.addEventListener("dragend",()=>{window.removeEventListener("drop",s),n.clear()})}createCustomDragImage(e,t){let n=e.cloneNode(!0);if(n.setAttribute("aria-disabled","true"),this.tokenSelector.tokenType)n.value=t+" "+this.tokenSelector.tokenType;else{const s=document.createElement("div");s.innerText="+"+(t-1),Object.assign(s.style,{position:"absolute",left:"90%",top:"75%"});const o=document.createElement("div");o.appendChild(n),o.appendChild(s),n=o}return Object.assign(n.style,{height:e.offsetHeight,outline:"none",maxWidth:"500px",position:"absolute",display:"block",left:"-99999px",overflow:"visible",margin:"1px"}),n.slot="items",this.tokenSelector.appendChild(n),requestAnimationFrame(()=>n.remove()),n}}var Fl=Object.defineProperty,Hl=Object.getOwnPropertyDescriptor,fe=(i,e,t,n)=>{for(var s=n>1?void 0:n?Hl(e,t):e,o=i.length-1,r;o>=0;o--)(r=i[o])&&(s=(n?r(e,t,s):r(s))||s);return n&&s&&Fl(e,t,s),s};function Wl(i,e){let t;return function(...n){t!=null&&clearTimeout(t),t=window.setTimeout(()=>i(...n),e)}}var Se;const de=(Se=class extends be{constructor(){super(...arguments),this.selectionMode="multi",this.items=[],this.selectedIndexes=[],this._tokenGenerator=jl,this._autoSuggestItemGenerator=Ks,this.additionalTokenCommittingKeys=[],this._activeTokenIndex=-1,this.handleInputKeyDown=(e,t)=>{if((e.key==="Enter"||this.additionalTokenCommittingKeys.includes(e.key))&&t.value){e.preventDefault(),e.stopPropagation(),this.commitTokenValue(t.value);return}switch(e.key){case"Escape":{e.preventDefault(),e.stopPropagation(),this.tokenSuggestPopover.hide();break}case"Tab":{this.commitTokenValue(t.value),this.tokenSuggestPopover.hide();break}default:this.handleKeyDown(e)}},this.handleKeyDown=e=>{switch(e.key){case"ArrowLeft":{this.hasInputValue||this.updateActiveToken(-1);break}case"ArrowRight":{this.hasInputValue||this.updateActiveToken(1);break}case"Enter":{if(!this.hasInputValue&&this.activeTokenIndex!=-1){const t=this.activeTokenElement;e.getModifierState("Control")?t.checked=!t.checked:(t.checked=!0,this.onTokenClick(t,!1)),document.activeElement!=this&&this.focus()}break}case"Backspace":{this.hasInputValue||(this.activeTokenIndex==-1?this.updateActiveToken(-1):this.removeSelectionOrActiveToken());break}case"Clear":case"Delete":{this.removeSelectionOrActiveToken();break}case"a":{!this.hasInputValue&&e.getModifierState("Control")&&(this.querySelectorAll("[slot='items']").forEach(t=>t.checked=!0),e.preventDefault(),e.stopPropagation());break}}},this.handleWindowPointerDown=e=>{const t=this.inputElement;if(!t||!t.value)return;e.composedPath().some(s=>{if(s instanceof HTMLElement&&(e.composedPath().indexOf(t)>-1||s.getAttribute("popover-for")==="token-autosuggest-popover"))return!0})||this.commitTokenValue(t.value)},this.debouncedShowTokenSuggestPopover=Wl(this.showFilteredTokenSuggestions.bind(this),200)}static get styles(){return ht(zl)}get tokenGenerator(){return this._tokenGenerator}set tokenGenerator(e){this._tokenGenerator=e,this.render()}get autoSuggestItemGenerator(){return this._autoSuggestItemGenerator}set autoSuggestItemGenerator(e){this._autoSuggestItemGenerator=e,this._tokenSuggestPopover&&(this._tokenSuggestPopover.list.itemGenerator=e)}setAdditionalTokenCommittingKeys(e){this.additionalTokenCommittingKeys=e}openSuggestions(){this.inputElement&&(this.focus(),this.tokenSuggestPopover.show())}focus(){this.inputElement?this.inputElement.focus():this.shadowRoot.querySelector(".container").focus()}render(){return this.selectionMode=="remove-only"?X`<div class="container" tabindex="0">
574
+ `}return z}updated(e){super.updated(e),(e.has("icon")||e.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&Gs.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),e.has("disabled")&&!this.disabled&&this.checked&&(this.checked=!1)}setClickHandler(e){this._tokenClickHandler=e}setDeleteHandler(e){this._tokenDeleteHandler=e}},Ce.ID="sd-token",Ce.ensureDefined=()=>{customElements.get(Ce.ID)||customElements.define(Ce.ID,Ce)},Ce);je([b({type:String,attribute:!0,reflect:!0})],Le.prototype,"value",2);je([b({type:String,attribute:!0,reflect:!0})],Le.prototype,"type",2);je([b({type:String})],Le.prototype,"icon",2);je([b({type:String})],Le.prototype,"iconPlaceholder",2);je([b({type:String})],Le.prototype,"iconBackgroundColor",2);je([b({converter:Ii,reflect:!0,attribute:"aria-disabled"})],Le.prototype,"disabled",2);je([b({converter:Ii,reflect:!0,attribute:"aria-current"})],Le.prototype,"current",2);je([b({converter:Ii,reflect:!0,attribute:"aria-checked"})],Le.prototype,"checked",1);let Cn=Le;const zl=(i,e)=>{const t=document.createElement(Cn.ID);return i&&(t.value=i.caption,t.type=i.type,t.icon=i.icon,t.iconPlaceholder=i.iconPlaceholder,t.iconBackgroundColor=i.iconBackgroundColor,t.disabled=i.disabled,t.index=e),t};Cn.ensureDefined();const Xt="web application/json";class Ul{constructor(e,t,n){navigator.clipboard&&(e.addEventListener("copy",()=>{t()||this.writeToClipboard(e)}),e.addEventListener("cut",()=>{t()||(e.removeSelectionOrActiveToken(),this.writeToClipboard(e))}),e.addEventListener("paste",()=>{e.disabled||this.readFromClipboard(n)}))}writeToClipboard(e){const t=e.querySelectorAll("[slot='items'][aria-checked='true']"),n=[];if(t.length>0)t.forEach(s=>n.push(s.index));else if(e.activeTokenIndex!=-1){const s=e.activeTokenElement;s&&n.push(s.index)}if(n.length>0){const s=JSON.stringify(n.map(o=>e.items[o])),r=new Blob([s],{type:Xt});navigator.clipboard.write([new ClipboardItem({[Xt]:r})])}}async readFromClipboard(e){const t=await navigator.clipboard.read();for(const n of t)if(n.types.includes(Xt)){const r=await(await n.getType(Xt)).text(),o=JSON.parse(r);Array.isArray(o)&&e(o)}}}const Hl=":host{display:flex;contain:layout style}:host .additonal-content::slotted(*){align-self:end;flex-shrink:0}:host([drop]) ::slotted(*){pointer-events:none}:host(:not([readonly])) ::slotted(sd-token:last-of-type){margin-right:24px;margin-bottom:4px}.container{display:flex;flex-wrap:wrap;gap:8px;flex-grow:1;min-width:0;margin-top:auto}.container .placeholder{color:#767676;line-height:24px;align-self:flex-end}.input{flex-grow:1;min-width:0;width:100%;margin-top:auto}.input .token-wrapper{display:flex;flex-wrap:wrap;flex:1 0 auto;width:100%;gap:8px}";class Fl{constructor(e,t){this.tokenSelector=e;const n=new Map,s=r=>{const o=r.target;if(!e.contains(o)){const a=r.addedIndexes;a&&e.removeTokens(a.map(l=>n.get(l)))}n.clear()};e.addEventListener("dragstart",r=>{const o=r.target;if(o instanceof Cn){if(o.disabled){r.preventDefault();return}o.setAttribute("aria-checked","true");const a=e.querySelectorAll("[slot='items'][aria-checked='true']");if(a.length>0){const l=Array.from(a).filter(c=>!c.disabled).map((c,d)=>(n.set(d,c.index),e.items[c.index]));if(r.dataTransfer.setData("text/sd-token-selector",JSON.stringify(l)),r.dataTransfer.dropEffect="move",r.dataTransfer.effectAllowed="move",a.length>1){const c=this.createCustomDragImage(o,l.length);r.dataTransfer.setDragImage(c,-14,-14)}window.addEventListener("drop",s,{once:!0})}}}),e.addEventListener("dragenter",r=>{e.setAttribute("drop",""),r.preventDefault()}),e.addEventListener("dragover",r=>r.preventDefault()),e.addEventListener("dragleave",r=>{r.target==e&&e.removeAttribute("drop")}),e.addEventListener("drop",r=>{e.removeAttribute("drop");const o=r.dataTransfer.getData("text/sd-token-selector");if(o)try{const a=JSON.parse(o);Array.isArray(a)&&(r.addedIndexes=t(a),r.preventDefault())}catch{}}),e.addEventListener("dragend",()=>{window.removeEventListener("drop",s),n.clear()})}createCustomDragImage(e,t){let n=e.cloneNode(!0);if(n.setAttribute("aria-disabled","true"),this.tokenSelector.tokenType)n.value=t+" "+this.tokenSelector.tokenType;else{const s=document.createElement("div");s.innerText="+"+(t-1),Object.assign(s.style,{position:"absolute",left:"90%",top:"75%"});const r=document.createElement("div");r.appendChild(n),r.appendChild(s),n=r}return Object.assign(n.style,{height:e.offsetHeight,outline:"none",maxWidth:"500px",position:"absolute",display:"block",left:"-99999px",overflow:"visible",margin:"1px"}),n.slot="items",this.tokenSelector.appendChild(n),requestAnimationFrame(()=>n.remove()),n}}var Wl=Object.defineProperty,ql=Object.getOwnPropertyDescriptor,ge=(i,e,t,n)=>{for(var s=n>1?void 0:n?ql(e,t):e,r=i.length-1,o;r>=0;r--)(o=i[r])&&(s=(n?o(e,t,s):o(s))||s);return n&&s&&Wl(e,t,s),s};function Vl(i,e){let t;return function(...n){t!=null&&clearTimeout(t),t=window.setTimeout(()=>i(...n),e)}}var Se;const de=(Se=class extends ue{constructor(){super(...arguments),this.selectionMode="multi",this.items=[],this.selectedIndexes=[],this._tokenGenerator=zl,this._autoSuggestItemGenerator=Ks,this.additionalTokenCommittingKeys=[],this._activeTokenIndex=-1,this.handleInputKeyDown=(e,t)=>{if((e.key==="Enter"||this.additionalTokenCommittingKeys.includes(e.key))&&t.value){e.preventDefault(),e.stopPropagation(),this.commitTokenValue(t.value);return}switch(e.key){case"Escape":{e.preventDefault(),e.stopPropagation(),this.tokenSuggestPopover.hide();break}case"Tab":{this.commitTokenValue(t.value),this.tokenSuggestPopover.hide();break}default:this.handleKeyDown(e)}},this.handleKeyDown=e=>{switch(e.key){case"ArrowLeft":{this.hasInputValue||this.updateActiveToken(-1);break}case"ArrowRight":{this.hasInputValue||this.updateActiveToken(1);break}case"Enter":{if(!this.hasInputValue&&this.activeTokenIndex!=-1){const t=this.activeTokenElement;e.getModifierState("Control")?t.checked=!t.checked:(t.checked=!0,this.onTokenClick(t,!1)),document.activeElement!=this&&this.focus()}break}case"Backspace":{this.hasInputValue||(this.activeTokenIndex==-1?this.updateActiveToken(-1):this.removeSelectionOrActiveToken());break}case"Clear":case"Delete":{this.removeSelectionOrActiveToken();break}case"a":{!this.hasInputValue&&e.getModifierState("Control")&&(this.querySelectorAll("[slot='items']").forEach(t=>t.checked=!0),e.preventDefault(),e.stopPropagation());break}}},this.handleWindowPointerDown=e=>{const t=this.inputElement;if(!t||!t.value)return;e.composedPath().some(s=>{if(s instanceof HTMLElement&&(e.composedPath().indexOf(t)>-1||s.getAttribute("popover-for")==="token-autosuggest-popover"))return!0})||this.commitTokenValue(t.value)},this.debouncedShowTokenSuggestPopover=Vl(this.showFilteredTokenSuggestions.bind(this),200)}static get styles(){return Ze(Hl)}get tokenGenerator(){return this._tokenGenerator}set tokenGenerator(e){this._tokenGenerator=e,this.render()}get autoSuggestItemGenerator(){return this._autoSuggestItemGenerator}set autoSuggestItemGenerator(e){this._autoSuggestItemGenerator=e,this._tokenSuggestPopover&&(this._tokenSuggestPopover.list.itemGenerator=e)}setAdditionalTokenCommittingKeys(e){this.additionalTokenCommittingKeys=e}openSuggestions(){this.inputElement&&(this.focus(),this.tokenSuggestPopover.show())}focus(){this.inputElement?this.inputElement.focus():this.shadowRoot.querySelector(".container").focus()}render(){return this.selectionMode=="remove-only"?Z`<div class="container" tabindex="0">
592
575
  <slot name="items"
593
- >${this.placeholder?X`<span part="remove-only-placeholder" class="placeholder"
576
+ >${this.placeholder?Z`<span part="remove-only-placeholder" class="placeholder"
594
577
  >${this.placeholder}</span
595
578
  >`:z}</slot
596
579
  >
597
580
  </div>
598
- <slot class="additonal-content" name="additional-content"></slot>`:X`
581
+ <slot class="additonal-content" name="additional-content"></slot>`:Z`
599
582
  <sd-lit-input
600
583
  class="input"
601
584
  .extendedPrefix=${!0}
@@ -610,35 +593,35 @@ export function getItems(): ExtendedTokenData[] {
610
593
  ><div class="token-wrapper" slot="prefix"><slot name="items"></slot></div>
611
594
  </sd-lit-input>
612
595
  <slot class="additonal-content" name="additional-content"></slot>
613
- `}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","listbox"),this.setAttribute("aria-multiselectable","true"),this.hasAttribute("tabIndex")||(this.tabIndex=0),this.addEventListener("focusout",t=>{const n=t.relatedTarget;!this.contains(n)&&!this.shadowRoot.contains(n)&&this.querySelectorAll("[slot='items'][aria-checked='true']").forEach(s=>s.checked=!1)}),new Bl(this,()=>{var t;return(t=this.inputElement)==null?void 0:t.value},t=>this.addMatchingItems(t)),new Ul(this,t=>this.addMatchingItems(t))}addMatchingItems(e){const t=[],n=e.map((s,o)=>{const r=s.caption==null?-1:this.findIndex(s);return r!=-1&&!this.items[r].disabled&&!this.selectedIndexes.includes(r)?(t.push(o),r):-1}).filter(s=>s!=-1);return n.length>0&&this.handleTokenSelection(n),t}removeSelectionOrActiveToken(){if(!this.disabled){const e=this.querySelectorAll("[slot='items'][aria-checked='true']");if(e.length>0){const t=Array.from(e);this.removeTokens(t.filter(n=>!n.disabled).map(n=>n.index))}else if(this.activeTokenIndex!=-1){const t=this.activeTokenElement;t&&!t.disabled&&this.removeTokens([t.index])}}}updateActiveToken(e){const t=this.querySelectorAll("[slot='items']").length-1;this.activeTokenIndex==-1?e<0&&(this.activeTokenIndex=t):this.activeTokenIndex==t&&e>0?(this.activeTokenIndex=-1,this.focus()):this.activeTokenIndex=Math.max(0,Math.min(t,this.activeTokenIndex+e))}commitTokenValue(e){if(this.disabled)return;if(this.tokenSuggestPopover.isOpened){const n=this.tokenSuggestPopover.focusedSuggestToken;if(n){if(!n.disabled){const s=this.findIndex(n);this.handleTokenSelection([s]),this.tokenSuggestPopover.hide()}return}}if(!(e!=null&&e.trim()))return;const t=this.items.findIndex(n=>this.caseSensitive?n.caption==e:n.caption.toLowerCase()==e.toLowerCase());this.selectedIndexes.includes(t)||(t>=0?this.handleTokenSelection([t]):this.handleTokenCreation(e)),this.requestUpdate("selectedIndexes"),this.tokenSuggestPopover.hide(),window.removeEventListener("pointerdown",this.handleWindowPointerDown)}updated(e){if(super.updated(e),this._tokenSuggestPopover&&(this.tokenSuggestPopover.list.className=this.suggestListClass||"",this.suggestionFilter&&(this.tokenSuggestPopover.filter=this.suggestionFilter)),e.has("selectionMode"))if(this.selectionMode=="multi"){this.setAttribute("aria-haspopup","listbox");const t=this.inputElement;t.addEventListener("immediate-value-change",n=>this.handleInputValueChange(n)),t.addEventListener("keydown",n=>this.handleInputKeyDown(n,t)),window.queueMicrotask(()=>this.tokenSuggestPopover)}else this.removeAttribute("aria-haspopup"),this.addEventListener("keydown",this.handleKeyDown),this._tokenSuggestPopover&&(this._tokenSuggestPopover.popover.remove(),this._tokenSuggestPopover=null);(e.size==0||e.has("selectionMode")||e.has("items")||e.has("selectedIndexes")||e.has("disabled"))&&this.updateItems()}handleInputValueChange(e){e.detail.value?(this.activeTokenIndex=-1,this.cancelSearch=!1,this.debouncedShowTokenSuggestPopover(),window.addEventListener("pointerdown",this.handleWindowPointerDown)):(this.tokenSuggestPopover.hide(),this.cancelSearch=!0)}showFilteredTokenSuggestions(){!this.cancelSearch&&this.inputElement.value&&this.tokenSuggestPopover.show()}isTokenNotSelected(e){return!this.selectedIndexes.includes(e)}get tokenSuggestPopover(){return!this._tokenSuggestPopover&&this.inputElement&&(this._tokenSuggestPopover=new Ll(this.inputElement,()=>this.items.filter((e,t)=>!e.disabled&&this.isTokenNotSelected(t)),e=>{const t=this.findIndex(e);this.handleTokenSelection([t]),window.removeEventListener("pointerdown",this.handleWindowPointerDown)},e=>{this.appendChild(e.popover),this.dispatchEvent(new CustomEvent("auto-suggest-initialized")),e.popover.addEventListener("close",()=>{this.inputElement.value&&!this.contains(document.activeElement)&&(this.inputElement.value="")})}),this._tokenSuggestPopover.list.itemGenerator=this._autoSuggestItemGenerator,this._tokenSuggestPopover.list.className=this.suggestListClass,this.suggestionFilter&&(this._tokenSuggestPopover.filter=this.suggestionFilter)),this._tokenSuggestPopover}updateItems(){if(!this.isConnected||!this.items)return;const e=this.inputElement;e&&(!this._tokenSuggestPopover||!this._tokenSuggestPopover.isOpened)&&(e.value=""),this.querySelectorAll("[slot='items']").forEach(s=>{this.removeChild(s)});const t=document.createDocumentFragment();let n=[];this.selectionMode=="remove-only"?n=this.items.map(s=>this.disableIfNeeded(s)):this.selectedIndexes.forEach(s=>{n.push(this.disableIfNeeded(this.items[s]))}),n.forEach(s=>{const o=this.tokenGenerator(s,this.findIndex(s));o.slot="items",t.appendChild(o),o.id||(o.id=window.crypto.getRandomValues(new Uint32Array(1))[0].toString(16)),o.setClickHandler(()=>this.onTokenClick(o,!0)),o.addEventListener("click",()=>{document.activeElement!=this&&this.focus()}),o.setDeleteHandler(r=>this.removeTokens([r]))}),this.appendChild(t),this._tokenSuggestPopover&&this._tokenSuggestPopover.refreshItems()}removeTokens(e){this.disabled||(this.activeTokenIndex!=-1&&e.includes(this.activeTokenElement.index)&&(this.activeTokenIndex=-1),this.selectionMode=="remove-only"?this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:e}})):(this.selectedIndexes=this.selectedIndexes.filter(t=>!e.includes(t)),this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:e,selectedIndices:[...this.selectedIndexes]}}))))}onTokenClick(e,t){let n;this.querySelectorAll("[slot='items']").forEach((s,o)=>{e==s?n=o:s.setAttribute("aria-checked","false")}),this.activeTokenIndex=n,this.setAttribute("aria-activedescendant",this.activeTokenElement.id),this._tokenSuggestPopover&&this._tokenSuggestPopover.isOpened&&this._tokenSuggestPopover.hide(),this.dispatchEvent(new CustomEvent("token-clicked",{detail:{index:e.index,tokenElement:e,byPointerDevice:t}}))}disableIfNeeded(e){return this.disabled?{...e,disabled:!0}:e}handleTokenSelection(e){this.selectedIndexes=this.selectedIndexes.concat(e),this.dispatchEvent(new CustomEvent("tokens-selected",{detail:{newIndices:e,selectedIndices:[...this.selectedIndexes]}}))}handleTokenCreation(e){this.dispatchEvent(new CustomEvent("token-created",{detail:{value:e}}))}get inputElement(){return this.shadowRoot.querySelector(".input")}get activeTokenElement(){return this.getTokenElement(this.activeTokenIndex)}getTokenElement(e){return this.querySelector("[slot='items']:nth-of-type("+(e+1)+")")}findIndex(e){return this.items.findIndex(t=>t.caption===e.caption)}get activeTokenIndex(){return this._activeTokenIndex}set activeTokenIndex(e){if(this._activeTokenIndex!=-1){const t=this.activeTokenElement;t&&(t.current=!1)}if(this._activeTokenIndex=e,e==-1)this.removeAttribute("aria-activedescendant");else{const t=this.activeTokenElement;t.current=!0,this.setAttribute("aria-activedescendant",t.id)}}get hasInputValue(){var e;return!!((e=this.inputElement)!=null&&e.value)}},Se.ID="sd-token-selector",Se.ensureDefined=()=>{An.ensureDefined(),customElements.get(Se.ID)||customElements.define(Se.ID,Se)},Se.shadowRootOptions={...be.shadowRootOptions,delegatesFocus:!0},Se);fe([y({type:String,attribute:"selection-mode",reflect:!0})],de.prototype,"selectionMode",2);fe([y({type:Array,attribute:!1})],de.prototype,"items",2);fe([y({type:Array,attribute:!1})],de.prototype,"selectedIndexes",2);fe([y({type:String,reflect:!0})],de.prototype,"placeholder",2);fe([y({type:String,reflect:!0,attribute:"suggest-list-class"})],de.prototype,"suggestListClass",2);fe([y({type:String,reflect:!0,attribute:"input-label"})],de.prototype,"inputLabel",2);fe([y({converter:{fromAttribute:i=>i=="true",toAttribute:i=>i},reflect:!0,attribute:"aria-disabled"})],de.prototype,"disabled",2);fe([y({type:String,attribute:!0})],de.prototype,"validationMessage",2);fe([y({type:String,attribute:!0})],de.prototype,"validationIconSrc",2);fe([y({converter:ln.levelConverter,attribute:!0,reflect:!0})],de.prototype,"validationLevel",2);fe([y({type:String,reflect:!0,attribute:"token-type"})],de.prototype,"tokenType",2);fe([y({type:Boolean,reflect:!0,attribute:"case-sensitive"})],de.prototype,"caseSensitive",2);let sh=de;function ar(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function ql(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(n){var s=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return i[n]}})}),t}var Ii={exports:{}},U=String,lr=function(){return{isColorSupported:!1,reset:U,bold:U,dim:U,italic:U,underline:U,inverse:U,hidden:U,strikethrough:U,black:U,red:U,green:U,yellow:U,blue:U,magenta:U,cyan:U,white:U,gray:U,bgBlack:U,bgRed:U,bgGreen:U,bgYellow:U,bgBlue:U,bgMagenta:U,bgCyan:U,bgWhite:U}};Ii.exports=lr();Ii.exports.createColors=lr;var Vl=Ii.exports;const Gl={},Kl=Object.freeze(Object.defineProperty({__proto__:null,default:Gl},Symbol.toStringTag,{value:"Module"})),ye=ql(Kl);let gs=Vl,ms=ye,ni=class cr extends Error{constructor(e,t,n,s,o,r){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),r&&(this.plugin=r),typeof t<"u"&&typeof n<"u"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,cr)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=gs.isColorSupported),ms&&e&&(t=ms(t));let n=t.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),r=String(o).length,a,l;if(e){let{bold:c,gray:d,red:h}=gs.createColors(!0);a=p=>c(h(p)),l=p=>d(p)}else a=l=c=>c;return n.slice(s,o).map((c,d)=>{let h=s+1+d,p=" "+(" "+h).slice(-r)+" | ";if(h===this.line){let m=l(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(p)+c+`
596
+ `}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","listbox"),this.setAttribute("aria-multiselectable","true"),this.hasAttribute("tabIndex")||(this.tabIndex=0),this.addEventListener("focusout",t=>{const n=t.relatedTarget;!this.contains(n)&&!this.shadowRoot.contains(n)&&this.querySelectorAll("[slot='items'][aria-checked='true']").forEach(s=>s.checked=!1)}),new Ul(this,()=>{var t;return(t=this.inputElement)==null?void 0:t.value},t=>this.addMatchingItems(t)),new Fl(this,t=>this.addMatchingItems(t))}addMatchingItems(e){const t=[],n=e.map((s,r)=>{const o=s.caption==null?-1:this.findIndex(s);return o!=-1&&!this.items[o].disabled&&!this.selectedIndexes.includes(o)?(t.push(r),o):-1}).filter(s=>s!=-1);return n.length>0&&this.handleTokenSelection(n),t}removeSelectionOrActiveToken(){if(!this.disabled){const e=this.querySelectorAll("[slot='items'][aria-checked='true']");if(e.length>0){const t=Array.from(e);this.removeTokens(t.filter(n=>!n.disabled).map(n=>n.index))}else if(this.activeTokenIndex!=-1){const t=this.activeTokenElement;t&&!t.disabled&&this.removeTokens([t.index])}}}updateActiveToken(e){const t=this.querySelectorAll("[slot='items']").length-1;this.activeTokenIndex==-1?e<0&&(this.activeTokenIndex=t):this.activeTokenIndex==t&&e>0?(this.activeTokenIndex=-1,this.focus()):this.activeTokenIndex=Math.max(0,Math.min(t,this.activeTokenIndex+e))}commitTokenValue(e){if(this.disabled)return;if(this.tokenSuggestPopover.isOpened){const n=this.tokenSuggestPopover.focusedSuggestToken;if(n){if(!n.disabled){const s=this.findIndex(n);this.handleTokenSelection([s]),this.tokenSuggestPopover.hide()}return}}if(!(e!=null&&e.trim()))return;const t=this.items.findIndex(n=>this.caseSensitive?n.caption==e:n.caption.toLowerCase()==e.toLowerCase());this.selectedIndexes.includes(t)||(t>=0?this.handleTokenSelection([t]):this.handleTokenCreation(e)),this.requestUpdate("selectedIndexes"),this.tokenSuggestPopover.hide(),window.removeEventListener("pointerdown",this.handleWindowPointerDown)}updated(e){if(super.updated(e),this._tokenSuggestPopover&&(this.tokenSuggestPopover.list.className=this.suggestListClass||"",this.suggestionFilter&&(this.tokenSuggestPopover.filter=this.suggestionFilter)),e.has("selectionMode"))if(this.selectionMode=="multi"){this.setAttribute("aria-haspopup","listbox");const t=this.inputElement;t.addEventListener("immediate-value-change",n=>this.handleInputValueChange(n)),t.addEventListener("keydown",n=>this.handleInputKeyDown(n,t)),window.queueMicrotask(()=>this.tokenSuggestPopover)}else this.removeAttribute("aria-haspopup"),this.addEventListener("keydown",this.handleKeyDown),this._tokenSuggestPopover&&(this._tokenSuggestPopover.popover.remove(),this._tokenSuggestPopover=null);(e.size==0||e.has("selectionMode")||e.has("items")||e.has("selectedIndexes")||e.has("disabled"))&&this.updateItems()}handleInputValueChange(e){e.detail.value?(this.activeTokenIndex=-1,this.cancelSearch=!1,this.debouncedShowTokenSuggestPopover(),window.addEventListener("pointerdown",this.handleWindowPointerDown)):(this.tokenSuggestPopover.hide(),this.cancelSearch=!0)}showFilteredTokenSuggestions(){!this.cancelSearch&&this.inputElement.value&&this.tokenSuggestPopover.show()}isTokenNotSelected(e){return!this.selectedIndexes.includes(e)}get tokenSuggestPopover(){return!this._tokenSuggestPopover&&this.inputElement&&(this._tokenSuggestPopover=new Pl(this.inputElement,()=>this.items.filter((e,t)=>!e.disabled&&this.isTokenNotSelected(t)),e=>{const t=this.findIndex(e);this.handleTokenSelection([t]),window.removeEventListener("pointerdown",this.handleWindowPointerDown)},e=>{this.appendChild(e.popover),this.dispatchEvent(new CustomEvent("auto-suggest-initialized")),e.popover.addEventListener("close",()=>{this.inputElement.value&&!this.contains(document.activeElement)&&(this.inputElement.value="")})}),this._tokenSuggestPopover.list.itemGenerator=this._autoSuggestItemGenerator,this._tokenSuggestPopover.list.className=this.suggestListClass,this.suggestionFilter&&(this._tokenSuggestPopover.filter=this.suggestionFilter)),this._tokenSuggestPopover}updateItems(){if(!this.isConnected||!this.items)return;const e=this.inputElement;e&&(!this._tokenSuggestPopover||!this._tokenSuggestPopover.isOpened)&&(e.value=""),this.querySelectorAll("[slot='items']").forEach(s=>{this.removeChild(s)});const t=document.createDocumentFragment();let n=[];this.selectionMode=="remove-only"?n=this.items.map(s=>this.disableIfNeeded(s)):this.selectedIndexes.forEach(s=>{n.push(this.disableIfNeeded(this.items[s]))}),n.forEach(s=>{const r=this.tokenGenerator(s,this.findIndex(s));r.slot="items",t.appendChild(r),r.id||(r.id=window.crypto.getRandomValues(new Uint32Array(1))[0].toString(16)),r.setClickHandler(()=>this.onTokenClick(r,!0)),r.addEventListener("click",()=>{document.activeElement!=this&&this.focus()}),r.setDeleteHandler(o=>this.removeTokens([o]))}),this.appendChild(t),this._tokenSuggestPopover&&this._tokenSuggestPopover.refreshItems()}removeTokens(e){this.disabled||(this.activeTokenIndex!=-1&&e.includes(this.activeTokenElement.index)&&(this.activeTokenIndex=-1),this.selectionMode=="remove-only"?this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:e}})):(this.selectedIndexes=this.selectedIndexes.filter(t=>!e.includes(t)),this.dispatchEvent(new CustomEvent("tokens-removed",{detail:{removedIndices:e,selectedIndices:[...this.selectedIndexes]}}))))}onTokenClick(e,t){let n;this.querySelectorAll("[slot='items']").forEach((s,r)=>{e==s?n=r:s.setAttribute("aria-checked","false")}),this.activeTokenIndex=n,this.setAttribute("aria-activedescendant",this.activeTokenElement.id),this._tokenSuggestPopover&&this._tokenSuggestPopover.isOpened&&this._tokenSuggestPopover.hide(),this.dispatchEvent(new CustomEvent("token-clicked",{detail:{index:e.index,tokenElement:e,byPointerDevice:t}}))}disableIfNeeded(e){return this.disabled?{...e,disabled:!0}:e}handleTokenSelection(e){this.selectedIndexes=this.selectedIndexes.concat(e),this.dispatchEvent(new CustomEvent("tokens-selected",{detail:{newIndices:e,selectedIndices:[...this.selectedIndexes]}}))}handleTokenCreation(e){this.dispatchEvent(new CustomEvent("token-created",{detail:{value:e}}))}get inputElement(){return this.shadowRoot.querySelector(".input")}get activeTokenElement(){return this.getTokenElement(this.activeTokenIndex)}getTokenElement(e){return this.querySelector("[slot='items']:nth-of-type("+(e+1)+")")}findIndex(e){return this.items.findIndex(t=>t.caption===e.caption)}get activeTokenIndex(){return this._activeTokenIndex}set activeTokenIndex(e){if(this._activeTokenIndex!=-1){const t=this.activeTokenElement;t&&(t.current=!1)}if(this._activeTokenIndex=e,e==-1)this.removeAttribute("aria-activedescendant");else{const t=this.activeTokenElement;t.current=!0,this.setAttribute("aria-activedescendant",t.id)}}get hasInputValue(){var e;return!!((e=this.inputElement)!=null&&e.value)}},Se.ID="sd-token-selector",Se.ensureDefined=()=>{Cn.ensureDefined(),customElements.get(Se.ID)||customElements.define(Se.ID,Se)},Se.shadowRootOptions={...ue.shadowRootOptions,delegatesFocus:!0},Se);ge([b({type:String,attribute:"selection-mode",reflect:!0})],de.prototype,"selectionMode",2);ge([b({type:Array,attribute:!1})],de.prototype,"items",2);ge([b({type:Array,attribute:!1})],de.prototype,"selectedIndexes",2);ge([b({type:String,reflect:!0})],de.prototype,"placeholder",2);ge([b({type:String,reflect:!0,attribute:"suggest-list-class"})],de.prototype,"suggestListClass",2);ge([b({type:String,reflect:!0,attribute:"input-label"})],de.prototype,"inputLabel",2);ge([b({converter:{fromAttribute:i=>i=="true",toAttribute:i=>i},reflect:!0,attribute:"aria-disabled"})],de.prototype,"disabled",2);ge([b({type:String,attribute:!0})],de.prototype,"validationMessage",2);ge([b({type:String,attribute:!0})],de.prototype,"validationIconSrc",2);ge([b({converter:dn.levelConverter,attribute:!0,reflect:!0})],de.prototype,"validationLevel",2);ge([b({type:String,reflect:!0,attribute:"token-type"})],de.prototype,"tokenType",2);ge([b({type:Boolean,reflect:!0,attribute:"case-sensitive"})],de.prototype,"caseSensitive",2);let ah=de;function or(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Gl(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(n){var s=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return i[n]}})}),t}var Oi={exports:{}},U=String,ar=function(){return{isColorSupported:!1,reset:U,bold:U,dim:U,italic:U,underline:U,inverse:U,hidden:U,strikethrough:U,black:U,red:U,green:U,yellow:U,blue:U,magenta:U,cyan:U,white:U,gray:U,bgBlack:U,bgRed:U,bgGreen:U,bgYellow:U,bgBlue:U,bgMagenta:U,bgCyan:U,bgWhite:U}};Oi.exports=ar();Oi.exports.createColors=ar;var Kl=Oi.exports;const Zl={},Xl=Object.freeze(Object.defineProperty({__proto__:null,default:Zl},Symbol.toStringTag,{value:"Module"})),ye=Gl(Xl);let gs=Kl,ms=ye,ii=class lr extends Error{constructor(e,t,n,s,r,o){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),s&&(this.source=s),o&&(this.plugin=o),typeof t<"u"&&typeof n<"u"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,lr)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=gs.isColorSupported),ms&&e&&(t=ms(t));let n=t.split(/\r?\n/),s=Math.max(this.line-3,0),r=Math.min(this.line+2,n.length),o=String(r).length,a,l;if(e){let{bold:c,gray:d,red:h}=gs.createColors(!0);a=p=>c(h(p)),l=p=>d(p)}else a=l=c=>c;return n.slice(s,r).map((c,d)=>{let h=s+1+d,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let m=l(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(p)+c+`
614
597
  `+m+a("^")}return" "+l(p)+c}).join(`
615
598
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
616
599
 
617
600
  `+e+`
618
- `),this.name+": "+this.message+e}};var Ti=ni;ni.default=ni;var Ft={};Ft.isClean=Symbol("isClean");Ft.my=Symbol("my");const vs={after:`
601
+ `),this.name+": "+this.message+e}};var Ti=ii;ii.default=ii;var Wt={};Wt.isClean=Symbol("isClean");Wt.my=Symbol("my");const vs={after:`
619
602
  `,beforeClose:`
620
603
  `,beforeComment:`
621
604
  `,beforeDecl:`
622
605
  `,beforeOpen:" ",beforeRule:`
623
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Zl(i){return i[0].toUpperCase()+i.slice(1)}let ii=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:s&&(n+=" "),e.nodes)this.block(e,n+s);else{let o=(e.raws.between||"")+(t?";":"");this.builder(n+s+o,e)}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(n.includes(`
624
- `)){let r=this.raw(e,null,"indent");if(r.length)for(let a=0;a<o;a++)n+=r}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],r=this.raw(o,"before");r&&this.builder(r),this.stringify(o,t!==s||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),s=e.prop+n+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,n){let s;if(n||(n=t),t&&(s=e.raws[t],typeof s<"u"))return s;let o=e.parent;if(n==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return vs[n];let r=e.root();if(r.rawCache||(r.rawCache={}),typeof r.rawCache[n]<"u")return r.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let a="raw"+Zl(n);this[a]?s=this[a](r,e):r.walk(l=>{if(s=l.raws[t],typeof s<"u")return!1})}return typeof s>"u"&&(s=vs[n]),r.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return t=n.raws.after,t.includes(`
606
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Jl(i){return i[0].toUpperCase()+i.slice(1)}let si=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:s&&(n+=" "),e.nodes)this.block(e,n+s);else{let r=(e.raws.between||"")+(t?";":"");this.builder(n+s+r,e)}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let s=e.parent,r=0;for(;s&&s.type!=="root";)r+=1,s=s.parent;if(n.includes(`
607
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a<r;a++)n+=o}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let r=e.nodes[s],o=this.raw(r,"before");o&&this.builder(o),this.stringify(r,t!==s||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),s=e.prop+n+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,n){let s;if(n||(n=t),t&&(s=e.raws[t],typeof s<"u"))return s;let r=e.parent;if(n==="before"&&(!r||r.type==="root"&&r.first===e||r&&r.type==="document"))return"";if(!r)return vs[n];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let a="raw"+Jl(n);this[a]?s=this[a](o,e):o.walk(l=>{if(s=l.raws[t],typeof s<"u")return!1})}return typeof s>"u"&&(s=vs[n]),o.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return t=n.raws.after,t.includes(`
625
608
  `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(s=>{if(typeof s.raws.before<"u")return n=s.raws.before,n.includes(`
626
609
  `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return n=s.raws.before,n.includes(`
627
610
  `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return t=n.raws.before,t.includes(`
628
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return t=n.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let s=n.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof n.raws.before<"u"){let o=n.raws.before.split(`
629
- `);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let n=e[t],s=e.raws[t];return s&&s.value===n?s.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var dr=ii;ii.default=ii;let Xl=dr;function si(i,e){new Xl(e).stringify(i)}var $n=si;si.default=si;let{isClean:Zt,my:Jl}=Ft,Yl=Ti,Ql=dr,ec=$n;function ri(i,e){let t=new i.constructor;for(let n in i){if(!Object.prototype.hasOwnProperty.call(i,n)||n==="proxyCache")continue;let s=i[n],o=typeof s;n==="parent"&&o==="object"?e&&(t[n]=e):n==="source"?t[n]=s:Array.isArray(s)?t[n]=s.map(r=>ri(r,t)):(o==="object"&&s!==null&&(s=ri(s)),t[n]=s)}return t}let oi=class{constructor(e={}){this.raws={},this[Zt]=!1,this[Jl]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ri(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},t)}return new Yl(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Zt]){this[Zt]=!1;let e=this;for(;e=e.parent;)e[Zt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(n=this.positionInside(s,t))}return n}positionInside(e,t){let n=t||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let r=0;r<e;r++)n[r]===`
630
- `?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(t=this.positionInside(o,s),n=this.positionInside(o+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new Ql().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let s of e)s===this?n=!0:n?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},s=t==null;t=t||new Map;let o=0;for(let r in this){if(!Object.prototype.hasOwnProperty.call(this,r)||r==="parent"||r==="proxyCache")continue;let a=this[r];if(Array.isArray(a))n[r]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)n[r]=a.toJSON(null,t);else if(r==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),n[r]={end:a.end,inputId:l,start:a.start}}else n[r]=a}return s&&(n.inputs=[...t.keys()].map(r=>r.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ec){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n}),t}warn(e,t,n){let s={node:this};for(let o in n)s[o]=n[o];return e.warn(t,s)}get proxyOf(){return this}};var Cn=oi;oi.default=oi;let tc=Cn,ai=class extends tc{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var On=ai;ai.default=ai;let nc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ic=(i,e=21)=>(t=e)=>{let n="",s=t;for(;s--;)n+=i[Math.random()*i.length|0];return n},sc=(i=21)=>{let e="",t=i;for(;t--;)e+=nc[Math.random()*64|0];return e};var rc={nanoid:sc,customAlphabet:ic};let{SourceMapConsumer:bs,SourceMapGenerator:ys}=ye,{existsSync:oc,readFileSync:ac}=ye,{dirname:Hn,join:lc}=ye;function cc(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let li=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,s=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Hn(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new bs(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return cc(e.substr(RegExp.lastMatch.length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),s=e.indexOf("*/",n);n>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,s)))}loadFile(e){if(this.root=Hn(e),oc(e))return this.mapFile=e,ac(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let n=t(e);if(n){let s=this.loadFile(n);if(!s)throw new Error("Unable to load previous source map: "+n.toString());return s}}else{if(t instanceof bs)return ys.fromSourceMap(t).toString();if(t instanceof ys)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=lc(Hn(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ur=li;li.default=li;let{SourceMapConsumer:dc,SourceMapGenerator:uc}=ye,{fileURLToPath:ws,pathToFileURL:Xt}=ye,{isAbsolute:ci,resolve:di}=ye,{nanoid:hc}=rc,Wn=ye,xs=Ti,pc=ur,qn=Symbol("fromOffsetCache"),fc=!!(dc&&uc),ks=!!(di&&ci),bn=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!ks||/^\w+:\/\//.test(t.from)||ci(t.from)?this.file=t.from:this.file=di(t.from)),ks&&fc){let n=new pc(this.css,t);if(n.text){this.map=n;let s=n.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+hc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,s={}){let o,r,a;if(t&&typeof t=="object"){let c=t,d=n;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);t=h.line,n=h.col}else t=c.line,n=c.column;if(typeof d.offset=="number"){let h=this.fromOffset(d.offset);r=h.line,a=h.col}else r=d.line,a=d.column}else if(!n){let c=this.fromOffset(t);t=c.line,n=c.col}let l=this.origin(t,n,r,a);return l?o=new xs(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,s.plugin):o=new xs(e,r===void 0?t:{column:n,line:t},r===void 0?n:{column:a,line:r},this.css,this.file,s.plugin),o.input={column:n,endColumn:a,endLine:r,line:t,source:this.css},this.file&&(Xt&&(o.input.url=Xt(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,n;if(this[qn])n=this[qn];else{let o=this.css.split(`
631
- `);n=new Array(o.length);let r=0;for(let a=0,l=o.length;a<l;a++)n[a]=r,r+=o[a].length+1;this[qn]=n}t=n[n.length-1];let s=0;if(e>=t)s=n.length-1;else{let o=n.length-2,r;for(;s<o;)if(r=s+(o-s>>1),e<n[r])o=r-1;else if(e>=n[r+1])s=r+1;else{s=r;break}}return{col:e-n[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:di(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,s){if(!this.map)return!1;let o=this.map.consumer(),r=o.originalPositionFor({column:t,line:e});if(!r.source)return!1;let a;typeof n=="number"&&(a=o.originalPositionFor({column:s,line:n}));let l;ci(r.source)?l=Xt(r.source):l=new URL(r.source,this.map.consumer().sourceRoot||Xt(this.map.mapFile));let c={column:r.column,endColumn:a&&a.column,endLine:a&&a.line,line:r.line,url:l.toString()};if(l.protocol==="file:")if(ws)c.file=ws(l);else throw new Error("file: protocol is not available in this PostCSS build");let d=o.sourceContentFor(r.source);return d&&(c.source=d),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var In=bn;bn.default=bn;Wn&&Wn.registerInput&&Wn.registerInput(bn);let{SourceMapConsumer:hr,SourceMapGenerator:hn}=ye,{dirname:pn,relative:pr,resolve:fr,sep:gr}=ye,{pathToFileURL:Es}=ye,gc=In,mc=!!(hr&&hn),vc=!!(pn&&fr&&pr&&gr),bc=class{constructor(e,t,n,s){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
611
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return t=n.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let s=n.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof n.raws.before<"u"){let r=n.raws.before.split(`
612
+ `);return t=r[r.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let n=e[t],s=e.raws[t];return s&&s.value===n?s.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var cr=si;si.default=si;let Yl=cr;function ri(i,e){new Yl(e).stringify(i)}var In=ri;ri.default=ri;let{isClean:Jt,my:Ql}=Wt,ec=Ti,tc=cr,nc=In;function oi(i,e){let t=new i.constructor;for(let n in i){if(!Object.prototype.hasOwnProperty.call(i,n)||n==="proxyCache")continue;let s=i[n],r=typeof s;n==="parent"&&r==="object"?e&&(t[n]=e):n==="source"?t[n]=s:Array.isArray(s)?t[n]=s.map(o=>oi(o,t)):(r==="object"&&s!==null&&(s=oi(s)),t[n]=s)}return t}let ai=class{constructor(e={}){this.raws={},this[Jt]=!1,this[Ql]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=oi(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},t)}return new ec(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Jt]){this[Jt]=!1;let e=this;for(;e=e.parent;)e[Jt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(n=this.positionInside(s,t))}return n}positionInside(e,t){let n=t||this.toString(),s=this.source.start.column,r=this.source.start.line;for(let o=0;o<e;o++)n[o]===`
613
+ `?(s=1,r+=1):s+=1;return{column:s,line:r}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),r=s.indexOf(e.word);r!==-1&&(t=this.positionInside(r,s),n=this.positionInside(r+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new tc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let s of e)s===this?n=!0:n?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},s=t==null;t=t||new Map;let r=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))n[o]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)n[o]=a.toJSON(null,t);else if(o==="source"){let l=t.get(a.input);l==null&&(l=r,t.set(a.input,r),r++),n[o]={end:a.end,inputId:l,start:a.start}}else n[o]=a}return s&&(n.inputs=[...t.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=nc){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n}),t}warn(e,t,n){let s={node:this};for(let r in n)s[r]=n[r];return e.warn(t,s)}get proxyOf(){return this}};var On=ai;ai.default=ai;let ic=On,li=class extends ic{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Tn=li;li.default=li;let sc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",rc=(i,e=21)=>(t=e)=>{let n="",s=t;for(;s--;)n+=i[Math.random()*i.length|0];return n},oc=(i=21)=>{let e="",t=i;for(;t--;)e+=sc[Math.random()*64|0];return e};var ac={nanoid:oc,customAlphabet:rc};let{SourceMapConsumer:bs,SourceMapGenerator:ys}=ye,{existsSync:lc,readFileSync:cc}=ye,{dirname:qn,join:dc}=ye;function uc(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let ci=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,s=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=qn(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new bs(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,r=/^data:application\/json,/;if(s.test(e)||r.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return uc(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),s=e.indexOf("*/",n);n>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,s)))}loadFile(e){if(this.root=qn(e),lc(e))return this.mapFile=e,cc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let n=t(e);if(n){let s=this.loadFile(n);if(!s)throw new Error("Unable to load previous source map: "+n.toString());return s}}else{if(t instanceof bs)return ys.fromSourceMap(t).toString();if(t instanceof ys)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=dc(qn(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var dr=ci;ci.default=ci;let{SourceMapConsumer:hc,SourceMapGenerator:pc}=ye,{fileURLToPath:ws,pathToFileURL:Yt}=ye,{isAbsolute:di,resolve:ui}=ye,{nanoid:fc}=ac,Vn=ye,xs=Ti,gc=dr,Gn=Symbol("fromOffsetCache"),mc=!!(hc&&pc),ks=!!(ui&&di),yn=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!ks||/^\w+:\/\//.test(t.from)||di(t.from)?this.file=t.from:this.file=ui(t.from)),ks&&mc){let n=new gc(this.css,t);if(n.text){this.map=n;let s=n.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+fc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,s={}){let r,o,a;if(t&&typeof t=="object"){let c=t,d=n;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);t=h.line,n=h.col}else t=c.line,n=c.column;if(typeof d.offset=="number"){let h=this.fromOffset(d.offset);o=h.line,a=h.col}else o=d.line,a=d.column}else if(!n){let c=this.fromOffset(t);t=c.line,n=c.col}let l=this.origin(t,n,o,a);return l?r=new xs(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,s.plugin):r=new xs(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:a,line:o},this.css,this.file,s.plugin),r.input={column:n,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(Yt&&(r.input.url=Yt(this.file).toString()),r.input.file=this.file),r}fromOffset(e){let t,n;if(this[Gn])n=this[Gn];else{let r=this.css.split(`
614
+ `);n=new Array(r.length);let o=0;for(let a=0,l=r.length;a<l;a++)n[a]=o,o+=r[a].length+1;this[Gn]=n}t=n[n.length-1];let s=0;if(e>=t)s=n.length-1;else{let r=n.length-2,o;for(;s<r;)if(o=s+(r-s>>1),e<n[o])r=o-1;else if(e>=n[o+1])s=o+1;else{s=o;break}}return{col:e-n[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ui(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,s){if(!this.map)return!1;let r=this.map.consumer(),o=r.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof n=="number"&&(a=r.originalPositionFor({column:s,line:n}));let l;di(o.source)?l=Yt(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||Yt(this.map.mapFile));let c={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(ws)c.file=ws(l);else throw new Error("file: protocol is not available in this PostCSS build");let d=r.sourceContentFor(o.source);return d&&(c.source=d),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Ln=yn;yn.default=yn;Vn&&Vn.registerInput&&Vn.registerInput(yn);let{SourceMapConsumer:ur,SourceMapGenerator:pn}=ye,{dirname:fn,relative:hr,resolve:pr,sep:fr}=ye,{pathToFileURL:Es}=ye,vc=Ln,bc=!!(ur&&pn),yc=!!(fn&&pr&&hr&&fr),wc=class{constructor(e,t,n,s){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
632
615
  `;this.css.includes(`\r
633
616
  `)&&(t=`\r
634
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||pn(e.file),s;this.mapOpts.sourcesContent===!1?(s=new hr(e.text),s.sourcesContent&&(s.sourcesContent=s.sourcesContent.map(()=>null))):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),vc&&mc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=hn.fromSourceMap(e)}else this.map=new hn({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new hn({file:this.outputFile()});let e=1,t=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,r;this.stringify(this.root,(a,l,c)=>{if(this.css+=a,l&&c!=="end"&&(s.generated.line=e,s.generated.column=t-1,l.source&&l.source.start?(s.source=this.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=a.match(/\n/g),o?(e+=o.length,r=a.lastIndexOf(`
635
- `),t=a.length-r):t+=a.length,l&&c!=="start"){let d=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==d.last||d.raws.semicolon)&&(l.source&&l.source.end?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?pn(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=pn(fr(n,this.mapOpts.annotation)));let s=pr(n,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new gc(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let s=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Es){let n=Es(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;gr==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};var mr=bc;let yc=Cn,ui=class extends yc{constructor(e){super(e),this.type="comment"}};var Tn=ui;ui.default=ui;let{isClean:vr,my:br}=Ft,yr=On,wr=Tn,wc=Cn,xr,Li,Pi,kr;function Er(i){return i.map(e=>(e.nodes&&(e.nodes=Er(e.nodes)),delete e.source,e))}function Sr(i){if(i[vr]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Sr(e)}let Ie=class _r extends wc{append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],s=e(this.proxyOf.nodes[n],n),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...n)=>e[t](...n.map(s=>typeof s=="function"?(o,r)=>s(o.toProxy(),r):s)):t==="every"||t==="some"?n=>e[t]((s,...o)=>n(s.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let r of s)this.proxyOf.nodes.splice(n+1,0,r);let o;for(let r in this.indexes)o=this.indexes[r],n<o&&(this.indexes[r]=o+s.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),s=n===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let a of o)this.proxyOf.nodes.splice(n,0,a);let r;for(let a in this.indexes)r=this.indexes[a],n<=r&&(this.indexes[a]=r+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Er(xr(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new yr(e)]}else if(e.selector)e=[new Li(e)];else if(e.name)e=[new Pi(e)];else if(e.text)e=[new wr(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[br]||_r.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[vr]&&Sr(s),typeof s.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let s of n)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let s;try{s=e(t,n)}catch(o){throw t.addToError(o)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,s)}):this.walk((n,s)=>{if(n.type==="atrule"&&n.name===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="atrule")return t(n,s)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,s)}):this.walk((n,s)=>{if(n.type==="decl"&&n.prop===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="decl")return t(n,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,s)}):this.walk((n,s)=>{if(n.type==="rule"&&n.selector===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="rule")return t(n,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ie.registerParse=i=>{xr=i};Ie.registerRule=i=>{Li=i};Ie.registerAtRule=i=>{Pi=i};Ie.registerRoot=i=>{kr=i};var Ve=Ie;Ie.default=Ie;Ie.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Pi.prototype):i.type==="rule"?Object.setPrototypeOf(i,Li.prototype):i.type==="decl"?Object.setPrototypeOf(i,yr.prototype):i.type==="comment"?Object.setPrototypeOf(i,wr.prototype):i.type==="root"&&Object.setPrototypeOf(i,kr.prototype),i[br]=!0,i.nodes&&i.nodes.forEach(e=>{Ie.rebuild(e)})};let xc=Ve,Ar,$r,Tt=class extends xc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ar(new $r,this,e).stringify()}};Tt.registerLazyResult=i=>{Ar=i};Tt.registerProcessor=i=>{$r=i};var Ri=Tt;Tt.default=Tt;let hi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in t)this[n]=t[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Cr=hi;hi.default=hi;let kc=Cr,pi=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new kc(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Mi=pi;pi.default=pi;const Vn=39,Ss=34,Jt=92,_s=47,Yt=10,vt=32,Qt=12,en=9,tn=13,Ec=91,Sc=93,_c=40,Ac=41,$c=123,Cc=125,Oc=59,Ic=42,Tc=58,Lc=64,nn=/[\t\n\f\r "#'()/;[\\\]{}]/g,sn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Pc=/.[\r\n"'(/\\]/,As=/[\da-f]/i;var Rc=function(e,t={}){let n=e.css.valueOf(),s=t.ignoreErrors,o,r,a,l,c,d,h,p,m,E,w=n.length,f=0,$=[],T=[];function L(){return f}function x(M){throw e.error("Unclosed "+M,f)}function A(){return T.length===0&&f>=w}function O(M){if(T.length)return T.pop();if(f>=w)return;let I=M?M.ignoreUnclosed:!1;switch(o=n.charCodeAt(f),o){case Yt:case vt:case en:case tn:case Qt:{r=f;do r+=1,o=n.charCodeAt(r);while(o===vt||o===Yt||o===en||o===tn||o===Qt);E=["space",n.slice(f,r)],f=r-1;break}case Ec:case Sc:case $c:case Cc:case Tc:case Oc:case Ac:{let j=String.fromCharCode(o);E=[j,j,f];break}case _c:{if(p=$.length?$.pop()[1]:"",m=n.charCodeAt(f+1),p==="url"&&m!==Vn&&m!==Ss&&m!==vt&&m!==Yt&&m!==en&&m!==Qt&&m!==tn){r=f;do{if(d=!1,r=n.indexOf(")",r+1),r===-1)if(s||I){r=f;break}else x("bracket");for(h=r;n.charCodeAt(h-1)===Jt;)h-=1,d=!d}while(d);E=["brackets",n.slice(f,r+1),f,r],f=r}else r=n.indexOf(")",f+1),l=n.slice(f,r+1),r===-1||Pc.test(l)?E=["(","(",f]:(E=["brackets",l,f,r],f=r);break}case Vn:case Ss:{a=o===Vn?"'":'"',r=f;do{if(d=!1,r=n.indexOf(a,r+1),r===-1)if(s||I){r=f+1;break}else x("string");for(h=r;n.charCodeAt(h-1)===Jt;)h-=1,d=!d}while(d);E=["string",n.slice(f,r+1),f,r],f=r;break}case Lc:{nn.lastIndex=f+1,nn.test(n),nn.lastIndex===0?r=n.length-1:r=nn.lastIndex-2,E=["at-word",n.slice(f,r+1),f,r],f=r;break}case Jt:{for(r=f,c=!0;n.charCodeAt(r+1)===Jt;)r+=1,c=!c;if(o=n.charCodeAt(r+1),c&&o!==_s&&o!==vt&&o!==Yt&&o!==en&&o!==tn&&o!==Qt&&(r+=1,As.test(n.charAt(r)))){for(;As.test(n.charAt(r+1));)r+=1;n.charCodeAt(r+1)===vt&&(r+=1)}E=["word",n.slice(f,r+1),f,r],f=r;break}default:{o===_s&&n.charCodeAt(f+1)===Ic?(r=n.indexOf("*/",f+2)+1,r===0&&(s||I?r=n.length:x("comment")),E=["comment",n.slice(f,r+1),f,r],f=r):(sn.lastIndex=f+1,sn.test(n),sn.lastIndex===0?r=n.length-1:r=sn.lastIndex-2,E=["word",n.slice(f,r+1),f,r],$.push(E),f=r);break}}return f++,E}function P(M){T.push(M)}return{back:P,endOfFile:A,nextToken:O,position:L}};let Or=Ve,yn=class extends Or{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Di=yn;yn.default=yn;Or.registerAtRule(yn);let Ir=Ve,Tr,Lr,lt=class extends Ir{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let s=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of s)o.raws.before=t.raws.before}return s}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Tr(new Lr,this,e).stringify()}};lt.registerLazyResult=i=>{Tr=i};lt.registerProcessor=i=>{Lr=i};var Ht=lt;lt.default=lt;Ir.registerRoot(lt);let Lt={comma(i){return Lt.split(i,[","],!0)},space(i){let e=[" ",`
636
- `," "];return Lt.split(i,e)},split(i,e,t){let n=[],s="",o=!1,r=0,a=!1,l="",c=!1;for(let d of i)c?c=!1:d==="\\"?c=!0:a?d===l&&(a=!1):d==='"'||d==="'"?(a=!0,l=d):d==="("?r+=1:d===")"?r>0&&(r-=1):r===0&&e.includes(d)&&(o=!0),o?(s!==""&&n.push(s.trim()),s="",o=!1):s+=d;return(t||s!=="")&&n.push(s.trim()),n}};var Pr=Lt;Lt.default=Lt;let Rr=Ve,Mc=Pr,wn=class extends Rr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Mc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};var Ni=wn;wn.default=wn;Rr.registerRule(wn);let Dc=On,Nc=Rc,jc=Tn,Bc=Di,zc=Ht,$s=Ni;const Cs={empty:!0,space:!0};function Uc(i){for(let e=i.length-1;e>=0;e--){let t=i[e],n=t[3]||t[2];if(n)return n}}let Fc=class{constructor(e){this.input=e,this.root=new zc,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Bc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,s,o,r=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){a=!0;break}else if(n==="}"){if(l.length>0){for(o=l.length-1,s=l[o];s&&s[0]==="space";)s=l[--o];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){r=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),r&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,s;for(let o=t-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(n+=1,n===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,n,s,o;for(let[r,a]of e.entries()){if(n=a,s=n[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!o)this.doubleColon(n);else{if(o[0]==="word"&&o[1]==="progid")continue;return r}o=n}return!1}comment(e){let t=new jc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let s=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=Nc(this.input)}decl(e,t){let n=new Dc;this.init(n,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(s[3]||s[2]||Uc(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){n.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),n.raws.between+=o[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let r=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)r.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(o=e[c],o[1].toLowerCase()==="!important"){n.important=!0;let d=this.stringFrom(e,c);d=this.spacesFromEnd(e)+d,d!==" !important"&&(n.raws.important=d);break}else if(o[1].toLowerCase()==="important"){let d=e.slice(0),h="";for(let p=c;p>0;p--){let m=d[p][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=d.pop()[1]+h}h.trim().indexOf("!")===0&&(n.important=!0,n.raws.important=h,e=d)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(n.raws.between+=r.map(c=>c[1]).join(""),r=[]),this.raw(n,"value",r.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new $s;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,n=null,s=!1,o=null,r=[],a=e[1].startsWith("--"),l=[],c=e;for(;c;){if(n=c[0],l.push(c),n==="("||n==="[")o||(o=c),r.push(n==="("?")":"]");else if(a&&s&&n==="{")o||(o=c),r.push("}");else if(r.length===0)if(n===";")if(s){this.decl(l,a);return}else break;else if(n==="{"){this.rule(l);return}else if(n==="}"){this.tokenizer.back(l.pop()),t=!0;break}else n===":"&&(s=!0);else n===r[r.length-1]&&(r.pop(),r.length===0&&(o=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),r.length>0&&this.unclosedBracket(o),t&&s){if(!a)for(;l.length&&(c=l[l.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,s){let o,r,a=n.length,l="",c=!0,d,h;for(let p=0;p<a;p+=1)o=n[p],r=o[0],r==="space"&&p===a-1&&!s?c=!1:r==="comment"?(h=n[p-1]?n[p-1][0]:"empty",d=n[p+1]?n[p+1][0]:"empty",!Cs[h]&&!Cs[d]?l.slice(-1)===","?c=!1:l+=o[1]:c=!1):l+=o[1];if(!c){let p=n.reduce((m,E)=>m+E[1],"");e.raws[t]={raw:p,value:l}}e[t]=l}rule(e){e.pop();let t=new $s;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let s=t;s<e.length;s++)n+=e[s][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Hc=Fc;let Wc=Ve,qc=Hc,Vc=In;function xn(i,e){let t=new Vc(i,e),n=new qc(t);try{n.parse()}catch(s){throw s}return n.root}var ji=xn;xn.default=xn;Wc.registerParse(xn);let{isClean:Ee,my:Gc}=Ft,Kc=mr,Zc=$n,Xc=Ve,Jc=Ri,Os=Mi,Yc=ji,Qc=Ht;const ed={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},td={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},nd={Once:!0,postcssPlugin:!0,prepare:!0},ct=0;function bt(i){return typeof i=="object"&&typeof i.then=="function"}function Mr(i){let e=!1,t=ed[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,ct,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,ct,t+"Exit"]:[t,t+"Exit"]}function Is(i){let e;return i.type==="document"?e=["Document",ct,"DocumentExit"]:i.type==="root"?e=["Root",ct,"RootExit"]:e=Mr(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function fi(i){return i[Ee]=!1,i.nodes&&i.nodes.forEach(e=>fi(e)),i}let gi={},dt=class Dr{constructor(e,t,n){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=fi(t);else if(t instanceof Dr||t instanceof Os)s=fi(t.root),t.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let o=Yc;n.syntax&&(o=n.syntax.parse),n.parser&&(o=n.parser),o.parse&&(o=o.parse);try{s=o(t,n)}catch(r){this.processed=!0,this.error=r}s&&!s[Gc]&&Xc.rebuild(s)}this.result=new Os(e,s,n),this.helpers={...gi,postcss:gi,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,n,s)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!td[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!nd[n])if(typeof t[n]=="object")for(let s in t[n])s==="*"?e(t,n,t[n][s]):e(t,n+"-"+s.toLowerCase(),t[n][s]);else typeof t[n]=="function"&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(bt(n))try{await n}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ee];){e[Ee]=!0;let t=[Is(e)];for(;t.length>0;){let n=this.visitTick(t);if(bt(n))try{await n}catch(s){let o=t[t.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(o=>n(o,this.helpers));await Promise.all(s)}else await n(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return bt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Zc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Kc(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(bt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ee];)e[Ee]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,s]of e){this.result.lastPlugin=n;let o;try{o=s(t,this.helpers)}catch(r){throw this.handleError(r,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(bt(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:s}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[r,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=r;try{return a(n.toProxy(),this.helpers)}catch(l){throw this.handleError(l,n)}}if(t.iterator!==0){let r=t.iterator,a;for(;a=n.nodes[n.indexes[r]];)if(n.indexes[r]+=1,!a[Ee]){a[Ee]=!0,e.push(Is(a));return}t.iterator=0,delete n.indexes[r]}let o=t.events;for(;t.eventIndex<o.length;){let r=o[t.eventIndex];if(t.eventIndex+=1,r===ct){n.nodes&&n.nodes.length&&(n[Ee]=!0,t.iterator=n.getIterator());return}else if(this.listeners[r]){t.visitors=this.listeners[r];return}}e.pop()}walkSync(e){e[Ee]=!0;let t=Mr(e);for(let n of t)if(n===ct)e.nodes&&e.each(s=>{s[Ee]||this.walkSync(s)});else{let s=this.listeners[n];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};dt.registerPostcss=i=>{gi=i};var Nr=dt;dt.default=dt;Qc.registerLazyResult(dt);Jc.registerLazyResult(dt);let id=mr,sd=$n,rd=ji;const od=Mi;let mi=class{constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s,o=sd;this.result=new od(this._processor,s,this._opts),this.result.css=t;let r=this;Object.defineProperty(this.result,"root",{get(){return r.root}});let a=new id(o,s,this._opts,t);if(a.isMap()){let[l,c]=a.generate();l&&(this.result.css=l),c&&(this.result.map=c)}}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=rd;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var ad=mi;mi.default=mi;let ld=ad,cd=Nr,dd=Ri,ud=Ht,Pt=class{constructor(e=[]){this.version="8.4.32",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length===0&&typeof t.parser>"u"&&typeof t.stringifier>"u"&&typeof t.syntax>"u"?new ld(this,e,t):new cd(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var hd=Pt;Pt.default=Pt;ud.registerProcessor(Pt);dd.registerProcessor(Pt);let pd=On,fd=ur,gd=Tn,md=Di,vd=In,bd=Ht,yd=Ni;function Rt(i,e){if(Array.isArray(i))return i.map(s=>Rt(s));let{inputs:t,...n}=i;if(t){e=[];for(let s of t){let o={...s,__proto__:vd.prototype};o.map&&(o.map={...o.map,__proto__:fd.prototype}),e.push(o)}}if(n.nodes&&(n.nodes=i.nodes.map(s=>Rt(s,e))),n.source){let{inputId:s,...o}=n.source;n.source=o,s!=null&&(n.source.input=e[s])}if(n.type==="root")return new bd(n);if(n.type==="decl")return new pd(n);if(n.type==="rule")return new yd(n);if(n.type==="comment")return new gd(n);if(n.type==="atrule")return new md(n);throw new Error("Unknown node type: "+i.type)}var wd=Rt;Rt.default=Rt;var Ts={};let xd=Ti,jr=On,kd=Nr,Ed=Ve,Bi=hd,Sd=$n,_d=wd,Br=Ri,Ad=Cr,zr=Tn,Ur=Di,$d=Mi,Cd=In,Od=ji,Id=Pr,Fr=Ni,Hr=Ht,Td=Cn;function R(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Bi(i)}R.plugin=function(e,t){let n=!1;function s(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
617
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||fn(e.file),s;this.mapOpts.sourcesContent===!1?(s=new ur(e.text),s.sourcesContent&&(s.sourcesContent=s.sourcesContent.map(()=>null))):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),yc&&bc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=pn.fromSourceMap(e)}else this.map=new pn({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new pn({file:this.outputFile()});let e=1,t=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},r,o;this.stringify(this.root,(a,l,c)=>{if(this.css+=a,l&&c!=="end"&&(s.generated.line=e,s.generated.column=t-1,l.source&&l.source.start?(s.source=this.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),r=a.match(/\n/g),r?(e+=r.length,o=a.lastIndexOf(`
618
+ `),t=a.length-o):t+=a.length,l&&c!=="start"){let d=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==d.last||d.raws.semicolon)&&(l.source&&l.source.end?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?fn(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=fn(pr(n,this.mapOpts.annotation)));let s=hr(n,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new vc(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let s=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Es){let n=Es(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;fr==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};var gr=wc;let xc=On,hi=class extends xc{constructor(e){super(e),this.type="comment"}};var Rn=hi;hi.default=hi;let{isClean:mr,my:vr}=Wt,br=Tn,yr=Rn,kc=On,wr,Li,Ri,xr;function kr(i){return i.map(e=>(e.nodes&&(e.nodes=kr(e.nodes)),delete e.source,e))}function Er(i){if(i[mr]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Er(e)}let Oe=class Sr extends kc{append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],s=e(this.proxyOf.nodes[n],n),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...n)=>e[t](...n.map(s=>typeof s=="function"?(r,o)=>s(r.toProxy(),o):s)):t==="every"||t==="some"?n=>e[t]((s,...r)=>n(s.toProxy(),...r)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of s)this.proxyOf.nodes.splice(n+1,0,o);let r;for(let o in this.indexes)r=this.indexes[o],n<r&&(this.indexes[o]=r+s.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),s=n===0?"prepend":!1,r=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let a of r)this.proxyOf.nodes.splice(n,0,a);let o;for(let a in this.indexes)o=this.indexes[a],n<=o&&(this.indexes[a]=o+r.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=kr(wr(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new br(e)]}else if(e.selector)e=[new Li(e)];else if(e.name)e=[new Ri(e)];else if(e.text)e=[new yr(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[vr]||Sr.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[mr]&&Er(s),typeof s.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let s of n)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let s;try{s=e(t,n)}catch(r){throw t.addToError(r)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,s)}):this.walk((n,s)=>{if(n.type==="atrule"&&n.name===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="atrule")return t(n,s)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,s)}):this.walk((n,s)=>{if(n.type==="decl"&&n.prop===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="decl")return t(n,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,s)}):this.walk((n,s)=>{if(n.type==="rule"&&n.selector===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="rule")return t(n,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Oe.registerParse=i=>{wr=i};Oe.registerRule=i=>{Li=i};Oe.registerAtRule=i=>{Ri=i};Oe.registerRoot=i=>{xr=i};var Xe=Oe;Oe.default=Oe;Oe.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Ri.prototype):i.type==="rule"?Object.setPrototypeOf(i,Li.prototype):i.type==="decl"?Object.setPrototypeOf(i,br.prototype):i.type==="comment"?Object.setPrototypeOf(i,yr.prototype):i.type==="root"&&Object.setPrototypeOf(i,xr.prototype),i[vr]=!0,i.nodes&&i.nodes.forEach(e=>{Oe.rebuild(e)})};let Ec=Xe,_r,Ar,Rt=class extends Ec{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new _r(new Ar,this,e).stringify()}};Rt.registerLazyResult=i=>{_r=i};Rt.registerProcessor=i=>{Ar=i};var Pi=Rt;Rt.default=Rt;let pi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in t)this[n]=t[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var $r=pi;pi.default=pi;let Sc=$r,fi=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new Sc(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Mi=fi;fi.default=fi;const Kn=39,Ss=34,Qt=92,_s=47,en=10,wt=32,tn=12,nn=9,sn=13,_c=91,Ac=93,$c=40,Cc=41,Ic=123,Oc=125,Tc=59,Lc=42,Rc=58,Pc=64,rn=/[\t\n\f\r "#'()/;[\\\]{}]/g,on=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Mc=/.[\r\n"'(/\\]/,As=/[\da-f]/i;var Dc=function(e,t={}){let n=e.css.valueOf(),s=t.ignoreErrors,r,o,a,l,c,d,h,p,m,E,w=n.length,f=0,$=[],T=[];function L(){return f}function x(M){throw e.error("Unclosed "+M,f)}function A(){return T.length===0&&f>=w}function I(M){if(T.length)return T.pop();if(f>=w)return;let O=M?M.ignoreUnclosed:!1;switch(r=n.charCodeAt(f),r){case en:case wt:case nn:case sn:case tn:{o=f;do o+=1,r=n.charCodeAt(o);while(r===wt||r===en||r===nn||r===sn||r===tn);E=["space",n.slice(f,o)],f=o-1;break}case _c:case Ac:case Ic:case Oc:case Rc:case Tc:case Cc:{let j=String.fromCharCode(r);E=[j,j,f];break}case $c:{if(p=$.length?$.pop()[1]:"",m=n.charCodeAt(f+1),p==="url"&&m!==Kn&&m!==Ss&&m!==wt&&m!==en&&m!==nn&&m!==tn&&m!==sn){o=f;do{if(d=!1,o=n.indexOf(")",o+1),o===-1)if(s||O){o=f;break}else x("bracket");for(h=o;n.charCodeAt(h-1)===Qt;)h-=1,d=!d}while(d);E=["brackets",n.slice(f,o+1),f,o],f=o}else o=n.indexOf(")",f+1),l=n.slice(f,o+1),o===-1||Mc.test(l)?E=["(","(",f]:(E=["brackets",l,f,o],f=o);break}case Kn:case Ss:{a=r===Kn?"'":'"',o=f;do{if(d=!1,o=n.indexOf(a,o+1),o===-1)if(s||O){o=f+1;break}else x("string");for(h=o;n.charCodeAt(h-1)===Qt;)h-=1,d=!d}while(d);E=["string",n.slice(f,o+1),f,o],f=o;break}case Pc:{rn.lastIndex=f+1,rn.test(n),rn.lastIndex===0?o=n.length-1:o=rn.lastIndex-2,E=["at-word",n.slice(f,o+1),f,o],f=o;break}case Qt:{for(o=f,c=!0;n.charCodeAt(o+1)===Qt;)o+=1,c=!c;if(r=n.charCodeAt(o+1),c&&r!==_s&&r!==wt&&r!==en&&r!==nn&&r!==sn&&r!==tn&&(o+=1,As.test(n.charAt(o)))){for(;As.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===wt&&(o+=1)}E=["word",n.slice(f,o+1),f,o],f=o;break}default:{r===_s&&n.charCodeAt(f+1)===Lc?(o=n.indexOf("*/",f+2)+1,o===0&&(s||O?o=n.length:x("comment")),E=["comment",n.slice(f,o+1),f,o],f=o):(on.lastIndex=f+1,on.test(n),on.lastIndex===0?o=n.length-1:o=on.lastIndex-2,E=["word",n.slice(f,o+1),f,o],$.push(E),f=o);break}}return f++,E}function R(M){T.push(M)}return{back:R,endOfFile:A,nextToken:I,position:L}};let Cr=Xe,wn=class extends Cr{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Di=wn;wn.default=wn;Cr.registerAtRule(wn);let Ir=Xe,Or,Tr,ht=class extends Ir{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let s=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let r of s)r.raws.before=t.raws.before}return s}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Or(new Tr,this,e).stringify()}};ht.registerLazyResult=i=>{Or=i};ht.registerProcessor=i=>{Tr=i};var qt=ht;ht.default=ht;Ir.registerRoot(ht);let Pt={comma(i){return Pt.split(i,[","],!0)},space(i){let e=[" ",`
619
+ `," "];return Pt.split(i,e)},split(i,e,t){let n=[],s="",r=!1,o=0,a=!1,l="",c=!1;for(let d of i)c?c=!1:d==="\\"?c=!0:a?d===l&&(a=!1):d==='"'||d==="'"?(a=!0,l=d):d==="("?o+=1:d===")"?o>0&&(o-=1):o===0&&e.includes(d)&&(r=!0),r?(s!==""&&n.push(s.trim()),s="",r=!1):s+=d;return(t||s!=="")&&n.push(s.trim()),n}};var Lr=Pt;Pt.default=Pt;let Rr=Xe,Nc=Lr,xn=class extends Rr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Nc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};var Ni=xn;xn.default=xn;Rr.registerRule(xn);let jc=Tn,Bc=Dc,zc=Rn,Uc=Di,Hc=qt,$s=Ni;const Cs={empty:!0,space:!0};function Fc(i){for(let e=i.length-1;e>=0;e--){let t=i[e],n=t[3]||t[2];if(n)return n}}let Wc=class{constructor(e){this.input=e,this.root=new Hc,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Uc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,s,r,o=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){a=!0;break}else if(n==="}"){if(l.length>0){for(r=l.length-1,s=l[r];s&&s[0]==="space";)s=l[--r];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,s;for(let r=t-1;r>=0&&(s=e[r],!(s[0]!=="space"&&(n+=1,n===2)));r--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,n,s,r;for(let[o,a]of e.entries()){if(n=a,s=n[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=n}return!1}comment(e){let t=new zc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let s=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=Bc(this.input)}decl(e,t){let n=new jc;this.init(n,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(s[3]||s[2]||Fc(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let r;for(;e.length;)if(r=e.shift(),r[0]===":"){n.raws.between+=r[1];break}else r[0]==="word"&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(r=e[c],r[1].toLowerCase()==="!important"){n.important=!0;let d=this.stringFrom(e,c);d=this.spacesFromEnd(e)+d,d!==" !important"&&(n.raws.important=d);break}else if(r[1].toLowerCase()==="important"){let d=e.slice(0),h="";for(let p=c;p>0;p--){let m=d[p][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=d.pop()[1]+h}h.trim().indexOf("!")===0&&(n.important=!0,n.raws.important=h,e=d)}if(r[0]!=="space"&&r[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(n.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new $s;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,n=null,s=!1,r=null,o=[],a=e[1].startsWith("--"),l=[],c=e;for(;c;){if(n=c[0],l.push(c),n==="("||n==="[")r||(r=c),o.push(n==="("?")":"]");else if(a&&s&&n==="{")r||(r=c),o.push("}");else if(o.length===0)if(n===";")if(s){this.decl(l,a);return}else break;else if(n==="{"){this.rule(l);return}else if(n==="}"){this.tokenizer.back(l.pop()),t=!0;break}else n===":"&&(s=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(r=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(r),t&&s){if(!a)for(;l.length&&(c=l[l.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,s){let r,o,a=n.length,l="",c=!0,d,h;for(let p=0;p<a;p+=1)r=n[p],o=r[0],o==="space"&&p===a-1&&!s?c=!1:o==="comment"?(h=n[p-1]?n[p-1][0]:"empty",d=n[p+1]?n[p+1][0]:"empty",!Cs[h]&&!Cs[d]?l.slice(-1)===","?c=!1:l+=r[1]:c=!1):l+=r[1];if(!c){let p=n.reduce((m,E)=>m+E[1],"");e.raws[t]={raw:p,value:l}}e[t]=l}rule(e){e.pop();let t=new $s;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let s=t;s<e.length;s++)n+=e[s][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var qc=Wc;let Vc=Xe,Gc=qc,Kc=Ln;function kn(i,e){let t=new Kc(i,e),n=new Gc(t);try{n.parse()}catch(s){throw s}return n.root}var ji=kn;kn.default=kn;Vc.registerParse(kn);let{isClean:Ee,my:Zc}=Wt,Xc=gr,Jc=In,Yc=Xe,Qc=Pi,Is=Mi,ed=ji,td=qt;const nd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},id={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},sd={Once:!0,postcssPlugin:!0,prepare:!0},pt=0;function xt(i){return typeof i=="object"&&typeof i.then=="function"}function Pr(i){let e=!1,t=nd[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,pt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,pt,t+"Exit"]:[t,t+"Exit"]}function Os(i){let e;return i.type==="document"?e=["Document",pt,"DocumentExit"]:i.type==="root"?e=["Root",pt,"RootExit"]:e=Pr(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function gi(i){return i[Ee]=!1,i.nodes&&i.nodes.forEach(e=>gi(e)),i}let mi={},ft=class Mr{constructor(e,t,n){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=gi(t);else if(t instanceof Mr||t instanceof Is)s=gi(t.root),t.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let r=ed;n.syntax&&(r=n.syntax.parse),n.parser&&(r=n.parser),r.parse&&(r=r.parse);try{s=r(t,n)}catch(o){this.processed=!0,this.error=o}s&&!s[Zc]&&Yc.rebuild(s)}this.result=new Is(e,s,n),this.helpers={...mi,postcss:mi,result:this.result},this.plugins=this.processor.plugins.map(r=>typeof r=="object"&&r.prepare?{...r,...r.prepare(this.result)}:r)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,n,s)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!id[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!sd[n])if(typeof t[n]=="object")for(let s in t[n])s==="*"?e(t,n,t[n][s]):e(t,n+"-"+s.toLowerCase(),t[n][s]);else typeof t[n]=="function"&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(xt(n))try{await n}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ee];){e[Ee]=!0;let t=[Os(e)];for(;t.length>0;){let n=this.visitTick(t);if(xt(n))try{await n}catch(s){let r=t[t.length-1].node;throw this.handleError(s,r)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(r=>n(r,this.helpers));await Promise.all(s)}else await n(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return xt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Jc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Xc(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(xt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ee];)e[Ee]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,s]of e){this.result.lastPlugin=n;let r;try{r=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(xt(r))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:s}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(n.toProxy(),this.helpers)}catch(l){throw this.handleError(l,n)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!a[Ee]){a[Ee]=!0,e.push(Os(a));return}t.iterator=0,delete n.indexes[o]}let r=t.events;for(;t.eventIndex<r.length;){let o=r[t.eventIndex];if(t.eventIndex+=1,o===pt){n.nodes&&n.nodes.length&&(n[Ee]=!0,t.iterator=n.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ee]=!0;let t=Pr(e);for(let n of t)if(n===pt)e.nodes&&e.each(s=>{s[Ee]||this.walkSync(s)});else{let s=this.listeners[n];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ft.registerPostcss=i=>{mi=i};var Dr=ft;ft.default=ft;td.registerLazyResult(ft);Qc.registerLazyResult(ft);let rd=gr,od=In,ad=ji;const ld=Mi;let vi=class{constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s,r=od;this.result=new ld(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new rd(r,s,this._opts,t);if(a.isMap()){let[l,c]=a.generate();l&&(this.result.css=l),c&&(this.result.map=c)}}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=ad;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var cd=vi;vi.default=vi;let dd=cd,ud=Dr,hd=Pi,pd=qt,Mt=class{constructor(e=[]){this.version="8.4.32",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length===0&&typeof t.parser>"u"&&typeof t.stringifier>"u"&&typeof t.syntax>"u"?new dd(this,e,t):new ud(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var fd=Mt;Mt.default=Mt;pd.registerProcessor(Mt);hd.registerProcessor(Mt);let gd=Tn,md=dr,vd=Rn,bd=Di,yd=Ln,wd=qt,xd=Ni;function Dt(i,e){if(Array.isArray(i))return i.map(s=>Dt(s));let{inputs:t,...n}=i;if(t){e=[];for(let s of t){let r={...s,__proto__:yd.prototype};r.map&&(r.map={...r.map,__proto__:md.prototype}),e.push(r)}}if(n.nodes&&(n.nodes=i.nodes.map(s=>Dt(s,e))),n.source){let{inputId:s,...r}=n.source;n.source=r,s!=null&&(n.source.input=e[s])}if(n.type==="root")return new wd(n);if(n.type==="decl")return new gd(n);if(n.type==="rule")return new xd(n);if(n.type==="comment")return new vd(n);if(n.type==="atrule")return new bd(n);throw new Error("Unknown node type: "+i.type)}var kd=Dt;Dt.default=Dt;var Ts={};let Ed=Ti,Nr=Tn,Sd=Dr,_d=Xe,Bi=fd,Ad=In,$d=kd,jr=Pi,Cd=$r,Br=Rn,zr=Di,Id=Mi,Od=Ln,Td=ji,Ld=Lr,Ur=Ni,Hr=qt,Rd=On;function P(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Bi(i)}P.plugin=function(e,t){let n=!1;function s(...o){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
637
620
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Ts.LANG&&Ts.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
638
- https://www.w3ctech.com/topic/2226`));let a=t(...r);return a.postcssPlugin=e,a.postcssVersion=new Bi().version,a}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(r,a,l){return R([s(l)]).process(r,a)},s};R.stringify=Sd;R.parse=Od;R.fromJSON=_d;R.list=Id;R.comment=i=>new zr(i);R.atRule=i=>new Ur(i);R.decl=i=>new jr(i);R.rule=i=>new Fr(i);R.root=i=>new Hr(i);R.document=i=>new Br(i);R.CssSyntaxError=xd;R.Declaration=jr;R.Container=Ed;R.Processor=Bi;R.Document=Br;R.Comment=zr;R.Warning=Ad;R.AtRule=Ur;R.Result=$d;R.Input=Cd;R.Rule=Fr;R.Root=Hr;R.Node=Td;kd.registerPostcss(R);var Ld=R;R.default=R;const F=ar(Ld);F.stringify;F.fromJSON;F.plugin;F.parse;F.list;F.document;F.comment;F.atRule;F.rule;F.decl;F.root;F.CssSyntaxError;F.Declaration;F.Container;F.Processor;F.Document;F.Comment;F.Warning;F.AtRule;F.Result;F.Input;F.Rule;F.Root;F.Node;var Pd=function(e){const t=e.prefix,n=/\s+$/.test(t)?t:`${t} `,s=e.ignoreFiles?[].concat(e.ignoreFiles):[],o=e.includeFiles?[].concat(e.includeFiles):[];return function(r){s.length&&r.source.input.file&&Ls(r.source.input.file,s)||o.length&&r.source.input.file&&!Ls(r.source.input.file,o)||r.walkRules(a=>{const l=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes"];a.parent&&l.includes(a.parent.name)||(a.selectors=a.selectors.map(c=>e.exclude&&Rd(c,e.exclude)?c:e.transform?e.transform(t,c,n+c,r.source.input.file,a):n+c))})}};function Ls(i,e){return e.some(t=>t instanceof RegExp?t.test(i):i.includes(t))}function Rd(i,e){return e.some(t=>t instanceof RegExp?t.test(i):i===t)}const Md=ar(Pd),Dd="code{white-space:pre}.example{display:flex;flex-wrap:wrap;flex-direction:row;align-items:center;gap:16px}.example>*{flex:1 1 500px}.example .tab-control{overflow:hidden}.example div[role=tab]{cursor:pointer;padding:8px 16px;display:inline-block;font-size:16px;border-bottom:2px solid transparent;background-clip:padding-box;-webkit-user-select:none;user-select:none}.example div[role=tab]:hover{background-color:#1467ba14}.example div[role=tab][selected]{background-color:#1467ba21;border-bottom:2px solid #1467ba}.tab-content{margin:16px 0}.tab-content>pre{padding-top:0}.tab-content.code{max-height:500px;overflow:auto}.tab-content.code pre{margin:0}",Nd="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}";function jd(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Wr(i){return i instanceof Map?i.clear=i.delete=i.set=function(){throw new Error("map is read-only")}:i instanceof Set&&(i.add=i.clear=i.delete=function(){throw new Error("set is read-only")}),Object.freeze(i),Object.getOwnPropertyNames(i).forEach(e=>{const t=i[e],n=typeof t;(n==="object"||n==="function")&&!Object.isFrozen(t)&&Wr(t)}),i}class Ps{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function qr(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Pe(i,...e){const t=Object.create(null);for(const n in i)t[n]=i[n];return e.forEach(function(n){for(const s in n)t[s]=n[s]}),t}const Bd="</span>",Rs=i=>!!i.scope,zd=(i,{prefix:e})=>{if(i.startsWith("language:"))return i.replace("language:","language-");if(i.includes(".")){const t=i.split(".");return[`${e}${t.shift()}`,...t.map((n,s)=>`${n}${"_".repeat(s+1)}`)].join(" ")}return`${e}${i}`};class Ud{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=qr(e)}openNode(e){if(!Rs(e))return;const t=zd(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){Rs(e)&&(this.buffer+=Bd)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const Ms=(i={})=>{const e={children:[]};return Object.assign(e,i),e};class zi{constructor(){this.rootNode=Ms(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=Ms({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t=="string"?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(n=>this._walk(e,n)),e.closeNode(t)),e}static _collapse(e){typeof e!="string"&&e.children&&(e.children.every(t=>typeof t=="string")?e.children=[e.children.join("")]:e.children.forEach(t=>{zi._collapse(t)}))}}class Fd extends zi{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new Ud(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Mt(i){return i?typeof i=="string"?i:i.source:null}function Vr(i){return Ge("(?=",i,")")}function Hd(i){return Ge("(?:",i,")*")}function Wd(i){return Ge("(?:",i,")?")}function Ge(...i){return i.map(e=>Mt(e)).join("")}function qd(i){const e=i[i.length-1];return typeof e=="object"&&e.constructor===Object?(i.splice(i.length-1,1),e):{}}function Ui(...i){return"("+(qd(i).capture?"":"?:")+i.map(e=>Mt(e)).join("|")+")"}function Gr(i){return new RegExp(i.toString()+"|").exec("").length-1}function Vd(i,e){const t=i&&i.exec(e);return t&&t.index===0}const Gd=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Fi(i,{joinWith:e}){let t=0;return i.map(n=>{t+=1;const s=t;let o=Mt(n),r="";for(;o.length>0;){const a=Gd.exec(o);if(!a){r+=o;break}r+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?r+="\\"+String(Number(a[1])+s):(r+=a[0],a[0]==="("&&t++)}return r}).map(n=>`(${n})`).join(e)}const Kd=/\b\B/,Kr="[a-zA-Z]\\w*",Hi="[a-zA-Z_]\\w*",Zr="\\b\\d+(\\.\\d+)?",Xr="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Jr="\\b(0b[01]+)",Zd="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Xd=(i={})=>{const e=/^#![ ]*\//;return i.binary&&(i.begin=Ge(e,/.*\b/,i.binary,/\b.*/)),Pe({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,n)=>{t.index!==0&&n.ignoreMatch()}},i)},Dt={begin:"\\\\[\\s\\S]",relevance:0},Jd={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Dt]},Yd={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Dt]},Qd={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Ln=function(i,e,t={}){const n=Pe({scope:"comment",begin:i,end:e,contains:[]},t);n.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const s=Ui("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return n.contains.push({begin:Ge(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},eu=Ln("//","$"),tu=Ln("/\\*","\\*/"),nu=Ln("#","$"),iu={scope:"number",begin:Zr,relevance:0},su={scope:"number",begin:Xr,relevance:0},ru={scope:"number",begin:Jr,relevance:0},ou={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Dt,{begin:/\[/,end:/\]/,relevance:0,contains:[Dt]}]},au={scope:"title",begin:Kr,relevance:0},lu={scope:"title",begin:Hi,relevance:0},cu={begin:"\\.\\s*"+Hi,relevance:0},du=function(i){return Object.assign(i,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var rn=Object.freeze({__proto__:null,APOS_STRING_MODE:Jd,BACKSLASH_ESCAPE:Dt,BINARY_NUMBER_MODE:ru,BINARY_NUMBER_RE:Jr,COMMENT:Ln,C_BLOCK_COMMENT_MODE:tu,C_LINE_COMMENT_MODE:eu,C_NUMBER_MODE:su,C_NUMBER_RE:Xr,END_SAME_AS_BEGIN:du,HASH_COMMENT_MODE:nu,IDENT_RE:Kr,MATCH_NOTHING_RE:Kd,METHOD_GUARD:cu,NUMBER_MODE:iu,NUMBER_RE:Zr,PHRASAL_WORDS_MODE:Qd,QUOTE_STRING_MODE:Yd,REGEXP_MODE:ou,RE_STARTERS_RE:Zd,SHEBANG:Xd,TITLE_MODE:au,UNDERSCORE_IDENT_RE:Hi,UNDERSCORE_TITLE_MODE:lu});function uu(i,e){i.input[i.index-1]==="."&&e.ignoreMatch()}function hu(i,e){i.className!==void 0&&(i.scope=i.className,delete i.className)}function pu(i,e){e&&i.beginKeywords&&(i.begin="\\b("+i.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",i.__beforeBegin=uu,i.keywords=i.keywords||i.beginKeywords,delete i.beginKeywords,i.relevance===void 0&&(i.relevance=0))}function fu(i,e){Array.isArray(i.illegal)&&(i.illegal=Ui(...i.illegal))}function gu(i,e){if(i.match){if(i.begin||i.end)throw new Error("begin & end are not supported with match");i.begin=i.match,delete i.match}}function mu(i,e){i.relevance===void 0&&(i.relevance=1)}const vu=(i,e)=>{if(!i.beforeMatch)return;if(i.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},i);Object.keys(i).forEach(n=>{delete i[n]}),i.keywords=t.keywords,i.begin=Ge(t.beforeMatch,Vr(t.begin)),i.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},i.relevance=0,delete t.beforeMatch},bu=["of","and","for","in","not","or","if","then","parent","list","value"],yu="keyword";function Yr(i,e,t=yu){const n=Object.create(null);return typeof i=="string"?s(t,i.split(" ")):Array.isArray(i)?s(t,i):Object.keys(i).forEach(function(o){Object.assign(n,Yr(i[o],e,o))}),n;function s(o,r){e&&(r=r.map(a=>a.toLowerCase())),r.forEach(function(a){const l=a.split("|");n[l[0]]=[o,wu(l[0],l[1])]})}}function wu(i,e){return e?Number(e):xu(i)?0:1}function xu(i){return bu.includes(i.toLowerCase())}const Ds={},Fe=i=>{console.error(i)},Ns=(i,...e)=>{console.log(`WARN: ${i}`,...e)},Qe=(i,e)=>{Ds[`${i}/${e}`]||(console.log(`Deprecated as of ${i}. ${e}`),Ds[`${i}/${e}`]=!0)},kn=new Error;function Qr(i,e,{key:t}){let n=0;const s=i[t],o={},r={};for(let a=1;a<=e.length;a++)r[a+n]=s[a],o[a+n]=!0,n+=Gr(e[a-1]);i[t]=r,i[t]._emit=o,i[t]._multi=!0}function ku(i){if(Array.isArray(i.begin)){if(i.skip||i.excludeBegin||i.returnBegin)throw Fe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),kn;if(typeof i.beginScope!="object"||i.beginScope===null)throw Fe("beginScope must be object"),kn;Qr(i,i.begin,{key:"beginScope"}),i.begin=Fi(i.begin,{joinWith:""})}}function Eu(i){if(Array.isArray(i.end)){if(i.skip||i.excludeEnd||i.returnEnd)throw Fe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),kn;if(typeof i.endScope!="object"||i.endScope===null)throw Fe("endScope must be object"),kn;Qr(i,i.end,{key:"endScope"}),i.end=Fi(i.end,{joinWith:""})}}function Su(i){i.scope&&typeof i.scope=="object"&&i.scope!==null&&(i.beginScope=i.scope,delete i.scope)}function _u(i){Su(i),typeof i.beginScope=="string"&&(i.beginScope={_wrap:i.beginScope}),typeof i.endScope=="string"&&(i.endScope={_wrap:i.endScope}),ku(i),Eu(i)}function Au(i){function e(r,a){return new RegExp(Mt(r),"m"+(i.case_insensitive?"i":"")+(i.unicodeRegex?"u":"")+(a?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=Gr(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=e(Fi(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const c=l.findIndex((h,p)=>p>0&&h!==void 0),d=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,d)}}class n{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new t;return this.rules.slice(a).forEach(([c,d])=>l.addRule(c,d)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(a);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,c=d.exec(a)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function s(r){const a=new n;return r.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),r.terminatorEnd&&a.addRule(r.terminatorEnd,{type:"end"}),r.illegal&&a.addRule(r.illegal,{type:"illegal"}),a}function o(r,a){const l=r;if(r.isCompiled)return l;[hu,gu,_u,vu].forEach(d=>d(r,a)),i.compilerExtensions.forEach(d=>d(r,a)),r.__beforeBegin=null,[pu,fu,mu].forEach(d=>d(r,a)),r.isCompiled=!0;let c=null;return typeof r.keywords=="object"&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords),c=r.keywords.$pattern,delete r.keywords.$pattern),c=c||/\w+/,r.keywords&&(r.keywords=Yr(r.keywords,i.case_insensitive)),l.keywordPatternRe=e(c,!0),a&&(r.begin||(r.begin=/\B|\b/),l.beginRe=e(l.begin),!r.end&&!r.endsWithParent&&(r.end=/\B|\b/),r.end&&(l.endRe=e(l.end)),l.terminatorEnd=Mt(l.end)||"",r.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(r.end?"|":"")+a.terminatorEnd)),r.illegal&&(l.illegalRe=e(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map(function(d){return $u(d==="self"?r:d)})),r.contains.forEach(function(d){o(d,l)}),r.starts&&o(r.starts,a),l.matcher=s(l),l}if(i.compilerExtensions||(i.compilerExtensions=[]),i.contains&&i.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return i.classNameAliases=Pe(i.classNameAliases||{}),o(i)}function eo(i){return i?i.endsWithParent||eo(i.starts):!1}function $u(i){return i.variants&&!i.cachedVariants&&(i.cachedVariants=i.variants.map(function(e){return Pe(i,{variants:null},e)})),i.cachedVariants?i.cachedVariants:eo(i)?Pe(i,{starts:i.starts?Pe(i.starts):null}):Object.isFrozen(i)?Pe(i):i}var Cu="11.9.0";class Ou extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Gn=qr,js=Pe,Bs=Symbol("nomatch"),Iu=7,to=function(i){const e=Object.create(null),t=Object.create(null),n=[];let s=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",r={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Fd};function l(u){return a.noHighlightRe.test(u)}function c(u){let v=u.className+" ";v+=u.parentNode?u.parentNode.className:"";const k=a.languageDetectRe.exec(v);if(k){const C=I(k[1]);return C||(Ns(o.replace("{}",k[1])),Ns("Falling back to no-highlight mode for this block.",u)),C?k[1]:"no-highlight"}return v.split(/\s+/).find(C=>l(C)||I(C))}function d(u,v,k){let C="",B="";typeof v=="object"?(C=u,k=v.ignoreIllegals,B=v.language):(Qe("10.7.0","highlight(lang, code, ...args) has been deprecated."),Qe("10.7.0",`Please use highlight(code, options) instead.
639
- https://github.com/highlightjs/highlight.js/issues/2277`),B=u,C=v),k===void 0&&(k=!0);const K={code:C,language:B};ne("before:highlight",K);const oe=K.result?K.result:h(K.language,K.code,k);return oe.code=K.code,ne("after:highlight",oe),oe}function h(u,v,k,C){const B=Object.create(null);function K(g,b){return g.keywords[b]}function oe(){if(!S.keywords){W.addText(D);return}let g=0;S.keywordPatternRe.lastIndex=0;let b=S.keywordPatternRe.exec(D),_="";for(;b;){_+=D.substring(g,b.index);const N=ae.case_insensitive?b[0].toLowerCase():b[0],Q=K(S,N);if(Q){const[$e,uo]=Q;if(W.addText(_),_="",B[N]=(B[N]||0)+1,B[N]<=Iu&&(Ne+=uo),$e.startsWith("_"))_+=b[0];else{const ho=ae.classNameAliases[$e]||$e;Y(b[0],ho)}}else _+=b[0];g=S.keywordPatternRe.lastIndex,b=S.keywordPatternRe.exec(D)}_+=D.substring(g),W.addText(_)}function me(){if(D==="")return;let g=null;if(typeof S.subLanguage=="string"){if(!e[S.subLanguage]){W.addText(D);return}g=h(S.subLanguage,D,!0,xe[S.subLanguage]),xe[S.subLanguage]=g._top}else g=m(D,S.subLanguage.length?S.subLanguage:null);S.relevance>0&&(Ne+=g.relevance),W.__addSublanguage(g._emitter,g.language)}function H(){S.subLanguage!=null?me():oe(),D=""}function Y(g,b){g!==""&&(W.startScope(b),W.addText(g),W.endScope())}function De(g,b){let _=1;const N=b.length-1;for(;_<=N;){if(!g._emit[_]){_++;continue}const Q=ae.classNameAliases[g[_]]||g[_],$e=b[_];Q?Y($e,Q):(D=$e,oe(),D=""),_++}}function we(g,b){return g.scope&&typeof g.scope=="string"&&W.openNode(ae.classNameAliases[g.scope]||g.scope),g.beginScope&&(g.beginScope._wrap?(Y(D,ae.classNameAliases[g.beginScope._wrap]||g.beginScope._wrap),D=""):g.beginScope._multi&&(De(g.beginScope,b),D="")),S=Object.create(g,{parent:{value:S}}),S}function Ke(g,b,_){let N=Vd(g.endRe,_);if(N){if(g["on:end"]){const Q=new Ps(g);g["on:end"](b,Q),Q.isMatchIgnored&&(N=!1)}if(N){for(;g.endsParent&&g.parent;)g=g.parent;return g}}if(g.endsWithParent)return Ke(g.parent,b,_)}function Rn(g){return S.matcher.regexIndex===0?(D+=g[0],1):(Je=!0,0)}function pt(g){const b=g[0],_=g.rule,N=new Ps(_),Q=[_.__beforeBegin,_["on:begin"]];for(const $e of Q)if($e&&($e(g,N),N.isMatchIgnored))return Rn(b);return _.skip?D+=b:(_.excludeBegin&&(D+=b),H(),!_.returnBegin&&!_.excludeBegin&&(D=b)),we(_,g),_.returnBegin?0:b.length}function Mn(g){const b=g[0],_=v.substring(g.index),N=Ke(S,g,_);if(!N)return Bs;const Q=S;S.endScope&&S.endScope._wrap?(H(),Y(b,S.endScope._wrap)):S.endScope&&S.endScope._multi?(H(),De(S.endScope,g)):Q.skip?D+=b:(Q.returnEnd||Q.excludeEnd||(D+=b),H(),Q.excludeEnd&&(D=b));do S.scope&&W.closeNode(),!S.skip&&!S.subLanguage&&(Ne+=S.relevance),S=S.parent;while(S!==N.parent);return N.starts&&we(N.starts,g),Q.returnEnd?0:b.length}function Wt(){const g=[];for(let b=S;b!==ae;b=b.parent)b.scope&&g.unshift(b.scope);g.forEach(b=>W.openNode(b))}let Ze={};function qt(g,b){const _=b&&b[0];if(D+=g,_==null)return H(),0;if(Ze.type==="begin"&&b.type==="end"&&Ze.index===b.index&&_===""){if(D+=v.slice(b.index,b.index+1),!s){const N=new Error(`0 width match regex (${u})`);throw N.languageName=u,N.badRule=Ze.rule,N}return 1}if(Ze=b,b.type==="begin")return pt(b);if(b.type==="illegal"&&!k){const N=new Error('Illegal lexeme "'+_+'" for mode "'+(S.scope||"<unnamed>")+'"');throw N.mode=S,N}else if(b.type==="end"){const N=Mn(b);if(N!==Bs)return N}if(b.type==="illegal"&&_==="")return 1;if(Xe>1e5&&Xe>b.index*3)throw new Error("potential infinite loop, way more iterations than matches");return D+=_,_.length}const ae=I(u);if(!ae)throw Fe(o.replace("{}",u)),new Error('Unknown language: "'+u+'"');const Vt=Au(ae);let ft="",S=C||Vt;const xe={},W=new a.__emitter(a);Wt();let D="",Ne=0,ve=0,Xe=0,Je=!1;try{if(ae.__emitTokens)ae.__emitTokens(v,W);else{for(S.matcher.considerAll();;){Xe++,Je?Je=!1:S.matcher.considerAll(),S.matcher.lastIndex=ve;const g=S.matcher.exec(v);if(!g)break;const b=v.substring(ve,g.index),_=qt(b,g);ve=g.index+_}qt(v.substring(ve))}return W.finalize(),ft=W.toHTML(),{language:u,value:ft,relevance:Ne,illegal:!1,_emitter:W,_top:S}}catch(g){if(g.message&&g.message.includes("Illegal"))return{language:u,value:Gn(v),illegal:!0,relevance:0,_illegalBy:{message:g.message,index:ve,context:v.slice(ve-100,ve+100),mode:g.mode,resultSoFar:ft},_emitter:W};if(s)return{language:u,value:Gn(v),illegal:!1,relevance:0,errorRaised:g,_emitter:W,_top:S};throw g}}function p(u){const v={value:Gn(u),illegal:!1,relevance:0,_top:r,_emitter:new a.__emitter(a)};return v._emitter.addText(u),v}function m(u,v){v=v||a.languages||Object.keys(e);const k=p(u),C=v.filter(I).filter(q).map(H=>h(H,u,!1));C.unshift(k);const B=C.sort((H,Y)=>{if(H.relevance!==Y.relevance)return Y.relevance-H.relevance;if(H.language&&Y.language){if(I(H.language).supersetOf===Y.language)return 1;if(I(Y.language).supersetOf===H.language)return-1}return 0}),[K,oe]=B,me=K;return me.secondBest=oe,me}function E(u,v,k){const C=v&&t[v]||k;u.classList.add("hljs"),u.classList.add(`language-${C}`)}function w(u){let v=null;const k=c(u);if(l(k))return;if(ne("before:highlightElement",{el:u,language:k}),u.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",u);return}if(u.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(u)),a.throwUnescapedHTML))throw new Ou("One of your code blocks includes unescaped HTML.",u.innerHTML);v=u;const C=v.textContent,B=k?d(C,{language:k,ignoreIllegals:!0}):m(C);u.innerHTML=B.value,u.dataset.highlighted="yes",E(u,k,B.language),u.result={language:B.language,re:B.relevance,relevance:B.relevance},B.secondBest&&(u.secondBest={language:B.secondBest.language,relevance:B.secondBest.relevance}),ne("after:highlightElement",{el:u,result:B,text:C})}function f(u){a=js(a,u)}const $=()=>{x(),Qe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function T(){x(),Qe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let L=!1;function x(){if(document.readyState==="loading"){L=!0;return}document.querySelectorAll(a.cssSelector).forEach(w)}function A(){L&&x()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function O(u,v){let k=null;try{k=v(i)}catch(C){if(Fe("Language definition for '{}' could not be registered.".replace("{}",u)),s)Fe(C);else throw C;k=r}k.name||(k.name=u),e[u]=k,k.rawDefinition=v.bind(null,i),k.aliases&&j(k.aliases,{languageName:u})}function P(u){delete e[u];for(const v of Object.keys(t))t[v]===u&&delete t[v]}function M(){return Object.keys(e)}function I(u){return u=(u||"").toLowerCase(),e[u]||e[t[u]]}function j(u,{languageName:v}){typeof u=="string"&&(u=[u]),u.forEach(k=>{t[k.toLowerCase()]=v})}function q(u){const v=I(u);return v&&!v.disableAutodetect}function te(u){u["before:highlightBlock"]&&!u["before:highlightElement"]&&(u["before:highlightElement"]=v=>{u["before:highlightBlock"](Object.assign({block:v.el},v))}),u["after:highlightBlock"]&&!u["after:highlightElement"]&&(u["after:highlightElement"]=v=>{u["after:highlightBlock"](Object.assign({block:v.el},v))})}function G(u){te(u),n.push(u)}function ge(u){const v=n.indexOf(u);v!==-1&&n.splice(v,1)}function ne(u,v){const k=u;n.forEach(function(C){C[k]&&C[k](v)})}function J(u){return Qe("10.7.0","highlightBlock will be removed entirely in v12.0"),Qe("10.7.0","Please use highlightElement now."),w(u)}Object.assign(i,{highlight:d,highlightAuto:m,highlightAll:x,highlightElement:w,highlightBlock:J,configure:f,initHighlighting:$,initHighlightingOnLoad:T,registerLanguage:O,unregisterLanguage:P,listLanguages:M,getLanguage:I,registerAliases:j,autoDetection:q,inherit:js,addPlugin:G,removePlugin:ge}),i.debugMode=function(){s=!1},i.safeMode=function(){s=!0},i.versionString=Cu,i.regex={concat:Ge,lookahead:Vr,either:Ui,optional:Wd,anyNumberOfTimes:Hd};for(const u in rn)typeof rn[u]=="object"&&Wr(rn[u]);return Object.assign(i,rn),i},ut=to({});ut.newInstance=()=>to({});var Tu=ut;ut.HighlightJS=ut;ut.default=ut;const Pn=jd(Tu),En="[A-Za-z$_][0-9A-Za-z$_]*",no=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],io=["true","false","null","undefined","NaN","Infinity"],so=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ro=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],oo=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],ao=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],lo=[].concat(oo,so,ro);function Lu(i){const e=i.regex,t=(u,{after:v})=>{const k="</"+u[0].slice(1);return u.input.indexOf(k,v)!==-1},n=En,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(u,v)=>{const k=u[0].length+u.index,C=u.input[k];if(C==="<"||C===","){v.ignoreMatch();return}C===">"&&(t(u,{after:k})||v.ignoreMatch());let B;const K=u.input.substring(k);if(B=K.match(/^\s*=/)){v.ignoreMatch();return}if((B=K.match(/^\s+extends\s+/))&&B.index===0){v.ignoreMatch();return}}},a={$pattern:En,keyword:no,literal:io,built_in:lo,"variable.language":ao},l="[0-9](_?[0-9])*",c=`\\.(${l})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},m={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},E={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,p],subLanguage:"css"}},w={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},f={className:"string",begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,p]},$={className:"comment",variants:[i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},T=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,m,E,w,f,{match:/\$\d+/},h];p.contains=T.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(T)});const L=[].concat($,p.contains),x=L.concat([{begin:/\(/,end:/\)/,keywords:a,contains:["self"].concat(L)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x},O={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,e.concat(n,"(",e.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},P={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...so,...ro]}},M={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function q(u){return e.concat("(?!",u.join("|"),")")}const te={match:e.concat(/\b/,q([...oo,"super","import"]),n,e.lookahead(/\(/)),className:"title.function",relevance:0},G={begin:e.concat(/\./,e.lookahead(e.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ge={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},ne="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>",J={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(ne)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:x,CLASS_REFERENCE:P},illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",relevance:5}),M,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,m,E,w,f,$,{match:/\$\d+/},h,P,{className:"attr",begin:n+e.lookahead(":"),relevance:0},J,{begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[$,i.REGEXP_MODE,{className:"function",begin:ne,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,i.inherit(i.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},G,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},te,j,O,ge,{match:/\$[(.]/}]}}function Pu(i){const e=Lu(i),t=En,n=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[e.exports.CLASS_REFERENCE]},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:n},contains:[e.exports.CLASS_REFERENCE]},r={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},a=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],l={$pattern:En,keyword:no.concat(a),literal:io,built_in:lo.concat(n),"variable.language":ao},c={className:"meta",begin:"@"+t},d=(p,m,E)=>{const w=p.contains.findIndex(f=>f.label===m);if(w===-1)throw new Error("can not find mode to replace");p.contains.splice(w,1,E)};Object.assign(e.keywords,l),e.exports.PARAMS_CONTAINS.push(c),e.contains=e.contains.concat([c,s,o]),d(e,"shebang",i.SHEBANG()),d(e,"use_strict",r);const h=e.contains.find(p=>p.label==="func.def");return h.relevance=0,Object.assign(e,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),e}function Ru(i){const e=i.regex,t=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),n=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},r=i.inherit(o,{begin:/\(/,end:/\)/}),a=i.inherit(i.APOS_STRING_MODE,{className:"string"}),l=i.inherit(i.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:n,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,l,a,r,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,r,l,a]}]}]},i.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(t,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:c}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}const Mu=i=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:i.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:i.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Du=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Nu=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],ju=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],Bu=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],zu=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function Uu(i){const e=i.regex,t=Mu(i),n={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",o=/@-?\w[\w]*(-\w+)*/,r="[a-zA-Z-][a-zA-Z0-9_-]*",a=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[t.BLOCK_COMMENT,n,t.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+r,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+ju.join("|")+")"},{begin:":(:)?("+Bu.join("|")+")"}]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+zu.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[t.BLOCK_COMMENT,t.HEXCOLOR,t.IMPORTANT,t.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},t.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:Nu.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,t.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Du.join("|")+")\\b"}]}}const co=document.createElement("style");co.innerText=[Dd,Nd].join(`
640
- `);document.head.appendChild(co);Pn.registerLanguage("typescript",Pu);Pn.registerLanguage("html",Ru);Pn.registerLanguage("css",Uu);function Fu(...i){const e=document.createElement("div"),t=document.createElement("div");t.classList.add("tab-control");const n=document.createElement("div");return i.forEach(s=>{e.appendChild(s),s.addEventListener("click",()=>{i.forEach(o=>o.removeAttribute("selected")),s.setAttribute("selected",""),n.innerHTML="",n.appendChild(s.content),n.className=s.className,n.classList.add("tab-content")})}),t.appendChild(e),t.appendChild(n),n.classList.add("tab-content"),i[0].setAttribute("selected",""),n.appendChild(i[0].content),t}function yt(i,e){const t=document.createElement("div");return t.role="tab",t.tabIndex=0,t.innerText=i,t.content=e,e.tagName=="PRE"&&t.classList.add("code"),t}function kt(i,e){const t=document.createElement(i);return typeof e=="string"?t.innerHTML=e:e.forEach(n=>{t.appendChild(n)}),t}async function Hu(i,e,t){var n,s,o;const r=e.mainContent,a=kt("div",r);a.id=`example-preview-${t}`;const l=typeof e.css=="string"||(n=e.css)==null?void 0:n.label,c=typeof e.css=="string"?e.css:(s=e.css)==null?void 0:s.content,d=Fu(yt("Preview",a),yt("HTML",on("html",r)),...c?[yt(l??"CSS",on("css",c))]:[],...e.initializer&&e.initializer.content?[yt(e.initializer.label??"TS",on("typescript",e.initializer.content))]:[],...(e.additionalSources||[]).map(p=>yt(p.label,on(p.language,p.content))));e.description&&i.appendChild(kt("div",e.description));const h=kt("div",[d]);h.classList.add("example"),i.appendChild(h),c&&Wu(`#${a.id}`,c),(o=e.initializer)!=null&&o.initialize&&await e.initializer.initialize(a)}function on(i,e){let t=e.split(/\r?\n/).map(n=>{const s=n.indexOf("///");if(s>-1){const o=n.substring(s+3).trimStart();return o?n.replace(/^(\s*)([^\s].*)$/,`$1${o}`):void 0}return n}).filter(n=>typeof n<"u").join(`
641
- `).trim();return i&&i!="raw"&&(t=Pn.highlight(t,{language:i}).value),kt("pre",[kt("code",t)])}function Wu(i,e){const t=document.createElement("style");t.innerHTML=F().use(Md({prefix:i})).process(e).css,document.head.appendChild(t)}async function qu(i,e=document.body){const t=Gu(e);let n=0;Object.keys(i).forEach(async s=>{const o=document.createElement("div");o.className="example-container",t.appendChild(o);const r=i[s].default;Hu(o,r,n++)})}function Vu(i){const e=document.createElement("div");e.id="examples-container";const t=i.querySelector("#examples");return t?t.after(e):i.appendChild(e),e}function Gu(i){return i.children?Vu(i):i}const Ku=`<h1 id="@cas-smartdesign/token-selector">@cas-smartdesign/token-selector</h1>
621
+ https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Bi().version,a}let r;return Object.defineProperty(s,"postcss",{get(){return r||(r=s()),r}}),s.process=function(o,a,l){return P([s(l)]).process(o,a)},s};P.stringify=Ad;P.parse=Td;P.fromJSON=$d;P.list=Ld;P.comment=i=>new Br(i);P.atRule=i=>new zr(i);P.decl=i=>new Nr(i);P.rule=i=>new Ur(i);P.root=i=>new Hr(i);P.document=i=>new jr(i);P.CssSyntaxError=Ed;P.Declaration=Nr;P.Container=_d;P.Processor=Bi;P.Document=jr;P.Comment=Br;P.Warning=Cd;P.AtRule=zr;P.Result=Id;P.Input=Od;P.Rule=Ur;P.Root=Hr;P.Node=Rd;Sd.registerPostcss(P);var Pd=P;P.default=P;const H=or(Pd);H.stringify;H.fromJSON;H.plugin;H.parse;H.list;H.document;H.comment;H.atRule;H.rule;H.decl;H.root;H.CssSyntaxError;H.Declaration;H.Container;H.Processor;H.Document;H.Comment;H.Warning;H.AtRule;H.Result;H.Input;H.Rule;H.Root;H.Node;var Md=function(e){const t=e.prefix,n=/\s+$/.test(t)?t:`${t} `,s=e.ignoreFiles?[].concat(e.ignoreFiles):[],r=e.includeFiles?[].concat(e.includeFiles):[];return function(o){s.length&&o.source.input.file&&Ls(o.source.input.file,s)||r.length&&o.source.input.file&&!Ls(o.source.input.file,r)||o.walkRules(a=>{const l=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes"];a.parent&&l.includes(a.parent.name)||(a.selectors=a.selectors.map(c=>e.exclude&&Dd(c,e.exclude)?c:e.transform?e.transform(t,c,n+c,o.source.input.file,a):n+c))})}};function Ls(i,e){return e.some(t=>t instanceof RegExp?t.test(i):i.includes(t))}function Dd(i,e){return e.some(t=>t instanceof RegExp?t.test(i):i===t)}const Nd=or(Md),jd="code{white-space:pre}.example{display:flex;flex-wrap:wrap;flex-direction:row;align-items:center;gap:16px}.example>*{flex:1 1 500px}.example .tab-control{overflow:hidden}.example div[role=tab]{cursor:pointer;padding:8px 16px;display:inline-block;font-size:16px;border-bottom:2px solid transparent;background-clip:padding-box;-webkit-user-select:none;user-select:none}.example div[role=tab]:hover{background-color:#1467ba14}.example div[role=tab][selected]{background-color:#1467ba21;border-bottom:2px solid #1467ba}.tab-content{margin:16px 0}.tab-content>pre{padding-top:0}.tab-content.code{max-height:500px;overflow:auto}.tab-content.code pre{margin:0}",Bd="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}";function zd(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Fr(i){return i instanceof Map?i.clear=i.delete=i.set=function(){throw new Error("map is read-only")}:i instanceof Set&&(i.add=i.clear=i.delete=function(){throw new Error("set is read-only")}),Object.freeze(i),Object.getOwnPropertyNames(i).forEach(e=>{const t=i[e],n=typeof t;(n==="object"||n==="function")&&!Object.isFrozen(t)&&Fr(t)}),i}class Rs{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Wr(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Me(i,...e){const t=Object.create(null);for(const n in i)t[n]=i[n];return e.forEach(function(n){for(const s in n)t[s]=n[s]}),t}const Ud="</span>",Ps=i=>!!i.scope,Hd=(i,{prefix:e})=>{if(i.startsWith("language:"))return i.replace("language:","language-");if(i.includes(".")){const t=i.split(".");return[`${e}${t.shift()}`,...t.map((n,s)=>`${n}${"_".repeat(s+1)}`)].join(" ")}return`${e}${i}`};class Fd{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=Wr(e)}openNode(e){if(!Ps(e))return;const t=Hd(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){Ps(e)&&(this.buffer+=Ud)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const Ms=(i={})=>{const e={children:[]};return Object.assign(e,i),e};class zi{constructor(){this.rootNode=Ms(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=Ms({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t=="string"?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(n=>this._walk(e,n)),e.closeNode(t)),e}static _collapse(e){typeof e!="string"&&e.children&&(e.children.every(t=>typeof t=="string")?e.children=[e.children.join("")]:e.children.forEach(t=>{zi._collapse(t)}))}}class Wd extends zi{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new Fd(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Nt(i){return i?typeof i=="string"?i:i.source:null}function qr(i){return Je("(?=",i,")")}function qd(i){return Je("(?:",i,")*")}function Vd(i){return Je("(?:",i,")?")}function Je(...i){return i.map(e=>Nt(e)).join("")}function Gd(i){const e=i[i.length-1];return typeof e=="object"&&e.constructor===Object?(i.splice(i.length-1,1),e):{}}function Ui(...i){return"("+(Gd(i).capture?"":"?:")+i.map(e=>Nt(e)).join("|")+")"}function Vr(i){return new RegExp(i.toString()+"|").exec("").length-1}function Kd(i,e){const t=i&&i.exec(e);return t&&t.index===0}const Zd=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Hi(i,{joinWith:e}){let t=0;return i.map(n=>{t+=1;const s=t;let r=Nt(n),o="";for(;r.length>0;){const a=Zd.exec(r);if(!a){o+=r;break}o+=r.substring(0,a.index),r=r.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+s):(o+=a[0],a[0]==="("&&t++)}return o}).map(n=>`(${n})`).join(e)}const Xd=/\b\B/,Gr="[a-zA-Z]\\w*",Fi="[a-zA-Z_]\\w*",Kr="\\b\\d+(\\.\\d+)?",Zr="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Xr="\\b(0b[01]+)",Jd="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Yd=(i={})=>{const e=/^#![ ]*\//;return i.binary&&(i.begin=Je(e,/.*\b/,i.binary,/\b.*/)),Me({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,n)=>{t.index!==0&&n.ignoreMatch()}},i)},jt={begin:"\\\\[\\s\\S]",relevance:0},Qd={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[jt]},eu={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[jt]},tu={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Pn=function(i,e,t={}){const n=Me({scope:"comment",begin:i,end:e,contains:[]},t);n.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const s=Ui("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return n.contains.push({begin:Je(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},nu=Pn("//","$"),iu=Pn("/\\*","\\*/"),su=Pn("#","$"),ru={scope:"number",begin:Kr,relevance:0},ou={scope:"number",begin:Zr,relevance:0},au={scope:"number",begin:Xr,relevance:0},lu={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[jt,{begin:/\[/,end:/\]/,relevance:0,contains:[jt]}]},cu={scope:"title",begin:Gr,relevance:0},du={scope:"title",begin:Fi,relevance:0},uu={begin:"\\.\\s*"+Fi,relevance:0},hu=function(i){return Object.assign(i,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var an=Object.freeze({__proto__:null,APOS_STRING_MODE:Qd,BACKSLASH_ESCAPE:jt,BINARY_NUMBER_MODE:au,BINARY_NUMBER_RE:Xr,COMMENT:Pn,C_BLOCK_COMMENT_MODE:iu,C_LINE_COMMENT_MODE:nu,C_NUMBER_MODE:ou,C_NUMBER_RE:Zr,END_SAME_AS_BEGIN:hu,HASH_COMMENT_MODE:su,IDENT_RE:Gr,MATCH_NOTHING_RE:Xd,METHOD_GUARD:uu,NUMBER_MODE:ru,NUMBER_RE:Kr,PHRASAL_WORDS_MODE:tu,QUOTE_STRING_MODE:eu,REGEXP_MODE:lu,RE_STARTERS_RE:Jd,SHEBANG:Yd,TITLE_MODE:cu,UNDERSCORE_IDENT_RE:Fi,UNDERSCORE_TITLE_MODE:du});function pu(i,e){i.input[i.index-1]==="."&&e.ignoreMatch()}function fu(i,e){i.className!==void 0&&(i.scope=i.className,delete i.className)}function gu(i,e){e&&i.beginKeywords&&(i.begin="\\b("+i.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",i.__beforeBegin=pu,i.keywords=i.keywords||i.beginKeywords,delete i.beginKeywords,i.relevance===void 0&&(i.relevance=0))}function mu(i,e){Array.isArray(i.illegal)&&(i.illegal=Ui(...i.illegal))}function vu(i,e){if(i.match){if(i.begin||i.end)throw new Error("begin & end are not supported with match");i.begin=i.match,delete i.match}}function bu(i,e){i.relevance===void 0&&(i.relevance=1)}const yu=(i,e)=>{if(!i.beforeMatch)return;if(i.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},i);Object.keys(i).forEach(n=>{delete i[n]}),i.keywords=t.keywords,i.begin=Je(t.beforeMatch,qr(t.begin)),i.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},i.relevance=0,delete t.beforeMatch},wu=["of","and","for","in","not","or","if","then","parent","list","value"],xu="keyword";function Jr(i,e,t=xu){const n=Object.create(null);return typeof i=="string"?s(t,i.split(" ")):Array.isArray(i)?s(t,i):Object.keys(i).forEach(function(r){Object.assign(n,Jr(i[r],e,r))}),n;function s(r,o){e&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const l=a.split("|");n[l[0]]=[r,ku(l[0],l[1])]})}}function ku(i,e){return e?Number(e):Eu(i)?0:1}function Eu(i){return wu.includes(i.toLowerCase())}const Ds={},qe=i=>{console.error(i)},Ns=(i,...e)=>{console.log(`WARN: ${i}`,...e)},it=(i,e)=>{Ds[`${i}/${e}`]||(console.log(`Deprecated as of ${i}. ${e}`),Ds[`${i}/${e}`]=!0)},En=new Error;function Yr(i,e,{key:t}){let n=0;const s=i[t],r={},o={};for(let a=1;a<=e.length;a++)o[a+n]=s[a],r[a+n]=!0,n+=Vr(e[a-1]);i[t]=o,i[t]._emit=r,i[t]._multi=!0}function Su(i){if(Array.isArray(i.begin)){if(i.skip||i.excludeBegin||i.returnBegin)throw qe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),En;if(typeof i.beginScope!="object"||i.beginScope===null)throw qe("beginScope must be object"),En;Yr(i,i.begin,{key:"beginScope"}),i.begin=Hi(i.begin,{joinWith:""})}}function _u(i){if(Array.isArray(i.end)){if(i.skip||i.excludeEnd||i.returnEnd)throw qe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),En;if(typeof i.endScope!="object"||i.endScope===null)throw qe("endScope must be object"),En;Yr(i,i.end,{key:"endScope"}),i.end=Hi(i.end,{joinWith:""})}}function Au(i){i.scope&&typeof i.scope=="object"&&i.scope!==null&&(i.beginScope=i.scope,delete i.scope)}function $u(i){Au(i),typeof i.beginScope=="string"&&(i.beginScope={_wrap:i.beginScope}),typeof i.endScope=="string"&&(i.endScope={_wrap:i.endScope}),Su(i),_u(i)}function Cu(i){function e(o,a){return new RegExp(Nt(o),"m"+(i.case_insensitive?"i":"")+(i.unicodeRegex?"u":"")+(a?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=Vr(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=e(Hi(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const c=l.findIndex((h,p)=>p>0&&h!==void 0),d=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,d)}}class n{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new t;return this.rules.slice(a).forEach(([c,d])=>l.addRule(c,d)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(a);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,c=d.exec(a)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function s(o){const a=new n;return o.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function r(o,a){const l=o;if(o.isCompiled)return l;[fu,vu,$u,yu].forEach(d=>d(o,a)),i.compilerExtensions.forEach(d=>d(o,a)),o.__beforeBegin=null,[gu,mu,bu].forEach(d=>d(o,a)),o.isCompiled=!0;let c=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),c=o.keywords.$pattern,delete o.keywords.$pattern),c=c||/\w+/,o.keywords&&(o.keywords=Jr(o.keywords,i.case_insensitive)),l.keywordPatternRe=e(c,!0),a&&(o.begin||(o.begin=/\B|\b/),l.beginRe=e(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=e(l.end)),l.terminatorEnd=Nt(l.end)||"",o.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(l.illegalRe=e(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(d){return Iu(d==="self"?o:d)})),o.contains.forEach(function(d){r(d,l)}),o.starts&&r(o.starts,a),l.matcher=s(l),l}if(i.compilerExtensions||(i.compilerExtensions=[]),i.contains&&i.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return i.classNameAliases=Me(i.classNameAliases||{}),r(i)}function Qr(i){return i?i.endsWithParent||Qr(i.starts):!1}function Iu(i){return i.variants&&!i.cachedVariants&&(i.cachedVariants=i.variants.map(function(e){return Me(i,{variants:null},e)})),i.cachedVariants?i.cachedVariants:Qr(i)?Me(i,{starts:i.starts?Me(i.starts):null}):Object.isFrozen(i)?Me(i):i}var Ou="11.9.0";class Tu extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Zn=Wr,js=Me,Bs=Symbol("nomatch"),Lu=7,eo=function(i){const e=Object.create(null),t=Object.create(null),n=[];let s=!0;const r="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Wd};function l(u){return a.noHighlightRe.test(u)}function c(u){let v=u.className+" ";v+=u.parentNode?u.parentNode.className:"";const k=a.languageDetectRe.exec(v);if(k){const C=O(k[1]);return C||(Ns(r.replace("{}",k[1])),Ns("Falling back to no-highlight mode for this block.",u)),C?k[1]:"no-highlight"}return v.split(/\s+/).find(C=>l(C)||O(C))}function d(u,v,k){let C="",B="";typeof v=="object"?(C=u,k=v.ignoreIllegals,B=v.language):(it("10.7.0","highlight(lang, code, ...args) has been deprecated."),it("10.7.0",`Please use highlight(code, options) instead.
622
+ https://github.com/highlightjs/highlight.js/issues/2277`),B=u,C=v),k===void 0&&(k=!0);const K={code:C,language:B};ne("before:highlight",K);const oe=K.result?K.result:h(K.language,K.code,k);return oe.code=K.code,ne("after:highlight",oe),oe}function h(u,v,k,C){const B=Object.create(null);function K(g,y){return g.keywords[y]}function oe(){if(!S.keywords){W.addText(D);return}let g=0;S.keywordPatternRe.lastIndex=0;let y=S.keywordPatternRe.exec(D),_="";for(;y;){_+=D.substring(g,y.index);const N=ae.case_insensitive?y[0].toLowerCase():y[0],Q=K(S,N);if(Q){const[$e,co]=Q;if(W.addText(_),_="",B[N]=(B[N]||0)+1,B[N]<=Lu&&(ze+=co),$e.startsWith("_"))_+=y[0];else{const uo=ae.classNameAliases[$e]||$e;Y(y[0],uo)}}else _+=y[0];g=S.keywordPatternRe.lastIndex,y=S.keywordPatternRe.exec(D)}_+=D.substring(g),W.addText(_)}function ve(){if(D==="")return;let g=null;if(typeof S.subLanguage=="string"){if(!e[S.subLanguage]){W.addText(D);return}g=h(S.subLanguage,D,!0,xe[S.subLanguage]),xe[S.subLanguage]=g._top}else g=m(D,S.subLanguage.length?S.subLanguage:null);S.relevance>0&&(ze+=g.relevance),W.__addSublanguage(g._emitter,g.language)}function F(){S.subLanguage!=null?ve():oe(),D=""}function Y(g,y){g!==""&&(W.startScope(y),W.addText(g),W.endScope())}function Be(g,y){let _=1;const N=y.length-1;for(;_<=N;){if(!g._emit[_]){_++;continue}const Q=ae.classNameAliases[g[_]]||g[_],$e=y[_];Q?Y($e,Q):(D=$e,oe(),D=""),_++}}function we(g,y){return g.scope&&typeof g.scope=="string"&&W.openNode(ae.classNameAliases[g.scope]||g.scope),g.beginScope&&(g.beginScope._wrap?(Y(D,ae.classNameAliases[g.beginScope._wrap]||g.beginScope._wrap),D=""):g.beginScope._multi&&(Be(g.beginScope,y),D="")),S=Object.create(g,{parent:{value:S}}),S}function Ye(g,y,_){let N=Kd(g.endRe,_);if(N){if(g["on:end"]){const Q=new Rs(g);g["on:end"](y,Q),Q.isMatchIgnored&&(N=!1)}if(N){for(;g.endsParent&&g.parent;)g=g.parent;return g}}if(g.endsWithParent)return Ye(g.parent,y,_)}function Dn(g){return S.matcher.regexIndex===0?(D+=g[0],1):(tt=!0,0)}function mt(g){const y=g[0],_=g.rule,N=new Rs(_),Q=[_.__beforeBegin,_["on:begin"]];for(const $e of Q)if($e&&($e(g,N),N.isMatchIgnored))return Dn(y);return _.skip?D+=y:(_.excludeBegin&&(D+=y),F(),!_.returnBegin&&!_.excludeBegin&&(D=y)),we(_,g),_.returnBegin?0:y.length}function Nn(g){const y=g[0],_=v.substring(g.index),N=Ye(S,g,_);if(!N)return Bs;const Q=S;S.endScope&&S.endScope._wrap?(F(),Y(y,S.endScope._wrap)):S.endScope&&S.endScope._multi?(F(),Be(S.endScope,g)):Q.skip?D+=y:(Q.returnEnd||Q.excludeEnd||(D+=y),F(),Q.excludeEnd&&(D=y));do S.scope&&W.closeNode(),!S.skip&&!S.subLanguage&&(ze+=S.relevance),S=S.parent;while(S!==N.parent);return N.starts&&we(N.starts,g),Q.returnEnd?0:y.length}function Vt(){const g=[];for(let y=S;y!==ae;y=y.parent)y.scope&&g.unshift(y.scope);g.forEach(y=>W.openNode(y))}let Qe={};function Gt(g,y){const _=y&&y[0];if(D+=g,_==null)return F(),0;if(Qe.type==="begin"&&y.type==="end"&&Qe.index===y.index&&_===""){if(D+=v.slice(y.index,y.index+1),!s){const N=new Error(`0 width match regex (${u})`);throw N.languageName=u,N.badRule=Qe.rule,N}return 1}if(Qe=y,y.type==="begin")return mt(y);if(y.type==="illegal"&&!k){const N=new Error('Illegal lexeme "'+_+'" for mode "'+(S.scope||"<unnamed>")+'"');throw N.mode=S,N}else if(y.type==="end"){const N=Nn(y);if(N!==Bs)return N}if(y.type==="illegal"&&_==="")return 1;if(et>1e5&&et>y.index*3)throw new Error("potential infinite loop, way more iterations than matches");return D+=_,_.length}const ae=O(u);if(!ae)throw qe(r.replace("{}",u)),new Error('Unknown language: "'+u+'"');const Kt=Cu(ae);let vt="",S=C||Kt;const xe={},W=new a.__emitter(a);Vt();let D="",ze=0,be=0,et=0,tt=!1;try{if(ae.__emitTokens)ae.__emitTokens(v,W);else{for(S.matcher.considerAll();;){et++,tt?tt=!1:S.matcher.considerAll(),S.matcher.lastIndex=be;const g=S.matcher.exec(v);if(!g)break;const y=v.substring(be,g.index),_=Gt(y,g);be=g.index+_}Gt(v.substring(be))}return W.finalize(),vt=W.toHTML(),{language:u,value:vt,relevance:ze,illegal:!1,_emitter:W,_top:S}}catch(g){if(g.message&&g.message.includes("Illegal"))return{language:u,value:Zn(v),illegal:!0,relevance:0,_illegalBy:{message:g.message,index:be,context:v.slice(be-100,be+100),mode:g.mode,resultSoFar:vt},_emitter:W};if(s)return{language:u,value:Zn(v),illegal:!1,relevance:0,errorRaised:g,_emitter:W,_top:S};throw g}}function p(u){const v={value:Zn(u),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return v._emitter.addText(u),v}function m(u,v){v=v||a.languages||Object.keys(e);const k=p(u),C=v.filter(O).filter(q).map(F=>h(F,u,!1));C.unshift(k);const B=C.sort((F,Y)=>{if(F.relevance!==Y.relevance)return Y.relevance-F.relevance;if(F.language&&Y.language){if(O(F.language).supersetOf===Y.language)return 1;if(O(Y.language).supersetOf===F.language)return-1}return 0}),[K,oe]=B,ve=K;return ve.secondBest=oe,ve}function E(u,v,k){const C=v&&t[v]||k;u.classList.add("hljs"),u.classList.add(`language-${C}`)}function w(u){let v=null;const k=c(u);if(l(k))return;if(ne("before:highlightElement",{el:u,language:k}),u.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",u);return}if(u.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(u)),a.throwUnescapedHTML))throw new Tu("One of your code blocks includes unescaped HTML.",u.innerHTML);v=u;const C=v.textContent,B=k?d(C,{language:k,ignoreIllegals:!0}):m(C);u.innerHTML=B.value,u.dataset.highlighted="yes",E(u,k,B.language),u.result={language:B.language,re:B.relevance,relevance:B.relevance},B.secondBest&&(u.secondBest={language:B.secondBest.language,relevance:B.secondBest.relevance}),ne("after:highlightElement",{el:u,result:B,text:C})}function f(u){a=js(a,u)}const $=()=>{x(),it("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function T(){x(),it("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let L=!1;function x(){if(document.readyState==="loading"){L=!0;return}document.querySelectorAll(a.cssSelector).forEach(w)}function A(){L&&x()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function I(u,v){let k=null;try{k=v(i)}catch(C){if(qe("Language definition for '{}' could not be registered.".replace("{}",u)),s)qe(C);else throw C;k=o}k.name||(k.name=u),e[u]=k,k.rawDefinition=v.bind(null,i),k.aliases&&j(k.aliases,{languageName:u})}function R(u){delete e[u];for(const v of Object.keys(t))t[v]===u&&delete t[v]}function M(){return Object.keys(e)}function O(u){return u=(u||"").toLowerCase(),e[u]||e[t[u]]}function j(u,{languageName:v}){typeof u=="string"&&(u=[u]),u.forEach(k=>{t[k.toLowerCase()]=v})}function q(u){const v=O(u);return v&&!v.disableAutodetect}function te(u){u["before:highlightBlock"]&&!u["before:highlightElement"]&&(u["before:highlightElement"]=v=>{u["before:highlightBlock"](Object.assign({block:v.el},v))}),u["after:highlightBlock"]&&!u["after:highlightElement"]&&(u["after:highlightElement"]=v=>{u["after:highlightBlock"](Object.assign({block:v.el},v))})}function G(u){te(u),n.push(u)}function me(u){const v=n.indexOf(u);v!==-1&&n.splice(v,1)}function ne(u,v){const k=u;n.forEach(function(C){C[k]&&C[k](v)})}function J(u){return it("10.7.0","highlightBlock will be removed entirely in v12.0"),it("10.7.0","Please use highlightElement now."),w(u)}Object.assign(i,{highlight:d,highlightAuto:m,highlightAll:x,highlightElement:w,highlightBlock:J,configure:f,initHighlighting:$,initHighlightingOnLoad:T,registerLanguage:I,unregisterLanguage:R,listLanguages:M,getLanguage:O,registerAliases:j,autoDetection:q,inherit:js,addPlugin:G,removePlugin:me}),i.debugMode=function(){s=!1},i.safeMode=function(){s=!0},i.versionString=Ou,i.regex={concat:Je,lookahead:qr,either:Ui,optional:Vd,anyNumberOfTimes:qd};for(const u in an)typeof an[u]=="object"&&Fr(an[u]);return Object.assign(i,an),i},gt=eo({});gt.newInstance=()=>eo({});var Ru=gt;gt.HighlightJS=gt;gt.default=gt;const Mn=zd(Ru),Sn="[A-Za-z$_][0-9A-Za-z$_]*",to=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],no=["true","false","null","undefined","NaN","Infinity"],io=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],so=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ro=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],oo=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ao=[].concat(ro,io,so);function Pu(i){const e=i.regex,t=(u,{after:v})=>{const k="</"+u[0].slice(1);return u.input.indexOf(k,v)!==-1},n=Sn,s={begin:"<>",end:"</>"},r=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(u,v)=>{const k=u[0].length+u.index,C=u.input[k];if(C==="<"||C===","){v.ignoreMatch();return}C===">"&&(t(u,{after:k})||v.ignoreMatch());let B;const K=u.input.substring(k);if(B=K.match(/^\s*=/)){v.ignoreMatch();return}if((B=K.match(/^\s+extends\s+/))&&B.index===0){v.ignoreMatch();return}}},a={$pattern:Sn,keyword:to,literal:no,built_in:ao,"variable.language":oo},l="[0-9](_?[0-9])*",c=`\\.(${l})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},m={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},E={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,p],subLanguage:"css"}},w={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,p],subLanguage:"graphql"}},f={className:"string",begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,p]},$={className:"comment",variants:[i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},T=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,m,E,w,f,{match:/\$\d+/},h];p.contains=T.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(T)});const L=[].concat($,p.contains),x=L.concat([{begin:/\(/,end:/\)/,keywords:a,contains:["self"].concat(L)}]),A={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x},I={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,e.concat(n,"(",e.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},R={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...io,...so]}},M={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function q(u){return e.concat("(?!",u.join("|"),")")}const te={match:e.concat(/\b/,q([...ro,"super","import"]),n,e.lookahead(/\(/)),className:"title.function",relevance:0},G={begin:e.concat(/\./,e.lookahead(e.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},me={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},ne="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>",J={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(ne)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:x,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",relevance:5}),M,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,m,E,w,f,$,{match:/\$\d+/},h,R,{className:"attr",begin:n+e.lookahead(":"),relevance:0},J,{begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[$,i.REGEXP_MODE,{className:"function",begin:ne,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:r},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,i.inherit(i.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},G,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},te,j,I,me,{match:/\$[(.]/}]}}function Mu(i){const e=Pu(i),t=Sn,n=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[e.exports.CLASS_REFERENCE]},r={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:n},contains:[e.exports.CLASS_REFERENCE]},o={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},a=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],l={$pattern:Sn,keyword:to.concat(a),literal:no,built_in:ao.concat(n),"variable.language":oo},c={className:"meta",begin:"@"+t},d=(p,m,E)=>{const w=p.contains.findIndex(f=>f.label===m);if(w===-1)throw new Error("can not find mode to replace");p.contains.splice(w,1,E)};Object.assign(e.keywords,l),e.exports.PARAMS_CONTAINS.push(c),e.contains=e.contains.concat([c,s,r]),d(e,"shebang",i.SHEBANG()),d(e,"use_strict",o);const h=e.contains.find(p=>p.label==="func.def");return h.relevance=0,Object.assign(e,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),e}function Du(i){const e=i.regex,t=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),n=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=i.inherit(r,{begin:/\(/,end:/\)/}),a=i.inherit(i.APOS_STRING_MODE,{className:"string"}),l=i.inherit(i.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:n,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[r,l,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[r,o,l,a]}]}]},i.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(t,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:c}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}const Nu=i=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:i.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:i.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),ju=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Bu=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],zu=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],Uu=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],Hu=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function Fu(i){const e=i.regex,t=Nu(i),n={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",r=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[t.BLOCK_COMMENT,n,t.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+zu.join("|")+")"},{begin:":(:)?("+Uu.join("|")+")"}]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Hu.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[t.BLOCK_COMMENT,t.HEXCOLOR,t.IMPORTANT,t.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},t.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:r},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:Bu.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,t.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+ju.join("|")+")\\b"}]}}const lo=document.createElement("style");lo.innerText=[jd,Bd].join(`
623
+ `);document.head.appendChild(lo);Mn.registerLanguage("typescript",Mu);Mn.registerLanguage("html",Du);Mn.registerLanguage("css",Fu);function Wu(...i){const e=document.createElement("div"),t=document.createElement("div");t.classList.add("tab-control");const n=document.createElement("div");return i.forEach(s=>{e.appendChild(s),s.addEventListener("click",()=>{i.forEach(r=>r.removeAttribute("selected")),s.setAttribute("selected",""),n.innerHTML="",n.appendChild(s.content),n.className=s.className,n.classList.add("tab-content")})}),t.appendChild(e),t.appendChild(n),n.classList.add("tab-content"),i[0].setAttribute("selected",""),n.appendChild(i[0].content),t}function kt(i,e){const t=document.createElement("div");return t.role="tab",t.tabIndex=0,t.innerText=i,t.content=e,e.tagName=="PRE"&&t.classList.add("code"),t}function _t(i,e){const t=document.createElement(i);return typeof e=="string"?t.innerHTML=e:e.forEach(n=>{t.appendChild(n)}),t}async function qu(i,e,t){var n,s,r;const o=e.mainContent,a=_t("div",o);a.id=`example-preview-${t}`;const l=typeof e.css=="string"||(n=e.css)==null?void 0:n.label,c=typeof e.css=="string"?e.css:(s=e.css)==null?void 0:s.content,d=Wu(kt("Preview",a),kt("HTML",ln("html",o)),...c?[kt(l??"CSS",ln("css",c))]:[],...e.initializer&&e.initializer.content?[kt(e.initializer.label??"TS",ln("typescript",e.initializer.content))]:[],...(e.additionalSources||[]).map(p=>kt(p.label,ln(p.language,p.content))));e.description&&i.appendChild(_t("div",e.description));const h=_t("div",[d]);h.classList.add("example"),i.appendChild(h),c&&Vu(`#${a.id}`,c),(r=e.initializer)!=null&&r.initialize&&await e.initializer.initialize(a)}function ln(i,e){let t=e.split(/\r?\n/).map(n=>{const s=n.indexOf("///");if(s>-1){const r=n.substring(s+3).trimStart();return r?n.replace(/^(\s*)([^\s].*)$/,`$1${r}`):void 0}return n}).filter(n=>typeof n<"u").join(`
624
+ `).trim();return i&&i!="raw"&&(t=Mn.highlight(t,{language:i}).value),_t("pre",[_t("code",t)])}function Vu(i,e){const t=document.createElement("style");t.innerHTML=H().use(Nd({prefix:i})).process(e).css,document.head.appendChild(t)}async function Gu(i,e=document.body){const t=Zu(e);let n=0;Object.keys(i).forEach(async s=>{const r=document.createElement("div");r.className="example-container",t.appendChild(r);const o=i[s].default;qu(r,o,n++)})}function Ku(i){const e=document.createElement("div");e.id="examples-container";const t=i.querySelector("#examples");return t?t.after(e):i.appendChild(e),e}function Zu(i){return i.children?Ku(i):i}const Xu=`<h1 id="@cas-smartdesign/token-selector">@cas-smartdesign/token-selector</h1>
642
625
  <p>A token-selector element based on <a href="https://github.com/Polymer/lit-element">lit-element</a> with SmartDesign look &amp; feel.</p>
643
626
  <p><em><code>Note: This is a preview version of the sd-token-selector element. Some features like for example declarative support for the element is not fully supported and guaranteed.</code></em></p>
644
627
  <h2 id="attributes---token-selector">Attributes - Token-Selector</h2>
@@ -855,8 +838,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),B=u,C=v),k===void 0&&(
855
838
  </ul>
856
839
  </li>
857
840
  </ul>
858
- <h2 id="examples">Examples</h2>
859
- `;document.querySelector("#markdown-container").innerHTML=Ku;qu(Object.assign({"./examples/1_remove_only/index.ts":yo,"./examples/2_multi_select/index.ts":So,"./examples/3_editable_input_attributes/index.ts":Oo,"./examples/4_dnd/index.ts":Ro,"./examples/5_other/index.ts":Uo}));export{sh as T,jl as g,$t as h,Cl as s};
841
+ `,Ju=document.querySelector("#markdown-container");Ju.innerHTML=Xu;Gu(Object.assign({"./examples/1_remove_only/index.ts":bo,"./examples/2_multi_select/index.ts":Eo,"./examples/3_editable_input_attributes/index.ts":Co,"./examples/4_dnd/index.ts":Ro,"./examples/5_other/index.ts":zo}),document.querySelector(".markdown-body"));export{ah as T,zl as g,Ot as h};
860
842
  function __vite__mapDeps(indexes) {
861
843
  if (!__vite__mapDeps.viteFileDeps) {
862
844
  __vite__mapDeps.viteFileDeps = ["./1_remove_only.js","./token-provider.mjs","./2_multi_select.js","./button.mjs","./3_editable_input_attributes.js","./4_dnd.js","./5_other.js"]