@cas-smartdesign/list-item 7.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +8 -0
- package/dist/docs/doc.css +1 -0
- package/dist/docs/doc.mjs +456 -0
- package/dist/docs/icon.svg +1 -0
- package/dist/docs/index.html +25 -0
- package/dist/docs/long-content.js +1 -0
- package/dist/docs/script-created.js +1 -0
- package/dist/docs/script-drag-and-drop.js +1 -0
- package/dist/list-item-with-externals.js +101 -0
- package/dist/list-item-with-externals.js.map +7 -0
- package/dist/list-item.d.ts +50 -0
- package/dist/list-item.mjs +157 -0
- package/dist/list-item.mjs.map +1 -0
- package/npm-third-party-licenses.json +192 -0
- package/package.json +34 -0
- package/readme.md +73 -0
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function t(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=t(r);fetch(r.href,o)}})();const Rr=`<!-- Load element with all dependencies directly -->
|
|
2
|
+
<script src="./list-item-with-externals.js"><\/script>
|
|
3
|
+
|
|
4
|
+
<div class="list">
|
|
5
|
+
<sd-list-item caption="Caption only"></sd-list-item>
|
|
6
|
+
<sd-list-item description="Description only"></sd-list-item>
|
|
7
|
+
<sd-list-item caption="Caption and icon" icon="icon.svg"></sd-list-item>
|
|
8
|
+
<sd-list-item description="Description and icon" icon="icon.svg"></sd-list-item>
|
|
9
|
+
<sd-list-item
|
|
10
|
+
caption-attr-title="Tooltip for the caption"
|
|
11
|
+
description-attr-title="Tooltip for the description"
|
|
12
|
+
icon-attr-title="Tooltip for the icon"
|
|
13
|
+
icon-attr-aria-label="Aria-label for the icon"
|
|
14
|
+
caption="Item with icon"
|
|
15
|
+
description="This is the description"
|
|
16
|
+
icon="icon.svg"
|
|
17
|
+
role="custom item role"></sd-list-item>
|
|
18
|
+
<sd-list-item
|
|
19
|
+
caption-attr-title="Tooltip for the caption"
|
|
20
|
+
description-attr-title="Tooltip for the description"
|
|
21
|
+
icon-attr-title="Tooltip for the icon"
|
|
22
|
+
icon-attr-aria-label="Aria-label for the icon"
|
|
23
|
+
caption="Item with missing icon"
|
|
24
|
+
description="This is the description"
|
|
25
|
+
icon="fail-to-load.svg"
|
|
26
|
+
role="custom item role"></sd-list-item>
|
|
27
|
+
</div>
|
|
28
|
+
`,Mr=`<h3 id="simple-item-examples">Simple item examples</h3>
|
|
29
|
+
`,Nr=`.list {
|
|
30
|
+
border: 1px solid gray;
|
|
31
|
+
max-width: 400px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
sd-list-item {
|
|
35
|
+
height: 50px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
sd-list-item:not(:last-of-type) {
|
|
39
|
+
border-bottom: 1px solid gray;
|
|
40
|
+
}
|
|
41
|
+
`,Pr={mainContent:Rr,description:Mr,css:Nr},Tr=Object.freeze(Object.defineProperty({__proto__:null,default:Pr},Symbol.toStringTag,{value:"Module"})),Lr="modulepreload",Ir=function(n,e){return new URL(n,e).href},Ci={},si=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0){const o=document.getElementsByTagName("link");r=Promise.all(t.map(s=>{if(s=Ir(s,i),s in Ci)return;Ci[s]=!0;const l=s.endsWith(".css"),a=l?'[rel="stylesheet"]':"";if(!!i)for(let p=o.length-1;p>=0;p--){const f=o[p];if(f.href===s&&(!l||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":Lr,l||(d.as="script",d.crossOrigin=""),d.href=s,document.head.appendChild(d),l)return new Promise((p,f)=>{d.addEventListener("load",p),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})}))}return r.then(()=>e()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})},jr=`<div id="long-content-examples">
|
|
42
|
+
<div>
|
|
43
|
+
<h4>Without line clamp:</h4>
|
|
44
|
+
<sd-list-item caption="long caption, have to contain every detail, but there is no description"></sd-list-item>
|
|
45
|
+
<sd-list-item
|
|
46
|
+
caption="long caption, have to contain every detail, and there is description as well"
|
|
47
|
+
description="description"></sd-list-item>
|
|
48
|
+
<sd-list-item
|
|
49
|
+
description="long description, have to contain every detail, but there is no caption"></sd-list-item>
|
|
50
|
+
<sd-list-item
|
|
51
|
+
caption="caption"
|
|
52
|
+
description="long description, have to contain every detail, and there is caption as well"></sd-list-item>
|
|
53
|
+
</div>
|
|
54
|
+
<div>
|
|
55
|
+
<h4>Without line clamp, show missing widths:</h4>
|
|
56
|
+
<sd-list-item caption="long caption, have to contain every detail, but there is no description"
|
|
57
|
+
><span show-missing-width slot="right-content"></span>
|
|
58
|
+
</sd-list-item>
|
|
59
|
+
<sd-list-item
|
|
60
|
+
caption="long caption, have to contain every detail, and there is description as well"
|
|
61
|
+
description="description"
|
|
62
|
+
><span show-missing-width slot="right-content"></span
|
|
63
|
+
></sd-list-item>
|
|
64
|
+
<sd-list-item description="long description, have to contain every detail, but there is no caption">
|
|
65
|
+
<span show-missing-width slot="right-content"></span
|
|
66
|
+
></sd-list-item>
|
|
67
|
+
<sd-list-item
|
|
68
|
+
caption="caption"
|
|
69
|
+
description="long description, have to contain every detail, and there is caption as well"
|
|
70
|
+
><span show-missing-width slot="right-content"></span
|
|
71
|
+
></sd-list-item>
|
|
72
|
+
</div>
|
|
73
|
+
<div>
|
|
74
|
+
<h4>With line clamp:</h4>
|
|
75
|
+
<sd-list-item
|
|
76
|
+
caption="long caption, have to contain every detail, but there is no description"
|
|
77
|
+
enable-line-clamp></sd-list-item>
|
|
78
|
+
<sd-list-item
|
|
79
|
+
caption="long caption, have to contain every detail, and there is description as well"
|
|
80
|
+
description="description"
|
|
81
|
+
enable-line-clamp></sd-list-item>
|
|
82
|
+
<sd-list-item
|
|
83
|
+
description="long description, have to contain every detail, but there is no caption"
|
|
84
|
+
enable-line-clamp></sd-list-item>
|
|
85
|
+
<sd-list-item
|
|
86
|
+
caption="caption"
|
|
87
|
+
description="long description, have to contain every detail, and there is caption as well"
|
|
88
|
+
enable-line-clamp></sd-list-item>
|
|
89
|
+
</div>
|
|
90
|
+
<div>
|
|
91
|
+
<h4>With line clamp and icons:</h4>
|
|
92
|
+
<sd-list-item
|
|
93
|
+
icon="icon.svg"
|
|
94
|
+
caption="long caption, have to contain every detail, but there is no description"
|
|
95
|
+
enable-line-clamp></sd-list-item>
|
|
96
|
+
<sd-list-item
|
|
97
|
+
icon="icon.svg"
|
|
98
|
+
caption="long caption, have to contain every detail, and there is description as well"
|
|
99
|
+
description="description"
|
|
100
|
+
enable-line-clamp></sd-list-item>
|
|
101
|
+
<sd-list-item
|
|
102
|
+
icon="icon.svg"
|
|
103
|
+
description="long description, have to contain every detail, but there is no caption"
|
|
104
|
+
enable-line-clamp></sd-list-item>
|
|
105
|
+
<sd-list-item
|
|
106
|
+
icon="icon.svg"
|
|
107
|
+
caption="caption"
|
|
108
|
+
description="long description, have to contain every detail, and there is caption as well"
|
|
109
|
+
enable-line-clamp></sd-list-item>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
`,zr=`<h3 id="examples-showing-long-item-content">Examples showing long item content</h3>
|
|
113
|
+
`,Dr=`#long-content-examples {
|
|
114
|
+
display: grid;
|
|
115
|
+
grid-template-columns: minmax(40%, 400px) minmax(40%, 400px);
|
|
116
|
+
column-gap: 16px;
|
|
117
|
+
row-gap: 16px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
sd-list-item {
|
|
121
|
+
height: 50px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
sd-list-item:not(:last-of-type) {
|
|
125
|
+
border-bottom: 1px solid gray;
|
|
126
|
+
}
|
|
127
|
+
`,Ur=`import "@cas-smartdesign/list-item";
|
|
128
|
+
import ListItem from "@cas-smartdesign/list-item";
|
|
129
|
+
|
|
130
|
+
document
|
|
131
|
+
.querySelectorAll("#long-content-examples *[show-missing-width]")
|
|
132
|
+
.forEach((missingWidthElement: HTMLSpanElement) => {
|
|
133
|
+
const parentListItem = missingWidthElement.parentElement as ListItem;
|
|
134
|
+
const resizeObserver = new ResizeObserver(async () => {
|
|
135
|
+
let missingWidth;
|
|
136
|
+
let guard = 0;
|
|
137
|
+
do {
|
|
138
|
+
missingWidth = parentListItem.missingWidthForTexts;
|
|
139
|
+
missingWidthElement.innerText = \`+\${missingWidth}px\`;
|
|
140
|
+
} while (missingWidth != parentListItem.missingWidthForTexts && guard++ < 5);
|
|
141
|
+
});
|
|
142
|
+
resizeObserver.observe(parentListItem);
|
|
143
|
+
});
|
|
144
|
+
`,Br={mainContent:jr,description:zr,css:Dr,initializer:{content:Ur,type:"typescript",initialize:()=>si(()=>import("./long-content.js"),__vite__mapDeps([]),import.meta.url)}},Hr=Object.freeze(Object.defineProperty({__proto__:null,default:Br},Symbol.toStringTag,{value:"Module"})),Fr=`<div id="dynamically-created-examples" class="list"></div>
|
|
145
|
+
`,Wr=`<h3 id="dynamically-created-items">Dynamically created items</h3>
|
|
146
|
+
`,Gr=`.list {
|
|
147
|
+
border: 1px solid gray;
|
|
148
|
+
max-width: 400px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
sd-list-item {
|
|
152
|
+
height: 50px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
sd-list-item:not(:last-of-type) {
|
|
156
|
+
border-bottom: 1px solid gray;
|
|
157
|
+
}
|
|
158
|
+
`,qr=`import "@cas-smartdesign/list-item";
|
|
159
|
+
import { generator, ContentMode } from "@cas-smartdesign/list-item";
|
|
160
|
+
|
|
161
|
+
const icon = "./icon.svg";
|
|
162
|
+
const container = document.querySelector("#dynamically-created-examples");
|
|
163
|
+
|
|
164
|
+
function createExample(contentMode: ContentMode, iconBackgroundColor?: string) {
|
|
165
|
+
const caption = contentMode === "text" ? "caption" : "<em>caption</em>";
|
|
166
|
+
const description = contentMode === "text" ? "text mode" : "<em>html mode</em>";
|
|
167
|
+
const item = generator({ caption, description, icon, iconBackgroundColor, contentMode }, 0);
|
|
168
|
+
item.addEventListener("list-item-icon-click", () => window.alert("Icon was clicked"));
|
|
169
|
+
item.addEventListener("click", () => window.alert("Item was clicked"));
|
|
170
|
+
container.appendChild(item);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
createExample("text");
|
|
174
|
+
createExample("html");
|
|
175
|
+
createExample("text", "#BADA55");
|
|
176
|
+
createExample("html", "#808080");
|
|
177
|
+
`,Zr={mainContent:Fr,description:Wr,css:Gr,initializer:{content:qr,type:"typescript",initialize:()=>si(()=>import("./script-created.js"),__vite__mapDeps([]),import.meta.url)}},Vr=Object.freeze(Object.defineProperty({__proto__:null,default:Zr},Symbol.toStringTag,{value:"Module"})),Kr=`<div id="drag-and-drop-example-container">
|
|
178
|
+
<div class="list"></div>
|
|
179
|
+
<div class="list"></div>
|
|
180
|
+
</div>
|
|
181
|
+
`,Jr=`<h3 id="drag-and-drop-example">Drag and drop example</h3>
|
|
182
|
+
<p>This example shows how pointer events are handled on the icons and on the items themselves.</p>
|
|
183
|
+
`,Xr=`#drag-and-drop-example-container {
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-direction: row;
|
|
186
|
+
gap: 16px;
|
|
187
|
+
}
|
|
188
|
+
.list {
|
|
189
|
+
border: 2px solid gray;
|
|
190
|
+
width: 400px;
|
|
191
|
+
height: 199px;
|
|
192
|
+
overflow: hidden;
|
|
193
|
+
}
|
|
194
|
+
.list.droptarget {
|
|
195
|
+
border: 2px solid #1467ba;
|
|
196
|
+
position: relative;
|
|
197
|
+
}
|
|
198
|
+
.list.droptarget::after {
|
|
199
|
+
/* Using pseudo hit target to avoid cursor flickering in chrome */
|
|
200
|
+
content: "";
|
|
201
|
+
position: absolute;
|
|
202
|
+
top: 0;
|
|
203
|
+
left: 0;
|
|
204
|
+
bottom: 0;
|
|
205
|
+
right: 0;
|
|
206
|
+
background: #1467ba10;
|
|
207
|
+
}
|
|
208
|
+
sd-list-item {
|
|
209
|
+
box-sizing: border-box;
|
|
210
|
+
height: 50px;
|
|
211
|
+
border-bottom: 1px solid gray;
|
|
212
|
+
}
|
|
213
|
+
`,Qr=`import "@cas-smartdesign/list-item";
|
|
214
|
+
import ListItem, { generator, ContentMode } from "@cas-smartdesign/list-item";
|
|
215
|
+
|
|
216
|
+
const icon = "./icon.svg";
|
|
217
|
+
const lists = document.querySelectorAll("#drag-and-drop-example-container .list");
|
|
218
|
+
let draggedItem: ListItem | null = null;
|
|
219
|
+
|
|
220
|
+
function createExample(
|
|
221
|
+
contentMode: ContentMode,
|
|
222
|
+
iconBackgroundColor?: string,
|
|
223
|
+
caption = contentMode === "text" ? "List item" : "<em>List item</em>",
|
|
224
|
+
description = contentMode == "text" ? "text mode" : "<em>html mode</em>",
|
|
225
|
+
) {
|
|
226
|
+
const item = generator({ caption, description, icon, iconBackgroundColor, contentMode }, 0);
|
|
227
|
+
item.draggable = true;
|
|
228
|
+
item.addEventListener("click", () => window.alert("Item was clicked"));
|
|
229
|
+
item.addEventListener("dragstart", (e) => {
|
|
230
|
+
if (e.dataTransfer) {
|
|
231
|
+
e.dataTransfer.setData("text/plain", item.innerText);
|
|
232
|
+
e.dataTransfer.effectAllowed = "move";
|
|
233
|
+
draggedItem = item;
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
lists[0].append(item);
|
|
237
|
+
return item;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
createExample("text");
|
|
241
|
+
createExample("html");
|
|
242
|
+
createExample("html", "#808080");
|
|
243
|
+
createExample("text", "#BADA55", "Clickable item", "with separate icon click handler").addEventListener(
|
|
244
|
+
"list-item-icon-click",
|
|
245
|
+
(event) => {
|
|
246
|
+
alert("Icon was clicked");
|
|
247
|
+
event.preventDefault();
|
|
248
|
+
},
|
|
249
|
+
);
|
|
250
|
+
const dragEventStack = [];
|
|
251
|
+
lists.forEach((list: HTMLDivElement) => {
|
|
252
|
+
list.addEventListener("dragleave", (e) => {
|
|
253
|
+
if (e.target == list) {
|
|
254
|
+
list.classList.remove("droptarget");
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
list.addEventListener("dragenter", () => list.classList.toggle("droptarget", !list.contains(draggedItem)), true);
|
|
258
|
+
list.addEventListener(
|
|
259
|
+
"dragover",
|
|
260
|
+
(e) => {
|
|
261
|
+
if (!list.contains(draggedItem)) {
|
|
262
|
+
e.preventDefault();
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
true,
|
|
266
|
+
);
|
|
267
|
+
list.addEventListener("drop", (e) => {
|
|
268
|
+
list.classList.remove("droptarget");
|
|
269
|
+
list.appendChild(draggedItem);
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
`,Yr={mainContent:Kr,description:Jr,css:Xr,initializer:{content:Qr,type:"typescript",initialize:()=>si(()=>import("./script-drag-and-drop.js"),__vite__mapDeps([]),import.meta.url)}},es=Object.freeze(Object.defineProperty({__proto__:null,default:Yr},Symbol.toStringTag,{value:"Module"}));const nt=window,oi=nt.ShadowRoot&&(nt.ShadyCSS===void 0||nt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,li=Symbol(),ki=new WeakMap;let un=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==li)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(oi&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=ki.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&ki.set(t,e))}return e}toString(){return this.cssText}};const pn=n=>new un(typeof n=="string"?n:n+"",void 0,li),ts=(n,...e)=>{const t=n.length===1?n[0]:e.reduce((i,r,o)=>i+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+n[o+1],n[0]);return new un(t,n,li)},is=(n,e)=>{oi?n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const i=document.createElement("style"),r=nt.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=t.cssText,n.appendChild(i)})},Oi=oi?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return pn(t)})(n):n;var Ot;const ot=window,Ri=ot.trustedTypes,ns=Ri?Ri.emptyScript:"",Mi=ot.reactiveElementPolyfillSupport,Ut={toAttribute(n,e){switch(e){case Boolean:n=n?ns:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},fn=(n,e)=>e!==n&&(e==e||n==n),Rt={attribute:!0,type:String,converter:Ut,reflect:!1,hasChanged:fn},Bt="finalized";let fe=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,i)=>{const r=this._$Ep(i,t);r!==void 0&&(this._$Ev.set(r,i),e.push(r))}),e}static createProperty(e,t=Rt){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i=typeof e=="symbol"?Symbol():"__"+e,r=this.getPropertyDescriptor(e,i,t);r!==void 0&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(r){const o=this[e];this[t]=r,this.requestUpdate(e,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Rt}static finalize(){if(this.hasOwnProperty(Bt))return!1;this[Bt]=!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,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const r of i)this.createProperty(r,t[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)t.unshift(Oi(r))}else e!==void 0&&t.push(Oi(e));return t}static _$Ep(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i: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,i;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.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 is(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 i;return(i=t.hostConnected)===null||i===void 0?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostDisconnected)===null||i===void 0?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EO(e,t,i=Rt){var r;const o=this.constructor._$Ep(e,i);if(o!==void 0&&i.reflect===!0){const s=(((r=i.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?i.converter:Ut).toAttribute(t,i.type);this._$El=e,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$El=null}}_$AK(e,t){var i;const r=this.constructor,o=r._$Ev.get(e);if(o!==void 0&&this._$El!==o){const s=r.getPropertyOptions(o),l=typeof s.converter=="function"?{fromAttribute:s.converter}:((i=s.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?s.converter:Ut;this._$El=o,this[o]=l.fromAttribute(t,s.type),this._$El=null}}requestUpdate(e,t,i){let r=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||fn)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):r=!1),!this.isUpdatePending&&r&&(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((r,o)=>this[o]=r),this._$Ei=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var o;return(o=r.hostUpdate)===null||o===void 0?void 0:o.call(r)}),this.update(i)):this._$Ek()}catch(r){throw t=!1,this._$Ek(),r}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(i=>{var r;return(r=i.hostUpdated)===null||r===void 0?void 0:r.call(i)}),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,i)=>this._$EO(i,this[i],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};fe[Bt]=!0,fe.elementProperties=new Map,fe.elementStyles=[],fe.shadowRootOptions={mode:"open"},Mi==null||Mi({ReactiveElement:fe}),((Ot=ot.reactiveElementVersions)!==null&&Ot!==void 0?Ot:ot.reactiveElementVersions=[]).push("1.6.3");var Mt;const lt=window,me=lt.trustedTypes,Ni=me?me.createPolicy("lit-html",{createHTML:n=>n}):void 0,Ht="$lit$",Y=`lit$${(Math.random()+"").slice(9)}$`,mn="?"+Y,rs=`<${mn}>`,ae=document,ke=()=>ae.createComment(""),Oe=n=>n===null||typeof n!="object"&&typeof n!="function",gn=Array.isArray,ss=n=>gn(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",Nt=`[
|
|
273
|
+
\f\r]`,Ee=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Pi=/-->/g,Ti=/>/g,se=RegExp(`>|${Nt}(?:([^\\s"'>=/]+)(${Nt}*=${Nt}*(?:[^
|
|
274
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Li=/'/g,Ii=/"/g,bn=/^(?:script|style|textarea|title)$/i,os=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),We=os(1),ce=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),ji=new WeakMap,oe=ae.createTreeWalker(ae,129,null,!1);function yn(n,e){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ni!==void 0?Ni.createHTML(e):e}const ls=(n,e)=>{const t=n.length-1,i=[];let r,o=e===2?"<svg>":"",s=Ee;for(let l=0;l<t;l++){const a=n[l];let c,d,p=-1,f=0;for(;f<a.length&&(s.lastIndex=f,d=s.exec(a),d!==null);)f=s.lastIndex,s===Ee?d[1]==="!--"?s=Pi:d[1]!==void 0?s=Ti:d[2]!==void 0?(bn.test(d[2])&&(r=RegExp("</"+d[2],"g")),s=se):d[3]!==void 0&&(s=se):s===se?d[0]===">"?(s=r??Ee,p=-1):d[1]===void 0?p=-2:(p=s.lastIndex-d[2].length,c=d[1],s=d[3]===void 0?se:d[3]==='"'?Ii:Li):s===Ii||s===Li?s=se:s===Pi||s===Ti?s=Ee:(s=se,r=void 0);const x=s===se&&n[l+1].startsWith("/>")?" ":"";o+=s===Ee?a+rs:p>=0?(i.push(c),a.slice(0,p)+Ht+a.slice(p)+Y+x):a+Y+(p===-2?(i.push(void 0),l):x)}return[yn(n,o+(n[t]||"<?>")+(e===2?"</svg>":"")),i]};class Re{constructor({strings:e,_$litType$:t},i){let r;this.parts=[];let o=0,s=0;const l=e.length-1,a=this.parts,[c,d]=ls(e,t);if(this.el=Re.createElement(c,i),oe.currentNode=this.el.content,t===2){const p=this.el.content,f=p.firstChild;f.remove(),p.append(...f.childNodes)}for(;(r=oe.nextNode())!==null&&a.length<l;){if(r.nodeType===1){if(r.hasAttributes()){const p=[];for(const f of r.getAttributeNames())if(f.endsWith(Ht)||f.startsWith(Y)){const x=d[s++];if(p.push(f),x!==void 0){const k=r.getAttribute(x.toLowerCase()+Ht).split(Y),M=/([.?@])?(.*)/.exec(x);a.push({type:1,index:o,name:M[2],strings:k,ctor:M[1]==="."?cs:M[1]==="?"?hs:M[1]==="@"?us:ft})}else a.push({type:6,index:o})}for(const f of p)r.removeAttribute(f)}if(bn.test(r.tagName)){const p=r.textContent.split(Y),f=p.length-1;if(f>0){r.textContent=me?me.emptyScript:"";for(let x=0;x<f;x++)r.append(p[x],ke()),oe.nextNode(),a.push({type:2,index:++o});r.append(p[f],ke())}}}else if(r.nodeType===8)if(r.data===mn)a.push({type:2,index:o});else{let p=-1;for(;(p=r.data.indexOf(Y,p+1))!==-1;)a.push({type:7,index:o}),p+=Y.length-1}o++}}static createElement(e,t){const i=ae.createElement("template");return i.innerHTML=e,i}}function ge(n,e,t=n,i){var r,o,s,l;if(e===ce)return e;let a=i!==void 0?(r=t._$Co)===null||r===void 0?void 0:r[i]:t._$Cl;const c=Oe(e)?void 0:e._$litDirective$;return(a==null?void 0:a.constructor)!==c&&((o=a==null?void 0:a._$AO)===null||o===void 0||o.call(a,!1),c===void 0?a=void 0:(a=new c(n),a._$AT(n,t,i)),i!==void 0?((s=(l=t)._$Co)!==null&&s!==void 0?s:l._$Co=[])[i]=a:t._$Cl=a),a!==void 0&&(e=ge(n,a._$AS(n,e.values),a,i)),e}class as{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:i},parts:r}=this._$AD,o=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:ae).importNode(i,!0);oe.currentNode=o;let s=oe.nextNode(),l=0,a=0,c=r[0];for(;c!==void 0;){if(l===c.index){let d;c.type===2?d=new je(s,s.nextSibling,this,e):c.type===1?d=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(d=new ps(s,this,e)),this._$AV.push(d),c=r[++a]}l!==(c==null?void 0:c.index)&&(s=oe.nextNode(),l++)}return oe.currentNode=ae,o}v(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class je{constructor(e,t,i,r){var o;this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=r,this._$Cp=(o=r==null?void 0:r.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=ge(this,e,t),Oe(e)?e===R||e==null||e===""?(this._$AH!==R&&this._$AR(),this._$AH=R):e!==this._$AH&&e!==ce&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):ss(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!==R&&Oe(this._$AH)?this._$AA.nextSibling.data=e:this.$(ae.createTextNode(e)),this._$AH=e}g(e){var t;const{values:i,_$litType$:r}=e,o=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=Re.createElement(yn(r.h,r.h[0]),this.options)),r);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===o)this._$AH.v(i);else{const s=new as(o,this),l=s.u(this.options);s.v(i),this.$(l),this._$AH=s}}_$AC(e){let t=ji.get(e.strings);return t===void 0&&ji.set(e.strings,t=new Re(e)),t}T(e){gn(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,r=0;for(const o of e)r===t.length?t.push(i=new je(this.k(ke()),this.k(ke()),this,this.options)):i=t[r],i._$AI(o),r++;r<t.length&&(this._$AR(i&&i._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,t);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class ft{constructor(e,t,i,r,o){this.type=1,this._$AH=R,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=R}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,r){const o=this.strings;let s=!1;if(o===void 0)e=ge(this,e,t,0),s=!Oe(e)||e!==this._$AH&&e!==ce,s&&(this._$AH=e);else{const l=e;let a,c;for(e=o[0],a=0;a<o.length-1;a++)c=ge(this,l[i+a],t,a),c===ce&&(c=this._$AH[a]),s||(s=!Oe(c)||c!==this._$AH[a]),c===R?e=R:e!==R&&(e+=(c??"")+o[a+1]),this._$AH[a]=c}s&&!r&&this.j(e)}j(e){e===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class cs extends ft{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===R?void 0:e}}const ds=me?me.emptyScript:"";class hs extends ft{constructor(){super(...arguments),this.type=4}j(e){e&&e!==R?this.element.setAttribute(this.name,ds):this.element.removeAttribute(this.name)}}let us=class extends ft{constructor(e,t,i,r,o){super(e,t,i,r,o),this.type=5}_$AI(e,t=this){var i;if((e=(i=ge(this,e,t,0))!==null&&i!==void 0?i:R)===ce)return;const r=this._$AH,o=e===R&&r!==R||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==R&&(r===R||o);o&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,i;typeof this._$AH=="function"?this._$AH.call((i=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}};class ps{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){ge(this,e)}}const zi=lt.litHtmlPolyfillSupport;zi==null||zi(Re,je),((Mt=lt.litHtmlVersions)!==null&&Mt!==void 0?Mt:lt.litHtmlVersions=[]).push("2.8.0");const fs=(n,e,t)=>{var i,r;const o=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:e;let s=o._$litPart$;if(s===void 0){const l=(r=t==null?void 0:t.renderBefore)!==null&&r!==void 0?r:null;o._$litPart$=s=new je(e.insertBefore(ke(),l),l,void 0,t??{})}return s._$AI(n),s};var Pt,Tt;class $e extends fe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=fs(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 ce}}$e.finalized=!0,$e._$litElement$=!0,(Pt=globalThis.litElementHydrateSupport)===null||Pt===void 0||Pt.call(globalThis,{LitElement:$e});const Di=globalThis.litElementPolyfillSupport;Di==null||Di({LitElement:$e});((Tt=globalThis.litElementVersions)!==null&&Tt!==void 0?Tt:globalThis.litElementVersions=[]).push("3.3.3");const ms=(n,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,n)}}:{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,n)}},gs=(n,e,t)=>{e.constructor.createProperty(t,n)};function L(n){return(e,t)=>t!==void 0?gs(n,e,t):ms(n,e)}const bs={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ys=n=>(...e)=>({_$litDirective$:n,values:e});class ws{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}class Ft extends ws{constructor(e){if(super(e),this.et=R,e.type!==bs.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===R||e==null)return this.ft=void 0,this.et=e;if(e===ce)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:[]}}}Ft.directiveName="unsafeHTML",Ft.resultType=1;const vs=ys(Ft);const Ge=n=>n??R;class xs{static showImage(e,t,i,r){let o;if(r||!(e instanceof HTMLImageElement)?o=s=>e.style.backgroundImage=this.prepareSrc(s):o=s=>e.src=s,o(i),t){const s=()=>{o(t)},l=new Image;l.addEventListener("load",s),l.src=t,l.complete&&(l.removeEventListener("load",s),s())}}static prepareSrc(e){return e?e.startsWith("url")?e:`url("${e}")`:null}}const Es=':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 _s=Object.defineProperty,As=Object.getOwnPropertyDescriptor,I=(n,e,t,i)=>{for(var r=i>1?void 0:i?As(e,t):e,o=n.length-1,s;o>=0;o--)(s=n[o])&&(r=(i?s(e,t,r):s(r))||r);return i&&r&&_s(e,t,r),r},J;const T=(J=class extends $e{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[ts`
|
|
275
|
+
${pn(Es)}
|
|
276
|
+
`]}render(){return We`
|
|
277
|
+
<div class="container">
|
|
278
|
+
${this.getLevelIndicators().map((e,t)=>We` <div class="level-indicator level-${t}"></div> `)}
|
|
279
|
+
<div class="side-content">
|
|
280
|
+
<slot name="left-content"></slot>
|
|
281
|
+
${this.renderIcon()}
|
|
282
|
+
</div>
|
|
283
|
+
<div class="labels">
|
|
284
|
+
${this.renderLabel("caption",this.caption,this.captionAttrTitle)}
|
|
285
|
+
${this.renderLabel("description",this.description,this.descriptionAttrTitle)}
|
|
286
|
+
</div>
|
|
287
|
+
<div class="side-content">
|
|
288
|
+
<slot name="right-content"></slot>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
`}renderIcon(){if(this.icon||this.iconPlaceholder){const e=this.iconBackgroundColor!=null?`background-color:${this.iconBackgroundColor}`:void 0;return We`
|
|
292
|
+
<div
|
|
293
|
+
class="icon-wrapper"
|
|
294
|
+
@pointerdown="${this.handleIconClick}"
|
|
295
|
+
style="${Ge(e)}"
|
|
296
|
+
role="img"
|
|
297
|
+
aria-label="${Ge(this.iconAttrAriaLabel)}"
|
|
298
|
+
title="${Ge(this.iconAttrTitle)}"
|
|
299
|
+
>
|
|
300
|
+
<div class="icon"></div>
|
|
301
|
+
</div>
|
|
302
|
+
`}return R}renderLabel(e,t,i){return t?We`
|
|
303
|
+
<div class="${e}" title="${Ge(i)}">
|
|
304
|
+
${this.contentMode==="html"?vs(t):t}
|
|
305
|
+
</div>
|
|
306
|
+
`:R}updated(e){super.updated(e),(e.has("icon")||e.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&xs.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),e.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){const e=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0;const i=this.shadowRoot.querySelector(".caption");i&&(t+=i.scrollWidth-i.clientWidth);const r=this.shadowRoot.querySelector(".description");return r&&(t=Math.max(t,r.scrollWidth-r.clientWidth)),t>0&&t++,e&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(e){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",e))&&e.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},J.ID="sd-list-item",J.ensureDefined=()=>{customElements.get(J.ID)||customElements.define(J.ID,J)},J);I([L({type:String})],T.prototype,"caption",2);I([L({type:String})],T.prototype,"description",2);I([L({type:Boolean})],T.prototype,"selected",2);I([L({type:String})],T.prototype,"icon",2);I([L({type:String})],T.prototype,"iconBackgroundColor",2);I([L({type:String})],T.prototype,"iconPlaceholder",2);I([L({type:Number})],T.prototype,"level",2);I([L()],T.prototype,"contentMode",2);I([L({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],T.prototype,"enableLineClamp",2);I([L({type:Boolean,reflect:!0,attribute:"aria-disabled"})],T.prototype,"disabled",2);I([L({type:String,attribute:"icon-attr-aria-label"})],T.prototype,"iconAttrAriaLabel",2);I([L({type:String,reflect:!0})],T.prototype,"role",2);I([L({type:String,attribute:"caption-attr-title"})],T.prototype,"captionAttrTitle",2);I([L({type:String,attribute:"description-attr-title"})],T.prototype,"descriptionAttrTitle",2);I([L({type:String,attribute:"icon-attr-title"})],T.prototype,"iconAttrTitle",2);let wn=T;const Pa=(n,e)=>{const t=document.createElement(wn.ID);if(n){if(t.caption=n.caption,t.description=n.description,t.icon=n.icon,t.iconBackgroundColor=n.iconBackgroundColor,t.iconPlaceholder=n.iconPlaceholder,t.level=n.level,t.disabled=n.disabled,n.contentMode&&(t.contentMode=n.contentMode),n.leftContentGenerator){const i=n.leftContentGenerator(n,t);i&&(i.slot="left-content",t.appendChild(i))}if(n.rightContentGenerator){const i=n.rightContentGenerator(n,t);i&&(i.slot="right-content",t.appendChild(i))}}return t};wn.ensureDefined();function vn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Ss(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function i(){return this instanceof i?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(n).forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}),t}var ai={exports:{}},$=String,xn=function(){return{isColorSupported:!1,reset:$,bold:$,dim:$,italic:$,underline:$,inverse:$,hidden:$,strikethrough:$,black:$,red:$,green:$,yellow:$,blue:$,magenta:$,cyan:$,white:$,gray:$,bgBlack:$,bgRed:$,bgGreen:$,bgYellow:$,bgBlue:$,bgMagenta:$,bgCyan:$,bgWhite:$}};ai.exports=xn();ai.exports.createColors=xn;var $s=ai.exports;const Cs={},ks=Object.freeze(Object.defineProperty({__proto__:null,default:Cs},Symbol.toStringTag,{value:"Module"})),B=Ss(ks);let Ui=$s,Bi=B,Wt=class En extends Error{constructor(e,t,i,r,o,s){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),r&&(this.source=r),s&&(this.plugin=s),typeof t<"u"&&typeof i<"u"&&(typeof t=="number"?(this.line=t,this.column=i):(this.line=t.line,this.column=t.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,En)}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=Ui.isColorSupported),Bi&&e&&(t=Bi(t));let i=t.split(/\r?\n/),r=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),s=String(o).length,l,a;if(e){let{bold:c,gray:d,red:p}=Ui.createColors(!0);l=f=>c(p(f)),a=f=>d(f)}else l=a=c=>c;return i.slice(r,o).map((c,d)=>{let p=r+1+d,f=" "+(" "+p).slice(-s)+" | ";if(p===this.line){let x=a(f.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(f)+c+`
|
|
307
|
+
`+x+l("^")}return" "+a(f)+c}).join(`
|
|
308
|
+
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
309
|
+
|
|
310
|
+
`+e+`
|
|
311
|
+
`),this.name+": "+this.message+e}};var ci=Wt;Wt.default=Wt;var ze={};ze.isClean=Symbol("isClean");ze.my=Symbol("my");const Hi={after:`
|
|
312
|
+
`,beforeClose:`
|
|
313
|
+
`,beforeComment:`
|
|
314
|
+
`,beforeDecl:`
|
|
315
|
+
`,beforeOpen:" ",beforeRule:`
|
|
316
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Os(n){return n[0].toUpperCase()+n.slice(1)}let Gt=class{constructor(e){this.builder=e}atrule(e,t){let i="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?i+=e.raws.afterName:r&&(i+=" "),e.nodes)this.block(e,i+r);else{let o=(e.raws.between||"")+(t?";":"");this.builder(i+r+o,e)}}beforeAfter(e,t){let i;e.type==="decl"?i=this.raw(e,null,"beforeDecl"):e.type==="comment"?i=this.raw(e,null,"beforeComment"):t==="before"?i=this.raw(e,null,"beforeRule"):i=this.raw(e,null,"beforeClose");let r=e.parent,o=0;for(;r&&r.type!=="root";)o+=1,r=r.parent;if(i.includes(`
|
|
317
|
+
`)){let s=this.raw(e,null,"indent");if(s.length)for(let l=0;l<o;l++)i+=s}return i}block(e,t){let i=this.raw(e,"between","beforeOpen");this.builder(t+i+"{",e,"start");let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let i=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let o=e.nodes[r],s=this.raw(o,"before");s&&this.builder(s),this.stringify(o,t!==r||i)}}comment(e){let t=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+i+"*/",e)}decl(e,t){let i=this.raw(e,"between","colon"),r=e.prop+i+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,i){let r;if(i||(i=t),t&&(r=e.raws[t],typeof r<"u"))return r;let o=e.parent;if(i==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Hi[i];let s=e.root();if(s.rawCache||(s.rawCache={}),typeof s.rawCache[i]<"u")return s.rawCache[i];if(i==="before"||i==="after")return this.beforeAfter(e,i);{let l="raw"+Os(i);this[l]?r=this[l](s,e):s.walk(a=>{if(r=a.raws[t],typeof r<"u")return!1})}return typeof r>"u"&&(r=Hi[i]),s.rawCache[i]=r,r}rawBeforeClose(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return t=i.raws.after,t.includes(`
|
|
318
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let i;return e.walkComments(r=>{if(typeof r.raws.before<"u")return i=r.raws.before,i.includes(`
|
|
319
|
+
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(t,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,t){let i;return e.walkDecls(r=>{if(typeof r.raws.before<"u")return i=r.raws.before,i.includes(`
|
|
320
|
+
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(t,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(e){let t;return e.walk(i=>{if(i.type!=="decl"&&(t=i.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&typeof i.raws.before<"u")return t=i.raws.before,t.includes(`
|
|
321
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(i=>{if(typeof i.raws.between<"u")return t=i.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length===0&&(t=i.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(i=>{let r=i.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof i.raws.before<"u"){let o=i.raws.before.split(`
|
|
322
|
+
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(t=i.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let i=e[t],r=e.raws[t];return r&&r.value===i?r.raw:i}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 _n=Gt;Gt.default=Gt;let Rs=_n;function qt(n,e){new Rs(e).stringify(n)}var mt=qt;qt.default=qt;let{isClean:qe,my:Ms}=ze,Ns=ci,Ps=_n,Ts=mt;function Zt(n,e){let t=new n.constructor;for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i)||i==="proxyCache")continue;let r=n[i],o=typeof r;i==="parent"&&o==="object"?e&&(t[i]=e):i==="source"?t[i]=r:Array.isArray(r)?t[i]=r.map(s=>Zt(s,t)):(o==="object"&&r!==null&&(r=Zt(r)),t[i]=r)}return t}let Vt=class{constructor(e={}){this.raws={},this[qe]=!1,this[Ms]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let i of e[t])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}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=Zt(this);for(let i in e)t[i]=e[i];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:i,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:i.column,line:i.line},t)}return new Ns(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,i){return e[t]===i||(e[t]=i,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[qe]){this[qe]=!1;let e=this;for(;e=e.parent;)e[qe]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let i=this.source.start;if(e.index)i=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(i=this.positionInside(r,t))}return i}positionInside(e,t){let i=t||this.toString(),r=this.source.start.column,o=this.source.start.line;for(let s=0;s<e;s++)i[s]===`
|
|
323
|
+
`?(r=1,o+=1):r+=1;return{column:r,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},i=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 r=this.toString(),o=r.indexOf(e.word);o!==-1&&(t=this.positionInside(o,r),i=this.positionInside(o+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:e.endIndex?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<t.line||i.line===t.line&&i.column<=t.column)&&(i={column:t.column+1,line:t.line}),{end:i,start:t}}raw(e,t){return new Ps().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,i=!1;for(let r of e)r===this?i=!0:i?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);i||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let i={},r=t==null;t=t||new Map;let o=0;for(let s in this){if(!Object.prototype.hasOwnProperty.call(this,s)||s==="parent"||s==="proxyCache")continue;let l=this[s];if(Array.isArray(l))i[s]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)i[s]=l.toJSON(null,t);else if(s==="source"){let a=t.get(l.input);a==null&&(a=o,t.set(l.input,o),o++),i[s]={end:l.end,inputId:a,start:l.start}}else i[s]=l}return r&&(i.inputs=[...t.keys()].map(s=>s.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ts){e.stringify&&(e=e.stringify);let t="";return e(this,i=>{t+=i}),t}warn(e,t,i){let r={node:this};for(let o in i)r[o]=i[o];return e.warn(t,r)}get proxyOf(){return this}};var gt=Vt;Vt.default=Vt;let Ls=gt,Kt=class extends Ls{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 bt=Kt;Kt.default=Kt;let Is="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",js=(n,e=21)=>(t=e)=>{let i="",r=t;for(;r--;)i+=n[Math.random()*n.length|0];return i},zs=(n=21)=>{let e="",t=n;for(;t--;)e+=Is[Math.random()*64|0];return e};var Ds={nanoid:zs,customAlphabet:js};let{SourceMapConsumer:Fi,SourceMapGenerator:Wi}=B,{existsSync:Us,readFileSync:Bs}=B,{dirname:Lt,join:Hs}=B;function Fs(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}let Jt=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=t.map?t.map.prev:void 0,r=this.loadMap(t.from,i);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Lt(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Fi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(r.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||i.test(e))return Fs(e.substr(RegExp.lastMatch.length));let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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 i=e.lastIndexOf(t.pop()),r=e.indexOf("*/",i);i>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(i,r)))}loadFile(e){if(this.root=Lt(e),Us(e))return this.mapFile=e,Bs(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 i=t(e);if(i){let r=this.loadFile(i);if(!r)throw new Error("Unable to load previous source map: "+i.toString());return r}}else{if(t instanceof Fi)return Wi.fromSourceMap(t).toString();if(t instanceof Wi)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 i=this.annotation;return e&&(i=Hs(Lt(e),i)),this.loadFile(i)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var An=Jt;Jt.default=Jt;let{SourceMapConsumer:Ws,SourceMapGenerator:Gs}=B,{fileURLToPath:Gi,pathToFileURL:Ze}=B,{isAbsolute:Xt,resolve:Qt}=B,{nanoid:qs}=Ds,It=B,qi=ci,Zs=An,jt=Symbol("fromOffsetCache"),Vs=!!(Ws&&Gs),Zi=!!(Qt&&Xt),at=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&&(!Zi||/^\w+:\/\//.test(t.from)||Xt(t.from)?this.file=t.from:this.file=Qt(t.from)),Zi&&Vs){let i=new Zs(this.css,t);if(i.text){this.map=i;let r=i.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+qs(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,i,r={}){let o,s,l;if(t&&typeof t=="object"){let c=t,d=i;if(typeof c.offset=="number"){let p=this.fromOffset(c.offset);t=p.line,i=p.col}else t=c.line,i=c.column;if(typeof d.offset=="number"){let p=this.fromOffset(d.offset);s=p.line,l=p.col}else s=d.line,l=d.column}else if(!i){let c=this.fromOffset(t);t=c.line,i=c.col}let a=this.origin(t,i,s,l);return a?o=new qi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):o=new qi(e,s===void 0?t:{column:i,line:t},s===void 0?i:{column:l,line:s},this.css,this.file,r.plugin),o.input={column:i,endColumn:l,endLine:s,line:t,source:this.css},this.file&&(Ze&&(o.input.url=Ze(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,i;if(this[jt])i=this[jt];else{let o=this.css.split(`
|
|
324
|
+
`);i=new Array(o.length);let s=0;for(let l=0,a=o.length;l<a;l++)i[l]=s,s+=o[l].length+1;this[jt]=i}t=i[i.length-1];let r=0;if(e>=t)r=i.length-1;else{let o=i.length-2,s;for(;r<o;)if(s=r+(o-r>>1),e<i[s])o=s-1;else if(e>=i[s+1])r=s+1;else{r=s;break}}return{col:e-i[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Qt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,r){if(!this.map)return!1;let o=this.map.consumer(),s=o.originalPositionFor({column:t,line:e});if(!s.source)return!1;let l;typeof i=="number"&&(l=o.originalPositionFor({column:r,line:i}));let a;Xt(s.source)?a=Ze(s.source):a=new URL(s.source,this.map.consumer().sourceRoot||Ze(this.map.mapFile));let c={column:s.column,endColumn:l&&l.column,endLine:l&&l.line,line:s.line,url:a.toString()};if(a.protocol==="file:")if(Gi)c.file=Gi(a);else throw new Error("file: protocol is not available in this PostCSS build");let d=o.sourceContentFor(s.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 yt=at;at.default=at;It&&It.registerInput&&It.registerInput(at);let{SourceMapConsumer:Sn,SourceMapGenerator:rt}=B,{dirname:st,relative:$n,resolve:Cn,sep:kn}=B,{pathToFileURL:Vi}=B,Ks=yt,Js=!!(Sn&&rt),Xs=!!(st&&Cn&&$n&&kn),Qs=class{constructor(e,t,i,r){this.stringify=e,this.mapOpts=i.map||{},this.root=t,this.opts=i,this.css=r,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=`
|
|
325
|
+
`;this.css.includes(`\r
|
|
326
|
+
`)&&(t=`\r
|
|
327
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),i=e.root||st(e.file),r;this.mapOpts.sourcesContent===!1?(r=new Sn(e.text),r.sourcesContent&&(r.sourcesContent=r.sourcesContent.map(()=>null))):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(i)))}}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(),Xs&&Js&&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=rt.fromSourceMap(e)}else this.map=new rt({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 rt({file:this.outputFile()});let e=1,t=1,i="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,s;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(r.generated.line=e,r.generated.column=t-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=l.match(/\n/g),o?(e+=o.length,s=l.lastIndexOf(`
|
|
328
|
+
`),t=l.length-s):t+=l.length,a&&c!=="start"){let d=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==d.last||d.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}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 i=this.opts.to?st(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=st(Cn(i,this.mapOpts.annotation)));let r=$n(i,e);return this.memoizedPaths.set(e,r),r}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 Ks(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 i=t.source.input.from;if(i&&!e[i]){e[i]=!0;let r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,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(Vi){let i=Vi(e).toString();return this.memoizedFileURLs.set(e,i),i}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;kn==="\\"&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}};var On=Qs;let Ys=gt,Yt=class extends Ys{constructor(e){super(e),this.type="comment"}};var wt=Yt;Yt.default=Yt;let{isClean:Rn,my:Mn}=ze,Nn=bt,Pn=wt,eo=gt,Tn,di,hi,Ln;function In(n){return n.map(e=>(e.nodes&&(e.nodes=In(e.nodes)),delete e.source,e))}function jn(n){if(n[Rn]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)jn(e)}let X=class zn extends eo{append(...e){for(let t of e){let i=this.normalize(t,this.last);for(let r of i)this.proxyOf.nodes.push(r)}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(),i,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(i=this.indexes[t],r=e(this.proxyOf.nodes[i],i),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}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")?(...i)=>e[t](...i.map(r=>typeof r=="function"?(o,s)=>r(o.toProxy(),s):r)):t==="every"||t==="some"?i=>e[t]((r,...o)=>i(r.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(i=>i.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,i){return e[t]===i||(e[t]=i,(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 i=this.index(e),r=this.normalize(t,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let s of r)this.proxyOf.nodes.splice(i+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],i<o&&(this.indexes[s]=o+r.length);return this.markDirty(),this}insertBefore(e,t){let i=this.index(e),r=i===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[i],r).reverse();i=this.index(e);for(let l of o)this.proxyOf.nodes.splice(i,0,l);let s;for(let l in this.indexes)s=this.indexes[l],i<=s&&(this.indexes[l]=s+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=In(Tn(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"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 Nn(e)]}else if(e.selector)e=[new di(e)];else if(e.name)e=[new hi(e)];else if(e.text)e=[new Pn(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[Mn]||zn.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Rn]&&jn(r),typeof r.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let i=this.normalize(t,this.first,"prepend").reverse();for(let r of i)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+i.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 i in this.indexes)t=this.indexes[i],t>=e&&(this.indexes[i]=t-1);return this.markDirty(),this}replaceValues(e,t,i){return i||(i=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,i))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,i)=>{let r;try{r=e(t,i)}catch(o){throw t.addToError(o)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((i,r)=>{if(i.type==="atrule"&&e.test(i.name))return t(i,r)}):this.walk((i,r)=>{if(i.type==="atrule"&&i.name===e)return t(i,r)}):(t=e,this.walk((i,r)=>{if(i.type==="atrule")return t(i,r)}))}walkComments(e){return this.walk((t,i)=>{if(t.type==="comment")return e(t,i)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((i,r)=>{if(i.type==="decl"&&e.test(i.prop))return t(i,r)}):this.walk((i,r)=>{if(i.type==="decl"&&i.prop===e)return t(i,r)}):(t=e,this.walk((i,r)=>{if(i.type==="decl")return t(i,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((i,r)=>{if(i.type==="rule"&&e.test(i.selector))return t(i,r)}):this.walk((i,r)=>{if(i.type==="rule"&&i.selector===e)return t(i,r)}):(t=e,this.walk((i,r)=>{if(i.type==="rule")return t(i,r)}))}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]}};X.registerParse=n=>{Tn=n};X.registerRule=n=>{di=n};X.registerAtRule=n=>{hi=n};X.registerRoot=n=>{Ln=n};var de=X;X.default=X;X.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,hi.prototype):n.type==="rule"?Object.setPrototypeOf(n,di.prototype):n.type==="decl"?Object.setPrototypeOf(n,Nn.prototype):n.type==="comment"?Object.setPrototypeOf(n,Pn.prototype):n.type==="root"&&Object.setPrototypeOf(n,Ln.prototype),n[Mn]=!0,n.nodes&&n.nodes.forEach(e=>{X.rebuild(e)})};let to=de,Dn,Un,Me=class extends to{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Dn(new Un,this,e).stringify()}};Me.registerLazyResult=n=>{Dn=n};Me.registerProcessor=n=>{Un=n};var ui=Me;Me.default=Me;let ei=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let i=t.node.rangeBy(t);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in t)this[i]=t[i]}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 Bn=ei;ei.default=ei;let io=Bn,ti=class{constructor(e,t,i){this.processor=e,this.messages=[],this.root=t,this.opts=i,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 i=new io(e,t);return this.messages.push(i),i}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var pi=ti;ti.default=ti;const zt=39,Ki=34,Ve=92,Ji=47,Ke=10,_e=32,Je=12,Xe=9,Qe=13,no=91,ro=93,so=40,oo=41,lo=123,ao=125,co=59,ho=42,uo=58,po=64,Ye=/[\t\n\f\r "#'()/;[\\\]{}]/g,et=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,fo=/.[\r\n"'(/\\]/,Xi=/[\da-f]/i;var mo=function(e,t={}){let i=e.css.valueOf(),r=t.ignoreErrors,o,s,l,a,c,d,p,f,x,k,M=i.length,b=0,q=[],Z=[];function te(){return b}function U(H){throw e.error("Unclosed "+H,b)}function V(){return Z.length===0&&b>=M}function xe(H){if(Z.length)return Z.pop();if(b>=M)return;let j=H?H.ignoreUnclosed:!1;switch(o=i.charCodeAt(b),o){case Ke:case _e:case Xe:case Qe:case Je:{s=b;do s+=1,o=i.charCodeAt(s);while(o===_e||o===Ke||o===Xe||o===Qe||o===Je);k=["space",i.slice(b,s)],b=s-1;break}case no:case ro:case lo:case ao:case uo:case co:case oo:{let ie=String.fromCharCode(o);k=[ie,ie,b];break}case so:{if(f=q.length?q.pop()[1]:"",x=i.charCodeAt(b+1),f==="url"&&x!==zt&&x!==Ki&&x!==_e&&x!==Ke&&x!==Xe&&x!==Je&&x!==Qe){s=b;do{if(d=!1,s=i.indexOf(")",s+1),s===-1)if(r||j){s=b;break}else U("bracket");for(p=s;i.charCodeAt(p-1)===Ve;)p-=1,d=!d}while(d);k=["brackets",i.slice(b,s+1),b,s],b=s}else s=i.indexOf(")",b+1),a=i.slice(b,s+1),s===-1||fo.test(a)?k=["(","(",b]:(k=["brackets",a,b,s],b=s);break}case zt:case Ki:{l=o===zt?"'":'"',s=b;do{if(d=!1,s=i.indexOf(l,s+1),s===-1)if(r||j){s=b+1;break}else U("string");for(p=s;i.charCodeAt(p-1)===Ve;)p-=1,d=!d}while(d);k=["string",i.slice(b,s+1),b,s],b=s;break}case po:{Ye.lastIndex=b+1,Ye.test(i),Ye.lastIndex===0?s=i.length-1:s=Ye.lastIndex-2,k=["at-word",i.slice(b,s+1),b,s],b=s;break}case Ve:{for(s=b,c=!0;i.charCodeAt(s+1)===Ve;)s+=1,c=!c;if(o=i.charCodeAt(s+1),c&&o!==Ji&&o!==_e&&o!==Ke&&o!==Xe&&o!==Qe&&o!==Je&&(s+=1,Xi.test(i.charAt(s)))){for(;Xi.test(i.charAt(s+1));)s+=1;i.charCodeAt(s+1)===_e&&(s+=1)}k=["word",i.slice(b,s+1),b,s],b=s;break}default:{o===Ji&&i.charCodeAt(b+1)===ho?(s=i.indexOf("*/",b+2)+1,s===0&&(r||j?s=i.length:U("comment")),k=["comment",i.slice(b,s+1),b,s],b=s):(et.lastIndex=b+1,et.test(i),et.lastIndex===0?s=i.length-1:s=et.lastIndex-2,k=["word",i.slice(b,s+1),b,s],q.push(k),b=s);break}}return b++,k}function ue(H){Z.push(H)}return{back:ue,endOfFile:V,nextToken:xe,position:te}};let Hn=de,ct=class extends Hn{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 fi=ct;ct.default=ct;Hn.registerAtRule(ct);let Fn=de,Wn,Gn,be=class extends Fn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,i){let r=super.normalize(e);if(t){if(i==="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 r)o.raws.before=t.raws.before}return r}removeChild(e,t){let i=this.index(e);return!t&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new Wn(new Gn,this,e).stringify()}};be.registerLazyResult=n=>{Wn=n};be.registerProcessor=n=>{Gn=n};var De=be;be.default=be;Fn.registerRoot(be);let Ne={comma(n){return Ne.split(n,[","],!0)},space(n){let e=[" ",`
|
|
329
|
+
`," "];return Ne.split(n,e)},split(n,e,t){let i=[],r="",o=!1,s=0,l=!1,a="",c=!1;for(let d of n)c?c=!1:d==="\\"?c=!0:l?d===a&&(l=!1):d==='"'||d==="'"?(l=!0,a=d):d==="("?s+=1:d===")"?s>0&&(s-=1):s===0&&e.includes(d)&&(o=!0),o?(r!==""&&i.push(r.trim()),r="",o=!1):r+=d;return(t||r!=="")&&i.push(r.trim()),i}};var qn=Ne;Ne.default=Ne;let Zn=de,go=qn,dt=class extends Zn{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return go.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,i=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}};var mi=dt;dt.default=dt;Zn.registerRule(dt);let bo=bt,yo=mo,wo=wt,vo=fi,xo=De,Qi=mi;const Yi={empty:!0,space:!0};function Eo(n){for(let e=n.length-1;e>=0;e--){let t=n[e],i=t[3]||t[2];if(i)return i}}let _o=class{constructor(e){this.input=e,this.root=new xo,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 vo;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let i,r,o,s=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?c.push(i==="("?")":"]"):i==="{"&&c.length>0?c.push("}"):i===c[c.length-1]&&c.pop(),c.length===0)if(i===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){l=!0;break}else if(i==="}"){if(a.length>0){for(o=a.length-1,r=a[o];r&&r[0]==="space";)r=a[--o];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),s&&(e=a[a.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=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let i=0,r;for(let o=t-1;o>=0&&(r=e[o],!(r[0]!=="space"&&(i+=1,i===2)));o--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,i,r,o;for(let[s,l]of e.entries()){if(i=l,r=i[0],r==="("&&(t+=1),r===")"&&(t-=1),t===0&&r===":")if(!o)this.doubleColon(i);else{if(o[0]==="word"&&o[1]==="progid")continue;return s}o=i}return!1}comment(e){let t=new wo;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let r=i.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=yo(this.input)}decl(e,t){let i=new bo;this.init(i,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(r[3]||r[2]||Eo(e)),i.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){i.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),i.raws.between+=o[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let s=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)s.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(o=e[c],o[1].toLowerCase()==="!important"){i.important=!0;let d=this.stringFrom(e,c);d=this.spacesFromEnd(e)+d,d!==" !important"&&(i.raws.important=d);break}else if(o[1].toLowerCase()==="important"){let d=e.slice(0),p="";for(let f=c;f>0;f--){let x=d[f][0];if(p.trim().indexOf("!")===0&&x!=="space")break;p=d.pop()[1]+p}p.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=p,e=d)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(i.raws.between+=s.map(c=>c[1]).join(""),s=[]),this.raw(i,"value",s.concat(e),t),i.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 Qi;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,i=null,r=!1,o=null,s=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(i=c[0],a.push(c),i==="("||i==="[")o||(o=c),s.push(i==="("?")":"]");else if(l&&r&&i==="{")o||(o=c),s.push("}");else if(s.length===0)if(i===";")if(r){this.decl(a,l);return}else break;else if(i==="{"){this.rule(a);return}else if(i==="}"){this.tokenizer.back(a.pop()),t=!0;break}else i===":"&&(r=!0);else i===s[s.length-1]&&(s.pop(),s.length===0&&(o=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),s.length>0&&this.unclosedBracket(o),t&&r){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}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,i,r){let o,s,l=i.length,a="",c=!0,d,p;for(let f=0;f<l;f+=1)o=i[f],s=o[0],s==="space"&&f===l-1&&!r?c=!1:s==="comment"?(p=i[f-1]?i[f-1][0]:"empty",d=i[f+1]?i[f+1][0]:"empty",!Yi[p]&&!Yi[d]?a.slice(-1)===","?c=!1:a+=o[1]:c=!1):a+=o[1];if(!c){let f=i.reduce((x,k)=>x+k[1],"");e.raws[t]={raw:f,value:a}}e[t]=a}rule(e){e.pop();let t=new Qi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let t,i="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],t==="space");)i=e.pop()[1]+i;return i}stringFrom(e,t){let i="";for(let r=t;r<e.length;r++)i+=e[r][1];return e.splice(t,e.length-t),i}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 Ao=_o;let So=de,$o=Ao,Co=yt;function ht(n,e){let t=new Co(n,e),i=new $o(t);try{i.parse()}catch(r){throw r}return i.root}var gi=ht;ht.default=ht;So.registerParse(ht);let{isClean:G,my:ko}=ze,Oo=On,Ro=mt,Mo=de,No=ui,en=pi,Po=gi,To=De;const Lo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Io={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},jo={Once:!0,postcssPlugin:!0,prepare:!0},ye=0;function Ae(n){return typeof n=="object"&&typeof n.then=="function"}function Vn(n){let e=!1,t=Lo[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,ye,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,ye,t+"Exit"]:[t,t+"Exit"]}function tn(n){let e;return n.type==="document"?e=["Document",ye,"DocumentExit"]:n.type==="root"?e=["Root",ye,"RootExit"]:e=Vn(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}function ii(n){return n[G]=!1,n.nodes&&n.nodes.forEach(e=>ii(e)),n}let ni={},we=class Kn{constructor(e,t,i){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=ii(t);else if(t instanceof Kn||t instanceof en)r=ii(t.root),t.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=t.map);else{let o=Po;i.syntax&&(o=i.syntax.parse),i.parser&&(o=i.parser),o.parse&&(o=o.parse);try{r=o(t,i)}catch(s){this.processed=!0,this.error=s}r&&!r[ko]&&Mo.rebuild(r)}this.result=new en(e,r,i),this.helpers={...ni,postcss:ni,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 i=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=i.postcssPlugin,e.setMessage()):i.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,i,r)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let i in t){if(!Io[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!jo[i])if(typeof t[i]=="object")for(let r in t[i])r==="*"?e(t,i,t[i][r]):e(t,i+"-"+r.toLowerCase(),t[i][r]);else typeof t[i]=="function"&&e(t,i,t[i])}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],i=this.runOnRoot(t);if(Ae(i))try{await i}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[G];){e[G]=!0;let t=[tn(e)];for(;t.length>0;){let i=this.visitTick(t);if(Ae(i))try{await i}catch(r){let o=t[t.length-1].node;throw this.handleError(r,o)}}}if(this.listeners.OnceExit)for(let[t,i]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(o=>i(o,this.helpers));await Promise.all(r)}else await i(e,this.helpers)}catch(r){throw this.handleError(r)}}}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(i=>e.Once(i,this.helpers));return Ae(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=Ro;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Oo(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(Ae(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[G];)e[G]=!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[i,r]of e){this.result.lastPlugin=i;let o;try{o=r(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ae(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:i,visitors:r}=t;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[s,l]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=s;try{return l(i.toProxy(),this.helpers)}catch(a){throw this.handleError(a,i)}}if(t.iterator!==0){let s=t.iterator,l;for(;l=i.nodes[i.indexes[s]];)if(i.indexes[s]+=1,!l[G]){l[G]=!0,e.push(tn(l));return}t.iterator=0,delete i.indexes[s]}let o=t.events;for(;t.eventIndex<o.length;){let s=o[t.eventIndex];if(t.eventIndex+=1,s===ye){i.nodes&&i.nodes.length&&(i[G]=!0,t.iterator=i.getIterator());return}else if(this.listeners[s]){t.visitors=this.listeners[s];return}}e.pop()}walkSync(e){e[G]=!0;let t=Vn(e);for(let i of t)if(i===ye)e.nodes&&e.each(r=>{r[G]||this.walkSync(r)});else{let r=this.listeners[i];if(r&&this.visitSync(r,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"}};we.registerPostcss=n=>{ni=n};var Jn=we;we.default=we;To.registerLazyResult(we);No.registerLazyResult(we);let zo=On,Do=mt,Uo=gi;const Bo=pi;let ri=class{constructor(e,t,i){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=i,this._map=void 0;let r,o=Do;this.result=new Bo(this._processor,r,this._opts),this.result.css=t;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let l=new zo(o,r,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),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=Uo;try{e=t(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Ho=ri;ri.default=ri;let Fo=Ho,Wo=Jn,Go=ui,qo=De,Pe=class{constructor(e=[]){this.version="8.4.32",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let i of e)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)t.push(i);else if(typeof i=="function")t.push(i);else if(!(typeof i=="object"&&(i.parse||i.stringify)))throw new Error(i+" 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 Fo(this,e,t):new Wo(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Zo=Pe;Pe.default=Pe;qo.registerProcessor(Pe);Go.registerProcessor(Pe);let Vo=bt,Ko=An,Jo=wt,Xo=fi,Qo=yt,Yo=De,el=mi;function Te(n,e){if(Array.isArray(n))return n.map(r=>Te(r));let{inputs:t,...i}=n;if(t){e=[];for(let r of t){let o={...r,__proto__:Qo.prototype};o.map&&(o.map={...o.map,__proto__:Ko.prototype}),e.push(o)}}if(i.nodes&&(i.nodes=n.nodes.map(r=>Te(r,e))),i.source){let{inputId:r,...o}=i.source;i.source=o,r!=null&&(i.source.input=e[r])}if(i.type==="root")return new Yo(i);if(i.type==="decl")return new Vo(i);if(i.type==="rule")return new el(i);if(i.type==="comment")return new Jo(i);if(i.type==="atrule")return new Xo(i);throw new Error("Unknown node type: "+n.type)}var tl=Te;Te.default=Te;var nn={};let il=ci,Xn=bt,nl=Jn,rl=de,bi=Zo,sl=mt,ol=tl,Qn=ui,ll=Bn,Yn=wt,er=fi,al=pi,cl=yt,dl=gi,hl=qn,tr=mi,ir=De,ul=gt;function _(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new bi(n)}_.plugin=function(e,t){let i=!1;function r(...s){console&&console.warn&&!i&&(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
330
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),nn.LANG&&nn.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
331
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...s);return l.postcssPlugin=e,l.postcssVersion=new bi().version,l}let o;return Object.defineProperty(r,"postcss",{get(){return o||(o=r()),o}}),r.process=function(s,l,a){return _([r(a)]).process(s,l)},r};_.stringify=sl;_.parse=dl;_.fromJSON=ol;_.list=hl;_.comment=n=>new Yn(n);_.atRule=n=>new er(n);_.decl=n=>new Xn(n);_.rule=n=>new tr(n);_.root=n=>new ir(n);_.document=n=>new Qn(n);_.CssSyntaxError=il;_.Declaration=Xn;_.Container=rl;_.Processor=bi;_.Document=Qn;_.Comment=Yn;_.Warning=ll;_.AtRule=er;_.Result=al;_.Input=cl;_.Rule=tr;_.Root=ir;_.Node=ul;nl.registerPostcss(_);var pl=_;_.default=_;const C=vn(pl);C.stringify;C.fromJSON;C.plugin;C.parse;C.list;C.document;C.comment;C.atRule;C.rule;C.decl;C.root;C.CssSyntaxError;C.Declaration;C.Container;C.Processor;C.Document;C.Comment;C.Warning;C.AtRule;C.Result;C.Input;C.Rule;C.Root;C.Node;var fl=function(e){const t=e.prefix,i=/\s+$/.test(t)?t:`${t} `,r=e.ignoreFiles?[].concat(e.ignoreFiles):[],o=e.includeFiles?[].concat(e.includeFiles):[];return function(s){r.length&&s.source.input.file&&rn(s.source.input.file,r)||o.length&&s.source.input.file&&!rn(s.source.input.file,o)||s.walkRules(l=>{const a=["keyframes","-webkit-keyframes","-moz-keyframes","-o-keyframes"];l.parent&&a.includes(l.parent.name)||(l.selectors=l.selectors.map(c=>e.exclude&&ml(c,e.exclude)?c:e.transform?e.transform(t,c,i+c,s.source.input.file,l):i+c))})}};function rn(n,e){return e.some(t=>t instanceof RegExp?t.test(n):n.includes(t))}function ml(n,e){return e.some(t=>t instanceof RegExp?t.test(n):n===t)}const gl=vn(fl),bl="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}",yl="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 wl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function nr(n){return n instanceof Map?n.clear=n.delete=n.set=function(){throw new Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=function(){throw new Error("set is read-only")}),Object.freeze(n),Object.getOwnPropertyNames(n).forEach(e=>{const t=n[e],i=typeof t;(i==="object"||i==="function")&&!Object.isFrozen(t)&&nr(t)}),n}class sn{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function rr(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ee(n,...e){const t=Object.create(null);for(const i in n)t[i]=n[i];return e.forEach(function(i){for(const r in i)t[r]=i[r]}),t}const vl="</span>",on=n=>!!n.scope,xl=(n,{prefix:e})=>{if(n.startsWith("language:"))return n.replace("language:","language-");if(n.includes(".")){const t=n.split(".");return[`${e}${t.shift()}`,...t.map((i,r)=>`${i}${"_".repeat(r+1)}`)].join(" ")}return`${e}${n}`};class El{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=rr(e)}openNode(e){if(!on(e))return;const t=xl(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){on(e)&&(this.buffer+=vl)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const ln=(n={})=>{const e={children:[]};return Object.assign(e,n),e};class yi{constructor(){this.rootNode=ln(),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=ln({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(i=>this._walk(e,i)),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=>{yi._collapse(t)}))}}class _l extends yi{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const i=e.root;t&&(i.scope=`language:${t}`),this.add(i)}toHTML(){return new El(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Le(n){return n?typeof n=="string"?n:n.source:null}function sr(n){return he("(?=",n,")")}function Al(n){return he("(?:",n,")*")}function Sl(n){return he("(?:",n,")?")}function he(...n){return n.map(e=>Le(e)).join("")}function $l(n){const e=n[n.length-1];return typeof e=="object"&&e.constructor===Object?(n.splice(n.length-1,1),e):{}}function wi(...n){return"("+($l(n).capture?"":"?:")+n.map(e=>Le(e)).join("|")+")"}function or(n){return new RegExp(n.toString()+"|").exec("").length-1}function Cl(n,e){const t=n&&n.exec(e);return t&&t.index===0}const kl=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function vi(n,{joinWith:e}){let t=0;return n.map(i=>{t+=1;const r=t;let o=Le(i),s="";for(;o.length>0;){const l=kl.exec(o);if(!l){s+=o;break}s+=o.substring(0,l.index),o=o.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?s+="\\"+String(Number(l[1])+r):(s+=l[0],l[0]==="("&&t++)}return s}).map(i=>`(${i})`).join(e)}const Ol=/\b\B/,lr="[a-zA-Z]\\w*",xi="[a-zA-Z_]\\w*",ar="\\b\\d+(\\.\\d+)?",cr="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",dr="\\b(0b[01]+)",Rl="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Ml=(n={})=>{const e=/^#![ ]*\//;return n.binary&&(n.begin=he(e,/.*\b/,n.binary,/\b.*/)),ee({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,i)=>{t.index!==0&&i.ignoreMatch()}},n)},Ie={begin:"\\\\[\\s\\S]",relevance:0},Nl={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ie]},Pl={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ie]},Tl={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/},vt=function(n,e,t={}){const i=ee({scope:"comment",begin:n,end:e,contains:[]},t);i.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 r=wi("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 i.contains.push({begin:he(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},Ll=vt("//","$"),Il=vt("/\\*","\\*/"),jl=vt("#","$"),zl={scope:"number",begin:ar,relevance:0},Dl={scope:"number",begin:cr,relevance:0},Ul={scope:"number",begin:dr,relevance:0},Bl={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Ie,{begin:/\[/,end:/\]/,relevance:0,contains:[Ie]}]},Hl={scope:"title",begin:lr,relevance:0},Fl={scope:"title",begin:xi,relevance:0},Wl={begin:"\\.\\s*"+xi,relevance:0},Gl=function(n){return Object.assign(n,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var tt=Object.freeze({__proto__:null,APOS_STRING_MODE:Nl,BACKSLASH_ESCAPE:Ie,BINARY_NUMBER_MODE:Ul,BINARY_NUMBER_RE:dr,COMMENT:vt,C_BLOCK_COMMENT_MODE:Il,C_LINE_COMMENT_MODE:Ll,C_NUMBER_MODE:Dl,C_NUMBER_RE:cr,END_SAME_AS_BEGIN:Gl,HASH_COMMENT_MODE:jl,IDENT_RE:lr,MATCH_NOTHING_RE:Ol,METHOD_GUARD:Wl,NUMBER_MODE:zl,NUMBER_RE:ar,PHRASAL_WORDS_MODE:Tl,QUOTE_STRING_MODE:Pl,REGEXP_MODE:Bl,RE_STARTERS_RE:Rl,SHEBANG:Ml,TITLE_MODE:Hl,UNDERSCORE_IDENT_RE:xi,UNDERSCORE_TITLE_MODE:Fl});function ql(n,e){n.input[n.index-1]==="."&&e.ignoreMatch()}function Zl(n,e){n.className!==void 0&&(n.scope=n.className,delete n.className)}function Vl(n,e){e&&n.beginKeywords&&(n.begin="\\b("+n.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",n.__beforeBegin=ql,n.keywords=n.keywords||n.beginKeywords,delete n.beginKeywords,n.relevance===void 0&&(n.relevance=0))}function Kl(n,e){Array.isArray(n.illegal)&&(n.illegal=wi(...n.illegal))}function Jl(n,e){if(n.match){if(n.begin||n.end)throw new Error("begin & end are not supported with match");n.begin=n.match,delete n.match}}function Xl(n,e){n.relevance===void 0&&(n.relevance=1)}const Ql=(n,e)=>{if(!n.beforeMatch)return;if(n.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},n);Object.keys(n).forEach(i=>{delete n[i]}),n.keywords=t.keywords,n.begin=he(t.beforeMatch,sr(t.begin)),n.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},n.relevance=0,delete t.beforeMatch},Yl=["of","and","for","in","not","or","if","then","parent","list","value"],ea="keyword";function hr(n,e,t=ea){const i=Object.create(null);return typeof n=="string"?r(t,n.split(" ")):Array.isArray(n)?r(t,n):Object.keys(n).forEach(function(o){Object.assign(i,hr(n[o],e,o))}),i;function r(o,s){e&&(s=s.map(l=>l.toLowerCase())),s.forEach(function(l){const a=l.split("|");i[a[0]]=[o,ta(a[0],a[1])]})}}function ta(n,e){return e?Number(e):ia(n)?0:1}function ia(n){return Yl.includes(n.toLowerCase())}const an={},le=n=>{console.error(n)},cn=(n,...e)=>{console.log(`WARN: ${n}`,...e)},pe=(n,e)=>{an[`${n}/${e}`]||(console.log(`Deprecated as of ${n}. ${e}`),an[`${n}/${e}`]=!0)},ut=new Error;function ur(n,e,{key:t}){let i=0;const r=n[t],o={},s={};for(let l=1;l<=e.length;l++)s[l+i]=r[l],o[l+i]=!0,i+=or(e[l-1]);n[t]=s,n[t]._emit=o,n[t]._multi=!0}function na(n){if(Array.isArray(n.begin)){if(n.skip||n.excludeBegin||n.returnBegin)throw le("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ut;if(typeof n.beginScope!="object"||n.beginScope===null)throw le("beginScope must be object"),ut;ur(n,n.begin,{key:"beginScope"}),n.begin=vi(n.begin,{joinWith:""})}}function ra(n){if(Array.isArray(n.end)){if(n.skip||n.excludeEnd||n.returnEnd)throw le("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ut;if(typeof n.endScope!="object"||n.endScope===null)throw le("endScope must be object"),ut;ur(n,n.end,{key:"endScope"}),n.end=vi(n.end,{joinWith:""})}}function sa(n){n.scope&&typeof n.scope=="object"&&n.scope!==null&&(n.beginScope=n.scope,delete n.scope)}function oa(n){sa(n),typeof n.beginScope=="string"&&(n.beginScope={_wrap:n.beginScope}),typeof n.endScope=="string"&&(n.endScope={_wrap:n.endScope}),na(n),ra(n)}function la(n){function e(s,l){return new RegExp(Le(s),"m"+(n.case_insensitive?"i":"")+(n.unicodeRegex?"u":"")+(l?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,a){a.position=this.position++,this.matchIndexes[this.matchAt]=a,this.regexes.push([a,l]),this.matchAt+=or(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(a=>a[1]);this.matcherRe=e(vi(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const a=this.matcherRe.exec(l);if(!a)return null;const c=a.findIndex((p,f)=>f>0&&p!==void 0),d=this.matchIndexes[c];return a.splice(0,c),Object.assign(a,d)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const a=new t;return this.rules.slice(l).forEach(([c,d])=>a.addRule(c,d)),a.compile(),this.multiRegexes[l]=a,a}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,a){this.rules.push([l,a]),a.type==="begin"&&this.count++}exec(l){const a=this.getMatcher(this.regexIndex);a.lastIndex=this.lastIndex;let c=a.exec(l);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,c=d.exec(l)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function r(s){const l=new i;return s.contains.forEach(a=>l.addRule(a.begin,{rule:a,type:"begin"})),s.terminatorEnd&&l.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&l.addRule(s.illegal,{type:"illegal"}),l}function o(s,l){const a=s;if(s.isCompiled)return a;[Zl,Jl,oa,Ql].forEach(d=>d(s,l)),n.compilerExtensions.forEach(d=>d(s,l)),s.__beforeBegin=null,[Vl,Kl,Xl].forEach(d=>d(s,l)),s.isCompiled=!0;let c=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),c=s.keywords.$pattern,delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=hr(s.keywords,n.case_insensitive)),a.keywordPatternRe=e(c,!0),l&&(s.begin||(s.begin=/\B|\b/),a.beginRe=e(a.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(a.endRe=e(a.end)),a.terminatorEnd=Le(a.end)||"",s.endsWithParent&&l.terminatorEnd&&(a.terminatorEnd+=(s.end?"|":"")+l.terminatorEnd)),s.illegal&&(a.illegalRe=e(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(d){return aa(d==="self"?s:d)})),s.contains.forEach(function(d){o(d,a)}),s.starts&&o(s.starts,l),a.matcher=r(a),a}if(n.compilerExtensions||(n.compilerExtensions=[]),n.contains&&n.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return n.classNameAliases=ee(n.classNameAliases||{}),o(n)}function pr(n){return n?n.endsWithParent||pr(n.starts):!1}function aa(n){return n.variants&&!n.cachedVariants&&(n.cachedVariants=n.variants.map(function(e){return ee(n,{variants:null},e)})),n.cachedVariants?n.cachedVariants:pr(n)?ee(n,{starts:n.starts?ee(n.starts):null}):Object.isFrozen(n)?ee(n):n}var ca="11.9.0";class da extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Dt=rr,dn=ee,hn=Symbol("nomatch"),ha=7,fr=function(n){const e=Object.create(null),t=Object.create(null),i=[];let r=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:_l};function a(h){return l.noHighlightRe.test(h)}function c(h){let m=h.className+" ";m+=h.parentNode?h.parentNode.className:"";const w=l.languageDetectRe.exec(m);if(w){const E=j(w[1]);return E||(cn(o.replace("{}",w[1])),cn("Falling back to no-highlight mode for this block.",h)),E?w[1]:"no-highlight"}return m.split(/\s+/).find(E=>a(E)||j(E))}function d(h,m,w){let E="",O="";typeof m=="object"?(E=h,w=m.ignoreIllegals,O=m.language):(pe("10.7.0","highlight(lang, code, ...args) has been deprecated."),pe("10.7.0",`Please use highlight(code, options) instead.
|
|
332
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),O=h,E=m),w===void 0&&(w=!0);const z={code:E,language:O};ne("before:highlight",z);const Q=z.result?z.result:p(z.language,z.code,w);return Q.code=z.code,ne("after:highlight",Q),Q}function p(h,m,w,E){const O=Object.create(null);function z(u,g){return u.keywords[g]}function Q(){if(!y.keywords){N.addText(S);return}let u=0;y.keywordPatternRe.lastIndex=0;let g=y.keywordPatternRe.exec(S),v="";for(;g;){v+=S.substring(u,g.index);const A=W.case_insensitive?g[0].toLowerCase():g[0],P=z(y,A);if(P){const[K,kr]=P;if(N.addText(v),v="",O[A]=(O[A]||0)+1,O[A]<=ha&&(Fe+=kr),K.startsWith("_"))v+=g[0];else{const Or=W.classNameAliases[K]||K;F(g[0],Or)}}else v+=g[0];u=y.keywordPatternRe.lastIndex,g=y.keywordPatternRe.exec(S)}v+=S.substring(u),N.addText(v)}function Be(){if(S==="")return;let u=null;if(typeof y.subLanguage=="string"){if(!e[y.subLanguage]){N.addText(S);return}u=p(y.subLanguage,S,!0,$i[y.subLanguage]),$i[y.subLanguage]=u._top}else u=x(S,y.subLanguage.length?y.subLanguage:null);y.relevance>0&&(Fe+=u.relevance),N.__addSublanguage(u._emitter,u.language)}function D(){y.subLanguage!=null?Be():Q(),S=""}function F(u,g){u!==""&&(N.startScope(g),N.addText(u),N.endScope())}function Ei(u,g){let v=1;const A=g.length-1;for(;v<=A;){if(!u._emit[v]){v++;continue}const P=W.classNameAliases[u[v]]||u[v],K=g[v];P?F(K,P):(S=K,Q(),S=""),v++}}function _i(u,g){return u.scope&&typeof u.scope=="string"&&N.openNode(W.classNameAliases[u.scope]||u.scope),u.beginScope&&(u.beginScope._wrap?(F(S,W.classNameAliases[u.beginScope._wrap]||u.beginScope._wrap),S=""):u.beginScope._multi&&(Ei(u.beginScope,g),S="")),y=Object.create(u,{parent:{value:y}}),y}function Ai(u,g,v){let A=Cl(u.endRe,v);if(A){if(u["on:end"]){const P=new sn(u);u["on:end"](g,P),P.isMatchIgnored&&(A=!1)}if(A){for(;u.endsParent&&u.parent;)u=u.parent;return u}}if(u.endsWithParent)return Ai(u.parent,g,v)}function _r(u){return y.matcher.regexIndex===0?(S+=u[0],1):(kt=!0,0)}function Ar(u){const g=u[0],v=u.rule,A=new sn(v),P=[v.__beforeBegin,v["on:begin"]];for(const K of P)if(K&&(K(u,A),A.isMatchIgnored))return _r(g);return v.skip?S+=g:(v.excludeBegin&&(S+=g),D(),!v.returnBegin&&!v.excludeBegin&&(S=g)),_i(v,u),v.returnBegin?0:g.length}function Sr(u){const g=u[0],v=m.substring(u.index),A=Ai(y,u,v);if(!A)return hn;const P=y;y.endScope&&y.endScope._wrap?(D(),F(g,y.endScope._wrap)):y.endScope&&y.endScope._multi?(D(),Ei(y.endScope,u)):P.skip?S+=g:(P.returnEnd||P.excludeEnd||(S+=g),D(),P.excludeEnd&&(S=g));do y.scope&&N.closeNode(),!y.skip&&!y.subLanguage&&(Fe+=y.relevance),y=y.parent;while(y!==A.parent);return A.starts&&_i(A.starts,u),P.returnEnd?0:g.length}function $r(){const u=[];for(let g=y;g!==W;g=g.parent)g.scope&&u.unshift(g.scope);u.forEach(g=>N.openNode(g))}let He={};function Si(u,g){const v=g&&g[0];if(S+=u,v==null)return D(),0;if(He.type==="begin"&&g.type==="end"&&He.index===g.index&&v===""){if(S+=m.slice(g.index,g.index+1),!r){const A=new Error(`0 width match regex (${h})`);throw A.languageName=h,A.badRule=He.rule,A}return 1}if(He=g,g.type==="begin")return Ar(g);if(g.type==="illegal"&&!w){const A=new Error('Illegal lexeme "'+v+'" for mode "'+(y.scope||"<unnamed>")+'"');throw A.mode=y,A}else if(g.type==="end"){const A=Sr(g);if(A!==hn)return A}if(g.type==="illegal"&&v==="")return 1;if(Ct>1e5&&Ct>g.index*3)throw new Error("potential infinite loop, way more iterations than matches");return S+=v,v.length}const W=j(h);if(!W)throw le(o.replace("{}",h)),new Error('Unknown language: "'+h+'"');const Cr=la(W);let $t="",y=E||Cr;const $i={},N=new l.__emitter(l);$r();let S="",Fe=0,re=0,Ct=0,kt=!1;try{if(W.__emitTokens)W.__emitTokens(m,N);else{for(y.matcher.considerAll();;){Ct++,kt?kt=!1:y.matcher.considerAll(),y.matcher.lastIndex=re;const u=y.matcher.exec(m);if(!u)break;const g=m.substring(re,u.index),v=Si(g,u);re=u.index+v}Si(m.substring(re))}return N.finalize(),$t=N.toHTML(),{language:h,value:$t,relevance:Fe,illegal:!1,_emitter:N,_top:y}}catch(u){if(u.message&&u.message.includes("Illegal"))return{language:h,value:Dt(m),illegal:!0,relevance:0,_illegalBy:{message:u.message,index:re,context:m.slice(re-100,re+100),mode:u.mode,resultSoFar:$t},_emitter:N};if(r)return{language:h,value:Dt(m),illegal:!1,relevance:0,errorRaised:u,_emitter:N,_top:y};throw u}}function f(h){const m={value:Dt(h),illegal:!1,relevance:0,_top:s,_emitter:new l.__emitter(l)};return m._emitter.addText(h),m}function x(h,m){m=m||l.languages||Object.keys(e);const w=f(h),E=m.filter(j).filter(Ue).map(D=>p(D,h,!1));E.unshift(w);const O=E.sort((D,F)=>{if(D.relevance!==F.relevance)return F.relevance-D.relevance;if(D.language&&F.language){if(j(D.language).supersetOf===F.language)return 1;if(j(F.language).supersetOf===D.language)return-1}return 0}),[z,Q]=O,Be=z;return Be.secondBest=Q,Be}function k(h,m,w){const E=m&&t[m]||w;h.classList.add("hljs"),h.classList.add(`language-${E}`)}function M(h){let m=null;const w=c(h);if(a(w))return;if(ne("before:highlightElement",{el:h,language:w}),h.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",h);return}if(h.children.length>0&&(l.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(h)),l.throwUnescapedHTML))throw new da("One of your code blocks includes unescaped HTML.",h.innerHTML);m=h;const E=m.textContent,O=w?d(E,{language:w,ignoreIllegals:!0}):x(E);h.innerHTML=O.value,h.dataset.highlighted="yes",k(h,w,O.language),h.result={language:O.language,re:O.relevance,relevance:O.relevance},O.secondBest&&(h.secondBest={language:O.secondBest.language,relevance:O.secondBest.relevance}),ne("after:highlightElement",{el:h,result:O,text:E})}function b(h){l=dn(l,h)}const q=()=>{U(),pe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Z(){U(),pe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let te=!1;function U(){if(document.readyState==="loading"){te=!0;return}document.querySelectorAll(l.cssSelector).forEach(M)}function V(){te&&U()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",V,!1);function xe(h,m){let w=null;try{w=m(n)}catch(E){if(le("Language definition for '{}' could not be registered.".replace("{}",h)),r)le(E);else throw E;w=s}w.name||(w.name=h),e[h]=w,w.rawDefinition=m.bind(null,n),w.aliases&&ie(w.aliases,{languageName:h})}function ue(h){delete e[h];for(const m of Object.keys(t))t[m]===h&&delete t[m]}function H(){return Object.keys(e)}function j(h){return h=(h||"").toLowerCase(),e[h]||e[t[h]]}function ie(h,{languageName:m}){typeof h=="string"&&(h=[h]),h.forEach(w=>{t[w.toLowerCase()]=m})}function Ue(h){const m=j(h);return m&&!m.disableAutodetect}function Et(h){h["before:highlightBlock"]&&!h["before:highlightElement"]&&(h["before:highlightElement"]=m=>{h["before:highlightBlock"](Object.assign({block:m.el},m))}),h["after:highlightBlock"]&&!h["after:highlightElement"]&&(h["after:highlightElement"]=m=>{h["after:highlightBlock"](Object.assign({block:m.el},m))})}function _t(h){Et(h),i.push(h)}function At(h){const m=i.indexOf(h);m!==-1&&i.splice(m,1)}function ne(h,m){const w=h;i.forEach(function(E){E[w]&&E[w](m)})}function St(h){return pe("10.7.0","highlightBlock will be removed entirely in v12.0"),pe("10.7.0","Please use highlightElement now."),M(h)}Object.assign(n,{highlight:d,highlightAuto:x,highlightAll:U,highlightElement:M,highlightBlock:St,configure:b,initHighlighting:q,initHighlightingOnLoad:Z,registerLanguage:xe,unregisterLanguage:ue,listLanguages:H,getLanguage:j,registerAliases:ie,autoDetection:Ue,inherit:dn,addPlugin:_t,removePlugin:At}),n.debugMode=function(){r=!1},n.safeMode=function(){r=!0},n.versionString=ca,n.regex={concat:he,lookahead:sr,either:wi,optional:Sl,anyNumberOfTimes:Al};for(const h in tt)typeof tt[h]=="object"&&nr(tt[h]);return Object.assign(n,tt),n},ve=fr({});ve.newInstance=()=>fr({});var ua=ve;ve.HighlightJS=ve;ve.default=ve;const xt=wl(ua),pt="[A-Za-z$_][0-9A-Za-z$_]*",mr=["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"],gr=["true","false","null","undefined","NaN","Infinity"],br=["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"],yr=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],wr=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],vr=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],xr=[].concat(wr,br,yr);function pa(n){const e=n.regex,t=(h,{after:m})=>{const w="</"+h[0].slice(1);return h.input.indexOf(w,m)!==-1},i=pt,r={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(h,m)=>{const w=h[0].length+h.index,E=h.input[w];if(E==="<"||E===","){m.ignoreMatch();return}E===">"&&(t(h,{after:w})||m.ignoreMatch());let O;const z=h.input.substring(w);if(O=z.match(/^\s*=/)){m.ignoreMatch();return}if((O=z.match(/^\s+extends\s+/))&&O.index===0){m.ignoreMatch();return}}},l={$pattern:pt,keyword:mr,literal:gr,built_in:xr,"variable.language":vr},a="[0-9](_?[0-9])*",c=`\\.(${a})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",p={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${a})\\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},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},x={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},k={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"css"}},M={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,f]},q={className:"comment",variants:[n.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:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},Z=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,x,k,M,b,{match:/\$\d+/},p];f.contains=Z.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(Z)});const te=[].concat(q,f.contains),U=te.concat([{begin:/\(/,end:/\)/,keywords:l,contains:["self"].concat(te)}]),V={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:U},xe={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,e.concat(i,"(",e.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},ue={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:{_:[...br,...yr]}},H={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},j={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[V],illegal:/%/},ie={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Ue(h){return e.concat("(?!",h.join("|"),")")}const Et={match:e.concat(/\b/,Ue([...wr,"super","import"]),i,e.lookahead(/\(/)),className:"title.function",relevance:0},_t={begin:e.concat(/\./,e.lookahead(e.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},At={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},V]},ne="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",St={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(ne)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[V]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:U,CLASS_REFERENCE:ue},illegal:/#(?![$_A-z])/,contains:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),H,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,x,k,M,b,q,{match:/\$\d+/},p,ue,{className:"attr",begin:i+e.lookahead(":"),relevance:0},St,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[q,n.REGEXP_MODE,{className:"function",begin:ne,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:U}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:o},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},j,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[V,n.inherit(n.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},_t,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[V]},Et,ie,xe,At,{match:/\$[(.]/}]}}function fa(n){const e=pa(n),t=pt,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],r={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[e.exports.CLASS_REFERENCE]},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[e.exports.CLASS_REFERENCE]},s={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],a={$pattern:pt,keyword:mr.concat(l),literal:gr,built_in:xr.concat(i),"variable.language":vr},c={className:"meta",begin:"@"+t},d=(f,x,k)=>{const M=f.contains.findIndex(b=>b.label===x);if(M===-1)throw new Error("can not find mode to replace");f.contains.splice(M,1,k)};Object.assign(e.keywords,a),e.exports.PARAMS_CONTAINS.push(c),e.contains=e.contains.concat([c,r,o]),d(e,"shebang",n.SHEBANG()),d(e,"use_strict",s);const p=e.contains.find(f=>f.label==="func.def");return p.relevance=0,Object.assign(e,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),e}function ma(n){const e=n.regex,t=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,r={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/}]},s=n.inherit(o,{begin:/\(/,end:/\)/}),l=n.inherit(n.APOS_STRING_MODE,{className:"string"}),a=n.inherit(n.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:i,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{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,a,l,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,s,a,l]}]}]},n.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{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 ga=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.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:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.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_-]*/}}),ba=["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"],ya=["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"],wa=["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"],va=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],xa=["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 Ea(n){const e=n.regex,t=ga(n),i={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},r="and or not only",o=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",l=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[t.BLOCK_COMMENT,i,t.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+wa.join("|")+")"},{begin:":(:)?("+va.join("|")+")"}]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+xa.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[t.BLOCK_COMMENT,t.HEXCOLOR,t.IMPORTANT,t.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{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:r,attribute:ya.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,t.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+ba.join("|")+")\\b"}]}}const Er=document.createElement("style");Er.innerText=[bl,yl].join(`
|
|
333
|
+
`);document.head.appendChild(Er);xt.registerLanguage("typescript",fa);xt.registerLanguage("html",ma);xt.registerLanguage("css",Ea);function _a(...n){const e=document.createElement("div"),t=document.createElement("div");t.classList.add("tab-control");const i=document.createElement("div");return n.forEach(r=>{e.appendChild(r),r.addEventListener("click",()=>{n.forEach(o=>o.removeAttribute("selected")),r.setAttribute("selected",""),i.innerHTML="",i.appendChild(r.content),i.className=r.className,i.classList.add("tab-content")})}),t.appendChild(e),t.appendChild(i),i.classList.add("tab-content"),n[0].setAttribute("selected",""),i.appendChild(n[0].content),t}function Se(n,e){const t=document.createElement("div");return t.role="tab",t.tabIndex=0,t.innerText=n,t.content=e,e.tagName=="PRE"&&t.classList.add("code"),t}function Ce(n,e){const t=document.createElement(n);return typeof e=="string"?t.innerHTML=e:e.forEach(i=>{t.appendChild(i)}),t}async function Aa(n,e,t){var i,r,o;const s=e.mainContent,l=Ce("div",s);l.id=`example-preview-${t}`;const a=typeof e.css=="string"||(i=e.css)==null?void 0:i.label,c=typeof e.css=="string"?e.css:(r=e.css)==null?void 0:r.content,d=_a(Se("Preview",l),Se("HTML",it("html",s)),...c?[Se(a??"CSS",it("css",c))]:[],...e.initializer&&e.initializer.content?[Se(e.initializer.label??"TS",it("typescript",e.initializer.content))]:[],...(e.additionalSources||[]).map(f=>Se(f.label,it(f.language,f.content))));e.description&&n.appendChild(Ce("div",e.description));const p=Ce("div",[d]);p.classList.add("example"),n.appendChild(p),c&&Sa(`#${l.id}`,c),(o=e.initializer)!=null&&o.initialize&&await e.initializer.initialize(l)}function it(n,e){let t=e.split(/\r?\n/).map(i=>{const r=i.indexOf("///");if(r>-1){const o=i.substring(r+3).trimStart();return o?i.replace(/^(\s*)([^\s].*)$/,`$1${o}`):void 0}return i}).filter(i=>typeof i<"u").join(`
|
|
334
|
+
`).trim();return n&&n!="raw"&&(t=xt.highlight(t,{language:n}).value),Ce("pre",[Ce("code",t)])}function Sa(n,e){const t=document.createElement("style");t.innerHTML=C().use(gl({prefix:n})).process(e).css,document.head.appendChild(t)}async function $a(n,e=document.body){const t=ka(e);let i=0;Object.keys(n).forEach(async r=>{const o=document.createElement("div");o.className="example-container",t.appendChild(o);const s=n[r].default;Aa(o,s,i++)})}function Ca(n){const e=document.createElement("div");e.id="examples-container";const t=n.querySelector("#examples");return t?t.after(e):n.appendChild(e),e}function ka(n){return n.children?Ca(n):n}const Oa=`<h1 id="@cas-smartdesign/list-item">@cas-smartdesign/list-item</h1>
|
|
335
|
+
<p>A list item element based on <a href="https://github.com/Polymer/lit-element">lit-element</a> with SmartDesign look & feel.</p>
|
|
336
|
+
<h2 id="requirements">Requirements</h2>
|
|
337
|
+
<p>The main entry point requires ES6 & support for Custom Elements v1</p>
|
|
338
|
+
<h2 id="properties">Properties</h2>
|
|
339
|
+
<ul>
|
|
340
|
+
<li><code>caption</code>: string<ul>
|
|
341
|
+
<li>Defines the text of the caption component of the item</li>
|
|
342
|
+
</ul>
|
|
343
|
+
</li>
|
|
344
|
+
<li><code>description</code>: string<ul>
|
|
345
|
+
<li>Defines the text of the description component of the item</li>
|
|
346
|
+
</ul>
|
|
347
|
+
</li>
|
|
348
|
+
<li><code>selected</code>: boolean<ul>
|
|
349
|
+
<li>Defines whether if the item is in selected state</li>
|
|
350
|
+
</ul>
|
|
351
|
+
</li>
|
|
352
|
+
<li><code>icon</code>: string<ul>
|
|
353
|
+
<li>Defines the icon of the item</li>
|
|
354
|
+
</ul>
|
|
355
|
+
</li>
|
|
356
|
+
<li><code>iconPlaceholder</code>: string<ul>
|
|
357
|
+
<li>Defines the placeholder icon of the item</li>
|
|
358
|
+
</ul>
|
|
359
|
+
</li>
|
|
360
|
+
<li><code>iconBackgroundColor</code>: string<ul>
|
|
361
|
+
<li>Defines the background color to be used behind the icon of the item</li>
|
|
362
|
+
</ul>
|
|
363
|
+
</li>
|
|
364
|
+
<li><code>contentMode</code>: ContentMode<ul>
|
|
365
|
+
<li>Defines the mode in which it should handle its content</li>
|
|
366
|
+
<li>Possible values:<ul>
|
|
367
|
+
<li>text - renders the content as text</li>
|
|
368
|
+
<li>html - renders the content as HTML</li>
|
|
369
|
+
</ul>
|
|
370
|
+
</li>
|
|
371
|
+
</ul>
|
|
372
|
+
</li>
|
|
373
|
+
<li><code>enableLineClamp</code>: boolean<ul>
|
|
374
|
+
<li>If set and the list item has only one label defined (caption or description) then long texts are wrapped to two lines and line-clamp property is applied to them.</li>
|
|
375
|
+
<li>The corresponding attribute is <code>enable-line-clamp</code></li>
|
|
376
|
+
</ul>
|
|
377
|
+
</li>
|
|
378
|
+
<li>aria attributes (the corresponding attribute is in camel-case)<ul>
|
|
379
|
+
<li><code>role</code>: string (default is "listitem")</li>
|
|
380
|
+
<li><code>iconAttrAriaLabel</code>: string</li>
|
|
381
|
+
</ul>
|
|
382
|
+
</li>
|
|
383
|
+
<li>title attributes (the corresponding attribute is in camel-case)<ul>
|
|
384
|
+
<li><code>captionAttrTitle</code>: string</li>
|
|
385
|
+
<li><code>descriptionAttrTitle</code>: string</li>
|
|
386
|
+
<li><code>iconAttrTitle</code>: string</li>
|
|
387
|
+
</ul>
|
|
388
|
+
</li>
|
|
389
|
+
<li><code>disabled</code> (reflects <code>aria-disabled</code> attribute)<ul>
|
|
390
|
+
<li>A disabled item MAY indicate that changing the selected state is not allowed.</li>
|
|
391
|
+
</ul>
|
|
392
|
+
</li>
|
|
393
|
+
</ul>
|
|
394
|
+
<p>All of these properties can be defined with a corresponding (by default with lowercase) attribute as well.</p>
|
|
395
|
+
<h2 id="css-custom-properties">CSS Custom Properties</h2>
|
|
396
|
+
<ul>
|
|
397
|
+
<li><code>--sd-list-item-font-family</code><ul>
|
|
398
|
+
<li>Defines the font family of the labels (default is "Segoe UI", "Lucida Sans", Arial, sans-serif)</li>
|
|
399
|
+
</ul>
|
|
400
|
+
</li>
|
|
401
|
+
<li><code>--sd-list-item-label-content-padding</code><ul>
|
|
402
|
+
<li>Defines the padding of the labels (default is 0 8px)</li>
|
|
403
|
+
</ul>
|
|
404
|
+
</li>
|
|
405
|
+
<li><code>--sd-list-item-caption-font-size</code><ul>
|
|
406
|
+
<li>Defines the font size of the caption (default is 16px)</li>
|
|
407
|
+
</ul>
|
|
408
|
+
</li>
|
|
409
|
+
<li><code>--sd-list-item-caption-text-color</code><ul>
|
|
410
|
+
<li>Defines the text color of the caption (default is #111)</li>
|
|
411
|
+
</ul>
|
|
412
|
+
</li>
|
|
413
|
+
<li><code>--sd-list-item-caption-font-weight</code><ul>
|
|
414
|
+
<li>Defines the font weight of the caption (default is 400)</li>
|
|
415
|
+
</ul>
|
|
416
|
+
</li>
|
|
417
|
+
<li><code>--sd-list-item-description-font-size</code><ul>
|
|
418
|
+
<li>Defines the font size of the description (default is 13px)</li>
|
|
419
|
+
</ul>
|
|
420
|
+
</li>
|
|
421
|
+
<li><code>--sd-list-item-description-text-color</code><ul>
|
|
422
|
+
<li>Defines the text color of the description (default is #999)</li>
|
|
423
|
+
</ul>
|
|
424
|
+
</li>
|
|
425
|
+
<li><code>--sd-list-item-description-font-weight</code><ul>
|
|
426
|
+
<li>Defines the font weight of the description (default is 400)</li>
|
|
427
|
+
</ul>
|
|
428
|
+
</li>
|
|
429
|
+
<li><code>--sd-list-item-text-decoration</code><ul>
|
|
430
|
+
<li>Defines the text-decoration applied on the caption and description (default is inherit)</li>
|
|
431
|
+
</ul>
|
|
432
|
+
</li>
|
|
433
|
+
<li><code>--sd-list-item-icon-size</code><ul>
|
|
434
|
+
<li>Defines the size of the icon (default is 24px)</li>
|
|
435
|
+
</ul>
|
|
436
|
+
</li>
|
|
437
|
+
<li><code>--sd-list-item-icon-wrapper-width</code><ul>
|
|
438
|
+
<li>Defines the width of the icon wrapper element (default is 45px)</li>
|
|
439
|
+
</ul>
|
|
440
|
+
</li>
|
|
441
|
+
</ul>
|
|
442
|
+
<h2 id="custom-events">Custom events</h2>
|
|
443
|
+
<ul>
|
|
444
|
+
<li><code>list-item-icon-click</code><ul>
|
|
445
|
+
<li>This event is dispatched when non-disabled list item icon is clicked</li>
|
|
446
|
+
</ul>
|
|
447
|
+
</li>
|
|
448
|
+
</ul>
|
|
449
|
+
<h2 id="examples">Examples</h2>
|
|
450
|
+
`;document.querySelector("#markdown-container").innerHTML=Oa;$a(Object.assign({"./examples/declarative/index.ts":Tr,"./examples/long-content/index.ts":Hr,"./examples/script-created/index.ts":Vr,"./examples/script-drag-and-drop/index.ts":es}));export{Pa as g};
|
|
451
|
+
function __vite__mapDeps(indexes) {
|
|
452
|
+
if (!__vite__mapDeps.viteFileDeps) {
|
|
453
|
+
__vite__mapDeps.viteFileDeps = []
|
|
454
|
+
}
|
|
455
|
+
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
456
|
+
}
|