@mgdis/stencil-helpers 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +216 -210
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/package.json +10 -10
package/dist/index.es.js
CHANGED
|
@@ -4,8 +4,8 @@ var p = (t, e, n) => (ce(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
|
4
4
|
const Re = (t = "", e = 10) => {
|
|
5
5
|
const n = new Uint8Array(e);
|
|
6
6
|
crypto.getRandomValues(n);
|
|
7
|
-
const
|
|
8
|
-
return t !== "" ? `${t}-${
|
|
7
|
+
const s = Array.from(n).map((r) => r.toString(16).padStart(2, "0")).join("").slice(0, e);
|
|
8
|
+
return t !== "" ? `${t}-${s}` : s;
|
|
9
9
|
};
|
|
10
10
|
class Me {
|
|
11
11
|
constructor(e = []) {
|
|
@@ -43,23 +43,23 @@ 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 =
|
|
46
|
+
const e = I(t), n = X(t);
|
|
47
47
|
return [t, ...e, ...n];
|
|
48
|
-
},
|
|
48
|
+
}, I = (t, e = []) => {
|
|
49
49
|
if (t.self !== t.top)
|
|
50
50
|
try {
|
|
51
51
|
const n = t.parent;
|
|
52
|
-
return n ? (e.push(n),
|
|
52
|
+
return n ? (e.push(n), I(n, e)) : e;
|
|
53
53
|
} catch (n) {
|
|
54
54
|
return console.error("Different hosts between iframes:", n), e;
|
|
55
55
|
}
|
|
56
56
|
return e;
|
|
57
|
-
},
|
|
57
|
+
}, X = (t, e = []) => {
|
|
58
58
|
if (t.frames.length > 0)
|
|
59
59
|
for (const n of Array.from(t.frames))
|
|
60
|
-
e.push(n),
|
|
60
|
+
e.push(n), X(n, e);
|
|
61
61
|
return e;
|
|
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(),
|
|
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
65
|
const n = e.split("/");
|
|
@@ -67,71 +67,71 @@ const Oe = (t) => Array.isArray(t) && t.every((e) => typeof e == "string"), Fe =
|
|
|
67
67
|
}, ae = (t, e) => {
|
|
68
68
|
if (e)
|
|
69
69
|
return `${t}${e}`;
|
|
70
|
-
},
|
|
70
|
+
}, Q = (t) => {
|
|
71
71
|
let e = t.overview ? `${t.overview}
|
|
72
72
|
|
|
73
73
|
` : "";
|
|
74
|
-
const n = t.props.filter(({ attr:
|
|
74
|
+
const n = t.props.filter(({ attr: r }) => r !== void 0);
|
|
75
75
|
n.length && (e += `Attributes:
|
|
76
|
-
`, e += n.map(({ attr:
|
|
76
|
+
`, e += n.map(({ attr: r, docs: l }) => `- \`${r}\`: ${l}
|
|
77
77
|
`).join(""), e += `
|
|
78
78
|
`);
|
|
79
|
-
const
|
|
80
|
-
return
|
|
81
|
-
`, e +=
|
|
79
|
+
const s = t.props.filter(({ attr: r }) => r === void 0);
|
|
80
|
+
return s.length && (e += `Properties:
|
|
81
|
+
`, e += s.map(({ name: r, docs: l }) => `- \`${r}\`: ${l}
|
|
82
82
|
`).join(""), e += `
|
|
83
83
|
`), t.methods.length && (e += `Methods:
|
|
84
|
-
`, e += t.methods.map(({ name:
|
|
84
|
+
`, e += t.methods.map(({ name: r, docs: l }) => `- \`${r}\`: ${l}
|
|
85
85
|
`).join(""), e += `
|
|
86
86
|
`), t.events.length && (e += `Events:
|
|
87
|
-
`, e += t.events.map(({ event:
|
|
87
|
+
`, e += t.events.map(({ event: r, docs: l }) => `- \`${r}\`: ${l}
|
|
88
88
|
`).join(""), e += `
|
|
89
89
|
`), t.listeners.length && (e += `Listeners:
|
|
90
|
-
`, e += t.listeners.map(({ event:
|
|
90
|
+
`, e += t.listeners.map(({ event: r }) => `- \`${r}\`
|
|
91
91
|
`).join(""), e += `
|
|
92
92
|
`), t.slots.length && (e += `Slots:
|
|
93
|
-
`, e += t.slots.map(({ name:
|
|
93
|
+
`, e += t.slots.map(({ name: r, docs: l }) => `- \`${r}\`: ${l}
|
|
94
94
|
`).join(""), e += `
|
|
95
95
|
`), e;
|
|
96
96
|
}, F = (t) => `${t.docs}
|
|
97
97
|
|
|
98
|
-
Type: \`${t.type}\``, Ce = (t, e, n,
|
|
98
|
+
Type: \`${t.type}\``, Ce = (t, e, n, s) => ({
|
|
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: n.components.map((
|
|
106
|
-
const
|
|
105
|
+
elements: n.components.map((r) => {
|
|
106
|
+
const l = K(s, r.filePath);
|
|
107
107
|
return {
|
|
108
|
-
name:
|
|
109
|
-
description:
|
|
110
|
-
"doc-url":
|
|
111
|
-
attributes:
|
|
112
|
-
name:
|
|
113
|
-
description: F(
|
|
114
|
-
"doc-url":
|
|
108
|
+
name: r.tag,
|
|
109
|
+
description: Q(r),
|
|
110
|
+
"doc-url": l,
|
|
111
|
+
attributes: r.props.filter((o) => o.attr).map((o) => ({
|
|
112
|
+
name: o.attr,
|
|
113
|
+
description: F(o),
|
|
114
|
+
"doc-url": l,
|
|
115
115
|
value: {
|
|
116
|
-
type:
|
|
117
|
-
default:
|
|
118
|
-
required:
|
|
116
|
+
type: o.type,
|
|
117
|
+
default: o.default,
|
|
118
|
+
required: o.required
|
|
119
119
|
}
|
|
120
120
|
})),
|
|
121
121
|
js: {
|
|
122
|
-
properties:
|
|
123
|
-
name:
|
|
124
|
-
description: F(
|
|
125
|
-
"doc-url":
|
|
122
|
+
properties: r.props.map((o) => ({
|
|
123
|
+
name: o.name,
|
|
124
|
+
description: F(o),
|
|
125
|
+
"doc-url": l,
|
|
126
126
|
value: {
|
|
127
|
-
type:
|
|
128
|
-
default:
|
|
129
|
-
required:
|
|
127
|
+
type: o.type,
|
|
128
|
+
default: o.default,
|
|
129
|
+
required: o.required
|
|
130
130
|
}
|
|
131
131
|
})),
|
|
132
|
-
events:
|
|
133
|
-
name:
|
|
134
|
-
description:
|
|
132
|
+
events: r.events.map((o) => ({
|
|
133
|
+
name: o.event,
|
|
134
|
+
description: o.docs
|
|
135
135
|
}))
|
|
136
136
|
}
|
|
137
137
|
};
|
|
@@ -141,40 +141,40 @@ Type: \`${t.type}\``, Ce = (t, e, n, r) => ({
|
|
|
141
141
|
}), fe = (t, e, n) => {
|
|
142
142
|
if (n)
|
|
143
143
|
return [
|
|
144
|
-
{ name: "Storybook", url:
|
|
144
|
+
{ name: "Storybook", url: K(t, n) },
|
|
145
145
|
{ name: "Sources", url: ae(e, n) }
|
|
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, n,
|
|
150
|
+
}, He = (t, e, n, s) => ({
|
|
151
151
|
version: t,
|
|
152
|
-
tags: e.components.map((
|
|
153
|
-
const
|
|
152
|
+
tags: e.components.map((r) => {
|
|
153
|
+
const l = fe(n, s, r.filePath);
|
|
154
154
|
return {
|
|
155
|
-
name:
|
|
156
|
-
description:
|
|
157
|
-
attributes:
|
|
158
|
-
name:
|
|
159
|
-
description: F(
|
|
160
|
-
values: $e(
|
|
161
|
-
references:
|
|
155
|
+
name: r.tag,
|
|
156
|
+
description: Q(r),
|
|
157
|
+
attributes: r.props.map((o) => ({
|
|
158
|
+
name: o.attr || o.name,
|
|
159
|
+
description: F(o),
|
|
160
|
+
values: $e(o),
|
|
161
|
+
references: l
|
|
162
162
|
})),
|
|
163
|
-
references:
|
|
163
|
+
references: l
|
|
164
164
|
};
|
|
165
165
|
}),
|
|
166
166
|
globalAttributes: [],
|
|
167
167
|
valueSets: []
|
|
168
168
|
}), Pe = (t) => {
|
|
169
|
-
const e = { value: "2023", pattern: "yyyy" }, n = { value: "12", pattern: "mm" },
|
|
170
|
-
return ge([e.value, n.value,
|
|
169
|
+
const e = { value: "2023", pattern: "yyyy" }, n = { value: "12", pattern: "mm" }, s = { value: "24", pattern: "dd" };
|
|
170
|
+
return ge([e.value, n.value, s.value].join("-"), t).replace(e.value, e.pattern).replace(n.value, n.pattern).replace(s.value, s.pattern);
|
|
171
171
|
}, We = (t) => t.toISOString().split("T")[0], ue = (t, e, n) => {
|
|
172
|
-
const
|
|
172
|
+
const s = t.closest("[lang]"), r = Intl.NumberFormat.supportedLocalesOf(s == null ? void 0 : s.lang), l = r.length > 0 && typeof r[0] == "string" ? r[0] : navigator.language || n, o = l.split("-").shift();
|
|
173
173
|
return {
|
|
174
|
-
locale:
|
|
175
|
-
messages: e[
|
|
174
|
+
locale: l,
|
|
175
|
+
messages: e[o] || e[n]
|
|
176
176
|
};
|
|
177
|
-
}, ze = (t, e, n) => new Intl.NumberFormat(e, { style: "currency", currency: n }).format(t), qe = (t, e) => new Intl.NumberFormat(e).format(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) => (n) => ue(n, t, e),
|
|
177
|
+
}, ze = (t, e, n) => new Intl.NumberFormat(e, { style: "currency", currency: n }).format(t), qe = (t, e) => new Intl.NumberFormat(e).format(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) => (n) => ue(n, t, e), _ = {
|
|
178
178
|
allRenderFn: !1,
|
|
179
179
|
cmpDidLoad: !0,
|
|
180
180
|
cmpDidUnload: !1,
|
|
@@ -263,15 +263,15 @@ Type: \`${t.type}\``, Ce = (t, e, n, r) => ({
|
|
|
263
263
|
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
264
264
|
experimentalSlotFixes: !1
|
|
265
265
|
};
|
|
266
|
-
let k, D,
|
|
267
|
-
const
|
|
268
|
-
let
|
|
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, ...n) => {
|
|
268
|
+
let s = null, r = null, l = null, o = !1, c = !1;
|
|
269
269
|
const i = [], d = (a) => {
|
|
270
270
|
for (let $ = 0; $ < a.length; $++)
|
|
271
|
-
|
|
271
|
+
s = a[$], Array.isArray(s) ? d(s) : s != null && typeof s != "boolean" && ((o = typeof t != "function" && !J(s)) && (s = String(s)), o && c ? i[i.length - 1].$text$ += s : i.push(o ? M(null, s) : s), c = o);
|
|
272
272
|
};
|
|
273
273
|
if (d(n), e) {
|
|
274
|
-
e.key && (
|
|
274
|
+
e.key && (r = 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(" "));
|
|
@@ -280,7 +280,7 @@ const C = "http://www.w3.org/1999/xlink", H = {}, pe = "http://www.w3.org/2000/s
|
|
|
280
280
|
if (typeof t == "function")
|
|
281
281
|
return t(e === null ? {} : e, i, Se);
|
|
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$ = r, u.$name$ = l, u;
|
|
284
284
|
}, M = (t, e) => {
|
|
285
285
|
const n = {
|
|
286
286
|
$flags$: 0,
|
|
@@ -291,9 +291,9 @@ const C = "http://www.w3.org/1999/xlink", H = {}, pe = "http://www.w3.org/2000/s
|
|
|
291
291
|
};
|
|
292
292
|
return n.$attrs$ = null, n.$key$ = null, n.$name$ = null, n;
|
|
293
293
|
}, ve = {}, be = (t) => t && t.$tag$ === ve, Se = {
|
|
294
|
-
forEach: (t, e) => t.map(
|
|
295
|
-
map: (t, e) => t.map(
|
|
296
|
-
},
|
|
294
|
+
forEach: (t, e) => t.map(W).forEach(e),
|
|
295
|
+
map: (t, e) => t.map(W).map(e).map(ke)
|
|
296
|
+
}, W = (t) => ({
|
|
297
297
|
vattrs: t.$attrs$,
|
|
298
298
|
vchildren: t.$children$,
|
|
299
299
|
vkey: t.$key$,
|
|
@@ -307,134 +307,140 @@ const C = "http://www.w3.org/1999/xlink", H = {}, pe = "http://www.w3.org/2000/s
|
|
|
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
|
-
},
|
|
311
|
-
if (n !==
|
|
312
|
-
let
|
|
310
|
+
}, z = (t, e, n, s, r, l) => {
|
|
311
|
+
if (n !== s) {
|
|
312
|
+
let o = G(t, e), c = e.toLowerCase();
|
|
313
313
|
if (e === "class") {
|
|
314
|
-
const i = t.classList, d =
|
|
314
|
+
const i = t.classList, d = q(n), u = q(s);
|
|
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
317
|
for (const i in n)
|
|
318
|
-
(!
|
|
319
|
-
for (const i in
|
|
320
|
-
(!n ||
|
|
318
|
+
(!s || s[i] == null) && (i.includes("-") ? t.style.removeProperty(i) : t.style[i] = "");
|
|
319
|
+
for (const i in s)
|
|
320
|
+
(!n || s[i] !== n[i]) && (i.includes("-") ? t.style.setProperty(i, s[i]) : t.style[i] = s[i]);
|
|
321
321
|
} else if (e !== "key")
|
|
322
322
|
if (e === "ref")
|
|
323
|
-
|
|
323
|
+
s && s(t);
|
|
324
324
|
else if (!t.__lookupSetter__(e) && e[0] === "o" && e[1] === "n") {
|
|
325
|
-
if (e[2] === "-" ? e = e.slice(3) :
|
|
325
|
+
if (e[2] === "-" ? e = e.slice(3) : G(C, c) ? e = c.slice(2) : e = c[2] + e.slice(3), n || s) {
|
|
326
326
|
const i = e.endsWith(Z);
|
|
327
|
-
e = e.replace(
|
|
327
|
+
e = e.replace(me, ""), n && x.rel(t, e, n, i), s && x.ael(t, e, s, i);
|
|
328
328
|
}
|
|
329
329
|
} else {
|
|
330
|
-
const i = J(
|
|
331
|
-
if ((
|
|
330
|
+
const i = J(s);
|
|
331
|
+
if ((o || i && s !== null) && !r)
|
|
332
332
|
try {
|
|
333
333
|
if (t.tagName.includes("-"))
|
|
334
|
-
t[e] =
|
|
334
|
+
t[e] = s;
|
|
335
335
|
else {
|
|
336
|
-
const u =
|
|
337
|
-
e === "list" ?
|
|
336
|
+
const u = s ?? "";
|
|
337
|
+
e === "list" ? o = !1 : (n == 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), s == null || s === !1 ? (s !== !1 || t.getAttribute(e) === "") && (d ? t.removeAttributeNS(H, e) : t.removeAttribute(e)) : (!o || l & 4 || r) && !i && (s = s === !0 ? "" : s, d ? t.setAttributeNS(H, e, s) : t.setAttribute(e, s));
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
},
|
|
346
|
-
const
|
|
347
|
-
for (
|
|
348
|
-
|
|
349
|
-
for (
|
|
350
|
-
|
|
351
|
-
}, O = (t, e, n,
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
345
|
+
}, Te = /\s/, q = (t) => t ? t.split(Te) : [], Z = "Capture", me = new RegExp(Z + "$"), V = (t, e, n, s) => {
|
|
346
|
+
const r = e.$elm$.nodeType === 11 && e.$elm$.host ? e.$elm$.host : e.$elm$, l = t && t.$attrs$ || P, o = e.$attrs$ || P;
|
|
347
|
+
for (s in l)
|
|
348
|
+
s in o || z(r, s, l[s], void 0, n, e.$flags$);
|
|
349
|
+
for (s in o)
|
|
350
|
+
z(r, s, l[s], o[s], n, e.$flags$);
|
|
351
|
+
}, O = (t, e, n, s) => {
|
|
352
|
+
var r;
|
|
353
|
+
const l = e.$children$[n];
|
|
354
|
+
let o = 0, c, i, d;
|
|
355
|
+
if (B || (N = !0, l.$tag$ === "slot" && (k && s.classList.add(k + "-s"), l.$flags$ |= l.$children$ ? (
|
|
355
356
|
// slot element has fallback content
|
|
356
357
|
2
|
|
357
358
|
) : (
|
|
358
359
|
// slot element does not have fallback content
|
|
359
360
|
1
|
|
360
|
-
))),
|
|
361
|
-
|
|
362
|
-
else if (
|
|
363
|
-
|
|
361
|
+
))), l.$text$ !== null)
|
|
362
|
+
c = l.$elm$ = j.createTextNode(l.$text$);
|
|
363
|
+
else if (l.$flags$ & 1)
|
|
364
|
+
c = l.$elm$ = j.createTextNode("");
|
|
364
365
|
else {
|
|
365
|
-
if (h || (h =
|
|
366
|
-
for (o = 0; o <
|
|
367
|
-
|
|
368
|
-
|
|
366
|
+
if (h || (h = l.$tag$ === "svg"), c = l.$elm$ = j.createElementNS(h ? pe : he, l.$flags$ & 2 ? "slot-fb" : l.$tag$), h && l.$tag$ === "foreignObject" && (h = !1), V(null, l, h), ye(k) && c["s-si"] !== k && c.classList.add(c["s-si"] = k), l.$children$)
|
|
367
|
+
for (o = 0; o < l.$children$.length; ++o)
|
|
368
|
+
i = O(t, l, o, c), i && c.appendChild(i);
|
|
369
|
+
l.$tag$ === "svg" ? h = !1 : c.tagName === "foreignObject" && (h = !0);
|
|
369
370
|
}
|
|
370
|
-
return
|
|
371
|
-
},
|
|
372
|
-
|
|
373
|
-
const n = t.childNodes;
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
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"] = (r = l.$attrs$) === null || r === void 0 ? void 0 : r.ref, d = t && t.$children$ && t.$children$[n], d && d.$tag$ === l.$tag$ && t.$elm$ && L(t.$elm$, !1)), c;
|
|
372
|
+
}, L = (t, e) => {
|
|
373
|
+
x.$flags$ |= 1;
|
|
374
|
+
const n = Array.from(t.childNodes);
|
|
375
|
+
if (t["s-sr"] && _.experimentalSlotFixes) {
|
|
376
|
+
let s = t;
|
|
377
|
+
for (; s = s.nextSibling; )
|
|
378
|
+
s && s["s-sn"] === t["s-sn"] && s["s-sh"] === m && n.push(s);
|
|
377
379
|
}
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
380
|
+
for (let s = n.length - 1; s >= 0; s--) {
|
|
381
|
+
const r = n[s];
|
|
382
|
+
r["s-hn"] !== m && r["s-ol"] && (se(r).insertBefore(r, U(r)), r["s-ol"].remove(), r["s-ol"] = void 0, r["s-sh"] = void 0, N = !0), e && L(r, e);
|
|
383
|
+
}
|
|
384
|
+
x.$flags$ &= -2;
|
|
385
|
+
}, ee = (t, e, n, s, r, l) => {
|
|
386
|
+
let o = t["s-cr"] && t["s-cr"].parentNode || t, c;
|
|
387
|
+
for (o.shadowRoot && o.tagName === m && (o = o.shadowRoot); r <= l; ++r)
|
|
388
|
+
s[r] && (c = O(null, n, r, t), c && (s[r].$elm$ = c, o.insertBefore(c, U(e))));
|
|
383
389
|
}, te = (t, e, n) => {
|
|
384
|
-
for (let
|
|
385
|
-
const
|
|
386
|
-
if (
|
|
387
|
-
const
|
|
388
|
-
le(
|
|
390
|
+
for (let s = e; s <= n; ++s) {
|
|
391
|
+
const r = t[s];
|
|
392
|
+
if (r) {
|
|
393
|
+
const l = r.$elm$;
|
|
394
|
+
le(r), l && (R = !0, l["s-ol"] ? l["s-ol"].remove() : L(l, !0), l.remove());
|
|
389
395
|
}
|
|
390
396
|
}
|
|
391
|
-
}, xe = (t, e, n,
|
|
392
|
-
let
|
|
393
|
-
for (;
|
|
397
|
+
}, xe = (t, e, n, s, r = !1) => {
|
|
398
|
+
let l = 0, o = 0, c = 0, i = 0, d = e.length - 1, u = e[0], a = e[d], $ = s.length - 1, f = s[0], g = s[$], v, y;
|
|
399
|
+
for (; l <= d && o <= $; )
|
|
394
400
|
if (u == null)
|
|
395
|
-
u = e[++
|
|
401
|
+
u = e[++l];
|
|
396
402
|
else if (a == null)
|
|
397
403
|
a = e[--d];
|
|
398
404
|
else if (f == null)
|
|
399
|
-
f =
|
|
405
|
+
f = s[++o];
|
|
400
406
|
else if (g == null)
|
|
401
|
-
g =
|
|
402
|
-
else if (
|
|
403
|
-
|
|
404
|
-
else if (
|
|
405
|
-
|
|
406
|
-
else if (
|
|
407
|
-
(u.$tag$ === "slot" || g.$tag$ === "slot") &&
|
|
408
|
-
else if (
|
|
409
|
-
(u.$tag$ === "slot" || g.$tag$ === "slot") &&
|
|
407
|
+
g = s[--$];
|
|
408
|
+
else if (E(u, f, r))
|
|
409
|
+
T(u, f, r), u = e[++l], f = s[++o];
|
|
410
|
+
else if (E(a, g, r))
|
|
411
|
+
T(a, g, r), a = e[--d], g = s[--$];
|
|
412
|
+
else if (E(u, g, r))
|
|
413
|
+
(u.$tag$ === "slot" || g.$tag$ === "slot") && L(u.$elm$.parentNode, !1), T(u, g, r), t.insertBefore(u.$elm$, a.$elm$.nextSibling), u = e[++l], g = s[--$];
|
|
414
|
+
else if (E(a, f, r))
|
|
415
|
+
(u.$tag$ === "slot" || g.$tag$ === "slot") && L(a.$elm$.parentNode, !1), T(a, f, r), t.insertBefore(a.$elm$, u.$elm$), a = e[--d], f = s[++o];
|
|
410
416
|
else {
|
|
411
|
-
for (c = -1, i =
|
|
417
|
+
for (c = -1, i = l; i <= d; ++i)
|
|
412
418
|
if (e[i] && e[i].$key$ !== null && e[i].$key$ === f.$key$) {
|
|
413
419
|
c = i;
|
|
414
420
|
break;
|
|
415
421
|
}
|
|
416
|
-
c >= 0 ? (y = e[c], y.$tag$ !== f.$tag$ ? v = O(e && e[
|
|
422
|
+
c >= 0 ? (y = e[c], y.$tag$ !== f.$tag$ ? v = O(e && e[o], n, c, t) : (T(y, f, r), e[c] = void 0, v = y.$elm$), f = s[++o]) : (v = O(e && e[o], n, o, t), f = s[++o]), v && se(u.$elm$).insertBefore(v, U(u.$elm$));
|
|
417
423
|
}
|
|
418
|
-
|
|
419
|
-
},
|
|
420
|
-
const
|
|
424
|
+
l > d ? ee(t, s[$ + 1] == null ? null : s[$ + 1].$elm$, n, s, o, $) : o > $ && te(e, l, d);
|
|
425
|
+
}, E = (t, e, n = !1) => t.$tag$ === e.$tag$ ? t.$tag$ === "slot" ? t.$name$ === e.$name$ : n ? !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, n = !1) => {
|
|
426
|
+
const s = e.$elm$ = t.$elm$, r = t.$children$, l = e.$children$, o = e.$tag$, c = e.$text$;
|
|
421
427
|
let i;
|
|
422
|
-
c === null ? (h =
|
|
428
|
+
c === null ? (h = o === "svg" ? !0 : o === "foreignObject" ? !1 : h, o === "slot" && !B || V(t, e, h), r !== null && l !== null ? xe(s, r, e, l, n) : l !== null ? (t.$text$ !== null && (s.textContent = ""), ee(s, null, e, l, 0, l.length - 1)) : r !== null && te(r, 0, r.length - 1), h && o === "svg" && (h = !1)) : (i = s["s-cr"]) ? i.parentNode.textContent = c : t.$text$ !== c && (s.data = c);
|
|
423
429
|
}, ne = (t) => {
|
|
424
430
|
const e = t.childNodes;
|
|
425
431
|
for (const n of e)
|
|
426
432
|
if (n.nodeType === 1) {
|
|
427
433
|
if (n["s-sr"]) {
|
|
428
|
-
const
|
|
434
|
+
const s = n["s-sn"];
|
|
429
435
|
n.hidden = !1;
|
|
430
|
-
for (const
|
|
431
|
-
if (
|
|
432
|
-
if (
|
|
433
|
-
if (
|
|
436
|
+
for (const r of e)
|
|
437
|
+
if (r !== n) {
|
|
438
|
+
if (r["s-hn"] !== n["s-hn"] || s !== "") {
|
|
439
|
+
if (r.nodeType === 1 && (s === r.getAttribute("slot") || s === r["s-sn"])) {
|
|
434
440
|
n.hidden = !0;
|
|
435
441
|
break;
|
|
436
442
|
}
|
|
437
|
-
} else if (
|
|
443
|
+
} else if (r.nodeType === 1 || r.nodeType === 3 && r.textContent.trim() !== "") {
|
|
438
444
|
n.hidden = !0;
|
|
439
445
|
break;
|
|
440
446
|
}
|
|
@@ -443,39 +449,39 @@ const C = "http://www.w3.org/1999/xlink", H = {}, pe = "http://www.w3.org/2000/s
|
|
|
443
449
|
ne(n);
|
|
444
450
|
}
|
|
445
451
|
}, b = [], re = (t) => {
|
|
446
|
-
let e, n,
|
|
447
|
-
for (const
|
|
448
|
-
if (
|
|
452
|
+
let e, n, s;
|
|
453
|
+
for (const r of t.childNodes) {
|
|
454
|
+
if (r["s-sr"] && (e = r["s-cr"]) && e.parentNode) {
|
|
449
455
|
n = e.parentNode.childNodes;
|
|
450
|
-
const
|
|
451
|
-
for (
|
|
452
|
-
if (e = n[
|
|
453
|
-
if (
|
|
454
|
-
let
|
|
455
|
-
R = !0, e["s-sn"] = e["s-sn"] ||
|
|
456
|
-
$slotRefNode$:
|
|
456
|
+
const l = r["s-sn"];
|
|
457
|
+
for (s = n.length - 1; s >= 0; s--)
|
|
458
|
+
if (e = n[s], !e["s-cn"] && !e["s-nr"] && e["s-hn"] !== r["s-hn"] && !_.experimentalSlotFixes)
|
|
459
|
+
if (w(e, l)) {
|
|
460
|
+
let o = b.find((c) => c.$nodeToRelocate$ === e);
|
|
461
|
+
R = !0, e["s-sn"] = e["s-sn"] || l, o ? (o.$nodeToRelocate$["s-sh"] = r["s-hn"], o.$slotRefNode$ = r) : (e["s-sh"] = r["s-hn"], b.push({
|
|
462
|
+
$slotRefNode$: r,
|
|
457
463
|
$nodeToRelocate$: e
|
|
458
464
|
})), e["s-sr"] && b.map((c) => {
|
|
459
|
-
|
|
465
|
+
w(c.$nodeToRelocate$, e["s-sn"]) && (o = b.find((i) => i.$nodeToRelocate$ === e), o && !c.$slotRefNode$ && (c.$slotRefNode$ = o.$slotRefNode$));
|
|
460
466
|
});
|
|
461
467
|
} else
|
|
462
|
-
b.some((
|
|
468
|
+
b.some((o) => o.$nodeToRelocate$ === e) || b.push({
|
|
463
469
|
$nodeToRelocate$: e
|
|
464
470
|
});
|
|
465
471
|
}
|
|
466
|
-
|
|
472
|
+
r.nodeType === 1 && re(r);
|
|
467
473
|
}
|
|
468
|
-
},
|
|
474
|
+
}, w = (t, e) => t.nodeType === 1 ? t.getAttribute("slot") === null && e === "" || t.getAttribute("slot") === e : t["s-sn"] === e ? !0 : e === "", le = (t) => {
|
|
469
475
|
t.$attrs$ && t.$attrs$.ref && t.$attrs$.ref(null), t.$children$ && t.$children$.map(le);
|
|
470
|
-
},
|
|
471
|
-
var r,
|
|
476
|
+
}, Le = (t, e, n = !1) => {
|
|
477
|
+
var s, r, l, o, c;
|
|
472
478
|
const i = t.$hostElement$, d = t.$cmpMeta$, u = t.$vnode$ || M(null, null), a = be(e) ? e : Y(null, null, e);
|
|
473
|
-
if (
|
|
479
|
+
if (m = i.tagName, d.$attrsToReflect$ && (a.$attrs$ = a.$attrs$ || {}, d.$attrsToReflect$.map(([$, f]) => a.$attrs$[f] = i[$])), n && a.$attrs$)
|
|
474
480
|
for (const $ of Object.keys(a.$attrs$))
|
|
475
481
|
i.hasAttribute($) && !["key", "ref", "style", "class"].includes($) && (a.$attrs$[$] = i[$]);
|
|
476
|
-
a.$tag$ = null, a.$flags$ |= 4, t.$vnode$ = a, a.$elm$ = u.$elm$ = i.shadowRoot || i, k = i["s-sc"],
|
|
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, n);
|
|
477
483
|
{
|
|
478
|
-
if (
|
|
484
|
+
if (x.$flags$ |= 1, N) {
|
|
479
485
|
re(a.$elm$);
|
|
480
486
|
for (const $ of b) {
|
|
481
487
|
const f = $.$nodeToRelocate$;
|
|
@@ -490,64 +496,64 @@ const C = "http://www.w3.org/1999/xlink", H = {}, pe = "http://www.w3.org/2000/s
|
|
|
490
496
|
const v = g.parentNode;
|
|
491
497
|
let y = g.nextSibling;
|
|
492
498
|
{
|
|
493
|
-
let
|
|
494
|
-
for (;
|
|
495
|
-
let S = (
|
|
499
|
+
let A = (s = f["s-ol"]) === null || s === void 0 ? void 0 : s.previousSibling;
|
|
500
|
+
for (; A; ) {
|
|
501
|
+
let S = (r = A["s-nr"]) !== null && r !== void 0 ? r : null;
|
|
496
502
|
if (S && S["s-sn"] === f["s-sn"] && v === S.parentNode && (S = S.nextSibling, !S || !S["s-nr"])) {
|
|
497
503
|
y = S;
|
|
498
504
|
break;
|
|
499
505
|
}
|
|
500
|
-
|
|
506
|
+
A = A.previousSibling;
|
|
501
507
|
}
|
|
502
508
|
}
|
|
503
|
-
(!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 = (
|
|
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);
|
|
504
510
|
} else
|
|
505
|
-
f.nodeType === 1 && (n && (f["s-ih"] = (
|
|
511
|
+
f.nodeType === 1 && (n && (f["s-ih"] = (o = f.hidden) !== null && o !== void 0 ? o : !1), f.hidden = !0);
|
|
506
512
|
}
|
|
507
513
|
}
|
|
508
|
-
R && ne(a.$elm$),
|
|
514
|
+
R && ne(a.$elm$), x.$flags$ &= -2, b.length = 0;
|
|
509
515
|
}
|
|
510
|
-
if (
|
|
516
|
+
if (_.experimentalScopedSlotChanges && d.$flags$ & 2)
|
|
511
517
|
for (const $ of a.$elm$.childNodes)
|
|
512
|
-
$["s-hn"] !==
|
|
518
|
+
$["s-hn"] !== m && !$["s-sh"] && (n && $["s-ih"] == null && ($["s-ih"] = (c = $.hidden) !== null && c !== void 0 ? c : !1), $.hidden = !0);
|
|
513
519
|
D = void 0;
|
|
514
|
-
},
|
|
515
|
-
|
|
516
|
-
const
|
|
520
|
+
}, G = (t, e) => e in t, C = typeof window < "u" ? window : {}, j = C.document || { head: {} };
|
|
521
|
+
C.HTMLElement;
|
|
522
|
+
const x = {
|
|
517
523
|
$flags$: 0,
|
|
518
524
|
$resourcesUrl$: "",
|
|
519
525
|
jmp: (t) => t(),
|
|
520
526
|
raf: (t) => requestAnimationFrame(t),
|
|
521
|
-
ael: (t, e, n,
|
|
522
|
-
rel: (t, e, n,
|
|
527
|
+
ael: (t, e, n, s) => t.addEventListener(e, n, s),
|
|
528
|
+
rel: (t, e, n, s) => t.removeEventListener(e, n, s),
|
|
523
529
|
ce: (t, e) => new CustomEvent(t, e)
|
|
524
|
-
},
|
|
530
|
+
}, Ae = (t, e, n) => {
|
|
525
531
|
[null, void 0, "", !1].includes(n) || ["innerHTML", "style"].includes(e) || t.setAttribute(e, ["object", "function"].includes(typeof n) ? "/!\\ Object props are not rendered in the code example" : n);
|
|
526
|
-
}, oe = (t, e, n,
|
|
532
|
+
}, oe = (t, e, n, s, r) => {
|
|
527
533
|
if (e && typeof e == "string") {
|
|
528
|
-
const
|
|
529
|
-
Object.keys(n || {}).forEach((
|
|
530
|
-
|
|
531
|
-
}),
|
|
532
|
-
oe(
|
|
533
|
-
}), n != null && n.innerHTML && (
|
|
534
|
+
const l = document.createElement(e);
|
|
535
|
+
Object.keys(n || {}).forEach((o) => {
|
|
536
|
+
Ae(l, o, n[o]);
|
|
537
|
+
}), s == null || s.forEach((o) => {
|
|
538
|
+
oe(l, o.$tag$, o.$attrs$, o.$children$, o.$text$);
|
|
539
|
+
}), n != null && n.innerHTML && (l.innerHTML = n.innerHTML), t.appendChild(l);
|
|
534
540
|
}
|
|
535
|
-
|
|
541
|
+
r && (t.innerHTML = r);
|
|
536
542
|
}, Ge = (t, e) => {
|
|
537
543
|
const n = {};
|
|
538
544
|
if (typeof t != "object")
|
|
539
545
|
throw new Error("filterArgs - args isn't an object.");
|
|
540
|
-
for (const
|
|
541
|
-
if (!
|
|
542
|
-
const
|
|
543
|
-
(!e || !Object.keys(e).includes(
|
|
546
|
+
for (const s in t)
|
|
547
|
+
if (!s.startsWith("slot")) {
|
|
548
|
+
const r = t[s], l = s.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
549
|
+
(!e || !Object.keys(e).includes(s) || e[s] !== r) && (n[l] = r);
|
|
544
550
|
}
|
|
545
551
|
return n;
|
|
546
552
|
}, Ie = (t, e) => {
|
|
547
|
-
var
|
|
553
|
+
var s, r;
|
|
548
554
|
const n = document.getElementById("storybook-root");
|
|
549
555
|
if (n)
|
|
550
|
-
return (
|
|
556
|
+
return (r = document.querySelector("[lang]")) == null || r.setAttribute("lang", ((s = e.globals) == null ? void 0 : s.locale) || "en"), Le(
|
|
551
557
|
{
|
|
552
558
|
$ancestorComponent$: void 0,
|
|
553
559
|
$flags$: 0,
|
|
@@ -560,12 +566,12 @@ const T = {
|
|
|
560
566
|
},
|
|
561
567
|
t(e)
|
|
562
568
|
), n.children[n.children.length - 1];
|
|
563
|
-
}, Xe = ({ $tag$: t, $attrs$: e, $children$: n, $text$:
|
|
564
|
-
const
|
|
565
|
-
return oe(
|
|
569
|
+
}, Xe = ({ $tag$: t, $attrs$: e, $children$: n, $text$: s }) => {
|
|
570
|
+
const r = document.createElement("div");
|
|
571
|
+
return oe(r, t, e, n, s), r.innerHTML;
|
|
566
572
|
}, Ke = ({ disconnect: t, observe: e, takeRecords: n }) => {
|
|
567
|
-
class
|
|
568
|
-
constructor(
|
|
573
|
+
class s {
|
|
574
|
+
constructor(l) {
|
|
569
575
|
/**
|
|
570
576
|
*
|
|
571
577
|
*/
|
|
@@ -582,19 +588,19 @@ const T = {
|
|
|
582
588
|
*
|
|
583
589
|
*/
|
|
584
590
|
p(this, "cb");
|
|
585
|
-
this.cb =
|
|
591
|
+
this.cb = l;
|
|
586
592
|
}
|
|
587
593
|
}
|
|
588
|
-
return [window, global].forEach((
|
|
589
|
-
Object.defineProperty(
|
|
594
|
+
return [window, global].forEach((r) => {
|
|
595
|
+
Object.defineProperty(r, "MutationObserver", {
|
|
590
596
|
writable: !0,
|
|
591
597
|
configurable: !0,
|
|
592
|
-
value:
|
|
598
|
+
value: s
|
|
593
599
|
});
|
|
594
|
-
}),
|
|
600
|
+
}), s;
|
|
595
601
|
}, Qe = ({ disconnect: t, observe: e }) => {
|
|
596
602
|
class n {
|
|
597
|
-
constructor(
|
|
603
|
+
constructor(r) {
|
|
598
604
|
/**
|
|
599
605
|
*
|
|
600
606
|
*/
|
|
@@ -611,18 +617,18 @@ const T = {
|
|
|
611
617
|
*
|
|
612
618
|
*/
|
|
613
619
|
p(this, "cb");
|
|
614
|
-
this.cb =
|
|
620
|
+
this.cb = r;
|
|
615
621
|
}
|
|
616
622
|
}
|
|
617
|
-
return [window, global].forEach((
|
|
618
|
-
Object.defineProperty(
|
|
623
|
+
return [window, global].forEach((s) => {
|
|
624
|
+
Object.defineProperty(s, "ResizeObserver", {
|
|
619
625
|
writable: !0,
|
|
620
626
|
configurable: !0,
|
|
621
627
|
value: n
|
|
622
628
|
});
|
|
623
629
|
}), n;
|
|
624
630
|
};
|
|
625
|
-
class
|
|
631
|
+
class Ee extends Event {
|
|
626
632
|
constructor() {
|
|
627
633
|
super(...arguments);
|
|
628
634
|
/**
|
|
@@ -633,7 +639,7 @@ class Ae extends Event {
|
|
|
633
639
|
}
|
|
634
640
|
}
|
|
635
641
|
const Je = () => {
|
|
636
|
-
class t extends
|
|
642
|
+
class t extends Ee {
|
|
637
643
|
}
|
|
638
644
|
return [window, global].forEach((e) => {
|
|
639
645
|
Object.defineProperty(e, "SubmitEvent", {
|
|
@@ -654,7 +660,7 @@ export {
|
|
|
654
660
|
Ge as filterArgs,
|
|
655
661
|
De as focusableElements,
|
|
656
662
|
Pe as getLocaleDatePattern,
|
|
657
|
-
|
|
663
|
+
I as getParentWindows,
|
|
658
664
|
Xe as getStoryHTML,
|
|
659
665
|
_e as getWindows,
|
|
660
666
|
Fe as isTagName,
|