@mgdis/stencil-helpers 3.0.0 → 3.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/components/index.d.ts +87 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.es.js +494 -352
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +16 -14
- package/dist/index.umd.js.map +1 -1
- package/dist/storybook/index.d.ts.map +1 -1
- package/package.json +11 -11
package/dist/index.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var De = Object.defineProperty;
|
|
2
|
+
var ce = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var d = (e, t, r) =>
|
|
7
|
-
var
|
|
8
|
-
const
|
|
5
|
+
var He = (e, t, r) => t in e ? De(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
6
|
+
var d = (e, t, r) => He(e, typeof t != "symbol" ? t + "" : t, r), fe = (e, t, r) => t.has(e) || ce("Cannot " + r);
|
|
7
|
+
var v = (e, t, r) => (fe(e, t, "read from private field"), r ? r.call(e) : t.get(e)), k = (e, t, r) => t.has(e) ? ce("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), U = (e, t, r, s) => (fe(e, t, "write to private field"), s ? s.call(e, r) : t.set(e, r), r);
|
|
8
|
+
const Zt = (e = "", t = 10) => {
|
|
9
9
|
const r = new Uint8Array(t);
|
|
10
10
|
crypto.getRandomValues(r);
|
|
11
11
|
const s = Array.from(r).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, t);
|
|
12
12
|
return e !== "" ? `${e}-${s}` : s;
|
|
13
|
-
},
|
|
14
|
-
class
|
|
13
|
+
}, Dt = (e) => qe(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
|
|
14
|
+
class Ht {
|
|
15
15
|
constructor(t = []) {
|
|
16
16
|
/**
|
|
17
17
|
* Available classes
|
|
@@ -46,33 +46,122 @@ class kt {
|
|
|
46
46
|
this.classes = t;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
const t =
|
|
49
|
+
const qt = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Bt = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Gt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Jt = (e) => {
|
|
50
|
+
const t = _e(e), r = be(e);
|
|
51
51
|
return [e, ...t, ...r];
|
|
52
|
-
},
|
|
52
|
+
}, _e = (e, t = []) => {
|
|
53
53
|
if (e.self !== e.top)
|
|
54
54
|
try {
|
|
55
55
|
const r = e.parent;
|
|
56
|
-
return r ? (t.push(r),
|
|
56
|
+
return r ? (t.push(r), _e(r, t)) : t;
|
|
57
57
|
} catch (r) {
|
|
58
58
|
return console.error("Different hosts between iframes:", r), t;
|
|
59
59
|
}
|
|
60
60
|
return t;
|
|
61
|
-
},
|
|
61
|
+
}, be = (e, t = []) => {
|
|
62
62
|
if (e.frames.length > 0)
|
|
63
63
|
for (const r of Array.from(e.frames))
|
|
64
|
-
t.push(r),
|
|
64
|
+
t.push(r), be(r, t);
|
|
65
65
|
return t;
|
|
66
|
-
},
|
|
67
|
-
|
|
66
|
+
}, qe = (e) => typeof e == "string" && e.trim() !== "", Xt = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, Kt = (e) => typeof e == "number" && !Number.isNaN(e), Yt = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, Qt = async (e) => {
|
|
67
|
+
if (e) return e();
|
|
68
|
+
}, ne = (e) => typeof e == "object" && !Array.isArray(e) && e !== null, Be = (e, t, r) => {
|
|
69
|
+
const s = ".";
|
|
70
|
+
if (!ne(e) || typeof t != "string")
|
|
71
|
+
return r;
|
|
72
|
+
const [n, ...i] = t.split(s);
|
|
73
|
+
return i.length ? Be(e[n], i.join(s)) : e[n];
|
|
74
|
+
}, Vt = {
|
|
75
|
+
FIRST: "first",
|
|
76
|
+
NEXT: "next",
|
|
77
|
+
PREVIOUS: "previous",
|
|
78
|
+
LAST: "last"
|
|
79
|
+
}, ve = 10;
|
|
80
|
+
class Ge {
|
|
81
|
+
constructor(t) {
|
|
82
|
+
/**
|
|
83
|
+
* Define items
|
|
84
|
+
*/
|
|
85
|
+
d(this, "items", []);
|
|
86
|
+
/**
|
|
87
|
+
* Define total
|
|
88
|
+
*/
|
|
89
|
+
d(this, "total");
|
|
90
|
+
/**
|
|
91
|
+
* Define top
|
|
92
|
+
*/
|
|
93
|
+
d(this, "top", ve);
|
|
94
|
+
/**
|
|
95
|
+
* Define next
|
|
96
|
+
*/
|
|
97
|
+
d(this, "next");
|
|
98
|
+
/**
|
|
99
|
+
* Define base index
|
|
100
|
+
*/
|
|
101
|
+
d(this, "baseIndex", 1);
|
|
102
|
+
/**
|
|
103
|
+
* Get index of items from cursor
|
|
104
|
+
* @param cursor - cursor to find
|
|
105
|
+
* @param oldItem - previous item
|
|
106
|
+
* @returns item index
|
|
107
|
+
*/
|
|
108
|
+
d(this, "getIndexFromCursor", (t = "first", r) => {
|
|
109
|
+
if (!Array.isArray(this.items) || !this.items.length) return null;
|
|
110
|
+
const n = this.items.length - this.baseIndex;
|
|
111
|
+
let i = 0, o = 0;
|
|
112
|
+
if (["previous", "next"].includes(t) && r) {
|
|
113
|
+
const f = this.items.findIndex((c) => JSON.stringify(c) === JSON.stringify(r));
|
|
114
|
+
if (f === -1) return 0;
|
|
115
|
+
o = f;
|
|
116
|
+
}
|
|
117
|
+
return t === "first" ? i = 0 : t === "last" ? i = n : t === "previous" ? i = JSON.stringify(this.items[o]) === JSON.stringify(this.items[0]) ? n : o - this.baseIndex : t === "next" && (i = JSON.stringify(this.items[o]) === JSON.stringify(this.items[n]) ? 0 : o + this.baseIndex), i;
|
|
118
|
+
});
|
|
119
|
+
if (ne(t))
|
|
120
|
+
Array.isArray(t.items) && (this.items = t.items), typeof t.top == "number" && (this.top = t.top), this.total = typeof t.total == "number" ? t.total : this.items.length, this.next = t.next;
|
|
121
|
+
else
|
|
122
|
+
throw new Error("Page - init must match IPage type.");
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
var O, N, C;
|
|
126
|
+
class er {
|
|
127
|
+
constructor(t, r) {
|
|
128
|
+
/**
|
|
129
|
+
* Define paginated items
|
|
130
|
+
*/
|
|
131
|
+
d(this, "items", []);
|
|
132
|
+
/* Privates */
|
|
133
|
+
k(this, O, ve);
|
|
134
|
+
k(this, N);
|
|
135
|
+
k(this, C);
|
|
136
|
+
/**
|
|
137
|
+
* Get page
|
|
138
|
+
* @param offset - pagiantion offset
|
|
139
|
+
* @param filter - filter methode
|
|
140
|
+
* @returns formated page
|
|
141
|
+
*/
|
|
142
|
+
d(this, "getPage", (t = 0, r) => {
|
|
143
|
+
const s = typeof r == "function" ? this.items.filter(r) : this.items;
|
|
144
|
+
let n;
|
|
145
|
+
return v(this, N) ? n = v(this, N) : s.length > t + v(this, O) && (n = () => this.getPage(t + v(this, O), r)), new Ge({
|
|
146
|
+
items: s.slice(t, t + v(this, O)),
|
|
147
|
+
total: v(this, C),
|
|
148
|
+
top: v(this, O),
|
|
149
|
+
next: n
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
Array.isArray(t) && (this.items = t), r && (["string", "function"].includes(typeof r.next) || ne(r.next) && URL.canParse(r.next)) && U(this, N, r.next), typeof (r == null ? void 0 : r.top) == "number" && U(this, O, r.top), typeof (r == null ? void 0 : r.total) == "number" && U(this, C, r.total);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
O = new WeakMap(), N = new WeakMap(), C = new WeakMap();
|
|
156
|
+
var K = {
|
|
68
157
|
updatable: !0,
|
|
69
158
|
slotRelocation: !0,
|
|
70
159
|
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
71
160
|
experimentalSlotFixes: !1
|
|
72
|
-
},
|
|
161
|
+
}, Je = Object.defineProperty, Xe = (e, t) => {
|
|
73
162
|
for (var r in t)
|
|
74
|
-
|
|
75
|
-
},
|
|
163
|
+
Je(e, r, { get: t[r], enumerable: !0 });
|
|
164
|
+
}, Ke = "http://www.w3.org/2000/svg", Ye = "http://www.w3.org/1999/xhtml", ue = (e, t) => t in e, pe = "http://www.w3.org/1999/xlink", A = typeof window < "u" ? window : {}, z = {
|
|
76
165
|
$flags$: 0,
|
|
77
166
|
$resourcesUrl$: "",
|
|
78
167
|
jmp: (e) => e(),
|
|
@@ -80,53 +169,53 @@ var B = {
|
|
|
80
169
|
ael: (e, t, r, s) => e.addEventListener(t, r, s),
|
|
81
170
|
rel: (e, t, r, s) => e.removeEventListener(t, r, s),
|
|
82
171
|
ce: (e, t) => new CustomEvent(e, t)
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
err: () =>
|
|
86
|
-
map: () =>
|
|
87
|
-
ok: () =>
|
|
88
|
-
unwrap: () =>
|
|
89
|
-
unwrapErr: () =>
|
|
172
|
+
}, Qe = (e) => e != null && e !== void 0, we = (e) => (e = typeof e, e === "object" || e === "function"), Ve = {};
|
|
173
|
+
Xe(Ve, {
|
|
174
|
+
err: () => me,
|
|
175
|
+
map: () => et,
|
|
176
|
+
ok: () => Q,
|
|
177
|
+
unwrap: () => tt,
|
|
178
|
+
unwrapErr: () => rt
|
|
90
179
|
});
|
|
91
|
-
var
|
|
180
|
+
var Q = (e) => ({
|
|
92
181
|
isOk: !0,
|
|
93
182
|
isErr: !1,
|
|
94
183
|
value: e
|
|
95
|
-
}),
|
|
184
|
+
}), me = (e) => ({
|
|
96
185
|
isOk: !1,
|
|
97
186
|
isErr: !0,
|
|
98
187
|
value: e
|
|
99
188
|
});
|
|
100
|
-
function
|
|
189
|
+
function et(e, t) {
|
|
101
190
|
if (e.isOk) {
|
|
102
191
|
const r = t(e.value);
|
|
103
|
-
return r instanceof Promise ? r.then((s) =>
|
|
192
|
+
return r instanceof Promise ? r.then((s) => Q(s)) : Q(r);
|
|
104
193
|
}
|
|
105
194
|
if (e.isErr) {
|
|
106
195
|
const r = e.value;
|
|
107
|
-
return
|
|
196
|
+
return me(r);
|
|
108
197
|
}
|
|
109
198
|
throw "should never get here";
|
|
110
199
|
}
|
|
111
|
-
var
|
|
200
|
+
var tt = (e) => {
|
|
112
201
|
if (e.isOk)
|
|
113
202
|
return e.value;
|
|
114
203
|
throw e.value;
|
|
115
|
-
},
|
|
204
|
+
}, rt = (e) => {
|
|
116
205
|
if (e.isErr)
|
|
117
206
|
return e.value;
|
|
118
207
|
throw e.value;
|
|
119
|
-
},
|
|
120
|
-
const t =
|
|
121
|
-
e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" &&
|
|
122
|
-
s.nodeType === 1 && s.tagName === "SLOT-FB" && (
|
|
208
|
+
}, xe = (e) => {
|
|
209
|
+
const t = $e(e, "childNodes");
|
|
210
|
+
e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && Ee(t, e.tagName).forEach((s) => {
|
|
211
|
+
s.nodeType === 1 && s.tagName === "SLOT-FB" && (nt(s, ie(s), !1).length ? s.hidden = !0 : s.hidden = !1);
|
|
123
212
|
});
|
|
124
213
|
let r = 0;
|
|
125
214
|
for (r = 0; r < t.length; r++) {
|
|
126
215
|
const s = t[r];
|
|
127
|
-
s.nodeType === 1 &&
|
|
216
|
+
s.nodeType === 1 && $e(s, "childNodes").length && xe(s);
|
|
128
217
|
}
|
|
129
|
-
},
|
|
218
|
+
}, st = (e) => {
|
|
130
219
|
const t = [];
|
|
131
220
|
for (let r = 0; r < e.length; r++) {
|
|
132
221
|
const s = e[r]["s-nr"] || void 0;
|
|
@@ -134,21 +223,21 @@ var qe = (e) => {
|
|
|
134
223
|
}
|
|
135
224
|
return t;
|
|
136
225
|
};
|
|
137
|
-
function
|
|
226
|
+
function Ee(e, t, r) {
|
|
138
227
|
let s = 0, n = [], i;
|
|
139
228
|
for (; s < e.length; s++)
|
|
140
|
-
i = e[s], i["s-sr"] && (!t || i["s-hn"] === t) && r === void 0 && n.push(i), n = [...n, ...
|
|
229
|
+
i = e[s], i["s-sr"] && (!t || i["s-hn"] === t) && r === void 0 && n.push(i), n = [...n, ...Ee(i.childNodes, t, r)];
|
|
141
230
|
return n;
|
|
142
231
|
}
|
|
143
|
-
var
|
|
232
|
+
var nt = (e, t, r = !0) => {
|
|
144
233
|
const s = [];
|
|
145
234
|
(r && e["s-sr"] || !e["s-sr"]) && s.push(e);
|
|
146
235
|
let n = e;
|
|
147
236
|
for (; n = n.nextSibling; )
|
|
148
|
-
|
|
237
|
+
ie(n) === t && (r || !n["s-sr"]) && s.push(n);
|
|
149
238
|
return s;
|
|
150
|
-
},
|
|
151
|
-
function
|
|
239
|
+
}, ge = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", ie = (e) => typeof e["s-sn"] == "string" ? e["s-sn"] : e.nodeType === 1 && e.getAttribute("slot") || void 0;
|
|
240
|
+
function it(e) {
|
|
152
241
|
if (e.assignedElements || e.assignedNodes || !e["s-sr"]) return;
|
|
153
242
|
const t = (r) => (function(s) {
|
|
154
243
|
const n = [], i = this["s-sn"];
|
|
@@ -158,32 +247,32 @@ function Ge(e) {
|
|
|
158
247
|
If you have a particular use case, please open an issue on the Stencil repo.
|
|
159
248
|
`);
|
|
160
249
|
const o = this["s-cr"].parentElement;
|
|
161
|
-
return (o.__childNodes ? o.childNodes :
|
|
162
|
-
i ===
|
|
250
|
+
return (o.__childNodes ? o.childNodes : st(o.childNodes)).forEach((c) => {
|
|
251
|
+
i === ie(c) && n.push(c);
|
|
163
252
|
}), r ? n.filter(
|
|
164
|
-
(
|
|
253
|
+
(c) => c.nodeType === 1
|
|
165
254
|
/* ElementNode */
|
|
166
255
|
) : n;
|
|
167
256
|
}).bind(e);
|
|
168
257
|
e.assignedElements = t(!0), e.assignedNodes = t(!1);
|
|
169
258
|
}
|
|
170
|
-
function
|
|
259
|
+
function $e(e, t) {
|
|
171
260
|
if ("__" + t in e) {
|
|
172
261
|
const r = e["__" + t];
|
|
173
262
|
return typeof r != "function" ? r : r.bind(e);
|
|
174
263
|
} else
|
|
175
264
|
return typeof e[t] != "function" ? e[t] : e[t].bind(e);
|
|
176
265
|
}
|
|
177
|
-
var
|
|
266
|
+
var ot = (e, t, ...r) => {
|
|
178
267
|
let s = null, n = null, i = null, o = !1, f = !1;
|
|
179
|
-
const
|
|
180
|
-
for (let
|
|
181
|
-
s = a[
|
|
268
|
+
const c = [], l = (a) => {
|
|
269
|
+
for (let g = 0; g < a.length; g++)
|
|
270
|
+
s = a[g], Array.isArray(s) ? l(s) : s != null && typeof s != "boolean" && ((o = !we(s)) && (s = String(s)), o && f ? c[c.length - 1].$text$ += s : c.push(o ? V(null, s) : s), f = o);
|
|
182
271
|
};
|
|
183
|
-
|
|
184
|
-
const
|
|
185
|
-
return
|
|
186
|
-
},
|
|
272
|
+
l(r);
|
|
273
|
+
const p = V(e, null);
|
|
274
|
+
return p.$attrs$ = t, c.length > 0 && (p.$children$ = c), p.$key$ = n, p.$name$ = i, p;
|
|
275
|
+
}, V = (e, t) => {
|
|
187
276
|
const r = {
|
|
188
277
|
$flags$: 0,
|
|
189
278
|
$tag$: e,
|
|
@@ -192,29 +281,29 @@ var We = (e, t, ...r) => {
|
|
|
192
281
|
$children$: null
|
|
193
282
|
};
|
|
194
283
|
return r.$attrs$ = null, r.$key$ = null, r.$name$ = null, r;
|
|
195
|
-
},
|
|
284
|
+
}, at = {}, lt = (e) => e && e.$tag$ === at, de = (e, t, r, s, n, i, o) => {
|
|
196
285
|
if (r === s)
|
|
197
286
|
return;
|
|
198
|
-
let f =
|
|
287
|
+
let f = ue(e, t), c = t.toLowerCase();
|
|
199
288
|
if (t === "class") {
|
|
200
|
-
const
|
|
201
|
-
let a =
|
|
202
|
-
|
|
289
|
+
const l = e.classList, p = he(r);
|
|
290
|
+
let a = he(s);
|
|
291
|
+
l.remove(...p.filter((g) => g && !a.includes(g))), l.add(...a.filter((g) => g && !p.includes(g)));
|
|
203
292
|
} else if (t === "style") {
|
|
204
|
-
for (const
|
|
205
|
-
(!s || s[
|
|
206
|
-
for (const
|
|
207
|
-
(!r || s[
|
|
293
|
+
for (const l in r)
|
|
294
|
+
(!s || s[l] == null) && (l.includes("-") ? e.style.removeProperty(l) : e.style[l] = "");
|
|
295
|
+
for (const l in s)
|
|
296
|
+
(!r || s[l] !== r[l]) && (l.includes("-") ? e.style.setProperty(l, s[l]) : e.style[l] = s[l]);
|
|
208
297
|
} else if (t !== "key") if (t === "ref")
|
|
209
298
|
s && s(e);
|
|
210
299
|
else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
|
|
211
|
-
if (t[2] === "-" ? t = t.slice(3) :
|
|
212
|
-
const
|
|
213
|
-
t = t.replace(
|
|
300
|
+
if (t[2] === "-" ? t = t.slice(3) : ue(A, c) ? t = c.slice(2) : t = c[2] + t.slice(3), r || s) {
|
|
301
|
+
const l = t.endsWith(Se);
|
|
302
|
+
t = t.replace(ft, ""), r && z.rel(e, t, r, l), s && z.ael(e, t, s, l);
|
|
214
303
|
}
|
|
215
304
|
} else {
|
|
216
|
-
const
|
|
217
|
-
if ((f ||
|
|
305
|
+
const l = we(s);
|
|
306
|
+
if ((f || l && s !== null) && !n)
|
|
218
307
|
try {
|
|
219
308
|
if (e.tagName.includes("-"))
|
|
220
309
|
e[t] !== s && (e[t] = s);
|
|
@@ -224,13 +313,13 @@ var We = (e, t, ...r) => {
|
|
|
224
313
|
}
|
|
225
314
|
} catch {
|
|
226
315
|
}
|
|
227
|
-
let
|
|
228
|
-
|
|
316
|
+
let p = !1;
|
|
317
|
+
c !== (c = c.replace(/^xlink\:?/, "")) && (t = c, p = !0), s == null || s === !1 ? (s !== !1 || e.getAttribute(t) === "") && (p ? e.removeAttributeNS(pe, t) : e.removeAttribute(t)) : (!f || i & 4 || n) && !l && e.nodeType === 1 && (s = s === !0 ? "" : s, p ? e.setAttributeNS(pe, t, s) : e.setAttribute(t, s));
|
|
229
318
|
}
|
|
230
|
-
},
|
|
319
|
+
}, ct = /\s/, he = (e) => (typeof e == "object" && e && "baseVal" in e && (e = e.baseVal), !e || typeof e != "string" ? [] : e.split(ct)), Se = "Capture", ft = new RegExp(Se + "$"), ee = (e, t, r, s) => {
|
|
231
320
|
const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = e && e.$attrs$ || {}, o = t.$attrs$ || {};
|
|
232
|
-
for (const f of
|
|
233
|
-
f in o ||
|
|
321
|
+
for (const f of ye(Object.keys(i)))
|
|
322
|
+
f in o || de(
|
|
234
323
|
n,
|
|
235
324
|
f,
|
|
236
325
|
i[f],
|
|
@@ -238,8 +327,8 @@ var We = (e, t, ...r) => {
|
|
|
238
327
|
r,
|
|
239
328
|
t.$flags$
|
|
240
329
|
);
|
|
241
|
-
for (const f of
|
|
242
|
-
|
|
330
|
+
for (const f of ye(Object.keys(o)))
|
|
331
|
+
de(
|
|
243
332
|
n,
|
|
244
333
|
f,
|
|
245
334
|
i[f],
|
|
@@ -248,7 +337,7 @@ var We = (e, t, ...r) => {
|
|
|
248
337
|
t.$flags$
|
|
249
338
|
);
|
|
250
339
|
};
|
|
251
|
-
function
|
|
340
|
+
function ye(e) {
|
|
252
341
|
return e.includes("ref") ? (
|
|
253
342
|
// we need to sort these to ensure that `'ref'` is the last attr
|
|
254
343
|
[...e.filter((t) => t !== "ref"), "ref"]
|
|
@@ -257,11 +346,11 @@ function ue(e) {
|
|
|
257
346
|
e
|
|
258
347
|
);
|
|
259
348
|
}
|
|
260
|
-
var
|
|
349
|
+
var Z, q, L, te = !1, B = !1, oe = !1, b = !1, G = (e, t, r) => {
|
|
261
350
|
var s;
|
|
262
351
|
const n = t.$children$[r];
|
|
263
|
-
let i = 0, o, f,
|
|
264
|
-
if (
|
|
352
|
+
let i = 0, o, f, c;
|
|
353
|
+
if (te || (oe = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
|
|
265
354
|
// slot element has fallback content
|
|
266
355
|
// still create an element that "mocks" the slot element
|
|
267
356
|
2
|
|
@@ -271,91 +360,91 @@ var F, C, j, Y = !1, U = !1, te = !1, b = !1, D = (e, t, r) => {
|
|
|
271
360
|
// where actual slot content should sit next to
|
|
272
361
|
1
|
|
273
362
|
))), n.$text$ !== null)
|
|
274
|
-
o = n.$elm$ =
|
|
363
|
+
o = n.$elm$ = A.document.createTextNode(n.$text$);
|
|
275
364
|
else if (n.$flags$ & 1)
|
|
276
|
-
o = n.$elm$ =
|
|
365
|
+
o = n.$elm$ = A.document.createTextNode(""), ee(null, n, b);
|
|
277
366
|
else {
|
|
278
|
-
if (b || (b = n.$tag$ === "svg"), !
|
|
367
|
+
if (b || (b = n.$tag$ === "svg"), !A.document)
|
|
279
368
|
throw new Error(
|
|
280
369
|
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
281
370
|
);
|
|
282
|
-
if (o = n.$elm$ =
|
|
283
|
-
b ?
|
|
284
|
-
!
|
|
285
|
-
), b && n.$tag$ === "foreignObject" && (b = !1),
|
|
371
|
+
if (o = n.$elm$ = A.document.createElementNS(
|
|
372
|
+
b ? Ke : Ye,
|
|
373
|
+
!te && K.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
|
|
374
|
+
), b && n.$tag$ === "foreignObject" && (b = !1), ee(null, n, b), Qe(Z) && o["s-si"] !== Z && o.classList.add(o["s-si"] = Z), n.$children$)
|
|
286
375
|
for (i = 0; i < n.$children$.length; ++i)
|
|
287
|
-
f =
|
|
376
|
+
f = G(e, n, i), f && o.appendChild(f);
|
|
288
377
|
n.$tag$ === "svg" ? b = !1 : o.tagName === "foreignObject" && (b = !0);
|
|
289
378
|
}
|
|
290
|
-
return o["s-hn"] =
|
|
291
|
-
},
|
|
292
|
-
|
|
379
|
+
return o["s-hn"] = L, n.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = q, o["s-sn"] = n.$name$ || "", o["s-rf"] = (s = n.$attrs$) == null ? void 0 : s.ref, it(o), c = e && e.$children$ && e.$children$[r], c && c.$tag$ === n.$tag$ && e.$elm$ && M(e.$elm$, !1), ke(q, o, t.$elm$, e == null ? void 0 : e.$elm$)), o;
|
|
380
|
+
}, M = (e, t) => {
|
|
381
|
+
z.$flags$ |= 1;
|
|
293
382
|
const r = Array.from(e.__childNodes || e.childNodes);
|
|
294
|
-
e["s-sr"] &&
|
|
383
|
+
e["s-sr"] && K.experimentalSlotFixes;
|
|
295
384
|
for (let s = r.length - 1; s >= 0; s--) {
|
|
296
385
|
const n = r[s];
|
|
297
|
-
n["s-hn"] !==
|
|
386
|
+
n["s-hn"] !== L && n["s-ol"] && (T(F(n).parentNode, n, F(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, oe = !0), t && M(n, t);
|
|
298
387
|
}
|
|
299
|
-
|
|
300
|
-
},
|
|
388
|
+
z.$flags$ &= -2;
|
|
389
|
+
}, Oe = (e, t, r, s, n, i) => {
|
|
301
390
|
let o = e["s-cr"] && e["s-cr"].parentNode || e, f;
|
|
302
|
-
for (o.shadowRoot && o.tagName ===
|
|
303
|
-
s[n] && (f =
|
|
304
|
-
},
|
|
391
|
+
for (o.shadowRoot && o.tagName === L && (o = o.shadowRoot); n <= i; ++n)
|
|
392
|
+
s[n] && (f = G(null, r, n), f && (s[n].$elm$ = f, T(o, f, F(t))));
|
|
393
|
+
}, Ae = (e, t, r) => {
|
|
305
394
|
for (let s = t; s <= r; ++s) {
|
|
306
395
|
const n = e[s];
|
|
307
396
|
if (n) {
|
|
308
397
|
const i = n.$elm$;
|
|
309
|
-
|
|
398
|
+
Te(n), i && (B = !0, i["s-ol"] ? i["s-ol"].remove() : M(i, !0), i.remove());
|
|
310
399
|
}
|
|
311
400
|
}
|
|
312
|
-
},
|
|
313
|
-
let i = 0, o = 0, f = 0,
|
|
314
|
-
for (; i <=
|
|
315
|
-
if (
|
|
316
|
-
|
|
401
|
+
}, ut = (e, t, r, s, n = !1) => {
|
|
402
|
+
let i = 0, o = 0, f = 0, c = 0, l = t.length - 1, p = t[0], a = t[l], g = s.length - 1, u = s[0], $ = s[g], _, w;
|
|
403
|
+
for (; i <= l && o <= g; )
|
|
404
|
+
if (p == null)
|
|
405
|
+
p = t[++i];
|
|
317
406
|
else if (a == null)
|
|
318
|
-
a = t[--
|
|
407
|
+
a = t[--l];
|
|
319
408
|
else if (u == null)
|
|
320
409
|
u = s[++o];
|
|
321
410
|
else if ($ == null)
|
|
322
|
-
$ = s[--
|
|
323
|
-
else if (
|
|
324
|
-
|
|
325
|
-
else if (
|
|
326
|
-
|
|
327
|
-
else if (
|
|
328
|
-
(
|
|
329
|
-
else if (
|
|
330
|
-
(
|
|
411
|
+
$ = s[--g];
|
|
412
|
+
else if (W(p, u, n))
|
|
413
|
+
R(p, u, n), p = t[++i], u = s[++o];
|
|
414
|
+
else if (W(a, $, n))
|
|
415
|
+
R(a, $, n), a = t[--l], $ = s[--g];
|
|
416
|
+
else if (W(p, $, n))
|
|
417
|
+
(p.$tag$ === "slot" || $.$tag$ === "slot") && M(p.$elm$.parentNode, !1), R(p, $, n), T(e, p.$elm$, a.$elm$.nextSibling), p = t[++i], $ = s[--g];
|
|
418
|
+
else if (W(a, u, n))
|
|
419
|
+
(p.$tag$ === "slot" || $.$tag$ === "slot") && M(a.$elm$.parentNode, !1), R(a, u, n), T(e, a.$elm$, p.$elm$), a = t[--l], u = s[++o];
|
|
331
420
|
else {
|
|
332
|
-
for (f = -1,
|
|
333
|
-
if (t[
|
|
334
|
-
f =
|
|
421
|
+
for (f = -1, c = i; c <= l; ++c)
|
|
422
|
+
if (t[c] && t[c].$key$ !== null && t[c].$key$ === u.$key$) {
|
|
423
|
+
f = c;
|
|
335
424
|
break;
|
|
336
425
|
}
|
|
337
|
-
f >= 0 ? (
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
426
|
+
f >= 0 ? (w = t[f], w.$tag$ !== u.$tag$ ? _ = G(t && t[o], r, f) : (R(w, u, n), t[f] = void 0, _ = w.$elm$), u = s[++o]) : (_ = G(t && t[o], r, o), u = s[++o]), _ && T(
|
|
427
|
+
F(p.$elm$).parentNode,
|
|
428
|
+
_,
|
|
429
|
+
F(p.$elm$)
|
|
341
430
|
);
|
|
342
431
|
}
|
|
343
|
-
i >
|
|
432
|
+
i > l ? Oe(
|
|
344
433
|
e,
|
|
345
|
-
s[
|
|
434
|
+
s[g + 1] == null ? null : s[g + 1].$elm$,
|
|
346
435
|
r,
|
|
347
436
|
s,
|
|
348
437
|
o,
|
|
349
|
-
|
|
350
|
-
) : o >
|
|
351
|
-
},
|
|
438
|
+
g
|
|
439
|
+
) : o > g && Ae(t, i, l);
|
|
440
|
+
}, W = (e, t, r = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : r ? (r && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, F = (e) => e && e["s-ol"] || e, R = (e, t, r = !1) => {
|
|
352
441
|
const s = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$, f = t.$text$;
|
|
353
|
-
let
|
|
354
|
-
f === null ? (b = o === "svg" ? !0 : o === "foreignObject" ? !1 : b,
|
|
442
|
+
let c;
|
|
443
|
+
f === null ? (b = o === "svg" ? !0 : o === "foreignObject" ? !1 : b, ee(e, t, b), n !== null && i !== null ? ut(s, n, t, i, r) : i !== null ? (e.$text$ !== null && (s.textContent = ""), Oe(s, null, t, i, 0, i.length - 1)) : (
|
|
355
444
|
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
356
|
-
!r &&
|
|
357
|
-
), b && o === "svg" && (b = !1)) : (
|
|
358
|
-
},
|
|
445
|
+
!r && K.updatable && n !== null && Ae(n, 0, n.length - 1)
|
|
446
|
+
), b && o === "svg" && (b = !1)) : (c = s["s-cr"]) ? c.parentNode.textContent = f : e.$text$ !== f && (s.data = f);
|
|
447
|
+
}, x = [], je = (e) => {
|
|
359
448
|
let t, r, s;
|
|
360
449
|
const n = e.__childNodes || e.childNodes;
|
|
361
450
|
for (const i of n) {
|
|
@@ -364,104 +453,105 @@ var F, C, j, Y = !1, U = !1, te = !1, b = !1, D = (e, t, r) => {
|
|
|
364
453
|
const o = i["s-sn"];
|
|
365
454
|
for (s = r.length - 1; s >= 0; s--)
|
|
366
455
|
if (t = r[s], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== i["s-hn"])
|
|
367
|
-
if (
|
|
368
|
-
let f =
|
|
369
|
-
|
|
456
|
+
if (ge(t, o)) {
|
|
457
|
+
let f = x.find((c) => c.$nodeToRelocate$ === t);
|
|
458
|
+
B = !0, t["s-sn"] = t["s-sn"] || o, f ? (f.$nodeToRelocate$["s-sh"] = i["s-hn"], f.$slotRefNode$ = i) : (t["s-sh"] = i["s-hn"], x.push({
|
|
370
459
|
$slotRefNode$: i,
|
|
371
460
|
$nodeToRelocate$: t
|
|
372
|
-
})), t["s-sr"] &&
|
|
373
|
-
|
|
461
|
+
})), t["s-sr"] && x.map((c) => {
|
|
462
|
+
ge(c.$nodeToRelocate$, t["s-sn"]) && (f = x.find((l) => l.$nodeToRelocate$ === t), f && !c.$slotRefNode$ && (c.$slotRefNode$ = f.$slotRefNode$));
|
|
374
463
|
});
|
|
375
|
-
} else
|
|
464
|
+
} else x.some((f) => f.$nodeToRelocate$ === t) || x.push({
|
|
376
465
|
$nodeToRelocate$: t
|
|
377
466
|
});
|
|
378
467
|
}
|
|
379
|
-
i.nodeType === 1 &&
|
|
468
|
+
i.nodeType === 1 && je(i);
|
|
380
469
|
}
|
|
381
|
-
},
|
|
382
|
-
e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(
|
|
383
|
-
},
|
|
384
|
-
function
|
|
470
|
+
}, Te = (e) => {
|
|
471
|
+
e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(Te);
|
|
472
|
+
}, T = (e, t, r) => (typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"] && ke(t["s-cr"], t, e, t.parentElement), e == null ? void 0 : e.insertBefore(t, r));
|
|
473
|
+
function ke(e, t, r, s) {
|
|
385
474
|
var n, i;
|
|
386
475
|
let o;
|
|
387
476
|
if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (o = t["s-si"] || e.parentNode["s-sc"])) {
|
|
388
|
-
const f = t["s-sn"],
|
|
477
|
+
const f = t["s-sn"], c = t["s-hn"];
|
|
389
478
|
if ((n = r.classList) == null || n.add(o + "-s"), s && ((i = s.classList) != null && i.contains(o + "-s"))) {
|
|
390
|
-
let
|
|
391
|
-
for (;
|
|
392
|
-
if (
|
|
393
|
-
|
|
479
|
+
let l = (s.__childNodes || s.childNodes)[0], p = !1;
|
|
480
|
+
for (; l; ) {
|
|
481
|
+
if (l["s-sn"] !== f && l["s-hn"] === c && l["s-sr"]) {
|
|
482
|
+
p = !0;
|
|
394
483
|
break;
|
|
395
484
|
}
|
|
396
|
-
|
|
485
|
+
l = l.nextSibling;
|
|
397
486
|
}
|
|
398
|
-
|
|
487
|
+
p || s.classList.remove(o + "-s");
|
|
399
488
|
}
|
|
400
489
|
}
|
|
401
490
|
}
|
|
402
|
-
var
|
|
491
|
+
var pt = (e, t, r = !1) => {
|
|
403
492
|
var s, n, i, o, f;
|
|
404
|
-
const
|
|
405
|
-
if (
|
|
406
|
-
([
|
|
493
|
+
const c = e.$hostElement$, l = e.$cmpMeta$, p = e.$vnode$ || V(null, null), a = lt(t) ? t : ot(null, null, t);
|
|
494
|
+
if (L = c.tagName, l.$attrsToReflect$ && (a.$attrs$ = a.$attrs$ || {}, l.$attrsToReflect$.map(
|
|
495
|
+
([g, u]) => a.$attrs$[u] = c[g]
|
|
407
496
|
)), r && a.$attrs$)
|
|
408
|
-
for (const
|
|
409
|
-
|
|
410
|
-
a.$tag$ = null, a.$flags$ |= 4, e.$vnode$ = a, a.$elm$ =
|
|
497
|
+
for (const g of Object.keys(a.$attrs$))
|
|
498
|
+
c.hasAttribute(g) && !["key", "ref", "style", "class"].includes(g) && (a.$attrs$[g] = c[g]);
|
|
499
|
+
a.$tag$ = null, a.$flags$ |= 4, e.$vnode$ = a, a.$elm$ = p.$elm$ = c.shadowRoot || c, Z = c["s-sc"], te = !!(l.$flags$ & 1) && !(l.$flags$ & 128), q = c["s-cr"], B = !1, R(p, a, r);
|
|
411
500
|
{
|
|
412
|
-
if (
|
|
413
|
-
|
|
414
|
-
for (const
|
|
415
|
-
const u =
|
|
416
|
-
if (!u["s-ol"] &&
|
|
417
|
-
const $ =
|
|
418
|
-
$["s-nr"] = u,
|
|
501
|
+
if (z.$flags$ |= 1, oe) {
|
|
502
|
+
je(a.$elm$);
|
|
503
|
+
for (const g of x) {
|
|
504
|
+
const u = g.$nodeToRelocate$;
|
|
505
|
+
if (!u["s-ol"] && A.document) {
|
|
506
|
+
const $ = A.document.createTextNode("");
|
|
507
|
+
$["s-nr"] = u, T(u.parentNode, u["s-ol"] = $, u);
|
|
419
508
|
}
|
|
420
509
|
}
|
|
421
|
-
for (const
|
|
422
|
-
const u =
|
|
510
|
+
for (const g of x) {
|
|
511
|
+
const u = g.$nodeToRelocate$, $ = g.$slotRefNode$;
|
|
423
512
|
if ($) {
|
|
424
|
-
const
|
|
425
|
-
let
|
|
513
|
+
const _ = $.parentNode;
|
|
514
|
+
let w = $.nextSibling;
|
|
426
515
|
{
|
|
427
|
-
let
|
|
428
|
-
for (;
|
|
429
|
-
let
|
|
430
|
-
if (
|
|
431
|
-
for (
|
|
432
|
-
|
|
433
|
-
if (!
|
|
434
|
-
|
|
516
|
+
let y = (s = u["s-ol"]) == null ? void 0 : s.previousSibling;
|
|
517
|
+
for (; y; ) {
|
|
518
|
+
let h = (n = y["s-nr"]) != null ? n : null;
|
|
519
|
+
if (h && h["s-sn"] === u["s-sn"] && _ === (h.__parentNode || h.parentNode)) {
|
|
520
|
+
for (h = h.nextSibling; h === u || h != null && h["s-sr"]; )
|
|
521
|
+
h = h == null ? void 0 : h.nextSibling;
|
|
522
|
+
if (!h || !h["s-nr"]) {
|
|
523
|
+
w = h;
|
|
435
524
|
break;
|
|
436
525
|
}
|
|
437
526
|
}
|
|
438
|
-
|
|
527
|
+
y = y.previousSibling;
|
|
439
528
|
}
|
|
440
529
|
}
|
|
441
|
-
const
|
|
442
|
-
(!
|
|
530
|
+
const P = u.__parentNode || u.parentNode, S = u.__nextSibling || u.nextSibling;
|
|
531
|
+
(!w && _ !== P || S !== w) && u !== w && (!u["s-hn"] && u["s-ol"] && (u["s-hn"] = u["s-ol"].parentNode.nodeName), T(_, u, w), u.nodeType === 1 && u.tagName !== "SLOT-FB" && (u.hidden = (i = u["s-ih"]) != null ? i : !1)), u && typeof $["s-rf"] == "function" && $["s-rf"]($);
|
|
443
532
|
} else
|
|
444
533
|
u.nodeType === 1 && (r && (u["s-ih"] = (o = u.hidden) != null ? o : !1), u.hidden = !0);
|
|
445
534
|
}
|
|
446
535
|
}
|
|
447
|
-
|
|
536
|
+
B && xe(a.$elm$), z.$flags$ &= -2, x.length = 0;
|
|
448
537
|
}
|
|
449
|
-
if (
|
|
450
|
-
const
|
|
451
|
-
for (const u of
|
|
452
|
-
u["s-hn"] !==
|
|
538
|
+
if (K.experimentalScopedSlotChanges && l.$flags$ & 2) {
|
|
539
|
+
const g = a.$elm$.__childNodes || a.$elm$.childNodes;
|
|
540
|
+
for (const u of g)
|
|
541
|
+
u["s-hn"] !== L && !u["s-sh"] && (r && u["s-ih"] == null && (u["s-ih"] = (f = u.hidden) != null ? f : !1), u.hidden = !0);
|
|
453
542
|
}
|
|
454
|
-
|
|
543
|
+
q = void 0;
|
|
455
544
|
};
|
|
456
|
-
const
|
|
545
|
+
const D = {
|
|
546
|
+
content_wrap: 0,
|
|
457
547
|
ignore: [],
|
|
458
548
|
ignore_with: "_!i-£___£%_",
|
|
459
549
|
strict: !1,
|
|
460
550
|
tab_size: 2,
|
|
461
|
-
tag_wrap:
|
|
551
|
+
tag_wrap: 0,
|
|
462
552
|
tag_wrap_width: 80,
|
|
463
553
|
trim: []
|
|
464
|
-
},
|
|
554
|
+
}, E = "__!i-£___£%__", m = "!i-£___£%_", Re = [
|
|
465
555
|
"area",
|
|
466
556
|
"base",
|
|
467
557
|
"br",
|
|
@@ -476,7 +566,7 @@ const K = {
|
|
|
476
566
|
"source",
|
|
477
567
|
"track",
|
|
478
568
|
"wbr"
|
|
479
|
-
],
|
|
569
|
+
], ae = (e) => /<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(e) || /<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e) || /<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e), Ne = (e, t) => {
|
|
480
570
|
if (!e || !t)
|
|
481
571
|
throw new Error("Both 'current' and 'updates' must be passed-in to mergeObjects()");
|
|
482
572
|
let r;
|
|
@@ -485,40 +575,50 @@ const K = {
|
|
|
485
575
|
else if (typeof e == "object") {
|
|
486
576
|
r = { ...e };
|
|
487
577
|
for (let s of Object.keys(t))
|
|
488
|
-
typeof t[s] != "object" ? r[s] = t[s] : r[s] =
|
|
578
|
+
typeof t[s] != "object" ? r[s] = t[s] : r[s] = Ne(r[s] || {}, t[s]);
|
|
489
579
|
}
|
|
490
580
|
return r;
|
|
491
|
-
},
|
|
581
|
+
}, gt = (e, t) => Ne(structuredClone(e), t), $t = (e) => (e = e.replace(/<[\w:\-]+([^>]*[^\/])>/g, (t, r) => t.replace(r, (s) => s.replace(/\n/g, m + "nl!").replace(/\r/g, m + "cr!").replace(/\s/g, m + "ws!"))), e), dt = (e) => e.replace(/\n/g, E + "nl!").replace(/\r/g, E + "cr!").replace(/\s/g, E + "ws!"), ht = (e) => {
|
|
582
|
+
const t = /\s*<([a-zA-Z0-9:-]+)[^>]*>\n\s*<\/\1>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n)|<([a-zA-Z0-9:-]+)[^>]*>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n\s*)<\/\3>/g;
|
|
583
|
+
return e.replace(t, (r, s, n, i, o) => {
|
|
584
|
+
const f = n || o;
|
|
585
|
+
if (!f)
|
|
586
|
+
return r;
|
|
587
|
+
const c = f.replace(/\n/g, E + "nl!").replace(/\r/g, E + "cr!").replace(/\s/g, E + "ws!");
|
|
588
|
+
return r.replace(f, c);
|
|
589
|
+
});
|
|
590
|
+
}, yt = (e) => {
|
|
492
591
|
const t = /<([A-Za-z][A-Za-z0-9]*|[a-z][a-z0-9._]*-[a-z0-9._-]+)((?:\s+[A-Za-z0-9_-]+="[^"]*"|\s*[a-z]*)*)>/g;
|
|
493
|
-
return e = e.replace(t, (r, s, n) => r.replace(n, (i) => i.replace(/</g,
|
|
494
|
-
},
|
|
592
|
+
return e = e.replace(t, (r, s, n) => r.replace(n, (i) => i.replace(/</g, m + "lt!").replace(/>/g, m + "gt!"))), e;
|
|
593
|
+
}, _t = (e, t) => {
|
|
495
594
|
const r = t.ignore, s = t.ignore_with;
|
|
496
595
|
for (let n = 0; n < r.length; n++) {
|
|
497
596
|
const i = new RegExp(`<${r[n]}[^>]*>((.|
|
|
498
597
|
)*?)</${r[n]}>`, "g");
|
|
499
|
-
e = e.replace(i, (o, f) => o.replace(f, (
|
|
598
|
+
e = e.replace(i, (o, f) => o.replace(f, (c) => c.replace(/</g, "-" + s + "lt-").replace(/>/g, "-" + s + "gt-").replace(/\n/g, "-" + s + "nl-").replace(/\r/g, "-" + s + "cr-").replace(/\s/g, "-" + s + "ws-")));
|
|
500
599
|
}
|
|
501
600
|
return e;
|
|
502
|
-
},
|
|
601
|
+
}, bt = (e, t) => {
|
|
503
602
|
for (let r = 0; r < t.length; r++) {
|
|
504
603
|
const s = new RegExp(`(<${t[r]}[^>]*>)\\s+`, "g"), n = new RegExp(`\\s+(</${t[r]}>)`, "g");
|
|
505
604
|
e = e.replace(s, "$1").replace(n, "$1");
|
|
506
605
|
}
|
|
507
606
|
return e;
|
|
508
|
-
},
|
|
509
|
-
`).replace(new RegExp(
|
|
607
|
+
}, vt = (e) => (e = e.replace(/<[\w:\-]+([^>]*[^\/])>/g, (t, r) => t.replace(r, (s) => s.replace(new RegExp(m + "nl!", "g"), `
|
|
608
|
+
`).replace(new RegExp(m + "cr!", "g"), "\r").replace(new RegExp(m + "ws!", "g"), " "))), e), wt = (e) => (e = e.replace(/.*__!i-£___£%__[a-z]{2}!.*/g, (t) => t.replace(/__!i-£___£%__[a-z]{2}!/g, (r) => r.replace(new RegExp(E + "nl!", "g"), `
|
|
609
|
+
`).replace(new RegExp(E + "cr!", "g"), "\r").replace(new RegExp(E + "ws!", "g"), " "))), e), mt = (e) => (e = e.replace(/<[\w:\-]+([^>]*)>/g, (t, r) => t.replace(r, (s) => s.replace(new RegExp(m + "lt!", "g"), "<").replace(new RegExp(m + "gt!", "g"), ">"))), e), xt = (e, t) => {
|
|
510
610
|
const r = t.ignore, s = t.ignore_with;
|
|
511
611
|
for (let n = 0; n < r.length; n++) {
|
|
512
612
|
const i = new RegExp(`<${r[n]}[^>]*>((.|
|
|
513
613
|
)*?)</${r[n]}>`, "g");
|
|
514
|
-
e = e.replace(i, (o, f) => o.replace(f, (
|
|
614
|
+
e = e.replace(i, (o, f) => o.replace(f, (c) => c.replace(new RegExp("-" + s + "lt-", "g"), "<").replace(new RegExp("-" + s + "gt-", "g"), ">").replace(new RegExp("-" + s + "nl-", "g"), `
|
|
515
615
|
`).replace(new RegExp("-" + s + "cr-", "g"), "\r").replace(new RegExp("-" + s + "ws-", "g"), " ")));
|
|
516
616
|
}
|
|
517
617
|
return e;
|
|
518
|
-
},
|
|
618
|
+
}, Et = (e) => {
|
|
519
619
|
var s, n;
|
|
520
620
|
if (typeof e != "object") throw new Error("Config must be an object.");
|
|
521
|
-
if (!(Object.hasOwn(e, "ignore") || Object.hasOwn(e, "ignore_with") || Object.hasOwn(e, "strict") || Object.hasOwn(e, "tab_size") || Object.hasOwn(e, "tag_wrap") || Object.hasOwn(e, "tag_wrap_width") || Object.hasOwn(e, "trim"))) return
|
|
621
|
+
if (!(Object.hasOwn(e, "content_wrap") || Object.hasOwn(e, "ignore") || Object.hasOwn(e, "ignore_with") || Object.hasOwn(e, "strict") || Object.hasOwn(e, "tab_size") || Object.hasOwn(e, "tag_wrap") || Object.hasOwn(e, "tag_wrap_width") || Object.hasOwn(e, "trim"))) return D;
|
|
522
622
|
let r = e.tab_size;
|
|
523
623
|
if (r) {
|
|
524
624
|
if (typeof r != "number") throw new Error(`tab_size must be a number, not ${typeof e.tab_size}.`);
|
|
@@ -526,86 +626,120 @@ const K = {
|
|
|
526
626
|
if (r = Math.floor(r), r < 1 || r > 16) throw new Error("Tab size out of range. Expecting 1 to 16.");
|
|
527
627
|
e.tab_size = r;
|
|
528
628
|
}
|
|
629
|
+
if (Object.hasOwn(e, "content_wrap") && typeof e.content_wrap != "number")
|
|
630
|
+
throw new Error(`content_wrap config must be a number, not ${typeof e.tag_wrap_width}.`);
|
|
529
631
|
if (Object.hasOwn(e, "ignore") && (!Array.isArray(e.ignore) || !((s = e.ignore) != null && s.every((i) => typeof i == "string"))))
|
|
530
632
|
throw new Error("Ignore config must be an array of strings.");
|
|
531
633
|
if (Object.hasOwn(e, "ignore_with") && typeof e.ignore_with != "string")
|
|
532
634
|
throw new Error(`Ignore_with config must be a string, not ${typeof e.ignore_with}.`);
|
|
533
635
|
if (Object.hasOwn(e, "strict") && typeof e.strict != "boolean")
|
|
534
636
|
throw new Error(`Strict config must be a boolean, not ${typeof e.strict}.`);
|
|
535
|
-
if (Object.hasOwn(e, "tag_wrap") && typeof e.tag_wrap
|
|
536
|
-
throw new Error(`tag_wrap config must be a
|
|
537
|
-
if (Object.hasOwn(e, "tag_wrap_width") && typeof e.tag_wrap_width != "number")
|
|
637
|
+
if (Object.hasOwn(e, "tag_wrap") && typeof e.tag_wrap == "boolean" && (console.warn("tag_wrap as a boolean is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes."), e.tag_wrap_width ? e.tag_wrap = e.tag_wrap_width : e.tag_wrap = D.tag_wrap_width), Object.hasOwn(e, "tag_wrap") && typeof e.tag_wrap != "number")
|
|
638
|
+
throw new Error(`tag_wrap config must be a number, not ${typeof e.tag_wrap}.`);
|
|
639
|
+
if (Object.hasOwn(e, "tag_wrap_width") && console.warn("tag_wrap_width is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes."), Object.hasOwn(e, "tag_wrap_width") && typeof e.tag_wrap_width != "number")
|
|
538
640
|
throw new Error(`tag_wrap_width config must be a number, not ${typeof e.tag_wrap_width}.`);
|
|
539
641
|
if (Object.hasOwn(e, "trim") && (!Array.isArray(e.trim) || !((n = e.trim) != null && n.every((i) => typeof i == "string"))))
|
|
540
642
|
throw new Error("Trim config must be an array of strings.");
|
|
541
|
-
return
|
|
542
|
-
},
|
|
543
|
-
|
|
544
|
-
|
|
643
|
+
return gt(D, e);
|
|
644
|
+
}, St = (e, t, r) => {
|
|
645
|
+
const s = e.trim().split(/\s+/);
|
|
646
|
+
if (s.length === 0 || s.length === 1 && s[0] === "")
|
|
647
|
+
return "";
|
|
648
|
+
const n = [];
|
|
649
|
+
let i = "";
|
|
650
|
+
const o = r;
|
|
651
|
+
s.forEach((c) => {
|
|
652
|
+
if (c === "") return;
|
|
653
|
+
if (c.length >= t) {
|
|
654
|
+
i !== "" && n.push(n.length === 0 ? r + i : o + i), n.push(n.length === 0 ? r + c : o + c), i = "";
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
const l = i === "" ? c : i + " " + c;
|
|
658
|
+
l.length <= t ? i = l : (i !== "" && n.push(n.length === 0 ? r + i : o + i), i = c);
|
|
659
|
+
}), i !== "" && n.push(n.length === 0 ? r + i : o + i);
|
|
660
|
+
const f = n.join(`
|
|
661
|
+
`);
|
|
662
|
+
return dt(f);
|
|
663
|
+
}, Ot = (e, t = !0) => t && !ae(e) ? e : e.replace(/<([a-zA-Z\-0-9:]+)[^>]*>/g, (r, s) => Re.indexOf(s) > -1 ? `${r.substring(0, r.length - 1)} />`.replace(/\/\s\//g, "/") : r.replace(/[\s]?\/>/g, `></${s}>`)), At = (e, t = !1) => (e = e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g, (r, s) => r.replace(s, (n) => n.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\n/g, " ").replace(/\r/g, " ").replace(/\s/g, " "))), t && (e = e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g, (r, s) => (r = r.replace(s, (n) => n.replace(/\n|\t/g, "").replace(/[a-z]+="\s*"/ig, "").replace(/>\s+</g, "><").replace(/\s+/g, " ")), r = r.replace(/\s+/g, " ").replace(/\s>/g, ">").replace(/>\s/g, ">").replace(/\s</g, "<").replace(/class=["']\s/g, (n) => n.replace(/\s/g, "")).replace(/(class=.*)\s(["'])/g, "$1$2"), r))), e), jt = (e, t = !0) => (t && !ae(e) || (e = At(e), e = e.replace(/\n|\t/g, ""), e = e.replace(/>\s+</g, "><"), e = e.replace(/ {2,}/g, " "), e = e.replace(/ >/g, ">"), e = e.replace(/ </g, "<"), e = e.replace(/> /g, ">"), e = e.replace(/<\s*\//g, "</"), e = e.replace(/ = /g, "="), e = e.replace(
|
|
664
|
+
/([a-zA-Z0-9_-]+)=(['"])(.*?)\2/g,
|
|
665
|
+
(r, s, n, i) => {
|
|
666
|
+
const o = i.trim();
|
|
667
|
+
return `${s}=${n}${o}${n}`;
|
|
668
|
+
}
|
|
669
|
+
), e = e.trim()), e);
|
|
670
|
+
let H, re;
|
|
671
|
+
const I = {
|
|
545
672
|
line: []
|
|
546
|
-
},
|
|
547
|
-
|
|
673
|
+
}, Tt = (e) => {
|
|
674
|
+
I.line = [];
|
|
548
675
|
let t = -1;
|
|
549
676
|
const r = /(<[^>]+>)|([^<]+)/g;
|
|
550
|
-
return e = e.replace(r, (s, n, i) => (n ?
|
|
677
|
+
return e = e.replace(r, (s, n, i) => (n ? I.line.push({ type: "tag", value: s }) : i && i.trim().length > 0 && I.line.push({ type: "text", value: s }), t++, `
|
|
551
678
|
[#-# : ${t} : ${s} : #-#]
|
|
552
679
|
`)), e;
|
|
553
|
-
},
|
|
554
|
-
const r = t.tab_size, s = t.tag_wrap, n = t.
|
|
680
|
+
}, kt = (e) => (e = Ot(e, !1), re.length > 0 && (e = bt(e, re)), e = jt(e, !1), e = Tt(e), e), Rt = (e, t) => {
|
|
681
|
+
const r = " ".repeat(t.tab_size), s = t.tag_wrap, n = t.content_wrap;
|
|
555
682
|
let i = "";
|
|
556
|
-
A
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
683
|
+
const o = [], f = /<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g, c = /\s{1}[A-Za-z-]+(?:=".*?")?/g;
|
|
684
|
+
I.line.forEach((p, a) => {
|
|
685
|
+
let g = p.value, u = 0;
|
|
686
|
+
const $ = I.line[a - 1], _ = ($ == null ? void 0 : $.value) ?? "";
|
|
687
|
+
i += "0", a === 0 && u++, g.trim().startsWith("</") && u++, _.trim().startsWith("<!doctype") && u++, _.trim().startsWith("<!--") && u++, _.trim().endsWith("/>") && u++, _.trim().startsWith("</") && u++, ($ == null ? void 0 : $.type) === "text" && u++;
|
|
688
|
+
const P = Math.max(0, i.length - u);
|
|
689
|
+
i = i.substring(0, P);
|
|
690
|
+
const S = r.repeat(P);
|
|
691
|
+
if (H && g.trim().startsWith("<!--"))
|
|
692
|
+
return;
|
|
693
|
+
let y = g;
|
|
694
|
+
if (p.type === "text" && n > 0 && y.length >= n)
|
|
695
|
+
y = St(y, n, S);
|
|
696
|
+
else if (s > 0 && y.length > s && f.test(y)) {
|
|
697
|
+
f.lastIndex = 0, c.lastIndex = 0;
|
|
698
|
+
const h = y.split(c).filter(Boolean);
|
|
699
|
+
if (h.length >= 2) {
|
|
700
|
+
const Le = y.matchAll(c), Me = S + r;
|
|
701
|
+
let Y = S + h[0] + `
|
|
569
702
|
`;
|
|
570
|
-
for (const
|
|
571
|
-
const
|
|
703
|
+
for (const We of Le) {
|
|
704
|
+
const Ze = We[0].trim();
|
|
705
|
+
Y += Me + Ze + `
|
|
572
706
|
`;
|
|
573
|
-
P += je;
|
|
574
707
|
}
|
|
575
|
-
const
|
|
576
|
-
|
|
577
|
-
);
|
|
578
|
-
return P += Te, P;
|
|
708
|
+
const le = h[0].match(/<([A-Za-z_:-]+)/), Fe = le ? le[1] : "", Ce = Re.includes(Fe), Pe = h[1].trim(), Ue = S + (H && Ce ? " " : "");
|
|
709
|
+
Y += Ue + Pe, y = Y;
|
|
579
710
|
} else
|
|
580
|
-
|
|
581
|
-
}
|
|
582
|
-
|
|
711
|
+
y = S + y;
|
|
712
|
+
} else
|
|
713
|
+
y = S + y;
|
|
714
|
+
o.push(y);
|
|
715
|
+
});
|
|
716
|
+
let l = o.join(`
|
|
717
|
+
`);
|
|
718
|
+
return s > 0 && (l = $t(l)), n > 0 && /\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n/.test(l) && (l = ht(l)), l = l.replace(
|
|
583
719
|
/<(?<Element>.+).*>[^<]*?[^><\/\s][^<]*?<\/{1}\k<Element>|<script[^>]*>\s+<\/script>|<(\w+)>\s+<\/(\w+)|<(?:([\w:\._-]+)|([\w:\._-]+)[^>]*[^\/])>\s+<\/([\w:\._-]+)>/g,
|
|
584
|
-
(
|
|
585
|
-
), s && (
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
const r = t ? lt(t) : K;
|
|
593
|
-
I = r.strict;
|
|
720
|
+
(p) => p.replace(/\n|\t|\s{2,}/g, "")
|
|
721
|
+
), n > 0 && (l = wt(l)), s > 0 && (l = vt(l)), H && (l = l.replace(/\s\/>|\/>/g, ">")), l.startsWith(`
|
|
722
|
+
`) && (l = l.substring(1)), l.endsWith(`
|
|
723
|
+
`) && (l = l.substring(0, l.length - 1)), l;
|
|
724
|
+
}, Nt = (e, t) => {
|
|
725
|
+
if (!ae(e)) return e;
|
|
726
|
+
const r = t ? Et(t) : D;
|
|
727
|
+
H = r.strict;
|
|
594
728
|
const s = r.ignore.length > 0;
|
|
595
|
-
return
|
|
596
|
-
},
|
|
729
|
+
return re = r.trim, s && (e = _t(e, r)), e = yt(e), e = kt(e), e = Rt(e, r), e = mt(e), s && (e = xt(e, r)), e;
|
|
730
|
+
}, zt = (e, t, r) => {
|
|
597
731
|
[null, void 0, "", !1].includes(r) || ["innerHTML", "style", ""].includes(t) || e.setAttribute(t, ["object", "function"].includes(typeof r) ? "⚠️ Property must be set through a script or a framework-specific syntax." : r);
|
|
598
|
-
},
|
|
732
|
+
}, ze = (e, t, r, s, n) => {
|
|
599
733
|
if (t && typeof t == "string") {
|
|
600
734
|
const i = document.createElement(t);
|
|
601
735
|
Object.keys(r || {}).forEach((o) => {
|
|
602
|
-
|
|
736
|
+
zt(i, o, r[o]);
|
|
603
737
|
}), s == null || s.forEach((o) => {
|
|
604
|
-
|
|
738
|
+
ze(i, o.$tag$, o.$attrs$, o.$children$, o.$text$);
|
|
605
739
|
}), r != null && r.innerHTML && (i.innerHTML = r.innerHTML), e.appendChild(i);
|
|
606
740
|
}
|
|
607
741
|
n && (e.innerHTML = n);
|
|
608
|
-
},
|
|
742
|
+
}, tr = (e, t, r = []) => {
|
|
609
743
|
const s = {};
|
|
610
744
|
if (typeof e != "object")
|
|
611
745
|
throw new Error("filterArgs - args isn't an object.");
|
|
@@ -615,11 +749,11 @@ const A = {
|
|
|
615
749
|
(!t || !Object.keys(t).includes(n) || t[n] !== i) && (s[o] = i);
|
|
616
750
|
}
|
|
617
751
|
return s;
|
|
618
|
-
},
|
|
752
|
+
}, rr = (e, t) => {
|
|
619
753
|
var s, n;
|
|
620
754
|
const r = document.getElementById("storybook-root");
|
|
621
755
|
if (r !== null)
|
|
622
|
-
return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((s = t.globals) == null ? void 0 : s.locale) || "en"),
|
|
756
|
+
return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((s = t.globals) == null ? void 0 : s.locale) || "en"), pt(
|
|
623
757
|
{
|
|
624
758
|
$cmpMeta$: {
|
|
625
759
|
$flags$: 0,
|
|
@@ -629,17 +763,20 @@ const A = {
|
|
|
629
763
|
},
|
|
630
764
|
e(t)
|
|
631
765
|
), r.children[r.children.length - 1];
|
|
632
|
-
},
|
|
766
|
+
}, sr = ({ $tag$: e, $attrs$: t, $children$: r, $text$: s }) => {
|
|
633
767
|
const n = document.createElement("div");
|
|
634
|
-
return
|
|
635
|
-
|
|
768
|
+
return ze(n, e, t, r, s), Nt(n.innerHTML, {
|
|
769
|
+
tag_wrap: 40,
|
|
770
|
+
content_wrap: 120
|
|
771
|
+
}).replace(/="true"/g, "");
|
|
772
|
+
}, J = (e, t) => {
|
|
636
773
|
if (!t)
|
|
637
774
|
return;
|
|
638
775
|
const r = t.split("/");
|
|
639
776
|
return `${e}${r.slice(2, r.length - 1).join("-")}--docs`;
|
|
640
777
|
};
|
|
641
|
-
var
|
|
642
|
-
class
|
|
778
|
+
var j, X;
|
|
779
|
+
class nr {
|
|
643
780
|
constructor(t) {
|
|
644
781
|
/**
|
|
645
782
|
* JsonDocs
|
|
@@ -650,14 +787,14 @@ class Ut {
|
|
|
650
787
|
* @param tagName - tag name we want to get the data from
|
|
651
788
|
* @returns component data
|
|
652
789
|
*/
|
|
653
|
-
|
|
790
|
+
k(this, j, (t) => this.jsonDoc.components.find((r) => r.tag === t));
|
|
654
791
|
/**
|
|
655
792
|
* Get the control for the given prop
|
|
656
793
|
* Based on https://storybook.js.org/docs/api/arg-types#controltype
|
|
657
794
|
* @param prop - prop to get control for
|
|
658
795
|
* @returns control type and options if applicable
|
|
659
796
|
*/
|
|
660
|
-
|
|
797
|
+
k(this, X, (t) => {
|
|
661
798
|
const r = t.type.replace(/"([^"]+)"/g, "$1").replace(/\s/g, "").replace(/\(.*?\)/g, (s) => s.replace(/\|/g, " OR ")).split("|").map((s) => s.trim().replace(/ OR /g, "|"));
|
|
662
799
|
return t.type === "string" ? { control: { type: "text" } } : t.type === "number" ? { control: { type: "number" } } : t.type === "boolean" ? { control: { type: "boolean" } } : t.type.startsWith("{") && t.type.endsWith("}") ? { control: { type: "object" } } : r.length > 1 ? r.includes("string") ? { control: { type: "text" } } : r.every((s) => s == null ? void 0 : s.includes("[]")) ? { control: { type: "object" } } : (r.unshift(void 0), { control: { type: "select" }, options: r }) : { control: { type: "object" } };
|
|
663
800
|
});
|
|
@@ -667,10 +804,10 @@ class Ut {
|
|
|
667
804
|
* @returns component arg types
|
|
668
805
|
*/
|
|
669
806
|
d(this, "extractArgTypes", (t) => {
|
|
670
|
-
const r =
|
|
671
|
-
const { control:
|
|
807
|
+
const r = v(this, j).call(this, t), s = r == null ? void 0 : r.props.reduce((p, a) => {
|
|
808
|
+
const { control: g, options: u } = v(this, X).call(this, a);
|
|
672
809
|
return {
|
|
673
|
-
...
|
|
810
|
+
...p,
|
|
674
811
|
[a.name]: {
|
|
675
812
|
name: a.attr || a.name,
|
|
676
813
|
description: a.docs,
|
|
@@ -680,13 +817,13 @@ class Ut {
|
|
|
680
817
|
type: { summary: a.type },
|
|
681
818
|
defaultValue: { summary: a.default }
|
|
682
819
|
},
|
|
683
|
-
control:
|
|
820
|
+
control: g,
|
|
684
821
|
options: u
|
|
685
822
|
}
|
|
686
823
|
};
|
|
687
824
|
}, {}), n = r == null ? void 0 : r.events.reduce(
|
|
688
|
-
(
|
|
689
|
-
...
|
|
825
|
+
(p, a) => ({
|
|
826
|
+
...p,
|
|
690
827
|
[a.event]: {
|
|
691
828
|
name: a.event,
|
|
692
829
|
description: a.docs,
|
|
@@ -698,8 +835,8 @@ class Ut {
|
|
|
698
835
|
}),
|
|
699
836
|
{}
|
|
700
837
|
), i = r == null ? void 0 : r.methods.reduce(
|
|
701
|
-
(
|
|
702
|
-
...
|
|
838
|
+
(p, a) => ({
|
|
839
|
+
...p,
|
|
703
840
|
[a.name]: {
|
|
704
841
|
name: a.name,
|
|
705
842
|
description: a.docs,
|
|
@@ -711,8 +848,8 @@ class Ut {
|
|
|
711
848
|
}),
|
|
712
849
|
{}
|
|
713
850
|
), o = r == null ? void 0 : r.slots.reduce(
|
|
714
|
-
(
|
|
715
|
-
...
|
|
851
|
+
(p, a) => ({
|
|
852
|
+
...p,
|
|
716
853
|
[a.name]: {
|
|
717
854
|
name: a.name !== "" ? a.name : "default",
|
|
718
855
|
// default slot are unnamed
|
|
@@ -725,8 +862,8 @@ class Ut {
|
|
|
725
862
|
}),
|
|
726
863
|
{}
|
|
727
864
|
), f = r == null ? void 0 : r.styles.reduce(
|
|
728
|
-
(
|
|
729
|
-
...
|
|
865
|
+
(p, a) => ({
|
|
866
|
+
...p,
|
|
730
867
|
[a.name]: {
|
|
731
868
|
name: a.name,
|
|
732
869
|
description: a.docs,
|
|
@@ -737,32 +874,32 @@ class Ut {
|
|
|
737
874
|
}
|
|
738
875
|
}),
|
|
739
876
|
{}
|
|
740
|
-
),
|
|
741
|
-
const
|
|
742
|
-
return
|
|
743
|
-
...
|
|
877
|
+
), c = r == null ? void 0 : r.dependencies.reduce((p, a) => {
|
|
878
|
+
const g = v(this, j).call(this, a);
|
|
879
|
+
return g ? {
|
|
880
|
+
...p,
|
|
744
881
|
[a]: {
|
|
745
882
|
name: a,
|
|
746
|
-
description: `<a href="./?path=/docs/${
|
|
883
|
+
description: `<a href="./?path=/docs/${J("", g == null ? void 0 : g.filePath)}">View Component Documentation</a>`,
|
|
747
884
|
table: {
|
|
748
885
|
category: "depends on",
|
|
749
886
|
type: { summary: void 0 }
|
|
750
887
|
}
|
|
751
888
|
}
|
|
752
|
-
} :
|
|
753
|
-
}, {}),
|
|
754
|
-
const
|
|
755
|
-
return
|
|
756
|
-
...
|
|
889
|
+
} : p;
|
|
890
|
+
}, {}), l = r == null ? void 0 : r.dependents.reduce((p, a) => {
|
|
891
|
+
const g = v(this, j).call(this, a);
|
|
892
|
+
return g ? {
|
|
893
|
+
...p,
|
|
757
894
|
[a]: {
|
|
758
895
|
name: a,
|
|
759
|
-
description: `<a href="./?path=/docs/${
|
|
896
|
+
description: `<a href="./?path=/docs/${J("", g == null ? void 0 : g.filePath)}">View Component Documentation</a>`,
|
|
760
897
|
table: {
|
|
761
898
|
category: "used by",
|
|
762
899
|
type: { summary: void 0 }
|
|
763
900
|
}
|
|
764
901
|
}
|
|
765
|
-
} :
|
|
902
|
+
} : p;
|
|
766
903
|
}, {});
|
|
767
904
|
return {
|
|
768
905
|
...s,
|
|
@@ -770,8 +907,8 @@ class Ut {
|
|
|
770
907
|
...i,
|
|
771
908
|
...o,
|
|
772
909
|
...f,
|
|
773
|
-
...
|
|
774
|
-
...
|
|
910
|
+
...c,
|
|
911
|
+
...l
|
|
775
912
|
};
|
|
776
913
|
});
|
|
777
914
|
/**
|
|
@@ -780,17 +917,17 @@ class Ut {
|
|
|
780
917
|
* @returns component description
|
|
781
918
|
*/
|
|
782
919
|
d(this, "extractComponentDescription", (t) => {
|
|
783
|
-
const r =
|
|
920
|
+
const r = v(this, j).call(this, t);
|
|
784
921
|
return (r == null ? void 0 : r.readme) || (r == null ? void 0 : r.docs);
|
|
785
922
|
});
|
|
786
923
|
this.jsonDoc = t;
|
|
787
924
|
}
|
|
788
925
|
}
|
|
789
|
-
|
|
790
|
-
const
|
|
926
|
+
j = new WeakMap(), X = new WeakMap();
|
|
927
|
+
const It = (e, t) => {
|
|
791
928
|
if (t)
|
|
792
929
|
return `${e}${t}`;
|
|
793
|
-
},
|
|
930
|
+
}, Ie = (e) => {
|
|
794
931
|
let t = e.overview ? `${e.overview}
|
|
795
932
|
|
|
796
933
|
` : "";
|
|
@@ -816,9 +953,9 @@ const bt = (e, t) => {
|
|
|
816
953
|
`, t += e.slots.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
817
954
|
`).join(""), t += `
|
|
818
955
|
`), t;
|
|
819
|
-
},
|
|
956
|
+
}, se = (e) => `${e.docs}
|
|
820
957
|
|
|
821
|
-
Type: \`${e.type}\``,
|
|
958
|
+
Type: \`${e.type}\``, ir = (e, t, r, s) => ({
|
|
822
959
|
$schema: "https://json.schemastore.org/web-types",
|
|
823
960
|
name: e,
|
|
824
961
|
version: t,
|
|
@@ -826,14 +963,14 @@ Type: \`${e.type}\``, Dt = (e, t, r, s) => ({
|
|
|
826
963
|
contributions: {
|
|
827
964
|
html: {
|
|
828
965
|
elements: r.components.map((n) => {
|
|
829
|
-
const i =
|
|
966
|
+
const i = J(s, n.filePath);
|
|
830
967
|
return {
|
|
831
968
|
name: n.tag,
|
|
832
|
-
description:
|
|
969
|
+
description: Ie(n),
|
|
833
970
|
"doc-url": i,
|
|
834
971
|
attributes: n.props.filter((o) => o.attr).map((o) => ({
|
|
835
972
|
name: o.attr,
|
|
836
|
-
description:
|
|
973
|
+
description: se(o),
|
|
837
974
|
"doc-url": i,
|
|
838
975
|
value: {
|
|
839
976
|
type: o.type,
|
|
@@ -844,7 +981,7 @@ Type: \`${e.type}\``, Dt = (e, t, r, s) => ({
|
|
|
844
981
|
js: {
|
|
845
982
|
properties: n.props.map((o) => ({
|
|
846
983
|
name: o.name,
|
|
847
|
-
description:
|
|
984
|
+
description: se(o),
|
|
848
985
|
"doc-url": i,
|
|
849
986
|
value: {
|
|
850
987
|
type: o.type,
|
|
@@ -867,23 +1004,23 @@ Type: \`${e.type}\``, Dt = (e, t, r, s) => ({
|
|
|
867
1004
|
})
|
|
868
1005
|
}
|
|
869
1006
|
}
|
|
870
|
-
}),
|
|
871
|
-
{ name: "Storybook", url:
|
|
872
|
-
{ name: "Sources", url:
|
|
873
|
-
],
|
|
1007
|
+
}), Lt = (e, t, r) => [
|
|
1008
|
+
{ name: "Storybook", url: J(e, r) },
|
|
1009
|
+
{ name: "Sources", url: It(t, r) }
|
|
1010
|
+
], Mt = (e) => {
|
|
874
1011
|
if (!e.values.some(({ value: t }) => t === void 0))
|
|
875
1012
|
return e.values.map(({ value: t }) => ({ name: t }));
|
|
876
|
-
},
|
|
1013
|
+
}, or = (e, t, r) => ({
|
|
877
1014
|
version: 1.1,
|
|
878
1015
|
tags: e.components.map((s) => {
|
|
879
|
-
const n =
|
|
1016
|
+
const n = Lt(t, r, s.filePath);
|
|
880
1017
|
return {
|
|
881
1018
|
name: s.tag,
|
|
882
|
-
description:
|
|
1019
|
+
description: Ie(s),
|
|
883
1020
|
attributes: s.props.map((i) => ({
|
|
884
1021
|
name: i.attr || i.name,
|
|
885
|
-
description:
|
|
886
|
-
values:
|
|
1022
|
+
description: se(i),
|
|
1023
|
+
values: Mt(i),
|
|
887
1024
|
references: n
|
|
888
1025
|
})),
|
|
889
1026
|
references: n
|
|
@@ -891,7 +1028,7 @@ Type: \`${e.type}\``, Dt = (e, t, r, s) => ({
|
|
|
891
1028
|
}),
|
|
892
1029
|
globalAttributes: [],
|
|
893
1030
|
valueSets: []
|
|
894
|
-
}),
|
|
1031
|
+
}), ar = (e) => ({
|
|
895
1032
|
version: 1.1,
|
|
896
1033
|
properties: e.components.flatMap(
|
|
897
1034
|
(t) => t.styles.map((r) => ({
|
|
@@ -899,10 +1036,10 @@ Type: \`${e.type}\``, Dt = (e, t, r, s) => ({
|
|
|
899
1036
|
description: r.docs
|
|
900
1037
|
}))
|
|
901
1038
|
)
|
|
902
|
-
}),
|
|
1039
|
+
}), lr = (e) => {
|
|
903
1040
|
const t = { value: "2023", pattern: "yyyy" }, r = { value: "12", pattern: "mm" }, s = { value: "24", pattern: "dd" };
|
|
904
|
-
return
|
|
905
|
-
},
|
|
1041
|
+
return Pt([t.value, r.value, s.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(r.value, r.pattern).replace(s.value, s.pattern);
|
|
1042
|
+
}, cr = (e) => e.toISOString().split("T")[0], Ft = (e, t, r) => {
|
|
906
1043
|
const s = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(s == null ? void 0 : s.lang), i = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || r, o = i.split("-").shift();
|
|
907
1044
|
return Object.keys(t).length === 0 ? {
|
|
908
1045
|
locale: i,
|
|
@@ -911,17 +1048,17 @@ Type: \`${e.type}\``, Dt = (e, t, r, s) => ({
|
|
|
911
1048
|
locale: i,
|
|
912
1049
|
messages: t[o] || t[r] || { lang: r }
|
|
913
1050
|
};
|
|
914
|
-
},
|
|
1051
|
+
}, fr = (e, t, r) => new Intl.NumberFormat(t, { style: "currency", currency: r }).format(e), ur = (e, t, r = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: r }).format(Number(e)), pr = (e, t, r = 0) => new Intl.NumberFormat(t, {
|
|
915
1052
|
style: "percent",
|
|
916
1053
|
minimumFractionDigits: r,
|
|
917
1054
|
maximumFractionDigits: r
|
|
918
|
-
}).format(e),
|
|
1055
|
+
}).format(e), gr = (e, t, r, s = "short", n = 0) => new Intl.NumberFormat(t, {
|
|
919
1056
|
style: "unit",
|
|
920
1057
|
unit: r,
|
|
921
1058
|
unitDisplay: s,
|
|
922
1059
|
minimumFractionDigits: n,
|
|
923
1060
|
maximumFractionDigits: n
|
|
924
|
-
}).format(e),
|
|
1061
|
+
}).format(e), Ct = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, Pt = (e, t, r) => typeof e != "string" || e === "" || !Ct.test(e) ? "" : new Intl.DateTimeFormat(t, r).format(new Date(e)), $r = (e, t) => (r) => Ft(r, e, t), dr = ({ disconnect: e, observe: t, takeRecords: r }) => {
|
|
925
1062
|
class s {
|
|
926
1063
|
constructor(i) {
|
|
927
1064
|
/**
|
|
@@ -950,7 +1087,7 @@ Type: \`${e.type}\``, Dt = (e, t, r, s) => ({
|
|
|
950
1087
|
value: s
|
|
951
1088
|
});
|
|
952
1089
|
}), s;
|
|
953
|
-
},
|
|
1090
|
+
}, hr = ({ disconnect: e, observe: t }) => {
|
|
954
1091
|
class r {
|
|
955
1092
|
constructor(n) {
|
|
956
1093
|
/**
|
|
@@ -980,7 +1117,7 @@ Type: \`${e.type}\``, Dt = (e, t, r, s) => ({
|
|
|
980
1117
|
});
|
|
981
1118
|
}), r;
|
|
982
1119
|
};
|
|
983
|
-
class
|
|
1120
|
+
class Ut extends Event {
|
|
984
1121
|
constructor() {
|
|
985
1122
|
super(...arguments);
|
|
986
1123
|
/**
|
|
@@ -990,8 +1127,8 @@ class St extends Event {
|
|
|
990
1127
|
}
|
|
991
1128
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
992
1129
|
}
|
|
993
|
-
const
|
|
994
|
-
class e extends
|
|
1130
|
+
const yr = () => {
|
|
1131
|
+
class e extends Ut {
|
|
995
1132
|
}
|
|
996
1133
|
return [window, global].forEach((t) => {
|
|
997
1134
|
Object.defineProperty(t, "SubmitEvent", {
|
|
@@ -1000,7 +1137,7 @@ const Qt = () => {
|
|
|
1000
1137
|
value: e
|
|
1001
1138
|
});
|
|
1002
1139
|
}), e;
|
|
1003
|
-
},
|
|
1140
|
+
}, _r = (e) => {
|
|
1004
1141
|
const t = (r) => (setTimeout(r, 1), e(), 0);
|
|
1005
1142
|
return [window, global].forEach((r) => {
|
|
1006
1143
|
Object.defineProperty(r, "requestAnimationFrame", {
|
|
@@ -1011,39 +1148,44 @@ const Qt = () => {
|
|
|
1011
1148
|
}), t;
|
|
1012
1149
|
};
|
|
1013
1150
|
export {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1151
|
+
Ht as ClassList,
|
|
1152
|
+
Vt as Cursor,
|
|
1153
|
+
Ge as Page,
|
|
1154
|
+
er as Paginate,
|
|
1155
|
+
nr as StorybookPreview,
|
|
1156
|
+
qt as allItemsAreString,
|
|
1157
|
+
Yt as cleanString,
|
|
1158
|
+
Zt as createID,
|
|
1159
|
+
Ct as dateRegExp,
|
|
1160
|
+
cr as dateToString,
|
|
1161
|
+
$r as defineLocales,
|
|
1162
|
+
tr as filterArgs,
|
|
1163
|
+
Gt as focusableElements,
|
|
1164
|
+
lr as getLocaleDatePattern,
|
|
1165
|
+
Be as getObjectValueFromKey,
|
|
1166
|
+
_e as getParentWindows,
|
|
1167
|
+
sr as getStoryHTML,
|
|
1168
|
+
J as getStorybookUrl,
|
|
1169
|
+
Jt as getWindows,
|
|
1170
|
+
ne as isObject,
|
|
1171
|
+
Bt as isTagName,
|
|
1172
|
+
Kt as isValidNumber,
|
|
1173
|
+
qe as isValidString,
|
|
1174
|
+
Dt as isValideID,
|
|
1175
|
+
fr as localeCurrency,
|
|
1176
|
+
Pt as localeDate,
|
|
1177
|
+
ur as localeNumber,
|
|
1178
|
+
pr as localePercent,
|
|
1179
|
+
gr as localeUnit,
|
|
1180
|
+
Qt as nextTick,
|
|
1181
|
+
_r as setUpRequestAnimationFrameMock,
|
|
1182
|
+
dr as setupMutationObserverMock,
|
|
1183
|
+
hr as setupResizeObserverMock,
|
|
1184
|
+
yr as setupSubmitEventMock,
|
|
1185
|
+
rr as stencilWrapper,
|
|
1186
|
+
Xt as toString,
|
|
1187
|
+
ar as vsCodeCssGenerator,
|
|
1188
|
+
or as vsCodeGenerator,
|
|
1189
|
+
ir as webTypesGenerator
|
|
1048
1190
|
};
|
|
1049
1191
|
//# sourceMappingURL=index.es.js.map
|