@halo-dev/shiki-code-element 1.0.10 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +321 -315
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -1,208 +1,208 @@
1
- var tailwind_default = "*,:before,:after{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before,:after{--un-content:\"\"}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}", t$2 = globalThis, e$3 = t$2.ShadowRoot && (t$2.ShadyCSS === void 0 || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = Symbol(), o$5 = /* @__PURE__ */ new WeakMap(), n$3 = class {
2
- constructor(b, F, U) {
1
+ var tailwind_default = "*,:before,:after{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before,:after{--un-content:\"\"}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}", t$2 = globalThis, e$4 = t$2.ShadowRoot && (t$2.ShadyCSS === void 0 || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = Symbol(), o$5 = /* @__PURE__ */ new WeakMap(), n$4 = class {
2
+ constructor(y, F, U) {
3
3
  if (this._$cssResult$ = !0, U !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
4
- this.cssText = b, this.t = F;
4
+ this.cssText = y, this.t = F;
5
5
  }
6
6
  get styleSheet() {
7
- let b = this.o, F = this.t;
8
- if (e$3 && b === void 0) {
7
+ let y = this.o, F = this.t;
8
+ if (e$4 && y === void 0) {
9
9
  let U = F !== void 0 && F.length === 1;
10
- U && (b = o$5.get(F)), b === void 0 && ((this.o = b = new CSSStyleSheet()).replaceSync(this.cssText), U && o$5.set(F, b));
10
+ U && (y = o$5.get(F)), y === void 0 && ((this.o = y = new CSSStyleSheet()).replaceSync(this.cssText), U && o$5.set(F, y));
11
11
  }
12
- return b;
12
+ return y;
13
13
  }
14
14
  toString() {
15
15
  return this.cssText;
16
16
  }
17
- }, r = (b) => new n$3(typeof b == "string" ? b : b + "", void 0, s$2), i = (b, ...F) => new n$3(b.length === 1 ? b[0] : F.reduce(((F, U, W) => F + ((b) => {
18
- if (!0 === b._$cssResult$) return b.cssText;
19
- if (typeof b == "number") return b;
20
- throw Error("Value passed to 'css' function must be a 'css' function result: " + b + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
21
- })(U) + b[W + 1]), b[0]), b, s$2), S$1 = (b, W) => {
22
- if (e$3) b.adoptedStyleSheets = W.map(((b) => b instanceof CSSStyleSheet ? b : b.styleSheet));
17
+ }, r$4 = (y) => new n$4(typeof y == "string" ? y : y + "", void 0, s$2), i$4 = (y, ...F) => new n$4(y.length === 1 ? y[0] : F.reduce(((F, U, W) => F + ((y) => {
18
+ if (!0 === y._$cssResult$) return y.cssText;
19
+ if (typeof y == "number") return y;
20
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + y + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
21
+ })(U) + y[W + 1]), y[0]), y, s$2), S$1 = (y, W) => {
22
+ if (e$4) y.adoptedStyleSheets = W.map(((y) => y instanceof CSSStyleSheet ? y : y.styleSheet));
23
23
  else for (let U of W) {
24
24
  let W = document.createElement("style"), G = t$2.litNonce;
25
- G !== void 0 && W.setAttribute("nonce", G), W.textContent = U.cssText, b.appendChild(W);
25
+ G !== void 0 && W.setAttribute("nonce", G), W.textContent = U.cssText, y.appendChild(W);
26
26
  }
27
- }, c$1 = e$3 ? (b) => b : (b) => b instanceof CSSStyleSheet ? ((b) => {
27
+ }, c$2 = e$4 ? (y) => y : (y) => y instanceof CSSStyleSheet ? ((y) => {
28
28
  let F = "";
29
- for (let U of b.cssRules) F += U.cssText;
30
- return r(F);
31
- })(b) : b, { is: i$4, defineProperty: e$4, getOwnPropertyDescriptor: h$1, getOwnPropertyNames: r$4, getOwnPropertySymbols: o$4, getPrototypeOf: n$4 } = Object, a$1 = globalThis, c$2 = a$1.trustedTypes, l$1 = c$2 ? c$2.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = (b, F) => b, u = {
32
- toAttribute(b, F) {
29
+ for (let U of y.cssRules) F += U.cssText;
30
+ return r$4(F);
31
+ })(y) : y, { is: i$3, defineProperty: e$3, getOwnPropertyDescriptor: h$1, getOwnPropertyNames: r$3, getOwnPropertySymbols: o$4, getPrototypeOf: n$3 } = Object, a$1 = globalThis, c$1 = a$1.trustedTypes, l$1 = c$1 ? c$1.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = (y, F) => y, u$1 = {
32
+ toAttribute(y, F) {
33
33
  switch (F) {
34
34
  case Boolean:
35
- b = b ? l$1 : null;
35
+ y = y ? l$1 : null;
36
36
  break;
37
37
  case Object:
38
- case Array: b = b == null ? b : JSON.stringify(b);
38
+ case Array: y = y == null ? y : JSON.stringify(y);
39
39
  }
40
- return b;
40
+ return y;
41
41
  },
42
- fromAttribute(b, F) {
43
- let U = b;
42
+ fromAttribute(y, F) {
43
+ let U = y;
44
44
  switch (F) {
45
45
  case Boolean:
46
- U = b !== null;
46
+ U = y !== null;
47
47
  break;
48
48
  case Number:
49
- U = b === null ? null : Number(b);
49
+ U = y === null ? null : Number(y);
50
50
  break;
51
51
  case Object:
52
52
  case Array: try {
53
- U = JSON.parse(b);
53
+ U = JSON.parse(y);
54
54
  } catch {
55
55
  U = null;
56
56
  }
57
57
  }
58
58
  return U;
59
59
  }
60
- }, f = (b, F) => !i$4(b, F), b$1 = {
60
+ }, f$1 = (y, F) => !i$3(y, F), b$1 = {
61
61
  attribute: !0,
62
62
  type: String,
63
- converter: u,
63
+ converter: u$1,
64
64
  reflect: !1,
65
65
  useDefault: !1,
66
- hasChanged: f
66
+ hasChanged: f$1
67
67
  };
68
68
  Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
69
- var y = class extends HTMLElement {
70
- static addInitializer(b) {
71
- this._$Ei(), (this.l ??= []).push(b);
69
+ var y$1 = class extends HTMLElement {
70
+ static addInitializer(y) {
71
+ this._$Ei(), (this.l ??= []).push(y);
72
72
  }
73
73
  static get observedAttributes() {
74
74
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
75
75
  }
76
- static createProperty(b, F = b$1) {
77
- if (F.state && (F.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(b) && ((F = Object.create(F)).wrapped = !0), this.elementProperties.set(b, F), !F.noAccessor) {
78
- let U = Symbol(), W = this.getPropertyDescriptor(b, U, F);
79
- W !== void 0 && e$4(this.prototype, b, W);
76
+ static createProperty(y, F = b$1) {
77
+ if (F.state && (F.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(y) && ((F = Object.create(F)).wrapped = !0), this.elementProperties.set(y, F), !F.noAccessor) {
78
+ let U = Symbol(), W = this.getPropertyDescriptor(y, U, F);
79
+ W !== void 0 && e$3(this.prototype, y, W);
80
80
  }
81
81
  }
82
- static getPropertyDescriptor(b, F, U) {
83
- let { get: W, set: G } = h$1(this.prototype, b) ?? {
82
+ static getPropertyDescriptor(y, F, U) {
83
+ let { get: W, set: G } = h$1(this.prototype, y) ?? {
84
84
  get() {
85
85
  return this[F];
86
86
  },
87
- set(b) {
88
- this[F] = b;
87
+ set(y) {
88
+ this[F] = y;
89
89
  }
90
90
  };
91
91
  return {
92
92
  get: W,
93
93
  set(F) {
94
94
  let K = W?.call(this);
95
- G?.call(this, F), this.requestUpdate(b, K, U);
95
+ G?.call(this, F), this.requestUpdate(y, K, U);
96
96
  },
97
97
  configurable: !0,
98
98
  enumerable: !0
99
99
  };
100
100
  }
101
- static getPropertyOptions(b) {
102
- return this.elementProperties.get(b) ?? b$1;
101
+ static getPropertyOptions(y) {
102
+ return this.elementProperties.get(y) ?? b$1;
103
103
  }
104
104
  static _$Ei() {
105
105
  if (this.hasOwnProperty(d$1("elementProperties"))) return;
106
- let b = n$4(this);
107
- b.finalize(), b.l !== void 0 && (this.l = [...b.l]), this.elementProperties = new Map(b.elementProperties);
106
+ let y = n$3(this);
107
+ y.finalize(), y.l !== void 0 && (this.l = [...y.l]), this.elementProperties = new Map(y.elementProperties);
108
108
  }
109
109
  static finalize() {
110
110
  if (this.hasOwnProperty(d$1("finalized"))) return;
111
111
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
112
- let b = this.properties, F = [...r$4(b), ...o$4(b)];
113
- for (let U of F) this.createProperty(U, b[U]);
112
+ let y = this.properties, F = [...r$3(y), ...o$4(y)];
113
+ for (let U of F) this.createProperty(U, y[U]);
114
114
  }
115
- let b = this[Symbol.metadata];
116
- if (b !== null) {
117
- let F = litPropertyMetadata.get(b);
118
- if (F !== void 0) for (let [b, U] of F) this.elementProperties.set(b, U);
115
+ let y = this[Symbol.metadata];
116
+ if (y !== null) {
117
+ let F = litPropertyMetadata.get(y);
118
+ if (F !== void 0) for (let [y, U] of F) this.elementProperties.set(y, U);
119
119
  }
120
120
  this._$Eh = /* @__PURE__ */ new Map();
121
- for (let [b, F] of this.elementProperties) {
122
- let U = this._$Eu(b, F);
123
- U !== void 0 && this._$Eh.set(U, b);
121
+ for (let [y, F] of this.elementProperties) {
122
+ let U = this._$Eu(y, F);
123
+ U !== void 0 && this._$Eh.set(U, y);
124
124
  }
125
125
  this.elementStyles = this.finalizeStyles(this.styles);
126
126
  }
127
- static finalizeStyles(b) {
127
+ static finalizeStyles(y) {
128
128
  let F = [];
129
- if (Array.isArray(b)) {
130
- let U = new Set(b.flat(Infinity).reverse());
131
- for (let b of U) F.unshift(c$1(b));
132
- } else b !== void 0 && F.push(c$1(b));
129
+ if (Array.isArray(y)) {
130
+ let U = new Set(y.flat(Infinity).reverse());
131
+ for (let y of U) F.unshift(c$2(y));
132
+ } else y !== void 0 && F.push(c$2(y));
133
133
  return F;
134
134
  }
135
- static _$Eu(b, F) {
135
+ static _$Eu(y, F) {
136
136
  let U = F.attribute;
137
- return !1 === U ? void 0 : typeof U == "string" ? U : typeof b == "string" ? b.toLowerCase() : void 0;
137
+ return !1 === U ? void 0 : typeof U == "string" ? U : typeof y == "string" ? y.toLowerCase() : void 0;
138
138
  }
139
139
  constructor() {
140
140
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
141
141
  }
142
142
  _$Ev() {
143
- this._$ES = new Promise(((b) => this.enableUpdating = b)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((b) => b(this)));
143
+ this._$ES = new Promise(((y) => this.enableUpdating = y)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((y) => y(this)));
144
144
  }
145
- addController(b) {
146
- (this._$EO ??= /* @__PURE__ */ new Set()).add(b), this.renderRoot !== void 0 && this.isConnected && b.hostConnected?.();
145
+ addController(y) {
146
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(y), this.renderRoot !== void 0 && this.isConnected && y.hostConnected?.();
147
147
  }
148
- removeController(b) {
149
- this._$EO?.delete(b);
148
+ removeController(y) {
149
+ this._$EO?.delete(y);
150
150
  }
151
151
  _$E_() {
152
- let b = /* @__PURE__ */ new Map(), F = this.constructor.elementProperties;
153
- for (let U of F.keys()) this.hasOwnProperty(U) && (b.set(U, this[U]), delete this[U]);
154
- b.size > 0 && (this._$Ep = b);
152
+ let y = /* @__PURE__ */ new Map(), F = this.constructor.elementProperties;
153
+ for (let U of F.keys()) this.hasOwnProperty(U) && (y.set(U, this[U]), delete this[U]);
154
+ y.size > 0 && (this._$Ep = y);
155
155
  }
156
156
  createRenderRoot() {
157
- let b = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
158
- return S$1(b, this.constructor.elementStyles), b;
157
+ let y = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
158
+ return S$1(y, this.constructor.elementStyles), y;
159
159
  }
160
160
  connectedCallback() {
161
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((b) => b.hostConnected?.()));
161
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((y) => y.hostConnected?.()));
162
162
  }
163
- enableUpdating(b) {}
163
+ enableUpdating(y) {}
164
164
  disconnectedCallback() {
165
- this._$EO?.forEach(((b) => b.hostDisconnected?.()));
165
+ this._$EO?.forEach(((y) => y.hostDisconnected?.()));
166
166
  }
167
- attributeChangedCallback(b, F, U) {
168
- this._$AK(b, U);
167
+ attributeChangedCallback(y, F, U) {
168
+ this._$AK(y, U);
169
169
  }
170
- _$ET(b, F) {
171
- let U = this.constructor.elementProperties.get(b), W = this.constructor._$Eu(b, U);
170
+ _$ET(y, F) {
171
+ let U = this.constructor.elementProperties.get(y), W = this.constructor._$Eu(y, U);
172
172
  if (W !== void 0 && !0 === U.reflect) {
173
- let G = (U.converter?.toAttribute === void 0 ? u : U.converter).toAttribute(F, U.type);
174
- this._$Em = b, G == null ? this.removeAttribute(W) : this.setAttribute(W, G), this._$Em = null;
173
+ let G = (U.converter?.toAttribute === void 0 ? u$1 : U.converter).toAttribute(F, U.type);
174
+ this._$Em = y, G == null ? this.removeAttribute(W) : this.setAttribute(W, G), this._$Em = null;
175
175
  }
176
176
  }
177
- _$AK(b, F) {
178
- let U = this.constructor, W = U._$Eh.get(b);
177
+ _$AK(y, F) {
178
+ let U = this.constructor, W = U._$Eh.get(y);
179
179
  if (W !== void 0 && this._$Em !== W) {
180
- let b = U.getPropertyOptions(W), G = typeof b.converter == "function" ? { fromAttribute: b.converter } : b.converter?.fromAttribute === void 0 ? u : b.converter;
180
+ let y = U.getPropertyOptions(W), G = typeof y.converter == "function" ? { fromAttribute: y.converter } : y.converter?.fromAttribute === void 0 ? u$1 : y.converter;
181
181
  this._$Em = W;
182
- let K = G.fromAttribute(F, b.type);
182
+ let K = G.fromAttribute(F, y.type);
183
183
  this[W] = K ?? this._$Ej?.get(W) ?? K, this._$Em = null;
184
184
  }
185
185
  }
186
- requestUpdate(b, F, U) {
187
- if (b !== void 0) {
188
- let W = this.constructor, G = this[b];
189
- if (U ??= W.getPropertyOptions(b), !((U.hasChanged ?? f)(G, F) || U.useDefault && U.reflect && G === this._$Ej?.get(b) && !this.hasAttribute(W._$Eu(b, U)))) return;
190
- this.C(b, F, U);
186
+ requestUpdate(y, F, U) {
187
+ if (y !== void 0) {
188
+ let W = this.constructor, G = this[y];
189
+ if (U ??= W.getPropertyOptions(y), !((U.hasChanged ?? f$1)(G, F) || U.useDefault && U.reflect && G === this._$Ej?.get(y) && !this.hasAttribute(W._$Eu(y, U)))) return;
190
+ this.C(y, F, U);
191
191
  }
192
192
  !1 === this.isUpdatePending && (this._$ES = this._$EP());
193
193
  }
194
- C(b, F, { useDefault: U, reflect: W, wrapped: G }, K) {
195
- U && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(b) && (this._$Ej.set(b, K ?? F ?? this[b]), !0 !== G || K !== void 0) || (this._$AL.has(b) || (this.hasUpdated || U || (F = void 0), this._$AL.set(b, F)), !0 === W && this._$Em !== b && (this._$Eq ??= /* @__PURE__ */ new Set()).add(b));
194
+ C(y, F, { useDefault: U, reflect: W, wrapped: G }, K) {
195
+ U && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(y) && (this._$Ej.set(y, K ?? F ?? this[y]), !0 !== G || K !== void 0) || (this._$AL.has(y) || (this.hasUpdated || U || (F = void 0), this._$AL.set(y, F)), !0 === W && this._$Em !== y && (this._$Eq ??= /* @__PURE__ */ new Set()).add(y));
196
196
  }
197
197
  async _$EP() {
198
198
  this.isUpdatePending = !0;
199
199
  try {
200
200
  await this._$ES;
201
- } catch (b) {
202
- Promise.reject(b);
201
+ } catch (y) {
202
+ Promise.reject(y);
203
203
  }
204
- let b = this.scheduleUpdate();
205
- return b != null && await b, !this.isUpdatePending;
204
+ let y = this.scheduleUpdate();
205
+ return y != null && await y, !this.isUpdatePending;
206
206
  }
207
207
  scheduleUpdate() {
208
208
  return this.performUpdate();
@@ -211,26 +211,26 @@ var y = class extends HTMLElement {
211
211
  if (!this.isUpdatePending) return;
212
212
  if (!this.hasUpdated) {
213
213
  if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
214
- for (let [b, F] of this._$Ep) this[b] = F;
214
+ for (let [y, F] of this._$Ep) this[y] = F;
215
215
  this._$Ep = void 0;
216
216
  }
217
- let b = this.constructor.elementProperties;
218
- if (b.size > 0) for (let [F, U] of b) {
219
- let { wrapped: b } = U, W = this[F];
220
- !0 !== b || this._$AL.has(F) || W === void 0 || this.C(F, void 0, U, W);
217
+ let y = this.constructor.elementProperties;
218
+ if (y.size > 0) for (let [F, U] of y) {
219
+ let { wrapped: y } = U, W = this[F];
220
+ !0 !== y || this._$AL.has(F) || W === void 0 || this.C(F, void 0, U, W);
221
221
  }
222
222
  }
223
- let b = !1, F = this._$AL;
223
+ let y = !1, F = this._$AL;
224
224
  try {
225
- b = this.shouldUpdate(F), b ? (this.willUpdate(F), this._$EO?.forEach(((b) => b.hostUpdate?.())), this.update(F)) : this._$EM();
225
+ y = this.shouldUpdate(F), y ? (this.willUpdate(F), this._$EO?.forEach(((y) => y.hostUpdate?.())), this.update(F)) : this._$EM();
226
226
  } catch (F) {
227
- throw b = !1, this._$EM(), F;
227
+ throw y = !1, this._$EM(), F;
228
228
  }
229
- b && this._$AE(F);
229
+ y && this._$AE(F);
230
230
  }
231
- willUpdate(b) {}
232
- _$AE(b) {
233
- this._$EO?.forEach(((b) => b.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(b)), this.updated(b);
231
+ willUpdate(y) {}
232
+ _$AE(y) {
233
+ this._$EO?.forEach(((y) => y.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(y)), this.updated(y);
234
234
  }
235
235
  _$EM() {
236
236
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
@@ -241,72 +241,72 @@ var y = class extends HTMLElement {
241
241
  getUpdateComplete() {
242
242
  return this._$ES;
243
243
  }
244
- shouldUpdate(b) {
244
+ shouldUpdate(y) {
245
245
  return !0;
246
246
  }
247
- update(b) {
248
- this._$Eq &&= this._$Eq.forEach(((b) => this._$ET(b, this[b]))), this._$EM();
247
+ update(y) {
248
+ this._$Eq &&= this._$Eq.forEach(((y) => this._$ET(y, this[y]))), this._$EM();
249
249
  }
250
- updated(b) {}
251
- firstUpdated(b) {}
250
+ updated(y) {}
251
+ firstUpdated(y) {}
252
252
  };
253
- y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d$1("elementProperties")] = /* @__PURE__ */ new Map(), y[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1?.({ ReactiveElement: y }), (a$1.reactiveElementVersions ??= []).push("2.1.1");
253
+ y$1.elementStyles = [], y$1.shadowRootOptions = { mode: "open" }, y$1[d$1("elementProperties")] = /* @__PURE__ */ new Map(), y$1[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1?.({ ReactiveElement: y$1 }), (a$1.reactiveElementVersions ??= []).push("2.1.1");
254
254
  /**
255
255
  * @license
256
256
  * Copyright 2017 Google LLC
257
257
  * SPDX-License-Identifier: BSD-3-Clause
258
258
  */
259
- var t$1 = globalThis, i$3 = t$1.trustedTypes, s$1 = i$3 ? i$3.createPolicy("lit-html", { createHTML: (b) => b }) : void 0, e$2 = "$lit$", h = `lit$${Math.random().toFixed(9).slice(2)}$`, o$3 = "?" + h, n$2 = `<${o$3}>`, r$3 = document, l = () => r$3.createComment(""), c = (b) => b === null || typeof b != "object" && typeof b != "function", a = Array.isArray, u$1 = (b) => a(b) || typeof b?.[Symbol.iterator] == "function", d = "[ \n\f\r]", f$1 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, _ = />/g, m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), p = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, x = ((b) => (F, ...U) => ({
260
- _$litType$: b,
259
+ var t$1 = globalThis, i$2 = t$1.trustedTypes, s$1 = i$2 ? i$2.createPolicy("lit-html", { createHTML: (y) => y }) : void 0, e$2 = "$lit$", h = `lit$${Math.random().toFixed(9).slice(2)}$`, o$3 = "?" + h, n$2 = `<${o$3}>`, r$2 = document, l = () => r$2.createComment(""), c = (y) => y === null || typeof y != "object" && typeof y != "function", a = Array.isArray, u = (y) => a(y) || typeof y?.[Symbol.iterator] == "function", d = "[ \n\f\r]", f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, _ = />/g, m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), p = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, x = ((y) => (F, ...U) => ({
260
+ _$litType$: y,
261
261
  strings: F,
262
262
  values: U
263
- }))(1), T = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), A = /* @__PURE__ */ new WeakMap(), C = r$3.createTreeWalker(r$3, 129);
264
- function P(b, F) {
265
- if (!a(b) || !b.hasOwnProperty("raw")) throw Error("invalid template strings array");
263
+ }))(1), T = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), A = /* @__PURE__ */ new WeakMap(), C = r$2.createTreeWalker(r$2, 129);
264
+ function P(y, F) {
265
+ if (!a(y) || !y.hasOwnProperty("raw")) throw Error("invalid template strings array");
266
266
  return s$1 === void 0 ? F : s$1.createHTML(F);
267
267
  }
268
- var V = (b, F) => {
269
- let U = b.length - 1, W = [], G, K = F === 2 ? "<svg>" : F === 3 ? "<math>" : "", q = f$1;
268
+ var V = (y, F) => {
269
+ let U = y.length - 1, W = [], G, K = F === 2 ? "<svg>" : F === 3 ? "<math>" : "", q = f;
270
270
  for (let F = 0; F < U; F++) {
271
- let U = b[F], J, Y, X = -1, Z = 0;
272
- for (; Z < U.length && (q.lastIndex = Z, Y = q.exec(U), Y !== null);) Z = q.lastIndex, q === f$1 ? Y[1] === "!--" ? q = v : Y[1] === void 0 ? Y[2] === void 0 ? Y[3] !== void 0 && (q = m) : ($.test(Y[2]) && (G = RegExp("</" + Y[2], "g")), q = m) : q = _ : q === m ? Y[0] === ">" ? (q = G ?? f$1, X = -1) : Y[1] === void 0 ? X = -2 : (X = q.lastIndex - Y[2].length, J = Y[1], q = Y[3] === void 0 ? m : Y[3] === "\"" ? g : p) : q === g || q === p ? q = m : q === v || q === _ ? q = f$1 : (q = m, G = void 0);
273
- let Q = q === m && b[F + 1].startsWith("/>") ? " " : "";
274
- K += q === f$1 ? U + n$2 : X >= 0 ? (W.push(J), U.slice(0, X) + e$2 + U.slice(X) + h + Q) : U + h + (X === -2 ? F : Q);
271
+ let U = y[F], J, Y, X = -1, Z = 0;
272
+ for (; Z < U.length && (q.lastIndex = Z, Y = q.exec(U), Y !== null);) Z = q.lastIndex, q === f ? Y[1] === "!--" ? q = v : Y[1] === void 0 ? Y[2] === void 0 ? Y[3] !== void 0 && (q = m) : ($.test(Y[2]) && (G = RegExp("</" + Y[2], "g")), q = m) : q = _ : q === m ? Y[0] === ">" ? (q = G ?? f, X = -1) : Y[1] === void 0 ? X = -2 : (X = q.lastIndex - Y[2].length, J = Y[1], q = Y[3] === void 0 ? m : Y[3] === "\"" ? g : p) : q === g || q === p ? q = m : q === v || q === _ ? q = f : (q = m, G = void 0);
273
+ let Q = q === m && y[F + 1].startsWith("/>") ? " " : "";
274
+ K += q === f ? U + n$2 : X >= 0 ? (W.push(J), U.slice(0, X) + e$2 + U.slice(X) + h + Q) : U + h + (X === -2 ? F : Q);
275
275
  }
276
- return [P(b, K + (b[U] || "<?>") + (F === 2 ? "</svg>" : F === 3 ? "</math>" : "")), W];
277
- }, N = class b {
276
+ return [P(y, K + (y[U] || "<?>") + (F === 2 ? "</svg>" : F === 3 ? "</math>" : "")), W];
277
+ }, N = class y {
278
278
  constructor({ strings: F, _$litType$: U }, W) {
279
279
  let G;
280
280
  this.parts = [];
281
281
  let K = 0, q = 0, J = F.length - 1, Y = this.parts, [X, Z] = V(F, U);
282
- if (this.el = b.createElement(X, W), C.currentNode = this.el.content, U === 2 || U === 3) {
283
- let b = this.el.content.firstChild;
284
- b.replaceWith(...b.childNodes);
282
+ if (this.el = y.createElement(X, W), C.currentNode = this.el.content, U === 2 || U === 3) {
283
+ let y = this.el.content.firstChild;
284
+ y.replaceWith(...y.childNodes);
285
285
  }
286
286
  for (; (G = C.nextNode()) !== null && Y.length < J;) {
287
287
  if (G.nodeType === 1) {
288
- if (G.hasAttributes()) for (let b of G.getAttributeNames()) if (b.endsWith(e$2)) {
289
- let F = Z[q++], U = G.getAttribute(b).split(h), W = /([.?@])?(.*)/.exec(F);
288
+ if (G.hasAttributes()) for (let y of G.getAttributeNames()) if (y.endsWith(e$2)) {
289
+ let F = Z[q++], U = G.getAttribute(y).split(h), W = /([.?@])?(.*)/.exec(F);
290
290
  Y.push({
291
291
  type: 1,
292
292
  index: K,
293
293
  name: W[2],
294
294
  strings: U,
295
295
  ctor: W[1] === "." ? H : W[1] === "?" ? I : W[1] === "@" ? L : k
296
- }), G.removeAttribute(b);
297
- } else b.startsWith(h) && (Y.push({
296
+ }), G.removeAttribute(y);
297
+ } else y.startsWith(h) && (Y.push({
298
298
  type: 6,
299
299
  index: K
300
- }), G.removeAttribute(b));
300
+ }), G.removeAttribute(y));
301
301
  if ($.test(G.tagName)) {
302
- let b = G.textContent.split(h), F = b.length - 1;
302
+ let y = G.textContent.split(h), F = y.length - 1;
303
303
  if (F > 0) {
304
- G.textContent = i$3 ? i$3.emptyScript : "";
305
- for (let U = 0; U < F; U++) G.append(b[U], l()), C.nextNode(), Y.push({
304
+ G.textContent = i$2 ? i$2.emptyScript : "";
305
+ for (let U = 0; U < F; U++) G.append(y[U], l()), C.nextNode(), Y.push({
306
306
  type: 2,
307
307
  index: ++K
308
308
  });
309
- G.append(b[F], l());
309
+ G.append(y[F], l());
310
310
  }
311
311
  }
312
312
  } else if (G.nodeType === 8) if (G.data === o$3) Y.push({
@@ -314,28 +314,28 @@ var V = (b, F) => {
314
314
  index: K
315
315
  });
316
316
  else {
317
- let b = -1;
318
- for (; (b = G.data.indexOf(h, b + 1)) !== -1;) Y.push({
317
+ let y = -1;
318
+ for (; (y = G.data.indexOf(h, y + 1)) !== -1;) Y.push({
319
319
  type: 7,
320
320
  index: K
321
- }), b += h.length - 1;
321
+ }), y += h.length - 1;
322
322
  }
323
323
  K++;
324
324
  }
325
325
  }
326
- static createElement(b, F) {
327
- let U = r$3.createElement("template");
328
- return U.innerHTML = b, U;
326
+ static createElement(y, F) {
327
+ let U = r$2.createElement("template");
328
+ return U.innerHTML = y, U;
329
329
  }
330
330
  };
331
- function S(b, F, U = b, W) {
331
+ function S(y, F, U = y, W) {
332
332
  if (F === T) return F;
333
333
  let G = W === void 0 ? U._$Cl : U._$Co?.[W], K = c(F) ? void 0 : F._$litDirective$;
334
- return G?.constructor !== K && (G?._$AO?.(!1), K === void 0 ? G = void 0 : (G = new K(b), G._$AT(b, U, W)), W === void 0 ? U._$Cl = G : (U._$Co ??= [])[W] = G), G !== void 0 && (F = S(b, G._$AS(b, F.values), G, W)), F;
334
+ return G?.constructor !== K && (G?._$AO?.(!1), K === void 0 ? G = void 0 : (G = new K(y), G._$AT(y, U, W)), W === void 0 ? U._$Cl = G : (U._$Co ??= [])[W] = G), G !== void 0 && (F = S(y, G._$AS(y, F.values), G, W)), F;
335
335
  }
336
336
  var M = class {
337
- constructor(b, F) {
338
- this._$AV = [], this._$AN = void 0, this._$AD = b, this._$AM = F;
337
+ constructor(y, F) {
338
+ this._$AV = [], this._$AN = void 0, this._$AD = y, this._$AM = F;
339
339
  }
340
340
  get parentNode() {
341
341
  return this._$AM.parentNode;
@@ -343,33 +343,33 @@ var M = class {
343
343
  get _$AU() {
344
344
  return this._$AM._$AU;
345
345
  }
346
- u(b) {
347
- let { el: { content: F }, parts: U } = this._$AD, W = (b?.creationScope ?? r$3).importNode(F, !0);
346
+ u(y) {
347
+ let { el: { content: F }, parts: U } = this._$AD, W = (y?.creationScope ?? r$2).importNode(F, !0);
348
348
  C.currentNode = W;
349
349
  let G = C.nextNode(), K = 0, q = 0, J = U[0];
350
350
  for (; J !== void 0;) {
351
351
  if (K === J.index) {
352
352
  let F;
353
- J.type === 2 ? F = new R(G, G.nextSibling, this, b) : J.type === 1 ? F = new J.ctor(G, J.name, J.strings, this, b) : J.type === 6 && (F = new z(G, this, b)), this._$AV.push(F), J = U[++q];
353
+ J.type === 2 ? F = new R(G, G.nextSibling, this, y) : J.type === 1 ? F = new J.ctor(G, J.name, J.strings, this, y) : J.type === 6 && (F = new z(G, this, y)), this._$AV.push(F), J = U[++q];
354
354
  }
355
355
  K !== J?.index && (G = C.nextNode(), K++);
356
356
  }
357
- return C.currentNode = r$3, W;
357
+ return C.currentNode = r$2, W;
358
358
  }
359
- p(b) {
359
+ p(y) {
360
360
  let F = 0;
361
- for (let U of this._$AV) U !== void 0 && (U.strings === void 0 ? U._$AI(b[F]) : (U._$AI(b, U, F), F += U.strings.length - 2)), F++;
361
+ for (let U of this._$AV) U !== void 0 && (U.strings === void 0 ? U._$AI(y[F]) : (U._$AI(y, U, F), F += U.strings.length - 2)), F++;
362
362
  }
363
- }, R = class b {
363
+ }, R = class y {
364
364
  get _$AU() {
365
365
  return this._$AM?._$AU ?? this._$Cv;
366
366
  }
367
- constructor(b, F, U, W) {
368
- this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = b, this._$AB = F, this._$AM = U, this.options = W, this._$Cv = W?.isConnected ?? !0;
367
+ constructor(y, F, U, W) {
368
+ this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = y, this._$AB = F, this._$AM = U, this.options = W, this._$Cv = W?.isConnected ?? !0;
369
369
  }
370
370
  get parentNode() {
371
- let b = this._$AA.parentNode, F = this._$AM;
372
- return F !== void 0 && b?.nodeType === 11 && (b = F.parentNode), b;
371
+ let y = this._$AA.parentNode, F = this._$AM;
372
+ return F !== void 0 && y?.nodeType === 11 && (y = F.parentNode), y;
373
373
  }
374
374
  get startNode() {
375
375
  return this._$AA;
@@ -377,44 +377,44 @@ var M = class {
377
377
  get endNode() {
378
378
  return this._$AB;
379
379
  }
380
- _$AI(b, F = this) {
381
- b = S(this, b, F), c(b) ? b === E || b == null || b === "" ? (this._$AH !== E && this._$AR(), this._$AH = E) : b !== this._$AH && b !== T && this._(b) : b._$litType$ === void 0 ? b.nodeType === void 0 ? u$1(b) ? this.k(b) : this._(b) : this.T(b) : this.$(b);
380
+ _$AI(y, F = this) {
381
+ y = S(this, y, F), c(y) ? y === E || y == null || y === "" ? (this._$AH !== E && this._$AR(), this._$AH = E) : y !== this._$AH && y !== T && this._(y) : y._$litType$ === void 0 ? y.nodeType === void 0 ? u(y) ? this.k(y) : this._(y) : this.T(y) : this.$(y);
382
382
  }
383
- O(b) {
384
- return this._$AA.parentNode.insertBefore(b, this._$AB);
383
+ O(y) {
384
+ return this._$AA.parentNode.insertBefore(y, this._$AB);
385
385
  }
386
- T(b) {
387
- this._$AH !== b && (this._$AR(), this._$AH = this.O(b));
386
+ T(y) {
387
+ this._$AH !== y && (this._$AR(), this._$AH = this.O(y));
388
388
  }
389
- _(b) {
390
- this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = b : this.T(r$3.createTextNode(b)), this._$AH = b;
389
+ _(y) {
390
+ this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = y : this.T(r$2.createTextNode(y)), this._$AH = y;
391
391
  }
392
- $(b) {
393
- let { values: F, _$litType$: U } = b, W = typeof U == "number" ? this._$AC(b) : (U.el === void 0 && (U.el = N.createElement(P(U.h, U.h[0]), this.options)), U);
392
+ $(y) {
393
+ let { values: F, _$litType$: U } = y, W = typeof U == "number" ? this._$AC(y) : (U.el === void 0 && (U.el = N.createElement(P(U.h, U.h[0]), this.options)), U);
394
394
  if (this._$AH?._$AD === W) this._$AH.p(F);
395
395
  else {
396
- let b = new M(W, this), U = b.u(this.options);
397
- b.p(F), this.T(U), this._$AH = b;
396
+ let y = new M(W, this), U = y.u(this.options);
397
+ y.p(F), this.T(U), this._$AH = y;
398
398
  }
399
399
  }
400
- _$AC(b) {
401
- let F = A.get(b.strings);
402
- return F === void 0 && A.set(b.strings, F = new N(b)), F;
400
+ _$AC(y) {
401
+ let F = A.get(y.strings);
402
+ return F === void 0 && A.set(y.strings, F = new N(y)), F;
403
403
  }
404
404
  k(F) {
405
405
  a(this._$AH) || (this._$AH = [], this._$AR());
406
406
  let U = this._$AH, W, G = 0;
407
- for (let K of F) G === U.length ? U.push(W = new b(this.O(l()), this.O(l()), this, this.options)) : W = U[G], W._$AI(K), G++;
407
+ for (let K of F) G === U.length ? U.push(W = new y(this.O(l()), this.O(l()), this, this.options)) : W = U[G], W._$AI(K), G++;
408
408
  G < U.length && (this._$AR(W && W._$AB.nextSibling, G), U.length = G);
409
409
  }
410
- _$AR(b = this._$AA.nextSibling, F) {
411
- for (this._$AP?.(!1, !0, F); b !== this._$AB;) {
412
- let F = b.nextSibling;
413
- b.remove(), b = F;
410
+ _$AR(y = this._$AA.nextSibling, F) {
411
+ for (this._$AP?.(!1, !0, F); y !== this._$AB;) {
412
+ let F = y.nextSibling;
413
+ y.remove(), y = F;
414
414
  }
415
415
  }
416
- setConnected(b) {
417
- this._$AM === void 0 && (this._$Cv = b, this._$AP?.(b));
416
+ setConnected(y) {
417
+ this._$AM === void 0 && (this._$Cv = y, this._$AP?.(y));
418
418
  }
419
419
  }, k = class {
420
420
  get tagName() {
@@ -423,77 +423,77 @@ var M = class {
423
423
  get _$AU() {
424
424
  return this._$AM._$AU;
425
425
  }
426
- constructor(b, F, U, W, G) {
427
- this.type = 1, this._$AH = E, this._$AN = void 0, this.element = b, this.name = F, this._$AM = W, this.options = G, U.length > 2 || U[0] !== "" || U[1] !== "" ? (this._$AH = Array(U.length - 1).fill(/* @__PURE__ */ new String()), this.strings = U) : this._$AH = E;
426
+ constructor(y, F, U, W, G) {
427
+ this.type = 1, this._$AH = E, this._$AN = void 0, this.element = y, this.name = F, this._$AM = W, this.options = G, U.length > 2 || U[0] !== "" || U[1] !== "" ? (this._$AH = Array(U.length - 1).fill(/* @__PURE__ */ new String()), this.strings = U) : this._$AH = E;
428
428
  }
429
- _$AI(b, F = this, U, W) {
429
+ _$AI(y, F = this, U, W) {
430
430
  let G = this.strings, K = !1;
431
- if (G === void 0) b = S(this, b, F, 0), K = !c(b) || b !== this._$AH && b !== T, K && (this._$AH = b);
431
+ if (G === void 0) y = S(this, y, F, 0), K = !c(y) || y !== this._$AH && y !== T, K && (this._$AH = y);
432
432
  else {
433
- let W = b, q, J;
434
- for (b = G[0], q = 0; q < G.length - 1; q++) J = S(this, W[U + q], F, q), J === T && (J = this._$AH[q]), K ||= !c(J) || J !== this._$AH[q], J === E ? b = E : b !== E && (b += (J ?? "") + G[q + 1]), this._$AH[q] = J;
433
+ let W = y, q, J;
434
+ for (y = G[0], q = 0; q < G.length - 1; q++) J = S(this, W[U + q], F, q), J === T && (J = this._$AH[q]), K ||= !c(J) || J !== this._$AH[q], J === E ? y = E : y !== E && (y += (J ?? "") + G[q + 1]), this._$AH[q] = J;
435
435
  }
436
- K && !W && this.j(b);
436
+ K && !W && this.j(y);
437
437
  }
438
- j(b) {
439
- b === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, b ?? "");
438
+ j(y) {
439
+ y === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, y ?? "");
440
440
  }
441
441
  }, H = class extends k {
442
442
  constructor() {
443
443
  super(...arguments), this.type = 3;
444
444
  }
445
- j(b) {
446
- this.element[this.name] = b === E ? void 0 : b;
445
+ j(y) {
446
+ this.element[this.name] = y === E ? void 0 : y;
447
447
  }
448
448
  }, I = class extends k {
449
449
  constructor() {
450
450
  super(...arguments), this.type = 4;
451
451
  }
452
- j(b) {
453
- this.element.toggleAttribute(this.name, !!b && b !== E);
452
+ j(y) {
453
+ this.element.toggleAttribute(this.name, !!y && y !== E);
454
454
  }
455
455
  }, L = class extends k {
456
- constructor(b, F, U, W, G) {
457
- super(b, F, U, W, G), this.type = 5;
456
+ constructor(y, F, U, W, G) {
457
+ super(y, F, U, W, G), this.type = 5;
458
458
  }
459
- _$AI(b, F = this) {
460
- if ((b = S(this, b, F, 0) ?? E) === T) return;
461
- let U = this._$AH, W = b === E && U !== E || b.capture !== U.capture || b.once !== U.once || b.passive !== U.passive, G = b !== E && (U === E || W);
462
- W && this.element.removeEventListener(this.name, this, U), G && this.element.addEventListener(this.name, this, b), this._$AH = b;
459
+ _$AI(y, F = this) {
460
+ if ((y = S(this, y, F, 0) ?? E) === T) return;
461
+ let U = this._$AH, W = y === E && U !== E || y.capture !== U.capture || y.once !== U.once || y.passive !== U.passive, G = y !== E && (U === E || W);
462
+ W && this.element.removeEventListener(this.name, this, U), G && this.element.addEventListener(this.name, this, y), this._$AH = y;
463
463
  }
464
- handleEvent(b) {
465
- typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, b) : this._$AH.handleEvent(b);
464
+ handleEvent(y) {
465
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, y) : this._$AH.handleEvent(y);
466
466
  }
467
467
  }, z = class {
468
- constructor(b, F, U) {
469
- this.element = b, this.type = 6, this._$AN = void 0, this._$AM = F, this.options = U;
468
+ constructor(y, F, U) {
469
+ this.element = y, this.type = 6, this._$AN = void 0, this._$AM = F, this.options = U;
470
470
  }
471
471
  get _$AU() {
472
472
  return this._$AM._$AU;
473
473
  }
474
- _$AI(b) {
475
- S(this, b);
474
+ _$AI(y) {
475
+ S(this, y);
476
476
  }
477
477
  }, j = t$1.litHtmlPolyfillSupport;
478
478
  j?.(N, R), (t$1.litHtmlVersions ??= []).push("3.3.1");
479
- var B = (b, F, U) => {
479
+ var B = (y, F, U) => {
480
480
  let W = U?.renderBefore ?? F, G = W._$litPart$;
481
481
  if (G === void 0) {
482
- let b = U?.renderBefore ?? null;
483
- W._$litPart$ = G = new R(F.insertBefore(l(), b), b, void 0, U ?? {});
482
+ let y = U?.renderBefore ?? null;
483
+ W._$litPart$ = G = new R(F.insertBefore(l(), y), y, void 0, U ?? {});
484
484
  }
485
- return G._$AI(b), G;
486
- }, s = globalThis, i$1 = class extends y {
485
+ return G._$AI(y), G;
486
+ }, s = globalThis, i$1 = class extends y$1 {
487
487
  constructor() {
488
488
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
489
489
  }
490
490
  createRenderRoot() {
491
- let b = super.createRenderRoot();
492
- return this.renderOptions.renderBefore ??= b.firstChild, b;
491
+ let y = super.createRenderRoot();
492
+ return this.renderOptions.renderBefore ??= y.firstChild, y;
493
493
  }
494
- update(b) {
494
+ update(y) {
495
495
  let F = this.render();
496
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(b), this._$Do = B(F, this.renderRoot, this.renderOptions);
496
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(y), this._$Do = B(F, this.renderRoot, this.renderOptions);
497
497
  }
498
498
  connectedCallback() {
499
499
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -515,20 +515,20 @@ o$2?.({ LitElement: i$1 }), (s.litElementVersions ??= []).push("4.2.1");
515
515
  */ var o$1 = {
516
516
  attribute: !0,
517
517
  type: String,
518
- converter: u,
518
+ converter: u$1,
519
519
  reflect: !1,
520
- hasChanged: f
521
- }, r$2 = (b = o$1, F, U) => {
520
+ hasChanged: f$1
521
+ }, r$1 = (y = o$1, F, U) => {
522
522
  let { kind: W, metadata: G } = U, K = globalThis.litPropertyMetadata.get(G);
523
- if (K === void 0 && globalThis.litPropertyMetadata.set(G, K = /* @__PURE__ */ new Map()), W === "setter" && ((b = Object.create(b)).wrapped = !0), K.set(U.name, b), W === "accessor") {
523
+ if (K === void 0 && globalThis.litPropertyMetadata.set(G, K = /* @__PURE__ */ new Map()), W === "setter" && ((y = Object.create(y)).wrapped = !0), K.set(U.name, y), W === "accessor") {
524
524
  let { name: W } = U;
525
525
  return {
526
526
  set(U) {
527
527
  let G = F.get.call(this);
528
- F.set.call(this, U), this.requestUpdate(W, G, b);
528
+ F.set.call(this, U), this.requestUpdate(W, G, y);
529
529
  },
530
530
  init(F) {
531
- return F !== void 0 && this.C(W, void 0, b, F), F;
531
+ return F !== void 0 && this.C(W, void 0, y, F), F;
532
532
  }
533
533
  };
534
534
  }
@@ -536,24 +536,24 @@ o$2?.({ LitElement: i$1 }), (s.litElementVersions ??= []).push("4.2.1");
536
536
  let { name: W } = U;
537
537
  return function(U) {
538
538
  let G = this[W];
539
- F.call(this, U), this.requestUpdate(W, G, b);
539
+ F.call(this, U), this.requestUpdate(W, G, y);
540
540
  };
541
541
  }
542
542
  throw Error("Unsupported decorator location: " + W);
543
543
  };
544
- function n(b) {
545
- return (F, U) => typeof U == "object" ? r$2(b, F, U) : ((b, F, U) => {
544
+ function n$1(y) {
545
+ return (F, U) => typeof U == "object" ? r$1(y, F, U) : ((y, F, U) => {
546
546
  let W = F.hasOwnProperty(U);
547
- return F.constructor.createProperty(U, b), W ? Object.getOwnPropertyDescriptor(F, U) : void 0;
548
- })(b, F, U);
547
+ return F.constructor.createProperty(U, y), W ? Object.getOwnPropertyDescriptor(F, U) : void 0;
548
+ })(y, F, U);
549
549
  }
550
550
  /**
551
551
  * @license
552
552
  * Copyright 2017 Google LLC
553
553
  * SPDX-License-Identifier: BSD-3-Clause
554
- */ function r$1(b) {
555
- return n({
556
- ...b,
554
+ */ function r(y) {
555
+ return n$1({
556
+ ...y,
557
557
  state: !0,
558
558
  attribute: !1
559
559
  });
@@ -570,34 +570,34 @@ var t = {
570
570
  BOOLEAN_ATTRIBUTE: 4,
571
571
  EVENT: 5,
572
572
  ELEMENT: 6
573
- }, e = (b) => (...F) => ({
574
- _$litDirective$: b,
573
+ }, e$1 = (y) => (...F) => ({
574
+ _$litDirective$: y,
575
575
  values: F
576
- }), i$2 = class {
577
- constructor(b) {}
576
+ }), i = class {
577
+ constructor(y) {}
578
578
  get _$AU() {
579
579
  return this._$AM._$AU;
580
580
  }
581
- _$AT(b, F, U) {
582
- this._$Ct = b, this._$AM = F, this._$Ci = U;
581
+ _$AT(y, F, U) {
582
+ this._$Ct = y, this._$AM = F, this._$Ci = U;
583
583
  }
584
- _$AS(b, F) {
585
- return this.update(b, F);
584
+ _$AS(y, F) {
585
+ return this.update(y, F);
586
586
  }
587
- update(b, F) {
587
+ update(y, F) {
588
588
  return this.render(...F);
589
589
  }
590
- }, e$1 = class extends i$2 {
591
- constructor(b) {
592
- if (super(b), this.it = E, b.type !== t.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
593
- }
594
- render(b) {
595
- if (b === E || b == null) return this._t = void 0, this.it = b;
596
- if (b === T) return b;
597
- if (typeof b != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
598
- if (b === this.it) return this._t;
599
- this.it = b;
600
- let F = [b];
590
+ }, e = class extends i {
591
+ constructor(y) {
592
+ if (super(y), this.it = E, y.type !== t.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
593
+ }
594
+ render(y) {
595
+ if (y === E || y == null) return this._t = void 0, this.it = y;
596
+ if (y === T) return y;
597
+ if (typeof y != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
598
+ if (y === this.it) return this._t;
599
+ this.it = y;
600
+ let F = [y];
601
601
  return F.raw = F, this._t = {
602
602
  _$litType$: this.constructor.resultType,
603
603
  strings: F,
@@ -605,41 +605,41 @@ var t = {
605
605
  };
606
606
  }
607
607
  };
608
- e$1.directiveName = "unsafeHTML", e$1.resultType = 1;
609
- var o = e(e$1);
608
+ e.directiveName = "unsafeHTML", e.resultType = 1;
609
+ var o = e$1(e);
610
610
  /**
611
611
  * @license
612
612
  * Copyright 2021 Google LLC
613
613
  * SPDX-License-Identifier: BSD-3-Clause
614
614
  */
615
- function n$1(b, F, U) {
616
- return b ? F(b) : U?.(b);
615
+ function n(y, F, U) {
616
+ return y ? F(y) : U?.(y);
617
617
  }
618
618
  var shiki_default = ".shiki{color-scheme:var(--shiki-theme-type,light);padding:.875em;overflow-x:auto}code{z-index:0;width:max-content;min-width:100%;font-size:var(--font-size,.875em);counter-reset:step;counter-increment:step 0;display:block;position:relative}code .line:before{content:counter(step);counter-increment:step;text-align:right;color:#738a9480;width:1rem;margin-right:1.5rem;display:inline-block}code .line:last-child:empty:before{content:none;counter-increment:none}.has-diff .diff,.has-highlighted .highlighted{width:100%;display:inline-block;position:relative}.has-diff .diff.remove:before{content:\"-\"}.has-diff .diff.add:before{content:\"+\"}.has-diff .diff.remove:after{content:\"\";z-index:-1;background:#ef444426;border-left:1px solid #ef4444cc;position:absolute;inset:0 -.875em}.has-diff .diff.add:after{content:\"\";z-index:-1;background:#22c55e26;border-left:1px solid #22c55ecc;position:absolute;inset:0 -.875em}.has-focused .line:not(.focused){opacity:.7;filter:blur(.095rem);transition:filter .35s,opacity .35s}.has-focused:hover .line:not(.focused){opacity:1;filter:blur()}.has-highlighted .highlighted:after{content:\"\";z-index:-1;background:#65758529;border-left:1px solid #22c55ecc;position:absolute;inset:0 -.875em}.has-highlighted .highlighted.error:after{background:#f43f5e29!important}.has-highlighted .highlighted.warning:after{background:#eab30829!important}:host([color-scheme=dark]) .shiki,:host([color-scheme=dark]) .shiki span{color:var(--shiki-dark)!important}:host([color-scheme=dark]) .shiki{background-color:var(--shiki-dark-bg)!important}";
619
- function copyText(b, F) {
620
- if (navigator.clipboard) navigator.clipboard.writeText(b).then(() => {
619
+ function copyText(y, F) {
620
+ if (navigator.clipboard) navigator.clipboard.writeText(y).then(() => {
621
621
  F();
622
622
  });
623
623
  else {
624
624
  let U = document.createElement("textarea");
625
- U.value = b, U.style.position = "fixed", U.style.opacity = "0", document.body.appendChild(U), U.focus(), U.select();
625
+ U.value = y, U.style.position = "fixed", U.style.opacity = "0", document.body.appendChild(U), U.focus(), U.select();
626
626
  try {
627
627
  document.execCommand("copy") && F();
628
- } catch (b) {
629
- console.error("Fallback: Oops, unable to copy", b);
628
+ } catch (y) {
629
+ console.error("Fallback: Oops, unable to copy", y);
630
630
  }
631
631
  document.body.removeChild(U);
632
632
  }
633
633
  }
634
- function __decorate(b, F, U, W) {
634
+ function __decorate(y, F, U, W) {
635
635
  var G = arguments.length, K = G < 3 ? F : W === null ? W = Object.getOwnPropertyDescriptor(F, U) : W, q;
636
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") K = Reflect.decorate(b, F, U, W);
637
- else for (var J = b.length - 1; J >= 0; J--) (q = b[J]) && (K = (G < 3 ? q(K) : G > 3 ? q(F, U, K) : q(F, U)) || K);
636
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") K = Reflect.decorate(y, F, U, W);
637
+ else for (var J = y.length - 1; J >= 0; J--) (q = y[J]) && (K = (G < 3 ? q(K) : G > 3 ? q(F, U, K) : q(F, U)) || K);
638
638
  return G > 3 && K && Object.defineProperty(F, U, K), K;
639
639
  }
640
640
  var ShikiCodeBaseVariant = class extends i$1 {
641
- constructor(...b) {
642
- super(...b), this.options = {
641
+ constructor(...y) {
642
+ super(...y), this.options = {
643
643
  html: "",
644
644
  languageName: "Unknown",
645
645
  colorScheme: "light",
@@ -647,19 +647,19 @@ var ShikiCodeBaseVariant = class extends i$1 {
647
647
  fontSize: "0.875em"
648
648
  }, this.copied = !1;
649
649
  }
650
- updated(b) {
651
- b.has("options") && (this.setAttribute("color-scheme", this.options.colorScheme), this.style.setProperty("--shiki-theme-type", this.options.theme?.type || "light"), this.style.setProperty("--font-size", this.options.fontSize || "0.875em"));
650
+ updated(y) {
651
+ y.has("options") && (this.setAttribute("color-scheme", this.options.colorScheme), this.style.setProperty("--shiki-theme-type", this.options.theme?.type || "light"), this.style.setProperty("--font-size", this.options.fontSize || "0.875em"));
652
652
  }
653
653
  handleCopyCode() {
654
- let b = this.shadowRoot?.querySelector("pre");
655
- copyText(b?.innerText || b?.textContent || "", () => {
654
+ let y = this.shadowRoot?.querySelector("pre");
655
+ copyText(y?.innerText || y?.textContent || "", () => {
656
656
  this.copied = !0, setTimeout(() => {
657
657
  this.copied = !1;
658
658
  }, 2e3);
659
659
  });
660
660
  }
661
661
  };
662
- __decorate([n({ type: Object })], ShikiCodeBaseVariant.prototype, "options", void 0), __decorate([r$1()], ShikiCodeBaseVariant.prototype, "copied", void 0);
662
+ __decorate([n$1({ type: Object })], ShikiCodeBaseVariant.prototype, "options", void 0), __decorate([r()], ShikiCodeBaseVariant.prototype, "copied", void 0);
663
663
  var ShikiCodeSimpleVariant = class extends ShikiCodeBaseVariant {
664
664
  render() {
665
665
  return x`
@@ -677,15 +677,16 @@ var ShikiCodeSimpleVariant = class extends ShikiCodeBaseVariant {
677
677
  @click=${this.handleCopyCode}
678
678
  tabindex="-1"
679
679
  >
680
- ${n$1(this.copied, () => x`<i class="i-tabler-check block" style="color: ${this.options.theme?.fg}"></i>`, () => x`<i class="i-tabler-copy block" style="color: ${this.options.theme?.fg}"></i>`)}
680
+ ${n(this.copied, () => x`<i class="i-tabler-check block" style="color: ${this.options.theme?.fg}"></i>`, () => x`<i class="i-tabler-copy block" style="color: ${this.options.theme?.fg}"></i>`)}
681
681
  </button>
682
682
  </div>
683
683
  `;
684
684
  }
685
- static #_ = this.styles = [
686
- r(tailwind_default),
687
- r(shiki_default),
688
- i`
685
+ static {
686
+ this.styles = [
687
+ r$4(tailwind_default),
688
+ r$4(shiki_default),
689
+ i$4`
689
690
  .shiki {
690
691
  border-radius: inherit;
691
692
  }
@@ -717,12 +718,13 @@ var ShikiCodeSimpleVariant = class extends ShikiCodeBaseVariant {
717
718
  .shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / 0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / 0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}
718
719
  .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;};
719
720
  `
720
- ];
721
+ ];
722
+ }
721
723
  };
722
724
  customElements.get("shiki-code-simple-variant") || customElements.define("shiki-code-simple-variant", ShikiCodeSimpleVariant);
723
725
  var ShikiCodeMacVariant = class extends ShikiCodeBaseVariant {
724
- constructor(...b) {
725
- super(...b), this.fold = !1;
726
+ constructor(...y) {
727
+ super(...y), this.fold = !1;
726
728
  }
727
729
  render() {
728
730
  return x`
@@ -747,7 +749,7 @@ var ShikiCodeMacVariant = class extends ShikiCodeBaseVariant {
747
749
  this.fold = !this.fold;
748
750
  }}
749
751
  >
750
- ${n$1(this.fold, () => x`<i
752
+ ${n(this.fold, () => x`<i
751
753
  class="i-mingcute-left-line block"
752
754
  style="color: ${this.options.theme?.fg}"
753
755
  ></i>`, () => x`<i
@@ -756,18 +758,19 @@ var ShikiCodeMacVariant = class extends ShikiCodeBaseVariant {
756
758
  ></i>`)}
757
759
  </button>
758
760
  <button class="select-none" tabindex="-1" @click=${this.handleCopyCode}>
759
- ${n$1(this.copied, () => x`<i class="i-tabler-check block" style="color: ${this.options.theme?.fg}"></i>`, () => x`<i class="i-tabler-copy block" style="color: ${this.options.theme?.fg}"></i>`)}
761
+ ${n(this.copied, () => x`<i class="i-tabler-check block" style="color: ${this.options.theme?.fg}"></i>`, () => x`<i class="i-tabler-copy block" style="color: ${this.options.theme?.fg}"></i>`)}
760
762
  </button>
761
763
  </div>
762
764
  </header>
763
- ${n$1(this.fold, () => x``, () => x`${o(this.options.html)}`)}
765
+ ${n(this.fold, () => x``, () => x`${o(this.options.html)}`)}
764
766
  </div>
765
767
  `;
766
768
  }
767
- static #_ = this.styles = [
768
- r(tailwind_default),
769
- r(shiki_default),
770
- i`
769
+ static {
770
+ this.styles = [
771
+ r$4(tailwind_default),
772
+ r$4(shiki_default),
773
+ i$4`
771
774
  /* layer: preflights */
772
775
  *,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}
773
776
  /* layer: icons */
@@ -798,12 +801,13 @@ var ShikiCodeMacVariant = class extends ShikiCodeBaseVariant {
798
801
  .opacity-95{opacity:0.95;}
799
802
  .shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / 0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / 0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);};
800
803
  `
801
- ];
804
+ ];
805
+ }
802
806
  };
803
- __decorate([r$1()], ShikiCodeMacVariant.prototype, "fold", void 0), customElements.get("shiki-code-mac-variant") || customElements.define("shiki-code-mac-variant", ShikiCodeMacVariant);
807
+ __decorate([r()], ShikiCodeMacVariant.prototype, "fold", void 0), customElements.get("shiki-code-mac-variant") || customElements.define("shiki-code-mac-variant", ShikiCodeMacVariant);
804
808
  var ShikiCode = class extends i$1 {
805
- constructor(...b) {
806
- super(...b), this.lightTheme = "github-light", this.darkTheme = "github-dark", this.variant = "simple", this.fontSize = "0.875em", this.loading = !0, this.html = "", this.languageCode = "", this.languageName = "", this.lightThemeRegistration = null, this.darkThemeRegistration = null, this.code = "", this.copied = !1, this.error = "", this._observer = null, this._media = null, this._colorScheme = "light";
809
+ constructor(...y) {
810
+ super(...y), this.lightTheme = "github-light", this.darkTheme = "github-dark", this.variant = "simple", this.fontSize = "0.875em", this.loading = !0, this.html = "", this.languageCode = "", this.languageName = "", this.lightThemeRegistration = null, this.darkThemeRegistration = null, this.code = "", this.copied = !1, this.error = "", this._observer = null, this._media = null, this._colorScheme = "light";
807
811
  }
808
812
  get _themeRegistration() {
809
813
  return this._colorScheme === "dark" ? this.darkThemeRegistration : this.lightThemeRegistration;
@@ -821,8 +825,8 @@ var ShikiCode = class extends i$1 {
821
825
  this._observer?.disconnect(), this._media?.removeEventListener("change", () => this.updateTheme()), super.disconnectedCallback();
822
826
  }
823
827
  isDarkMode() {
824
- let b = document.documentElement, F = document.body, U = (b, F) => b?.classList.contains(F), W = (b, F, U) => b?.getAttribute(F) === U;
825
- return U(b, "color-scheme-auto") || U(F, "color-scheme-auto") || W(b, "data-color-scheme", "auto") || W(F, "data-color-scheme", "auto") ? this._media?.matches : !!(U(b, "color-scheme-dark") || U(b, "dark") || W(b, "data-color-scheme", "dark") || U(F, "color-scheme-dark") || U(F, "dark") || W(F, "data-color-scheme", "dark"));
828
+ let y = document.documentElement, F = document.body, U = (y, F) => y?.classList.contains(F), W = (y, F, U) => y?.getAttribute(F) === U;
829
+ return U(y, "color-scheme-auto") || U(F, "color-scheme-auto") || W(y, "data-color-scheme", "auto") || W(F, "data-color-scheme", "auto") ? this._media?.matches : !!(U(y, "color-scheme-dark") || U(y, "dark") || W(y, "data-color-scheme", "dark") || U(F, "color-scheme-dark") || U(F, "dark") || W(F, "data-color-scheme", "dark"));
826
830
  }
827
831
  updateTheme() {
828
832
  this._colorScheme = this.isDarkMode() ? "dark" : "light";
@@ -833,52 +837,52 @@ var ShikiCode = class extends i$1 {
833
837
  renderCodeBlockBody() {
834
838
  if (this.loading) return x``;
835
839
  if (this.error) return x`<div class="text-sm text-red-500">错误: ${this.error}</div>`;
836
- let b = {
840
+ let y = {
837
841
  html: this.html,
838
842
  languageName: this.languageName,
839
843
  colorScheme: this._colorScheme,
840
844
  theme: this._themeRegistration,
841
845
  fontSize: this.fontSize
842
846
  };
843
- if (this.variant === "mac") return x`<shiki-code-mac-variant .options=${b}></shiki-code-mac-variant>`;
844
- if (this.variant === "simple") return x`<shiki-code-simple-variant .options=${b}></shiki-code-simple-variant>`;
847
+ if (this.variant === "mac") return x`<shiki-code-mac-variant .options=${y}></shiki-code-mac-variant>`;
848
+ if (this.variant === "simple") return x`<shiki-code-simple-variant .options=${y}></shiki-code-simple-variant>`;
845
849
  }
846
- handleSlotchange(b) {
847
- let F = b.target.assignedElements({ flatten: !0 });
850
+ handleSlotchange(y) {
851
+ let F = y.target.assignedElements({ flatten: !0 });
848
852
  if (!F.length) return;
849
853
  let U = F[0];
850
854
  if (U.tagName === "PRE") {
851
- let b = U.querySelector("code");
852
- b && this.process(b);
855
+ let y = U.querySelector("code");
856
+ y && this.process(y);
853
857
  }
854
858
  }
855
- async process(b) {
859
+ async process(y) {
856
860
  try {
857
- this.languageCode = this.extractLanguageCode(b.classList) || "plaintext", this.languageCode === "auto" && (this.languageCode = "plaintext"), this.languageCode === "text" && (this.languageCode = "plaintext"), this.code = b.textContent || "", this.html = await this.renderCodeAsHtml(this.code || "", this.languageCode);
861
+ this.languageCode = this.extractLanguageCode(y.classList) || "plaintext", this.languageCode === "auto" && (this.languageCode = "plaintext"), this.languageCode === "text" && (this.languageCode = "plaintext"), this.code = y.textContent || "", this.html = await this.renderCodeAsHtml(this.code || "", this.languageCode);
858
862
  let { getSingletonHighlighter: F } = await import("shiki"), U = await F();
859
863
  this.languageCode === "plaintext" ? this.languageName = "plaintext" : this.languageName = U.getLanguage(this.languageCode).name, this.lightThemeRegistration = U.getTheme(this.lightTheme), this.darkThemeRegistration = U.getTheme(this.darkTheme || this.lightTheme);
860
- } catch (b) {
861
- b instanceof Error && (this.error = b.message);
864
+ } catch (y) {
865
+ y instanceof Error && (this.error = y.message);
862
866
  } finally {
863
- this.shadowRoot?.querySelector("slot")?.assignedElements().forEach((b) => {
864
- b instanceof HTMLElement && b.setAttribute("style", "display: none !important;");
867
+ this.shadowRoot?.querySelector("slot")?.assignedElements().forEach((y) => {
868
+ y instanceof HTMLElement && y.setAttribute("style", "display: none !important;");
865
869
  }), this.loading = !1;
866
870
  }
867
871
  }
868
- extractLanguageCode(b) {
872
+ extractLanguageCode(y) {
869
873
  let F = ["language-", "lang-"];
870
- for (let U = 0; U < b.length; U++) {
871
- let W = b[U];
872
- for (let b = 0; b < F.length; b++) {
873
- let U = F[b];
874
+ for (let U = 0; U < y.length; U++) {
875
+ let W = y[U];
876
+ for (let y = 0; y < F.length; y++) {
877
+ let U = F[y];
874
878
  if (W.startsWith(U)) return W.substring(U.length).toLowerCase();
875
879
  }
876
880
  }
877
881
  return null;
878
882
  }
879
- async renderCodeAsHtml(b, F) {
883
+ async renderCodeAsHtml(y, F) {
880
884
  let { codeToHtml: U } = await import("shiki"), { transformerNotationDiff: W, transformerNotationHighlight: G, transformerNotationFocus: K, transformerNotationErrorLevel: q } = await import("@shikijs/transformers");
881
- return await U(b, {
885
+ return await U(y, {
882
886
  lang: F,
883
887
  themes: {
884
888
  light: this.lightTheme,
@@ -892,7 +896,8 @@ var ShikiCode = class extends i$1 {
892
896
  ]
893
897
  });
894
898
  }
895
- static #_ = this.styles = [r(tailwind_default), i`
899
+ static {
900
+ this.styles = [r$4(tailwind_default), i$4`
896
901
  :host {
897
902
  display: block;
898
903
  margin: 1rem 0 !important;
@@ -908,15 +913,16 @@ var ShikiCode = class extends i$1 {
908
913
  .text-sm{font-size:0.875rem;line-height:1.25rem;}
909
914
  .text-red-500{--un-text-opacity:1;color:rgb(239 68 68 / var(--un-text-opacity)) /* #ef4444 */;};
910
915
  `];
916
+ }
911
917
  };
912
- __decorate([n({
918
+ __decorate([n$1({
913
919
  type: String,
914
920
  attribute: "light-theme"
915
- })], ShikiCode.prototype, "lightTheme", void 0), __decorate([n({
921
+ })], ShikiCode.prototype, "lightTheme", void 0), __decorate([n$1({
916
922
  type: String,
917
923
  attribute: "dark-theme"
918
- })], ShikiCode.prototype, "darkTheme", void 0), __decorate([n({ type: String })], ShikiCode.prototype, "variant", void 0), __decorate([n({
924
+ })], ShikiCode.prototype, "darkTheme", void 0), __decorate([n$1({ type: String })], ShikiCode.prototype, "variant", void 0), __decorate([n$1({
919
925
  type: String,
920
926
  attribute: "font-size"
921
- })], ShikiCode.prototype, "fontSize", void 0), __decorate([r$1()], ShikiCode.prototype, "loading", void 0), __decorate([r$1()], ShikiCode.prototype, "html", void 0), __decorate([r$1()], ShikiCode.prototype, "languageCode", void 0), __decorate([r$1()], ShikiCode.prototype, "languageName", void 0), __decorate([r$1()], ShikiCode.prototype, "lightThemeRegistration", void 0), __decorate([r$1()], ShikiCode.prototype, "darkThemeRegistration", void 0), __decorate([r$1()], ShikiCode.prototype, "code", void 0), __decorate([r$1()], ShikiCode.prototype, "copied", void 0), __decorate([r$1()], ShikiCode.prototype, "error", void 0), __decorate([r$1()], ShikiCode.prototype, "_colorScheme", void 0), customElements.get("shiki-code") || customElements.define("shiki-code", ShikiCode);
927
+ })], ShikiCode.prototype, "fontSize", void 0), __decorate([r()], ShikiCode.prototype, "loading", void 0), __decorate([r()], ShikiCode.prototype, "html", void 0), __decorate([r()], ShikiCode.prototype, "languageCode", void 0), __decorate([r()], ShikiCode.prototype, "languageName", void 0), __decorate([r()], ShikiCode.prototype, "lightThemeRegistration", void 0), __decorate([r()], ShikiCode.prototype, "darkThemeRegistration", void 0), __decorate([r()], ShikiCode.prototype, "code", void 0), __decorate([r()], ShikiCode.prototype, "copied", void 0), __decorate([r()], ShikiCode.prototype, "error", void 0), __decorate([r()], ShikiCode.prototype, "_colorScheme", void 0), customElements.get("shiki-code") || customElements.define("shiki-code", ShikiCode);
922
928
  export { ShikiCode };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halo-dev/shiki-code-element",
3
- "version": "1.0.10",
3
+ "version": "1.1.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/halo-sigs/plugin-shiki.git",
@@ -21,17 +21,17 @@
21
21
  "dist"
22
22
  ],
23
23
  "dependencies": {
24
- "lit": "^3.3.1"
24
+ "lit": "^3.3.2"
25
25
  },
26
26
  "devDependencies": {
27
- "@iconify/json": "^2.2.395",
28
- "@unocss/reset": "^66.5.4",
29
- "unocss": "^66.5.4",
27
+ "@iconify/json": "^2.2.421",
28
+ "@unocss/reset": "^66.5.11",
29
+ "unocss": "^66.5.11",
30
30
  "vite-plugin-dts": "^4.5.4"
31
31
  },
32
32
  "peerDependencies": {
33
- "@shikijs/transformers": "^3.15.x",
34
- "shiki": "^3.15.x"
33
+ "@shikijs/transformers": "^3",
34
+ "shiki": "^3"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "tsc && vite build --config vite.lib.config.ts",