@mgdis/stencil-helpers 1.1.8 → 1.1.9

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
@@ -4,7 +4,7 @@ var X = (e) => {
4
4
  };
5
5
  var he = (e, t, s) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
6
6
  var g = (e, t, s) => he(e, typeof t != "symbol" ? t + "" : t, s), ye = (e, t, s) => t.has(e) || X("Cannot " + s);
7
- var k = (e, t, s) => (ye(e, t, "read from private field"), s ? s.call(e) : t.get(e)), w = (e, t, s) => t.has(e) ? X("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s);
7
+ var k = (e, t, s) => (ye(e, t, "read from private field"), s ? s.call(e) : t.get(e)), P = (e, t, s) => t.has(e) ? X("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s);
8
8
  const ze = (e = "", t = 10) => {
9
9
  const s = new Uint8Array(t);
10
10
  crypto.getRandomValues(s);
@@ -64,7 +64,7 @@ const Ge = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Xe =
64
64
  t.push(s), se(s, t);
65
65
  return t;
66
66
  }, Ze = (e) => typeof e == "string" && e.trim() !== "", Je = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, Ye = async (e) => e();
67
- var P = {
67
+ var E = {
68
68
  allRenderFn: !1,
69
69
  cmpDidLoad: !0,
70
70
  cmpDidUnload: !1,
@@ -147,7 +147,7 @@ var P = {
147
147
  devTools: !1,
148
148
  shadowDelegatesFocus: !0,
149
149
  initializeNextTick: !1,
150
- asyncLoading: !1,
150
+ asyncLoading: !0,
151
151
  asyncQueue: !1,
152
152
  transformTagName: !1,
153
153
  attachStyles: !0,
@@ -156,9 +156,9 @@ var P = {
156
156
  }, me = Object.defineProperty, be = (e, t) => {
157
157
  for (var s in t)
158
158
  me(e, s, { get: t[s], enumerable: !0 });
159
- }, K = (e, t) => t in e, Q = "http://www.w3.org/1999/xlink", q = typeof window < "u" ? window : {}, M = q.document || { head: {} };
159
+ }, K = (e, t) => t in e, Q = "http://www.w3.org/1999/xlink", q = typeof window < "u" ? window : {}, _ = q.document || { head: {} };
160
160
  q.HTMLElement;
161
- var E = {
161
+ var L = {
162
162
  $flags$: 0,
163
163
  $resourcesUrl$: "",
164
164
  jmp: (e) => e(),
@@ -206,12 +206,12 @@ var Ee = (e) => {
206
206
  let r = null, o = null, n = null, l = !1, a = !1;
207
207
  const c = [], d = (i) => {
208
208
  for (let $ = 0; $ < i.length; $++)
209
- r = i[$], Array.isArray(r) ? d(r) : r != null && typeof r != "boolean" && ((l = !re(r)) && (r = String(r)), l && a ? c[c.length - 1].$text$ += r : c.push(l ? H(null, r) : r), a = l);
209
+ r = i[$], Array.isArray(r) ? d(r) : r != null && typeof r != "boolean" && ((l = !re(r)) && (r = String(r)), l && a ? c[c.length - 1].$text$ += r : c.push(l ? W(null, r) : r), a = l);
210
210
  };
211
211
  d(s);
212
- const f = H(e, null);
212
+ const f = W(e, null);
213
213
  return f.$attrs$ = t, c.length > 0 && (f.$children$ = c), f.$key$ = o, f.$name$ = n, f;
214
- }, H = (e, t) => {
214
+ }, W = (e, t) => {
215
215
  const s = {
216
216
  $flags$: 0,
217
217
  $tag$: e,
@@ -236,7 +236,7 @@ var Ee = (e) => {
236
236
  else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
237
237
  if (t[2] === "-" ? t = t.slice(3) : K(q, a) ? t = a.slice(2) : t = a[2] + t.slice(3), s || r) {
238
238
  const c = t.endsWith(ne);
239
- t = t.replace(Ne, ""), s && E.rel(e, t, s, c), r && E.ael(e, t, r, c);
239
+ t = t.replace(_e, ""), s && L.rel(e, t, s, c), r && L.ael(e, t, r, c);
240
240
  }
241
241
  } else {
242
242
  const c = re(r);
@@ -246,7 +246,7 @@ var Ee = (e) => {
246
246
  e[t] = r;
247
247
  else {
248
248
  const f = r ?? "";
249
- t === "list" ? l = !1 : (s == null || e[t] != f) && (e[t] = f);
249
+ t === "list" ? l = !1 : (s == null || e[t] != f) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = f : e.setAttribute(t, f));
250
250
  }
251
251
  } catch {
252
252
  }
@@ -254,7 +254,7 @@ var Ee = (e) => {
254
254
  a !== (a = a.replace(/^xlink\:?/, "")) && (t = a, d = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (d ? e.removeAttributeNS(Q, t) : e.removeAttribute(t)) : (!l || n & 4 || o) && !c && (r = r === !0 ? "" : r, d ? e.setAttributeNS(Q, t, r) : e.setAttribute(t, r));
255
255
  }
256
256
  }
257
- }, Me = /\s/, Y = (e) => e ? e.split(Me) : [], ne = "Capture", Ne = new RegExp(ne + "$"), le = (e, t, s) => {
257
+ }, Me = /\s/, Y = (e) => e ? e.split(Me) : [], ne = "Capture", _e = new RegExp(ne + "$"), le = (e, t, s) => {
258
258
  const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, o = e && e.$attrs$ || Z, n = t.$attrs$ || Z;
259
259
  for (const l of V(Object.keys(o)))
260
260
  l in n || J(r, l, o[l], void 0, s, t.$flags$);
@@ -270,7 +270,7 @@ function V(e) {
270
270
  e
271
271
  );
272
272
  }
273
- var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
273
+ var x, H, j, N = !1, F = !1, z = !1, h = !1, C = (e, t, s, r) => {
274
274
  var o;
275
275
  const n = t.$children$[s];
276
276
  let l = 0, a, c, d;
@@ -284,45 +284,45 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
284
284
  // where actual slot content should sit next to
285
285
  1
286
286
  ))), n.$text$ !== null)
287
- a = n.$elm$ = M.createTextNode(n.$text$);
287
+ a = n.$elm$ = _.createTextNode(n.$text$);
288
288
  else if (n.$flags$ & 1)
289
- a = n.$elm$ = M.createTextNode("");
289
+ a = n.$elm$ = _.createTextNode("");
290
290
  else {
291
- if (h || (h = n.$tag$ === "svg"), a = n.$elm$ = M.createElementNS(
291
+ if (h || (h = n.$tag$ === "svg"), a = n.$elm$ = _.createElementNS(
292
292
  h ? Se : Te,
293
- !N && P.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
294
- ), h && n.$tag$ === "foreignObject" && (h = !1), le(null, n, h), ke(x) && a["s-si"] !== x && a.classList.add(a["s-si"] = x), G(a, r), n.$children$)
293
+ !N && E.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
294
+ ), h && n.$tag$ === "foreignObject" && (h = !1), le(null, n, h), !!a.getRootNode().querySelector("body") && E.scoped && ke(x) && a["s-si"] !== x && a.classList.add(a["s-si"] = x), G(a, r), n.$children$)
295
295
  for (l = 0; l < n.$children$.length; ++l)
296
- c = F(e, n, l, a), c && a.appendChild(c);
296
+ c = C(e, n, l, a), c && a.appendChild(c);
297
297
  n.$tag$ === "svg" ? h = !1 : a.tagName === "foreignObject" && (h = !0);
298
298
  }
299
- return a["s-hn"] = L, n.$flags$ & 3 && (a["s-sr"] = !0, a["s-cr"] = B, a["s-sn"] = n.$name$ || "", a["s-rf"] = (o = n.$attrs$) == null ? void 0 : o.ref, d = e && e.$children$ && e.$children$[s], d && d.$tag$ === n.$tag$ && e.$elm$ && j(e.$elm$, !1)), a;
300
- }, j = (e, t) => {
301
- E.$flags$ |= 1;
299
+ return a["s-hn"] = j, n.$flags$ & 3 && (a["s-sr"] = !0, a["s-cr"] = H, a["s-sn"] = n.$name$ || "", a["s-rf"] = (o = n.$attrs$) == null ? void 0 : o.ref, d = e && e.$children$ && e.$children$[s], d && d.$tag$ === n.$tag$ && e.$elm$ && R(e.$elm$, !1)), a;
300
+ }, R = (e, t) => {
301
+ L.$flags$ |= 1;
302
302
  const s = Array.from(e.childNodes);
303
- if (e["s-sr"] && P.experimentalSlotFixes) {
303
+ if (e["s-sr"] && E.experimentalSlotFixes) {
304
304
  let r = e;
305
305
  for (; r = r.nextSibling; )
306
- r && r["s-sn"] === e["s-sn"] && r["s-sh"] === L && s.push(r);
306
+ r && r["s-sn"] === e["s-sn"] && r["s-sh"] === j && s.push(r);
307
307
  }
308
308
  for (let r = s.length - 1; r >= 0; r--) {
309
309
  const o = s[r];
310
- o["s-hn"] !== L && o["s-ol"] && (T(ce(o), o, I(o)), o["s-ol"].remove(), o["s-ol"] = void 0, o["s-sh"] = void 0, z = !0), t && j(o, t);
310
+ o["s-hn"] !== j && o["s-ol"] && (T(ce(o), o, I(o)), o["s-ol"].remove(), o["s-ol"] = void 0, o["s-sh"] = void 0, z = !0), t && R(o, t);
311
311
  }
312
- E.$flags$ &= -2;
312
+ L.$flags$ &= -2;
313
313
  }, ie = (e, t, s, r, o, n) => {
314
314
  let l = e["s-cr"] && e["s-cr"].parentNode || e, a;
315
- for (l.shadowRoot && l.tagName === L && (l = l.shadowRoot); o <= n; ++o)
316
- r[o] && (a = F(null, s, o, e), a && (r[o].$elm$ = a, T(l, a, I(t))));
315
+ for (l.shadowRoot && l.tagName === j && (l = l.shadowRoot); o <= n; ++o)
316
+ r[o] && (a = C(null, s, o, e), a && (r[o].$elm$ = a, T(l, a, I(t))));
317
317
  }, ae = (e, t, s) => {
318
318
  for (let r = t; r <= s; ++r) {
319
319
  const o = e[r];
320
320
  if (o) {
321
321
  const n = o.$elm$;
322
- $e(o), n && (_ = !0, n["s-ol"] ? n["s-ol"].remove() : j(n, !0), n.remove());
322
+ $e(o), n && (F = !0, n["s-ol"] ? n["s-ol"].remove() : R(n, !0), n.remove());
323
323
  }
324
324
  }
325
- }, _e = (e, t, s, r, o = !1) => {
325
+ }, Ne = (e, t, s, r, o = !1) => {
326
326
  let n = 0, l = 0, a = 0, c = 0, d = t.length - 1, f = t[0], i = t[d], $ = r.length - 1, u = r[0], p = r[$], m, y;
327
327
  for (; n <= d && l <= $; )
328
328
  if (f == null)
@@ -333,21 +333,21 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
333
333
  u = r[++l];
334
334
  else if (p == null)
335
335
  p = r[--$];
336
- else if (O(f, u, o))
336
+ else if (M(f, u, o))
337
337
  A(f, u, o), f = t[++n], u = r[++l];
338
- else if (O(i, p, o))
338
+ else if (M(i, p, o))
339
339
  A(i, p, o), i = t[--d], p = r[--$];
340
- else if (O(f, p, o))
341
- (f.$tag$ === "slot" || p.$tag$ === "slot") && j(f.$elm$.parentNode, !1), A(f, p, o), T(e, f.$elm$, i.$elm$.nextSibling), f = t[++n], p = r[--$];
342
- else if (O(i, u, o))
343
- (f.$tag$ === "slot" || p.$tag$ === "slot") && j(i.$elm$.parentNode, !1), A(i, u, o), T(e, i.$elm$, f.$elm$), i = t[--d], u = r[++l];
340
+ else if (M(f, p, o))
341
+ (f.$tag$ === "slot" || p.$tag$ === "slot") && R(f.$elm$.parentNode, !1), A(f, p, o), T(e, f.$elm$, i.$elm$.nextSibling), f = t[++n], p = r[--$];
342
+ else if (M(i, u, o))
343
+ (f.$tag$ === "slot" || p.$tag$ === "slot") && R(i.$elm$.parentNode, !1), A(i, u, o), T(e, i.$elm$, f.$elm$), i = t[--d], u = r[++l];
344
344
  else {
345
345
  for (a = -1, c = n; c <= d; ++c)
346
346
  if (t[c] && t[c].$key$ !== null && t[c].$key$ === u.$key$) {
347
347
  a = c;
348
348
  break;
349
349
  }
350
- a >= 0 ? (y = t[a], y.$tag$ !== u.$tag$ ? m = F(t && t[l], s, a, e) : (A(y, u, o), t[a] = void 0, m = y.$elm$), u = r[++l]) : (m = F(t && t[l], s, l, e), u = r[++l]), m && T(ce(f.$elm$), m, I(f.$elm$));
350
+ a >= 0 ? (y = t[a], y.$tag$ !== u.$tag$ ? m = C(t && t[l], s, a, e) : (A(y, u, o), t[a] = void 0, m = y.$elm$), u = r[++l]) : (m = C(t && t[l], s, l, e), u = r[++l]), m && T(ce(f.$elm$), m, I(f.$elm$));
351
351
  }
352
352
  n > d ? ie(
353
353
  e,
@@ -357,10 +357,19 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
357
357
  l,
358
358
  $
359
359
  ) : l > $ && ae(t, n, d);
360
- }, O = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : s ? !0 : e.$key$ === t.$key$ : !1, I = (e) => e && e["s-ol"] || e, ce = (e) => (e["s-ol"] ? e["s-ol"] : e).parentNode, A = (e, t, s = !1) => {
360
+ }, M = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? (
361
+ // The component gets hydrated and no VDOM has been initialized.
362
+ // Here the comparison can't happen as $name$ property is not set for `leftNode`.
363
+ "$nodeId$" in e && s && // `leftNode` is not from type HTMLComment which would cause many
364
+ // hydration comments to be removed
365
+ e.$elm$.nodeType !== 8 ? !1 : e.$name$ === t.$name$
366
+ ) : s ? !0 : e.$key$ === t.$key$ : !1, I = (e) => e && e["s-ol"] || e, ce = (e) => (e["s-ol"] ? e["s-ol"] : e).parentNode, A = (e, t, s = !1) => {
361
367
  const r = t.$elm$ = e.$elm$, o = e.$children$, n = t.$children$, l = t.$tag$, a = t.$text$;
362
368
  let c;
363
- a === null ? (h = l === "svg" ? !0 : l === "foreignObject" ? !1 : h, l === "slot" && !N || le(e, t, h), o !== null && n !== null ? _e(r, o, t, n, s) : n !== null ? (e.$text$ !== null && (r.textContent = ""), ie(r, null, t, n, 0, n.length - 1)) : o !== null && ae(o, 0, o.length - 1), h && l === "svg" && (h = !1)) : (c = r["s-cr"]) ? c.parentNode.textContent = a : e.$text$ !== a && (r.data = a);
369
+ a === null ? (h = l === "svg" ? !0 : l === "foreignObject" ? !1 : h, l === "slot" && !N || le(e, t, h), o !== null && n !== null ? Ne(r, o, t, n, s) : n !== null ? (e.$text$ !== null && (r.textContent = ""), ie(r, null, t, n, 0, n.length - 1)) : (
370
+ // don't do this on initial render as it can cause non-hydrated content to be removed
371
+ !s && E.updatable && o !== null && ae(o, 0, o.length - 1)
372
+ ), h && l === "svg" && (h = !1)) : (c = r["s-cr"]) ? c.parentNode.textContent = a : e.$text$ !== a && (r.data = a);
364
373
  }, fe = (e) => {
365
374
  const t = e.childNodes;
366
375
  for (const s of t)
@@ -390,10 +399,10 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
390
399
  s = t.parentNode.childNodes;
391
400
  const n = o["s-sn"];
392
401
  for (r = s.length - 1; r >= 0; r--)
393
- if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== o["s-hn"] && !P.experimentalSlotFixes)
402
+ if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== o["s-hn"] && !E.experimentalSlotFixes)
394
403
  if (ee(t, n)) {
395
404
  let l = b.find((a) => a.$nodeToRelocate$ === t);
396
- _ = !0, t["s-sn"] = t["s-sn"] || n, l ? (l.$nodeToRelocate$["s-sh"] = o["s-hn"], l.$slotRefNode$ = o) : (t["s-sh"] = o["s-hn"], b.push({
405
+ F = !0, t["s-sn"] = t["s-sn"] || n, l ? (l.$nodeToRelocate$["s-sh"] = o["s-hn"], l.$slotRefNode$ = o) : (t["s-sh"] = o["s-hn"], b.push({
397
406
  $slotRefNode$: o,
398
407
  $nodeToRelocate$: t
399
408
  })), t["s-sr"] && b.map((a) => {
@@ -428,20 +437,20 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
428
437
  }
429
438
  }, Fe = (e, t, s = !1) => {
430
439
  var r, o, n, l, a;
431
- const c = e.$hostElement$, d = e.$cmpMeta$, f = e.$vnode$ || H(null, null), i = Oe(t) ? t : je(null, null, t);
432
- if (L = c.tagName, d.$attrsToReflect$ && (i.$attrs$ = i.$attrs$ || {}, d.$attrsToReflect$.map(
440
+ const c = e.$hostElement$, d = e.$cmpMeta$, f = e.$vnode$ || W(null, null), i = Oe(t) ? t : je(null, null, t);
441
+ if (j = c.tagName, d.$attrsToReflect$ && (i.$attrs$ = i.$attrs$ || {}, d.$attrsToReflect$.map(
433
442
  ([$, u]) => i.$attrs$[u] = c[$]
434
443
  )), s && i.$attrs$)
435
444
  for (const $ of Object.keys(i.$attrs$))
436
445
  c.hasAttribute($) && !["key", "ref", "style", "class"].includes($) && (i.$attrs$[$] = c[$]);
437
- i.$tag$ = null, i.$flags$ |= 4, e.$vnode$ = i, i.$elm$ = f.$elm$ = c.shadowRoot || c, x = c["s-sc"], N = (d.$flags$ & 1) !== 0, B = c["s-cr"], _ = !1, A(f, i, s);
446
+ i.$tag$ = null, i.$flags$ |= 4, e.$vnode$ = i, i.$elm$ = f.$elm$ = c.shadowRoot || c, x = c["s-sc"], N = (d.$flags$ & 1) !== 0, H = c["s-cr"], F = !1, A(f, i, s);
438
447
  {
439
- if (E.$flags$ |= 1, z) {
448
+ if (L.$flags$ |= 1, z) {
440
449
  ue(i.$elm$);
441
450
  for (const $ of b) {
442
451
  const u = $.$nodeToRelocate$;
443
452
  if (!u["s-ol"]) {
444
- const p = M.createTextNode("");
453
+ const p = _.createTextNode("");
445
454
  p["s-nr"] = u, T(u.parentNode, u["s-ol"] = p, u);
446
455
  }
447
456
  }
@@ -451,9 +460,9 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
451
460
  const m = p.parentNode;
452
461
  let y = p.nextSibling;
453
462
  {
454
- let R = (r = u["s-ol"]) == null ? void 0 : r.previousSibling;
455
- for (; R; ) {
456
- let v = (o = R["s-nr"]) != null ? o : null;
463
+ let O = (r = u["s-ol"]) == null ? void 0 : r.previousSibling;
464
+ for (; O; ) {
465
+ let v = (o = O["s-nr"]) != null ? o : null;
457
466
  if (v && v["s-sn"] === u["s-sn"] && m === v.parentNode) {
458
467
  for (v = v.nextSibling; v === u || v != null && v["s-sr"]; )
459
468
  v = v == null ? void 0 : v.nextSibling;
@@ -462,7 +471,7 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
462
471
  break;
463
472
  }
464
473
  }
465
- R = R.previousSibling;
474
+ O = O.previousSibling;
466
475
  }
467
476
  }
468
477
  (!y && m !== u.parentNode || u.nextSibling !== y) && u !== y && (!u["s-hn"] && u["s-ol"] && (u["s-hn"] = u["s-ol"].parentNode.nodeName), T(m, u, y), u.nodeType === 1 && (u.hidden = (n = u["s-ih"]) != null ? n : !1)), u && typeof p["s-rf"] == "function" && p["s-rf"](u);
@@ -470,12 +479,12 @@ var x, B, L, N = !1, _ = !1, z = !1, h = !1, F = (e, t, s, r) => {
470
479
  u.nodeType === 1 && (s && (u["s-ih"] = (l = u.hidden) != null ? l : !1), u.hidden = !0);
471
480
  }
472
481
  }
473
- _ && fe(i.$elm$), E.$flags$ &= -2, b.length = 0;
482
+ F && fe(i.$elm$), L.$flags$ &= -2, b.length = 0;
474
483
  }
475
- if (P.experimentalScopedSlotChanges && d.$flags$ & 2)
484
+ if (E.experimentalScopedSlotChanges && d.$flags$ & 2)
476
485
  for (const $ of i.$elm$.childNodes)
477
- $["s-hn"] !== L && !$["s-sh"] && (s && $["s-ih"] == null && ($["s-ih"] = (a = $.hidden) != null ? a : !1), $.hidden = !0);
478
- B = void 0;
486
+ $["s-hn"] !== j && !$["s-sh"] && (s && $["s-ih"] == null && ($["s-ih"] = (a = $.hidden) != null ? a : !1), $.hidden = !0);
487
+ H = void 0;
479
488
  };
480
489
  const Ce = (e, t, s) => {
481
490
  [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);
@@ -519,13 +528,13 @@ const Ce = (e, t, s) => {
519
528
  }, tt = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
520
529
  const o = document.createElement("div");
521
530
  return pe(o, e, t, s, r), o.innerHTML;
522
- }, C = (e, t) => {
531
+ }, D = (e, t) => {
523
532
  if (!t)
524
533
  return;
525
534
  const s = t.split("/");
526
535
  return `${e}${s.slice(2, s.length - 1).join("-")}--docs`;
527
536
  };
528
- var S, D;
537
+ var S, w;
529
538
  class st {
530
539
  constructor(t) {
531
540
  /**
@@ -537,14 +546,14 @@ class st {
537
546
  * @param tagName - tag name we want to get the data from
538
547
  * @returns component data
539
548
  */
540
- w(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));
549
+ P(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));
541
550
  /**
542
551
  * Get the control for the given prop
543
552
  * Based on https://storybook.js.org/docs/api/arg-types#controltype
544
553
  * @param prop - prop to get control for
545
554
  * @returns control type and options if applicable
546
555
  */
547
- w(this, D, (t) => {
556
+ P(this, w, (t) => {
548
557
  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, "|"));
549
558
  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" } };
550
559
  });
@@ -555,7 +564,7 @@ class st {
555
564
  */
556
565
  g(this, "extractArgTypes", (t) => {
557
566
  const s = k(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((f, i) => {
558
- const { control: $, options: u } = k(this, D).call(this, i);
567
+ const { control: $, options: u } = k(this, w).call(this, i);
559
568
  return {
560
569
  ...f,
561
570
  [i.name]: {
@@ -630,7 +639,7 @@ class st {
630
639
  ...f,
631
640
  [i]: {
632
641
  name: i,
633
- description: `<a href="./?path=/docs/${C("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
642
+ description: `<a href="./?path=/docs/${D("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
634
643
  table: {
635
644
  category: "depends on",
636
645
  type: { summary: void 0 }
@@ -643,7 +652,7 @@ class st {
643
652
  ...f,
644
653
  [i]: {
645
654
  name: i,
646
- description: `<a href="./?path=/docs/${C("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
655
+ description: `<a href="./?path=/docs/${D("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
647
656
  table: {
648
657
  category: "used by",
649
658
  type: { summary: void 0 }
@@ -673,7 +682,7 @@ class st {
673
682
  this.jsonDoc = t;
674
683
  }
675
684
  }
676
- S = new WeakMap(), D = new WeakMap();
685
+ S = new WeakMap(), w = new WeakMap();
677
686
  const De = (e, t) => {
678
687
  if (t)
679
688
  return `${e}${t}`;
@@ -703,7 +712,7 @@ const De = (e, t) => {
703
712
  `, t += e.slots.map(({ name: o, docs: n }) => `- \`${o}\`: ${n}
704
713
  `).join(""), t += `
705
714
  `), t;
706
- }, W = (e) => `${e.docs}
715
+ }, B = (e) => `${e.docs}
707
716
 
708
717
  Type: \`${e.type}\``, rt = (e, t, s, r) => ({
709
718
  $schema: "https://json.schemastore.org/web-types",
@@ -713,14 +722,14 @@ Type: \`${e.type}\``, rt = (e, t, s, r) => ({
713
722
  contributions: {
714
723
  html: {
715
724
  elements: s.components.map((o) => {
716
- const n = C(r, o.filePath);
725
+ const n = D(r, o.filePath);
717
726
  return {
718
727
  name: o.tag,
719
728
  description: ge(o),
720
729
  "doc-url": n,
721
730
  attributes: o.props.filter((l) => l.attr).map((l) => ({
722
731
  name: l.attr,
723
- description: W(l),
732
+ description: B(l),
724
733
  "doc-url": n,
725
734
  value: {
726
735
  type: l.type,
@@ -731,7 +740,7 @@ Type: \`${e.type}\``, rt = (e, t, s, r) => ({
731
740
  js: {
732
741
  properties: o.props.map((l) => ({
733
742
  name: l.name,
734
- description: W(l),
743
+ description: B(l),
735
744
  "doc-url": n,
736
745
  value: {
737
746
  type: l.type,
@@ -748,23 +757,23 @@ Type: \`${e.type}\``, rt = (e, t, s, r) => ({
748
757
  })
749
758
  }
750
759
  }
751
- }), Pe = (e, t, s) => [
752
- { name: "Storybook", url: C(e, s) },
760
+ }), we = (e, t, s) => [
761
+ { name: "Storybook", url: D(e, s) },
753
762
  { name: "Sources", url: De(t, s) }
754
- ], we = (e) => {
763
+ ], Pe = (e) => {
755
764
  if (!e.values.some(({ value: t }) => t === void 0))
756
765
  return e.values.map(({ value: t }) => ({ name: t }));
757
766
  }, ot = (e, t, s, r) => ({
758
767
  version: e,
759
768
  tags: t.components.map((o) => {
760
- const n = Pe(s, r, o.filePath);
769
+ const n = we(s, r, o.filePath);
761
770
  return {
762
771
  name: o.tag,
763
772
  description: ge(o),
764
773
  attributes: o.props.map((l) => ({
765
774
  name: l.attr || l.name,
766
- description: W(l),
767
- values: we(l),
775
+ description: B(l),
776
+ values: Pe(l),
768
777
  references: n
769
778
  })),
770
779
  references: n
@@ -774,14 +783,14 @@ Type: \`${e.type}\``, rt = (e, t, s, r) => ({
774
783
  valueSets: []
775
784
  }), nt = (e) => {
776
785
  const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
777
- return Be([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);
786
+ return He([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);
778
787
  }, lt = (e) => e.toISOString().split("T")[0], Ue = (e, t, s) => {
779
788
  const r = e.closest("[lang]"), o = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), n = o.length > 0 && typeof o[0] == "string" ? o[0] : navigator.language || s, l = n.split("-").shift();
780
789
  return {
781
790
  locale: n,
782
791
  messages: t[l] || t[s]
783
792
  };
784
- }, it = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), at = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), He = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, Be = (e, t, s) => typeof e != "string" || e === "" || !He.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), ct = (e, t) => (s) => Ue(s, e, t), ft = ({ disconnect: e, observe: t, takeRecords: s }) => {
793
+ }, it = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), at = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), We = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, He = (e, t, s) => typeof e != "string" || e === "" || !We.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), ct = (e, t) => (s) => Ue(s, e, t), ft = ({ disconnect: e, observe: t, takeRecords: s }) => {
785
794
  class r {
786
795
  constructor(n) {
787
796
  /**
@@ -840,7 +849,7 @@ Type: \`${e.type}\``, rt = (e, t, s, r) => ({
840
849
  });
841
850
  }), s;
842
851
  };
843
- class We extends Event {
852
+ class Be extends Event {
844
853
  constructor() {
845
854
  super(...arguments);
846
855
  /**
@@ -851,7 +860,7 @@ class We extends Event {
851
860
  }
852
861
  }
853
862
  const $t = () => {
854
- class e extends We {
863
+ class e extends Be {
855
864
  }
856
865
  return [window, global].forEach((t) => {
857
866
  Object.defineProperty(t, "SubmitEvent", {
@@ -867,7 +876,7 @@ export {
867
876
  Ge as allItemsAreString,
868
877
  Je as cleanString,
869
878
  ze as createID,
870
- He as dateRegExp,
879
+ We as dateRegExp,
871
880
  lt as dateToString,
872
881
  ct as defineLocales,
873
882
  Ve as filterArgs,
@@ -875,12 +884,12 @@ export {
875
884
  nt as getLocaleDatePattern,
876
885
  te as getParentWindows,
877
886
  tt as getStoryHTML,
878
- C as getStorybookUrl,
887
+ D as getStorybookUrl,
879
888
  Qe as getWindows,
880
889
  Xe as isTagName,
881
890
  Ze as isValidString,
882
891
  it as localeCurrency,
883
- Be as localeDate,
892
+ He as localeDate,
884
893
  at as localeNumber,
885
894
  Ye as nextTick,
886
895
  ft as setupMutationObserverMock,