@kubed.io/cdn 0.0.1 → 0.0.4
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 +0 -0
- package/README.md +33 -5
- package/dist/chunks/define-XzEniRJH.js +10 -0
- package/dist/chunks/define-XzEniRJH.js.map +1 -0
- package/dist/chunks/element-ChNBLJ5X.js +632 -0
- package/dist/chunks/element-ChNBLJ5X.js.map +1 -0
- package/dist/chunks/kd-Bbw0GeQ5.js +1149 -0
- package/dist/chunks/kd-Bbw0GeQ5.js.map +1 -0
- package/dist/chunks/scene-CUr0fSXC.js +240 -0
- package/dist/chunks/scene-CUr0fSXC.js.map +1 -0
- package/dist/k8s/elements/events.d.ts +54 -0
- package/dist/k8s/elements/object.d.ts +47 -0
- package/dist/k8s/elements/ref.d.ts +45 -0
- package/dist/k8s/events.d.ts +63 -0
- package/dist/k8s/icons.d.ts +18 -0
- package/dist/k8s/index.d.ts +13 -0
- package/dist/k8s/links.d.ts +72 -0
- package/dist/k8s/map.d.ts +114 -0
- package/dist/k8s.js +909 -0
- package/dist/k8s.js.map +1 -0
- package/dist/kd/cell.d.ts +45 -0
- package/dist/kd/define.d.ts +0 -0
- package/dist/kd/element.d.ts +32 -0
- package/dist/kd/elements/bar.d.ts +33 -0
- package/dist/kd/elements/data.d.ts +27 -0
- package/dist/kd/elements/groups.d.ts +32 -0
- package/dist/kd/elements/link.d.ts +67 -0
- package/dist/kd/elements/mask.d.ts +22 -0
- package/dist/kd/elements/meter.d.ts +37 -0
- package/dist/kd/elements/pill.d.ts +15 -0
- package/dist/kd/elements/sheet.d.ts +28 -0
- package/dist/kd/elements/steps.d.ts +30 -0
- package/dist/kd/elements/table.d.ts +38 -0
- package/dist/kd/elements/tabs.d.ts +27 -0
- package/dist/kd/elements/tile.d.ts +19 -0
- package/dist/kd/helpers.d.ts +12 -0
- package/dist/kd/index.d.ts +30 -0
- package/dist/kd/parts.d.ts +15 -0
- package/dist/kd/scene.d.ts +178 -0
- package/dist/kd/theme.d.ts +2 -0
- package/dist/kd/yaml.d.ts +17 -0
- package/dist/kd.css +0 -0
- package/dist/kd.js +5 -64
- package/dist/n8n/config.d.ts +57 -0
- package/dist/n8n/fetch.d.ts +35 -0
- package/dist/n8n/history.d.ts +8 -0
- package/dist/n8n/index.d.ts +8 -0
- package/dist/n8n/metadata.d.ts +10 -0
- package/dist/n8n/mount.d.ts +29 -0
- package/dist/n8n/state.d.ts +44 -0
- package/dist/n8n/stream.d.ts +17 -0
- package/dist/n8n/styles.d.ts +1 -0
- package/dist/n8n.js +384 -0
- package/dist/n8n.js.map +1 -0
- package/dist/openapi/describe.d.ts +20 -0
- package/dist/openapi/index.d.ts +6 -0
- package/dist/openapi/model.d.ts +154 -0
- package/dist/openapi/schema.d.ts +52 -0
- package/dist/openapi.js +504 -0
- package/dist/openapi.js.map +1 -0
- package/package.json +18 -2
- package/dist/kd.js.map +0 -1
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
//#region src/kd/theme.ts
|
|
2
|
+
var e = [
|
|
3
|
+
["--kd-bg", (e) => e.colors.background.primary],
|
|
4
|
+
["--kd-bg-2", (e) => e.colors.background.secondary],
|
|
5
|
+
["--kd-canvas", (e) => e.colors.background.canvas],
|
|
6
|
+
["--kd-text", (e) => e.colors.text.primary],
|
|
7
|
+
["--kd-text-2", (e) => e.colors.text.secondary],
|
|
8
|
+
["--kd-text-dim", (e) => e.colors.text.disabled],
|
|
9
|
+
["--kd-link", (e) => e.colors.text.link],
|
|
10
|
+
["--kd-border", (e) => e.colors.border.weak],
|
|
11
|
+
["--kd-border-strong", (e) => e.colors.border.medium],
|
|
12
|
+
["--kd-primary", (e) => e.colors.primary.main],
|
|
13
|
+
["--kd-success", (e) => e.colors.success.main],
|
|
14
|
+
["--kd-warning", (e) => e.colors.warning.main],
|
|
15
|
+
["--kd-error", (e) => e.colors.error.main],
|
|
16
|
+
["--kd-info", (e) => e.colors.info.main],
|
|
17
|
+
["--kd-font", (e) => e.typography.fontFamily],
|
|
18
|
+
["--kd-font-mono", (e) => e.typography.fontFamilyMonospace],
|
|
19
|
+
["--kd-radius", (e) => e.shape.radius.default],
|
|
20
|
+
["--kd-space", (e) => e.spacing(1)]
|
|
21
|
+
];
|
|
22
|
+
function t(e, t) {
|
|
23
|
+
try {
|
|
24
|
+
let n = t(e);
|
|
25
|
+
return typeof n == "string" || typeof n == "number" ? String(n) : void 0;
|
|
26
|
+
} catch {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function n(n, i) {
|
|
31
|
+
if (n && i) {
|
|
32
|
+
for (let [r, a] of e) {
|
|
33
|
+
let e = t(i, a);
|
|
34
|
+
e !== void 0 && n.style.setProperty(r, e);
|
|
35
|
+
}
|
|
36
|
+
typeof i.isDark == "boolean" && n.setAttribute("data-theme", i.isDark ? "dark" : "light");
|
|
37
|
+
for (let e of n.querySelectorAll(`[${r}]`)) e.kdInherit?.();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
var r = "data-kd-self-themed", i = /* @__PURE__ */ new WeakMap();
|
|
41
|
+
function a(e) {
|
|
42
|
+
let t = i.get(e);
|
|
43
|
+
return t || (t = Promise.resolve().then(() => e.System?.import?.("@grafana/runtime")).then((e) => {
|
|
44
|
+
let t = e;
|
|
45
|
+
return t?.config?.theme2 && t.getAppEvents && t.ThemeChangedEvent ? t : null;
|
|
46
|
+
}).catch(() => null), i.set(e, t)), t;
|
|
47
|
+
}
|
|
48
|
+
async function o(e) {
|
|
49
|
+
let t = e.ownerDocument?.defaultView, r = t ? await a(t) : null;
|
|
50
|
+
if (!r) return () => {};
|
|
51
|
+
n(e, r.config.theme2);
|
|
52
|
+
let i = r.getAppEvents().subscribe(r.ThemeChangedEvent, (t) => n(e, t?.payload ?? r.config.theme2));
|
|
53
|
+
return () => i.unsubscribe();
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region node_modules/@lit/reactive-element/css-tag.js
|
|
57
|
+
var s = globalThis, c = s.ShadowRoot && (s.ShadyCSS === void 0 || s.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, l = Symbol(), u = /* @__PURE__ */ new WeakMap(), d = class {
|
|
58
|
+
constructor(e, t, n) {
|
|
59
|
+
if (this._$cssResult$ = !0, n !== l) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
60
|
+
this.cssText = e, this.t = t;
|
|
61
|
+
}
|
|
62
|
+
get styleSheet() {
|
|
63
|
+
let e = this.o, t = this.t;
|
|
64
|
+
if (c && e === void 0) {
|
|
65
|
+
let n = t !== void 0 && t.length === 1;
|
|
66
|
+
n && (e = u.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && u.set(t, e));
|
|
67
|
+
}
|
|
68
|
+
return e;
|
|
69
|
+
}
|
|
70
|
+
toString() {
|
|
71
|
+
return this.cssText;
|
|
72
|
+
}
|
|
73
|
+
}, ee = (e) => new d(typeof e == "string" ? e : e + "", void 0, l), f = (e, ...t) => new d(e.length === 1 ? e[0] : t.reduce((t, n, r) => t + ((e) => {
|
|
74
|
+
if (!0 === e._$cssResult$) return e.cssText;
|
|
75
|
+
if (typeof e == "number") return e;
|
|
76
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + e + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
77
|
+
})(n) + e[r + 1], e[0]), e, l), te = (e, t) => {
|
|
78
|
+
if (c) e.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
79
|
+
else for (let n of t) {
|
|
80
|
+
let t = document.createElement("style"), r = s.litNonce;
|
|
81
|
+
r !== void 0 && t.setAttribute("nonce", r), t.textContent = n.cssText, e.appendChild(t);
|
|
82
|
+
}
|
|
83
|
+
}, p = c ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((e) => {
|
|
84
|
+
let t = "";
|
|
85
|
+
for (let n of e.cssRules) t += n.cssText;
|
|
86
|
+
return ee(t);
|
|
87
|
+
})(e) : e, { is: ne, defineProperty: re, getOwnPropertyDescriptor: ie, getOwnPropertyNames: ae, getOwnPropertySymbols: oe, getPrototypeOf: se } = Object, m = globalThis, h = m.trustedTypes, ce = h ? h.emptyScript : "", le = m.reactiveElementPolyfillSupport, g = (e, t) => e, _ = {
|
|
88
|
+
toAttribute(e, t) {
|
|
89
|
+
switch (t) {
|
|
90
|
+
case Boolean:
|
|
91
|
+
e = e ? ce : null;
|
|
92
|
+
break;
|
|
93
|
+
case Object:
|
|
94
|
+
case Array: e = e == null ? e : JSON.stringify(e);
|
|
95
|
+
}
|
|
96
|
+
return e;
|
|
97
|
+
},
|
|
98
|
+
fromAttribute(e, t) {
|
|
99
|
+
let n = e;
|
|
100
|
+
switch (t) {
|
|
101
|
+
case Boolean:
|
|
102
|
+
n = e !== null;
|
|
103
|
+
break;
|
|
104
|
+
case Number:
|
|
105
|
+
n = e === null ? null : Number(e);
|
|
106
|
+
break;
|
|
107
|
+
case Object:
|
|
108
|
+
case Array: try {
|
|
109
|
+
n = JSON.parse(e);
|
|
110
|
+
} catch {
|
|
111
|
+
n = null;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return n;
|
|
115
|
+
}
|
|
116
|
+
}, v = (e, t) => !ne(e, t), y = {
|
|
117
|
+
attribute: !0,
|
|
118
|
+
type: String,
|
|
119
|
+
converter: _,
|
|
120
|
+
reflect: !1,
|
|
121
|
+
useDefault: !1,
|
|
122
|
+
hasChanged: v
|
|
123
|
+
};
|
|
124
|
+
Symbol.metadata ??= Symbol("metadata"), m.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
125
|
+
var b = class extends HTMLElement {
|
|
126
|
+
static addInitializer(e) {
|
|
127
|
+
this._$Ei(), (this.l ??= []).push(e);
|
|
128
|
+
}
|
|
129
|
+
static get observedAttributes() {
|
|
130
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
131
|
+
}
|
|
132
|
+
static createProperty(e, t = y) {
|
|
133
|
+
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
134
|
+
let n = Symbol(), r = this.getPropertyDescriptor(e, n, t);
|
|
135
|
+
r !== void 0 && re(this.prototype, e, r);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
static getPropertyDescriptor(e, t, n) {
|
|
139
|
+
let { get: r, set: i } = ie(this.prototype, e) ?? {
|
|
140
|
+
get() {
|
|
141
|
+
return this[t];
|
|
142
|
+
},
|
|
143
|
+
set(e) {
|
|
144
|
+
this[t] = e;
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
return {
|
|
148
|
+
get: r,
|
|
149
|
+
set(t) {
|
|
150
|
+
let a = r?.call(this);
|
|
151
|
+
i?.call(this, t), this.requestUpdate(e, a, n);
|
|
152
|
+
},
|
|
153
|
+
configurable: !0,
|
|
154
|
+
enumerable: !0
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
static getPropertyOptions(e) {
|
|
158
|
+
return this.elementProperties.get(e) ?? y;
|
|
159
|
+
}
|
|
160
|
+
static _$Ei() {
|
|
161
|
+
if (this.hasOwnProperty(g("elementProperties"))) return;
|
|
162
|
+
let e = se(this);
|
|
163
|
+
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
164
|
+
}
|
|
165
|
+
static finalize() {
|
|
166
|
+
if (this.hasOwnProperty(g("finalized"))) return;
|
|
167
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(g("properties"))) {
|
|
168
|
+
let e = this.properties, t = [...ae(e), ...oe(e)];
|
|
169
|
+
for (let n of t) this.createProperty(n, e[n]);
|
|
170
|
+
}
|
|
171
|
+
let e = this[Symbol.metadata];
|
|
172
|
+
if (e !== null) {
|
|
173
|
+
let t = litPropertyMetadata.get(e);
|
|
174
|
+
if (t !== void 0) for (let [e, n] of t) this.elementProperties.set(e, n);
|
|
175
|
+
}
|
|
176
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
177
|
+
for (let [e, t] of this.elementProperties) {
|
|
178
|
+
let n = this._$Eu(e, t);
|
|
179
|
+
n !== void 0 && this._$Eh.set(n, e);
|
|
180
|
+
}
|
|
181
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
182
|
+
}
|
|
183
|
+
static finalizeStyles(e) {
|
|
184
|
+
let t = [];
|
|
185
|
+
if (Array.isArray(e)) {
|
|
186
|
+
let n = new Set(e.flat(1 / 0).reverse());
|
|
187
|
+
for (let e of n) t.unshift(p(e));
|
|
188
|
+
} else e !== void 0 && t.push(p(e));
|
|
189
|
+
return t;
|
|
190
|
+
}
|
|
191
|
+
static _$Eu(e, t) {
|
|
192
|
+
let n = t.attribute;
|
|
193
|
+
return !1 === n ? void 0 : typeof n == "string" ? n : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
194
|
+
}
|
|
195
|
+
constructor() {
|
|
196
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
197
|
+
}
|
|
198
|
+
_$Ev() {
|
|
199
|
+
this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((e) => e(this));
|
|
200
|
+
}
|
|
201
|
+
addController(e) {
|
|
202
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
|
|
203
|
+
}
|
|
204
|
+
removeController(e) {
|
|
205
|
+
this._$EO?.delete(e);
|
|
206
|
+
}
|
|
207
|
+
_$E_() {
|
|
208
|
+
let e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
|
|
209
|
+
for (let n of t.keys()) this.hasOwnProperty(n) && (e.set(n, this[n]), delete this[n]);
|
|
210
|
+
e.size > 0 && (this._$Ep = e);
|
|
211
|
+
}
|
|
212
|
+
createRenderRoot() {
|
|
213
|
+
let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
214
|
+
return te(e, this.constructor.elementStyles), e;
|
|
215
|
+
}
|
|
216
|
+
connectedCallback() {
|
|
217
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
|
|
218
|
+
}
|
|
219
|
+
enableUpdating(e) {}
|
|
220
|
+
disconnectedCallback() {
|
|
221
|
+
this._$EO?.forEach((e) => e.hostDisconnected?.());
|
|
222
|
+
}
|
|
223
|
+
attributeChangedCallback(e, t, n) {
|
|
224
|
+
this._$AK(e, n);
|
|
225
|
+
}
|
|
226
|
+
_$ET(e, t) {
|
|
227
|
+
let n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
|
|
228
|
+
if (r !== void 0 && !0 === n.reflect) {
|
|
229
|
+
let i = (n.converter?.toAttribute === void 0 ? _ : n.converter).toAttribute(t, n.type);
|
|
230
|
+
this._$Em = e, i == null ? this.removeAttribute(r) : this.setAttribute(r, i), this._$Em = null;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
_$AK(e, t) {
|
|
234
|
+
let n = this.constructor, r = n._$Eh.get(e);
|
|
235
|
+
if (r !== void 0 && this._$Em !== r) {
|
|
236
|
+
let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ? _ : e.converter;
|
|
237
|
+
this._$Em = r;
|
|
238
|
+
let a = i.fromAttribute(t, e.type);
|
|
239
|
+
this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
requestUpdate(e, t, n, r = !1, i) {
|
|
243
|
+
if (e !== void 0) {
|
|
244
|
+
let a = this.constructor;
|
|
245
|
+
if (!1 === r && (i = this[e]), n ??= a.getPropertyOptions(e), !((n.hasChanged ?? v)(i, t) || n.useDefault && n.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(a._$Eu(e, n)))) return;
|
|
246
|
+
this.C(e, t, n);
|
|
247
|
+
}
|
|
248
|
+
!1 === this.isUpdatePending && (this._$ES = this._$EP());
|
|
249
|
+
}
|
|
250
|
+
C(e, t, { useDefault: n, reflect: r, wrapped: i }, a) {
|
|
251
|
+
n && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, a ?? t ?? this[e]), !0 !== i || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || n || (t = void 0), this._$AL.set(e, t)), !0 === r && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
|
|
252
|
+
}
|
|
253
|
+
async _$EP() {
|
|
254
|
+
this.isUpdatePending = !0;
|
|
255
|
+
try {
|
|
256
|
+
await this._$ES;
|
|
257
|
+
} catch (e) {
|
|
258
|
+
Promise.reject(e);
|
|
259
|
+
}
|
|
260
|
+
let e = this.scheduleUpdate();
|
|
261
|
+
return e != null && await e, !this.isUpdatePending;
|
|
262
|
+
}
|
|
263
|
+
scheduleUpdate() {
|
|
264
|
+
return this.performUpdate();
|
|
265
|
+
}
|
|
266
|
+
performUpdate() {
|
|
267
|
+
if (!this.isUpdatePending) return;
|
|
268
|
+
if (!this.hasUpdated) {
|
|
269
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
270
|
+
for (let [e, t] of this._$Ep) this[e] = t;
|
|
271
|
+
this._$Ep = void 0;
|
|
272
|
+
}
|
|
273
|
+
let e = this.constructor.elementProperties;
|
|
274
|
+
if (e.size > 0) for (let [t, n] of e) {
|
|
275
|
+
let { wrapped: e } = n, r = this[t];
|
|
276
|
+
!0 !== e || this._$AL.has(t) || r === void 0 || this.C(t, void 0, n, r);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
let e = !1, t = this._$AL;
|
|
280
|
+
try {
|
|
281
|
+
e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach((e) => e.hostUpdate?.()), this.update(t)) : this._$EM();
|
|
282
|
+
} catch (t) {
|
|
283
|
+
throw e = !1, this._$EM(), t;
|
|
284
|
+
}
|
|
285
|
+
e && this._$AE(t);
|
|
286
|
+
}
|
|
287
|
+
willUpdate(e) {}
|
|
288
|
+
_$AE(e) {
|
|
289
|
+
this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
290
|
+
}
|
|
291
|
+
_$EM() {
|
|
292
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
293
|
+
}
|
|
294
|
+
get updateComplete() {
|
|
295
|
+
return this.getUpdateComplete();
|
|
296
|
+
}
|
|
297
|
+
getUpdateComplete() {
|
|
298
|
+
return this._$ES;
|
|
299
|
+
}
|
|
300
|
+
shouldUpdate(e) {
|
|
301
|
+
return !0;
|
|
302
|
+
}
|
|
303
|
+
update(e) {
|
|
304
|
+
this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM();
|
|
305
|
+
}
|
|
306
|
+
updated(e) {}
|
|
307
|
+
firstUpdated(e) {}
|
|
308
|
+
};
|
|
309
|
+
b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[g("elementProperties")] = /* @__PURE__ */ new Map(), b[g("finalized")] = /* @__PURE__ */ new Map(), le?.({ ReactiveElement: b }), (m.reactiveElementVersions ??= []).push("2.1.2");
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region node_modules/lit-html/lit-html.js
|
|
312
|
+
var x = globalThis, S = (e) => e, C = x.trustedTypes, w = C ? C.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, T = "$lit$", E = `lit$${Math.random().toFixed(9).slice(2)}$`, D = "?" + E, ue = `<${D}>`, O = document, k = () => O.createComment(""), A = (e) => e === null || typeof e != "object" && typeof e != "function", j = Array.isArray, de = (e) => j(e) || typeof e?.[Symbol.iterator] == "function", M = "[ \n\f\r]", N = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, P = /-->/g, F = />/g, I = RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), L = /'/g, R = /"/g, z = /^(?:script|style|textarea|title)$/i, fe = ((e) => (t, ...n) => ({
|
|
313
|
+
_$litType$: e,
|
|
314
|
+
strings: t,
|
|
315
|
+
values: n
|
|
316
|
+
}))(1), B = Symbol.for("lit-noChange"), V = Symbol.for("lit-nothing"), H = /* @__PURE__ */ new WeakMap(), U = O.createTreeWalker(O, 129);
|
|
317
|
+
function W(e, t) {
|
|
318
|
+
if (!j(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
319
|
+
return w === void 0 ? t : w.createHTML(t);
|
|
320
|
+
}
|
|
321
|
+
var pe = (e, t) => {
|
|
322
|
+
let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = N;
|
|
323
|
+
for (let t = 0; t < n; t++) {
|
|
324
|
+
let n = e[t], s, c, l = -1, u = 0;
|
|
325
|
+
for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === N ? c[1] === "!--" ? o = P : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = I) : (z.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = I) : o = F : o === I ? c[0] === ">" ? (o = i ?? N, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? I : c[3] === "\"" ? R : L) : o === R || o === L ? o = I : o === P || o === F ? o = N : (o = I, i = void 0);
|
|
326
|
+
let d = o === I && e[t + 1].startsWith("/>") ? " " : "";
|
|
327
|
+
a += o === N ? n + ue : l >= 0 ? (r.push(s), n.slice(0, l) + T + n.slice(l) + E + d) : n + E + (l === -2 ? t : d);
|
|
328
|
+
}
|
|
329
|
+
return [W(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
330
|
+
}, G = class e {
|
|
331
|
+
constructor({ strings: t, _$litType$: n }, r) {
|
|
332
|
+
let i;
|
|
333
|
+
this.parts = [];
|
|
334
|
+
let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = pe(t, n);
|
|
335
|
+
if (this.el = e.createElement(l, r), U.currentNode = this.el.content, n === 2 || n === 3) {
|
|
336
|
+
let e = this.el.content.firstChild;
|
|
337
|
+
e.replaceWith(...e.childNodes);
|
|
338
|
+
}
|
|
339
|
+
for (; (i = U.nextNode()) !== null && c.length < s;) {
|
|
340
|
+
if (i.nodeType === 1) {
|
|
341
|
+
if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith(T)) {
|
|
342
|
+
let t = u[o++], n = i.getAttribute(e).split(E), r = /([.?@])?(.*)/.exec(t);
|
|
343
|
+
c.push({
|
|
344
|
+
type: 1,
|
|
345
|
+
index: a,
|
|
346
|
+
name: r[2],
|
|
347
|
+
strings: n,
|
|
348
|
+
ctor: r[1] === "." ? he : r[1] === "?" ? ge : r[1] === "@" ? _e : J
|
|
349
|
+
}), i.removeAttribute(e);
|
|
350
|
+
} else e.startsWith(E) && (c.push({
|
|
351
|
+
type: 6,
|
|
352
|
+
index: a
|
|
353
|
+
}), i.removeAttribute(e));
|
|
354
|
+
if (z.test(i.tagName)) {
|
|
355
|
+
let e = i.textContent.split(E), t = e.length - 1;
|
|
356
|
+
if (t > 0) {
|
|
357
|
+
i.textContent = C ? C.emptyScript : "";
|
|
358
|
+
for (let n = 0; n < t; n++) i.append(e[n], k()), U.nextNode(), c.push({
|
|
359
|
+
type: 2,
|
|
360
|
+
index: ++a
|
|
361
|
+
});
|
|
362
|
+
i.append(e[t], k());
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
} else if (i.nodeType === 8) {
|
|
366
|
+
if (i.data === D) c.push({
|
|
367
|
+
type: 2,
|
|
368
|
+
index: a
|
|
369
|
+
});
|
|
370
|
+
else {
|
|
371
|
+
let e = -1;
|
|
372
|
+
for (; (e = i.data.indexOf(E, e + 1)) !== -1;) c.push({
|
|
373
|
+
type: 7,
|
|
374
|
+
index: a
|
|
375
|
+
}), e += E.length - 1;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
a++;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
static createElement(e, t) {
|
|
382
|
+
let n = O.createElement("template");
|
|
383
|
+
return n.innerHTML = e, n;
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
function K(e, t, n = e, r) {
|
|
387
|
+
if (t === B) return t;
|
|
388
|
+
let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = A(t) ? void 0 : t._$litDirective$;
|
|
389
|
+
return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = K(e, i._$AS(e, t.values), i, r)), t;
|
|
390
|
+
}
|
|
391
|
+
var me = class {
|
|
392
|
+
constructor(e, t) {
|
|
393
|
+
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
394
|
+
}
|
|
395
|
+
get parentNode() {
|
|
396
|
+
return this._$AM.parentNode;
|
|
397
|
+
}
|
|
398
|
+
get _$AU() {
|
|
399
|
+
return this._$AM._$AU;
|
|
400
|
+
}
|
|
401
|
+
u(e) {
|
|
402
|
+
let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? O).importNode(t, !0);
|
|
403
|
+
U.currentNode = r;
|
|
404
|
+
let i = U.nextNode(), a = 0, o = 0, s = n[0];
|
|
405
|
+
for (; s !== void 0;) {
|
|
406
|
+
if (a === s.index) {
|
|
407
|
+
let t;
|
|
408
|
+
s.type === 2 ? t = new q(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new ve(i, this, e)), this._$AV.push(t), s = n[++o];
|
|
409
|
+
}
|
|
410
|
+
a !== s?.index && (i = U.nextNode(), a++);
|
|
411
|
+
}
|
|
412
|
+
return U.currentNode = O, r;
|
|
413
|
+
}
|
|
414
|
+
p(e) {
|
|
415
|
+
let t = 0;
|
|
416
|
+
for (let n of this._$AV) n !== void 0 && (n.strings === void 0 ? n._$AI(e[t]) : (n._$AI(e, n, t), t += n.strings.length - 2)), t++;
|
|
417
|
+
}
|
|
418
|
+
}, q = class e {
|
|
419
|
+
get _$AU() {
|
|
420
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
421
|
+
}
|
|
422
|
+
constructor(e, t, n, r) {
|
|
423
|
+
this.type = 2, this._$AH = V, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
|
|
424
|
+
}
|
|
425
|
+
get parentNode() {
|
|
426
|
+
let e = this._$AA.parentNode, t = this._$AM;
|
|
427
|
+
return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
|
|
428
|
+
}
|
|
429
|
+
get startNode() {
|
|
430
|
+
return this._$AA;
|
|
431
|
+
}
|
|
432
|
+
get endNode() {
|
|
433
|
+
return this._$AB;
|
|
434
|
+
}
|
|
435
|
+
_$AI(e, t = this) {
|
|
436
|
+
e = K(this, e, t), A(e) ? e === V || e == null || e === "" ? (this._$AH !== V && this._$AR(), this._$AH = V) : e !== this._$AH && e !== B && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? de(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
|
|
437
|
+
}
|
|
438
|
+
O(e) {
|
|
439
|
+
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
440
|
+
}
|
|
441
|
+
T(e) {
|
|
442
|
+
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
443
|
+
}
|
|
444
|
+
_(e) {
|
|
445
|
+
this._$AH !== V && A(this._$AH) ? this._$AA.nextSibling.data = e : this.T(O.createTextNode(e)), this._$AH = e;
|
|
446
|
+
}
|
|
447
|
+
$(e) {
|
|
448
|
+
let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = G.createElement(W(n.h, n.h[0]), this.options)), n);
|
|
449
|
+
if (this._$AH?._$AD === r) this._$AH.p(t);
|
|
450
|
+
else {
|
|
451
|
+
let e = new me(r, this), n = e.u(this.options);
|
|
452
|
+
e.p(t), this.T(n), this._$AH = e;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
_$AC(e) {
|
|
456
|
+
let t = H.get(e.strings);
|
|
457
|
+
return t === void 0 && H.set(e.strings, t = new G(e)), t;
|
|
458
|
+
}
|
|
459
|
+
k(t) {
|
|
460
|
+
j(this._$AH) || (this._$AH = [], this._$AR());
|
|
461
|
+
let n = this._$AH, r, i = 0;
|
|
462
|
+
for (let a of t) i === n.length ? n.push(r = new e(this.O(k()), this.O(k()), this, this.options)) : r = n[i], r._$AI(a), i++;
|
|
463
|
+
i < n.length && (this._$AR(r && r._$AB.nextSibling, i), n.length = i);
|
|
464
|
+
}
|
|
465
|
+
_$AR(e = this._$AA.nextSibling, t) {
|
|
466
|
+
for (this._$AP?.(!1, !0, t); e !== this._$AB;) {
|
|
467
|
+
let t = S(e).nextSibling;
|
|
468
|
+
S(e).remove(), e = t;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
setConnected(e) {
|
|
472
|
+
this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
|
|
473
|
+
}
|
|
474
|
+
}, J = class {
|
|
475
|
+
get tagName() {
|
|
476
|
+
return this.element.tagName;
|
|
477
|
+
}
|
|
478
|
+
get _$AU() {
|
|
479
|
+
return this._$AM._$AU;
|
|
480
|
+
}
|
|
481
|
+
constructor(e, t, n, r, i) {
|
|
482
|
+
this.type = 1, this._$AH = V, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = V;
|
|
483
|
+
}
|
|
484
|
+
_$AI(e, t = this, n, r) {
|
|
485
|
+
let i = this.strings, a = !1;
|
|
486
|
+
if (i === void 0) e = K(this, e, t, 0), a = !A(e) || e !== this._$AH && e !== B, a && (this._$AH = e);
|
|
487
|
+
else {
|
|
488
|
+
let r = e, o, s;
|
|
489
|
+
for (e = i[0], o = 0; o < i.length - 1; o++) s = K(this, r[n + o], t, o), s === B && (s = this._$AH[o]), a ||= !A(s) || s !== this._$AH[o], s === V ? e = V : e !== V && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
|
|
490
|
+
}
|
|
491
|
+
a && !r && this.j(e);
|
|
492
|
+
}
|
|
493
|
+
j(e) {
|
|
494
|
+
e === V ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
495
|
+
}
|
|
496
|
+
}, he = class extends J {
|
|
497
|
+
constructor() {
|
|
498
|
+
super(...arguments), this.type = 3;
|
|
499
|
+
}
|
|
500
|
+
j(e) {
|
|
501
|
+
this.element[this.name] = e === V ? void 0 : e;
|
|
502
|
+
}
|
|
503
|
+
}, ge = class extends J {
|
|
504
|
+
constructor() {
|
|
505
|
+
super(...arguments), this.type = 4;
|
|
506
|
+
}
|
|
507
|
+
j(e) {
|
|
508
|
+
this.element.toggleAttribute(this.name, !!e && e !== V);
|
|
509
|
+
}
|
|
510
|
+
}, _e = class extends J {
|
|
511
|
+
constructor(e, t, n, r, i) {
|
|
512
|
+
super(e, t, n, r, i), this.type = 5;
|
|
513
|
+
}
|
|
514
|
+
_$AI(e, t = this) {
|
|
515
|
+
if ((e = K(this, e, t, 0) ?? V) === B) return;
|
|
516
|
+
let n = this._$AH, r = e === V && n !== V || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== V && (n === V || r);
|
|
517
|
+
r && this.element.removeEventListener(this.name, this, n), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
518
|
+
}
|
|
519
|
+
handleEvent(e) {
|
|
520
|
+
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
|
|
521
|
+
}
|
|
522
|
+
}, ve = class {
|
|
523
|
+
constructor(e, t, n) {
|
|
524
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
|
|
525
|
+
}
|
|
526
|
+
get _$AU() {
|
|
527
|
+
return this._$AM._$AU;
|
|
528
|
+
}
|
|
529
|
+
_$AI(e) {
|
|
530
|
+
K(this, e);
|
|
531
|
+
}
|
|
532
|
+
}, ye = x.litHtmlPolyfillSupport;
|
|
533
|
+
ye?.(G, q), (x.litHtmlVersions ??= []).push("3.3.3");
|
|
534
|
+
var be = (e, t, n) => {
|
|
535
|
+
let r = n?.renderBefore ?? t, i = r._$litPart$;
|
|
536
|
+
if (i === void 0) {
|
|
537
|
+
let e = n?.renderBefore ?? null;
|
|
538
|
+
r._$litPart$ = i = new q(t.insertBefore(k(), e), e, void 0, n ?? {});
|
|
539
|
+
}
|
|
540
|
+
return i._$AI(e), i;
|
|
541
|
+
}, Y = globalThis, X = class extends b {
|
|
542
|
+
constructor() {
|
|
543
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
544
|
+
}
|
|
545
|
+
createRenderRoot() {
|
|
546
|
+
let e = super.createRenderRoot();
|
|
547
|
+
return this.renderOptions.renderBefore ??= e.firstChild, e;
|
|
548
|
+
}
|
|
549
|
+
update(e) {
|
|
550
|
+
let t = this.render();
|
|
551
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = be(t, this.renderRoot, this.renderOptions);
|
|
552
|
+
}
|
|
553
|
+
connectedCallback() {
|
|
554
|
+
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
555
|
+
}
|
|
556
|
+
disconnectedCallback() {
|
|
557
|
+
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
558
|
+
}
|
|
559
|
+
render() {
|
|
560
|
+
return B;
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
X._$litElement$ = !0, X.finalized = !0, Y.litElementHydrateSupport?.({ LitElement: X });
|
|
564
|
+
var xe = Y.litElementPolyfillSupport;
|
|
565
|
+
xe?.({ LitElement: X }), (Y.litElementVersions ??= []).push("4.2.2");
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region src/kd/element.ts
|
|
568
|
+
var Z = f`
|
|
569
|
+
:host {
|
|
570
|
+
display: block;
|
|
571
|
+
box-sizing: border-box;
|
|
572
|
+
color: var(--kd-text, inherit);
|
|
573
|
+
font-family: var(--kd-font, inherit);
|
|
574
|
+
line-height: 1.5;
|
|
575
|
+
}
|
|
576
|
+
:host([hidden]) {
|
|
577
|
+
display: none;
|
|
578
|
+
}
|
|
579
|
+
*,
|
|
580
|
+
*::before,
|
|
581
|
+
*::after {
|
|
582
|
+
box-sizing: inherit;
|
|
583
|
+
}
|
|
584
|
+
`, Se = {
|
|
585
|
+
fromAttribute(e) {
|
|
586
|
+
if (e !== null && e !== "") try {
|
|
587
|
+
return JSON.parse(e);
|
|
588
|
+
} catch {
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
toAttribute(e) {
|
|
593
|
+
return JSON.stringify(e);
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
function Q(e) {
|
|
597
|
+
let t = e.parentNode;
|
|
598
|
+
for (; t;) {
|
|
599
|
+
if (t instanceof Element && t.hasAttribute("data-theme")) return t;
|
|
600
|
+
t = t instanceof ShadowRoot ? t.host : t.parentNode;
|
|
601
|
+
}
|
|
602
|
+
return null;
|
|
603
|
+
}
|
|
604
|
+
function $(e) {
|
|
605
|
+
let t = Array.from({ length: e.style.length }, (t, n) => e.style.item(n));
|
|
606
|
+
for (let n of t.filter((e) => e.startsWith("--kd-"))) e.style.removeProperty(n);
|
|
607
|
+
e.removeAttribute("data-theme"), e.removeAttribute(r);
|
|
608
|
+
}
|
|
609
|
+
var Ce = class extends X {
|
|
610
|
+
static styles = Z;
|
|
611
|
+
#e = 0;
|
|
612
|
+
#t;
|
|
613
|
+
connectedCallback() {
|
|
614
|
+
if (super.connectedCallback(), this.getRootNode() instanceof ShadowRoot) return;
|
|
615
|
+
let e = ++this.#e, t = () => e === this.#e && this.isConnected && !Q(this), n = this.ownerDocument.defaultView;
|
|
616
|
+
(n?.requestAnimationFrame?.bind(n) ?? ((e) => setTimeout(e, 0)))(() => {
|
|
617
|
+
t() && o(this).then((n) => {
|
|
618
|
+
t() ? (this.#t = n, this.setAttribute(r, "")) : (n(), e === this.#e && $(this));
|
|
619
|
+
});
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
kdInherit() {
|
|
623
|
+
this.#e++, this.#t?.(), this.#t = void 0, $(this);
|
|
624
|
+
}
|
|
625
|
+
disconnectedCallback() {
|
|
626
|
+
super.disconnectedCallback(), this.#e++, this.#t?.(), this.#t = void 0;
|
|
627
|
+
}
|
|
628
|
+
};
|
|
629
|
+
//#endregion
|
|
630
|
+
export { X as a, fe as c, o as d, Q as i, f as l, Z as n, V as o, Se as r, B as s, Ce as t, n as u };
|
|
631
|
+
|
|
632
|
+
//# sourceMappingURL=element-ChNBLJ5X.js.map
|