@mgdis/stencil-helpers 2.2.2 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,34 +1,34 @@
1
- var pe = Object.defineProperty;
2
- var G = (e) => {
1
+ var he = Object.defineProperty;
2
+ var W = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var ge = (e, t, s) => t in e ? pe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
6
- var g = (e, t, s) => ge(e, typeof t != "symbol" ? t + "" : t, s), he = (e, t, s) => t.has(e) || G("Cannot " + s);
7
- var T = (e, t, s) => (he(e, t, "read from private field"), s ? s.call(e) : t.get(e)), B = (e, t, s) => t.has(e) ? G("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s);
8
- const ze = (e = "", t = 10) => {
5
+ var ve = (e, t, s) => t in e ? he(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
6
+ var p = (e, t, s) => ve(e, typeof t != "symbol" ? t + "" : t, s), ye = (e, t, s) => t.has(e) || W("Cannot " + s);
7
+ var x = (e, t, s) => (ye(e, t, "read from private field"), s ? s.call(e) : t.get(e)), B = (e, t, s) => t.has(e) ? W("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s);
8
+ const Ge = (e = "", t = 10) => {
9
9
  const s = new Uint8Array(t);
10
10
  crypto.getRandomValues(s);
11
11
  const r = Array.from(s).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, t);
12
12
  return e !== "" ? `${e}-${r}` : r;
13
- }, Ie = (e) => ye(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
14
- class Ge {
13
+ }, Xe = (e) => me(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
14
+ class Ze {
15
15
  constructor(t = []) {
16
16
  /**
17
17
  * Available classes
18
18
  */
19
- g(this, "classes");
19
+ p(this, "classes");
20
20
  /**
21
21
  * Add class
22
22
  * @param className - class name to add
23
23
  */
24
- g(this, "add", (t) => {
24
+ p(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
- g(this, "delete", (t) => {
31
+ p(this, "delete", (t) => {
32
32
  const s = this.classes.indexOf(t);
33
33
  s > -1 && this.classes.splice(s, 1);
34
34
  });
@@ -37,128 +37,42 @@ class Ge {
37
37
  * @param className - class name to check
38
38
  * @returns class name is in the list
39
39
  */
40
- g(this, "has", (t) => this.classes.includes(t));
40
+ p(this, "has", (t) => this.classes.includes(t));
41
41
  /**
42
42
  * Join classes seperated by spaces
43
43
  * @returns joined values
44
44
  */
45
- g(this, "join", () => this.classes.join(" "));
45
+ p(this, "join", () => this.classes.join(" "));
46
46
  this.classes = t;
47
47
  }
48
48
  }
49
- const Xe = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Ke = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Qe = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Ze = (e) => {
50
- const t = V(e), s = ee(e);
49
+ const Je = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Ke = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Qe = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Ye = (e) => {
50
+ const t = Y(e), s = V(e);
51
51
  return [e, ...t, ...s];
52
- }, V = (e, t = []) => {
52
+ }, Y = (e, t = []) => {
53
53
  if (e.self !== e.top)
54
54
  try {
55
55
  const s = e.parent;
56
- return s ? (t.push(s), V(s, t)) : t;
56
+ return s ? (t.push(s), Y(s, t)) : t;
57
57
  } catch (s) {
58
58
  return console.error("Different hosts between iframes:", s), t;
59
59
  }
60
60
  return t;
61
- }, ee = (e, t = []) => {
61
+ }, V = (e, t = []) => {
62
62
  if (e.frames.length > 0)
63
63
  for (const s of Array.from(e.frames))
64
- t.push(s), ee(s, t);
64
+ t.push(s), V(s, t);
65
65
  return t;
66
- }, ye = (e) => typeof e == "string" && e.trim() !== "", Je = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, Ye = (e) => typeof e == "number" && !Number.isNaN(e), Ve = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, et = async (e) => e();
67
- var H = {
68
- allRenderFn: !1,
69
- cmpDidLoad: !0,
70
- cmpDidUnload: !1,
71
- cmpDidUpdate: !0,
72
- cmpDidRender: !0,
73
- cmpWillLoad: !0,
74
- cmpWillUpdate: !0,
75
- cmpWillRender: !0,
76
- connectedCallback: !0,
77
- disconnectedCallback: !0,
78
- element: !0,
79
- event: !0,
80
- hasRenderFn: !0,
81
- lifecycle: !0,
82
- hostListener: !0,
83
- hostListenerTargetWindow: !0,
84
- hostListenerTargetDocument: !0,
85
- hostListenerTargetBody: !0,
86
- hostListenerTargetParent: !1,
87
- hostListenerTarget: !0,
88
- member: !0,
89
- method: !0,
90
- mode: !0,
91
- observeAttribute: !0,
92
- prop: !0,
93
- propMutable: !0,
94
- reflect: !0,
95
- scoped: !0,
96
- shadowDom: !0,
97
- slot: !0,
98
- cssAnnotations: !0,
99
- state: !0,
100
- style: !0,
101
- formAssociated: !1,
102
- svg: !0,
66
+ }, me = (e) => typeof e == "string" && e.trim() !== "", Ve = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, et = (e) => typeof e == "number" && !Number.isNaN(e), tt = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, st = async (e) => e();
67
+ var C = {
103
68
  updatable: !0,
104
- vdomAttribute: !0,
105
- vdomXlink: !0,
106
- vdomClass: !0,
107
- vdomFunctional: !0,
108
- vdomKey: !0,
109
- vdomListener: !0,
110
- vdomRef: !0,
111
- vdomPropOrAttr: !0,
112
- vdomRender: !0,
113
- vdomStyle: !0,
114
- vdomText: !0,
115
- watchCallback: !0,
116
- taskQueue: !0,
117
- hotModuleReplacement: !1,
118
- isDebug: !1,
119
- isDev: !1,
120
- isTesting: !1,
121
- hydrateServerSide: !1,
122
- hydrateClientSide: !1,
123
- lifecycleDOMEvents: !1,
124
- lazyLoad: !1,
125
- profile: !1,
126
69
  slotRelocation: !0,
127
70
  // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
128
- appendChildSlotFix: !1,
129
- // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
130
- cloneNodeFix: !1,
131
- hydratedAttribute: !1,
132
- hydratedClass: !0,
133
- // TODO(STENCIL-1305): remove this option
134
- scriptDataOpts: !1,
135
- // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
136
- scopedSlotTextContentFix: !1,
137
- // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
138
- shadowDomShim: !1,
139
- // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
140
- slotChildNodesFix: !1,
141
- invisiblePrehydration: !0,
142
- propBoolean: !0,
143
- propNumber: !0,
144
- propString: !0,
145
- constructableCSS: !0,
146
- cmpShouldUpdate: !0,
147
- devTools: !1,
148
- shadowDelegatesFocus: !0,
149
- initializeNextTick: !1,
150
- asyncLoading: !0,
151
- asyncQueue: !1,
152
- transformTagName: !1,
153
- attachStyles: !0,
154
- // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
155
71
  experimentalSlotFixes: !1
156
- }, ve = Object.defineProperty, me = (e, t) => {
72
+ }, be = Object.defineProperty, Se = (e, t) => {
157
73
  for (var s in t)
158
- ve(e, s, { get: t[s], enumerable: !0 });
159
- }, be = "http://www.w3.org/2000/svg", Se = "http://www.w3.org/1999/xhtml", X = (e, t) => t in e, K = "http://www.w3.org/1999/xlink", z = typeof window < "u" ? window : {}, R = z.document || { head: {} };
160
- z.HTMLElement;
161
- var A = {
74
+ be(e, s, { get: t[s], enumerable: !0 });
75
+ }, ke = "http://www.w3.org/2000/svg", xe = "http://www.w3.org/1999/xhtml", G = (e, t) => t in e, X = "http://www.w3.org/1999/xlink", ee = typeof window < "u" ? window : {}, L = ee.document || { head: {} }, _ = {
162
76
  $flags$: 0,
163
77
  $resourcesUrl$: "",
164
78
  jmp: (e) => e(),
@@ -166,13 +80,13 @@ var A = {
166
80
  ael: (e, t, s, r) => e.addEventListener(t, s, r),
167
81
  rel: (e, t, s, r) => e.removeEventListener(t, s, r),
168
82
  ce: (e, t) => new CustomEvent(e, t)
169
- }, ke = (e) => e != null && e !== void 0, te = (e) => (e = typeof e, e === "object" || e === "function"), Te = {};
170
- me(Te, {
83
+ }, Te = (e) => e != null && e !== void 0, te = (e) => (e = typeof e, e === "object" || e === "function"), _e = {};
84
+ Se(_e, {
171
85
  err: () => se,
172
- map: () => xe,
86
+ map: () => Ee,
173
87
  ok: () => P,
174
88
  unwrap: () => Ae,
175
- unwrapErr: () => Ee
89
+ unwrapErr: () => je
176
90
  });
177
91
  var P = (e) => ({
178
92
  isOk: !0,
@@ -183,7 +97,7 @@ var P = (e) => ({
183
97
  isErr: !0,
184
98
  value: e
185
99
  });
186
- function xe(e, t) {
100
+ function Ee(e, t) {
187
101
  if (e.isOk) {
188
102
  const s = t(e.value);
189
103
  return s instanceof Promise ? s.then((r) => P(r)) : P(s);
@@ -198,7 +112,7 @@ var Ae = (e) => {
198
112
  if (e.isOk)
199
113
  return e.value;
200
114
  throw e.value;
201
- }, Ee = (e) => {
115
+ }, je = (e) => {
202
116
  if (e.isErr)
203
117
  return e.value;
204
118
  throw e.value;
@@ -206,30 +120,32 @@ var Ae = (e) => {
206
120
  const t = e.__childNodes || e.childNodes;
207
121
  e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && ne(t, e.tagName).forEach((s) => {
208
122
  var r;
209
- s.nodeType === 1 && s.tagName === "SLOT-FB" && ((r = je(s, s["s-sn"], !1)) != null && r.length ? s.hidden = !0 : s.hidden = !1);
123
+ s.nodeType === 1 && s.tagName === "SLOT-FB" && ((r = Oe(s, s["s-sn"], !1)) != null && r.length ? s.hidden = !0 : s.hidden = !1);
210
124
  });
211
125
  for (const s of t)
212
126
  s.nodeType === 1 && (s.__childNodes || s.childNodes).length && re(s);
213
- }, ne = (e, t, s) => {
214
- let r = 0, n = [], o;
127
+ };
128
+ function ne(e, t, s) {
129
+ let r = 0, n = [], i;
215
130
  for (; r < e.length; r++)
216
- o = e[r], o["s-sr"] && o["s-hn"] === t && n.push(o), n = [...n, ...ne(o.childNodes, t)];
131
+ i = e[r], i["s-sr"] && i["s-hn"] === t && s === void 0 && n.push(i), n = [...n, ...ne(i.childNodes, t, s)];
217
132
  return n;
218
- }, je = (e, t, s = !0) => {
133
+ }
134
+ var Oe = (e, t, s = !0) => {
219
135
  const r = [];
220
136
  for ((s && e["s-sr"] || !e["s-sr"]) && r.push(e); (e = e.nextSibling) && e["s-sn"] === t; )
221
137
  r.push(e);
222
138
  return r;
223
- }, Q = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", _e = (e, t, ...s) => {
224
- let r = null, n = null, o = null, i = !1, u = !1;
225
- const a = [], $ = (l) => {
139
+ }, Z = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", Re = (e, t, ...s) => {
140
+ let r = null, n = null, i = null, o = !1, f = !1;
141
+ const c = [], $ = (l) => {
226
142
  for (let d = 0; d < l.length; d++)
227
- r = l[d], Array.isArray(r) ? $(r) : r != null && typeof r != "boolean" && ((i = !te(r)) && (r = String(r)), i && u ? a[a.length - 1].$text$ += r : a.push(i ? W(null, r) : r), u = i);
143
+ r = l[d], Array.isArray(r) ? $(r) : r != null && typeof r != "boolean" && ((o = !te(r)) && (r = String(r)), o && f ? c[c.length - 1].$text$ += r : c.push(o ? w(null, r) : r), f = o);
228
144
  };
229
145
  $(s);
230
- const f = W(e, null);
231
- return f.$attrs$ = t, a.length > 0 && (f.$children$ = a), f.$key$ = n, f.$name$ = o, f;
232
- }, W = (e, t) => {
146
+ const u = w(e, null);
147
+ return u.$attrs$ = t, c.length > 0 && (u.$children$ = c), u.$key$ = n, u.$name$ = i, u;
148
+ }, w = (e, t) => {
233
149
  const s = {
234
150
  $flags$: 0,
235
151
  $tag$: e,
@@ -238,51 +154,63 @@ var Ae = (e) => {
238
154
  $children$: null
239
155
  };
240
156
  return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
241
- }, Le = {}, Oe = (e) => e && e.$tag$ === Le, Z = (e, t, s, r, n, o) => {
157
+ }, Le = {}, Me = (e) => e && e.$tag$ === Le, J = (e, t, s, r, n, i, o) => {
242
158
  if (s !== r) {
243
- let i = X(e, t), u = t.toLowerCase();
159
+ let f = G(e, t), c = t.toLowerCase();
244
160
  if (t === "class") {
245
- const a = e.classList, $ = J(s);
246
- let f = J(r);
247
- e["s-si"] ? (f.push(e["s-si"]), $.forEach((l) => {
248
- l.startsWith(e["s-si"]) && f.push(l);
249
- }), f = [...new Set(f)], a.add(...f), delete e["s-si"]) : (a.remove(...$.filter((l) => l && !f.includes(l))), a.add(...f.filter((l) => l && !$.includes(l))));
161
+ const $ = e.classList, u = K(s);
162
+ let l = K(r);
163
+ $.remove(...u.filter((d) => d && !l.includes(d))), $.add(...l.filter((d) => d && !u.includes(d)));
250
164
  } else if (t === "style") {
251
- for (const a in s)
252
- (!r || r[a] == null) && (a.includes("-") ? e.style.removeProperty(a) : e.style[a] = "");
253
- for (const a in r)
254
- (!s || r[a] !== s[a]) && (a.includes("-") ? e.style.setProperty(a, r[a]) : e.style[a] = r[a]);
165
+ for (const $ in s)
166
+ (!r || r[$] == null) && ($.includes("-") ? e.style.removeProperty($) : e.style[$] = "");
167
+ for (const $ in r)
168
+ (!s || r[$] !== s[$]) && ($.includes("-") ? e.style.setProperty($, r[$]) : e.style[$] = r[$]);
255
169
  } else if (t !== "key") if (t === "ref")
256
170
  r && r(e);
257
171
  else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
258
- if (t[2] === "-" ? t = t.slice(3) : X(z, u) ? t = u.slice(2) : t = u[2] + t.slice(3), s || r) {
259
- const a = t.endsWith(ie);
260
- t = t.replace(Fe, ""), s && A.rel(e, t, s, a), r && A.ael(e, t, r, a);
172
+ if (t[2] === "-" ? t = t.slice(3) : G(ee, c) ? t = c.slice(2) : t = c[2] + t.slice(3), s || r) {
173
+ const $ = t.endsWith(ie);
174
+ t = t.replace(Ne, ""), s && _.rel(e, t, s, $), r && _.ael(e, t, r, $);
261
175
  }
262
176
  } else {
263
- const a = te(r);
264
- if ((i || a && r !== null) && !n)
177
+ const $ = te(r);
178
+ if ((f || $ && r !== null) && !n)
265
179
  try {
266
180
  if (e.tagName.includes("-"))
267
- e[t] = r;
181
+ e[t] !== r && (e[t] = r);
268
182
  else {
269
- const f = r ?? "";
270
- t === "list" ? i = !1 : (s == null || e[t] != f) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = f : e.setAttribute(t, f));
183
+ const l = r ?? "";
184
+ t === "list" ? f = !1 : (s == null || e[t] != l) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = l : e.setAttribute(t, l));
271
185
  }
272
186
  } catch {
273
187
  }
274
- let $ = !1;
275
- u !== (u = u.replace(/^xlink\:?/, "")) && (t = u, $ = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && ($ ? e.removeAttributeNS(K, t) : e.removeAttribute(t)) : (!i || o & 4 || n) && !a && (r = r === !0 ? "" : r, $ ? e.setAttributeNS(K, t, r) : e.setAttribute(t, r));
188
+ let u = !1;
189
+ c !== (c = c.replace(/^xlink\:?/, "")) && (t = c, u = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (u ? e.removeAttributeNS(X, t) : e.removeAttribute(t)) : (!f || i & 4 || n) && !$ && (r = r === !0 ? "" : r, u ? e.setAttributeNS(X, t, r) : e.setAttribute(t, r));
276
190
  }
277
191
  }
278
- }, Re = /\s/, J = (e) => (typeof e == "object" && "baseVal" in e && (e = e.baseVal), e ? e.split(Re) : []), ie = "Capture", Fe = new RegExp(ie + "$"), oe = (e, t, s) => {
279
- const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, n = e && e.$attrs$ || {}, o = t.$attrs$ || {};
280
- for (const i of Y(Object.keys(n)))
281
- i in o || Z(r, i, n[i], void 0, s, t.$flags$);
282
- for (const i of Y(Object.keys(o)))
283
- Z(r, i, n[i], o[i], s, t.$flags$);
192
+ }, Fe = /\s/, K = (e) => (typeof e == "object" && e && "baseVal" in e && (e = e.baseVal), !e || typeof e != "string" ? [] : e.split(Fe)), ie = "Capture", Ne = new RegExp(ie + "$"), oe = (e, t, s, r) => {
193
+ const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = e && e.$attrs$ || {}, o = t.$attrs$ || {};
194
+ for (const f of Q(Object.keys(i)))
195
+ f in o || J(
196
+ n,
197
+ f,
198
+ i[f],
199
+ void 0,
200
+ s,
201
+ t.$flags$
202
+ );
203
+ for (const f of Q(Object.keys(o)))
204
+ J(
205
+ n,
206
+ f,
207
+ i[f],
208
+ o[f],
209
+ s,
210
+ t.$flags$
211
+ );
284
212
  };
285
- function Y(e) {
213
+ function Q(e) {
286
214
  return e.includes("ref") ? (
287
215
  // we need to sort these to ensure that `'ref'` is the last attr
288
216
  [...e.filter((t) => t !== "ref"), "ref"]
@@ -291,11 +219,11 @@ function Y(e) {
291
219
  e
292
220
  );
293
221
  }
294
- var F, N, E, M = !1, D = !1, I = !1, y = !1, C = (e, t, s) => {
222
+ var M, F, E, N = !1, H = !1, I = !1, v = !1, D = (e, t, s) => {
295
223
  var r;
296
224
  const n = t.$children$[s];
297
- let o = 0, i, u, a;
298
- if (M || (I = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
225
+ let i = 0, o, f, c;
226
+ if (N || (I = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
299
227
  // slot element has fallback content
300
228
  // still create an element that "mocks" the slot element
301
229
  2
@@ -305,214 +233,212 @@ var F, N, E, M = !1, D = !1, I = !1, y = !1, C = (e, t, s) => {
305
233
  // where actual slot content should sit next to
306
234
  1
307
235
  ))), n.$text$ !== null)
308
- i = n.$elm$ = R.createTextNode(n.$text$);
236
+ o = n.$elm$ = L.createTextNode(n.$text$);
309
237
  else if (n.$flags$ & 1)
310
- i = n.$elm$ = R.createTextNode("");
238
+ o = n.$elm$ = L.createTextNode("");
311
239
  else {
312
- if (y || (y = n.$tag$ === "svg"), i = n.$elm$ = R.createElementNS(
313
- y ? be : Se,
314
- !M && H.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
315
- ), y && n.$tag$ === "foreignObject" && (y = !1), oe(null, n, y), ke(F) && i["s-si"] !== F && i.classList.add(i["s-si"] = F), n.$children$)
316
- for (o = 0; o < n.$children$.length; ++o)
317
- u = C(e, n, o), u && i.appendChild(u);
318
- n.$tag$ === "svg" ? y = !1 : i.tagName === "foreignObject" && (y = !0);
240
+ if (v || (v = n.$tag$ === "svg"), o = n.$elm$ = L.createElementNS(
241
+ v ? ke : xe,
242
+ !N && C.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
243
+ ), v && n.$tag$ === "foreignObject" && (v = !1), oe(null, n, v), Te(M) && o["s-si"] !== M && o.classList.add(o["s-si"] = M), n.$children$)
244
+ for (i = 0; i < n.$children$.length; ++i)
245
+ f = D(e, n, i), f && o.appendChild(f);
246
+ n.$tag$ === "svg" ? v = !1 : o.tagName === "foreignObject" && (v = !0);
319
247
  }
320
- return i["s-hn"] = E, n.$flags$ & 3 && (i["s-sr"] = !0, i["s-cr"] = N, i["s-sn"] = n.$name$ || "", i["s-rf"] = (r = n.$attrs$) == null ? void 0 : r.ref, a = e && e.$children$ && e.$children$[s], a && a.$tag$ === n.$tag$ && e.$elm$ && j(e.$elm$, !1), ue(N, i, t.$elm$, e == null ? void 0 : e.$elm$)), i;
321
- }, j = (e, t) => {
322
- A.$flags$ |= 1;
248
+ return o["s-hn"] = E, n.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = F, o["s-sn"] = n.$name$ || "", o["s-rf"] = (r = n.$attrs$) == null ? void 0 : r.ref, c = e && e.$children$ && e.$children$[s], c && c.$tag$ === n.$tag$ && e.$elm$ && A(e.$elm$, !1), $e(F, o, t.$elm$, e == null ? void 0 : e.$elm$)), o;
249
+ }, A = (e, t) => {
250
+ _.$flags$ |= 1;
323
251
  const s = Array.from(e.__childNodes || e.childNodes);
324
- e["s-sr"] && H.experimentalSlotFixes;
252
+ e["s-sr"] && C.experimentalSlotFixes;
325
253
  for (let r = s.length - 1; r >= 0; r--) {
326
254
  const n = s[r];
327
- n["s-hn"] !== E && n["s-ol"] && (k(_(n).parentNode, n, _(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, I = !0), t && j(n, t);
255
+ n["s-hn"] !== E && n["s-ol"] && (k(j(n).parentNode, n, j(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, I = !0), t && A(n, t);
328
256
  }
329
- A.$flags$ &= -2;
330
- }, le = (e, t, s, r, n, o) => {
331
- let i = e["s-cr"] && e["s-cr"].parentNode || e, u;
332
- for (i.shadowRoot && i.tagName === E && (i = i.shadowRoot); n <= o; ++n)
333
- r[n] && (u = C(null, s, n), u && (r[n].$elm$ = u, k(i, u, _(t))));
257
+ _.$flags$ &= -2;
258
+ }, le = (e, t, s, r, n, i) => {
259
+ let o = e["s-cr"] && e["s-cr"].parentNode || e, f;
260
+ for (o.shadowRoot && o.tagName === E && (o = o.shadowRoot); n <= i; ++n)
261
+ r[n] && (f = D(null, s, n), f && (r[n].$elm$ = f, k(o, f, j(t))));
334
262
  }, ae = (e, t, s) => {
335
263
  for (let r = t; r <= s; ++r) {
336
264
  const n = e[r];
337
265
  if (n) {
338
- const o = n.$elm$;
339
- fe(n), o && (D = !0, o["s-ol"] ? o["s-ol"].remove() : j(o, !0), o.remove());
266
+ const i = n.$elm$;
267
+ fe(n), i && (H = !0, i["s-ol"] ? i["s-ol"].remove() : A(i, !0), i.remove());
340
268
  }
341
269
  }
342
- }, Ne = (e, t, s, r, n = !1) => {
343
- let o = 0, i = 0, u = 0, a = 0, $ = t.length - 1, f = t[0], l = t[$], d = r.length - 1, c = r[0], p = r[d], m, v;
344
- for (; o <= $ && i <= d; )
345
- if (f == null)
346
- f = t[++o];
270
+ }, He = (e, t, s, r, n = !1) => {
271
+ let i = 0, o = 0, f = 0, c = 0, $ = t.length - 1, u = t[0], l = t[$], d = r.length - 1, a = r[0], g = r[d], m, y;
272
+ for (; i <= $ && o <= d; )
273
+ if (u == null)
274
+ u = t[++i];
347
275
  else if (l == null)
348
276
  l = t[--$];
349
- else if (c == null)
350
- c = r[++i];
351
- else if (p == null)
352
- p = r[--d];
353
- else if (O(f, c, n))
354
- x(f, c, n), f = t[++o], c = r[++i];
355
- else if (O(l, p, n))
356
- x(l, p, n), l = t[--$], p = r[--d];
357
- else if (O(f, p, n))
358
- (f.$tag$ === "slot" || p.$tag$ === "slot") && j(f.$elm$.parentNode, !1), x(f, p, n), k(e, f.$elm$, l.$elm$.nextSibling), f = t[++o], p = r[--d];
359
- else if (O(l, c, n))
360
- (f.$tag$ === "slot" || p.$tag$ === "slot") && j(l.$elm$.parentNode, !1), x(l, c, n), k(e, l.$elm$, f.$elm$), l = t[--$], c = r[++i];
277
+ else if (a == null)
278
+ a = r[++o];
279
+ else if (g == null)
280
+ g = r[--d];
281
+ else if (R(u, a, n))
282
+ T(u, a, n), u = t[++i], a = r[++o];
283
+ else if (R(l, g, n))
284
+ T(l, g, n), l = t[--$], g = r[--d];
285
+ else if (R(u, g, n))
286
+ (u.$tag$ === "slot" || g.$tag$ === "slot") && A(u.$elm$.parentNode, !1), T(u, g, n), k(e, u.$elm$, l.$elm$.nextSibling), u = t[++i], g = r[--d];
287
+ else if (R(l, a, n))
288
+ (u.$tag$ === "slot" || g.$tag$ === "slot") && A(l.$elm$.parentNode, !1), T(l, a, n), k(e, l.$elm$, u.$elm$), l = t[--$], a = r[++o];
361
289
  else {
362
- for (u = -1, a = o; a <= $; ++a)
363
- if (t[a] && t[a].$key$ !== null && t[a].$key$ === c.$key$) {
364
- u = a;
290
+ for (f = -1, c = i; c <= $; ++c)
291
+ if (t[c] && t[c].$key$ !== null && t[c].$key$ === a.$key$) {
292
+ f = c;
365
293
  break;
366
294
  }
367
- u >= 0 ? (v = t[u], v.$tag$ !== c.$tag$ ? m = C(t && t[i], s, u) : (x(v, c, n), t[u] = void 0, m = v.$elm$), c = r[++i]) : (m = C(t && t[i], s, i), c = r[++i]), m && k(
368
- _(f.$elm$).parentNode,
295
+ f >= 0 ? (y = t[f], y.$tag$ !== a.$tag$ ? m = D(t && t[o], s, f) : (T(y, a, n), t[f] = void 0, m = y.$elm$), a = r[++o]) : (m = D(t && t[o], s, o), a = r[++o]), m && k(
296
+ j(u.$elm$).parentNode,
369
297
  m,
370
- _(f.$elm$)
298
+ j(u.$elm$)
371
299
  );
372
300
  }
373
- o > $ ? le(
301
+ i > $ ? le(
374
302
  e,
375
303
  r[d + 1] == null ? null : r[d + 1].$elm$,
376
304
  s,
377
305
  r,
378
- i,
306
+ o,
379
307
  d
380
- ) : i > d && ae(t, o, $);
381
- }, O = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : s ? (s && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, _ = (e) => e && e["s-ol"] || e, x = (e, t, s = !1) => {
382
- const r = t.$elm$ = e.$elm$, n = e.$children$, o = t.$children$, i = t.$tag$, u = t.$text$;
383
- let a;
384
- u === null ? (y = i === "svg" ? !0 : i === "foreignObject" ? !1 : y, i === "slot" && !M || oe(e, t, y), n !== null && o !== null ? Ne(r, n, t, o, s) : o !== null ? (e.$text$ !== null && (r.textContent = ""), le(r, null, t, o, 0, o.length - 1)) : (
308
+ ) : o > d && ae(t, i, $);
309
+ }, R = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : s ? (s && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, j = (e) => e && e["s-ol"] || e, T = (e, t, s = !1) => {
310
+ const r = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$, f = t.$text$;
311
+ let c;
312
+ f === null ? (v = o === "svg" ? !0 : o === "foreignObject" ? !1 : v, o === "slot" && !N || oe(e, t, v), n !== null && i !== null ? He(r, n, t, i, s) : i !== null ? (e.$text$ !== null && (r.textContent = ""), le(r, null, t, i, 0, i.length - 1)) : (
385
313
  // don't do this on initial render as it can cause non-hydrated content to be removed
386
- !s && H.updatable && n !== null && ae(n, 0, n.length - 1)
387
- ), y && i === "svg" && (y = !1)) : (a = r["s-cr"]) ? a.parentNode.textContent = u : e.$text$ !== u && (r.data = u);
314
+ !s && C.updatable && n !== null && ae(n, 0, n.length - 1)
315
+ ), v && o === "svg" && (v = !1)) : (c = r["s-cr"]) ? c.parentNode.textContent = f : e.$text$ !== f && (r.data = f);
388
316
  }, b = [], ce = (e) => {
389
317
  let t, s, r;
390
318
  const n = e.__childNodes || e.childNodes;
391
- for (const o of n) {
392
- if (o["s-sr"] && (t = o["s-cr"]) && t.parentNode) {
319
+ for (const i of n) {
320
+ if (i["s-sr"] && (t = i["s-cr"]) && t.parentNode) {
393
321
  s = t.parentNode.__childNodes || t.parentNode.childNodes;
394
- const i = o["s-sn"];
322
+ const o = i["s-sn"];
395
323
  for (r = s.length - 1; r >= 0; r--)
396
- if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== o["s-hn"])
397
- if (Q(t, i)) {
398
- let u = b.find((a) => a.$nodeToRelocate$ === t);
399
- D = !0, t["s-sn"] = t["s-sn"] || i, u ? (u.$nodeToRelocate$["s-sh"] = o["s-hn"], u.$slotRefNode$ = o) : (t["s-sh"] = o["s-hn"], b.push({
400
- $slotRefNode$: o,
324
+ if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== i["s-hn"])
325
+ if (Z(t, o)) {
326
+ let f = b.find((c) => c.$nodeToRelocate$ === t);
327
+ H = !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"], b.push({
328
+ $slotRefNode$: i,
401
329
  $nodeToRelocate$: t
402
- })), t["s-sr"] && b.map((a) => {
403
- Q(a.$nodeToRelocate$, t["s-sn"]) && (u = b.find(($) => $.$nodeToRelocate$ === t), u && !a.$slotRefNode$ && (a.$slotRefNode$ = u.$slotRefNode$));
330
+ })), t["s-sr"] && b.map((c) => {
331
+ Z(c.$nodeToRelocate$, t["s-sn"]) && (f = b.find(($) => $.$nodeToRelocate$ === t), f && !c.$slotRefNode$ && (c.$slotRefNode$ = f.$slotRefNode$));
404
332
  });
405
- } else b.some((u) => u.$nodeToRelocate$ === t) || b.push({
333
+ } else b.some((f) => f.$nodeToRelocate$ === t) || b.push({
406
334
  $nodeToRelocate$: t
407
335
  });
408
336
  }
409
- o.nodeType === 1 && ce(o);
337
+ i.nodeType === 1 && ce(i);
410
338
  }
411
339
  }, fe = (e) => {
412
340
  e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(fe);
413
- }, k = (e, t, s) => (typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"] && ue(t["s-cr"], t, e, t.parentElement), e == null ? void 0 : e.insertBefore(t, s));
414
- function ue(e, t, s, r) {
341
+ }, k = (e, t, s) => (typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"] && $e(t["s-cr"], t, e, t.parentElement), e == null ? void 0 : e.insertBefore(t, s));
342
+ function $e(e, t, s, r) {
415
343
  var n;
416
- let o;
417
- if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (o = t["s-si"] || e.parentNode["s-sc"])) {
418
- const i = t["s-sn"], u = t["s-hn"];
419
- if ((n = s.classList) == null || n.add(o + "-s"), r && r.classList.contains(o + "-s")) {
420
- let a = (r.__childNodes || r.childNodes)[0], $ = !1;
421
- for (; a; ) {
422
- if (a["s-sn"] !== i && a["s-hn"] === u && a["s-sr"]) {
344
+ let i;
345
+ if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (i = t["s-si"] || e.parentNode["s-sc"])) {
346
+ const o = t["s-sn"], f = t["s-hn"];
347
+ if ((n = s.classList) == null || n.add(i + "-s"), r && r.classList.contains(i + "-s")) {
348
+ let c = (r.__childNodes || r.childNodes)[0], $ = !1;
349
+ for (; c; ) {
350
+ if (c["s-sn"] !== o && c["s-hn"] === f && c["s-sr"]) {
423
351
  $ = !0;
424
352
  break;
425
353
  }
426
- a = a.nextSibling;
354
+ c = c.nextSibling;
427
355
  }
428
- $ || r.classList.remove(o + "-s");
356
+ $ || r.classList.remove(i + "-s");
429
357
  }
430
358
  }
431
359
  }
432
- var Me = (e, t, s = !1) => {
433
- var r, n, o, i, u;
434
- const a = e.$hostElement$, $ = e.$cmpMeta$, f = e.$vnode$ || W(null, null), l = Oe(t) ? t : _e(null, null, t);
435
- if (E = a.tagName, $.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, $.$attrsToReflect$.map(
436
- ([d, c]) => l.$attrs$[c] = a[d]
360
+ var De = (e, t, s = !1) => {
361
+ var r, n, i, o, f;
362
+ const c = e.$hostElement$, $ = e.$cmpMeta$, u = e.$vnode$ || w(null, null), l = Me(t) ? t : Re(null, null, t);
363
+ if (E = c.tagName, $.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, $.$attrsToReflect$.map(
364
+ ([d, a]) => l.$attrs$[a] = c[d]
437
365
  )), s && l.$attrs$)
438
366
  for (const d of Object.keys(l.$attrs$))
439
- a.hasAttribute(d) && !["key", "ref", "style", "class"].includes(d) && (l.$attrs$[d] = a[d]);
440
- l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = f.$elm$ = a.shadowRoot || a, F = a["s-sc"], M = ($.$flags$ & 1) !== 0, N = a["s-cr"], D = !1, x(f, l, s);
367
+ c.hasAttribute(d) && !["key", "ref", "style", "class"].includes(d) && (l.$attrs$[d] = c[d]);
368
+ l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = u.$elm$ = c.shadowRoot || c, M = c["s-sc"], N = ($.$flags$ & 1) !== 0, F = c["s-cr"], H = !1, T(u, l, s);
441
369
  {
442
- if (A.$flags$ |= 1, I) {
370
+ if (_.$flags$ |= 1, I) {
443
371
  ce(l.$elm$);
444
372
  for (const d of b) {
445
- const c = d.$nodeToRelocate$;
446
- if (!c["s-ol"]) {
447
- const p = R.createTextNode("");
448
- p["s-nr"] = c, k(c.parentNode, c["s-ol"] = p, c);
373
+ const a = d.$nodeToRelocate$;
374
+ if (!a["s-ol"]) {
375
+ const g = L.createTextNode("");
376
+ g["s-nr"] = a, k(a.parentNode, a["s-ol"] = g, a);
449
377
  }
450
378
  }
451
379
  for (const d of b) {
452
- const c = d.$nodeToRelocate$, p = d.$slotRefNode$;
453
- if (p) {
454
- const m = p.parentNode;
455
- let v = p.nextSibling;
380
+ const a = d.$nodeToRelocate$, g = d.$slotRefNode$;
381
+ if (g) {
382
+ const m = g.parentNode;
383
+ let y = g.nextSibling;
456
384
  {
457
- let L = (r = c["s-ol"]) == null ? void 0 : r.previousSibling;
458
- for (; L; ) {
459
- let h = (n = L["s-nr"]) != null ? n : null;
460
- if (h && h["s-sn"] === c["s-sn"] && m === h.parentNode) {
461
- for (h = h.nextSibling; h === c || h != null && h["s-sr"]; )
385
+ let O = (r = a["s-ol"]) == null ? void 0 : r.previousSibling;
386
+ for (; O; ) {
387
+ let h = (n = O["s-nr"]) != null ? n : null;
388
+ if (h && h["s-sn"] === a["s-sn"] && m === (h.__parentNode || h.parentNode)) {
389
+ for (h = h.nextSibling; h === a || h != null && h["s-sr"]; )
462
390
  h = h == null ? void 0 : h.nextSibling;
463
391
  if (!h || !h["s-nr"]) {
464
- v = h;
392
+ y = h;
465
393
  break;
466
394
  }
467
395
  }
468
- L = L.previousSibling;
396
+ O = O.previousSibling;
469
397
  }
470
398
  }
471
- (!v && m !== c.parentNode || c.nextSibling !== v) && c !== v && (!c["s-hn"] && c["s-ol"] && (c["s-hn"] = c["s-ol"].parentNode.nodeName), k(m, c, v), c.nodeType === 1 && c.tagName !== "SLOT-FB" && (c.hidden = (o = c["s-ih"]) != null ? o : !1)), c && typeof p["s-rf"] == "function" && p["s-rf"](c);
399
+ const ge = a.__parentNode || a.parentNode, pe = a.__nextSibling || a.nextSibling;
400
+ (!y && m !== ge || pe !== y) && a !== y && (!a["s-hn"] && a["s-ol"] && (a["s-hn"] = a["s-ol"].parentNode.nodeName), k(m, a, y), a.nodeType === 1 && a.tagName !== "SLOT-FB" && (a.hidden = (i = a["s-ih"]) != null ? i : !1)), a && typeof g["s-rf"] == "function" && g["s-rf"](a);
472
401
  } else
473
- c.nodeType === 1 && (s && (c["s-ih"] = (i = c.hidden) != null ? i : !1), c.hidden = !0);
402
+ a.nodeType === 1 && (s && (a["s-ih"] = (o = a.hidden) != null ? o : !1), a.hidden = !0);
474
403
  }
475
404
  }
476
- D && re(l.$elm$), A.$flags$ &= -2, b.length = 0;
405
+ H && re(l.$elm$), _.$flags$ &= -2, b.length = 0;
477
406
  }
478
- if (H.experimentalScopedSlotChanges && $.$flags$ & 2) {
407
+ if (C.experimentalScopedSlotChanges && $.$flags$ & 2) {
479
408
  const d = l.$elm$.__childNodes || l.$elm$.childNodes;
480
- for (const c of d)
481
- c["s-hn"] !== E && !c["s-sh"] && (s && c["s-ih"] == null && (c["s-ih"] = (u = c.hidden) != null ? u : !1), c.hidden = !0);
409
+ for (const a of d)
410
+ a["s-hn"] !== E && !a["s-sh"] && (s && a["s-ih"] == null && (a["s-ih"] = (f = a.hidden) != null ? f : !1), a.hidden = !0);
482
411
  }
483
- N = void 0;
412
+ F = void 0;
484
413
  };
485
- const De = (e, t, s) => {
414
+ const Ue = (e, t, s) => {
486
415
  [null, void 0, "", !1].includes(s) || ["innerHTML", "style"].includes(t) || e.setAttribute(t, ["object", "function"].includes(typeof s) ? "/!\\ Object props are not rendered in the code example" : s);
487
- }, de = (e, t, s, r, n) => {
416
+ }, ue = (e, t, s, r, n) => {
488
417
  if (t && typeof t == "string") {
489
- const o = document.createElement(t);
490
- Object.keys(s || {}).forEach((i) => {
491
- De(o, i, s[i]);
492
- }), r == null || r.forEach((i) => {
493
- de(o, i.$tag$, i.$attrs$, i.$children$, i.$text$);
494
- }), s != null && s.innerHTML && (o.innerHTML = s.innerHTML), e.appendChild(o);
418
+ const i = document.createElement(t);
419
+ Object.keys(s || {}).forEach((o) => {
420
+ Ue(i, o, s[o]);
421
+ }), r == null || r.forEach((o) => {
422
+ ue(i, o.$tag$, o.$attrs$, o.$children$, o.$text$);
423
+ }), s != null && s.innerHTML && (i.innerHTML = s.innerHTML), e.appendChild(i);
495
424
  }
496
425
  n && (e.innerHTML = n);
497
- }, tt = (e, t) => {
426
+ }, rt = (e, t) => {
498
427
  const s = {};
499
428
  if (typeof e != "object")
500
429
  throw new Error("filterArgs - args isn't an object.");
501
430
  for (const r in e)
502
431
  if (!r.startsWith("slot")) {
503
- const n = e[r], o = r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
504
- (!t || !Object.keys(t).includes(r) || t[r] !== n) && (s[o] = n);
432
+ const n = e[r], i = r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
433
+ (!t || !Object.keys(t).includes(r) || t[r] !== n) && (s[i] = n);
505
434
  }
506
435
  return s;
507
- }, st = (e, t) => {
436
+ }, nt = (e, t) => {
508
437
  var r, n;
509
438
  const s = document.getElementById("storybook-root");
510
439
  if (s !== null)
511
- return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"), Me(
440
+ return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"), De(
512
441
  {
513
- $ancestorComponent$: void 0,
514
- $flags$: 0,
515
- $modeName$: void 0,
516
442
  $cmpMeta$: {
517
443
  $flags$: 0,
518
444
  $tagName$: s.tagName
@@ -521,22 +447,22 @@ const De = (e, t, s) => {
521
447
  },
522
448
  e(t)
523
449
  ), s.children[s.children.length - 1];
524
- }, rt = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
450
+ }, it = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
525
451
  const n = document.createElement("div");
526
- return de(n, e, t, s, r), n.innerHTML;
452
+ return ue(n, e, t, s, r), n.innerHTML;
527
453
  }, U = (e, t) => {
528
454
  if (!t)
529
455
  return;
530
456
  const s = t.split("/");
531
457
  return `${e}${s.slice(2, s.length - 1).join("-")}--docs`;
532
458
  };
533
- var S, w;
534
- class nt {
459
+ var S, q;
460
+ class ot {
535
461
  constructor(t) {
536
462
  /**
537
463
  * JsonDocs
538
464
  */
539
- g(this, "jsonDoc");
465
+ p(this, "jsonDoc");
540
466
  /**
541
467
  * Get component data from the jsonDoc
542
468
  * @param tagName - tag name we want to get the data from
@@ -549,7 +475,7 @@ class nt {
549
475
  * @param prop - prop to get control for
550
476
  * @returns control type and options if applicable
551
477
  */
552
- B(this, w, (t) => {
478
+ B(this, q, (t) => {
553
479
  const s = t.type.replace(/"([^"]+)"/g, "$1").replace(/\s/g, "").replace(/\(.*?\)/g, (r) => r.replace(/\|/g, " OR ")).split("|").map((r) => r.trim().replace(/ OR /g, "|"));
554
480
  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" } } : s.length > 1 ? s.includes("string") ? { control: { type: "text" } } : s.every((r) => r == null ? void 0 : r.includes("[]")) ? { control: { type: "object" } } : (s.unshift(void 0), { control: { type: "select" }, options: s }) : { control: { type: "object" } };
555
481
  });
@@ -558,11 +484,11 @@ class nt {
558
484
  * @param tagName - tag name we want to extract the arg types from
559
485
  * @returns component arg types
560
486
  */
561
- g(this, "extractArgTypes", (t) => {
562
- const s = T(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((f, l) => {
563
- const { control: d, options: c } = T(this, w).call(this, l);
487
+ p(this, "extractArgTypes", (t) => {
488
+ const s = x(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((u, l) => {
489
+ const { control: d, options: a } = x(this, q).call(this, l);
564
490
  return {
565
- ...f,
491
+ ...u,
566
492
  [l.name]: {
567
493
  name: l.attr || l.name,
568
494
  description: l.docs,
@@ -573,12 +499,12 @@ class nt {
573
499
  defaultValue: { summary: l.default }
574
500
  },
575
501
  control: d,
576
- options: c
502
+ options: a
577
503
  }
578
504
  };
579
505
  }, {}), n = s == null ? void 0 : s.events.reduce(
580
- (f, l) => ({
581
- ...f,
506
+ (u, l) => ({
507
+ ...u,
582
508
  [l.event]: {
583
509
  name: l.event,
584
510
  description: l.docs,
@@ -589,9 +515,9 @@ class nt {
589
515
  }
590
516
  }),
591
517
  {}
592
- ), o = s == null ? void 0 : s.methods.reduce(
593
- (f, l) => ({
594
- ...f,
518
+ ), i = s == null ? void 0 : s.methods.reduce(
519
+ (u, l) => ({
520
+ ...u,
595
521
  [l.name]: {
596
522
  name: l.name,
597
523
  description: l.docs,
@@ -602,9 +528,9 @@ class nt {
602
528
  }
603
529
  }),
604
530
  {}
605
- ), i = s == null ? void 0 : s.slots.reduce(
606
- (f, l) => ({
607
- ...f,
531
+ ), o = s == null ? void 0 : s.slots.reduce(
532
+ (u, l) => ({
533
+ ...u,
608
534
  [l.name]: {
609
535
  name: l.name !== "" ? l.name : "default",
610
536
  // default slot are unnamed
@@ -616,9 +542,9 @@ class nt {
616
542
  }
617
543
  }),
618
544
  {}
619
- ), u = s == null ? void 0 : s.styles.reduce(
620
- (f, l) => ({
621
- ...f,
545
+ ), f = s == null ? void 0 : s.styles.reduce(
546
+ (u, l) => ({
547
+ ...u,
622
548
  [l.name]: {
623
549
  name: l.name,
624
550
  description: l.docs,
@@ -629,10 +555,10 @@ class nt {
629
555
  }
630
556
  }),
631
557
  {}
632
- ), a = s == null ? void 0 : s.dependencies.reduce((f, l) => {
633
- const d = T(this, S).call(this, l);
558
+ ), c = s == null ? void 0 : s.dependencies.reduce((u, l) => {
559
+ const d = x(this, S).call(this, l);
634
560
  return {
635
- ...f,
561
+ ...u,
636
562
  [l]: {
637
563
  name: l,
638
564
  description: `<a href="./?path=/docs/${U("", d == null ? void 0 : d.filePath)}">View Component Documentation</a>`,
@@ -642,10 +568,10 @@ class nt {
642
568
  }
643
569
  }
644
570
  };
645
- }, {}), $ = s == null ? void 0 : s.dependents.reduce((f, l) => {
646
- const d = T(this, S).call(this, l);
571
+ }, {}), $ = s == null ? void 0 : s.dependents.reduce((u, l) => {
572
+ const d = x(this, S).call(this, l);
647
573
  return {
648
- ...f,
574
+ ...u,
649
575
  [l]: {
650
576
  name: l,
651
577
  description: `<a href="./?path=/docs/${U("", d == null ? void 0 : d.filePath)}">View Component Documentation</a>`,
@@ -659,10 +585,10 @@ class nt {
659
585
  return {
660
586
  ...r,
661
587
  ...n,
662
- ...o,
663
588
  ...i,
664
- ...u,
665
- ...a,
589
+ ...o,
590
+ ...f,
591
+ ...c,
666
592
  ...$
667
593
  };
668
594
  });
@@ -671,46 +597,46 @@ class nt {
671
597
  * @param tagName - tag name we want to extract the description from
672
598
  * @returns component description
673
599
  */
674
- g(this, "extractComponentDescription", (t) => {
675
- const s = T(this, S).call(this, t);
600
+ p(this, "extractComponentDescription", (t) => {
601
+ const s = x(this, S).call(this, t);
676
602
  return (s == null ? void 0 : s.readme) || (s == null ? void 0 : s.docs);
677
603
  });
678
604
  this.jsonDoc = t;
679
605
  }
680
606
  }
681
- S = new WeakMap(), w = new WeakMap();
682
- const Ce = (e, t) => {
607
+ S = new WeakMap(), q = new WeakMap();
608
+ const qe = (e, t) => {
683
609
  if (t)
684
610
  return `${e}${t}`;
685
- }, $e = (e) => {
611
+ }, de = (e) => {
686
612
  let t = e.overview ? `${e.overview}
687
613
 
688
614
  ` : "";
689
615
  const s = e.props.filter(({ attr: n }) => n !== void 0);
690
616
  s.length && (t += `Attributes:
691
- `, t += s.map(({ attr: n, docs: o }) => `- \`${n}\`: ${o}
617
+ `, t += s.map(({ attr: n, docs: i }) => `- \`${n}\`: ${i}
692
618
  `).join(""), t += `
693
619
  `);
694
620
  const r = e.props.filter(({ attr: n }) => n === void 0);
695
621
  return r.length && (t += `Properties:
696
- `, t += r.map(({ name: n, docs: o }) => `- \`${n}\`: ${o}
622
+ `, t += r.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
697
623
  `).join(""), t += `
698
624
  `), e.methods.length && (t += `Methods:
699
- `, t += e.methods.map(({ name: n, docs: o }) => `- \`${n}\`: ${o}
625
+ `, t += e.methods.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
700
626
  `).join(""), t += `
701
627
  `), e.events.length && (t += `Events:
702
- `, t += e.events.map(({ event: n, docs: o }) => `- \`${n}\`: ${o}
628
+ `, t += e.events.map(({ event: n, docs: i }) => `- \`${n}\`: ${i}
703
629
  `).join(""), t += `
704
630
  `), e.listeners.length && (t += `Listeners:
705
631
  `, t += e.listeners.map(({ event: n }) => `- \`${n}\`
706
632
  `).join(""), t += `
707
633
  `), e.slots.length && (t += `Slots:
708
- `, t += e.slots.map(({ name: n, docs: o }) => `- \`${n}\`: ${o}
634
+ `, t += e.slots.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
709
635
  `).join(""), t += `
710
636
  `), t;
711
- }, q = (e) => `${e.docs}
637
+ }, z = (e) => `${e.docs}
712
638
 
713
- Type: \`${e.type}\``, it = (e, t, s, r) => ({
639
+ Type: \`${e.type}\``, lt = (e, t, s, r) => ({
714
640
  $schema: "https://json.schemastore.org/web-types",
715
641
  name: e,
716
642
  version: t,
@@ -718,64 +644,64 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
718
644
  contributions: {
719
645
  html: {
720
646
  elements: s.components.map((n) => {
721
- const o = U(r, n.filePath);
647
+ const i = U(r, n.filePath);
722
648
  return {
723
649
  name: n.tag,
724
- description: $e(n),
725
- "doc-url": o,
726
- attributes: n.props.filter((i) => i.attr).map((i) => ({
727
- name: i.attr,
728
- description: q(i),
729
- "doc-url": o,
650
+ description: de(n),
651
+ "doc-url": i,
652
+ attributes: n.props.filter((o) => o.attr).map((o) => ({
653
+ name: o.attr,
654
+ description: z(o),
655
+ "doc-url": i,
730
656
  value: {
731
- type: i.type,
732
- default: i.default,
733
- required: i.required
657
+ type: o.type,
658
+ default: o.default,
659
+ required: o.required
734
660
  }
735
661
  })),
736
662
  js: {
737
- properties: n.props.map((i) => ({
738
- name: i.name,
739
- description: q(i),
740
- "doc-url": o,
663
+ properties: n.props.map((o) => ({
664
+ name: o.name,
665
+ description: z(o),
666
+ "doc-url": i,
741
667
  value: {
742
- type: i.type,
743
- default: i.default,
744
- required: i.required
668
+ type: o.type,
669
+ default: o.default,
670
+ required: o.required
745
671
  }
746
672
  })),
747
- events: n.events.map((i) => ({
748
- name: i.event,
749
- description: i.docs
673
+ events: n.events.map((o) => ({
674
+ name: o.event,
675
+ description: o.docs
750
676
  }))
751
677
  },
752
678
  css: {
753
- properties: n.styles.map((i) => ({
754
- name: i.name,
755
- description: i.docs
679
+ properties: n.styles.map((o) => ({
680
+ name: o.name,
681
+ description: o.docs
756
682
  }))
757
683
  }
758
684
  };
759
685
  })
760
686
  }
761
687
  }
762
- }), Ue = (e, t, s) => [
688
+ }), Ce = (e, t, s) => [
763
689
  { name: "Storybook", url: U(e, s) },
764
- { name: "Sources", url: Ce(t, s) }
765
- ], we = (e) => {
690
+ { name: "Sources", url: qe(t, s) }
691
+ ], Be = (e) => {
766
692
  if (!e.values.some(({ value: t }) => t === void 0))
767
693
  return e.values.map(({ value: t }) => ({ name: t }));
768
- }, ot = (e, t, s) => ({
694
+ }, at = (e, t, s) => ({
769
695
  version: 1.1,
770
696
  tags: e.components.map((r) => {
771
- const n = Ue(t, s, r.filePath);
697
+ const n = Ce(t, s, r.filePath);
772
698
  return {
773
699
  name: r.tag,
774
- description: $e(r),
775
- attributes: r.props.map((o) => ({
776
- name: o.attr || o.name,
777
- description: q(o),
778
- values: we(o),
700
+ description: de(r),
701
+ attributes: r.props.map((i) => ({
702
+ name: i.attr || i.name,
703
+ description: z(i),
704
+ values: Be(i),
779
705
  references: n
780
706
  })),
781
707
  references: n
@@ -783,7 +709,7 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
783
709
  }),
784
710
  globalAttributes: [],
785
711
  valueSets: []
786
- }), lt = (e) => ({
712
+ }), ct = (e) => ({
787
713
  version: 1.1,
788
714
  properties: e.components.flatMap(
789
715
  (t) => t.styles.map((s) => ({
@@ -791,48 +717,48 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
791
717
  description: s.docs
792
718
  }))
793
719
  )
794
- }), at = (e) => {
720
+ }), ft = (e) => {
795
721
  const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
796
- return Pe([t.value, s.value, r.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
797
- }, ct = (e) => e.toISOString().split("T")[0], He = (e, t, s) => {
798
- const r = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), o = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || s, i = o.split("-").shift();
722
+ return ze([t.value, s.value, r.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
723
+ }, $t = (e) => e.toISOString().split("T")[0], Pe = (e, t, s) => {
724
+ const r = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), i = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || s, o = i.split("-").shift();
799
725
  return Object.keys(t).length === 0 ? {
800
- locale: o,
726
+ locale: i,
801
727
  messages: { lang: s }
802
728
  } : {
803
- locale: o,
804
- messages: t[i] || t[s] || { lang: s }
729
+ locale: i,
730
+ messages: t[o] || t[s] || { lang: s }
805
731
  };
806
- }, ft = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), ut = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), dt = (e, t, s = 0) => new Intl.NumberFormat(t, {
732
+ }, ut = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), dt = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), gt = (e, t, s = 0) => new Intl.NumberFormat(t, {
807
733
  style: "percent",
808
734
  minimumFractionDigits: s,
809
735
  maximumFractionDigits: s
810
- }).format(e), $t = (e, t, s, r = "short", n = 0) => new Intl.NumberFormat(t, {
736
+ }).format(e), pt = (e, t, s, r = "short", n = 0) => new Intl.NumberFormat(t, {
811
737
  style: "unit",
812
738
  unit: s,
813
739
  unitDisplay: r,
814
740
  minimumFractionDigits: n,
815
741
  maximumFractionDigits: n
816
- }).format(e), Be = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, Pe = (e, t, s) => typeof e != "string" || e === "" || !Be.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), pt = (e, t) => (s) => He(s, e, t), gt = ({ disconnect: e, observe: t, takeRecords: s }) => {
742
+ }).format(e), we = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, ze = (e, t, s) => typeof e != "string" || e === "" || !we.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), ht = (e, t) => (s) => Pe(s, e, t), vt = ({ disconnect: e, observe: t, takeRecords: s }) => {
817
743
  class r {
818
- constructor(o) {
744
+ constructor(i) {
819
745
  /**
820
746
  *
821
747
  */
822
- g(this, "disconnect", e);
748
+ p(this, "disconnect", e);
823
749
  /**
824
750
  *
825
751
  */
826
- g(this, "observe", t);
752
+ p(this, "observe", t);
827
753
  /**
828
754
  *
829
755
  */
830
- g(this, "takeRecords", s);
756
+ p(this, "takeRecords", s);
831
757
  /**
832
758
  *
833
759
  */
834
- g(this, "cb");
835
- this.cb = o;
760
+ p(this, "cb");
761
+ this.cb = i;
836
762
  }
837
763
  }
838
764
  return [window, global].forEach((n) => {
@@ -842,25 +768,25 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
842
768
  value: r
843
769
  });
844
770
  }), r;
845
- }, ht = ({ disconnect: e, observe: t }) => {
771
+ }, yt = ({ disconnect: e, observe: t }) => {
846
772
  class s {
847
773
  constructor(n) {
848
774
  /**
849
775
  *
850
776
  */
851
- g(this, "disconnect", e);
777
+ p(this, "disconnect", e);
852
778
  /**
853
779
  *
854
780
  */
855
- g(this, "observe", t);
781
+ p(this, "observe", t);
856
782
  /**
857
783
  *
858
784
  */
859
- g(this, "unobserve");
785
+ p(this, "unobserve");
860
786
  /**
861
787
  *
862
788
  */
863
- g(this, "cb");
789
+ p(this, "cb");
864
790
  this.cb = n;
865
791
  }
866
792
  }
@@ -872,18 +798,18 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
872
798
  });
873
799
  }), s;
874
800
  };
875
- class We extends Event {
801
+ class Ie extends Event {
876
802
  constructor() {
877
803
  super(...arguments);
878
804
  /**
879
805
  *
880
806
  */
881
- g(this, "detail");
807
+ p(this, "detail");
882
808
  }
883
809
  // eslint-disable-line @typescript-eslint/no-explicit-any
884
810
  }
885
- const yt = () => {
886
- class e extends We {
811
+ const mt = () => {
812
+ class e extends Ie {
887
813
  }
888
814
  return [window, global].forEach((t) => {
889
815
  Object.defineProperty(t, "SubmitEvent", {
@@ -892,7 +818,7 @@ const yt = () => {
892
818
  value: e
893
819
  });
894
820
  }), e;
895
- }, vt = (e) => {
821
+ }, bt = (e) => {
896
822
  const t = (s) => (setTimeout(s, 1), e(), 0);
897
823
  return [window, global].forEach((s) => {
898
824
  Object.defineProperty(s, "requestAnimationFrame", {
@@ -903,39 +829,39 @@ const yt = () => {
903
829
  }), t;
904
830
  };
905
831
  export {
906
- Ge as ClassList,
907
- nt as StorybookPreview,
908
- Xe as allItemsAreString,
909
- Ve as cleanString,
910
- ze as createID,
911
- Be as dateRegExp,
912
- ct as dateToString,
913
- pt as defineLocales,
914
- tt as filterArgs,
832
+ Ze as ClassList,
833
+ ot as StorybookPreview,
834
+ Je as allItemsAreString,
835
+ tt as cleanString,
836
+ Ge as createID,
837
+ we as dateRegExp,
838
+ $t as dateToString,
839
+ ht as defineLocales,
840
+ rt as filterArgs,
915
841
  Qe as focusableElements,
916
- at as getLocaleDatePattern,
917
- V as getParentWindows,
918
- rt as getStoryHTML,
842
+ ft as getLocaleDatePattern,
843
+ Y as getParentWindows,
844
+ it as getStoryHTML,
919
845
  U as getStorybookUrl,
920
- Ze as getWindows,
846
+ Ye as getWindows,
921
847
  Ke as isTagName,
922
- Ye as isValidNumber,
923
- ye as isValidString,
924
- Ie as isValideID,
925
- ft as localeCurrency,
926
- Pe as localeDate,
927
- ut as localeNumber,
928
- dt as localePercent,
929
- $t as localeUnit,
930
- et as nextTick,
931
- vt as setUpRequestAnimationFrameMock,
932
- gt as setupMutationObserverMock,
933
- ht as setupResizeObserverMock,
934
- yt as setupSubmitEventMock,
935
- st as stencilWrapper,
936
- Je as toString,
937
- lt as vsCodeCssGenerator,
938
- ot as vsCodeGenerator,
939
- it as webTypesGenerator
848
+ et as isValidNumber,
849
+ me as isValidString,
850
+ Xe as isValideID,
851
+ ut as localeCurrency,
852
+ ze as localeDate,
853
+ dt as localeNumber,
854
+ gt as localePercent,
855
+ pt as localeUnit,
856
+ st as nextTick,
857
+ bt as setUpRequestAnimationFrameMock,
858
+ vt as setupMutationObserverMock,
859
+ yt as setupResizeObserverMock,
860
+ mt as setupSubmitEventMock,
861
+ nt as stencilWrapper,
862
+ Ve as toString,
863
+ ct as vsCodeCssGenerator,
864
+ at as vsCodeGenerator,
865
+ lt as webTypesGenerator
940
866
  };
941
867
  //# sourceMappingURL=index.es.js.map