@stencil/core 4.35.1-dev.1750455125.b359bb3 → 4.35.1-dev.1750741417.3f80413

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.
@@ -623,7 +623,7 @@ var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") ||
623
623
  var import_app_data18 = require("@stencil/core/internal/app-data");
624
624
 
625
625
  // src/runtime/client-hydrate.ts
626
- var import_app_data6 = require("@stencil/core/internal/app-data");
626
+ var import_app_data7 = require("@stencil/core/internal/app-data");
627
627
 
628
628
  // src/runtime/dom-extras.ts
629
629
  var import_app_data3 = require("@stencil/core/internal/app-data");
@@ -756,19 +756,8 @@ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
756
756
  };
757
757
  var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
758
758
  function patchSlotNode(node) {
759
- console.log("\u{1F527} patchSlotNode called for:", node);
760
- if (node.assignedElements || node.assignedNodes || !node["s-sr"]) {
761
- console.log("\u274C patchSlotNode: already patched or not a slot reference");
762
- return;
763
- }
764
- console.log("\u2705 patchSlotNode: proceeding with patching");
759
+ if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
765
760
  const assignedFactory = (elementsOnly) => (function(opts) {
766
- var _a, _b;
767
- console.log("\u{1F3ED} assignedFactory called:", {
768
- elementsOnly,
769
- slotName: this["s-sn"],
770
- parentElement: (_b = (_a = this["s-cr"]) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.tagName
771
- });
772
761
  const toReturn = [];
773
762
  const slotName = this["s-sn"];
774
763
  if (opts == null ? void 0 : opts.flatten) {
@@ -780,30 +769,11 @@ function patchSlotNode(node) {
780
769
  }
781
770
  const parent = this["s-cr"].parentElement;
782
771
  const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
783
- console.log("\u{1F50D} Processing slotted nodes:", {
784
- count: slottedNodes.length,
785
- nodes: Array.from(slottedNodes).map((n) => ({ tagName: n.tagName, nodeType: n.nodeType }))
786
- });
787
772
  slottedNodes.forEach((n) => {
788
- console.log("\u{1F50D} Checking node:", {
789
- tagName: n.tagName,
790
- nodeType: n.nodeType,
791
- slotName: getSlotName(n),
792
- targetSlotName: slotName
793
- });
794
773
  if (slotName === getSlotName(n)) {
795
- console.log("\u2705 Node matches slot, adding to return array");
796
774
  toReturn.push(n);
797
- patchSlottedShadowDomEvents(n, parent);
798
- } else {
799
- console.log("\u274C Node does not match slot");
800
775
  }
801
776
  });
802
- console.log("\u{1F3ED} assignedFactory returning:", {
803
- count: toReturn.length,
804
- elementsOnly,
805
- nodes: toReturn.map((n) => ({ tagName: n.tagName, nodeType: n.nodeType }))
806
- });
807
777
  if (elementsOnly) {
808
778
  return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
809
779
  }
@@ -812,70 +782,6 @@ function patchSlotNode(node) {
812
782
  node.assignedElements = assignedFactory(true);
813
783
  node.assignedNodes = assignedFactory(false);
814
784
  }
815
- function patchSlottedShadowDomEvents(slottedNode, parentHost) {
816
- var _a, _b, _c;
817
- console.log("\u{1F50D} patchSlottedShadowDomEvents called:", {
818
- slottedNode: slottedNode.tagName,
819
- parentHost: parentHost.tagName,
820
- nodeType: slottedNode.nodeType,
821
- isElement: slottedNode.nodeType === 1 /* ElementNode */
822
- });
823
- if (slottedNode.nodeType !== 1 /* ElementNode */) {
824
- console.log("\u274C Not an element node, skipping");
825
- return;
826
- }
827
- const element = slottedNode;
828
- console.log("\u{1F50D} Element details:", {
829
- tagName: element.tagName,
830
- hasHyphen: (_a = element.tagName) == null ? void 0 : _a.includes("-"),
831
- hasShadowRoot: !!element.shadowRoot,
832
- parentHasShadowRoot: !!parentHost.shadowRoot
833
- });
834
- if (!((_b = element.tagName) == null ? void 0 : _b.includes("-")) || !element.shadowRoot || parentHost.shadowRoot) {
835
- console.log("\u274C Conditions not met for patching:", {
836
- hasHyphen: (_c = element.tagName) == null ? void 0 : _c.includes("-"),
837
- hasShadowRoot: !!element.shadowRoot,
838
- parentHasShadowRoot: !!parentHost.shadowRoot
839
- });
840
- return;
841
- }
842
- if (element.__stencilSlotEventPatched) {
843
- console.log("\u26A0\uFE0F Already patched, skipping");
844
- return;
845
- }
846
- console.log("\u2705 Patching element:", element.tagName);
847
- element.__stencilSlotEventPatched = true;
848
- const originalDispatchEvent = element.dispatchEvent;
849
- element.dispatchEvent = function(event) {
850
- var _a2;
851
- console.log("\u{1F3AF} dispatchEvent called:", {
852
- type: event.type,
853
- target: (_a2 = event.target) == null ? void 0 : _a2.tagName,
854
- bubbles: event.bubbles,
855
- composed: event.composed
856
- });
857
- if ((event.type === "focus" || event.type === "blur") && event.bubbles) {
858
- console.log("\u{1F6D1} Intercepting focus/blur event, creating non-bubbling version");
859
- const nonBubblingEvent = new event.constructor(event.type, {
860
- ...event,
861
- bubbles: false,
862
- composed: event.composed
863
- });
864
- Object.keys(event).forEach((key) => {
865
- if (key !== "bubbles" && key !== "type") {
866
- try {
867
- nonBubblingEvent[key] = event[key];
868
- } catch (e) {
869
- }
870
- }
871
- });
872
- console.log("\u{1F4E4} Dispatching non-bubbling event");
873
- return originalDispatchEvent.call(this, nonBubblingEvent);
874
- }
875
- console.log("\u{1F4E4} Dispatching original event");
876
- return originalDispatchEvent.call(this, event);
877
- };
878
- }
879
785
  function dispatchSlotChangeEvent(elm) {
880
786
  elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
881
787
  }
@@ -1220,67 +1126,17 @@ var patchPreviousElementSibling = (element) => {
1220
1126
  });
1221
1127
  };
1222
1128
  var patchParentNode = (node) => {
1223
- var _a;
1224
1129
  if (!node || node.__parentNode) return;
1225
1130
  patchHostOriginalAccessor("parentNode", node);
1226
1131
  Object.defineProperty(node, "parentNode", {
1227
1132
  get: function() {
1228
- var _a2;
1229
- return ((_a2 = this["s-ol"]) == null ? void 0 : _a2.parentNode) || this.__parentNode;
1133
+ var _a;
1134
+ return ((_a = this["s-ol"]) == null ? void 0 : _a.parentNode) || this.__parentNode;
1230
1135
  },
1231
1136
  set: function(value) {
1232
1137
  this.__parentNode = value;
1233
1138
  }
1234
1139
  });
1235
- if (node.nodeType === 1 /* ELEMENT_NODE */) {
1236
- const element = node;
1237
- if (((_a = element.tagName) == null ? void 0 : _a.includes("-")) && element.shadowRoot) {
1238
- if (import_app_data3.BUILD.isDev) {
1239
- console.log("\u{1F527} Patching focus method for slotted shadow DOM element:", element.tagName);
1240
- }
1241
- const originalFocus = element.focus.bind(element);
1242
- const originalDispatchEvent = element.dispatchEvent.bind(element);
1243
- const originalAddEventListener = element.addEventListener.bind(element);
1244
- let lastFocusTime = 0;
1245
- const blurSuppressionWindow = 200;
1246
- const blurListeners = [];
1247
- element.focus = function(options) {
1248
- lastFocusTime = Date.now();
1249
- originalFocus(options);
1250
- };
1251
- element.addEventListener = function(type, listener, options) {
1252
- if (type === "blur") {
1253
- const wrappedListener = function(event) {
1254
- const now = Date.now();
1255
- const timeSinceFocus = now - lastFocusTime;
1256
- if (timeSinceFocus < blurSuppressionWindow && lastFocusTime > 0) {
1257
- if (import_app_data3.BUILD.isDev) {
1258
- console.log("\u{1F6D1} Suppressing erroneous blur event - happened too soon after focus");
1259
- }
1260
- return;
1261
- }
1262
- listener.call(this, event);
1263
- };
1264
- blurListeners.push({ listener, options });
1265
- return originalAddEventListener.call(this, type, wrappedListener, options);
1266
- }
1267
- return originalAddEventListener.call(this, type, listener, options);
1268
- };
1269
- element.dispatchEvent = function(event) {
1270
- if (event.type === "blur") {
1271
- const now = Date.now();
1272
- const timeSinceFocus = now - lastFocusTime;
1273
- if (timeSinceFocus < blurSuppressionWindow && lastFocusTime > 0) {
1274
- if (import_app_data3.BUILD.isDev) {
1275
- console.log("\u{1F6D1} Preventing erroneous blur dispatchEvent - happened too soon after focus");
1276
- }
1277
- return true;
1278
- }
1279
- }
1280
- return originalDispatchEvent(event);
1281
- };
1282
- }
1283
- }
1284
1140
  };
1285
1141
  var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1286
1142
  var validNodesPatches = [
@@ -1401,8 +1257,125 @@ var installDevTools = () => {
1401
1257
  }
1402
1258
  };
1403
1259
 
1404
- // src/runtime/vdom/h.ts
1260
+ // src/runtime/styles.ts
1405
1261
  var import_app_data5 = require("@stencil/core/internal/app-data");
1262
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1263
+ var registerStyle = (scopeId2, cssText, allowCS) => {
1264
+ let style = styles.get(scopeId2);
1265
+ if (supportsConstructableStylesheets && allowCS) {
1266
+ style = style || new CSSStyleSheet();
1267
+ if (typeof style === "string") {
1268
+ style = cssText;
1269
+ } else {
1270
+ style.replaceSync(cssText);
1271
+ }
1272
+ } else {
1273
+ style = cssText;
1274
+ }
1275
+ styles.set(scopeId2, style);
1276
+ };
1277
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1278
+ var _a;
1279
+ const scopeId2 = getScopeId(cmpMeta, mode);
1280
+ const style = styles.get(scopeId2);
1281
+ if (!import_app_data5.BUILD.attachStyles || !win.document) {
1282
+ return scopeId2;
1283
+ }
1284
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
1285
+ if (style) {
1286
+ if (typeof style === "string") {
1287
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
1288
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1289
+ let styleElm;
1290
+ if (!appliedStyles) {
1291
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1292
+ }
1293
+ if (!appliedStyles.has(scopeId2)) {
1294
+ if (import_app_data5.BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1295
+ styleElm.innerHTML = style;
1296
+ } else {
1297
+ styleElm = win.document.createElement("style");
1298
+ styleElm.innerHTML = style;
1299
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1300
+ if (nonce != null) {
1301
+ styleElm.setAttribute("nonce", nonce);
1302
+ }
1303
+ if ((import_app_data5.BUILD.hydrateServerSide || import_app_data5.BUILD.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */)) {
1304
+ styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
1305
+ }
1306
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1307
+ if (styleContainerNode.nodeName === "HEAD") {
1308
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1309
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1310
+ styleContainerNode.insertBefore(
1311
+ styleElm,
1312
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
1313
+ );
1314
+ } else if ("host" in styleContainerNode) {
1315
+ if (supportsConstructableStylesheets) {
1316
+ const stylesheet = new CSSStyleSheet();
1317
+ stylesheet.replaceSync(style);
1318
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1319
+ } else {
1320
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1321
+ if (existingStyleContainer) {
1322
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1323
+ } else {
1324
+ styleContainerNode.prepend(styleElm);
1325
+ }
1326
+ }
1327
+ } else {
1328
+ styleContainerNode.append(styleElm);
1329
+ }
1330
+ }
1331
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1332
+ styleContainerNode.insertBefore(styleElm, null);
1333
+ }
1334
+ }
1335
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1336
+ styleElm.innerHTML += SLOT_FB_CSS;
1337
+ }
1338
+ if (appliedStyles) {
1339
+ appliedStyles.add(scopeId2);
1340
+ }
1341
+ }
1342
+ } else if (import_app_data5.BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
1343
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1344
+ }
1345
+ }
1346
+ return scopeId2;
1347
+ };
1348
+ var attachStyles = (hostRef) => {
1349
+ const cmpMeta = hostRef.$cmpMeta$;
1350
+ const elm = hostRef.$hostElement$;
1351
+ const flags = cmpMeta.$flags$;
1352
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1353
+ const scopeId2 = addStyle(
1354
+ import_app_data5.BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1355
+ cmpMeta,
1356
+ hostRef.$modeName$
1357
+ );
1358
+ if ((import_app_data5.BUILD.shadowDom || import_app_data5.BUILD.scoped) && import_app_data5.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
1359
+ elm["s-sc"] = scopeId2;
1360
+ elm.classList.add(scopeId2 + "-h");
1361
+ }
1362
+ endAttachStyles();
1363
+ };
1364
+ var getScopeId = (cmp, mode) => "sc-" + (import_app_data5.BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
1365
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
1366
+ var hydrateScopedToShadow = () => {
1367
+ if (!win.document) {
1368
+ return;
1369
+ }
1370
+ const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1371
+ let i2 = 0;
1372
+ for (; i2 < styles2.length; i2++) {
1373
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
1374
+ }
1375
+ };
1376
+
1377
+ // src/runtime/vdom/h.ts
1378
+ var import_app_data6 = require("@stencil/core/internal/app-data");
1406
1379
  var h = (nodeName, vnodeData, ...children) => {
1407
1380
  let child = null;
1408
1381
  let key = null;
@@ -1418,7 +1391,7 @@ var h = (nodeName, vnodeData, ...children) => {
1418
1391
  } else if (child != null && typeof child !== "boolean") {
1419
1392
  if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
1420
1393
  child = String(child);
1421
- } else if (import_app_data5.BUILD.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
1394
+ } else if (import_app_data6.BUILD.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
1422
1395
  consoleDevError(`vNode passed as children has unexpected type.
1423
1396
  Make sure it's using the correct h() function.
1424
1397
  Empty objects can also be the cause, look for JSX comments that became objects.`);
@@ -1434,28 +1407,28 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
1434
1407
  };
1435
1408
  walk(children);
1436
1409
  if (vnodeData) {
1437
- if (import_app_data5.BUILD.isDev && nodeName === "input") {
1410
+ if (import_app_data6.BUILD.isDev && nodeName === "input") {
1438
1411
  validateInputProperties(vnodeData);
1439
1412
  }
1440
- if (import_app_data5.BUILD.vdomKey && vnodeData.key) {
1413
+ if (import_app_data6.BUILD.vdomKey && vnodeData.key) {
1441
1414
  key = vnodeData.key;
1442
1415
  }
1443
- if (import_app_data5.BUILD.slotRelocation && vnodeData.name) {
1416
+ if (import_app_data6.BUILD.slotRelocation && vnodeData.name) {
1444
1417
  slotName = vnodeData.name;
1445
1418
  }
1446
- if (import_app_data5.BUILD.vdomClass) {
1419
+ if (import_app_data6.BUILD.vdomClass) {
1447
1420
  const classData = vnodeData.className || vnodeData.class;
1448
1421
  if (classData) {
1449
1422
  vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
1450
1423
  }
1451
1424
  }
1452
1425
  }
1453
- if (import_app_data5.BUILD.isDev && vNodeChildren.some(isHost)) {
1426
+ if (import_app_data6.BUILD.isDev && vNodeChildren.some(isHost)) {
1454
1427
  consoleDevError(`The <Host> must be the single root component. Make sure:
1455
1428
  - You are NOT using hostData() and <Host> in the same component.
1456
1429
  - <Host> is used once, and it's the single root component of the render() function.`);
1457
1430
  }
1458
- if (import_app_data5.BUILD.vdomFunctional && typeof nodeName === "function") {
1431
+ if (import_app_data6.BUILD.vdomFunctional && typeof nodeName === "function") {
1459
1432
  return nodeName(
1460
1433
  vnodeData === null ? {} : vnodeData,
1461
1434
  vNodeChildren,
@@ -1467,10 +1440,10 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
1467
1440
  if (vNodeChildren.length > 0) {
1468
1441
  vnode.$children$ = vNodeChildren;
1469
1442
  }
1470
- if (import_app_data5.BUILD.vdomKey) {
1443
+ if (import_app_data6.BUILD.vdomKey) {
1471
1444
  vnode.$key$ = key;
1472
1445
  }
1473
- if (import_app_data5.BUILD.slotRelocation) {
1446
+ if (import_app_data6.BUILD.slotRelocation) {
1474
1447
  vnode.$name$ = slotName;
1475
1448
  }
1476
1449
  return vnode;
@@ -1483,13 +1456,13 @@ var newVNode = (tag, text) => {
1483
1456
  $elm$: null,
1484
1457
  $children$: null
1485
1458
  };
1486
- if (import_app_data5.BUILD.vdomAttribute) {
1459
+ if (import_app_data6.BUILD.vdomAttribute) {
1487
1460
  vnode.$attrs$ = null;
1488
1461
  }
1489
- if (import_app_data5.BUILD.vdomKey) {
1462
+ if (import_app_data6.BUILD.vdomKey) {
1490
1463
  vnode.$key$ = null;
1491
1464
  }
1492
- if (import_app_data5.BUILD.slotRelocation) {
1465
+ if (import_app_data6.BUILD.slotRelocation) {
1493
1466
  vnode.$name$ = null;
1494
1467
  }
1495
1468
  return vnode;
@@ -1543,18 +1516,18 @@ var validateInputProperties = (inputElm) => {
1543
1516
 
1544
1517
  // src/runtime/client-hydrate.ts
1545
1518
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1546
- var _a;
1519
+ var _a, _b;
1547
1520
  const endHydrate = createTime("hydrateClient", tagName);
1548
1521
  const shadowRoot = hostElm.shadowRoot;
1549
1522
  const childRenderNodes = [];
1550
1523
  const slotNodes = [];
1551
1524
  const slottedNodes = [];
1552
- const shadowRootNodes = import_app_data6.BUILD.shadowDom && shadowRoot ? [] : null;
1525
+ const shadowRootNodes = import_app_data7.BUILD.shadowDom && shadowRoot ? [] : null;
1553
1526
  const vnode = newVNode(tagName, null);
1554
1527
  vnode.$elm$ = hostElm;
1555
1528
  const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1556
1529
  members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1557
- var _a2, _b;
1530
+ var _a2, _b2;
1558
1531
  if (!(memberFlags & 31 /* Prop */)) {
1559
1532
  return;
1560
1533
  }
@@ -1564,13 +1537,13 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1564
1537
  const attrPropVal = parsePropertyValue(
1565
1538
  attrVal,
1566
1539
  memberFlags,
1567
- import_app_data6.BUILD.formAssociated && !!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
1540
+ import_app_data7.BUILD.formAssociated && !!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
1568
1541
  );
1569
- (_b = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b.set(memberName, attrPropVal);
1542
+ (_b2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b2.set(memberName, attrPropVal);
1570
1543
  }
1571
1544
  });
1572
1545
  let scopeId2;
1573
- if (import_app_data6.BUILD.scoped) {
1546
+ if (import_app_data7.BUILD.scoped) {
1574
1547
  const cmpMeta = hostRef.$cmpMeta$;
1575
1548
  if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1576
1549
  scopeId2 = hostElm["s-sc"];
@@ -1607,6 +1580,16 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1607
1580
  if (childRenderNode.$tag$ === "slot") {
1608
1581
  node["s-cr"] = hostElm["s-cr"];
1609
1582
  }
1583
+ } else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && !childRenderNode.$elm$.shadowRoot) {
1584
+ const cmpMeta = getHostRef(childRenderNode.$elm$);
1585
+ const scopeId3 = getScopeId(
1586
+ cmpMeta.$cmpMeta$,
1587
+ import_app_data7.BUILD.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
1588
+ );
1589
+ const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
1590
+ if (styleSheet) {
1591
+ hostElm.shadowRoot.append(styleSheet.cloneNode(true));
1592
+ }
1610
1593
  }
1611
1594
  if (childRenderNode.$tag$ === "slot") {
1612
1595
  childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
@@ -1622,7 +1605,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1622
1605
  }
1623
1606
  }
1624
1607
  if (orgLocationNode && orgLocationNode.isConnected) {
1625
- if (shadowRoot && orgLocationNode["s-en"] === "") {
1608
+ if (orgLocationNode.parentElement.shadowRoot && orgLocationNode["s-en"] === "") {
1626
1609
  orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1627
1610
  }
1628
1611
  orgLocationNode.parentNode.removeChild(orgLocationNode);
@@ -1630,7 +1613,9 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1630
1613
  node["s-oo"] = parseInt(childRenderNode.$nodeId$);
1631
1614
  }
1632
1615
  }
1633
- plt.$orgLocNodes$.delete(orgLocationId);
1616
+ if (orgLocationNode && !orgLocationNode["s-id"]) {
1617
+ plt.$orgLocNodes$.delete(orgLocationId);
1618
+ }
1634
1619
  }
1635
1620
  const hosts = [];
1636
1621
  const snLen = slottedNodes.length;
@@ -1652,14 +1637,16 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1652
1637
  if (!hosts[slottedItem.hostId]) continue;
1653
1638
  const hostEle = hosts[slottedItem.hostId];
1654
1639
  if (!hostEle.shadowRoot || !shadowRoot) {
1655
- slottedItem.slot["s-cr"] = hostEle["s-cr"];
1656
- if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1657
- slottedItem.slot["s-cr"] = hostEle;
1658
- } else {
1659
- slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1640
+ if (!slottedItem.slot["s-cr"]) {
1641
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1642
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1643
+ slottedItem.slot["s-cr"] = hostEle;
1644
+ } else {
1645
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1646
+ }
1660
1647
  }
1661
1648
  addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1662
- if (import_app_data6.BUILD.experimentalSlotFixes) {
1649
+ if (import_app_data7.BUILD.experimentalSlotFixes) {
1663
1650
  patchSlottedNode(slottedItem.node);
1664
1651
  }
1665
1652
  }
@@ -1668,12 +1655,12 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1668
1655
  }
1669
1656
  }
1670
1657
  }
1671
- if (import_app_data6.BUILD.scoped && scopeId2 && slotNodes.length) {
1658
+ if (import_app_data7.BUILD.scoped && scopeId2 && slotNodes.length) {
1672
1659
  slotNodes.forEach((slot) => {
1673
1660
  slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1674
1661
  });
1675
1662
  }
1676
- if (import_app_data6.BUILD.shadowDom && shadowRoot && !shadowRoot.childNodes.length) {
1663
+ if (import_app_data7.BUILD.shadowDom && shadowRoot) {
1677
1664
  let rnIdex = 0;
1678
1665
  const rnLen = shadowRootNodes.length;
1679
1666
  if (rnLen) {
@@ -1684,14 +1671,13 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1684
1671
  if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
1685
1672
  if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
1686
1673
  node.removeAttribute("hidden");
1687
- } else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1674
+ } else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1688
1675
  node.parentNode.removeChild(node);
1689
1676
  }
1690
1677
  }
1691
1678
  });
1692
1679
  }
1693
1680
  }
1694
- plt.$orgLocNodes$.delete(hostElm["s-id"]);
1695
1681
  hostRef.$hostElement$ = hostElm;
1696
1682
  endHydrate();
1697
1683
  };
@@ -1723,7 +1709,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1723
1709
  if (!parentVNode.$children$) {
1724
1710
  parentVNode.$children$ = [];
1725
1711
  }
1726
- if (import_app_data6.BUILD.scoped && scopeId2) {
1712
+ if (import_app_data7.BUILD.scoped && scopeId2 && childIdSplt[0] === hostId) {
1727
1713
  node["s-si"] = scopeId2;
1728
1714
  childVNode.$attrs$.class += " " + scopeId2;
1729
1715
  }
@@ -1741,7 +1727,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1741
1727
  shadowRootNodes,
1742
1728
  slottedNodes
1743
1729
  );
1744
- if (import_app_data6.BUILD.scoped && scopeId2) {
1730
+ if (import_app_data7.BUILD.scoped && scopeId2) {
1745
1731
  node.classList.add(scopeId2);
1746
1732
  }
1747
1733
  }
@@ -1838,9 +1824,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1838
1824
  slottedNodes
1839
1825
  );
1840
1826
  } else if (childNodeType === CONTENT_REF_ID) {
1841
- if (import_app_data6.BUILD.shadowDom && shadowRootNodes) {
1827
+ if (import_app_data7.BUILD.shadowDom && shadowRootNodes) {
1842
1828
  node.remove();
1843
- } else if (import_app_data6.BUILD.slotRelocation) {
1829
+ } else if (import_app_data7.BUILD.slotRelocation) {
1844
1830
  hostElm["s-cr"] = node;
1845
1831
  node["s-cn"] = true;
1846
1832
  }
@@ -1853,7 +1839,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1853
1839
  vnode.$index$ = "0";
1854
1840
  parentVNode.$children$ = [vnode];
1855
1841
  } else {
1856
- if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1842
+ if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim() && !node["s-nr"]) {
1857
1843
  node.remove();
1858
1844
  }
1859
1845
  }
@@ -1906,15 +1892,15 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1906
1892
  childVNode.$name$ = slotName || null;
1907
1893
  childVNode.$tag$ = "slot";
1908
1894
  const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1909
- if (import_app_data6.BUILD.shadowDom && shadowRootNodes && win.document) {
1895
+ if (import_app_data7.BUILD.shadowDom && shadowRootNodes && win.document) {
1910
1896
  const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
1911
1897
  if (childVNode.$name$) {
1912
1898
  childVNode.$elm$.setAttribute("name", slotName);
1913
1899
  }
1914
- if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1915
- parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1900
+ if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
1901
+ internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
1916
1902
  } else {
1917
- node.parentNode.insertBefore(slot, node);
1903
+ internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
1918
1904
  }
1919
1905
  addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1920
1906
  node.remove();
@@ -1940,7 +1926,7 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1940
1926
  var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1941
1927
  let slottedNode = slotNode.nextSibling;
1942
1928
  slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1943
- while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ && slottedNode.nodeValue.indexOf(".") !== 1 || slottedNode.nodeType === 3 /* TextNode */))) {
1929
+ while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */ || slottedNode.tagName === "SLOT"))) {
1944
1930
  slottedNode["s-sn"] = slotName;
1945
1931
  slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1946
1932
  slottedNode = slottedNode.nextSibling;
@@ -2375,31 +2361,31 @@ var import_app_data16 = require("@stencil/core/internal/app-data");
2375
2361
  var import_app_data15 = require("@stencil/core/internal/app-data");
2376
2362
 
2377
2363
  // src/runtime/parse-property-value.ts
2378
- var import_app_data7 = require("@stencil/core/internal/app-data");
2364
+ var import_app_data8 = require("@stencil/core/internal/app-data");
2379
2365
  var parsePropertyValue = (propValue, propType, isFormAssociated) => {
2380
- if ((import_app_data7.BUILD.hydrateClientSide || import_app_data7.BUILD.hydrateServerSide) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
2366
+ if ((import_app_data8.BUILD.hydrateClientSide || import_app_data8.BUILD.hydrateServerSide) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
2381
2367
  try {
2382
2368
  propValue = JSON.parse(propValue);
2383
2369
  return propValue;
2384
2370
  } catch (e) {
2385
2371
  }
2386
2372
  }
2387
- if ((import_app_data7.BUILD.hydrateClientSide || import_app_data7.BUILD.hydrateServerSide) && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
2373
+ if ((import_app_data8.BUILD.hydrateClientSide || import_app_data8.BUILD.hydrateServerSide) && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
2388
2374
  propValue = deserializeProperty(propValue);
2389
2375
  return propValue;
2390
2376
  }
2391
2377
  if (propValue != null && !isComplexType(propValue)) {
2392
- if (import_app_data7.BUILD.propBoolean && propType & 4 /* Boolean */) {
2393
- if (import_app_data7.BUILD.formAssociated && isFormAssociated && typeof propValue === "string") {
2378
+ if (import_app_data8.BUILD.propBoolean && propType & 4 /* Boolean */) {
2379
+ if (import_app_data8.BUILD.formAssociated && isFormAssociated && typeof propValue === "string") {
2394
2380
  return propValue === "" || !!propValue;
2395
2381
  } else {
2396
2382
  return propValue === "false" ? false : propValue === "" || !!propValue;
2397
2383
  }
2398
2384
  }
2399
- if (import_app_data7.BUILD.propNumber && propType & 2 /* Number */) {
2385
+ if (import_app_data8.BUILD.propNumber && propType & 2 /* Number */) {
2400
2386
  return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
2401
2387
  }
2402
- if (import_app_data7.BUILD.propString && propType & 1 /* String */) {
2388
+ if (import_app_data8.BUILD.propString && propType & 1 /* String */) {
2403
2389
  return String(propValue);
2404
2390
  }
2405
2391
  return propValue;
@@ -2411,18 +2397,18 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
2411
2397
  var import_app_data14 = require("@stencil/core/internal/app-data");
2412
2398
 
2413
2399
  // src/runtime/event-emitter.ts
2414
- var import_app_data9 = require("@stencil/core/internal/app-data");
2400
+ var import_app_data10 = require("@stencil/core/internal/app-data");
2415
2401
 
2416
2402
  // src/runtime/element.ts
2417
- var import_app_data8 = require("@stencil/core/internal/app-data");
2418
- var getElement = (ref) => import_app_data8.BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2403
+ var import_app_data9 = require("@stencil/core/internal/app-data");
2404
+ var getElement = (ref) => import_app_data9.BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2419
2405
 
2420
2406
  // src/runtime/event-emitter.ts
2421
2407
  var createEvent = (ref, name, flags) => {
2422
2408
  const elm = getElement(ref);
2423
2409
  return {
2424
2410
  emit: (detail) => {
2425
- if (import_app_data9.BUILD.isDev && !elm.isConnected) {
2411
+ if (import_app_data10.BUILD.isDev && !elm.isConnected) {
2426
2412
  consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
2427
2413
  }
2428
2414
  return emitEvent(elm, name, {
@@ -2440,123 +2426,6 @@ var emitEvent = (elm, name, opts) => {
2440
2426
  return ev;
2441
2427
  };
2442
2428
 
2443
- // src/runtime/styles.ts
2444
- var import_app_data10 = require("@stencil/core/internal/app-data");
2445
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
2446
- var registerStyle = (scopeId2, cssText, allowCS) => {
2447
- let style = styles.get(scopeId2);
2448
- if (supportsConstructableStylesheets && allowCS) {
2449
- style = style || new CSSStyleSheet();
2450
- if (typeof style === "string") {
2451
- style = cssText;
2452
- } else {
2453
- style.replaceSync(cssText);
2454
- }
2455
- } else {
2456
- style = cssText;
2457
- }
2458
- styles.set(scopeId2, style);
2459
- };
2460
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
2461
- var _a;
2462
- const scopeId2 = getScopeId(cmpMeta, mode);
2463
- const style = styles.get(scopeId2);
2464
- if (!import_app_data10.BUILD.attachStyles || !win.document) {
2465
- return scopeId2;
2466
- }
2467
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
2468
- if (style) {
2469
- if (typeof style === "string") {
2470
- styleContainerNode = styleContainerNode.head || styleContainerNode;
2471
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
2472
- let styleElm;
2473
- if (!appliedStyles) {
2474
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2475
- }
2476
- if (!appliedStyles.has(scopeId2)) {
2477
- if (import_app_data10.BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
2478
- styleElm.innerHTML = style;
2479
- } else {
2480
- styleElm = win.document.createElement("style");
2481
- styleElm.innerHTML = style;
2482
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2483
- if (nonce != null) {
2484
- styleElm.setAttribute("nonce", nonce);
2485
- }
2486
- if ((import_app_data10.BUILD.hydrateServerSide || import_app_data10.BUILD.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */)) {
2487
- styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
2488
- }
2489
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
2490
- if (styleContainerNode.nodeName === "HEAD") {
2491
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
2492
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
2493
- styleContainerNode.insertBefore(
2494
- styleElm,
2495
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
2496
- );
2497
- } else if ("host" in styleContainerNode) {
2498
- if (supportsConstructableStylesheets) {
2499
- const stylesheet = new CSSStyleSheet();
2500
- stylesheet.replaceSync(style);
2501
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
2502
- } else {
2503
- const existingStyleContainer = styleContainerNode.querySelector("style");
2504
- if (existingStyleContainer) {
2505
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
2506
- } else {
2507
- styleContainerNode.prepend(styleElm);
2508
- }
2509
- }
2510
- } else {
2511
- styleContainerNode.append(styleElm);
2512
- }
2513
- }
2514
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2515
- styleContainerNode.insertBefore(styleElm, null);
2516
- }
2517
- }
2518
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
2519
- styleElm.innerHTML += SLOT_FB_CSS;
2520
- }
2521
- if (appliedStyles) {
2522
- appliedStyles.add(scopeId2);
2523
- }
2524
- }
2525
- } else if (import_app_data10.BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
2526
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
2527
- }
2528
- }
2529
- return scopeId2;
2530
- };
2531
- var attachStyles = (hostRef) => {
2532
- const cmpMeta = hostRef.$cmpMeta$;
2533
- const elm = hostRef.$hostElement$;
2534
- const flags = cmpMeta.$flags$;
2535
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
2536
- const scopeId2 = addStyle(
2537
- import_app_data10.BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2538
- cmpMeta,
2539
- hostRef.$modeName$
2540
- );
2541
- if ((import_app_data10.BUILD.shadowDom || import_app_data10.BUILD.scoped) && import_app_data10.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
2542
- elm["s-sc"] = scopeId2;
2543
- elm.classList.add(scopeId2 + "-h");
2544
- }
2545
- endAttachStyles();
2546
- };
2547
- var getScopeId = (cmp, mode) => "sc-" + (import_app_data10.BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
2548
- var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
2549
- var hydrateScopedToShadow = () => {
2550
- if (!win.document) {
2551
- return;
2552
- }
2553
- const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
2554
- let i2 = 0;
2555
- for (; i2 < styles2.length; i2++) {
2556
- registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
2557
- }
2558
- };
2559
-
2560
2429
  // src/runtime/vdom/vdom-render.ts
2561
2430
  var import_app_data13 = require("@stencil/core/internal/app-data");
2562
2431
 
@@ -2575,12 +2444,13 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
2575
2444
  const classList = elm.classList;
2576
2445
  const oldClasses = parseClassList(oldValue);
2577
2446
  let newClasses = parseClassList(newValue);
2578
- if (import_app_data11.BUILD.hydrateClientSide && elm["s-si"] && initialRender) {
2579
- newClasses.push(elm["s-si"]);
2447
+ if (import_app_data11.BUILD.hydrateClientSide && (elm["s-si"] || elm["s-sc"]) && initialRender) {
2448
+ const scopeId2 = elm["s-sc"] || elm["s-si"];
2449
+ newClasses.push(scopeId2);
2580
2450
  oldClasses.forEach((c) => {
2581
- if (c.startsWith(elm["s-si"])) newClasses.push(c);
2451
+ if (c.startsWith(scopeId2)) newClasses.push(c);
2582
2452
  });
2583
- newClasses = [...new Set(newClasses)];
2453
+ newClasses = [...new Set(newClasses)].filter((c) => c);
2584
2454
  classList.add(...newClasses);
2585
2455
  } else {
2586
2456
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
@@ -3529,10 +3399,16 @@ var forceUpdate = (ref) => {
3529
3399
  return false;
3530
3400
  };
3531
3401
  var appDidLoad = (who) => {
3402
+ var _a;
3532
3403
  if (import_app_data14.BUILD.asyncQueue) {
3533
3404
  plt.$flags$ |= 2 /* appLoaded */;
3534
3405
  }
3535
3406
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: import_app_data14.NAMESPACE } }));
3407
+ if (import_app_data14.BUILD.hydrateClientSide) {
3408
+ if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
3409
+ plt.$orgLocNodes$.clear();
3410
+ }
3411
+ }
3536
3412
  if (import_app_data14.BUILD.profile && performance.measure) {
3537
3413
  performance.measure(`[Stencil] ${import_app_data14.NAMESPACE} initial load (by ${who})`, "st:app:start");
3538
3414
  }
@@ -3964,6 +3840,11 @@ var connectedCallback = (elm) => {
3964
3840
  if (import_app_data18.BUILD.hydrateServerSide || (import_app_data18.BUILD.slot || import_app_data18.BUILD.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
3965
3841
  cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
3966
3842
  setContentReference(elm);
3843
+ } else if (import_app_data18.BUILD.hydrateClientSide && !(cmpMeta.$flags$ & 4 /* hasSlotRelocation */)) {
3844
+ const commendPlaceholder = elm.firstChild;
3845
+ if ((commendPlaceholder == null ? void 0 : commendPlaceholder.nodeType) === 8 /* CommentNode */ && !commendPlaceholder["s-cn"] && !commendPlaceholder.nodeValue) {
3846
+ elm.removeChild(commendPlaceholder);
3847
+ }
3967
3848
  }
3968
3849
  }
3969
3850
  if (import_app_data18.BUILD.asyncLoading) {