@mgdis/stencil-helpers 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ide/index.d.ts +1 -0
- package/dist/index.es.js +210 -210
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +21 -21
- package/dist/index.umd.js.map +1 -1
- package/dist/locale/index.d.ts +4 -2
- package/dist/locale/index.d.ts.map +1 -1
- package/dist/storybook/index.d.ts +2 -1
- package/dist/storybook/index.d.ts.map +1 -1
- package/dist/test/unit.d.ts +2 -1
- package/package.json +10 -10
package/dist/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var ie = Object.defineProperty;
|
|
2
|
-
var ce = (t, e,
|
|
3
|
-
var p = (t, e,
|
|
2
|
+
var ce = (t, e, s) => e in t ? ie(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
|
+
var p = (t, e, s) => (ce(t, typeof e != "symbol" ? e + "" : e, s), s);
|
|
4
4
|
const Re = (t = "", e = 10) => {
|
|
5
|
-
const
|
|
6
|
-
crypto.getRandomValues(
|
|
7
|
-
const
|
|
8
|
-
return t !== "" ? `${t}-${
|
|
5
|
+
const s = new Uint8Array(e);
|
|
6
|
+
crypto.getRandomValues(s);
|
|
7
|
+
const r = Array.from(s).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, e);
|
|
8
|
+
return t !== "" ? `${t}-${r}` : r;
|
|
9
9
|
};
|
|
10
10
|
class Me {
|
|
11
11
|
constructor(e = []) {
|
|
@@ -25,8 +25,8 @@ class Me {
|
|
|
25
25
|
* @param className - class name to delete
|
|
26
26
|
*/
|
|
27
27
|
p(this, "delete", (e) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
28
|
+
const s = this.classes.indexOf(e);
|
|
29
|
+
s > -1 && this.classes.splice(s, 1);
|
|
30
30
|
});
|
|
31
31
|
/**
|
|
32
32
|
* Check if class exist in list
|
|
@@ -43,27 +43,27 @@ class Me {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
const Oe = (t) => Array.isArray(t) && t.every((e) => typeof e == "string"), Fe = (t, e) => e.includes(t == null ? void 0 : t.tagName.toLowerCase()), De = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', _e = (t) => {
|
|
46
|
-
const e = I(t),
|
|
47
|
-
return [t, ...e, ...
|
|
46
|
+
const e = I(t), s = X(t);
|
|
47
|
+
return [t, ...e, ...s];
|
|
48
48
|
}, I = (t, e = []) => {
|
|
49
49
|
if (t.self !== t.top)
|
|
50
50
|
try {
|
|
51
|
-
const
|
|
52
|
-
return
|
|
53
|
-
} catch (
|
|
54
|
-
return console.error("Different hosts between iframes:",
|
|
51
|
+
const s = t.parent;
|
|
52
|
+
return s ? (e.push(s), I(s, e)) : e;
|
|
53
|
+
} catch (s) {
|
|
54
|
+
return console.error("Different hosts between iframes:", s), e;
|
|
55
55
|
}
|
|
56
56
|
return e;
|
|
57
57
|
}, X = (t, e = []) => {
|
|
58
58
|
if (t.frames.length > 0)
|
|
59
|
-
for (const
|
|
60
|
-
e.push(
|
|
59
|
+
for (const s of Array.from(t.frames))
|
|
60
|
+
e.push(s), X(s, e);
|
|
61
61
|
return e;
|
|
62
62
|
}, Be = (t) => typeof t == "string" && t.trim() !== "", Ne = (t) => typeof t == "string" ? t.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : t, Ue = async (t) => t(), K = (t, e) => {
|
|
63
63
|
if (!e)
|
|
64
64
|
return;
|
|
65
|
-
const
|
|
66
|
-
return `${t}${
|
|
65
|
+
const s = e.split("/");
|
|
66
|
+
return `${t}${s.slice(2, s.length - 1).join("-")}--docs`;
|
|
67
67
|
}, ae = (t, e) => {
|
|
68
68
|
if (e)
|
|
69
69
|
return `${t}${e}`;
|
|
@@ -71,44 +71,44 @@ const Oe = (t) => Array.isArray(t) && t.every((e) => typeof e == "string"), Fe =
|
|
|
71
71
|
let e = t.overview ? `${t.overview}
|
|
72
72
|
|
|
73
73
|
` : "";
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
`, e +=
|
|
74
|
+
const s = t.props.filter(({ attr: n }) => n !== void 0);
|
|
75
|
+
s.length && (e += `Attributes:
|
|
76
|
+
`, e += s.map(({ attr: n, docs: l }) => `- \`${n}\`: ${l}
|
|
77
77
|
`).join(""), e += `
|
|
78
78
|
`);
|
|
79
|
-
const
|
|
80
|
-
return
|
|
81
|
-
`, e +=
|
|
79
|
+
const r = t.props.filter(({ attr: n }) => n === void 0);
|
|
80
|
+
return r.length && (e += `Properties:
|
|
81
|
+
`, e += r.map(({ name: n, docs: l }) => `- \`${n}\`: ${l}
|
|
82
82
|
`).join(""), e += `
|
|
83
83
|
`), t.methods.length && (e += `Methods:
|
|
84
|
-
`, e += t.methods.map(({ name:
|
|
84
|
+
`, e += t.methods.map(({ name: n, docs: l }) => `- \`${n}\`: ${l}
|
|
85
85
|
`).join(""), e += `
|
|
86
86
|
`), t.events.length && (e += `Events:
|
|
87
|
-
`, e += t.events.map(({ event:
|
|
87
|
+
`, e += t.events.map(({ event: n, docs: l }) => `- \`${n}\`: ${l}
|
|
88
88
|
`).join(""), e += `
|
|
89
89
|
`), t.listeners.length && (e += `Listeners:
|
|
90
|
-
`, e += t.listeners.map(({ event:
|
|
90
|
+
`, e += t.listeners.map(({ event: n }) => `- \`${n}\`
|
|
91
91
|
`).join(""), e += `
|
|
92
92
|
`), t.slots.length && (e += `Slots:
|
|
93
|
-
`, e += t.slots.map(({ name:
|
|
93
|
+
`, e += t.slots.map(({ name: n, docs: l }) => `- \`${n}\`: ${l}
|
|
94
94
|
`).join(""), e += `
|
|
95
95
|
`), e;
|
|
96
96
|
}, F = (t) => `${t.docs}
|
|
97
97
|
|
|
98
|
-
Type: \`${t.type}\``, Ce = (t, e,
|
|
98
|
+
Type: \`${t.type}\``, Ce = (t, e, s, r) => ({
|
|
99
99
|
$schema: "https://json.schemastore.org/web-types",
|
|
100
100
|
name: t,
|
|
101
101
|
version: e,
|
|
102
102
|
"description-markup": "markdown",
|
|
103
103
|
contributions: {
|
|
104
104
|
html: {
|
|
105
|
-
elements:
|
|
106
|
-
const l = K(
|
|
105
|
+
elements: s.components.map((n) => {
|
|
106
|
+
const l = K(r, n.filePath);
|
|
107
107
|
return {
|
|
108
|
-
name:
|
|
109
|
-
description: Q(
|
|
108
|
+
name: n.tag,
|
|
109
|
+
description: Q(n),
|
|
110
110
|
"doc-url": l,
|
|
111
|
-
attributes:
|
|
111
|
+
attributes: n.props.filter((o) => o.attr).map((o) => ({
|
|
112
112
|
name: o.attr,
|
|
113
113
|
description: F(o),
|
|
114
114
|
"doc-url": l,
|
|
@@ -119,7 +119,7 @@ Type: \`${t.type}\``, Ce = (t, e, n, s) => ({
|
|
|
119
119
|
}
|
|
120
120
|
})),
|
|
121
121
|
js: {
|
|
122
|
-
properties:
|
|
122
|
+
properties: n.props.map((o) => ({
|
|
123
123
|
name: o.name,
|
|
124
124
|
description: F(o),
|
|
125
125
|
"doc-url": l,
|
|
@@ -129,7 +129,7 @@ Type: \`${t.type}\``, Ce = (t, e, n, s) => ({
|
|
|
129
129
|
required: o.required
|
|
130
130
|
}
|
|
131
131
|
})),
|
|
132
|
-
events:
|
|
132
|
+
events: n.events.map((o) => ({
|
|
133
133
|
name: o.event,
|
|
134
134
|
description: o.docs
|
|
135
135
|
}))
|
|
@@ -138,23 +138,23 @@ Type: \`${t.type}\``, Ce = (t, e, n, s) => ({
|
|
|
138
138
|
})
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
}), fe = (t, e,
|
|
142
|
-
if (
|
|
141
|
+
}), fe = (t, e, s) => {
|
|
142
|
+
if (s)
|
|
143
143
|
return [
|
|
144
|
-
{ name: "Storybook", url: K(t,
|
|
145
|
-
{ name: "Sources", url: ae(e,
|
|
144
|
+
{ name: "Storybook", url: K(t, s) },
|
|
145
|
+
{ name: "Sources", url: ae(e, s) }
|
|
146
146
|
];
|
|
147
147
|
}, $e = (t) => {
|
|
148
148
|
if (!t.values.some(({ value: e }) => e === void 0))
|
|
149
149
|
return t.values.map(({ value: e }) => ({ name: e }));
|
|
150
|
-
}, He = (t, e,
|
|
150
|
+
}, He = (t, e, s, r) => ({
|
|
151
151
|
version: t,
|
|
152
|
-
tags: e.components.map((
|
|
153
|
-
const l = fe(
|
|
152
|
+
tags: e.components.map((n) => {
|
|
153
|
+
const l = fe(s, r, n.filePath);
|
|
154
154
|
return {
|
|
155
|
-
name:
|
|
156
|
-
description: Q(
|
|
157
|
-
attributes:
|
|
155
|
+
name: n.tag,
|
|
156
|
+
description: Q(n),
|
|
157
|
+
attributes: n.props.map((o) => ({
|
|
158
158
|
name: o.attr || o.name,
|
|
159
159
|
description: F(o),
|
|
160
160
|
values: $e(o),
|
|
@@ -166,15 +166,15 @@ Type: \`${t.type}\``, Ce = (t, e, n, s) => ({
|
|
|
166
166
|
globalAttributes: [],
|
|
167
167
|
valueSets: []
|
|
168
168
|
}), Pe = (t) => {
|
|
169
|
-
const e = { value: "2023", pattern: "yyyy" },
|
|
170
|
-
return ge([e.value,
|
|
171
|
-
}, We = (t) => t.toISOString().split("T")[0], ue = (t, e,
|
|
172
|
-
const
|
|
169
|
+
const e = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
|
|
170
|
+
return ge([e.value, s.value, r.value].join("-"), t).replace(e.value, e.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
|
|
171
|
+
}, We = (t) => t.toISOString().split("T")[0], ue = (t, e, s) => {
|
|
172
|
+
const r = t.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), l = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || s, o = l.split("-").shift();
|
|
173
173
|
return {
|
|
174
174
|
locale: l,
|
|
175
|
-
messages: e[o] || e[
|
|
175
|
+
messages: e[o] || e[s]
|
|
176
176
|
};
|
|
177
|
-
}, ze = (t, e,
|
|
177
|
+
}, ze = (t, e, s) => new Intl.NumberFormat(e, { style: "currency", currency: s }).format(t), qe = (t, e, s = 0) => new Intl.NumberFormat(e, { minimumFractionDigits: s }).format(s > 0 ? Number(t == null ? void 0 : t.toFixed(s)) : t), de = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, ge = (t, e) => typeof t != "string" || t === "" || !de.test(t) ? "" : new Intl.DateTimeFormat(e).format(new Date(t)), we = (t, e) => (s) => ue(s, t, e), _ = {
|
|
178
178
|
allRenderFn: !1,
|
|
179
179
|
cmpDidLoad: !0,
|
|
180
180
|
cmpDidUnload: !1,
|
|
@@ -264,33 +264,33 @@ Type: \`${t.type}\``, Ce = (t, e, n, s) => ({
|
|
|
264
264
|
experimentalSlotFixes: !1
|
|
265
265
|
};
|
|
266
266
|
let k, D, m, B = !1, R = !1, N = !1, h = !1;
|
|
267
|
-
const H = "http://www.w3.org/1999/xlink", P = {}, pe = "http://www.w3.org/2000/svg", he = "http://www.w3.org/1999/xhtml", ye = (t) => t != null, J = (t) => (t = typeof t, t === "object" || t === "function"), Y = (t, e, ...
|
|
268
|
-
let
|
|
267
|
+
const H = "http://www.w3.org/1999/xlink", P = {}, pe = "http://www.w3.org/2000/svg", he = "http://www.w3.org/1999/xhtml", ye = (t) => t != null, J = (t) => (t = typeof t, t === "object" || t === "function"), Y = (t, e, ...s) => {
|
|
268
|
+
let r = null, n = null, l = null, o = !1, c = !1;
|
|
269
269
|
const i = [], d = (a) => {
|
|
270
270
|
for (let $ = 0; $ < a.length; $++)
|
|
271
|
-
|
|
271
|
+
r = a[$], Array.isArray(r) ? d(r) : r != null && typeof r != "boolean" && ((o = typeof t != "function" && !J(r)) && (r = String(r)), o && c ? i[i.length - 1].$text$ += r : i.push(o ? M(null, r) : r), c = o);
|
|
272
272
|
};
|
|
273
|
-
if (d(
|
|
274
|
-
e.key && (
|
|
273
|
+
if (d(s), e) {
|
|
274
|
+
e.key && (n = e.key), e.name && (l = e.name);
|
|
275
275
|
{
|
|
276
276
|
const a = e.className || e.class;
|
|
277
277
|
a && (e.class = typeof a != "object" ? a : Object.keys(a).filter(($) => a[$]).join(" "));
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
if (typeof t == "function")
|
|
281
|
-
return t(e === null ? {} : e, i,
|
|
281
|
+
return t(e === null ? {} : e, i, be);
|
|
282
282
|
const u = M(t, null);
|
|
283
|
-
return u.$attrs$ = e, i.length > 0 && (u.$children$ = i), u.$key$ =
|
|
283
|
+
return u.$attrs$ = e, i.length > 0 && (u.$children$ = i), u.$key$ = n, u.$name$ = l, u;
|
|
284
284
|
}, M = (t, e) => {
|
|
285
|
-
const
|
|
285
|
+
const s = {
|
|
286
286
|
$flags$: 0,
|
|
287
287
|
$tag$: t,
|
|
288
288
|
$text$: e,
|
|
289
289
|
$elm$: null,
|
|
290
290
|
$children$: null
|
|
291
291
|
};
|
|
292
|
-
return
|
|
293
|
-
}, ve = {},
|
|
292
|
+
return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
|
|
293
|
+
}, ve = {}, Se = (t) => t && t.$tag$ === ve, be = {
|
|
294
294
|
forEach: (t, e) => t.map(W).forEach(e),
|
|
295
295
|
map: (t, e) => t.map(W).map(e).map(ke)
|
|
296
296
|
}, W = (t) => ({
|
|
@@ -302,57 +302,57 @@ const H = "http://www.w3.org/1999/xlink", P = {}, pe = "http://www.w3.org/2000/s
|
|
|
302
302
|
vtext: t.$text$
|
|
303
303
|
}), ke = (t) => {
|
|
304
304
|
if (typeof t.vtag == "function") {
|
|
305
|
-
const
|
|
306
|
-
return t.vkey && (
|
|
305
|
+
const s = Object.assign({}, t.vattrs);
|
|
306
|
+
return t.vkey && (s.key = t.vkey), t.vname && (s.name = t.vname), Y(t.vtag, s, ...t.vchildren || []);
|
|
307
307
|
}
|
|
308
308
|
const e = M(t.vtag, t.vtext);
|
|
309
309
|
return e.$attrs$ = t.vattrs, e.$children$ = t.vchildren, e.$key$ = t.vkey, e.$name$ = t.vname, e;
|
|
310
|
-
}, z = (t, e,
|
|
311
|
-
if (
|
|
310
|
+
}, z = (t, e, s, r, n, l) => {
|
|
311
|
+
if (s !== r) {
|
|
312
312
|
let o = G(t, e), c = e.toLowerCase();
|
|
313
313
|
if (e === "class") {
|
|
314
|
-
const i = t.classList, d = q(
|
|
314
|
+
const i = t.classList, d = q(s), u = q(r);
|
|
315
315
|
i.remove(...d.filter((a) => a && !u.includes(a))), i.add(...u.filter((a) => a && !d.includes(a)));
|
|
316
316
|
} else if (e === "style") {
|
|
317
|
-
for (const i in n)
|
|
318
|
-
(!s || s[i] == null) && (i.includes("-") ? t.style.removeProperty(i) : t.style[i] = "");
|
|
319
317
|
for (const i in s)
|
|
320
|
-
(!
|
|
318
|
+
(!r || r[i] == null) && (i.includes("-") ? t.style.removeProperty(i) : t.style[i] = "");
|
|
319
|
+
for (const i in r)
|
|
320
|
+
(!s || r[i] !== s[i]) && (i.includes("-") ? t.style.setProperty(i, r[i]) : t.style[i] = r[i]);
|
|
321
321
|
} else if (e !== "key")
|
|
322
322
|
if (e === "ref")
|
|
323
|
-
|
|
323
|
+
r && r(t);
|
|
324
324
|
else if (!t.__lookupSetter__(e) && e[0] === "o" && e[1] === "n") {
|
|
325
|
-
if (e[2] === "-" ? e = e.slice(3) : G(C, c) ? e = c.slice(2) : e = c[2] + e.slice(3),
|
|
325
|
+
if (e[2] === "-" ? e = e.slice(3) : G(C, c) ? e = c.slice(2) : e = c[2] + e.slice(3), s || r) {
|
|
326
326
|
const i = e.endsWith(Z);
|
|
327
|
-
e = e.replace(me, ""),
|
|
327
|
+
e = e.replace(me, ""), s && x.rel(t, e, s, i), r && x.ael(t, e, r, i);
|
|
328
328
|
}
|
|
329
329
|
} else {
|
|
330
|
-
const i = J(
|
|
331
|
-
if ((o || i &&
|
|
330
|
+
const i = J(r);
|
|
331
|
+
if ((o || i && r !== null) && !n)
|
|
332
332
|
try {
|
|
333
333
|
if (t.tagName.includes("-"))
|
|
334
|
-
t[e] =
|
|
334
|
+
t[e] = r;
|
|
335
335
|
else {
|
|
336
|
-
const u =
|
|
337
|
-
e === "list" ? o = !1 : (
|
|
336
|
+
const u = r ?? "";
|
|
337
|
+
e === "list" ? o = !1 : (s == null || t[e] != u) && (t[e] = u);
|
|
338
338
|
}
|
|
339
339
|
} catch {
|
|
340
340
|
}
|
|
341
341
|
let d = !1;
|
|
342
|
-
c !== (c = c.replace(/^xlink\:?/, "")) && (e = c, d = !0),
|
|
342
|
+
c !== (c = c.replace(/^xlink\:?/, "")) && (e = c, d = !0), r == null || r === !1 ? (r !== !1 || t.getAttribute(e) === "") && (d ? t.removeAttributeNS(H, e) : t.removeAttribute(e)) : (!o || l & 4 || n) && !i && (r = r === !0 ? "" : r, d ? t.setAttributeNS(H, e, r) : t.setAttribute(e, r));
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
}, Te = /\s/, q = (t) => t ? t.split(Te) : [], Z = "Capture", me = new RegExp(Z + "$"), V = (t, e,
|
|
346
|
-
const
|
|
347
|
-
for (
|
|
348
|
-
|
|
349
|
-
for (
|
|
350
|
-
z(
|
|
351
|
-
}, O = (t, e,
|
|
352
|
-
var
|
|
353
|
-
const l = e.$children$[
|
|
345
|
+
}, Te = /\s/, q = (t) => t ? t.split(Te) : [], Z = "Capture", me = new RegExp(Z + "$"), V = (t, e, s, r) => {
|
|
346
|
+
const n = e.$elm$.nodeType === 11 && e.$elm$.host ? e.$elm$.host : e.$elm$, l = t && t.$attrs$ || P, o = e.$attrs$ || P;
|
|
347
|
+
for (r in l)
|
|
348
|
+
r in o || z(n, r, l[r], void 0, s, e.$flags$);
|
|
349
|
+
for (r in o)
|
|
350
|
+
z(n, r, l[r], o[r], s, e.$flags$);
|
|
351
|
+
}, O = (t, e, s, r) => {
|
|
352
|
+
var n;
|
|
353
|
+
const l = e.$children$[s];
|
|
354
354
|
let o = 0, c, i, d;
|
|
355
|
-
if (B || (N = !0, l.$tag$ === "slot" && (k &&
|
|
355
|
+
if (B || (N = !0, l.$tag$ === "slot" && (k && r.classList.add(k + "-s"), l.$flags$ |= l.$children$ ? (
|
|
356
356
|
// slot element has fallback content
|
|
357
357
|
2
|
|
358
358
|
) : (
|
|
@@ -368,154 +368,154 @@ const H = "http://www.w3.org/1999/xlink", P = {}, pe = "http://www.w3.org/2000/s
|
|
|
368
368
|
i = O(t, l, o, c), i && c.appendChild(i);
|
|
369
369
|
l.$tag$ === "svg" ? h = !1 : c.tagName === "foreignObject" && (h = !0);
|
|
370
370
|
}
|
|
371
|
-
return c["s-hn"] = m, l.$flags$ & 3 && (c["s-sr"] = !0, c["s-cr"] = D, c["s-sn"] = l.$name$ || "", c["s-rf"] = (
|
|
372
|
-
},
|
|
371
|
+
return c["s-hn"] = m, l.$flags$ & 3 && (c["s-sr"] = !0, c["s-cr"] = D, c["s-sn"] = l.$name$ || "", c["s-rf"] = (n = l.$attrs$) === null || n === void 0 ? void 0 : n.ref, d = t && t.$children$ && t.$children$[s], d && d.$tag$ === l.$tag$ && t.$elm$ && A(t.$elm$, !1)), c;
|
|
372
|
+
}, A = (t, e) => {
|
|
373
373
|
x.$flags$ |= 1;
|
|
374
|
-
const
|
|
374
|
+
const s = Array.from(t.childNodes);
|
|
375
375
|
if (t["s-sr"] && _.experimentalSlotFixes) {
|
|
376
|
-
let
|
|
377
|
-
for (;
|
|
378
|
-
|
|
376
|
+
let r = t;
|
|
377
|
+
for (; r = r.nextSibling; )
|
|
378
|
+
r && r["s-sn"] === t["s-sn"] && r["s-sh"] === m && s.push(r);
|
|
379
379
|
}
|
|
380
|
-
for (let
|
|
381
|
-
const
|
|
382
|
-
|
|
380
|
+
for (let r = s.length - 1; r >= 0; r--) {
|
|
381
|
+
const n = s[r];
|
|
382
|
+
n["s-hn"] !== m && n["s-ol"] && (se(n).insertBefore(n, U(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, N = !0), e && A(n, e);
|
|
383
383
|
}
|
|
384
384
|
x.$flags$ &= -2;
|
|
385
|
-
}, ee = (t, e,
|
|
385
|
+
}, ee = (t, e, s, r, n, l) => {
|
|
386
386
|
let o = t["s-cr"] && t["s-cr"].parentNode || t, c;
|
|
387
|
-
for (o.shadowRoot && o.tagName === m && (o = o.shadowRoot);
|
|
388
|
-
|
|
389
|
-
}, te = (t, e,
|
|
390
|
-
for (let
|
|
391
|
-
const
|
|
392
|
-
if (
|
|
393
|
-
const l =
|
|
394
|
-
le(
|
|
387
|
+
for (o.shadowRoot && o.tagName === m && (o = o.shadowRoot); n <= l; ++n)
|
|
388
|
+
r[n] && (c = O(null, s, n, t), c && (r[n].$elm$ = c, o.insertBefore(c, U(e))));
|
|
389
|
+
}, te = (t, e, s) => {
|
|
390
|
+
for (let r = e; r <= s; ++r) {
|
|
391
|
+
const n = t[r];
|
|
392
|
+
if (n) {
|
|
393
|
+
const l = n.$elm$;
|
|
394
|
+
le(n), l && (R = !0, l["s-ol"] ? l["s-ol"].remove() : A(l, !0), l.remove());
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
}, xe = (t, e,
|
|
398
|
-
let l = 0, o = 0, c = 0, i = 0, d = e.length - 1, u = e[0], a = e[d], $ =
|
|
397
|
+
}, xe = (t, e, s, r, n = !1) => {
|
|
398
|
+
let l = 0, o = 0, c = 0, i = 0, d = e.length - 1, u = e[0], a = e[d], $ = r.length - 1, f = r[0], g = r[$], v, y;
|
|
399
399
|
for (; l <= d && o <= $; )
|
|
400
400
|
if (u == null)
|
|
401
401
|
u = e[++l];
|
|
402
402
|
else if (a == null)
|
|
403
403
|
a = e[--d];
|
|
404
404
|
else if (f == null)
|
|
405
|
-
f =
|
|
405
|
+
f = r[++o];
|
|
406
406
|
else if (g == null)
|
|
407
|
-
g =
|
|
408
|
-
else if (E(u, f,
|
|
409
|
-
T(u, f,
|
|
410
|
-
else if (E(a, g,
|
|
411
|
-
T(a, g,
|
|
412
|
-
else if (E(u, g,
|
|
413
|
-
(u.$tag$ === "slot" || g.$tag$ === "slot") &&
|
|
414
|
-
else if (E(a, f,
|
|
415
|
-
(u.$tag$ === "slot" || g.$tag$ === "slot") &&
|
|
407
|
+
g = r[--$];
|
|
408
|
+
else if (E(u, f, n))
|
|
409
|
+
T(u, f, n), u = e[++l], f = r[++o];
|
|
410
|
+
else if (E(a, g, n))
|
|
411
|
+
T(a, g, n), a = e[--d], g = r[--$];
|
|
412
|
+
else if (E(u, g, n))
|
|
413
|
+
(u.$tag$ === "slot" || g.$tag$ === "slot") && A(u.$elm$.parentNode, !1), T(u, g, n), t.insertBefore(u.$elm$, a.$elm$.nextSibling), u = e[++l], g = r[--$];
|
|
414
|
+
else if (E(a, f, n))
|
|
415
|
+
(u.$tag$ === "slot" || g.$tag$ === "slot") && A(a.$elm$.parentNode, !1), T(a, f, n), t.insertBefore(a.$elm$, u.$elm$), a = e[--d], f = r[++o];
|
|
416
416
|
else {
|
|
417
417
|
for (c = -1, i = l; i <= d; ++i)
|
|
418
418
|
if (e[i] && e[i].$key$ !== null && e[i].$key$ === f.$key$) {
|
|
419
419
|
c = i;
|
|
420
420
|
break;
|
|
421
421
|
}
|
|
422
|
-
c >= 0 ? (y = e[c], y.$tag$ !== f.$tag$ ? v = O(e && e[o],
|
|
422
|
+
c >= 0 ? (y = e[c], y.$tag$ !== f.$tag$ ? v = O(e && e[o], s, c, t) : (T(y, f, n), e[c] = void 0, v = y.$elm$), f = r[++o]) : (v = O(e && e[o], s, o, t), f = r[++o]), v && se(u.$elm$).insertBefore(v, U(u.$elm$));
|
|
423
423
|
}
|
|
424
|
-
l > d ? ee(t,
|
|
425
|
-
}, E = (t, e,
|
|
426
|
-
const
|
|
424
|
+
l > d ? ee(t, r[$ + 1] == null ? null : r[$ + 1].$elm$, s, r, o, $) : o > $ && te(e, l, d);
|
|
425
|
+
}, E = (t, e, s = !1) => t.$tag$ === e.$tag$ ? t.$tag$ === "slot" ? t.$name$ === e.$name$ : s ? !0 : t.$key$ === e.$key$ : !1, U = (t) => t && t["s-ol"] || t, se = (t) => (t["s-ol"] ? t["s-ol"] : t).parentNode, T = (t, e, s = !1) => {
|
|
426
|
+
const r = e.$elm$ = t.$elm$, n = t.$children$, l = e.$children$, o = e.$tag$, c = e.$text$;
|
|
427
427
|
let i;
|
|
428
|
-
c === null ? (h = o === "svg" ? !0 : o === "foreignObject" ? !1 : h, o === "slot" && !B || V(t, e, h),
|
|
429
|
-
},
|
|
428
|
+
c === null ? (h = o === "svg" ? !0 : o === "foreignObject" ? !1 : h, o === "slot" && !B || V(t, e, h), n !== null && l !== null ? xe(r, n, e, l, s) : l !== null ? (t.$text$ !== null && (r.textContent = ""), ee(r, null, e, l, 0, l.length - 1)) : n !== null && te(n, 0, n.length - 1), h && o === "svg" && (h = !1)) : (i = r["s-cr"]) ? i.parentNode.textContent = c : t.$text$ !== c && (r.data = c);
|
|
429
|
+
}, re = (t) => {
|
|
430
430
|
const e = t.childNodes;
|
|
431
|
-
for (const
|
|
432
|
-
if (
|
|
433
|
-
if (
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
-
for (const
|
|
437
|
-
if (
|
|
438
|
-
if (
|
|
439
|
-
if (
|
|
440
|
-
|
|
431
|
+
for (const s of e)
|
|
432
|
+
if (s.nodeType === 1) {
|
|
433
|
+
if (s["s-sr"]) {
|
|
434
|
+
const r = s["s-sn"];
|
|
435
|
+
s.hidden = !1;
|
|
436
|
+
for (const n of e)
|
|
437
|
+
if (n !== s) {
|
|
438
|
+
if (n["s-hn"] !== s["s-hn"] || r !== "") {
|
|
439
|
+
if (n.nodeType === 1 && (r === n.getAttribute("slot") || r === n["s-sn"])) {
|
|
440
|
+
s.hidden = !0;
|
|
441
441
|
break;
|
|
442
442
|
}
|
|
443
|
-
} else if (
|
|
444
|
-
|
|
443
|
+
} else if (n.nodeType === 1 || n.nodeType === 3 && n.textContent.trim() !== "") {
|
|
444
|
+
s.hidden = !0;
|
|
445
445
|
break;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
|
|
449
|
+
re(s);
|
|
450
450
|
}
|
|
451
|
-
},
|
|
452
|
-
let e,
|
|
453
|
-
for (const
|
|
454
|
-
if (
|
|
455
|
-
|
|
456
|
-
const l =
|
|
457
|
-
for (
|
|
458
|
-
if (e =
|
|
451
|
+
}, S = [], ne = (t) => {
|
|
452
|
+
let e, s, r;
|
|
453
|
+
for (const n of t.childNodes) {
|
|
454
|
+
if (n["s-sr"] && (e = n["s-cr"]) && e.parentNode) {
|
|
455
|
+
s = e.parentNode.childNodes;
|
|
456
|
+
const l = n["s-sn"];
|
|
457
|
+
for (r = s.length - 1; r >= 0; r--)
|
|
458
|
+
if (e = s[r], !e["s-cn"] && !e["s-nr"] && e["s-hn"] !== n["s-hn"] && !_.experimentalSlotFixes)
|
|
459
459
|
if (w(e, l)) {
|
|
460
|
-
let o =
|
|
461
|
-
R = !0, e["s-sn"] = e["s-sn"] || l, o ? (o.$nodeToRelocate$["s-sh"] =
|
|
462
|
-
$slotRefNode$:
|
|
460
|
+
let o = S.find((c) => c.$nodeToRelocate$ === e);
|
|
461
|
+
R = !0, e["s-sn"] = e["s-sn"] || l, o ? (o.$nodeToRelocate$["s-sh"] = n["s-hn"], o.$slotRefNode$ = n) : (e["s-sh"] = n["s-hn"], S.push({
|
|
462
|
+
$slotRefNode$: n,
|
|
463
463
|
$nodeToRelocate$: e
|
|
464
|
-
})), e["s-sr"] &&
|
|
465
|
-
w(c.$nodeToRelocate$, e["s-sn"]) && (o =
|
|
464
|
+
})), e["s-sr"] && S.map((c) => {
|
|
465
|
+
w(c.$nodeToRelocate$, e["s-sn"]) && (o = S.find((i) => i.$nodeToRelocate$ === e), o && !c.$slotRefNode$ && (c.$slotRefNode$ = o.$slotRefNode$));
|
|
466
466
|
});
|
|
467
467
|
} else
|
|
468
|
-
|
|
468
|
+
S.some((o) => o.$nodeToRelocate$ === e) || S.push({
|
|
469
469
|
$nodeToRelocate$: e
|
|
470
470
|
});
|
|
471
471
|
}
|
|
472
|
-
|
|
472
|
+
n.nodeType === 1 && ne(n);
|
|
473
473
|
}
|
|
474
474
|
}, w = (t, e) => t.nodeType === 1 ? t.getAttribute("slot") === null && e === "" || t.getAttribute("slot") === e : t["s-sn"] === e ? !0 : e === "", le = (t) => {
|
|
475
475
|
t.$attrs$ && t.$attrs$.ref && t.$attrs$.ref(null), t.$children$ && t.$children$.map(le);
|
|
476
|
-
},
|
|
477
|
-
var
|
|
478
|
-
const i = t.$hostElement$, d = t.$cmpMeta$, u = t.$vnode$ || M(null, null), a =
|
|
479
|
-
if (m = i.tagName, d.$attrsToReflect$ && (a.$attrs$ = a.$attrs$ || {}, d.$attrsToReflect$.map(([$, f]) => a.$attrs$[f] = i[$])),
|
|
476
|
+
}, Ae = (t, e, s = !1) => {
|
|
477
|
+
var r, n, l, o, c;
|
|
478
|
+
const i = t.$hostElement$, d = t.$cmpMeta$, u = t.$vnode$ || M(null, null), a = Se(e) ? e : Y(null, null, e);
|
|
479
|
+
if (m = i.tagName, d.$attrsToReflect$ && (a.$attrs$ = a.$attrs$ || {}, d.$attrsToReflect$.map(([$, f]) => a.$attrs$[f] = i[$])), s && a.$attrs$)
|
|
480
480
|
for (const $ of Object.keys(a.$attrs$))
|
|
481
481
|
i.hasAttribute($) && !["key", "ref", "style", "class"].includes($) && (a.$attrs$[$] = i[$]);
|
|
482
|
-
a.$tag$ = null, a.$flags$ |= 4, t.$vnode$ = a, a.$elm$ = u.$elm$ = i.shadowRoot || i, k = i["s-sc"], B = (d.$flags$ & 1) !== 0, D = i["s-cr"], R = !1, T(u, a,
|
|
482
|
+
a.$tag$ = null, a.$flags$ |= 4, t.$vnode$ = a, a.$elm$ = u.$elm$ = i.shadowRoot || i, k = i["s-sc"], B = (d.$flags$ & 1) !== 0, D = i["s-cr"], R = !1, T(u, a, s);
|
|
483
483
|
{
|
|
484
484
|
if (x.$flags$ |= 1, N) {
|
|
485
|
-
|
|
486
|
-
for (const $ of
|
|
485
|
+
ne(a.$elm$);
|
|
486
|
+
for (const $ of S) {
|
|
487
487
|
const f = $.$nodeToRelocate$;
|
|
488
488
|
if (!f["s-ol"]) {
|
|
489
489
|
const g = j.createTextNode("");
|
|
490
490
|
g["s-nr"] = f, f.parentNode.insertBefore(f["s-ol"] = g, f);
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
for (const $ of
|
|
493
|
+
for (const $ of S) {
|
|
494
494
|
const f = $.$nodeToRelocate$, g = $.$slotRefNode$;
|
|
495
495
|
if (g) {
|
|
496
496
|
const v = g.parentNode;
|
|
497
497
|
let y = g.nextSibling;
|
|
498
498
|
{
|
|
499
|
-
let
|
|
500
|
-
for (;
|
|
501
|
-
let
|
|
502
|
-
if (
|
|
503
|
-
y =
|
|
499
|
+
let L = (r = f["s-ol"]) === null || r === void 0 ? void 0 : r.previousSibling;
|
|
500
|
+
for (; L; ) {
|
|
501
|
+
let b = (n = L["s-nr"]) !== null && n !== void 0 ? n : null;
|
|
502
|
+
if (b && b["s-sn"] === f["s-sn"] && v === b.parentNode && (b = b.nextSibling, !b || !b["s-nr"])) {
|
|
503
|
+
y = b;
|
|
504
504
|
break;
|
|
505
505
|
}
|
|
506
|
-
|
|
506
|
+
L = L.previousSibling;
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
509
|
(!y && v !== f.parentNode || f.nextSibling !== y) && f !== y && (!f["s-hn"] && f["s-ol"] && (f["s-hn"] = f["s-ol"].parentNode.nodeName), v.insertBefore(f, y), f.nodeType === 1 && (f.hidden = (l = f["s-ih"]) !== null && l !== void 0 ? l : !1)), f && typeof g["s-rf"] == "function" && g["s-rf"](f);
|
|
510
510
|
} else
|
|
511
|
-
f.nodeType === 1 && (
|
|
511
|
+
f.nodeType === 1 && (s && (f["s-ih"] = (o = f.hidden) !== null && o !== void 0 ? o : !1), f.hidden = !0);
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
R &&
|
|
514
|
+
R && re(a.$elm$), x.$flags$ &= -2, S.length = 0;
|
|
515
515
|
}
|
|
516
516
|
if (_.experimentalScopedSlotChanges && d.$flags$ & 2)
|
|
517
517
|
for (const $ of a.$elm$.childNodes)
|
|
518
|
-
$["s-hn"] !== m && !$["s-sh"] && (
|
|
518
|
+
$["s-hn"] !== m && !$["s-sh"] && (s && $["s-ih"] == null && ($["s-ih"] = (c = $.hidden) !== null && c !== void 0 ? c : !1), $.hidden = !0);
|
|
519
519
|
D = void 0;
|
|
520
520
|
}, G = (t, e) => e in t, C = typeof window < "u" ? window : {}, j = C.document || { head: {} };
|
|
521
521
|
C.HTMLElement;
|
|
@@ -524,53 +524,53 @@ const x = {
|
|
|
524
524
|
$resourcesUrl$: "",
|
|
525
525
|
jmp: (t) => t(),
|
|
526
526
|
raf: (t) => requestAnimationFrame(t),
|
|
527
|
-
ael: (t, e,
|
|
528
|
-
rel: (t, e,
|
|
527
|
+
ael: (t, e, s, r) => t.addEventListener(e, s, r),
|
|
528
|
+
rel: (t, e, s, r) => t.removeEventListener(e, s, r),
|
|
529
529
|
ce: (t, e) => new CustomEvent(t, e)
|
|
530
|
-
},
|
|
531
|
-
[null, void 0, "", !1].includes(
|
|
532
|
-
}, oe = (t, e,
|
|
530
|
+
}, Le = (t, e, s) => {
|
|
531
|
+
[null, void 0, "", !1].includes(s) || ["innerHTML", "style"].includes(e) || t.setAttribute(e, ["object", "function"].includes(typeof s) ? "/!\\ Object props are not rendered in the code example" : s);
|
|
532
|
+
}, oe = (t, e, s, r, n) => {
|
|
533
533
|
if (e && typeof e == "string") {
|
|
534
534
|
const l = document.createElement(e);
|
|
535
|
-
Object.keys(
|
|
536
|
-
|
|
537
|
-
}),
|
|
535
|
+
Object.keys(s || {}).forEach((o) => {
|
|
536
|
+
Le(l, o, s[o]);
|
|
537
|
+
}), r == null || r.forEach((o) => {
|
|
538
538
|
oe(l, o.$tag$, o.$attrs$, o.$children$, o.$text$);
|
|
539
|
-
}),
|
|
539
|
+
}), s != null && s.innerHTML && (l.innerHTML = s.innerHTML), t.appendChild(l);
|
|
540
540
|
}
|
|
541
|
-
|
|
541
|
+
n && (t.innerHTML = n);
|
|
542
542
|
}, Ge = (t, e) => {
|
|
543
|
-
const
|
|
543
|
+
const s = {};
|
|
544
544
|
if (typeof t != "object")
|
|
545
545
|
throw new Error("filterArgs - args isn't an object.");
|
|
546
|
-
for (const
|
|
547
|
-
if (!
|
|
548
|
-
const
|
|
549
|
-
(!e || !Object.keys(e).includes(
|
|
546
|
+
for (const r in t)
|
|
547
|
+
if (!r.startsWith("slot")) {
|
|
548
|
+
const n = t[r], l = r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
549
|
+
(!e || !Object.keys(e).includes(r) || e[r] !== n) && (s[l] = n);
|
|
550
550
|
}
|
|
551
|
-
return
|
|
551
|
+
return s;
|
|
552
552
|
}, Ie = (t, e) => {
|
|
553
|
-
var
|
|
554
|
-
const
|
|
555
|
-
if (
|
|
556
|
-
return (
|
|
553
|
+
var r, n;
|
|
554
|
+
const s = document.getElementById("storybook-root");
|
|
555
|
+
if (s)
|
|
556
|
+
return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((r = e.globals) == null ? void 0 : r.locale) || "en"), Ae(
|
|
557
557
|
{
|
|
558
558
|
$ancestorComponent$: void 0,
|
|
559
559
|
$flags$: 0,
|
|
560
560
|
$modeName$: void 0,
|
|
561
561
|
$cmpMeta$: {
|
|
562
562
|
$flags$: 0,
|
|
563
|
-
$tagName$:
|
|
563
|
+
$tagName$: s.tagName
|
|
564
564
|
},
|
|
565
|
-
$hostElement$:
|
|
565
|
+
$hostElement$: s
|
|
566
566
|
},
|
|
567
567
|
t(e)
|
|
568
|
-
),
|
|
569
|
-
}, Xe = ({ $tag$: t, $attrs$: e, $children$:
|
|
570
|
-
const
|
|
571
|
-
return oe(
|
|
572
|
-
}, Ke = ({ disconnect: t, observe: e, takeRecords:
|
|
573
|
-
class
|
|
568
|
+
), s.children[s.children.length - 1];
|
|
569
|
+
}, Xe = ({ $tag$: t, $attrs$: e, $children$: s, $text$: r }) => {
|
|
570
|
+
const n = document.createElement("div");
|
|
571
|
+
return oe(n, t, e, s, r), n.innerHTML;
|
|
572
|
+
}, Ke = ({ disconnect: t, observe: e, takeRecords: s }) => {
|
|
573
|
+
class r {
|
|
574
574
|
constructor(l) {
|
|
575
575
|
/**
|
|
576
576
|
*
|
|
@@ -583,7 +583,7 @@ const x = {
|
|
|
583
583
|
/**
|
|
584
584
|
*
|
|
585
585
|
*/
|
|
586
|
-
p(this, "takeRecords",
|
|
586
|
+
p(this, "takeRecords", s);
|
|
587
587
|
/**
|
|
588
588
|
*
|
|
589
589
|
*/
|
|
@@ -591,16 +591,16 @@ const x = {
|
|
|
591
591
|
this.cb = l;
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
|
-
return [window, global].forEach((
|
|
595
|
-
Object.defineProperty(
|
|
594
|
+
return [window, global].forEach((n) => {
|
|
595
|
+
Object.defineProperty(n, "MutationObserver", {
|
|
596
596
|
writable: !0,
|
|
597
597
|
configurable: !0,
|
|
598
|
-
value:
|
|
598
|
+
value: r
|
|
599
599
|
});
|
|
600
|
-
}),
|
|
600
|
+
}), r;
|
|
601
601
|
}, Qe = ({ disconnect: t, observe: e }) => {
|
|
602
|
-
class
|
|
603
|
-
constructor(
|
|
602
|
+
class s {
|
|
603
|
+
constructor(n) {
|
|
604
604
|
/**
|
|
605
605
|
*
|
|
606
606
|
*/
|
|
@@ -617,16 +617,16 @@ const x = {
|
|
|
617
617
|
*
|
|
618
618
|
*/
|
|
619
619
|
p(this, "cb");
|
|
620
|
-
this.cb =
|
|
620
|
+
this.cb = n;
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
return [window, global].forEach((
|
|
624
|
-
Object.defineProperty(
|
|
623
|
+
return [window, global].forEach((r) => {
|
|
624
|
+
Object.defineProperty(r, "ResizeObserver", {
|
|
625
625
|
writable: !0,
|
|
626
626
|
configurable: !0,
|
|
627
|
-
value:
|
|
627
|
+
value: s
|
|
628
628
|
});
|
|
629
|
-
}),
|
|
629
|
+
}), s;
|
|
630
630
|
};
|
|
631
631
|
class Ee extends Event {
|
|
632
632
|
constructor() {
|