@stencil/core 4.23.0 → 4.23.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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Platform v4.23.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Platform v4.23.1 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -18,9 +18,21 @@ var Build = {
18
18
 
19
19
  // src/client/client-host-ref.ts
20
20
  import { BUILD as BUILD2 } from "@stencil/core/internal/app-data";
21
+
22
+ // src/utils/constants.ts
23
+ var EMPTY_OBJ = {};
24
+ var SVG_NS = "http://www.w3.org/2000/svg";
25
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
26
+
27
+ // src/client/client-host-ref.ts
21
28
  var hostRefs = BUILD2.hotModuleReplacement ? window.__STENCIL_HOSTREFS__ || (window.__STENCIL_HOSTREFS__ = /* @__PURE__ */ new WeakMap()) : /* @__PURE__ */ new WeakMap();
22
29
  var getHostRef = (ref) => hostRefs.get(ref);
23
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
30
+ var registerInstance = (lazyInstance, hostRef) => {
31
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
32
+ if (BUILD2.modernPropertyDecls && (BUILD2.state || BUILD2.prop)) {
33
+ reWireGetterSetter(lazyInstance, hostRef);
34
+ }
35
+ };
24
36
  var registerHost = (hostElement, cmpMeta) => {
25
37
  const hostRef = {
26
38
  $flags$: 0,
@@ -39,9 +51,35 @@ var registerHost = (hostElement, cmpMeta) => {
39
51
  hostElement["s-p"] = [];
40
52
  hostElement["s-rc"] = [];
41
53
  }
42
- return hostRefs.set(hostElement, hostRef);
54
+ const ref = hostRefs.set(hostElement, hostRef);
55
+ if (!BUILD2.lazyLoad && BUILD2.modernPropertyDecls && (BUILD2.state || BUILD2.prop)) {
56
+ reWireGetterSetter(hostElement, hostRef);
57
+ }
58
+ return ref;
43
59
  };
44
60
  var isMemberInElement = (elm, memberName) => memberName in elm;
61
+ var reWireGetterSetter = (instance, hostRef) => {
62
+ var _a;
63
+ const cmpMeta = hostRef.$cmpMeta$;
64
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
65
+ members.map(([memberName, [memberFlags]]) => {
66
+ if (BUILD2.state && BUILD2.prop && (memberFlags & 2048 /* Getter */) === 0 && (memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
67
+ const ogValue = instance[memberName];
68
+ const lazyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(instance), memberName);
69
+ Object.defineProperty(instance, memberName, {
70
+ get() {
71
+ return lazyDescriptor.get.call(this);
72
+ },
73
+ set(newValue) {
74
+ lazyDescriptor.set.call(this, newValue);
75
+ },
76
+ configurable: true,
77
+ enumerable: true
78
+ });
79
+ instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
80
+ }
81
+ });
82
+ };
45
83
 
46
84
  // src/client/client-load-module.ts
47
85
  import { BUILD as BUILD4 } from "@stencil/core/internal/app-data";
@@ -242,7 +280,7 @@ var readTask = /* @__PURE__ */ queueTask(queueDomReads, false);
242
280
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
243
281
 
244
282
  // src/client/index.ts
245
- import { BUILD as BUILD27, Env, NAMESPACE as NAMESPACE2 } from "@stencil/core/internal/app-data";
283
+ import { BUILD as BUILD28, Env, NAMESPACE as NAMESPACE2 } from "@stencil/core/internal/app-data";
246
284
 
247
285
  // src/runtime/asset-path.ts
248
286
  var getAssetPath = (path) => {
@@ -252,15 +290,10 @@ var getAssetPath = (path) => {
252
290
  var setAssetPath = (path) => plt.$resourcesUrl$ = path;
253
291
 
254
292
  // src/runtime/bootstrap-custom-element.ts
255
- import { BUILD as BUILD24 } from "@stencil/core/internal/app-data";
256
-
257
- // src/utils/constants.ts
258
- var EMPTY_OBJ = {};
259
- var SVG_NS = "http://www.w3.org/2000/svg";
260
- var HTML_NS = "http://www.w3.org/1999/xhtml";
293
+ import { BUILD as BUILD25 } from "@stencil/core/internal/app-data";
261
294
 
262
295
  // src/utils/helpers.ts
263
- var isDef = (v) => v != null;
296
+ var isDef = (v) => v != null && v !== void 0;
264
297
  var isComplexType = (o) => {
265
298
  o = typeof o;
266
299
  return o === "object" || o === "function";
@@ -322,19 +355,122 @@ var unwrapErr = (result) => {
322
355
  };
323
356
 
324
357
  // src/runtime/connected-callback.ts
325
- import { BUILD as BUILD22 } from "@stencil/core/internal/app-data";
358
+ import { BUILD as BUILD23 } from "@stencil/core/internal/app-data";
326
359
 
327
360
  // src/runtime/client-hydrate.ts
328
- import { BUILD as BUILD13 } from "@stencil/core/internal/app-data";
361
+ import { BUILD as BUILD14 } from "@stencil/core/internal/app-data";
329
362
 
330
363
  // src/runtime/dom-extras.ts
331
- import { BUILD as BUILD11 } from "@stencil/core/internal/app-data";
364
+ import { BUILD as BUILD12 } from "@stencil/core/internal/app-data";
365
+
366
+ // src/runtime/slot-polyfill-utils.ts
367
+ import { BUILD as BUILD7 } from "@stencil/core/internal/app-data";
368
+ var updateFallbackSlotVisibility = (elm) => {
369
+ const childNodes = elm.__childNodes || elm.childNodes;
370
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
371
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
372
+ var _a;
373
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
374
+ if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
375
+ slotNode.hidden = true;
376
+ } else {
377
+ slotNode.hidden = false;
378
+ }
379
+ }
380
+ });
381
+ }
382
+ for (const childNode of childNodes) {
383
+ if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
384
+ updateFallbackSlotVisibility(childNode);
385
+ }
386
+ }
387
+ };
388
+ var getSlottedChildNodes = (childNodes) => {
389
+ const result = [];
390
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
391
+ const slottedNode = childNodes[i2]["s-nr"];
392
+ if (slottedNode && slottedNode.isConnected) {
393
+ result.push(slottedNode);
394
+ }
395
+ }
396
+ return result;
397
+ };
398
+ var getHostSlotNodes = (childNodes, hostName, slotName) => {
399
+ let i2 = 0;
400
+ let slottedNodes = [];
401
+ let childNode;
402
+ for (; i2 < childNodes.length; i2++) {
403
+ childNode = childNodes[i2];
404
+ if (childNode["s-sr"] && childNode["s-hn"] === hostName && (!slotName || childNode["s-sn"] === slotName)) {
405
+ slottedNodes.push(childNode);
406
+ if (typeof slotName !== "undefined") return slottedNodes;
407
+ }
408
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
409
+ }
410
+ return slottedNodes;
411
+ };
412
+ var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
413
+ const childNodes = [];
414
+ if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
415
+ while ((node = node.nextSibling) && node["s-sn"] === slotName) {
416
+ childNodes.push(node);
417
+ }
418
+ return childNodes;
419
+ };
420
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
421
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
422
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
423
+ return true;
424
+ }
425
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
426
+ return true;
427
+ }
428
+ return false;
429
+ }
430
+ if (nodeToRelocate["s-sn"] === slotName) {
431
+ return true;
432
+ }
433
+ return slotName === "";
434
+ };
435
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
436
+ let slottedNodeLocation;
437
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
438
+ slottedNodeLocation = newChild["s-ol"];
439
+ } else {
440
+ slottedNodeLocation = document.createTextNode("");
441
+ slottedNodeLocation["s-nr"] = newChild;
442
+ }
443
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
444
+ const parent = slotNode["s-cr"].parentNode;
445
+ const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
446
+ if (typeof position !== "undefined") {
447
+ if (BUILD7.hydrateClientSide) {
448
+ slottedNodeLocation["s-oo"] = position;
449
+ const childNodes = parent.__childNodes || parent.childNodes;
450
+ const slotRelocateNodes = [slottedNodeLocation];
451
+ childNodes.forEach((n) => {
452
+ if (n["s-nr"]) slotRelocateNodes.push(n);
453
+ });
454
+ slotRelocateNodes.sort((a, b) => {
455
+ if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
456
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
457
+ return 0;
458
+ });
459
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
460
+ }
461
+ } else {
462
+ appendMethod.call(parent, slottedNodeLocation);
463
+ }
464
+ newChild["s-ol"] = slottedNodeLocation;
465
+ newChild["s-sh"] = slotNode["s-hn"];
466
+ };
467
+ var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
332
468
 
333
469
  // src/runtime/vdom/vdom-render.ts
334
- import { BUILD as BUILD10 } from "@stencil/core/internal/app-data";
470
+ import { BUILD as BUILD11 } from "@stencil/core/internal/app-data";
335
471
 
336
472
  // src/runtime/vdom/h.ts
337
- import { BUILD as BUILD7 } from "@stencil/core/internal/app-data";
473
+ import { BUILD as BUILD8 } from "@stencil/core/internal/app-data";
338
474
  var h = (nodeName, vnodeData, ...children) => {
339
475
  let child = null;
340
476
  let key = null;
@@ -350,7 +486,7 @@ var h = (nodeName, vnodeData, ...children) => {
350
486
  } else if (child != null && typeof child !== "boolean") {
351
487
  if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
352
488
  child = String(child);
353
- } else if (BUILD7.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
489
+ } else if (BUILD8.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
354
490
  consoleDevError(`vNode passed as children has unexpected type.
355
491
  Make sure it's using the correct h() function.
356
492
  Empty objects can also be the cause, look for JSX comments that became objects.`);
@@ -366,28 +502,28 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
366
502
  };
367
503
  walk(children);
368
504
  if (vnodeData) {
369
- if (BUILD7.isDev && nodeName === "input") {
505
+ if (BUILD8.isDev && nodeName === "input") {
370
506
  validateInputProperties(vnodeData);
371
507
  }
372
- if (BUILD7.vdomKey && vnodeData.key) {
508
+ if (BUILD8.vdomKey && vnodeData.key) {
373
509
  key = vnodeData.key;
374
510
  }
375
- if (BUILD7.slotRelocation && vnodeData.name) {
511
+ if (BUILD8.slotRelocation && vnodeData.name) {
376
512
  slotName = vnodeData.name;
377
513
  }
378
- if (BUILD7.vdomClass) {
514
+ if (BUILD8.vdomClass) {
379
515
  const classData = vnodeData.className || vnodeData.class;
380
516
  if (classData) {
381
517
  vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
382
518
  }
383
519
  }
384
520
  }
385
- if (BUILD7.isDev && vNodeChildren.some(isHost)) {
521
+ if (BUILD8.isDev && vNodeChildren.some(isHost)) {
386
522
  consoleDevError(`The <Host> must be the single root component. Make sure:
387
523
  - You are NOT using hostData() and <Host> in the same component.
388
524
  - <Host> is used once, and it's the single root component of the render() function.`);
389
525
  }
390
- if (BUILD7.vdomFunctional && typeof nodeName === "function") {
526
+ if (BUILD8.vdomFunctional && typeof nodeName === "function") {
391
527
  return nodeName(
392
528
  vnodeData === null ? {} : vnodeData,
393
529
  vNodeChildren,
@@ -399,10 +535,10 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
399
535
  if (vNodeChildren.length > 0) {
400
536
  vnode.$children$ = vNodeChildren;
401
537
  }
402
- if (BUILD7.vdomKey) {
538
+ if (BUILD8.vdomKey) {
403
539
  vnode.$key$ = key;
404
540
  }
405
- if (BUILD7.slotRelocation) {
541
+ if (BUILD8.slotRelocation) {
406
542
  vnode.$name$ = slotName;
407
543
  }
408
544
  return vnode;
@@ -415,13 +551,13 @@ var newVNode = (tag, text) => {
415
551
  $elm$: null,
416
552
  $children$: null
417
553
  };
418
- if (BUILD7.vdomAttribute) {
554
+ if (BUILD8.vdomAttribute) {
419
555
  vnode.$attrs$ = null;
420
556
  }
421
- if (BUILD7.vdomKey) {
557
+ if (BUILD8.vdomKey) {
422
558
  vnode.$key$ = null;
423
559
  }
424
- if (BUILD7.slotRelocation) {
560
+ if (BUILD8.slotRelocation) {
425
561
  vnode.$name$ = null;
426
562
  }
427
563
  return vnode;
@@ -474,28 +610,35 @@ var validateInputProperties = (inputElm) => {
474
610
  };
475
611
 
476
612
  // src/runtime/vdom/update-element.ts
477
- import { BUILD as BUILD9 } from "@stencil/core/internal/app-data";
613
+ import { BUILD as BUILD10 } from "@stencil/core/internal/app-data";
478
614
 
479
615
  // src/runtime/vdom/set-accessor.ts
480
- import { BUILD as BUILD8 } from "@stencil/core/internal/app-data";
616
+ import { BUILD as BUILD9 } from "@stencil/core/internal/app-data";
481
617
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
482
618
  if (oldValue !== newValue) {
483
619
  let isProp = isMemberInElement(elm, memberName);
484
620
  let ln = memberName.toLowerCase();
485
- if (BUILD8.vdomClass && memberName === "class") {
621
+ if (BUILD9.vdomClass && memberName === "class") {
486
622
  const classList = elm.classList;
487
623
  const oldClasses = parseClassList(oldValue);
488
- const newClasses = parseClassList(newValue);
489
- if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
624
+ let newClasses = parseClassList(newValue);
625
+ if (elm["s-si"]) {
490
626
  newClasses.push(elm["s-si"]);
627
+ oldClasses.forEach((c) => {
628
+ if (c.startsWith(elm["s-si"])) newClasses.push(c);
629
+ });
630
+ newClasses = [...new Set(newClasses)];
631
+ classList.add(...newClasses);
632
+ delete elm["s-si"];
633
+ } else {
634
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
635
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
491
636
  }
492
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
493
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
494
- } else if (BUILD8.vdomStyle && memberName === "style") {
495
- if (BUILD8.updatable) {
637
+ } else if (BUILD9.vdomStyle && memberName === "style") {
638
+ if (BUILD9.updatable) {
496
639
  for (const prop in oldValue) {
497
640
  if (!newValue || newValue[prop] == null) {
498
- if (!BUILD8.hydrateServerSide && prop.includes("-")) {
641
+ if (!BUILD9.hydrateServerSide && prop.includes("-")) {
499
642
  elm.style.removeProperty(prop);
500
643
  } else {
501
644
  elm.style[prop] = "";
@@ -505,19 +648,19 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
505
648
  }
506
649
  for (const prop in newValue) {
507
650
  if (!oldValue || newValue[prop] !== oldValue[prop]) {
508
- if (!BUILD8.hydrateServerSide && prop.includes("-")) {
651
+ if (!BUILD9.hydrateServerSide && prop.includes("-")) {
509
652
  elm.style.setProperty(prop, newValue[prop]);
510
653
  } else {
511
654
  elm.style[prop] = newValue[prop];
512
655
  }
513
656
  }
514
657
  }
515
- } else if (BUILD8.vdomKey && memberName === "key") {
516
- } else if (BUILD8.vdomRef && memberName === "ref") {
658
+ } else if (BUILD9.vdomKey && memberName === "key") {
659
+ } else if (BUILD9.vdomRef && memberName === "ref") {
517
660
  if (newValue) {
518
661
  newValue(elm);
519
662
  }
520
- } else if (BUILD8.vdomListener && (BUILD8.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
663
+ } else if (BUILD9.vdomListener && (BUILD9.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
521
664
  if (memberName[2] === "-") {
522
665
  memberName = memberName.slice(3);
523
666
  } else if (isMemberInElement(win, ln)) {
@@ -535,7 +678,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
535
678
  plt.ael(elm, memberName, newValue, capture);
536
679
  }
537
680
  }
538
- } else if (BUILD8.vdomPropOrAttr) {
681
+ } else if (BUILD9.vdomPropOrAttr) {
539
682
  const isComplex = isComplexType(newValue);
540
683
  if ((isProp || isComplex && newValue !== null) && !isSvg) {
541
684
  try {
@@ -557,7 +700,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
557
700
  }
558
701
  }
559
702
  let xlink = false;
560
- if (BUILD8.vdomXlink) {
703
+ if (BUILD9.vdomXlink) {
561
704
  if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
562
705
  memberName = ln;
563
706
  xlink = true;
@@ -565,7 +708,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
565
708
  }
566
709
  if (newValue == null || newValue === false) {
567
710
  if (newValue !== false || elm.getAttribute(memberName) === "") {
568
- if (BUILD8.vdomXlink && xlink) {
711
+ if (BUILD9.vdomXlink && xlink) {
569
712
  elm.removeAttributeNS(XLINK_NS, memberName);
570
713
  } else {
571
714
  elm.removeAttribute(memberName);
@@ -573,7 +716,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
573
716
  }
574
717
  } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
575
718
  newValue = newValue === true ? "" : newValue;
576
- if (BUILD8.vdomXlink && xlink) {
719
+ if (BUILD9.vdomXlink && xlink) {
577
720
  elm.setAttributeNS(XLINK_NS, memberName, newValue);
578
721
  } else {
579
722
  elm.setAttribute(memberName, newValue);
@@ -583,7 +726,15 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
583
726
  }
584
727
  };
585
728
  var parseClassListRegex = /\s/;
586
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
729
+ var parseClassList = (value) => {
730
+ if (typeof value === "object" && "baseVal" in value) {
731
+ value = value.baseVal;
732
+ }
733
+ if (!value) {
734
+ return [];
735
+ }
736
+ return value.split(parseClassListRegex);
737
+ };
587
738
  var CAPTURE_EVENT_SUFFIX = "Capture";
588
739
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
589
740
 
@@ -592,7 +743,7 @@ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
592
743
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
593
744
  const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
594
745
  const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
595
- if (BUILD9.updatable) {
746
+ if (BUILD10.updatable) {
596
747
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
597
748
  if (!(memberName in newVnodeAttrs)) {
598
749
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
@@ -621,19 +772,16 @@ var useNativeShadowDom = false;
621
772
  var checkSlotFallbackVisibility = false;
622
773
  var checkSlotRelocate = false;
623
774
  var isSvgMode = false;
624
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
775
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
625
776
  var _a;
626
777
  const newVNode2 = newParentVNode.$children$[childIndex];
627
778
  let i2 = 0;
628
779
  let elm;
629
780
  let childNode;
630
781
  let oldVNode;
631
- if (BUILD10.slotRelocation && !useNativeShadowDom) {
782
+ if (BUILD11.slotRelocation && !useNativeShadowDom) {
632
783
  checkSlotRelocate = true;
633
784
  if (newVNode2.$tag$ === "slot") {
634
- if (scopeId) {
635
- parentElm.classList.add(scopeId + "-s");
636
- }
637
785
  newVNode2.$flags$ |= newVNode2.$children$ ? (
638
786
  // slot element has fallback content
639
787
  // still create an element that "mocks" the slot element
@@ -646,48 +794,43 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
646
794
  );
647
795
  }
648
796
  }
649
- if (BUILD10.isDev && newVNode2.$elm$) {
797
+ if (BUILD11.isDev && newVNode2.$elm$) {
650
798
  consoleDevError(
651
799
  `The JSX ${newVNode2.$text$ !== null ? `"${newVNode2.$text$}" text` : `"${newVNode2.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`
652
800
  );
653
801
  }
654
- if (BUILD10.vdomText && newVNode2.$text$ !== null) {
802
+ if (BUILD11.vdomText && newVNode2.$text$ !== null) {
655
803
  elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
656
- } else if (BUILD10.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
657
- elm = newVNode2.$elm$ = BUILD10.isDebug || BUILD10.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : doc.createTextNode("");
804
+ } else if (BUILD11.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
805
+ elm = newVNode2.$elm$ = BUILD11.isDebug || BUILD11.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : doc.createTextNode("");
658
806
  } else {
659
- if (BUILD10.svg && !isSvgMode) {
807
+ if (BUILD11.svg && !isSvgMode) {
660
808
  isSvgMode = newVNode2.$tag$ === "svg";
661
809
  }
662
- elm = newVNode2.$elm$ = BUILD10.svg ? doc.createElementNS(
810
+ elm = newVNode2.$elm$ = BUILD11.svg ? doc.createElementNS(
663
811
  isSvgMode ? SVG_NS : HTML_NS,
664
- !useNativeShadowDom && BUILD10.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
812
+ !useNativeShadowDom && BUILD11.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
665
813
  ) : doc.createElement(
666
- !useNativeShadowDom && BUILD10.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
814
+ !useNativeShadowDom && BUILD11.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
667
815
  );
668
- if (BUILD10.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
816
+ if (BUILD11.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
669
817
  isSvgMode = false;
670
818
  }
671
- if (BUILD10.vdomAttribute) {
819
+ if (BUILD11.vdomAttribute) {
672
820
  updateElement(null, newVNode2, isSvgMode);
673
821
  }
674
- const rootNode = elm.getRootNode();
675
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
676
- if (!isElementWithinShadowRoot && BUILD10.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
822
+ if (BUILD11.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
677
823
  elm.classList.add(elm["s-si"] = scopeId);
678
824
  }
679
- if (BUILD10.scoped) {
680
- updateElementScopeIds(elm, parentElm);
681
- }
682
825
  if (newVNode2.$children$) {
683
826
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
684
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
827
+ childNode = createElm(oldParentVNode, newVNode2, i2);
685
828
  if (childNode) {
686
829
  elm.appendChild(childNode);
687
830
  }
688
831
  }
689
832
  }
690
- if (BUILD10.svg) {
833
+ if (BUILD11.svg) {
691
834
  if (newVNode2.$tag$ === "svg") {
692
835
  isSvgMode = false;
693
836
  } else if (elm.tagName === "foreignObject") {
@@ -696,7 +839,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
696
839
  }
697
840
  }
698
841
  elm["s-hn"] = hostTagName;
699
- if (BUILD10.slotRelocation) {
842
+ if (BUILD11.slotRelocation) {
700
843
  if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
701
844
  elm["s-sr"] = true;
702
845
  elm["s-cr"] = contentRef;
@@ -704,12 +847,15 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
704
847
  elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
705
848
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
706
849
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
707
- if (BUILD10.experimentalSlotFixes) {
850
+ if (BUILD11.experimentalSlotFixes) {
708
851
  relocateToHostRoot(oldParentVNode.$elm$);
709
852
  } else {
710
853
  putBackInOriginalLocation(oldParentVNode.$elm$, false);
711
854
  }
712
855
  }
856
+ if (BUILD11.scoped) {
857
+ addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
858
+ }
713
859
  }
714
860
  }
715
861
  return elm;
@@ -737,7 +883,7 @@ var relocateToHostRoot = (parentElm) => {
737
883
  var putBackInOriginalLocation = (parentElm, recursive) => {
738
884
  plt.$flags$ |= 1 /* isTmpDisconnected */;
739
885
  const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
740
- if (parentElm["s-sr"] && BUILD10.experimentalSlotFixes) {
886
+ if (parentElm["s-sr"] && BUILD11.experimentalSlotFixes) {
741
887
  let node = parentElm;
742
888
  while (node = node.nextSibling) {
743
889
  if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
@@ -748,7 +894,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
748
894
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
749
895
  const childNode = oldSlotChildNodes[i2];
750
896
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
751
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
897
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
752
898
  childNode["s-ol"].remove();
753
899
  childNode["s-ol"] = void 0;
754
900
  childNode["s-sh"] = void 0;
@@ -761,17 +907,17 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
761
907
  plt.$flags$ &= ~1 /* isTmpDisconnected */;
762
908
  };
763
909
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
764
- let containerElm = BUILD10.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
910
+ let containerElm = BUILD11.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
765
911
  let childNode;
766
- if (BUILD10.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
912
+ if (BUILD11.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
767
913
  containerElm = containerElm.shadowRoot;
768
914
  }
769
915
  for (; startIdx <= endIdx; ++startIdx) {
770
916
  if (vnodes[startIdx]) {
771
- childNode = createElm(null, parentVNode, startIdx, parentElm);
917
+ childNode = createElm(null, parentVNode, startIdx);
772
918
  if (childNode) {
773
919
  vnodes[startIdx].$elm$ = childNode;
774
- insertBefore(containerElm, childNode, BUILD10.slotRelocation ? referenceNode(before) : before);
920
+ insertBefore(containerElm, childNode, BUILD11.slotRelocation ? referenceNode(before) : before);
775
921
  }
776
922
  }
777
923
  }
@@ -783,7 +929,7 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
783
929
  const elm = vnode.$elm$;
784
930
  nullifyVNodeRefs(vnode);
785
931
  if (elm) {
786
- if (BUILD10.slotRelocation) {
932
+ if (BUILD11.slotRelocation) {
787
933
  checkSlotFallbackVisibility = true;
788
934
  if (elm["s-ol"]) {
789
935
  elm["s-ol"].remove();
@@ -827,7 +973,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
827
973
  oldEndVnode = oldCh[--oldEndIdx];
828
974
  newEndVnode = newCh[--newEndIdx];
829
975
  } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
830
- if (BUILD10.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
976
+ if (BUILD11.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
831
977
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
832
978
  }
833
979
  patch(oldStartVnode, newEndVnode, isInitialRender);
@@ -835,7 +981,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
835
981
  oldStartVnode = oldCh[++oldStartIdx];
836
982
  newEndVnode = newCh[--newEndIdx];
837
983
  } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
838
- if (BUILD10.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
984
+ if (BUILD11.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
839
985
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
840
986
  }
841
987
  patch(oldEndVnode, newStartVnode, isInitialRender);
@@ -844,7 +990,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
844
990
  newStartVnode = newCh[++newStartIdx];
845
991
  } else {
846
992
  idxInOld = -1;
847
- if (BUILD10.vdomKey) {
993
+ if (BUILD11.vdomKey) {
848
994
  for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
849
995
  if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
850
996
  idxInOld = i2;
@@ -852,10 +998,10 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
852
998
  }
853
999
  }
854
1000
  }
855
- if (BUILD10.vdomKey && idxInOld >= 0) {
1001
+ if (BUILD11.vdomKey && idxInOld >= 0) {
856
1002
  elmToMove = oldCh[idxInOld];
857
1003
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
858
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
1004
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
859
1005
  } else {
860
1006
  patch(elmToMove, newStartVnode, isInitialRender);
861
1007
  oldCh[idxInOld] = void 0;
@@ -863,12 +1009,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
863
1009
  }
864
1010
  newStartVnode = newCh[++newStartIdx];
865
1011
  } else {
866
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
1012
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
867
1013
  newStartVnode = newCh[++newStartIdx];
868
1014
  }
869
1015
  if (node) {
870
- if (BUILD10.slotRelocation) {
871
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
1016
+ if (BUILD11.slotRelocation) {
1017
+ insertBefore(
1018
+ referenceNode(oldStartVnode.$elm$).parentNode,
1019
+ node,
1020
+ referenceNode(oldStartVnode.$elm$)
1021
+ );
872
1022
  } else {
873
1023
  insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
874
1024
  }
@@ -884,35 +1034,26 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
884
1034
  newStartIdx,
885
1035
  newEndIdx
886
1036
  );
887
- } else if (BUILD10.updatable && newStartIdx > newEndIdx) {
1037
+ } else if (BUILD11.updatable && newStartIdx > newEndIdx) {
888
1038
  removeVnodes(oldCh, oldStartIdx, oldEndIdx);
889
1039
  }
890
1040
  };
891
1041
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
892
1042
  if (leftVNode.$tag$ === rightVNode.$tag$) {
893
- if (BUILD10.slotRelocation && leftVNode.$tag$ === "slot") {
894
- if (
895
- // The component gets hydrated and no VDOM has been initialized.
896
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
897
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
898
- // hydration comments to be removed
899
- leftVNode.$elm$.nodeType !== 8
900
- ) {
901
- return false;
902
- }
1043
+ if (BUILD11.slotRelocation && leftVNode.$tag$ === "slot") {
903
1044
  return leftVNode.$name$ === rightVNode.$name$;
904
1045
  }
905
- if (BUILD10.vdomKey && !isInitialRender) {
1046
+ if (BUILD11.vdomKey && !isInitialRender) {
906
1047
  return leftVNode.$key$ === rightVNode.$key$;
907
1048
  }
1049
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
1050
+ leftVNode.$key$ = rightVNode.$key$;
1051
+ }
908
1052
  return true;
909
1053
  }
910
1054
  return false;
911
1055
  };
912
- var referenceNode = (node) => {
913
- return node && node["s-ol"] || node;
914
- };
915
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
1056
+ var referenceNode = (node) => node && node["s-ol"] || node;
916
1057
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
917
1058
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
918
1059
  const oldChildren = oldVNode.$children$;
@@ -920,13 +1061,13 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
920
1061
  const tag = newVNode2.$tag$;
921
1062
  const text = newVNode2.$text$;
922
1063
  let defaultHolder;
923
- if (!BUILD10.vdomText || text === null) {
924
- if (BUILD10.svg) {
1064
+ if (!BUILD11.vdomText || text === null) {
1065
+ if (BUILD11.svg) {
925
1066
  isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
926
1067
  }
927
- if (BUILD10.vdomAttribute || BUILD10.reflect) {
928
- if (BUILD10.slot && tag === "slot" && !useNativeShadowDom) {
929
- if (BUILD10.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
1068
+ if (BUILD11.vdomAttribute || BUILD11.reflect) {
1069
+ if (BUILD11.slot && tag === "slot" && !useNativeShadowDom) {
1070
+ if (BUILD11.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
930
1071
  newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
931
1072
  relocateToHostRoot(newVNode2.$elm$.parentElement);
932
1073
  }
@@ -934,55 +1075,28 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
934
1075
  updateElement(oldVNode, newVNode2, isSvgMode);
935
1076
  }
936
1077
  }
937
- if (BUILD10.updatable && oldChildren !== null && newChildren !== null) {
1078
+ if (BUILD11.updatable && oldChildren !== null && newChildren !== null) {
938
1079
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
939
1080
  } else if (newChildren !== null) {
940
- if (BUILD10.updatable && BUILD10.vdomText && oldVNode.$text$ !== null) {
1081
+ if (BUILD11.updatable && BUILD11.vdomText && oldVNode.$text$ !== null) {
941
1082
  elm.textContent = "";
942
1083
  }
943
1084
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
944
1085
  } else if (
945
1086
  // don't do this on initial render as it can cause non-hydrated content to be removed
946
- !isInitialRender && BUILD10.updatable && oldChildren !== null
1087
+ !isInitialRender && BUILD11.updatable && oldChildren !== null
947
1088
  ) {
948
1089
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
949
1090
  }
950
- if (BUILD10.svg && isSvgMode && tag === "svg") {
1091
+ if (BUILD11.svg && isSvgMode && tag === "svg") {
951
1092
  isSvgMode = false;
952
1093
  }
953
- } else if (BUILD10.vdomText && BUILD10.slotRelocation && (defaultHolder = elm["s-cr"])) {
1094
+ } else if (BUILD11.vdomText && BUILD11.slotRelocation && (defaultHolder = elm["s-cr"])) {
954
1095
  defaultHolder.parentNode.textContent = text;
955
- } else if (BUILD10.vdomText && oldVNode.$text$ !== text) {
1096
+ } else if (BUILD11.vdomText && oldVNode.$text$ !== text) {
956
1097
  elm.data = text;
957
1098
  }
958
1099
  };
959
- var updateFallbackSlotVisibility = (elm) => {
960
- const childNodes = elm.__childNodes || elm.childNodes;
961
- for (const childNode of childNodes) {
962
- if (childNode.nodeType === 1 /* ElementNode */) {
963
- if (childNode["s-sr"]) {
964
- const slotName = childNode["s-sn"];
965
- childNode.hidden = false;
966
- for (const siblingNode of childNodes) {
967
- if (siblingNode !== childNode) {
968
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
969
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
970
- childNode.hidden = true;
971
- break;
972
- }
973
- } else if (slotName === siblingNode["s-sn"]) {
974
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
975
- childNode.hidden = true;
976
- break;
977
- }
978
- }
979
- }
980
- }
981
- }
982
- updateFallbackSlotVisibility(childNode);
983
- }
984
- }
985
- };
986
1100
  var relocateNodes = [];
987
1101
  var markSlotContentForRelocation = (elm) => {
988
1102
  let node;
@@ -995,7 +1109,7 @@ var markSlotContentForRelocation = (elm) => {
995
1109
  const slotName = childNode["s-sn"];
996
1110
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
997
1111
  node = hostContentNodes[j];
998
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD10.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
1112
+ if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD11.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
999
1113
  if (isNodeLocatedInSlot(node, slotName)) {
1000
1114
  let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1001
1115
  checkSlotFallbackVisibility = true;
@@ -1033,60 +1147,40 @@ var markSlotContentForRelocation = (elm) => {
1033
1147
  }
1034
1148
  }
1035
1149
  };
1036
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1037
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1038
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1039
- return true;
1040
- }
1041
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1042
- return true;
1043
- }
1044
- return false;
1045
- }
1046
- if (nodeToRelocate["s-sn"] === slotName) {
1047
- return true;
1048
- }
1049
- return slotName === "";
1050
- };
1051
1150
  var nullifyVNodeRefs = (vNode) => {
1052
- if (BUILD10.vdomRef) {
1151
+ if (BUILD11.vdomRef) {
1053
1152
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1054
1153
  vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1055
1154
  }
1056
1155
  };
1057
1156
  var insertBefore = (parent, newNode, reference) => {
1058
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1059
- if (BUILD10.scoped) {
1060
- updateElementScopeIds(newNode, parent);
1157
+ if (BUILD11.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
1158
+ addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
1061
1159
  }
1160
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1062
1161
  return inserted;
1063
1162
  };
1064
- var findScopeIds = (element) => {
1065
- const scopeIds = [];
1066
- if (element) {
1067
- scopeIds.push(
1068
- ...element["s-scs"] || [],
1069
- element["s-si"],
1070
- element["s-sc"],
1071
- ...findScopeIds(element.parentElement)
1072
- );
1073
- }
1074
- return scopeIds;
1075
- };
1076
- var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1163
+ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
1077
1164
  var _a;
1078
- if (element && parent && element.nodeType === 1 /* ElementNode */) {
1079
- const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1080
- if (scopeIds.size) {
1081
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = Array.from(scopeIds));
1082
- if (element["s-ol"] || iterateChildNodes) {
1083
- for (const childNode of Array.from(element.__childNodes || element.childNodes)) {
1084
- updateElementScopeIds(childNode, element, true);
1165
+ let scopeId2;
1166
+ if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
1167
+ const scopeName = slotNode["s-sn"];
1168
+ const hostName = slotNode["s-hn"];
1169
+ (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
1170
+ if (oldParent && oldParent.classList.contains(scopeId2 + "-s")) {
1171
+ let child = (oldParent.__childNodes || oldParent.childNodes)[0];
1172
+ let found = false;
1173
+ while (child) {
1174
+ if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
1175
+ found = true;
1176
+ break;
1085
1177
  }
1178
+ child = child.nextSibling;
1086
1179
  }
1180
+ if (!found) oldParent.classList.remove(scopeId2 + "-s");
1087
1181
  }
1088
1182
  }
1089
- };
1183
+ }
1090
1184
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1091
1185
  var _a, _b, _c, _d, _e;
1092
1186
  const hostElm = hostRef.$hostElement$;
@@ -1094,7 +1188,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1094
1188
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1095
1189
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1096
1190
  hostTagName = hostElm.tagName;
1097
- if (BUILD10.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
1191
+ if (BUILD11.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
1098
1192
  throw new Error(`The <Host> must be the single root component.
1099
1193
  Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
1100
1194
 
@@ -1108,7 +1202,7 @@ render() {
1108
1202
  }
1109
1203
  `);
1110
1204
  }
1111
- if (BUILD10.reflect && cmpMeta.$attrsToReflect$) {
1205
+ if (BUILD11.reflect && cmpMeta.$attrsToReflect$) {
1112
1206
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1113
1207
  cmpMeta.$attrsToReflect$.map(
1114
1208
  ([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
@@ -1124,24 +1218,24 @@ render() {
1124
1218
  rootVnode.$tag$ = null;
1125
1219
  rootVnode.$flags$ |= 4 /* isHost */;
1126
1220
  hostRef.$vnode$ = rootVnode;
1127
- rootVnode.$elm$ = oldVNode.$elm$ = BUILD10.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
1128
- if (BUILD10.scoped || BUILD10.shadowDom) {
1221
+ rootVnode.$elm$ = oldVNode.$elm$ = BUILD11.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
1222
+ if (BUILD11.scoped || BUILD11.shadowDom) {
1129
1223
  scopeId = hostElm["s-sc"];
1130
1224
  }
1131
1225
  useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
1132
- if (BUILD10.slotRelocation) {
1226
+ if (BUILD11.slotRelocation) {
1133
1227
  contentRef = hostElm["s-cr"];
1134
1228
  checkSlotFallbackVisibility = false;
1135
1229
  }
1136
1230
  patch(oldVNode, rootVnode, isInitialLoad);
1137
- if (BUILD10.slotRelocation) {
1231
+ if (BUILD11.slotRelocation) {
1138
1232
  plt.$flags$ |= 1 /* isTmpDisconnected */;
1139
1233
  if (checkSlotRelocate) {
1140
1234
  markSlotContentForRelocation(rootVnode.$elm$);
1141
1235
  for (const relocateData of relocateNodes) {
1142
1236
  const nodeToRelocate = relocateData.$nodeToRelocate$;
1143
1237
  if (!nodeToRelocate["s-ol"]) {
1144
- const orgLocationNode = BUILD10.isDebug || BUILD10.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
1238
+ const orgLocationNode = BUILD11.isDebug || BUILD11.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
1145
1239
  orgLocationNode["s-nr"] = nodeToRelocate;
1146
1240
  insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1147
1241
  }
@@ -1152,7 +1246,7 @@ render() {
1152
1246
  if (slotRefNode) {
1153
1247
  const parentNodeRef = slotRefNode.parentNode;
1154
1248
  let insertBeforeNode = slotRefNode.nextSibling;
1155
- if (!BUILD10.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
1249
+ if (!BUILD11.hydrateServerSide && (!BUILD11.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1156
1250
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1157
1251
  while (orgLocationNode) {
1158
1252
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
@@ -1171,11 +1265,11 @@ render() {
1171
1265
  }
1172
1266
  if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1173
1267
  if (nodeToRelocate !== insertBeforeNode) {
1174
- if (!BUILD10.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1268
+ if (!BUILD11.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1175
1269
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1176
1270
  }
1177
1271
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1178
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1272
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1179
1273
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1180
1274
  }
1181
1275
  }
@@ -1197,7 +1291,7 @@ render() {
1197
1291
  plt.$flags$ &= ~1 /* isTmpDisconnected */;
1198
1292
  relocateNodes.length = 0;
1199
1293
  }
1200
- if (BUILD10.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1294
+ if (BUILD11.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1201
1295
  const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
1202
1296
  for (const childNode of children) {
1203
1297
  if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
@@ -1234,9 +1328,9 @@ var patchCloneNode = (HostElementPrototype) => {
1234
1328
  const orgCloneNode = HostElementPrototype.cloneNode;
1235
1329
  HostElementPrototype.cloneNode = function(deep) {
1236
1330
  const srcNode = this;
1237
- const isShadowDom = BUILD11.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
1331
+ const isShadowDom = BUILD12.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
1238
1332
  const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1239
- if (BUILD11.slot && !isShadowDom && deep) {
1333
+ if (BUILD12.slot && !isShadowDom && deep) {
1240
1334
  let i2 = 0;
1241
1335
  let slotted, nonStencilNode;
1242
1336
  const stencilPrivates = [
@@ -1261,7 +1355,7 @@ var patchCloneNode = (HostElementPrototype) => {
1261
1355
  slotted = childNodes[i2]["s-nr"];
1262
1356
  nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
1263
1357
  if (slotted) {
1264
- if (BUILD11.appendChildSlotFix && clonedNode.__appendChild) {
1358
+ if (BUILD12.appendChildSlotFix && clonedNode.__appendChild) {
1265
1359
  clonedNode.__appendChild(slotted.cloneNode(true));
1266
1360
  } else {
1267
1361
  clonedNode.appendChild(slotted.cloneNode(true));
@@ -1279,7 +1373,7 @@ var patchSlotAppendChild = (HostElementPrototype) => {
1279
1373
  HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1280
1374
  HostElementPrototype.appendChild = function(newChild) {
1281
1375
  const slotName = newChild["s-sn"] = getSlotName(newChild);
1282
- const slotNode = getHostSlotNode(this.__childNodes || this.childNodes, slotName, this.tagName);
1376
+ const slotNode = getHostSlotNodes(this.__childNodes || this.childNodes, this.tagName, slotName)[0];
1283
1377
  if (slotNode) {
1284
1378
  addSlotRelocateNode(newChild, slotNode);
1285
1379
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
@@ -1296,7 +1390,7 @@ var patchSlotRemoveChild = (ElementPrototype) => {
1296
1390
  ElementPrototype.removeChild = function(toRemove) {
1297
1391
  if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1298
1392
  const childNodes = this.__childNodes || this.childNodes;
1299
- const slotNode = getHostSlotNode(childNodes, toRemove["s-sn"], this.tagName);
1393
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
1300
1394
  if (slotNode && toRemove.isConnected) {
1301
1395
  toRemove.remove();
1302
1396
  updateFallbackSlotVisibility(this);
@@ -1315,7 +1409,7 @@ var patchSlotPrepend = (HostElementPrototype) => {
1315
1409
  }
1316
1410
  const slotName = newChild["s-sn"] = getSlotName(newChild);
1317
1411
  const childNodes = this.__childNodes || this.childNodes;
1318
- const slotNode = getHostSlotNode(childNodes, slotName, this.tagName);
1412
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
1319
1413
  if (slotNode) {
1320
1414
  addSlotRelocateNode(newChild, slotNode, true);
1321
1415
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
@@ -1382,11 +1476,7 @@ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
1382
1476
  };
1383
1477
  };
1384
1478
  var patchTextContent = (hostElementPrototype) => {
1385
- let descriptor = globalThis.Node && Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
1386
- if (!descriptor) {
1387
- descriptor = Object.getOwnPropertyDescriptor(hostElementPrototype, "textContent");
1388
- }
1389
- if (descriptor) Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
1479
+ patchHostOriginalAccessor("textContent", hostElementPrototype);
1390
1480
  Object.defineProperty(hostElementPrototype, "textContent", {
1391
1481
  get: function() {
1392
1482
  let text = "";
@@ -1410,16 +1500,7 @@ var patchChildSlotNodes = (elm) => {
1410
1500
  return this[n];
1411
1501
  }
1412
1502
  }
1413
- let childNodesFn = globalThis.Node && Object.getOwnPropertyDescriptor(Node.prototype, "childNodes");
1414
- if (!childNodesFn) {
1415
- childNodesFn = Object.getOwnPropertyDescriptor(elm, "childNodes");
1416
- }
1417
- if (childNodesFn) Object.defineProperty(elm, "__childNodes", childNodesFn);
1418
- let childrenFn = Object.getOwnPropertyDescriptor(Element.prototype, "children");
1419
- if (!childrenFn) {
1420
- childrenFn = Object.getOwnPropertyDescriptor(elm, "children");
1421
- }
1422
- if (childrenFn) Object.defineProperty(elm, "__children", childrenFn);
1503
+ patchHostOriginalAccessor("children", elm);
1423
1504
  Object.defineProperty(elm, "children", {
1424
1505
  get() {
1425
1506
  return this.childNodes.filter((n) => n.nodeType === 1);
@@ -1430,7 +1511,19 @@ var patchChildSlotNodes = (elm) => {
1430
1511
  return this.children.length;
1431
1512
  }
1432
1513
  });
1433
- if (!childNodesFn) return;
1514
+ patchHostOriginalAccessor("firstChild", elm);
1515
+ Object.defineProperty(elm, "firstChild", {
1516
+ get() {
1517
+ return this.childNodes[0];
1518
+ }
1519
+ });
1520
+ patchHostOriginalAccessor("lastChild", elm);
1521
+ Object.defineProperty(elm, "lastChild", {
1522
+ get() {
1523
+ return this.childNodes[this.childNodes.length - 1];
1524
+ }
1525
+ });
1526
+ patchHostOriginalAccessor("childNodes", elm);
1434
1527
  Object.defineProperty(elm, "childNodes", {
1435
1528
  get() {
1436
1529
  var _a, _b;
@@ -1444,77 +1537,102 @@ var patchChildSlotNodes = (elm) => {
1444
1537
  }
1445
1538
  });
1446
1539
  };
1447
- var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
1448
- let slottedNodeLocation;
1449
- if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
1450
- slottedNodeLocation = newChild["s-ol"];
1451
- } else {
1452
- slottedNodeLocation = document.createTextNode("");
1453
- slottedNodeLocation["s-nr"] = newChild;
1540
+ var patchNextPrev = (node) => {
1541
+ if (!node || node.__nextSibling || !globalThis.Node) return;
1542
+ patchNextSibling(node);
1543
+ patchPreviousSibling(node);
1544
+ if (node.nodeType === Node.ELEMENT_NODE) {
1545
+ patchNextElementSibling(node);
1546
+ patchPreviousElementSibling(node);
1454
1547
  }
1455
- if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
1456
- const parent = slotNode["s-cr"].parentNode;
1457
- const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
1458
- if (typeof position !== "undefined") {
1459
- if (BUILD11.hydrateClientSide) {
1460
- slottedNodeLocation["s-oo"] = position;
1461
- const childNodes = parent.__childNodes || parent.childNodes;
1462
- const slotRelocateNodes = [slottedNodeLocation];
1463
- childNodes.forEach((n) => {
1464
- if (n["s-nr"]) slotRelocateNodes.push(n);
1465
- });
1466
- slotRelocateNodes.sort((a, b) => {
1467
- if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
1468
- else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
1469
- return 0;
1470
- });
1471
- slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
1548
+ };
1549
+ var patchNextSibling = (node) => {
1550
+ if (!node || node.__nextSibling) return;
1551
+ patchHostOriginalAccessor("nextSibling", node);
1552
+ Object.defineProperty(node, "nextSibling", {
1553
+ get: function() {
1554
+ var _a;
1555
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1556
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1557
+ if (parentNodes && index > -1) {
1558
+ return parentNodes[index + 1];
1559
+ }
1560
+ return this.__nextSibling;
1472
1561
  }
1473
- } else {
1474
- appendMethod.call(parent, slottedNodeLocation);
1475
- }
1476
- newChild["s-ol"] = slottedNodeLocation;
1477
- newChild["s-sh"] = slotNode["s-hn"];
1562
+ });
1478
1563
  };
1479
- var getSlottedChildNodes = (childNodes) => {
1480
- const result = [];
1481
- for (let i2 = 0; i2 < childNodes.length; i2++) {
1482
- const slottedNode = childNodes[i2]["s-nr"];
1483
- if (slottedNode && slottedNode.isConnected) {
1484
- result.push(slottedNode);
1564
+ var patchNextElementSibling = (element) => {
1565
+ if (!element || element.__nextElementSibling) return;
1566
+ patchHostOriginalAccessor("nextElementSibling", element);
1567
+ Object.defineProperty(element, "nextElementSibling", {
1568
+ get: function() {
1569
+ var _a;
1570
+ const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1571
+ const index = parentEles == null ? void 0 : parentEles.indexOf(this);
1572
+ if (parentEles && index > -1) {
1573
+ return parentEles[index + 1];
1574
+ }
1575
+ return this.__nextElementSibling;
1485
1576
  }
1486
- }
1487
- return result;
1577
+ });
1488
1578
  };
1489
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
1490
- var getHostSlotNode = (childNodes, slotName, hostName) => {
1491
- let i2 = 0;
1492
- let childNode;
1493
- for (; i2 < childNodes.length; i2++) {
1494
- childNode = childNodes[i2];
1495
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
1496
- return childNode;
1579
+ var patchPreviousSibling = (node) => {
1580
+ if (!node || node.__previousSibling) return;
1581
+ patchHostOriginalAccessor("previousSibling", node);
1582
+ Object.defineProperty(node, "previousSibling", {
1583
+ get: function() {
1584
+ var _a;
1585
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1586
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1587
+ if (parentNodes && index > -1) {
1588
+ return parentNodes[index - 1];
1589
+ }
1590
+ return this.__previousSibling;
1497
1591
  }
1498
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
1499
- if (childNode) {
1500
- return childNode;
1592
+ });
1593
+ };
1594
+ var patchPreviousElementSibling = (element) => {
1595
+ if (!element || element.__previousElementSibling) return;
1596
+ patchHostOriginalAccessor("previousElementSibling", element);
1597
+ Object.defineProperty(element, "previousElementSibling", {
1598
+ get: function() {
1599
+ var _a;
1600
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1601
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1602
+ if (parentNodes && index > -1) {
1603
+ return parentNodes[index - 1];
1604
+ }
1605
+ return this.__previousElementSibling;
1501
1606
  }
1502
- }
1503
- return null;
1607
+ });
1504
1608
  };
1505
- var getHostSlotChildNodes = (n, slotName) => {
1506
- const childNodes = [n];
1507
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
1508
- childNodes.push(n);
1609
+ var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1610
+ var validNodesPatches = [
1611
+ "childNodes",
1612
+ "firstChild",
1613
+ "lastChild",
1614
+ "nextSibling",
1615
+ "previousSibling",
1616
+ "textContent"
1617
+ ];
1618
+ function patchHostOriginalAccessor(accessorName, node) {
1619
+ let accessor;
1620
+ if (validElementPatches.includes(accessorName)) {
1621
+ accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
1622
+ } else if (validNodesPatches.includes(accessorName)) {
1623
+ accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
1509
1624
  }
1510
- return childNodes;
1511
- };
1625
+ if (!accessor) {
1626
+ accessor = Object.getOwnPropertyDescriptor(node, accessorName);
1627
+ }
1628
+ if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1629
+ }
1512
1630
 
1513
1631
  // src/runtime/profile.ts
1514
- import { BUILD as BUILD12 } from "@stencil/core/internal/app-data";
1632
+ import { BUILD as BUILD13 } from "@stencil/core/internal/app-data";
1515
1633
  var i = 0;
1516
1634
  var createTime = (fnName, tagName = "") => {
1517
- if (BUILD12.profile && performance.mark) {
1635
+ if (BUILD13.profile && performance.mark) {
1518
1636
  const key = `st:${fnName}:${tagName}:${i++}`;
1519
1637
  performance.mark(key);
1520
1638
  return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);
@@ -1525,7 +1643,7 @@ var createTime = (fnName, tagName = "") => {
1525
1643
  }
1526
1644
  };
1527
1645
  var uniqueTime = (key, measureText) => {
1528
- if (BUILD12.profile && performance.mark) {
1646
+ if (BUILD13.profile && performance.mark) {
1529
1647
  if (performance.getEntriesByName(key, "mark").length === 0) {
1530
1648
  performance.mark(key);
1531
1649
  }
@@ -1583,7 +1701,7 @@ var inspect = (ref) => {
1583
1701
  };
1584
1702
  };
1585
1703
  var installDevTools = () => {
1586
- if (BUILD12.devTools) {
1704
+ if (BUILD13.devTools) {
1587
1705
  const stencil = win.stencil = win.stencil || {};
1588
1706
  const originalInspect = stencil.inspect;
1589
1707
  stencil.inspect = (ref) => {
@@ -1603,9 +1721,19 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1603
1721
  const childRenderNodes = [];
1604
1722
  const slotNodes = [];
1605
1723
  const slottedNodes = [];
1606
- const shadowRootNodes = BUILD13.shadowDom && shadowRoot ? [] : null;
1724
+ const shadowRootNodes = BUILD14.shadowDom && shadowRoot ? [] : null;
1607
1725
  const vnode = newVNode(tagName, null);
1608
1726
  vnode.$elm$ = hostElm;
1727
+ let scopeId2;
1728
+ if (BUILD14.scoped) {
1729
+ const cmpMeta = hostRef.$cmpMeta$;
1730
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1731
+ scopeId2 = hostElm["s-sc"];
1732
+ hostElm.classList.add(scopeId2 + "-h");
1733
+ } else if (hostElm["s-sc"]) {
1734
+ delete hostElm["s-sc"];
1735
+ }
1736
+ }
1609
1737
  if (!plt.$orgLocNodes$) {
1610
1738
  initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1611
1739
  }
@@ -1635,6 +1763,18 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1635
1763
  node["s-cr"] = hostElm["s-cr"];
1636
1764
  }
1637
1765
  }
1766
+ if (childRenderNode.$tag$ === "slot") {
1767
+ if (childRenderNode.$children$) {
1768
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1769
+ if (!childRenderNode.$elm$.childNodes.length) {
1770
+ childRenderNode.$children$.forEach((c) => {
1771
+ childRenderNode.$elm$.appendChild(c.$elm$);
1772
+ });
1773
+ }
1774
+ } else {
1775
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
1776
+ }
1777
+ }
1638
1778
  if (orgLocationNode && orgLocationNode.isConnected) {
1639
1779
  if (shadowRoot && orgLocationNode["s-en"] === "") {
1640
1780
  orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
@@ -1647,8 +1787,8 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1647
1787
  plt.$orgLocNodes$.delete(orgLocationId);
1648
1788
  }
1649
1789
  const hosts = [];
1650
- let snIndex = 0;
1651
1790
  const snLen = slottedNodes.length;
1791
+ let snIndex = 0;
1652
1792
  let slotGroup;
1653
1793
  let snGroupIdx;
1654
1794
  let snGroupLen;
@@ -1670,17 +1810,24 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1670
1810
  if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1671
1811
  slottedItem.slot["s-cr"] = hostEle;
1672
1812
  } else {
1673
- const hostChildren = hostEle.__childNodes || hostEle.childNodes;
1674
- slottedItem.slot["s-cr"] = hostChildren[0];
1813
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1675
1814
  }
1676
1815
  addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1816
+ if (BUILD14.experimentalSlotFixes) {
1817
+ patchNextPrev(slottedItem.node);
1818
+ }
1677
1819
  }
1678
1820
  if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1679
1821
  hostEle.appendChild(slottedItem.node);
1680
1822
  }
1681
1823
  }
1682
1824
  }
1683
- if (BUILD13.shadowDom && shadowRoot) {
1825
+ if (BUILD14.scoped && scopeId2 && slotNodes.length) {
1826
+ slotNodes.forEach((slot) => {
1827
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1828
+ });
1829
+ }
1830
+ if (BUILD14.shadowDom && shadowRoot) {
1684
1831
  let rnIdex = 0;
1685
1832
  const rnLen = shadowRootNodes.length;
1686
1833
  for (rnIdex; rnIdex < rnLen; rnIdex++) {
@@ -1714,15 +1861,19 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1714
1861
  $index$: childIdSplt[3],
1715
1862
  $tag$: node.tagName.toLowerCase(),
1716
1863
  $elm$: node,
1717
- // If we don't add the initial classes to the VNode, the first `vdom-render.ts` reconciliation will fail:
1718
- // client side changes before componentDidLoad will be ignored, `set-accessor.ts` will just take the element's initial classes
1719
- $attrs$: { class: node.className }
1864
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1865
+ // won't try to reconcile them. Classes set on the node will be blown away.
1866
+ $attrs$: { class: node.className || "" }
1720
1867
  });
1721
1868
  childRenderNodes.push(childVNode);
1722
1869
  node.removeAttribute(HYDRATE_CHILD_ID);
1723
1870
  if (!parentVNode.$children$) {
1724
1871
  parentVNode.$children$ = [];
1725
1872
  }
1873
+ if (BUILD14.scoped && scopeId2) {
1874
+ node["s-si"] = scopeId2;
1875
+ childVNode.$attrs$.class += " " + scopeId2;
1876
+ }
1726
1877
  const slotName = childVNode.$elm$.getAttribute("s-sn");
1727
1878
  if (typeof slotName === "string") {
1728
1879
  if (childVNode.$tag$ === "slot-fb") {
@@ -1737,6 +1888,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1737
1888
  shadowRootNodes,
1738
1889
  slottedNodes
1739
1890
  );
1891
+ if (BUILD14.scoped && scopeId2) {
1892
+ node.classList.add(scopeId2);
1893
+ }
1740
1894
  }
1741
1895
  childVNode.$elm$["s-sn"] = slotName;
1742
1896
  childVNode.$elm$.removeAttribute("s-sn");
@@ -1744,7 +1898,6 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1744
1898
  if (childVNode.$index$ !== void 0) {
1745
1899
  parentVNode.$children$[childVNode.$index$] = childVNode;
1746
1900
  }
1747
- if (scopeId2) node["s-si"] = scopeId2;
1748
1901
  parentVNode = childVNode;
1749
1902
  if (shadowRootNodes && childVNode.$depth$ === "0") {
1750
1903
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
@@ -1819,8 +1972,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1819
1972
  }
1820
1973
  } else if (childVNode.$hostId$ === hostId) {
1821
1974
  if (childNodeType === SLOT_NODE_ID) {
1822
- childVNode.$tag$ = "slot";
1823
- const slotName = node["s-sn"] = childVNode.$name$ = childIdSplt[5] || "";
1975
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
1824
1976
  addSlot(
1825
1977
  slotName,
1826
1978
  childIdSplt[2],
@@ -1833,9 +1985,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1833
1985
  slottedNodes
1834
1986
  );
1835
1987
  } else if (childNodeType === CONTENT_REF_ID) {
1836
- if (BUILD13.shadowDom && shadowRootNodes) {
1988
+ if (BUILD14.shadowDom && shadowRootNodes) {
1837
1989
  node.remove();
1838
- } else if (BUILD13.slotRelocation) {
1990
+ } else if (BUILD14.slotRelocation) {
1839
1991
  hostElm["s-cr"] = node;
1840
1992
  node["s-cn"] = true;
1841
1993
  }
@@ -1894,8 +2046,10 @@ var createSimpleVNode = (vnode) => {
1894
2046
  };
1895
2047
  function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1896
2048
  node["s-sr"] = true;
2049
+ childVNode.$name$ = slotName || null;
2050
+ childVNode.$tag$ = "slot";
1897
2051
  const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1898
- if (BUILD13.shadowDom && shadowRootNodes) {
2052
+ if (BUILD14.shadowDom && shadowRootNodes) {
1899
2053
  const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
1900
2054
  if (childVNode.$name$) {
1901
2055
  childVNode.$elm$.setAttribute("name", slotName);
@@ -1936,7 +2090,7 @@ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) =>
1936
2090
  };
1937
2091
 
1938
2092
  // src/runtime/initialize-component.ts
1939
- import { BUILD as BUILD21 } from "@stencil/core/internal/app-data";
2093
+ import { BUILD as BUILD22 } from "@stencil/core/internal/app-data";
1940
2094
 
1941
2095
  // src/runtime/mode.ts
1942
2096
  var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
@@ -1944,22 +2098,22 @@ var setMode = (handler) => modeResolutionChain.push(handler);
1944
2098
  var getMode = (ref) => getHostRef(ref).$modeName$;
1945
2099
 
1946
2100
  // src/runtime/proxy-component.ts
1947
- import { BUILD as BUILD20 } from "@stencil/core/internal/app-data";
2101
+ import { BUILD as BUILD21 } from "@stencil/core/internal/app-data";
1948
2102
 
1949
2103
  // src/runtime/set-value.ts
1950
- import { BUILD as BUILD19 } from "@stencil/core/internal/app-data";
2104
+ import { BUILD as BUILD20 } from "@stencil/core/internal/app-data";
1951
2105
 
1952
2106
  // src/runtime/parse-property-value.ts
1953
- import { BUILD as BUILD14 } from "@stencil/core/internal/app-data";
2107
+ import { BUILD as BUILD15 } from "@stencil/core/internal/app-data";
1954
2108
  var parsePropertyValue = (propValue, propType) => {
1955
2109
  if (propValue != null && !isComplexType(propValue)) {
1956
- if (BUILD14.propBoolean && propType & 4 /* Boolean */) {
2110
+ if (BUILD15.propBoolean && propType & 4 /* Boolean */) {
1957
2111
  return propValue === "false" ? false : propValue === "" || !!propValue;
1958
2112
  }
1959
- if (BUILD14.propNumber && propType & 2 /* Number */) {
2113
+ if (BUILD15.propNumber && propType & 2 /* Number */) {
1960
2114
  return parseFloat(propValue);
1961
2115
  }
1962
- if (BUILD14.propString && propType & 1 /* String */) {
2116
+ if (BUILD15.propString && propType & 1 /* String */) {
1963
2117
  return String(propValue);
1964
2118
  }
1965
2119
  return propValue;
@@ -1968,21 +2122,21 @@ var parsePropertyValue = (propValue, propType) => {
1968
2122
  };
1969
2123
 
1970
2124
  // src/runtime/update-component.ts
1971
- import { BUILD as BUILD18, NAMESPACE } from "@stencil/core/internal/app-data";
2125
+ import { BUILD as BUILD19, NAMESPACE } from "@stencil/core/internal/app-data";
1972
2126
 
1973
2127
  // src/runtime/event-emitter.ts
1974
- import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
2128
+ import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
1975
2129
 
1976
2130
  // src/runtime/element.ts
1977
- import { BUILD as BUILD15 } from "@stencil/core/internal/app-data";
1978
- var getElement = (ref) => BUILD15.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2131
+ import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
2132
+ var getElement = (ref) => BUILD16.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
1979
2133
 
1980
2134
  // src/runtime/event-emitter.ts
1981
2135
  var createEvent = (ref, name, flags) => {
1982
2136
  const elm = getElement(ref);
1983
2137
  return {
1984
2138
  emit: (detail) => {
1985
- if (BUILD16.isDev && !elm.isConnected) {
2139
+ if (BUILD17.isDev && !elm.isConnected) {
1986
2140
  consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
1987
2141
  }
1988
2142
  return emitEvent(elm, name, {
@@ -2001,7 +2155,7 @@ var emitEvent = (elm, name, opts) => {
2001
2155
  };
2002
2156
 
2003
2157
  // src/runtime/styles.ts
2004
- import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
2158
+ import { BUILD as BUILD18 } from "@stencil/core/internal/app-data";
2005
2159
  var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
2006
2160
  var registerStyle = (scopeId2, cssText, allowCS) => {
2007
2161
  let style = styles.get(scopeId2);
@@ -2021,7 +2175,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2021
2175
  var _a;
2022
2176
  const scopeId2 = getScopeId(cmpMeta, mode);
2023
2177
  const style = styles.get(scopeId2);
2024
- if (!BUILD17.attachStyles) {
2178
+ if (!BUILD18.attachStyles) {
2025
2179
  return scopeId2;
2026
2180
  }
2027
2181
  styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
@@ -2034,16 +2188,16 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2034
2188
  rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2035
2189
  }
2036
2190
  if (!appliedStyles.has(scopeId2)) {
2037
- if (BUILD17.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
2191
+ if (BUILD18.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
2038
2192
  styleElm.innerHTML = style;
2039
2193
  } else {
2040
- styleElm = doc.createElement("style");
2194
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
2041
2195
  styleElm.innerHTML = style;
2042
2196
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
2043
2197
  if (nonce != null) {
2044
2198
  styleElm.setAttribute("nonce", nonce);
2045
2199
  }
2046
- if ((BUILD17.hydrateServerSide || BUILD17.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2200
+ if ((BUILD18.hydrateServerSide || BUILD18.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2047
2201
  styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
2048
2202
  }
2049
2203
  if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
@@ -2079,7 +2233,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2079
2233
  appliedStyles.add(scopeId2);
2080
2234
  }
2081
2235
  }
2082
- } else if (BUILD17.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
2236
+ } else if (BUILD18.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
2083
2237
  styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
2084
2238
  }
2085
2239
  }
@@ -2091,43 +2245,40 @@ var attachStyles = (hostRef) => {
2091
2245
  const flags = cmpMeta.$flags$;
2092
2246
  const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
2093
2247
  const scopeId2 = addStyle(
2094
- BUILD17.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2248
+ BUILD18.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2095
2249
  cmpMeta,
2096
2250
  hostRef.$modeName$
2097
2251
  );
2098
- if ((BUILD17.shadowDom || BUILD17.scoped) && BUILD17.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
2252
+ if ((BUILD18.shadowDom || BUILD18.scoped) && BUILD18.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
2099
2253
  elm["s-sc"] = scopeId2;
2100
2254
  elm.classList.add(scopeId2 + "-h");
2101
- if (BUILD17.scoped && flags & 2 /* scopedCssEncapsulation */) {
2102
- elm.classList.add(scopeId2 + "-s");
2103
- }
2104
2255
  }
2105
2256
  endAttachStyles();
2106
2257
  };
2107
- var getScopeId = (cmp, mode) => "sc-" + (BUILD17.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
2258
+ var getScopeId = (cmp, mode) => "sc-" + (BUILD18.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
2108
2259
 
2109
2260
  // src/runtime/update-component.ts
2110
2261
  var attachToAncestor = (hostRef, ancestorComponent) => {
2111
- if (BUILD18.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
2262
+ if (BUILD19.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
2112
2263
  ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
2113
2264
  }
2114
2265
  };
2115
2266
  var scheduleUpdate = (hostRef, isInitialLoad) => {
2116
- if (BUILD18.taskQueue && BUILD18.updatable) {
2267
+ if (BUILD19.taskQueue && BUILD19.updatable) {
2117
2268
  hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
2118
2269
  }
2119
- if (BUILD18.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
2270
+ if (BUILD19.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
2120
2271
  hostRef.$flags$ |= 512 /* needsRerender */;
2121
2272
  return;
2122
2273
  }
2123
2274
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
2124
2275
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
2125
- return BUILD18.taskQueue ? writeTask(dispatch) : dispatch();
2276
+ return BUILD19.taskQueue ? writeTask(dispatch) : dispatch();
2126
2277
  };
2127
2278
  var dispatchHooks = (hostRef, isInitialLoad) => {
2128
2279
  const elm = hostRef.$hostElement$;
2129
2280
  const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
2130
- const instance = BUILD18.lazyLoad ? hostRef.$lazyInstance$ : elm;
2281
+ const instance = BUILD19.lazyLoad ? hostRef.$lazyInstance$ : elm;
2131
2282
  if (!instance) {
2132
2283
  throw new Error(
2133
2284
  `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
@@ -2135,7 +2286,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
2135
2286
  }
2136
2287
  let maybePromise;
2137
2288
  if (isInitialLoad) {
2138
- if (BUILD18.lazyLoad && BUILD18.hostListener) {
2289
+ if (BUILD19.lazyLoad && BUILD19.hostListener) {
2139
2290
  hostRef.$flags$ |= 256 /* isListenReady */;
2140
2291
  if (hostRef.$queuedListeners$) {
2141
2292
  hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
@@ -2143,17 +2294,17 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
2143
2294
  }
2144
2295
  }
2145
2296
  emitLifecycleEvent(elm, "componentWillLoad");
2146
- if (BUILD18.cmpWillLoad) {
2297
+ if (BUILD19.cmpWillLoad) {
2147
2298
  maybePromise = safeCall(instance, "componentWillLoad");
2148
2299
  }
2149
2300
  } else {
2150
2301
  emitLifecycleEvent(elm, "componentWillUpdate");
2151
- if (BUILD18.cmpWillUpdate) {
2302
+ if (BUILD19.cmpWillUpdate) {
2152
2303
  maybePromise = safeCall(instance, "componentWillUpdate");
2153
2304
  }
2154
2305
  }
2155
2306
  emitLifecycleEvent(elm, "componentWillRender");
2156
- if (BUILD18.cmpWillRender) {
2307
+ if (BUILD19.cmpWillRender) {
2157
2308
  maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
2158
2309
  }
2159
2310
  endSchedule();
@@ -2169,23 +2320,23 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2169
2320
  const elm = hostRef.$hostElement$;
2170
2321
  const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
2171
2322
  const rc = elm["s-rc"];
2172
- if (BUILD18.style && isInitialLoad) {
2323
+ if (BUILD19.style && isInitialLoad) {
2173
2324
  attachStyles(hostRef);
2174
2325
  }
2175
2326
  const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
2176
- if (BUILD18.isDev) {
2327
+ if (BUILD19.isDev) {
2177
2328
  hostRef.$flags$ |= 1024 /* devOnRender */;
2178
2329
  }
2179
- if (BUILD18.hydrateServerSide) {
2330
+ if (BUILD19.hydrateServerSide) {
2180
2331
  await callRender(hostRef, instance, elm, isInitialLoad);
2181
2332
  } else {
2182
2333
  callRender(hostRef, instance, elm, isInitialLoad);
2183
2334
  }
2184
- if (BUILD18.isDev) {
2335
+ if (BUILD19.isDev) {
2185
2336
  hostRef.$renderCount$ = hostRef.$renderCount$ === void 0 ? 1 : hostRef.$renderCount$ + 1;
2186
2337
  hostRef.$flags$ &= ~1024 /* devOnRender */;
2187
2338
  }
2188
- if (BUILD18.hydrateServerSide) {
2339
+ if (BUILD19.hydrateServerSide) {
2189
2340
  try {
2190
2341
  serverSideConnected(elm);
2191
2342
  if (isInitialLoad) {
@@ -2199,13 +2350,13 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2199
2350
  consoleError(e, elm);
2200
2351
  }
2201
2352
  }
2202
- if (BUILD18.asyncLoading && rc) {
2353
+ if (BUILD19.asyncLoading && rc) {
2203
2354
  rc.map((cb) => cb());
2204
2355
  elm["s-rc"] = void 0;
2205
2356
  }
2206
2357
  endRender();
2207
2358
  endUpdate();
2208
- if (BUILD18.asyncLoading) {
2359
+ if (BUILD19.asyncLoading) {
2209
2360
  const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
2210
2361
  const postUpdate = () => postUpdateComponent(hostRef);
2211
2362
  if (childrenPromises.length === 0) {
@@ -2221,10 +2372,10 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2221
2372
  };
2222
2373
  var renderingRef = null;
2223
2374
  var callRender = (hostRef, instance, elm, isInitialLoad) => {
2224
- const allRenderFn = BUILD18.allRenderFn ? true : false;
2225
- const lazyLoad = BUILD18.lazyLoad ? true : false;
2226
- const taskQueue = BUILD18.taskQueue ? true : false;
2227
- const updatable = BUILD18.updatable ? true : false;
2375
+ const allRenderFn = BUILD19.allRenderFn ? true : false;
2376
+ const lazyLoad = BUILD19.lazyLoad ? true : false;
2377
+ const taskQueue = BUILD19.taskQueue ? true : false;
2378
+ const updatable = BUILD19.updatable ? true : false;
2228
2379
  try {
2229
2380
  renderingRef = instance;
2230
2381
  instance = allRenderFn ? instance.render() : instance.render && instance.render();
@@ -2234,9 +2385,9 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
2234
2385
  if (updatable || lazyLoad) {
2235
2386
  hostRef.$flags$ |= 2 /* hasRendered */;
2236
2387
  }
2237
- if (BUILD18.hasRenderFn || BUILD18.reflect) {
2238
- if (BUILD18.vdomRender || BUILD18.reflect) {
2239
- if (BUILD18.hydrateServerSide) {
2388
+ if (BUILD19.hasRenderFn || BUILD19.reflect) {
2389
+ if (BUILD19.vdomRender || BUILD19.reflect) {
2390
+ if (BUILD19.hydrateServerSide) {
2240
2391
  return Promise.resolve(instance).then((value) => renderVdom(hostRef, value, isInitialLoad));
2241
2392
  } else {
2242
2393
  renderVdom(hostRef, instance, isInitialLoad);
@@ -2261,57 +2412,57 @@ var postUpdateComponent = (hostRef) => {
2261
2412
  const tagName = hostRef.$cmpMeta$.$tagName$;
2262
2413
  const elm = hostRef.$hostElement$;
2263
2414
  const endPostUpdate = createTime("postUpdate", tagName);
2264
- const instance = BUILD18.lazyLoad ? hostRef.$lazyInstance$ : elm;
2415
+ const instance = BUILD19.lazyLoad ? hostRef.$lazyInstance$ : elm;
2265
2416
  const ancestorComponent = hostRef.$ancestorComponent$;
2266
- if (BUILD18.cmpDidRender) {
2267
- if (BUILD18.isDev) {
2417
+ if (BUILD19.cmpDidRender) {
2418
+ if (BUILD19.isDev) {
2268
2419
  hostRef.$flags$ |= 1024 /* devOnRender */;
2269
2420
  }
2270
2421
  safeCall(instance, "componentDidRender");
2271
- if (BUILD18.isDev) {
2422
+ if (BUILD19.isDev) {
2272
2423
  hostRef.$flags$ &= ~1024 /* devOnRender */;
2273
2424
  }
2274
2425
  }
2275
2426
  emitLifecycleEvent(elm, "componentDidRender");
2276
2427
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
2277
2428
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
2278
- if (BUILD18.asyncLoading && BUILD18.cssAnnotations) {
2429
+ if (BUILD19.asyncLoading && BUILD19.cssAnnotations) {
2279
2430
  addHydratedFlag(elm);
2280
2431
  }
2281
- if (BUILD18.cmpDidLoad) {
2282
- if (BUILD18.isDev) {
2432
+ if (BUILD19.cmpDidLoad) {
2433
+ if (BUILD19.isDev) {
2283
2434
  hostRef.$flags$ |= 2048 /* devOnDidLoad */;
2284
2435
  }
2285
2436
  safeCall(instance, "componentDidLoad");
2286
- if (BUILD18.isDev) {
2437
+ if (BUILD19.isDev) {
2287
2438
  hostRef.$flags$ &= ~2048 /* devOnDidLoad */;
2288
2439
  }
2289
2440
  }
2290
2441
  emitLifecycleEvent(elm, "componentDidLoad");
2291
2442
  endPostUpdate();
2292
- if (BUILD18.asyncLoading) {
2443
+ if (BUILD19.asyncLoading) {
2293
2444
  hostRef.$onReadyResolve$(elm);
2294
2445
  if (!ancestorComponent) {
2295
2446
  appDidLoad(tagName);
2296
2447
  }
2297
2448
  }
2298
2449
  } else {
2299
- if (BUILD18.cmpDidUpdate) {
2300
- if (BUILD18.isDev) {
2450
+ if (BUILD19.cmpDidUpdate) {
2451
+ if (BUILD19.isDev) {
2301
2452
  hostRef.$flags$ |= 1024 /* devOnRender */;
2302
2453
  }
2303
2454
  safeCall(instance, "componentDidUpdate");
2304
- if (BUILD18.isDev) {
2455
+ if (BUILD19.isDev) {
2305
2456
  hostRef.$flags$ &= ~1024 /* devOnRender */;
2306
2457
  }
2307
2458
  }
2308
2459
  emitLifecycleEvent(elm, "componentDidUpdate");
2309
2460
  endPostUpdate();
2310
2461
  }
2311
- if (BUILD18.method && BUILD18.lazyLoad) {
2462
+ if (BUILD19.method && BUILD19.lazyLoad) {
2312
2463
  hostRef.$onInstanceResolve$(elm);
2313
2464
  }
2314
- if (BUILD18.asyncLoading) {
2465
+ if (BUILD19.asyncLoading) {
2315
2466
  if (hostRef.$onRenderResolve$) {
2316
2467
  hostRef.$onRenderResolve$();
2317
2468
  hostRef.$onRenderResolve$ = void 0;
@@ -2323,7 +2474,7 @@ var postUpdateComponent = (hostRef) => {
2323
2474
  }
2324
2475
  };
2325
2476
  var forceUpdate = (ref) => {
2326
- if (BUILD18.updatable && (Build.isBrowser || Build.isTesting)) {
2477
+ if (BUILD19.updatable && (Build.isBrowser || Build.isTesting)) {
2327
2478
  const hostRef = getHostRef(ref);
2328
2479
  const isConnected = hostRef.$hostElement$.isConnected;
2329
2480
  if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
@@ -2334,14 +2485,14 @@ var forceUpdate = (ref) => {
2334
2485
  return false;
2335
2486
  };
2336
2487
  var appDidLoad = (who) => {
2337
- if (BUILD18.cssAnnotations) {
2488
+ if (BUILD19.cssAnnotations) {
2338
2489
  addHydratedFlag(doc.documentElement);
2339
2490
  }
2340
- if (BUILD18.asyncQueue) {
2491
+ if (BUILD19.asyncQueue) {
2341
2492
  plt.$flags$ |= 2 /* appLoaded */;
2342
2493
  }
2343
2494
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
2344
- if (BUILD18.profile && performance.measure) {
2495
+ if (BUILD19.profile && performance.measure) {
2345
2496
  performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${who})`, "st:app:start");
2346
2497
  }
2347
2498
  };
@@ -2356,7 +2507,7 @@ var safeCall = (instance, method, arg) => {
2356
2507
  return void 0;
2357
2508
  };
2358
2509
  var emitLifecycleEvent = (elm, lifecycleName) => {
2359
- if (BUILD18.lifecycleDOMEvents) {
2510
+ if (BUILD19.lifecycleDOMEvents) {
2360
2511
  emitEvent(elm, "stencil_" + lifecycleName, {
2361
2512
  bubbles: true,
2362
2513
  composed: true,
@@ -2368,7 +2519,7 @@ var emitLifecycleEvent = (elm, lifecycleName) => {
2368
2519
  };
2369
2520
  var addHydratedFlag = (elm) => {
2370
2521
  var _a, _b;
2371
- return BUILD18.hydratedClass ? elm.classList.add((_a = BUILD18.hydratedSelectorName) != null ? _a : "hydrated") : BUILD18.hydratedAttribute ? elm.setAttribute((_b = BUILD18.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
2522
+ return BUILD19.hydratedClass ? elm.classList.add((_a = BUILD19.hydratedSelectorName) != null ? _a : "hydrated") : BUILD19.hydratedAttribute ? elm.setAttribute((_b = BUILD19.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
2372
2523
  };
2373
2524
  var serverSideConnected = (elm) => {
2374
2525
  const children = elm.children;
@@ -2387,21 +2538,21 @@ var serverSideConnected = (elm) => {
2387
2538
  var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
2388
2539
  var setValue = (ref, propName, newVal, cmpMeta) => {
2389
2540
  const hostRef = getHostRef(ref);
2390
- if (BUILD19.lazyLoad && !hostRef) {
2541
+ if (BUILD20.lazyLoad && !hostRef) {
2391
2542
  throw new Error(
2392
2543
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
2393
2544
  );
2394
2545
  }
2395
- const elm = BUILD19.lazyLoad ? hostRef.$hostElement$ : ref;
2546
+ const elm = BUILD20.lazyLoad ? hostRef.$hostElement$ : ref;
2396
2547
  const oldVal = hostRef.$instanceValues$.get(propName);
2397
2548
  const flags = hostRef.$flags$;
2398
- const instance = BUILD19.lazyLoad ? hostRef.$lazyInstance$ : elm;
2549
+ const instance = BUILD20.lazyLoad ? hostRef.$lazyInstance$ : elm;
2399
2550
  newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
2400
2551
  const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
2401
2552
  const didValueChange = newVal !== oldVal && !areBothNaN;
2402
- if ((!BUILD19.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
2553
+ if ((!BUILD20.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
2403
2554
  hostRef.$instanceValues$.set(propName, newVal);
2404
- if (BUILD19.isDev) {
2555
+ if (BUILD20.isDev) {
2405
2556
  if (hostRef.$flags$ & 1024 /* devOnRender */) {
2406
2557
  consoleDevWarn(
2407
2558
  `The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,
@@ -2424,8 +2575,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2424
2575
  );
2425
2576
  }
2426
2577
  }
2427
- if (!BUILD19.lazyLoad || instance) {
2428
- if (BUILD19.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
2578
+ if (!BUILD20.lazyLoad || instance) {
2579
+ if (BUILD20.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
2429
2580
  const watchMethods = cmpMeta.$watchers$[propName];
2430
2581
  if (watchMethods) {
2431
2582
  watchMethods.map((watchMethodName) => {
@@ -2437,8 +2588,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2437
2588
  });
2438
2589
  }
2439
2590
  }
2440
- if (BUILD19.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2441
- if (BUILD19.cmpShouldUpdate && instance.componentShouldUpdate) {
2591
+ if (BUILD20.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2592
+ if (BUILD20.cmpShouldUpdate && instance.componentShouldUpdate) {
2442
2593
  if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
2443
2594
  return;
2444
2595
  }
@@ -2453,40 +2604,40 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2453
2604
  var proxyComponent = (Cstr, cmpMeta, flags) => {
2454
2605
  var _a, _b;
2455
2606
  const prototype = Cstr.prototype;
2456
- if (BUILD20.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
2607
+ if (BUILD21.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
2457
2608
  FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
2458
2609
  const originalFormAssociatedCallback = prototype[cbName];
2459
2610
  Object.defineProperty(prototype, cbName, {
2460
2611
  value(...args) {
2461
2612
  const hostRef = getHostRef(this);
2462
- const instance = BUILD20.lazyLoad ? hostRef.$lazyInstance$ : this;
2613
+ const instance = BUILD21.lazyLoad ? hostRef.$lazyInstance$ : this;
2463
2614
  if (!instance) {
2464
2615
  hostRef.$onReadyPromise$.then((asyncInstance) => {
2465
2616
  const cb = asyncInstance[cbName];
2466
2617
  typeof cb === "function" && cb.call(asyncInstance, ...args);
2467
2618
  });
2468
2619
  } else {
2469
- const cb = BUILD20.lazyLoad ? instance[cbName] : originalFormAssociatedCallback;
2620
+ const cb = BUILD21.lazyLoad ? instance[cbName] : originalFormAssociatedCallback;
2470
2621
  typeof cb === "function" && cb.call(instance, ...args);
2471
2622
  }
2472
2623
  }
2473
2624
  });
2474
2625
  });
2475
2626
  }
2476
- if (BUILD20.member && cmpMeta.$members$ || BUILD20.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
2477
- if (BUILD20.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
2627
+ if (BUILD21.member && cmpMeta.$members$ || BUILD21.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
2628
+ if (BUILD21.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
2478
2629
  cmpMeta.$watchers$ = Cstr.watchers;
2479
2630
  }
2480
2631
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
2481
2632
  members.map(([memberName, [memberFlags]]) => {
2482
- if ((BUILD20.prop || BUILD20.state) && (memberFlags & 31 /* Prop */ || (!BUILD20.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2633
+ if ((BUILD21.prop || BUILD21.state) && (memberFlags & 31 /* Prop */ || (!BUILD21.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2483
2634
  if ((memberFlags & 2048 /* Getter */) === 0) {
2484
2635
  Object.defineProperty(prototype, memberName, {
2485
2636
  get() {
2486
2637
  return getValue(this, memberName);
2487
2638
  },
2488
2639
  set(newValue) {
2489
- if (BUILD20.isDev) {
2640
+ if (BUILD21.isDev) {
2490
2641
  const ref = getHostRef(this);
2491
2642
  if (
2492
2643
  // we are proxying the instance (not element)
@@ -2507,11 +2658,11 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2507
2658
  enumerable: true
2508
2659
  });
2509
2660
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2510
- if (BUILD20.lazyLoad) {
2661
+ if (BUILD21.lazyLoad) {
2511
2662
  Object.defineProperty(prototype, memberName, {
2512
2663
  get() {
2513
2664
  const ref = getHostRef(this);
2514
- const instance = BUILD20.lazyLoad && ref ? ref.$lazyInstance$ : prototype;
2665
+ const instance = BUILD21.lazyLoad && ref ? ref.$lazyInstance$ : prototype;
2515
2666
  if (!instance) return;
2516
2667
  return instance[memberName];
2517
2668
  },
@@ -2551,7 +2702,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2551
2702
  });
2552
2703
  }
2553
2704
  }
2554
- } else if (BUILD20.lazyLoad && BUILD20.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
2705
+ } else if (BUILD21.lazyLoad && BUILD21.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
2555
2706
  Object.defineProperty(prototype, memberName, {
2556
2707
  value(...args) {
2557
2708
  var _a2;
@@ -2564,13 +2715,13 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2564
2715
  });
2565
2716
  }
2566
2717
  });
2567
- if (BUILD20.observeAttribute && (!BUILD20.lazyLoad || flags & 1 /* isElementConstructor */)) {
2718
+ if (BUILD21.observeAttribute && (!BUILD21.lazyLoad || flags & 1 /* isElementConstructor */)) {
2568
2719
  const attrNameToPropName = /* @__PURE__ */ new Map();
2569
2720
  prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
2570
2721
  plt.jmp(() => {
2571
2722
  var _a2;
2572
2723
  const propName = attrNameToPropName.get(attrName);
2573
- if (this.hasOwnProperty(propName)) {
2724
+ if (this.hasOwnProperty(propName) && BUILD21.lazyLoad) {
2574
2725
  newValue = this[propName];
2575
2726
  delete this[propName];
2576
2727
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -2580,8 +2731,8 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2580
2731
  const hostRef = getHostRef(this);
2581
2732
  const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
2582
2733
  if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
2583
- const elm = BUILD20.lazyLoad ? hostRef.$hostElement$ : this;
2584
- const instance = BUILD20.lazyLoad ? hostRef.$lazyInstance$ : elm;
2734
+ const elm = BUILD21.lazyLoad ? hostRef.$hostElement$ : this;
2735
+ const instance = BUILD21.lazyLoad ? hostRef.$lazyInstance$ : elm;
2585
2736
  const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
2586
2737
  entry == null ? void 0 : entry.forEach((callbackName) => {
2587
2738
  if (instance[callbackName] != null) {
@@ -2604,7 +2755,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
2604
2755
  var _a2;
2605
2756
  const attrName = m[1] || propName;
2606
2757
  attrNameToPropName.set(attrName, propName);
2607
- if (BUILD20.reflect && m[0] & 512 /* ReflectAttr */) {
2758
+ if (BUILD21.reflect && m[0] & 512 /* ReflectAttr */) {
2608
2759
  (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
2609
2760
  }
2610
2761
  return attrName;
@@ -2622,7 +2773,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2622
2773
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
2623
2774
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
2624
2775
  const bundleId = cmpMeta.$lazyBundleId$;
2625
- if ((BUILD21.lazyLoad || BUILD21.hydrateClientSide) && bundleId) {
2776
+ if ((BUILD22.lazyLoad || BUILD22.hydrateClientSide) && bundleId) {
2626
2777
  const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
2627
2778
  if (CstrImport && "then" in CstrImport) {
2628
2779
  const endLoad = uniqueTime(
@@ -2637,15 +2788,15 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2637
2788
  if (!Cstr) {
2638
2789
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
2639
2790
  }
2640
- if (BUILD21.member && !Cstr.isProxied) {
2641
- if (BUILD21.watchCallback) {
2791
+ if (BUILD22.member && !Cstr.isProxied) {
2792
+ if (BUILD22.watchCallback) {
2642
2793
  cmpMeta.$watchers$ = Cstr.watchers;
2643
2794
  }
2644
2795
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
2645
2796
  Cstr.isProxied = true;
2646
2797
  }
2647
2798
  const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
2648
- if (BUILD21.member) {
2799
+ if (BUILD22.member) {
2649
2800
  hostRef.$flags$ |= 8 /* isConstructingInstance */;
2650
2801
  }
2651
2802
  try {
@@ -2653,10 +2804,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2653
2804
  } catch (e) {
2654
2805
  consoleError(e);
2655
2806
  }
2656
- if (BUILD21.member) {
2807
+ if (BUILD22.member) {
2657
2808
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
2658
2809
  }
2659
- if (BUILD21.watchCallback) {
2810
+ if (BUILD22.watchCallback) {
2660
2811
  hostRef.$flags$ |= 128 /* isWatchReady */;
2661
2812
  }
2662
2813
  endNewInstance();
@@ -2666,24 +2817,24 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2666
2817
  const cmpTag = elm.localName;
2667
2818
  customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
2668
2819
  }
2669
- if (BUILD21.style && Cstr && Cstr.style) {
2820
+ if (BUILD22.style && Cstr && Cstr.style) {
2670
2821
  let style;
2671
2822
  if (typeof Cstr.style === "string") {
2672
2823
  style = Cstr.style;
2673
- } else if (BUILD21.mode && typeof Cstr.style !== "string") {
2824
+ } else if (BUILD22.mode && typeof Cstr.style !== "string") {
2674
2825
  hostRef.$modeName$ = computeMode(elm);
2675
2826
  if (hostRef.$modeName$) {
2676
2827
  style = Cstr.style[hostRef.$modeName$];
2677
2828
  }
2678
- if (BUILD21.hydrateServerSide && hostRef.$modeName$) {
2829
+ if (BUILD22.hydrateServerSide && hostRef.$modeName$) {
2679
2830
  elm.setAttribute("s-mode", hostRef.$modeName$);
2680
2831
  }
2681
2832
  }
2682
2833
  const scopeId2 = getScopeId(cmpMeta, hostRef.$modeName$);
2683
2834
  if (!styles.has(scopeId2)) {
2684
2835
  const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
2685
- if (!BUILD21.hydrateServerSide && BUILD21.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2686
- BUILD21.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2836
+ if (!BUILD22.hydrateServerSide && BUILD22.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2837
+ BUILD22.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2687
2838
  style = await import("./shadow-css.js").then((m) => m.scopeCss(style, scopeId2));
2688
2839
  }
2689
2840
  registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
@@ -2693,14 +2844,14 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2693
2844
  }
2694
2845
  const ancestorComponent = hostRef.$ancestorComponent$;
2695
2846
  const schedule = () => scheduleUpdate(hostRef, true);
2696
- if (BUILD21.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
2847
+ if (BUILD22.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
2697
2848
  ancestorComponent["s-rc"].push(schedule);
2698
2849
  } else {
2699
2850
  schedule();
2700
2851
  }
2701
2852
  };
2702
2853
  var fireConnectedCallback = (instance) => {
2703
- if (BUILD21.lazyLoad && BUILD21.connectedCallback) {
2854
+ if (BUILD22.lazyLoad && BUILD22.connectedCallback) {
2704
2855
  safeCall(instance, "connectedCallback");
2705
2856
  }
2706
2857
  };
@@ -2711,41 +2862,41 @@ var connectedCallback = (elm) => {
2711
2862
  const hostRef = getHostRef(elm);
2712
2863
  const cmpMeta = hostRef.$cmpMeta$;
2713
2864
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
2714
- if (BUILD22.hostListenerTargetParent) {
2865
+ if (BUILD23.hostListenerTargetParent) {
2715
2866
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);
2716
2867
  }
2717
2868
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
2718
2869
  hostRef.$flags$ |= 1 /* hasConnected */;
2719
2870
  let hostId;
2720
- if (BUILD22.hydrateClientSide) {
2871
+ if (BUILD23.hydrateClientSide) {
2721
2872
  hostId = elm.getAttribute(HYDRATE_ID);
2722
2873
  if (hostId) {
2723
- if (BUILD22.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2724
- const scopeId2 = BUILD22.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
2874
+ if (BUILD23.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2875
+ const scopeId2 = BUILD23.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
2725
2876
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2726
- } else if (BUILD22.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2727
- const scopeId2 = getScopeId(cmpMeta, BUILD22.mode ? elm.getAttribute("s-mode") : void 0);
2877
+ } else if (BUILD23.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2878
+ const scopeId2 = getScopeId(cmpMeta, BUILD23.mode ? elm.getAttribute("s-mode") : void 0);
2728
2879
  elm["s-sc"] = scopeId2;
2729
2880
  }
2730
2881
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2731
2882
  }
2732
2883
  }
2733
- if (BUILD22.slotRelocation && !hostId) {
2734
- if (BUILD22.hydrateServerSide || (BUILD22.slot || BUILD22.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2884
+ if (BUILD23.slotRelocation && !hostId) {
2885
+ if (BUILD23.hydrateServerSide || (BUILD23.slot || BUILD23.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2735
2886
  cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
2736
2887
  setContentReference(elm);
2737
2888
  }
2738
2889
  }
2739
- if (BUILD22.asyncLoading) {
2890
+ if (BUILD23.asyncLoading) {
2740
2891
  let ancestorComponent = elm;
2741
2892
  while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
2742
- if (BUILD22.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
2893
+ if (BUILD23.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
2743
2894
  attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
2744
2895
  break;
2745
2896
  }
2746
2897
  }
2747
2898
  }
2748
- if (BUILD22.prop && !BUILD22.hydrateServerSide && cmpMeta.$members$) {
2899
+ if (BUILD23.prop && !BUILD23.hydrateServerSide && cmpMeta.$members$) {
2749
2900
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
2750
2901
  if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
2751
2902
  const value = elm[memberName];
@@ -2754,7 +2905,7 @@ var connectedCallback = (elm) => {
2754
2905
  }
2755
2906
  });
2756
2907
  }
2757
- if (BUILD22.initializeNextTick) {
2908
+ if (BUILD23.initializeNextTick) {
2758
2909
  nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
2759
2910
  } else {
2760
2911
  initializeComponent(elm, hostRef, cmpMeta);
@@ -2772,32 +2923,32 @@ var connectedCallback = (elm) => {
2772
2923
  };
2773
2924
  var setContentReference = (elm) => {
2774
2925
  const contentRefElm = elm["s-cr"] = doc.createComment(
2775
- BUILD22.isDebug ? `content-ref (host=${elm.localName})` : ""
2926
+ BUILD23.isDebug ? `content-ref (host=${elm.localName})` : ""
2776
2927
  );
2777
2928
  contentRefElm["s-cn"] = true;
2778
2929
  insertBefore(elm, contentRefElm, elm.firstChild);
2779
2930
  };
2780
2931
 
2781
2932
  // src/runtime/disconnected-callback.ts
2782
- import { BUILD as BUILD23 } from "@stencil/core/internal/app-data";
2933
+ import { BUILD as BUILD24 } from "@stencil/core/internal/app-data";
2783
2934
  var disconnectInstance = (instance) => {
2784
- if (BUILD23.lazyLoad && BUILD23.disconnectedCallback) {
2935
+ if (BUILD24.lazyLoad && BUILD24.disconnectedCallback) {
2785
2936
  safeCall(instance, "disconnectedCallback");
2786
2937
  }
2787
- if (BUILD23.cmpDidUnload) {
2938
+ if (BUILD24.cmpDidUnload) {
2788
2939
  safeCall(instance, "componentDidUnload");
2789
2940
  }
2790
2941
  };
2791
2942
  var disconnectedCallback = async (elm) => {
2792
2943
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
2793
2944
  const hostRef = getHostRef(elm);
2794
- if (BUILD23.hostListener) {
2945
+ if (BUILD24.hostListener) {
2795
2946
  if (hostRef.$rmListeners$) {
2796
2947
  hostRef.$rmListeners$.map((rmListener) => rmListener());
2797
2948
  hostRef.$rmListeners$ = void 0;
2798
2949
  }
2799
2950
  }
2800
- if (!BUILD23.lazyLoad) {
2951
+ if (!BUILD24.lazyLoad) {
2801
2952
  disconnectInstance(elm);
2802
2953
  } else if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
2803
2954
  disconnectInstance(hostRef.$lazyInstance$);
@@ -2816,36 +2967,36 @@ var proxyCustomElement = (Cstr, compactMeta) => {
2816
2967
  $flags$: compactMeta[0],
2817
2968
  $tagName$: compactMeta[1]
2818
2969
  };
2819
- if (BUILD24.member) {
2970
+ if (BUILD25.member) {
2820
2971
  cmpMeta.$members$ = compactMeta[2];
2821
2972
  }
2822
- if (BUILD24.hostListener) {
2973
+ if (BUILD25.hostListener) {
2823
2974
  cmpMeta.$listeners$ = compactMeta[3];
2824
2975
  }
2825
- if (BUILD24.watchCallback) {
2976
+ if (BUILD25.watchCallback) {
2826
2977
  cmpMeta.$watchers$ = Cstr.$watchers$;
2827
2978
  }
2828
- if (BUILD24.reflect) {
2979
+ if (BUILD25.reflect) {
2829
2980
  cmpMeta.$attrsToReflect$ = [];
2830
2981
  }
2831
- if (BUILD24.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2982
+ if (BUILD25.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2832
2983
  cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2833
2984
  }
2834
- if (BUILD24.experimentalSlotFixes) {
2835
- if (BUILD24.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2985
+ if (BUILD25.experimentalSlotFixes) {
2986
+ if (BUILD25.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2836
2987
  patchPseudoShadowDom(Cstr.prototype);
2837
2988
  }
2838
2989
  } else {
2839
- if (BUILD24.slotChildNodesFix) {
2990
+ if (BUILD25.slotChildNodesFix) {
2840
2991
  patchChildSlotNodes(Cstr.prototype);
2841
2992
  }
2842
- if (BUILD24.cloneNodeFix) {
2993
+ if (BUILD25.cloneNodeFix) {
2843
2994
  patchCloneNode(Cstr.prototype);
2844
2995
  }
2845
- if (BUILD24.appendChildSlotFix) {
2996
+ if (BUILD25.appendChildSlotFix) {
2846
2997
  patchSlotAppendChild(Cstr.prototype);
2847
2998
  }
2848
- if (BUILD24.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2999
+ if (BUILD25.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2849
3000
  patchTextContent(Cstr.prototype);
2850
3001
  }
2851
3002
  }
@@ -2863,20 +3014,20 @@ var proxyCustomElement = (Cstr, compactMeta) => {
2863
3014
  this.__hasHostListenerAttached = true;
2864
3015
  }
2865
3016
  connectedCallback(this);
2866
- if (BUILD24.connectedCallback && originalConnectedCallback) {
3017
+ if (BUILD25.connectedCallback && originalConnectedCallback) {
2867
3018
  originalConnectedCallback.call(this);
2868
3019
  }
2869
3020
  },
2870
3021
  disconnectedCallback() {
2871
3022
  disconnectedCallback(this);
2872
- if (BUILD24.disconnectedCallback && originalDisconnectedCallback) {
3023
+ if (BUILD25.disconnectedCallback && originalDisconnectedCallback) {
2873
3024
  originalDisconnectedCallback.call(this);
2874
3025
  }
2875
3026
  },
2876
3027
  __attachShadow() {
2877
3028
  if (supportsShadow) {
2878
3029
  if (!this.shadowRoot) {
2879
- if (BUILD24.shadowDelegatesFocus) {
3030
+ if (BUILD25.shadowDelegatesFocus) {
2880
3031
  this.attachShadow({
2881
3032
  mode: "open",
2882
3033
  delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
@@ -2900,7 +3051,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
2900
3051
  return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
2901
3052
  };
2902
3053
  var forceModeUpdate = (elm) => {
2903
- if (BUILD24.style && BUILD24.mode && !BUILD24.lazyLoad) {
3054
+ if (BUILD25.style && BUILD25.mode && !BUILD25.lazyLoad) {
2904
3055
  const mode = computeMode(elm);
2905
3056
  const hostRef = getHostRef(elm);
2906
3057
  if (hostRef.$modeName$ !== mode) {
@@ -2923,7 +3074,7 @@ var forceModeUpdate = (elm) => {
2923
3074
  };
2924
3075
 
2925
3076
  // src/runtime/bootstrap-lazy.ts
2926
- import { BUILD as BUILD25 } from "@stencil/core/internal/app-data";
3077
+ import { BUILD as BUILD26 } from "@stencil/core/internal/app-data";
2927
3078
 
2928
3079
  // src/runtime/hmr-component.ts
2929
3080
  var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
@@ -2935,7 +3086,7 @@ var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
2935
3086
  // src/runtime/bootstrap-lazy.ts
2936
3087
  var bootstrapLazy = (lazyBundles, options = {}) => {
2937
3088
  var _a;
2938
- if (BUILD25.profile && performance.mark) {
3089
+ if (BUILD26.profile && performance.mark) {
2939
3090
  performance.mark("st:app:start");
2940
3091
  }
2941
3092
  installDevTools();
@@ -2951,12 +3102,12 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2951
3102
  let isBootstrapping = true;
2952
3103
  Object.assign(plt, options);
2953
3104
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
2954
- if (BUILD25.asyncQueue) {
3105
+ if (BUILD26.asyncQueue) {
2955
3106
  if (options.syncQueue) {
2956
3107
  plt.$flags$ |= 4 /* queueSync */;
2957
3108
  }
2958
3109
  }
2959
- if (BUILD25.hydrateClientSide) {
3110
+ if (BUILD26.hydrateClientSide) {
2960
3111
  plt.$flags$ |= 2 /* appLoaded */;
2961
3112
  }
2962
3113
  let hasSlotRelocation = false;
@@ -2972,22 +3123,22 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2972
3123
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
2973
3124
  hasSlotRelocation = true;
2974
3125
  }
2975
- if (BUILD25.member) {
3126
+ if (BUILD26.member) {
2976
3127
  cmpMeta.$members$ = compactMeta[2];
2977
3128
  }
2978
- if (BUILD25.hostListener) {
3129
+ if (BUILD26.hostListener) {
2979
3130
  cmpMeta.$listeners$ = compactMeta[3];
2980
3131
  }
2981
- if (BUILD25.reflect) {
3132
+ if (BUILD26.reflect) {
2982
3133
  cmpMeta.$attrsToReflect$ = [];
2983
3134
  }
2984
- if (BUILD25.watchCallback) {
3135
+ if (BUILD26.watchCallback) {
2985
3136
  cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
2986
3137
  }
2987
- if (BUILD25.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3138
+ if (BUILD26.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2988
3139
  cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2989
3140
  }
2990
- const tagName = BUILD25.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
3141
+ const tagName = BUILD26.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
2991
3142
  const HostElement = class extends HTMLElement {
2992
3143
  // StencilLazyHost
2993
3144
  constructor(self) {
@@ -2995,10 +3146,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2995
3146
  this.hasRegisteredEventListeners = false;
2996
3147
  self = this;
2997
3148
  registerHost(self, cmpMeta);
2998
- if (BUILD25.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3149
+ if (BUILD26.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2999
3150
  if (supportsShadow) {
3000
3151
  if (!self.shadowRoot) {
3001
- if (BUILD25.shadowDelegatesFocus) {
3152
+ if (BUILD26.shadowDelegatesFocus) {
3002
3153
  self.attachShadow({
3003
3154
  mode: "open",
3004
3155
  delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
@@ -3013,7 +3164,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3013
3164
  );
3014
3165
  }
3015
3166
  }
3016
- } else if (!BUILD25.hydrateServerSide && !("shadowRoot" in self)) {
3167
+ } else if (!BUILD26.hydrateServerSide && !("shadowRoot" in self)) {
3017
3168
  self.shadowRoot = self;
3018
3169
  }
3019
3170
  }
@@ -3041,28 +3192,28 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3041
3192
  return getHostRef(this).$onReadyPromise$;
3042
3193
  }
3043
3194
  };
3044
- if (BUILD25.experimentalSlotFixes) {
3045
- if (BUILD25.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3195
+ if (BUILD26.experimentalSlotFixes) {
3196
+ if (BUILD26.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3046
3197
  patchPseudoShadowDom(HostElement.prototype);
3047
3198
  }
3048
3199
  } else {
3049
- if (BUILD25.slotChildNodesFix) {
3200
+ if (BUILD26.slotChildNodesFix) {
3050
3201
  patchChildSlotNodes(HostElement.prototype);
3051
3202
  }
3052
- if (BUILD25.cloneNodeFix) {
3203
+ if (BUILD26.cloneNodeFix) {
3053
3204
  patchCloneNode(HostElement.prototype);
3054
3205
  }
3055
- if (BUILD25.appendChildSlotFix) {
3206
+ if (BUILD26.appendChildSlotFix) {
3056
3207
  patchSlotAppendChild(HostElement.prototype);
3057
3208
  }
3058
- if (BUILD25.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3209
+ if (BUILD26.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3059
3210
  patchTextContent(HostElement.prototype);
3060
3211
  }
3061
3212
  }
3062
- if (BUILD25.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
3213
+ if (BUILD26.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
3063
3214
  HostElement.formAssociated = true;
3064
3215
  }
3065
- if (BUILD25.hotModuleReplacement) {
3216
+ if (BUILD26.hotModuleReplacement) {
3066
3217
  HostElement.prototype["s-hmr"] = function(hmrVersionId) {
3067
3218
  hmrStart(this, cmpMeta, hmrVersionId);
3068
3219
  };
@@ -3081,7 +3232,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3081
3232
  if (hasSlotRelocation) {
3082
3233
  dataStyles.textContent += SLOT_FB_CSS;
3083
3234
  }
3084
- if (BUILD25.invisiblePrehydration && (BUILD25.hydratedClass || BUILD25.hydratedAttribute)) {
3235
+ if (BUILD26.invisiblePrehydration && (BUILD26.hydratedClass || BUILD26.hydratedAttribute)) {
3085
3236
  dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
3086
3237
  }
3087
3238
  if (dataStyles.innerHTML.length) {
@@ -3097,7 +3248,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3097
3248
  if (deferredConnectedCallbacks.length) {
3098
3249
  deferredConnectedCallbacks.map((host) => host.connectedCallback());
3099
3250
  } else {
3100
- if (BUILD25.profile) {
3251
+ if (BUILD26.profile) {
3101
3252
  plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30, "timeout"));
3102
3253
  } else {
3103
3254
  plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
@@ -3110,10 +3261,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3110
3261
  var Fragment = (_, children) => children;
3111
3262
 
3112
3263
  // src/runtime/host-listener.ts
3113
- import { BUILD as BUILD26 } from "@stencil/core/internal/app-data";
3264
+ import { BUILD as BUILD27 } from "@stencil/core/internal/app-data";
3114
3265
  var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
3115
- if (BUILD26.hostListener && listeners) {
3116
- if (BUILD26.hostListenerTargetParent) {
3266
+ if (BUILD27.hostListener && listeners) {
3267
+ if (BUILD27.hostListenerTargetParent) {
3117
3268
  if (attachParentListeners) {
3118
3269
  listeners = listeners.filter(([flags]) => flags & 32 /* TargetParent */);
3119
3270
  } else {
@@ -3121,7 +3272,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
3121
3272
  }
3122
3273
  }
3123
3274
  listeners.map(([flags, name, method]) => {
3124
- const target = BUILD26.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
3275
+ const target = BUILD27.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
3125
3276
  const handler = hostListenerProxy(hostRef, method);
3126
3277
  const opts = hostListenerOpts(flags);
3127
3278
  plt.ael(target, name, handler, opts);
@@ -3132,7 +3283,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
3132
3283
  var hostListenerProxy = (hostRef, methodName) => (ev) => {
3133
3284
  var _a;
3134
3285
  try {
3135
- if (BUILD26.lazyLoad) {
3286
+ if (BUILD27.lazyLoad) {
3136
3287
  if (hostRef.$flags$ & 256 /* isListenReady */) {
3137
3288
  (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
3138
3289
  } else {
@@ -3146,10 +3297,10 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
3146
3297
  }
3147
3298
  };
3148
3299
  var getHostListenerTarget = (elm, flags) => {
3149
- if (BUILD26.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
3150
- if (BUILD26.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
3151
- if (BUILD26.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
3152
- if (BUILD26.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement)
3300
+ if (BUILD27.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
3301
+ if (BUILD27.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
3302
+ if (BUILD27.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
3303
+ if (BUILD27.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement)
3153
3304
  return elm.parentElement;
3154
3305
  return elm;
3155
3306
  };
@@ -3309,7 +3460,7 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
3309
3460
  }
3310
3461
  };
3311
3462
  export {
3312
- BUILD27 as BUILD,
3463
+ BUILD28 as BUILD,
3313
3464
  Build,
3314
3465
  Env,
3315
3466
  Fragment,