@mgdis/stencil-helpers 3.1.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/index.es.js +467 -455
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +15 -15
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
package/dist/index.es.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var De = Object.defineProperty;
|
|
2
|
+
var ce = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var v = (e, t, r) => (
|
|
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
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
d(this, "classes");
|
|
20
20
|
/**
|
|
21
21
|
* Add class
|
|
22
22
|
* @param className - class name to add
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
d(this, "add", (t) => {
|
|
25
25
|
this.has(t) || this.classes.push(t);
|
|
26
26
|
});
|
|
27
27
|
/**
|
|
28
28
|
* Delete class
|
|
29
29
|
* @param className - class name to delete
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
d(this, "delete", (t) => {
|
|
32
32
|
const r = this.classes.indexOf(t);
|
|
33
33
|
r > -1 && this.classes.splice(r, 1);
|
|
34
34
|
});
|
|
@@ -37,17 +37,17 @@ class Zt {
|
|
|
37
37
|
* @param className - class name to check
|
|
38
38
|
* @returns class name is in the list
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
d(this, "has", (t) => this.classes.includes(t));
|
|
41
41
|
/**
|
|
42
42
|
* Join classes seperated by spaces
|
|
43
43
|
* @returns joined values
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
d(this, "join", () => this.classes.join(" "));
|
|
46
46
|
this.classes = t;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
const t = _e(e), r =
|
|
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)
|
|
@@ -58,110 +58,110 @@ const Dt = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), qt =
|
|
|
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
|
-
},
|
|
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
67
|
if (e) return e();
|
|
68
|
-
},
|
|
68
|
+
}, ne = (e) => typeof e == "object" && !Array.isArray(e) && e !== null, Be = (e, t, r) => {
|
|
69
69
|
const s = ".";
|
|
70
|
-
if (!
|
|
70
|
+
if (!ne(e) || typeof t != "string")
|
|
71
71
|
return r;
|
|
72
72
|
const [n, ...i] = t.split(s);
|
|
73
|
-
return i.length ?
|
|
74
|
-
},
|
|
73
|
+
return i.length ? Be(e[n], i.join(s)) : e[n];
|
|
74
|
+
}, Vt = {
|
|
75
75
|
FIRST: "first",
|
|
76
76
|
NEXT: "next",
|
|
77
77
|
PREVIOUS: "previous",
|
|
78
78
|
LAST: "last"
|
|
79
|
-
},
|
|
80
|
-
class
|
|
79
|
+
}, ve = 10;
|
|
80
|
+
class Ge {
|
|
81
81
|
constructor(t) {
|
|
82
82
|
/**
|
|
83
83
|
* Define items
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
d(this, "items", []);
|
|
86
86
|
/**
|
|
87
87
|
* Define total
|
|
88
88
|
*/
|
|
89
|
-
|
|
89
|
+
d(this, "total");
|
|
90
90
|
/**
|
|
91
91
|
* Define top
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
d(this, "top", ve);
|
|
94
94
|
/**
|
|
95
95
|
* Define next
|
|
96
96
|
*/
|
|
97
|
-
|
|
97
|
+
d(this, "next");
|
|
98
98
|
/**
|
|
99
99
|
* Define base index
|
|
100
100
|
*/
|
|
101
|
-
|
|
101
|
+
d(this, "baseIndex", 1);
|
|
102
102
|
/**
|
|
103
103
|
* Get index of items from cursor
|
|
104
104
|
* @param cursor - cursor to find
|
|
105
105
|
* @param oldItem - previous item
|
|
106
106
|
* @returns item index
|
|
107
107
|
*/
|
|
108
|
-
|
|
108
|
+
d(this, "getIndexFromCursor", (t = "first", r) => {
|
|
109
109
|
if (!Array.isArray(this.items) || !this.items.length) return null;
|
|
110
110
|
const n = this.items.length - this.baseIndex;
|
|
111
|
-
let i = 0,
|
|
111
|
+
let i = 0, o = 0;
|
|
112
112
|
if (["previous", "next"].includes(t) && r) {
|
|
113
|
-
const
|
|
114
|
-
if (
|
|
115
|
-
|
|
113
|
+
const f = this.items.findIndex((c) => JSON.stringify(c) === JSON.stringify(r));
|
|
114
|
+
if (f === -1) return 0;
|
|
115
|
+
o = f;
|
|
116
116
|
}
|
|
117
|
-
return t === "first" ? i = 0 : t === "last" ? i = n : t === "previous" ? i = JSON.stringify(this.items[
|
|
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
118
|
});
|
|
119
|
-
if (
|
|
119
|
+
if (ne(t))
|
|
120
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
121
|
else
|
|
122
122
|
throw new Error("Page - init must match IPage type.");
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
var
|
|
126
|
-
class
|
|
125
|
+
var O, N, C;
|
|
126
|
+
class er {
|
|
127
127
|
constructor(t, r) {
|
|
128
128
|
/**
|
|
129
129
|
* Define paginated items
|
|
130
130
|
*/
|
|
131
|
-
|
|
131
|
+
d(this, "items", []);
|
|
132
132
|
/* Privates */
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
k(this, O, ve);
|
|
134
|
+
k(this, N);
|
|
135
|
+
k(this, C);
|
|
136
136
|
/**
|
|
137
137
|
* Get page
|
|
138
138
|
* @param offset - pagiantion offset
|
|
139
139
|
* @param filter - filter methode
|
|
140
140
|
* @returns formated page
|
|
141
141
|
*/
|
|
142
|
-
|
|
142
|
+
d(this, "getPage", (t = 0, r) => {
|
|
143
143
|
const s = typeof r == "function" ? this.items.filter(r) : this.items;
|
|
144
144
|
let n;
|
|
145
|
-
return v(this, N) ? n = v(this, N) : s.length > t + v(this,
|
|
146
|
-
items: s.slice(t, t + v(this,
|
|
147
|
-
total: v(this,
|
|
148
|
-
top: v(this,
|
|
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
149
|
next: n
|
|
150
150
|
});
|
|
151
151
|
});
|
|
152
|
-
Array.isArray(t) && (this.items = t), r && (["string", "function"].includes(typeof r.next) ||
|
|
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
153
|
}
|
|
154
154
|
}
|
|
155
|
-
|
|
155
|
+
O = new WeakMap(), N = new WeakMap(), C = new WeakMap();
|
|
156
156
|
var K = {
|
|
157
157
|
updatable: !0,
|
|
158
158
|
slotRelocation: !0,
|
|
159
159
|
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
160
160
|
experimentalSlotFixes: !1
|
|
161
|
-
},
|
|
161
|
+
}, Je = Object.defineProperty, Xe = (e, t) => {
|
|
162
162
|
for (var r in t)
|
|
163
|
-
|
|
164
|
-
},
|
|
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 = {
|
|
165
165
|
$flags$: 0,
|
|
166
166
|
$resourcesUrl$: "",
|
|
167
167
|
jmp: (e) => e(),
|
|
@@ -169,15 +169,15 @@ var K = {
|
|
|
169
169
|
ael: (e, t, r, s) => e.addEventListener(t, r, s),
|
|
170
170
|
rel: (e, t, r, s) => e.removeEventListener(t, r, s),
|
|
171
171
|
ce: (e, t) => new CustomEvent(e, t)
|
|
172
|
-
},
|
|
173
|
-
|
|
172
|
+
}, Qe = (e) => e != null && e !== void 0, we = (e) => (e = typeof e, e === "object" || e === "function"), Ve = {};
|
|
173
|
+
Xe(Ve, {
|
|
174
174
|
err: () => me,
|
|
175
|
-
map: () =>
|
|
176
|
-
ok: () =>
|
|
177
|
-
unwrap: () =>
|
|
178
|
-
unwrapErr: () =>
|
|
175
|
+
map: () => et,
|
|
176
|
+
ok: () => Q,
|
|
177
|
+
unwrap: () => tt,
|
|
178
|
+
unwrapErr: () => rt
|
|
179
179
|
});
|
|
180
|
-
var
|
|
180
|
+
var Q = (e) => ({
|
|
181
181
|
isOk: !0,
|
|
182
182
|
isErr: !1,
|
|
183
183
|
value: e
|
|
@@ -186,10 +186,10 @@ var V = (e) => ({
|
|
|
186
186
|
isErr: !0,
|
|
187
187
|
value: e
|
|
188
188
|
});
|
|
189
|
-
function
|
|
189
|
+
function et(e, t) {
|
|
190
190
|
if (e.isOk) {
|
|
191
191
|
const r = t(e.value);
|
|
192
|
-
return r instanceof Promise ? r.then((s) =>
|
|
192
|
+
return r instanceof Promise ? r.then((s) => Q(s)) : Q(r);
|
|
193
193
|
}
|
|
194
194
|
if (e.isErr) {
|
|
195
195
|
const r = e.value;
|
|
@@ -197,25 +197,25 @@ function Ye(e, t) {
|
|
|
197
197
|
}
|
|
198
198
|
throw "should never get here";
|
|
199
199
|
}
|
|
200
|
-
var
|
|
200
|
+
var tt = (e) => {
|
|
201
201
|
if (e.isOk)
|
|
202
202
|
return e.value;
|
|
203
203
|
throw e.value;
|
|
204
|
-
},
|
|
204
|
+
}, rt = (e) => {
|
|
205
205
|
if (e.isErr)
|
|
206
206
|
return e.value;
|
|
207
207
|
throw e.value;
|
|
208
|
-
},
|
|
209
|
-
const t =
|
|
208
|
+
}, xe = (e) => {
|
|
209
|
+
const t = $e(e, "childNodes");
|
|
210
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" && (
|
|
211
|
+
s.nodeType === 1 && s.tagName === "SLOT-FB" && (nt(s, ie(s), !1).length ? s.hidden = !0 : s.hidden = !1);
|
|
212
212
|
});
|
|
213
213
|
let r = 0;
|
|
214
214
|
for (r = 0; r < t.length; r++) {
|
|
215
215
|
const s = t[r];
|
|
216
|
-
s.nodeType === 1 &&
|
|
216
|
+
s.nodeType === 1 && $e(s, "childNodes").length && xe(s);
|
|
217
217
|
}
|
|
218
|
-
},
|
|
218
|
+
}, st = (e) => {
|
|
219
219
|
const t = [];
|
|
220
220
|
for (let r = 0; r < e.length; r++) {
|
|
221
221
|
const s = e[r]["s-nr"] || void 0;
|
|
@@ -229,15 +229,15 @@ function Ee(e, t, r) {
|
|
|
229
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)];
|
|
230
230
|
return n;
|
|
231
231
|
}
|
|
232
|
-
var
|
|
232
|
+
var nt = (e, t, r = !0) => {
|
|
233
233
|
const s = [];
|
|
234
234
|
(r && e["s-sr"] || !e["s-sr"]) && s.push(e);
|
|
235
235
|
let n = e;
|
|
236
236
|
for (; n = n.nextSibling; )
|
|
237
|
-
|
|
237
|
+
ie(n) === t && (r || !n["s-sr"]) && s.push(n);
|
|
238
238
|
return s;
|
|
239
|
-
},
|
|
240
|
-
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) {
|
|
241
241
|
if (e.assignedElements || e.assignedNodes || !e["s-sr"]) return;
|
|
242
242
|
const t = (r) => (function(s) {
|
|
243
243
|
const n = [], i = this["s-sn"];
|
|
@@ -246,33 +246,33 @@ function rt(e) {
|
|
|
246
246
|
You can use \`.childNodes\` to nested slot fallback content.
|
|
247
247
|
If you have a particular use case, please open an issue on the Stencil repo.
|
|
248
248
|
`);
|
|
249
|
-
const
|
|
250
|
-
return (
|
|
251
|
-
i ===
|
|
249
|
+
const o = this["s-cr"].parentElement;
|
|
250
|
+
return (o.__childNodes ? o.childNodes : st(o.childNodes)).forEach((c) => {
|
|
251
|
+
i === ie(c) && n.push(c);
|
|
252
252
|
}), r ? n.filter(
|
|
253
|
-
(
|
|
253
|
+
(c) => c.nodeType === 1
|
|
254
254
|
/* ElementNode */
|
|
255
255
|
) : n;
|
|
256
256
|
}).bind(e);
|
|
257
257
|
e.assignedElements = t(!0), e.assignedNodes = t(!1);
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function $e(e, t) {
|
|
260
260
|
if ("__" + t in e) {
|
|
261
261
|
const r = e["__" + t];
|
|
262
262
|
return typeof r != "function" ? r : r.bind(e);
|
|
263
263
|
} else
|
|
264
264
|
return typeof e[t] != "function" ? e[t] : e[t].bind(e);
|
|
265
265
|
}
|
|
266
|
-
var
|
|
267
|
-
let s = null, n = null, i = null,
|
|
268
|
-
const
|
|
269
|
-
for (let g = 0; g <
|
|
270
|
-
s =
|
|
266
|
+
var ot = (e, t, ...r) => {
|
|
267
|
+
let s = null, n = null, i = null, o = !1, f = !1;
|
|
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);
|
|
271
271
|
};
|
|
272
|
-
|
|
273
|
-
const p =
|
|
274
|
-
return p.$attrs$ = t,
|
|
275
|
-
},
|
|
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) => {
|
|
276
276
|
const r = {
|
|
277
277
|
$flags$: 0,
|
|
278
278
|
$tag$: e,
|
|
@@ -281,63 +281,63 @@ var st = (e, t, ...r) => {
|
|
|
281
281
|
$children$: null
|
|
282
282
|
};
|
|
283
283
|
return r.$attrs$ = null, r.$key$ = null, r.$name$ = null, r;
|
|
284
|
-
},
|
|
284
|
+
}, at = {}, lt = (e) => e && e.$tag$ === at, de = (e, t, r, s, n, i, o) => {
|
|
285
285
|
if (r === s)
|
|
286
286
|
return;
|
|
287
|
-
let
|
|
287
|
+
let f = ue(e, t), c = t.toLowerCase();
|
|
288
288
|
if (t === "class") {
|
|
289
|
-
const
|
|
290
|
-
let
|
|
291
|
-
|
|
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)));
|
|
292
292
|
} else if (t === "style") {
|
|
293
|
-
for (const
|
|
294
|
-
(!s || s[
|
|
295
|
-
for (const
|
|
296
|
-
(!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]);
|
|
297
297
|
} else if (t !== "key") if (t === "ref")
|
|
298
298
|
s && s(e);
|
|
299
299
|
else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
|
|
300
|
-
if (t[2] === "-" ? t = t.slice(3) :
|
|
301
|
-
const
|
|
302
|
-
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);
|
|
303
303
|
}
|
|
304
304
|
} else {
|
|
305
|
-
const
|
|
306
|
-
if ((
|
|
305
|
+
const l = we(s);
|
|
306
|
+
if ((f || l && s !== null) && !n)
|
|
307
307
|
try {
|
|
308
308
|
if (e.tagName.includes("-"))
|
|
309
309
|
e[t] !== s && (e[t] = s);
|
|
310
310
|
else {
|
|
311
|
-
const
|
|
312
|
-
t === "list" ?
|
|
311
|
+
const a = s ?? "";
|
|
312
|
+
t === "list" ? f = !1 : (r == null || e[t] != a) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = a : e.setAttribute(t, a));
|
|
313
313
|
}
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
let p = !1;
|
|
317
|
-
|
|
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));
|
|
318
318
|
}
|
|
319
|
-
},
|
|
320
|
-
const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = e && e.$attrs$ || {},
|
|
321
|
-
for (const
|
|
322
|
-
|
|
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) => {
|
|
320
|
+
const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = e && e.$attrs$ || {}, o = t.$attrs$ || {};
|
|
321
|
+
for (const f of ye(Object.keys(i)))
|
|
322
|
+
f in o || de(
|
|
323
323
|
n,
|
|
324
|
-
|
|
325
|
-
i[
|
|
324
|
+
f,
|
|
325
|
+
i[f],
|
|
326
326
|
void 0,
|
|
327
327
|
r,
|
|
328
328
|
t.$flags$
|
|
329
329
|
);
|
|
330
|
-
for (const
|
|
331
|
-
|
|
330
|
+
for (const f of ye(Object.keys(o)))
|
|
331
|
+
de(
|
|
332
332
|
n,
|
|
333
|
-
|
|
334
|
-
i[
|
|
335
|
-
|
|
333
|
+
f,
|
|
334
|
+
i[f],
|
|
335
|
+
o[f],
|
|
336
336
|
r,
|
|
337
337
|
t.$flags$
|
|
338
338
|
);
|
|
339
339
|
};
|
|
340
|
-
function
|
|
340
|
+
function ye(e) {
|
|
341
341
|
return e.includes("ref") ? (
|
|
342
342
|
// we need to sort these to ensure that `'ref'` is the last attr
|
|
343
343
|
[...e.filter((t) => t !== "ref"), "ref"]
|
|
@@ -346,11 +346,11 @@ function be(e) {
|
|
|
346
346
|
e
|
|
347
347
|
);
|
|
348
348
|
}
|
|
349
|
-
var
|
|
349
|
+
var Z, q, L, te = !1, B = !1, oe = !1, b = !1, G = (e, t, r) => {
|
|
350
350
|
var s;
|
|
351
351
|
const n = t.$children$[r];
|
|
352
|
-
let i = 0,
|
|
353
|
-
if (
|
|
352
|
+
let i = 0, o, f, c;
|
|
353
|
+
if (te || (oe = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
|
|
354
354
|
// slot element has fallback content
|
|
355
355
|
// still create an element that "mocks" the slot element
|
|
356
356
|
2
|
|
@@ -360,189 +360,189 @@ var D, B, I, re = !1, G = !1, oe = !1, b = !1, W = (e, t, r) => {
|
|
|
360
360
|
// where actual slot content should sit next to
|
|
361
361
|
1
|
|
362
362
|
))), n.$text$ !== null)
|
|
363
|
-
|
|
363
|
+
o = n.$elm$ = A.document.createTextNode(n.$text$);
|
|
364
364
|
else if (n.$flags$ & 1)
|
|
365
|
-
|
|
365
|
+
o = n.$elm$ = A.document.createTextNode(""), ee(null, n, b);
|
|
366
366
|
else {
|
|
367
|
-
if (b || (b = n.$tag$ === "svg"), !
|
|
367
|
+
if (b || (b = n.$tag$ === "svg"), !A.document)
|
|
368
368
|
throw new Error(
|
|
369
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."
|
|
370
370
|
);
|
|
371
|
-
if (
|
|
372
|
-
b ?
|
|
373
|
-
!
|
|
374
|
-
), 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$)
|
|
375
375
|
for (i = 0; i < n.$children$.length; ++i)
|
|
376
|
-
|
|
377
|
-
n.$tag$ === "svg" ? b = !1 :
|
|
376
|
+
f = G(e, n, i), f && o.appendChild(f);
|
|
377
|
+
n.$tag$ === "svg" ? b = !1 : o.tagName === "foreignObject" && (b = !0);
|
|
378
378
|
}
|
|
379
|
-
return
|
|
380
|
-
},
|
|
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
381
|
z.$flags$ |= 1;
|
|
382
382
|
const r = Array.from(e.__childNodes || e.childNodes);
|
|
383
383
|
e["s-sr"] && K.experimentalSlotFixes;
|
|
384
384
|
for (let s = r.length - 1; s >= 0; s--) {
|
|
385
385
|
const n = r[s];
|
|
386
|
-
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);
|
|
387
387
|
}
|
|
388
388
|
z.$flags$ &= -2;
|
|
389
|
-
},
|
|
390
|
-
let
|
|
391
|
-
for (
|
|
392
|
-
s[n] && (
|
|
393
|
-
},
|
|
389
|
+
}, Oe = (e, t, r, s, n, i) => {
|
|
390
|
+
let o = e["s-cr"] && e["s-cr"].parentNode || e, f;
|
|
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) => {
|
|
394
394
|
for (let s = t; s <= r; ++s) {
|
|
395
395
|
const n = e[s];
|
|
396
396
|
if (n) {
|
|
397
397
|
const i = n.$elm$;
|
|
398
|
-
|
|
398
|
+
Te(n), i && (B = !0, i["s-ol"] ? i["s-ol"].remove() : M(i, !0), i.remove());
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
},
|
|
402
|
-
let i = 0,
|
|
403
|
-
for (; i <=
|
|
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
404
|
if (p == null)
|
|
405
405
|
p = t[++i];
|
|
406
|
-
else if (
|
|
407
|
-
|
|
406
|
+
else if (a == null)
|
|
407
|
+
a = t[--l];
|
|
408
408
|
else if (u == null)
|
|
409
|
-
u = s[++
|
|
410
|
-
else if (
|
|
411
|
-
|
|
412
|
-
else if (
|
|
413
|
-
R(p, u, n), p = t[++i], u = s[++
|
|
414
|
-
else if (
|
|
415
|
-
R(
|
|
416
|
-
else if (
|
|
417
|
-
(p.$tag$ === "slot" ||
|
|
418
|
-
else if (
|
|
419
|
-
(p.$tag$ === "slot" ||
|
|
409
|
+
u = s[++o];
|
|
410
|
+
else if ($ == null)
|
|
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];
|
|
420
420
|
else {
|
|
421
|
-
for (
|
|
422
|
-
if (t[
|
|
423
|
-
|
|
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;
|
|
424
424
|
break;
|
|
425
425
|
}
|
|
426
|
-
|
|
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
427
|
F(p.$elm$).parentNode,
|
|
428
|
-
|
|
428
|
+
_,
|
|
429
429
|
F(p.$elm$)
|
|
430
430
|
);
|
|
431
431
|
}
|
|
432
|
-
i >
|
|
432
|
+
i > l ? Oe(
|
|
433
433
|
e,
|
|
434
434
|
s[g + 1] == null ? null : s[g + 1].$elm$,
|
|
435
435
|
r,
|
|
436
436
|
s,
|
|
437
|
-
|
|
437
|
+
o,
|
|
438
438
|
g
|
|
439
|
-
) :
|
|
440
|
-
},
|
|
441
|
-
const s = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$,
|
|
442
|
-
let
|
|
443
|
-
|
|
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) => {
|
|
441
|
+
const s = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$, f = t.$text$;
|
|
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)) : (
|
|
444
444
|
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
445
|
-
!r && K.updatable && n !== null &&
|
|
446
|
-
), b &&
|
|
447
|
-
}, x = [],
|
|
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) => {
|
|
448
448
|
let t, r, s;
|
|
449
449
|
const n = e.__childNodes || e.childNodes;
|
|
450
450
|
for (const i of n) {
|
|
451
451
|
if (i["s-sr"] && (t = i["s-cr"]) && t.parentNode) {
|
|
452
452
|
r = t.parentNode.__childNodes || t.parentNode.childNodes;
|
|
453
|
-
const
|
|
453
|
+
const o = i["s-sn"];
|
|
454
454
|
for (s = r.length - 1; s >= 0; s--)
|
|
455
455
|
if (t = r[s], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== i["s-hn"])
|
|
456
|
-
if (
|
|
457
|
-
let
|
|
458
|
-
|
|
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({
|
|
459
459
|
$slotRefNode$: i,
|
|
460
460
|
$nodeToRelocate$: t
|
|
461
|
-
})), t["s-sr"] && x.map((
|
|
462
|
-
|
|
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$));
|
|
463
463
|
});
|
|
464
|
-
} else x.some((
|
|
464
|
+
} else x.some((f) => f.$nodeToRelocate$ === t) || x.push({
|
|
465
465
|
$nodeToRelocate$: t
|
|
466
466
|
});
|
|
467
467
|
}
|
|
468
|
-
i.nodeType === 1 &&
|
|
468
|
+
i.nodeType === 1 && je(i);
|
|
469
469
|
}
|
|
470
|
-
},
|
|
471
|
-
e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(
|
|
472
|
-
}, T = (e, t, r) => (typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"] &&
|
|
473
|
-
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) {
|
|
474
474
|
var n, i;
|
|
475
|
-
let
|
|
476
|
-
if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (
|
|
477
|
-
const
|
|
478
|
-
if ((n = r.classList) == null || n.add(
|
|
479
|
-
let
|
|
480
|
-
for (;
|
|
481
|
-
if (
|
|
475
|
+
let o;
|
|
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"])) {
|
|
477
|
+
const f = t["s-sn"], c = t["s-hn"];
|
|
478
|
+
if ((n = r.classList) == null || n.add(o + "-s"), s && ((i = s.classList) != null && i.contains(o + "-s"))) {
|
|
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
482
|
p = !0;
|
|
483
483
|
break;
|
|
484
484
|
}
|
|
485
|
-
|
|
485
|
+
l = l.nextSibling;
|
|
486
486
|
}
|
|
487
|
-
p || s.classList.remove(
|
|
487
|
+
p || s.classList.remove(o + "-s");
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
var
|
|
492
|
-
var s, n, i,
|
|
493
|
-
const
|
|
494
|
-
if (
|
|
495
|
-
([g, u]) =>
|
|
496
|
-
)), r &&
|
|
497
|
-
for (const g of Object.keys(
|
|
498
|
-
|
|
499
|
-
|
|
491
|
+
var pt = (e, t, r = !1) => {
|
|
492
|
+
var s, n, i, o, f;
|
|
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]
|
|
496
|
+
)), r && a.$attrs$)
|
|
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);
|
|
500
500
|
{
|
|
501
501
|
if (z.$flags$ |= 1, oe) {
|
|
502
|
-
|
|
502
|
+
je(a.$elm$);
|
|
503
503
|
for (const g of x) {
|
|
504
504
|
const u = g.$nodeToRelocate$;
|
|
505
|
-
if (!u["s-ol"] &&
|
|
506
|
-
const
|
|
507
|
-
|
|
505
|
+
if (!u["s-ol"] && A.document) {
|
|
506
|
+
const $ = A.document.createTextNode("");
|
|
507
|
+
$["s-nr"] = u, T(u.parentNode, u["s-ol"] = $, u);
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
for (const g of x) {
|
|
511
|
-
const u = g.$nodeToRelocate$,
|
|
512
|
-
if (
|
|
513
|
-
const
|
|
514
|
-
let
|
|
511
|
+
const u = g.$nodeToRelocate$, $ = g.$slotRefNode$;
|
|
512
|
+
if ($) {
|
|
513
|
+
const _ = $.parentNode;
|
|
514
|
+
let w = $.nextSibling;
|
|
515
515
|
{
|
|
516
|
-
let
|
|
517
|
-
for (;
|
|
518
|
-
let
|
|
519
|
-
if (
|
|
520
|
-
for (
|
|
521
|
-
|
|
522
|
-
if (!
|
|
523
|
-
|
|
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;
|
|
524
524
|
break;
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
|
|
527
|
+
y = y.previousSibling;
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
const
|
|
531
|
-
(!
|
|
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"]($);
|
|
532
532
|
} else
|
|
533
|
-
u.nodeType === 1 && (r && (u["s-ih"] = (
|
|
533
|
+
u.nodeType === 1 && (r && (u["s-ih"] = (o = u.hidden) != null ? o : !1), u.hidden = !0);
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
|
|
536
|
+
B && xe(a.$elm$), z.$flags$ &= -2, x.length = 0;
|
|
537
537
|
}
|
|
538
|
-
if (K.experimentalScopedSlotChanges &&
|
|
539
|
-
const g =
|
|
538
|
+
if (K.experimentalScopedSlotChanges && l.$flags$ & 2) {
|
|
539
|
+
const g = a.$elm$.__childNodes || a.$elm$.childNodes;
|
|
540
540
|
for (const u of g)
|
|
541
|
-
u["s-hn"] !==
|
|
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);
|
|
542
542
|
}
|
|
543
|
-
|
|
543
|
+
q = void 0;
|
|
544
544
|
};
|
|
545
|
-
const
|
|
545
|
+
const D = {
|
|
546
546
|
content_wrap: 0,
|
|
547
547
|
ignore: [],
|
|
548
548
|
ignore_with: "_!i-£___£%_",
|
|
@@ -551,7 +551,7 @@ const q = {
|
|
|
551
551
|
tag_wrap: 0,
|
|
552
552
|
tag_wrap_width: 80,
|
|
553
553
|
trim: []
|
|
554
|
-
},
|
|
554
|
+
}, E = "__!i-£___£%__", m = "!i-£___£%_", Re = [
|
|
555
555
|
"area",
|
|
556
556
|
"base",
|
|
557
557
|
"br",
|
|
@@ -566,7 +566,7 @@ const q = {
|
|
|
566
566
|
"source",
|
|
567
567
|
"track",
|
|
568
568
|
"wbr"
|
|
569
|
-
],
|
|
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) => {
|
|
570
570
|
if (!e || !t)
|
|
571
571
|
throw new Error("Both 'current' and 'updates' must be passed-in to mergeObjects()");
|
|
572
572
|
let r;
|
|
@@ -575,50 +575,50 @@ const q = {
|
|
|
575
575
|
else if (typeof e == "object") {
|
|
576
576
|
r = { ...e };
|
|
577
577
|
for (let s of Object.keys(t))
|
|
578
|
-
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]);
|
|
579
579
|
}
|
|
580
580
|
return r;
|
|
581
|
-
},
|
|
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
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,
|
|
584
|
-
const
|
|
585
|
-
if (!
|
|
583
|
+
return e.replace(t, (r, s, n, i, o) => {
|
|
584
|
+
const f = n || o;
|
|
585
|
+
if (!f)
|
|
586
586
|
return r;
|
|
587
|
-
const
|
|
588
|
-
return r.replace(
|
|
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
589
|
});
|
|
590
|
-
},
|
|
590
|
+
}, yt = (e) => {
|
|
591
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;
|
|
592
|
-
return e = e.replace(t, (r, s, n) => r.replace(n, (i) => i.replace(/</g,
|
|
593
|
-
},
|
|
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) => {
|
|
594
594
|
const r = t.ignore, s = t.ignore_with;
|
|
595
595
|
for (let n = 0; n < r.length; n++) {
|
|
596
596
|
const i = new RegExp(`<${r[n]}[^>]*>((.|
|
|
597
597
|
)*?)</${r[n]}>`, "g");
|
|
598
|
-
e = e.replace(i, (
|
|
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-")));
|
|
599
599
|
}
|
|
600
600
|
return e;
|
|
601
|
-
},
|
|
601
|
+
}, bt = (e, t) => {
|
|
602
602
|
for (let r = 0; r < t.length; r++) {
|
|
603
603
|
const s = new RegExp(`(<${t[r]}[^>]*>)\\s+`, "g"), n = new RegExp(`\\s+(</${t[r]}>)`, "g");
|
|
604
604
|
e = e.replace(s, "$1").replace(n, "$1");
|
|
605
605
|
}
|
|
606
606
|
return e;
|
|
607
|
-
},
|
|
608
|
-
`).replace(new RegExp(
|
|
609
|
-
`).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) => {
|
|
610
610
|
const r = t.ignore, s = t.ignore_with;
|
|
611
611
|
for (let n = 0; n < r.length; n++) {
|
|
612
612
|
const i = new RegExp(`<${r[n]}[^>]*>((.|
|
|
613
613
|
)*?)</${r[n]}>`, "g");
|
|
614
|
-
e = e.replace(i, (
|
|
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"), `
|
|
615
615
|
`).replace(new RegExp("-" + s + "cr-", "g"), "\r").replace(new RegExp("-" + s + "ws-", "g"), " ")));
|
|
616
616
|
}
|
|
617
617
|
return e;
|
|
618
|
-
},
|
|
618
|
+
}, Et = (e) => {
|
|
619
619
|
var s, n;
|
|
620
620
|
if (typeof e != "object") throw new Error("Config must be an object.");
|
|
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
|
|
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;
|
|
622
622
|
let r = e.tab_size;
|
|
623
623
|
if (r) {
|
|
624
624
|
if (typeof r != "number") throw new Error(`tab_size must be a number, not ${typeof e.tab_size}.`);
|
|
@@ -634,114 +634,126 @@ const q = {
|
|
|
634
634
|
throw new Error(`Ignore_with config must be a string, not ${typeof e.ignore_with}.`);
|
|
635
635
|
if (Object.hasOwn(e, "strict") && typeof e.strict != "boolean")
|
|
636
636
|
throw new Error(`Strict config must be a boolean, not ${typeof e.strict}.`);
|
|
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 =
|
|
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
638
|
throw new Error(`tag_wrap config must be a number, not ${typeof e.tag_wrap}.`);
|
|
639
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")
|
|
640
640
|
throw new Error(`tag_wrap_width config must be a number, not ${typeof e.tag_wrap_width}.`);
|
|
641
641
|
if (Object.hasOwn(e, "trim") && (!Array.isArray(e.trim) || !((n = e.trim) != null && n.every((i) => typeof i == "string"))))
|
|
642
642
|
throw new Error("Trim config must be an array of strings.");
|
|
643
|
-
return
|
|
644
|
-
},
|
|
645
|
-
const s = e.split(/\s+/);
|
|
646
|
-
if (s.length === 0)
|
|
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
647
|
return "";
|
|
648
648
|
const n = [];
|
|
649
|
-
let i = ""
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
const c = n.join(`
|
|
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(`
|
|
662
661
|
`);
|
|
663
|
-
return
|
|
664
|
-
},
|
|
665
|
-
|
|
666
|
-
|
|
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 = {
|
|
667
672
|
line: []
|
|
668
|
-
},
|
|
669
|
-
|
|
673
|
+
}, Tt = (e) => {
|
|
674
|
+
I.line = [];
|
|
670
675
|
let t = -1;
|
|
671
676
|
const r = /(<[^>]+>)|([^<]+)/g;
|
|
672
|
-
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++, `
|
|
673
678
|
[#-# : ${t} : ${s} : #-#]
|
|
674
679
|
`)), e;
|
|
675
|
-
},
|
|
676
|
-
const r = t.tab_size, s = t.tag_wrap, n = t.content_wrap;
|
|
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;
|
|
677
682
|
let i = "";
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
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] + `
|
|
691
702
|
`;
|
|
692
|
-
for (const
|
|
693
|
-
const
|
|
703
|
+
for (const We of Le) {
|
|
704
|
+
const Ze = We[0].trim();
|
|
705
|
+
Y += Me + Ze + `
|
|
694
706
|
`;
|
|
695
|
-
Q += Pe;
|
|
696
707
|
}
|
|
697
|
-
const Ce =
|
|
698
|
-
|
|
699
|
-
);
|
|
700
|
-
return Q += Ce, Q;
|
|
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;
|
|
701
710
|
} else
|
|
702
|
-
|
|
703
|
-
}
|
|
704
|
-
|
|
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(
|
|
705
719
|
/<(?<Element>.+).*>[^<]*?[^><\/\s][^<]*?<\/{1}\k<Element>|<script[^>]*>\s+<\/script>|<(\w+)>\s+<\/(\w+)|<(?:([\w:\._-]+)|([\w:\._-]+)[^>]*[^\/])>\s+<\/([\w:\._-]+)>/g,
|
|
706
|
-
(
|
|
707
|
-
), n > 0 && (
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
if (!le(e)) return e;
|
|
714
|
-
const r = t ? wt(t) : q;
|
|
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;
|
|
715
727
|
H = r.strict;
|
|
716
728
|
const s = r.ignore.length > 0;
|
|
717
|
-
return
|
|
718
|
-
},
|
|
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) => {
|
|
719
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);
|
|
720
|
-
},
|
|
732
|
+
}, ze = (e, t, r, s, n) => {
|
|
721
733
|
if (t && typeof t == "string") {
|
|
722
734
|
const i = document.createElement(t);
|
|
723
|
-
Object.keys(r || {}).forEach((
|
|
724
|
-
|
|
725
|
-
}), s == null || s.forEach((
|
|
726
|
-
|
|
735
|
+
Object.keys(r || {}).forEach((o) => {
|
|
736
|
+
zt(i, o, r[o]);
|
|
737
|
+
}), s == null || s.forEach((o) => {
|
|
738
|
+
ze(i, o.$tag$, o.$attrs$, o.$children$, o.$text$);
|
|
727
739
|
}), r != null && r.innerHTML && (i.innerHTML = r.innerHTML), e.appendChild(i);
|
|
728
740
|
}
|
|
729
741
|
n && (e.innerHTML = n);
|
|
730
|
-
},
|
|
742
|
+
}, tr = (e, t, r = []) => {
|
|
731
743
|
const s = {};
|
|
732
744
|
if (typeof e != "object")
|
|
733
745
|
throw new Error("filterArgs - args isn't an object.");
|
|
734
746
|
for (const n in e)
|
|
735
747
|
if (!r.includes(n)) {
|
|
736
|
-
const i = e[n],
|
|
737
|
-
(!t || !Object.keys(t).includes(n) || t[n] !== i) && (s[
|
|
748
|
+
const i = e[n], o = n.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
749
|
+
(!t || !Object.keys(t).includes(n) || t[n] !== i) && (s[o] = i);
|
|
738
750
|
}
|
|
739
751
|
return s;
|
|
740
|
-
},
|
|
752
|
+
}, rr = (e, t) => {
|
|
741
753
|
var s, n;
|
|
742
754
|
const r = document.getElementById("storybook-root");
|
|
743
755
|
if (r !== null)
|
|
744
|
-
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(
|
|
745
757
|
{
|
|
746
758
|
$cmpMeta$: {
|
|
747
759
|
$flags$: 0,
|
|
@@ -751,9 +763,9 @@ const A = {
|
|
|
751
763
|
},
|
|
752
764
|
e(t)
|
|
753
765
|
), r.children[r.children.length - 1];
|
|
754
|
-
},
|
|
766
|
+
}, sr = ({ $tag$: e, $attrs$: t, $children$: r, $text$: s }) => {
|
|
755
767
|
const n = document.createElement("div");
|
|
756
|
-
return
|
|
768
|
+
return ze(n, e, t, r, s), Nt(n.innerHTML, {
|
|
757
769
|
tag_wrap: 40,
|
|
758
770
|
content_wrap: 120
|
|
759
771
|
}).replace(/="true"/g, "");
|
|
@@ -763,26 +775,26 @@ const A = {
|
|
|
763
775
|
const r = t.split("/");
|
|
764
776
|
return `${e}${r.slice(2, r.length - 1).join("-")}--docs`;
|
|
765
777
|
};
|
|
766
|
-
var
|
|
767
|
-
class
|
|
778
|
+
var j, X;
|
|
779
|
+
class nr {
|
|
768
780
|
constructor(t) {
|
|
769
781
|
/**
|
|
770
782
|
* JsonDocs
|
|
771
783
|
*/
|
|
772
|
-
|
|
784
|
+
d(this, "jsonDoc");
|
|
773
785
|
/**
|
|
774
786
|
* Get component data from the jsonDoc
|
|
775
787
|
* @param tagName - tag name we want to get the data from
|
|
776
788
|
* @returns component data
|
|
777
789
|
*/
|
|
778
|
-
|
|
790
|
+
k(this, j, (t) => this.jsonDoc.components.find((r) => r.tag === t));
|
|
779
791
|
/**
|
|
780
792
|
* Get the control for the given prop
|
|
781
793
|
* Based on https://storybook.js.org/docs/api/arg-types#controltype
|
|
782
794
|
* @param prop - prop to get control for
|
|
783
795
|
* @returns control type and options if applicable
|
|
784
796
|
*/
|
|
785
|
-
|
|
797
|
+
k(this, X, (t) => {
|
|
786
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, "|"));
|
|
787
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" } };
|
|
788
800
|
});
|
|
@@ -791,57 +803,57 @@ class tr {
|
|
|
791
803
|
* @param tagName - tag name we want to extract the arg types from
|
|
792
804
|
* @returns component arg types
|
|
793
805
|
*/
|
|
794
|
-
|
|
795
|
-
const r = v(this,
|
|
796
|
-
const { control: g, options: u } = v(this, X).call(this,
|
|
806
|
+
d(this, "extractArgTypes", (t) => {
|
|
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);
|
|
797
809
|
return {
|
|
798
810
|
...p,
|
|
799
|
-
[
|
|
800
|
-
name:
|
|
801
|
-
description:
|
|
802
|
-
type: { required:
|
|
811
|
+
[a.name]: {
|
|
812
|
+
name: a.attr || a.name,
|
|
813
|
+
description: a.docs,
|
|
814
|
+
type: { required: a.required },
|
|
803
815
|
table: {
|
|
804
816
|
category: "props",
|
|
805
|
-
type: { summary:
|
|
806
|
-
defaultValue: { summary:
|
|
817
|
+
type: { summary: a.type },
|
|
818
|
+
defaultValue: { summary: a.default }
|
|
807
819
|
},
|
|
808
820
|
control: g,
|
|
809
821
|
options: u
|
|
810
822
|
}
|
|
811
823
|
};
|
|
812
824
|
}, {}), n = r == null ? void 0 : r.events.reduce(
|
|
813
|
-
(p,
|
|
825
|
+
(p, a) => ({
|
|
814
826
|
...p,
|
|
815
|
-
[
|
|
816
|
-
name:
|
|
817
|
-
description:
|
|
827
|
+
[a.event]: {
|
|
828
|
+
name: a.event,
|
|
829
|
+
description: a.docs,
|
|
818
830
|
table: {
|
|
819
831
|
category: "events",
|
|
820
|
-
type: { summary:
|
|
832
|
+
type: { summary: a.detail }
|
|
821
833
|
}
|
|
822
834
|
}
|
|
823
835
|
}),
|
|
824
836
|
{}
|
|
825
837
|
), i = r == null ? void 0 : r.methods.reduce(
|
|
826
|
-
(p,
|
|
838
|
+
(p, a) => ({
|
|
827
839
|
...p,
|
|
828
|
-
[
|
|
829
|
-
name:
|
|
830
|
-
description:
|
|
840
|
+
[a.name]: {
|
|
841
|
+
name: a.name,
|
|
842
|
+
description: a.docs,
|
|
831
843
|
table: {
|
|
832
844
|
category: "methods",
|
|
833
|
-
type: { summary:
|
|
845
|
+
type: { summary: a.signature }
|
|
834
846
|
}
|
|
835
847
|
}
|
|
836
848
|
}),
|
|
837
849
|
{}
|
|
838
|
-
),
|
|
839
|
-
(p,
|
|
850
|
+
), o = r == null ? void 0 : r.slots.reduce(
|
|
851
|
+
(p, a) => ({
|
|
840
852
|
...p,
|
|
841
|
-
[
|
|
842
|
-
name:
|
|
853
|
+
[a.name]: {
|
|
854
|
+
name: a.name !== "" ? a.name : "default",
|
|
843
855
|
// default slot are unnamed
|
|
844
|
-
description:
|
|
856
|
+
description: a.docs,
|
|
845
857
|
table: {
|
|
846
858
|
category: "slots",
|
|
847
859
|
type: { summary: void 0 }
|
|
@@ -849,12 +861,12 @@ class tr {
|
|
|
849
861
|
}
|
|
850
862
|
}),
|
|
851
863
|
{}
|
|
852
|
-
),
|
|
853
|
-
(p,
|
|
864
|
+
), f = r == null ? void 0 : r.styles.reduce(
|
|
865
|
+
(p, a) => ({
|
|
854
866
|
...p,
|
|
855
|
-
[
|
|
856
|
-
name:
|
|
857
|
-
description:
|
|
867
|
+
[a.name]: {
|
|
868
|
+
name: a.name,
|
|
869
|
+
description: a.docs,
|
|
858
870
|
table: {
|
|
859
871
|
category: "custom properties",
|
|
860
872
|
type: { summary: void 0 }
|
|
@@ -862,12 +874,12 @@ class tr {
|
|
|
862
874
|
}
|
|
863
875
|
}),
|
|
864
876
|
{}
|
|
865
|
-
),
|
|
866
|
-
const g = v(this,
|
|
877
|
+
), c = r == null ? void 0 : r.dependencies.reduce((p, a) => {
|
|
878
|
+
const g = v(this, j).call(this, a);
|
|
867
879
|
return g ? {
|
|
868
880
|
...p,
|
|
869
|
-
[
|
|
870
|
-
name:
|
|
881
|
+
[a]: {
|
|
882
|
+
name: a,
|
|
871
883
|
description: `<a href="./?path=/docs/${J("", g == null ? void 0 : g.filePath)}">View Component Documentation</a>`,
|
|
872
884
|
table: {
|
|
873
885
|
category: "depends on",
|
|
@@ -875,12 +887,12 @@ class tr {
|
|
|
875
887
|
}
|
|
876
888
|
}
|
|
877
889
|
} : p;
|
|
878
|
-
}, {}),
|
|
879
|
-
const g = v(this,
|
|
890
|
+
}, {}), l = r == null ? void 0 : r.dependents.reduce((p, a) => {
|
|
891
|
+
const g = v(this, j).call(this, a);
|
|
880
892
|
return g ? {
|
|
881
893
|
...p,
|
|
882
|
-
[
|
|
883
|
-
name:
|
|
894
|
+
[a]: {
|
|
895
|
+
name: a,
|
|
884
896
|
description: `<a href="./?path=/docs/${J("", g == null ? void 0 : g.filePath)}">View Component Documentation</a>`,
|
|
885
897
|
table: {
|
|
886
898
|
category: "used by",
|
|
@@ -893,10 +905,10 @@ class tr {
|
|
|
893
905
|
...s,
|
|
894
906
|
...n,
|
|
895
907
|
...i,
|
|
896
|
-
...
|
|
908
|
+
...o,
|
|
909
|
+
...f,
|
|
897
910
|
...c,
|
|
898
|
-
...l
|
|
899
|
-
...f
|
|
911
|
+
...l
|
|
900
912
|
};
|
|
901
913
|
});
|
|
902
914
|
/**
|
|
@@ -904,18 +916,18 @@ class tr {
|
|
|
904
916
|
* @param tagName - tag name we want to extract the description from
|
|
905
917
|
* @returns component description
|
|
906
918
|
*/
|
|
907
|
-
|
|
908
|
-
const r = v(this,
|
|
919
|
+
d(this, "extractComponentDescription", (t) => {
|
|
920
|
+
const r = v(this, j).call(this, t);
|
|
909
921
|
return (r == null ? void 0 : r.readme) || (r == null ? void 0 : r.docs);
|
|
910
922
|
});
|
|
911
923
|
this.jsonDoc = t;
|
|
912
924
|
}
|
|
913
925
|
}
|
|
914
|
-
|
|
915
|
-
const
|
|
926
|
+
j = new WeakMap(), X = new WeakMap();
|
|
927
|
+
const It = (e, t) => {
|
|
916
928
|
if (t)
|
|
917
929
|
return `${e}${t}`;
|
|
918
|
-
},
|
|
930
|
+
}, Ie = (e) => {
|
|
919
931
|
let t = e.overview ? `${e.overview}
|
|
920
932
|
|
|
921
933
|
` : "";
|
|
@@ -941,9 +953,9 @@ const Rt = (e, t) => {
|
|
|
941
953
|
`, t += e.slots.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
942
954
|
`).join(""), t += `
|
|
943
955
|
`), t;
|
|
944
|
-
},
|
|
956
|
+
}, se = (e) => `${e.docs}
|
|
945
957
|
|
|
946
|
-
Type: \`${e.type}\``,
|
|
958
|
+
Type: \`${e.type}\``, ir = (e, t, r, s) => ({
|
|
947
959
|
$schema: "https://json.schemastore.org/web-types",
|
|
948
960
|
name: e,
|
|
949
961
|
version: t,
|
|
@@ -954,61 +966,61 @@ Type: \`${e.type}\``, rr = (e, t, r, s) => ({
|
|
|
954
966
|
const i = J(s, n.filePath);
|
|
955
967
|
return {
|
|
956
968
|
name: n.tag,
|
|
957
|
-
description:
|
|
969
|
+
description: Ie(n),
|
|
958
970
|
"doc-url": i,
|
|
959
|
-
attributes: n.props.filter((
|
|
960
|
-
name:
|
|
961
|
-
description:
|
|
971
|
+
attributes: n.props.filter((o) => o.attr).map((o) => ({
|
|
972
|
+
name: o.attr,
|
|
973
|
+
description: se(o),
|
|
962
974
|
"doc-url": i,
|
|
963
975
|
value: {
|
|
964
|
-
type:
|
|
965
|
-
default:
|
|
966
|
-
required:
|
|
976
|
+
type: o.type,
|
|
977
|
+
default: o.default,
|
|
978
|
+
required: o.required
|
|
967
979
|
}
|
|
968
980
|
})),
|
|
969
981
|
js: {
|
|
970
|
-
properties: n.props.map((
|
|
971
|
-
name:
|
|
972
|
-
description:
|
|
982
|
+
properties: n.props.map((o) => ({
|
|
983
|
+
name: o.name,
|
|
984
|
+
description: se(o),
|
|
973
985
|
"doc-url": i,
|
|
974
986
|
value: {
|
|
975
|
-
type:
|
|
976
|
-
default:
|
|
977
|
-
required:
|
|
987
|
+
type: o.type,
|
|
988
|
+
default: o.default,
|
|
989
|
+
required: o.required
|
|
978
990
|
}
|
|
979
991
|
})),
|
|
980
|
-
events: n.events.map((
|
|
981
|
-
name:
|
|
982
|
-
description:
|
|
992
|
+
events: n.events.map((o) => ({
|
|
993
|
+
name: o.event,
|
|
994
|
+
description: o.docs
|
|
983
995
|
}))
|
|
984
996
|
},
|
|
985
997
|
css: {
|
|
986
|
-
properties: n.styles.map((
|
|
987
|
-
name:
|
|
988
|
-
description:
|
|
998
|
+
properties: n.styles.map((o) => ({
|
|
999
|
+
name: o.name,
|
|
1000
|
+
description: o.docs
|
|
989
1001
|
}))
|
|
990
1002
|
}
|
|
991
1003
|
};
|
|
992
1004
|
})
|
|
993
1005
|
}
|
|
994
1006
|
}
|
|
995
|
-
}),
|
|
1007
|
+
}), Lt = (e, t, r) => [
|
|
996
1008
|
{ name: "Storybook", url: J(e, r) },
|
|
997
|
-
{ name: "Sources", url:
|
|
998
|
-
],
|
|
1009
|
+
{ name: "Sources", url: It(t, r) }
|
|
1010
|
+
], Mt = (e) => {
|
|
999
1011
|
if (!e.values.some(({ value: t }) => t === void 0))
|
|
1000
1012
|
return e.values.map(({ value: t }) => ({ name: t }));
|
|
1001
|
-
},
|
|
1013
|
+
}, or = (e, t, r) => ({
|
|
1002
1014
|
version: 1.1,
|
|
1003
1015
|
tags: e.components.map((s) => {
|
|
1004
|
-
const n =
|
|
1016
|
+
const n = Lt(t, r, s.filePath);
|
|
1005
1017
|
return {
|
|
1006
1018
|
name: s.tag,
|
|
1007
|
-
description:
|
|
1019
|
+
description: Ie(s),
|
|
1008
1020
|
attributes: s.props.map((i) => ({
|
|
1009
1021
|
name: i.attr || i.name,
|
|
1010
|
-
description:
|
|
1011
|
-
values:
|
|
1022
|
+
description: se(i),
|
|
1023
|
+
values: Mt(i),
|
|
1012
1024
|
references: n
|
|
1013
1025
|
})),
|
|
1014
1026
|
references: n
|
|
@@ -1016,7 +1028,7 @@ Type: \`${e.type}\``, rr = (e, t, r, s) => ({
|
|
|
1016
1028
|
}),
|
|
1017
1029
|
globalAttributes: [],
|
|
1018
1030
|
valueSets: []
|
|
1019
|
-
}),
|
|
1031
|
+
}), ar = (e) => ({
|
|
1020
1032
|
version: 1.1,
|
|
1021
1033
|
properties: e.components.flatMap(
|
|
1022
1034
|
(t) => t.styles.map((r) => ({
|
|
@@ -1024,47 +1036,47 @@ Type: \`${e.type}\``, rr = (e, t, r, s) => ({
|
|
|
1024
1036
|
description: r.docs
|
|
1025
1037
|
}))
|
|
1026
1038
|
)
|
|
1027
|
-
}),
|
|
1039
|
+
}), lr = (e) => {
|
|
1028
1040
|
const t = { value: "2023", pattern: "yyyy" }, r = { value: "12", pattern: "mm" }, s = { value: "24", pattern: "dd" };
|
|
1029
|
-
return
|
|
1030
|
-
},
|
|
1031
|
-
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,
|
|
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) => {
|
|
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();
|
|
1032
1044
|
return Object.keys(t).length === 0 ? {
|
|
1033
1045
|
locale: i,
|
|
1034
1046
|
messages: { lang: r }
|
|
1035
1047
|
} : {
|
|
1036
1048
|
locale: i,
|
|
1037
|
-
messages: t[
|
|
1049
|
+
messages: t[o] || t[r] || { lang: r }
|
|
1038
1050
|
};
|
|
1039
|
-
},
|
|
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, {
|
|
1040
1052
|
style: "percent",
|
|
1041
1053
|
minimumFractionDigits: r,
|
|
1042
1054
|
maximumFractionDigits: r
|
|
1043
|
-
}).format(e),
|
|
1055
|
+
}).format(e), gr = (e, t, r, s = "short", n = 0) => new Intl.NumberFormat(t, {
|
|
1044
1056
|
style: "unit",
|
|
1045
1057
|
unit: r,
|
|
1046
1058
|
unitDisplay: s,
|
|
1047
1059
|
minimumFractionDigits: n,
|
|
1048
1060
|
maximumFractionDigits: n
|
|
1049
|
-
}).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 }) => {
|
|
1050
1062
|
class s {
|
|
1051
1063
|
constructor(i) {
|
|
1052
1064
|
/**
|
|
1053
1065
|
*
|
|
1054
1066
|
*/
|
|
1055
|
-
|
|
1067
|
+
d(this, "disconnect", e);
|
|
1056
1068
|
/**
|
|
1057
1069
|
*
|
|
1058
1070
|
*/
|
|
1059
|
-
|
|
1071
|
+
d(this, "observe", t);
|
|
1060
1072
|
/**
|
|
1061
1073
|
*
|
|
1062
1074
|
*/
|
|
1063
|
-
|
|
1075
|
+
d(this, "takeRecords", r);
|
|
1064
1076
|
/**
|
|
1065
1077
|
*
|
|
1066
1078
|
*/
|
|
1067
|
-
|
|
1079
|
+
d(this, "cb");
|
|
1068
1080
|
this.cb = i;
|
|
1069
1081
|
}
|
|
1070
1082
|
}
|
|
@@ -1075,25 +1087,25 @@ Type: \`${e.type}\``, rr = (e, t, r, s) => ({
|
|
|
1075
1087
|
value: s
|
|
1076
1088
|
});
|
|
1077
1089
|
}), s;
|
|
1078
|
-
},
|
|
1090
|
+
}, hr = ({ disconnect: e, observe: t }) => {
|
|
1079
1091
|
class r {
|
|
1080
1092
|
constructor(n) {
|
|
1081
1093
|
/**
|
|
1082
1094
|
*
|
|
1083
1095
|
*/
|
|
1084
|
-
|
|
1096
|
+
d(this, "disconnect", e);
|
|
1085
1097
|
/**
|
|
1086
1098
|
*
|
|
1087
1099
|
*/
|
|
1088
|
-
|
|
1100
|
+
d(this, "observe", t);
|
|
1089
1101
|
/**
|
|
1090
1102
|
*
|
|
1091
1103
|
*/
|
|
1092
|
-
|
|
1104
|
+
d(this, "unobserve");
|
|
1093
1105
|
/**
|
|
1094
1106
|
*
|
|
1095
1107
|
*/
|
|
1096
|
-
|
|
1108
|
+
d(this, "cb");
|
|
1097
1109
|
this.cb = n;
|
|
1098
1110
|
}
|
|
1099
1111
|
}
|
|
@@ -1105,18 +1117,18 @@ Type: \`${e.type}\``, rr = (e, t, r, s) => ({
|
|
|
1105
1117
|
});
|
|
1106
1118
|
}), r;
|
|
1107
1119
|
};
|
|
1108
|
-
class
|
|
1120
|
+
class Ut extends Event {
|
|
1109
1121
|
constructor() {
|
|
1110
1122
|
super(...arguments);
|
|
1111
1123
|
/**
|
|
1112
1124
|
*
|
|
1113
1125
|
*/
|
|
1114
|
-
|
|
1126
|
+
d(this, "detail");
|
|
1115
1127
|
}
|
|
1116
1128
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1117
1129
|
}
|
|
1118
|
-
const
|
|
1119
|
-
class e extends
|
|
1130
|
+
const yr = () => {
|
|
1131
|
+
class e extends Ut {
|
|
1120
1132
|
}
|
|
1121
1133
|
return [window, global].forEach((t) => {
|
|
1122
1134
|
Object.defineProperty(t, "SubmitEvent", {
|
|
@@ -1125,7 +1137,7 @@ const $r = () => {
|
|
|
1125
1137
|
value: e
|
|
1126
1138
|
});
|
|
1127
1139
|
}), e;
|
|
1128
|
-
},
|
|
1140
|
+
}, _r = (e) => {
|
|
1129
1141
|
const t = (r) => (setTimeout(r, 1), e(), 0);
|
|
1130
1142
|
return [window, global].forEach((r) => {
|
|
1131
1143
|
Object.defineProperty(r, "requestAnimationFrame", {
|
|
@@ -1136,44 +1148,44 @@ const $r = () => {
|
|
|
1136
1148
|
}), t;
|
|
1137
1149
|
};
|
|
1138
1150
|
export {
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
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,
|
|
1154
1166
|
_e as getParentWindows,
|
|
1155
|
-
|
|
1167
|
+
sr as getStoryHTML,
|
|
1156
1168
|
J as getStorybookUrl,
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
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
|
|
1178
1190
|
};
|
|
1179
1191
|
//# sourceMappingURL=index.es.js.map
|