@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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Platform v4.35.1-dev.1750455125.b359bb3 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Platform v4.35.1-dev.1750741417.3f80413 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -537,7 +537,7 @@ var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") ||
537
537
  import { BUILD as BUILD25 } from "@stencil/core/internal/app-data";
538
538
 
539
539
  // src/runtime/client-hydrate.ts
540
- import { BUILD as BUILD13 } from "@stencil/core/internal/app-data";
540
+ import { BUILD as BUILD14 } from "@stencil/core/internal/app-data";
541
541
 
542
542
  // src/runtime/dom-extras.ts
543
543
  import { BUILD as BUILD10 } from "@stencil/core/internal/app-data";
@@ -643,19 +643,8 @@ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
643
643
  };
644
644
  var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
645
645
  function patchSlotNode(node) {
646
- console.log("\u{1F527} patchSlotNode called for:", node);
647
- if (node.assignedElements || node.assignedNodes || !node["s-sr"]) {
648
- console.log("\u274C patchSlotNode: already patched or not a slot reference");
649
- return;
650
- }
651
- console.log("\u2705 patchSlotNode: proceeding with patching");
646
+ if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
652
647
  const assignedFactory = (elementsOnly) => (function(opts) {
653
- var _a, _b;
654
- console.log("\u{1F3ED} assignedFactory called:", {
655
- elementsOnly,
656
- slotName: this["s-sn"],
657
- parentElement: (_b = (_a = this["s-cr"]) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.tagName
658
- });
659
648
  const toReturn = [];
660
649
  const slotName = this["s-sn"];
661
650
  if (opts == null ? void 0 : opts.flatten) {
@@ -667,30 +656,11 @@ function patchSlotNode(node) {
667
656
  }
668
657
  const parent = this["s-cr"].parentElement;
669
658
  const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
670
- console.log("\u{1F50D} Processing slotted nodes:", {
671
- count: slottedNodes.length,
672
- nodes: Array.from(slottedNodes).map((n) => ({ tagName: n.tagName, nodeType: n.nodeType }))
673
- });
674
659
  slottedNodes.forEach((n) => {
675
- console.log("\u{1F50D} Checking node:", {
676
- tagName: n.tagName,
677
- nodeType: n.nodeType,
678
- slotName: getSlotName(n),
679
- targetSlotName: slotName
680
- });
681
660
  if (slotName === getSlotName(n)) {
682
- console.log("\u2705 Node matches slot, adding to return array");
683
661
  toReturn.push(n);
684
- patchSlottedShadowDomEvents(n, parent);
685
- } else {
686
- console.log("\u274C Node does not match slot");
687
662
  }
688
663
  });
689
- console.log("\u{1F3ED} assignedFactory returning:", {
690
- count: toReturn.length,
691
- elementsOnly,
692
- nodes: toReturn.map((n) => ({ tagName: n.tagName, nodeType: n.nodeType }))
693
- });
694
664
  if (elementsOnly) {
695
665
  return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
696
666
  }
@@ -699,70 +669,6 @@ function patchSlotNode(node) {
699
669
  node.assignedElements = assignedFactory(true);
700
670
  node.assignedNodes = assignedFactory(false);
701
671
  }
702
- function patchSlottedShadowDomEvents(slottedNode, parentHost) {
703
- var _a, _b, _c;
704
- console.log("\u{1F50D} patchSlottedShadowDomEvents called:", {
705
- slottedNode: slottedNode.tagName,
706
- parentHost: parentHost.tagName,
707
- nodeType: slottedNode.nodeType,
708
- isElement: slottedNode.nodeType === 1 /* ElementNode */
709
- });
710
- if (slottedNode.nodeType !== 1 /* ElementNode */) {
711
- console.log("\u274C Not an element node, skipping");
712
- return;
713
- }
714
- const element = slottedNode;
715
- console.log("\u{1F50D} Element details:", {
716
- tagName: element.tagName,
717
- hasHyphen: (_a = element.tagName) == null ? void 0 : _a.includes("-"),
718
- hasShadowRoot: !!element.shadowRoot,
719
- parentHasShadowRoot: !!parentHost.shadowRoot
720
- });
721
- if (!((_b = element.tagName) == null ? void 0 : _b.includes("-")) || !element.shadowRoot || parentHost.shadowRoot) {
722
- console.log("\u274C Conditions not met for patching:", {
723
- hasHyphen: (_c = element.tagName) == null ? void 0 : _c.includes("-"),
724
- hasShadowRoot: !!element.shadowRoot,
725
- parentHasShadowRoot: !!parentHost.shadowRoot
726
- });
727
- return;
728
- }
729
- if (element.__stencilSlotEventPatched) {
730
- console.log("\u26A0\uFE0F Already patched, skipping");
731
- return;
732
- }
733
- console.log("\u2705 Patching element:", element.tagName);
734
- element.__stencilSlotEventPatched = true;
735
- const originalDispatchEvent = element.dispatchEvent;
736
- element.dispatchEvent = function(event) {
737
- var _a2;
738
- console.log("\u{1F3AF} dispatchEvent called:", {
739
- type: event.type,
740
- target: (_a2 = event.target) == null ? void 0 : _a2.tagName,
741
- bubbles: event.bubbles,
742
- composed: event.composed
743
- });
744
- if ((event.type === "focus" || event.type === "blur") && event.bubbles) {
745
- console.log("\u{1F6D1} Intercepting focus/blur event, creating non-bubbling version");
746
- const nonBubblingEvent = new event.constructor(event.type, {
747
- ...event,
748
- bubbles: false,
749
- composed: event.composed
750
- });
751
- Object.keys(event).forEach((key) => {
752
- if (key !== "bubbles" && key !== "type") {
753
- try {
754
- nonBubblingEvent[key] = event[key];
755
- } catch (e) {
756
- }
757
- }
758
- });
759
- console.log("\u{1F4E4} Dispatching non-bubbling event");
760
- return originalDispatchEvent.call(this, nonBubblingEvent);
761
- }
762
- console.log("\u{1F4E4} Dispatching original event");
763
- return originalDispatchEvent.call(this, event);
764
- };
765
- }
766
672
  function dispatchSlotChangeEvent(elm) {
767
673
  elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
768
674
  }
@@ -1107,67 +1013,17 @@ var patchPreviousElementSibling = (element) => {
1107
1013
  });
1108
1014
  };
1109
1015
  var patchParentNode = (node) => {
1110
- var _a;
1111
1016
  if (!node || node.__parentNode) return;
1112
1017
  patchHostOriginalAccessor("parentNode", node);
1113
1018
  Object.defineProperty(node, "parentNode", {
1114
1019
  get: function() {
1115
- var _a2;
1116
- return ((_a2 = this["s-ol"]) == null ? void 0 : _a2.parentNode) || this.__parentNode;
1020
+ var _a;
1021
+ return ((_a = this["s-ol"]) == null ? void 0 : _a.parentNode) || this.__parentNode;
1117
1022
  },
1118
1023
  set: function(value) {
1119
1024
  this.__parentNode = value;
1120
1025
  }
1121
1026
  });
1122
- if (node.nodeType === 1 /* ELEMENT_NODE */) {
1123
- const element = node;
1124
- if (((_a = element.tagName) == null ? void 0 : _a.includes("-")) && element.shadowRoot) {
1125
- if (BUILD10.isDev) {
1126
- console.log("\u{1F527} Patching focus method for slotted shadow DOM element:", element.tagName);
1127
- }
1128
- const originalFocus = element.focus.bind(element);
1129
- const originalDispatchEvent = element.dispatchEvent.bind(element);
1130
- const originalAddEventListener = element.addEventListener.bind(element);
1131
- let lastFocusTime = 0;
1132
- const blurSuppressionWindow = 200;
1133
- const blurListeners = [];
1134
- element.focus = function(options) {
1135
- lastFocusTime = Date.now();
1136
- originalFocus(options);
1137
- };
1138
- element.addEventListener = function(type, listener, options) {
1139
- if (type === "blur") {
1140
- const wrappedListener = function(event) {
1141
- const now = Date.now();
1142
- const timeSinceFocus = now - lastFocusTime;
1143
- if (timeSinceFocus < blurSuppressionWindow && lastFocusTime > 0) {
1144
- if (BUILD10.isDev) {
1145
- console.log("\u{1F6D1} Suppressing erroneous blur event - happened too soon after focus");
1146
- }
1147
- return;
1148
- }
1149
- listener.call(this, event);
1150
- };
1151
- blurListeners.push({ listener, options });
1152
- return originalAddEventListener.call(this, type, wrappedListener, options);
1153
- }
1154
- return originalAddEventListener.call(this, type, listener, options);
1155
- };
1156
- element.dispatchEvent = function(event) {
1157
- if (event.type === "blur") {
1158
- const now = Date.now();
1159
- const timeSinceFocus = now - lastFocusTime;
1160
- if (timeSinceFocus < blurSuppressionWindow && lastFocusTime > 0) {
1161
- if (BUILD10.isDev) {
1162
- console.log("\u{1F6D1} Preventing erroneous blur dispatchEvent - happened too soon after focus");
1163
- }
1164
- return true;
1165
- }
1166
- }
1167
- return originalDispatchEvent(event);
1168
- };
1169
- }
1170
- }
1171
1027
  };
1172
1028
  var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1173
1029
  var validNodesPatches = [
@@ -1288,8 +1144,125 @@ var installDevTools = () => {
1288
1144
  }
1289
1145
  };
1290
1146
 
1291
- // src/runtime/vdom/h.ts
1147
+ // src/runtime/styles.ts
1292
1148
  import { BUILD as BUILD12 } from "@stencil/core/internal/app-data";
1149
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1150
+ var registerStyle = (scopeId2, cssText, allowCS) => {
1151
+ let style = styles.get(scopeId2);
1152
+ if (supportsConstructableStylesheets && allowCS) {
1153
+ style = style || new CSSStyleSheet();
1154
+ if (typeof style === "string") {
1155
+ style = cssText;
1156
+ } else {
1157
+ style.replaceSync(cssText);
1158
+ }
1159
+ } else {
1160
+ style = cssText;
1161
+ }
1162
+ styles.set(scopeId2, style);
1163
+ };
1164
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1165
+ var _a;
1166
+ const scopeId2 = getScopeId(cmpMeta, mode);
1167
+ const style = styles.get(scopeId2);
1168
+ if (!BUILD12.attachStyles || !win.document) {
1169
+ return scopeId2;
1170
+ }
1171
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
1172
+ if (style) {
1173
+ if (typeof style === "string") {
1174
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
1175
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1176
+ let styleElm;
1177
+ if (!appliedStyles) {
1178
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1179
+ }
1180
+ if (!appliedStyles.has(scopeId2)) {
1181
+ if (BUILD12.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1182
+ styleElm.innerHTML = style;
1183
+ } else {
1184
+ styleElm = win.document.createElement("style");
1185
+ styleElm.innerHTML = style;
1186
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1187
+ if (nonce != null) {
1188
+ styleElm.setAttribute("nonce", nonce);
1189
+ }
1190
+ if ((BUILD12.hydrateServerSide || BUILD12.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */)) {
1191
+ styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
1192
+ }
1193
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1194
+ if (styleContainerNode.nodeName === "HEAD") {
1195
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1196
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1197
+ styleContainerNode.insertBefore(
1198
+ styleElm,
1199
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
1200
+ );
1201
+ } else if ("host" in styleContainerNode) {
1202
+ if (supportsConstructableStylesheets) {
1203
+ const stylesheet = new CSSStyleSheet();
1204
+ stylesheet.replaceSync(style);
1205
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1206
+ } else {
1207
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1208
+ if (existingStyleContainer) {
1209
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1210
+ } else {
1211
+ styleContainerNode.prepend(styleElm);
1212
+ }
1213
+ }
1214
+ } else {
1215
+ styleContainerNode.append(styleElm);
1216
+ }
1217
+ }
1218
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1219
+ styleContainerNode.insertBefore(styleElm, null);
1220
+ }
1221
+ }
1222
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1223
+ styleElm.innerHTML += SLOT_FB_CSS;
1224
+ }
1225
+ if (appliedStyles) {
1226
+ appliedStyles.add(scopeId2);
1227
+ }
1228
+ }
1229
+ } else if (BUILD12.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
1230
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1231
+ }
1232
+ }
1233
+ return scopeId2;
1234
+ };
1235
+ var attachStyles = (hostRef) => {
1236
+ const cmpMeta = hostRef.$cmpMeta$;
1237
+ const elm = hostRef.$hostElement$;
1238
+ const flags = cmpMeta.$flags$;
1239
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1240
+ const scopeId2 = addStyle(
1241
+ BUILD12.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1242
+ cmpMeta,
1243
+ hostRef.$modeName$
1244
+ );
1245
+ if ((BUILD12.shadowDom || BUILD12.scoped) && BUILD12.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
1246
+ elm["s-sc"] = scopeId2;
1247
+ elm.classList.add(scopeId2 + "-h");
1248
+ }
1249
+ endAttachStyles();
1250
+ };
1251
+ var getScopeId = (cmp, mode) => "sc-" + (BUILD12.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
1252
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
1253
+ var hydrateScopedToShadow = () => {
1254
+ if (!win.document) {
1255
+ return;
1256
+ }
1257
+ const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1258
+ let i2 = 0;
1259
+ for (; i2 < styles2.length; i2++) {
1260
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
1261
+ }
1262
+ };
1263
+
1264
+ // src/runtime/vdom/h.ts
1265
+ import { BUILD as BUILD13 } from "@stencil/core/internal/app-data";
1293
1266
  var h = (nodeName, vnodeData, ...children) => {
1294
1267
  let child = null;
1295
1268
  let key = null;
@@ -1305,7 +1278,7 @@ var h = (nodeName, vnodeData, ...children) => {
1305
1278
  } else if (child != null && typeof child !== "boolean") {
1306
1279
  if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
1307
1280
  child = String(child);
1308
- } else if (BUILD12.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
1281
+ } else if (BUILD13.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
1309
1282
  consoleDevError(`vNode passed as children has unexpected type.
1310
1283
  Make sure it's using the correct h() function.
1311
1284
  Empty objects can also be the cause, look for JSX comments that became objects.`);
@@ -1321,28 +1294,28 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
1321
1294
  };
1322
1295
  walk(children);
1323
1296
  if (vnodeData) {
1324
- if (BUILD12.isDev && nodeName === "input") {
1297
+ if (BUILD13.isDev && nodeName === "input") {
1325
1298
  validateInputProperties(vnodeData);
1326
1299
  }
1327
- if (BUILD12.vdomKey && vnodeData.key) {
1300
+ if (BUILD13.vdomKey && vnodeData.key) {
1328
1301
  key = vnodeData.key;
1329
1302
  }
1330
- if (BUILD12.slotRelocation && vnodeData.name) {
1303
+ if (BUILD13.slotRelocation && vnodeData.name) {
1331
1304
  slotName = vnodeData.name;
1332
1305
  }
1333
- if (BUILD12.vdomClass) {
1306
+ if (BUILD13.vdomClass) {
1334
1307
  const classData = vnodeData.className || vnodeData.class;
1335
1308
  if (classData) {
1336
1309
  vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
1337
1310
  }
1338
1311
  }
1339
1312
  }
1340
- if (BUILD12.isDev && vNodeChildren.some(isHost)) {
1313
+ if (BUILD13.isDev && vNodeChildren.some(isHost)) {
1341
1314
  consoleDevError(`The <Host> must be the single root component. Make sure:
1342
1315
  - You are NOT using hostData() and <Host> in the same component.
1343
1316
  - <Host> is used once, and it's the single root component of the render() function.`);
1344
1317
  }
1345
- if (BUILD12.vdomFunctional && typeof nodeName === "function") {
1318
+ if (BUILD13.vdomFunctional && typeof nodeName === "function") {
1346
1319
  return nodeName(
1347
1320
  vnodeData === null ? {} : vnodeData,
1348
1321
  vNodeChildren,
@@ -1354,10 +1327,10 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
1354
1327
  if (vNodeChildren.length > 0) {
1355
1328
  vnode.$children$ = vNodeChildren;
1356
1329
  }
1357
- if (BUILD12.vdomKey) {
1330
+ if (BUILD13.vdomKey) {
1358
1331
  vnode.$key$ = key;
1359
1332
  }
1360
- if (BUILD12.slotRelocation) {
1333
+ if (BUILD13.slotRelocation) {
1361
1334
  vnode.$name$ = slotName;
1362
1335
  }
1363
1336
  return vnode;
@@ -1370,13 +1343,13 @@ var newVNode = (tag, text) => {
1370
1343
  $elm$: null,
1371
1344
  $children$: null
1372
1345
  };
1373
- if (BUILD12.vdomAttribute) {
1346
+ if (BUILD13.vdomAttribute) {
1374
1347
  vnode.$attrs$ = null;
1375
1348
  }
1376
- if (BUILD12.vdomKey) {
1349
+ if (BUILD13.vdomKey) {
1377
1350
  vnode.$key$ = null;
1378
1351
  }
1379
- if (BUILD12.slotRelocation) {
1352
+ if (BUILD13.slotRelocation) {
1380
1353
  vnode.$name$ = null;
1381
1354
  }
1382
1355
  return vnode;
@@ -1430,18 +1403,18 @@ var validateInputProperties = (inputElm) => {
1430
1403
 
1431
1404
  // src/runtime/client-hydrate.ts
1432
1405
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1433
- var _a;
1406
+ var _a, _b;
1434
1407
  const endHydrate = createTime("hydrateClient", tagName);
1435
1408
  const shadowRoot = hostElm.shadowRoot;
1436
1409
  const childRenderNodes = [];
1437
1410
  const slotNodes = [];
1438
1411
  const slottedNodes = [];
1439
- const shadowRootNodes = BUILD13.shadowDom && shadowRoot ? [] : null;
1412
+ const shadowRootNodes = BUILD14.shadowDom && shadowRoot ? [] : null;
1440
1413
  const vnode = newVNode(tagName, null);
1441
1414
  vnode.$elm$ = hostElm;
1442
1415
  const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1443
1416
  members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1444
- var _a2, _b;
1417
+ var _a2, _b2;
1445
1418
  if (!(memberFlags & 31 /* Prop */)) {
1446
1419
  return;
1447
1420
  }
@@ -1451,13 +1424,13 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1451
1424
  const attrPropVal = parsePropertyValue(
1452
1425
  attrVal,
1453
1426
  memberFlags,
1454
- BUILD13.formAssociated && !!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
1427
+ BUILD14.formAssociated && !!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
1455
1428
  );
1456
- (_b = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b.set(memberName, attrPropVal);
1429
+ (_b2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b2.set(memberName, attrPropVal);
1457
1430
  }
1458
1431
  });
1459
1432
  let scopeId2;
1460
- if (BUILD13.scoped) {
1433
+ if (BUILD14.scoped) {
1461
1434
  const cmpMeta = hostRef.$cmpMeta$;
1462
1435
  if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1463
1436
  scopeId2 = hostElm["s-sc"];
@@ -1494,6 +1467,16 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1494
1467
  if (childRenderNode.$tag$ === "slot") {
1495
1468
  node["s-cr"] = hostElm["s-cr"];
1496
1469
  }
1470
+ } else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && !childRenderNode.$elm$.shadowRoot) {
1471
+ const cmpMeta = getHostRef(childRenderNode.$elm$);
1472
+ const scopeId3 = getScopeId(
1473
+ cmpMeta.$cmpMeta$,
1474
+ BUILD14.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
1475
+ );
1476
+ const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
1477
+ if (styleSheet) {
1478
+ hostElm.shadowRoot.append(styleSheet.cloneNode(true));
1479
+ }
1497
1480
  }
1498
1481
  if (childRenderNode.$tag$ === "slot") {
1499
1482
  childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
@@ -1509,7 +1492,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1509
1492
  }
1510
1493
  }
1511
1494
  if (orgLocationNode && orgLocationNode.isConnected) {
1512
- if (shadowRoot && orgLocationNode["s-en"] === "") {
1495
+ if (orgLocationNode.parentElement.shadowRoot && orgLocationNode["s-en"] === "") {
1513
1496
  orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1514
1497
  }
1515
1498
  orgLocationNode.parentNode.removeChild(orgLocationNode);
@@ -1517,7 +1500,9 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1517
1500
  node["s-oo"] = parseInt(childRenderNode.$nodeId$);
1518
1501
  }
1519
1502
  }
1520
- plt.$orgLocNodes$.delete(orgLocationId);
1503
+ if (orgLocationNode && !orgLocationNode["s-id"]) {
1504
+ plt.$orgLocNodes$.delete(orgLocationId);
1505
+ }
1521
1506
  }
1522
1507
  const hosts = [];
1523
1508
  const snLen = slottedNodes.length;
@@ -1539,14 +1524,16 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1539
1524
  if (!hosts[slottedItem.hostId]) continue;
1540
1525
  const hostEle = hosts[slottedItem.hostId];
1541
1526
  if (!hostEle.shadowRoot || !shadowRoot) {
1542
- slottedItem.slot["s-cr"] = hostEle["s-cr"];
1543
- if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1544
- slottedItem.slot["s-cr"] = hostEle;
1545
- } else {
1546
- slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1527
+ if (!slottedItem.slot["s-cr"]) {
1528
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1529
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1530
+ slottedItem.slot["s-cr"] = hostEle;
1531
+ } else {
1532
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1533
+ }
1547
1534
  }
1548
1535
  addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1549
- if (BUILD13.experimentalSlotFixes) {
1536
+ if (BUILD14.experimentalSlotFixes) {
1550
1537
  patchSlottedNode(slottedItem.node);
1551
1538
  }
1552
1539
  }
@@ -1555,12 +1542,12 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1555
1542
  }
1556
1543
  }
1557
1544
  }
1558
- if (BUILD13.scoped && scopeId2 && slotNodes.length) {
1545
+ if (BUILD14.scoped && scopeId2 && slotNodes.length) {
1559
1546
  slotNodes.forEach((slot) => {
1560
1547
  slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1561
1548
  });
1562
1549
  }
1563
- if (BUILD13.shadowDom && shadowRoot && !shadowRoot.childNodes.length) {
1550
+ if (BUILD14.shadowDom && shadowRoot) {
1564
1551
  let rnIdex = 0;
1565
1552
  const rnLen = shadowRootNodes.length;
1566
1553
  if (rnLen) {
@@ -1571,14 +1558,13 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1571
1558
  if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
1572
1559
  if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
1573
1560
  node.removeAttribute("hidden");
1574
- } else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1561
+ } else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1575
1562
  node.parentNode.removeChild(node);
1576
1563
  }
1577
1564
  }
1578
1565
  });
1579
1566
  }
1580
1567
  }
1581
- plt.$orgLocNodes$.delete(hostElm["s-id"]);
1582
1568
  hostRef.$hostElement$ = hostElm;
1583
1569
  endHydrate();
1584
1570
  };
@@ -1610,7 +1596,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1610
1596
  if (!parentVNode.$children$) {
1611
1597
  parentVNode.$children$ = [];
1612
1598
  }
1613
- if (BUILD13.scoped && scopeId2) {
1599
+ if (BUILD14.scoped && scopeId2 && childIdSplt[0] === hostId) {
1614
1600
  node["s-si"] = scopeId2;
1615
1601
  childVNode.$attrs$.class += " " + scopeId2;
1616
1602
  }
@@ -1628,7 +1614,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1628
1614
  shadowRootNodes,
1629
1615
  slottedNodes
1630
1616
  );
1631
- if (BUILD13.scoped && scopeId2) {
1617
+ if (BUILD14.scoped && scopeId2) {
1632
1618
  node.classList.add(scopeId2);
1633
1619
  }
1634
1620
  }
@@ -1725,9 +1711,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1725
1711
  slottedNodes
1726
1712
  );
1727
1713
  } else if (childNodeType === CONTENT_REF_ID) {
1728
- if (BUILD13.shadowDom && shadowRootNodes) {
1714
+ if (BUILD14.shadowDom && shadowRootNodes) {
1729
1715
  node.remove();
1730
- } else if (BUILD13.slotRelocation) {
1716
+ } else if (BUILD14.slotRelocation) {
1731
1717
  hostElm["s-cr"] = node;
1732
1718
  node["s-cn"] = true;
1733
1719
  }
@@ -1740,7 +1726,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1740
1726
  vnode.$index$ = "0";
1741
1727
  parentVNode.$children$ = [vnode];
1742
1728
  } else {
1743
- if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1729
+ if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim() && !node["s-nr"]) {
1744
1730
  node.remove();
1745
1731
  }
1746
1732
  }
@@ -1793,15 +1779,15 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1793
1779
  childVNode.$name$ = slotName || null;
1794
1780
  childVNode.$tag$ = "slot";
1795
1781
  const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1796
- if (BUILD13.shadowDom && shadowRootNodes && win.document) {
1782
+ if (BUILD14.shadowDom && shadowRootNodes && win.document) {
1797
1783
  const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
1798
1784
  if (childVNode.$name$) {
1799
1785
  childVNode.$elm$.setAttribute("name", slotName);
1800
1786
  }
1801
- if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1802
- parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1787
+ if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
1788
+ internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
1803
1789
  } else {
1804
- node.parentNode.insertBefore(slot, node);
1790
+ internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
1805
1791
  }
1806
1792
  addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1807
1793
  node.remove();
@@ -1827,7 +1813,7 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1827
1813
  var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1828
1814
  let slottedNode = slotNode.nextSibling;
1829
1815
  slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1830
- 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 */))) {
1816
+ 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"))) {
1831
1817
  slottedNode["s-sn"] = slotName;
1832
1818
  slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1833
1819
  slottedNode = slottedNode.nextSibling;
@@ -2262,31 +2248,31 @@ import { BUILD as BUILD23 } from "@stencil/core/internal/app-data";
2262
2248
  import { BUILD as BUILD22 } from "@stencil/core/internal/app-data";
2263
2249
 
2264
2250
  // src/runtime/parse-property-value.ts
2265
- import { BUILD as BUILD14 } from "@stencil/core/internal/app-data";
2251
+ import { BUILD as BUILD15 } from "@stencil/core/internal/app-data";
2266
2252
  var parsePropertyValue = (propValue, propType, isFormAssociated) => {
2267
- if ((BUILD14.hydrateClientSide || BUILD14.hydrateServerSide) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
2253
+ if ((BUILD15.hydrateClientSide || BUILD15.hydrateServerSide) && typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
2268
2254
  try {
2269
2255
  propValue = JSON.parse(propValue);
2270
2256
  return propValue;
2271
2257
  } catch (e) {
2272
2258
  }
2273
2259
  }
2274
- if ((BUILD14.hydrateClientSide || BUILD14.hydrateServerSide) && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
2260
+ if ((BUILD15.hydrateClientSide || BUILD15.hydrateServerSide) && typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
2275
2261
  propValue = deserializeProperty(propValue);
2276
2262
  return propValue;
2277
2263
  }
2278
2264
  if (propValue != null && !isComplexType(propValue)) {
2279
- if (BUILD14.propBoolean && propType & 4 /* Boolean */) {
2280
- if (BUILD14.formAssociated && isFormAssociated && typeof propValue === "string") {
2265
+ if (BUILD15.propBoolean && propType & 4 /* Boolean */) {
2266
+ if (BUILD15.formAssociated && isFormAssociated && typeof propValue === "string") {
2281
2267
  return propValue === "" || !!propValue;
2282
2268
  } else {
2283
2269
  return propValue === "false" ? false : propValue === "" || !!propValue;
2284
2270
  }
2285
2271
  }
2286
- if (BUILD14.propNumber && propType & 2 /* Number */) {
2272
+ if (BUILD15.propNumber && propType & 2 /* Number */) {
2287
2273
  return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
2288
2274
  }
2289
- if (BUILD14.propString && propType & 1 /* String */) {
2275
+ if (BUILD15.propString && propType & 1 /* String */) {
2290
2276
  return String(propValue);
2291
2277
  }
2292
2278
  return propValue;
@@ -2298,18 +2284,18 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
2298
2284
  import { BUILD as BUILD21, NAMESPACE } from "@stencil/core/internal/app-data";
2299
2285
 
2300
2286
  // src/runtime/event-emitter.ts
2301
- import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
2287
+ import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
2302
2288
 
2303
2289
  // src/runtime/element.ts
2304
- import { BUILD as BUILD15 } from "@stencil/core/internal/app-data";
2305
- var getElement = (ref) => BUILD15.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2290
+ import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
2291
+ var getElement = (ref) => BUILD16.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2306
2292
 
2307
2293
  // src/runtime/event-emitter.ts
2308
2294
  var createEvent = (ref, name, flags) => {
2309
2295
  const elm = getElement(ref);
2310
2296
  return {
2311
2297
  emit: (detail) => {
2312
- if (BUILD16.isDev && !elm.isConnected) {
2298
+ if (BUILD17.isDev && !elm.isConnected) {
2313
2299
  consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
2314
2300
  }
2315
2301
  return emitEvent(elm, name, {
@@ -2327,123 +2313,6 @@ var emitEvent = (elm, name, opts) => {
2327
2313
  return ev;
2328
2314
  };
2329
2315
 
2330
- // src/runtime/styles.ts
2331
- import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
2332
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
2333
- var registerStyle = (scopeId2, cssText, allowCS) => {
2334
- let style = styles.get(scopeId2);
2335
- if (supportsConstructableStylesheets && allowCS) {
2336
- style = style || new CSSStyleSheet();
2337
- if (typeof style === "string") {
2338
- style = cssText;
2339
- } else {
2340
- style.replaceSync(cssText);
2341
- }
2342
- } else {
2343
- style = cssText;
2344
- }
2345
- styles.set(scopeId2, style);
2346
- };
2347
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
2348
- var _a;
2349
- const scopeId2 = getScopeId(cmpMeta, mode);
2350
- const style = styles.get(scopeId2);
2351
- if (!BUILD17.attachStyles || !win.document) {
2352
- return scopeId2;
2353
- }
2354
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
2355
- if (style) {
2356
- if (typeof style === "string") {
2357
- styleContainerNode = styleContainerNode.head || styleContainerNode;
2358
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
2359
- let styleElm;
2360
- if (!appliedStyles) {
2361
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2362
- }
2363
- if (!appliedStyles.has(scopeId2)) {
2364
- if (BUILD17.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
2365
- styleElm.innerHTML = style;
2366
- } else {
2367
- styleElm = win.document.createElement("style");
2368
- styleElm.innerHTML = style;
2369
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2370
- if (nonce != null) {
2371
- styleElm.setAttribute("nonce", nonce);
2372
- }
2373
- if ((BUILD17.hydrateServerSide || BUILD17.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */)) {
2374
- styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
2375
- }
2376
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
2377
- if (styleContainerNode.nodeName === "HEAD") {
2378
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
2379
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
2380
- styleContainerNode.insertBefore(
2381
- styleElm,
2382
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
2383
- );
2384
- } else if ("host" in styleContainerNode) {
2385
- if (supportsConstructableStylesheets) {
2386
- const stylesheet = new CSSStyleSheet();
2387
- stylesheet.replaceSync(style);
2388
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
2389
- } else {
2390
- const existingStyleContainer = styleContainerNode.querySelector("style");
2391
- if (existingStyleContainer) {
2392
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
2393
- } else {
2394
- styleContainerNode.prepend(styleElm);
2395
- }
2396
- }
2397
- } else {
2398
- styleContainerNode.append(styleElm);
2399
- }
2400
- }
2401
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2402
- styleContainerNode.insertBefore(styleElm, null);
2403
- }
2404
- }
2405
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
2406
- styleElm.innerHTML += SLOT_FB_CSS;
2407
- }
2408
- if (appliedStyles) {
2409
- appliedStyles.add(scopeId2);
2410
- }
2411
- }
2412
- } else if (BUILD17.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
2413
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
2414
- }
2415
- }
2416
- return scopeId2;
2417
- };
2418
- var attachStyles = (hostRef) => {
2419
- const cmpMeta = hostRef.$cmpMeta$;
2420
- const elm = hostRef.$hostElement$;
2421
- const flags = cmpMeta.$flags$;
2422
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
2423
- const scopeId2 = addStyle(
2424
- BUILD17.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2425
- cmpMeta,
2426
- hostRef.$modeName$
2427
- );
2428
- if ((BUILD17.shadowDom || BUILD17.scoped) && BUILD17.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
2429
- elm["s-sc"] = scopeId2;
2430
- elm.classList.add(scopeId2 + "-h");
2431
- }
2432
- endAttachStyles();
2433
- };
2434
- var getScopeId = (cmp, mode) => "sc-" + (BUILD17.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
2435
- var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
2436
- var hydrateScopedToShadow = () => {
2437
- if (!win.document) {
2438
- return;
2439
- }
2440
- const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
2441
- let i2 = 0;
2442
- for (; i2 < styles2.length; i2++) {
2443
- registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
2444
- }
2445
- };
2446
-
2447
2316
  // src/runtime/vdom/vdom-render.ts
2448
2317
  import { BUILD as BUILD20 } from "@stencil/core/internal/app-data";
2449
2318
 
@@ -2462,12 +2331,13 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
2462
2331
  const classList = elm.classList;
2463
2332
  const oldClasses = parseClassList(oldValue);
2464
2333
  let newClasses = parseClassList(newValue);
2465
- if (BUILD18.hydrateClientSide && elm["s-si"] && initialRender) {
2466
- newClasses.push(elm["s-si"]);
2334
+ if (BUILD18.hydrateClientSide && (elm["s-si"] || elm["s-sc"]) && initialRender) {
2335
+ const scopeId2 = elm["s-sc"] || elm["s-si"];
2336
+ newClasses.push(scopeId2);
2467
2337
  oldClasses.forEach((c) => {
2468
- if (c.startsWith(elm["s-si"])) newClasses.push(c);
2338
+ if (c.startsWith(scopeId2)) newClasses.push(c);
2469
2339
  });
2470
- newClasses = [...new Set(newClasses)];
2340
+ newClasses = [...new Set(newClasses)].filter((c) => c);
2471
2341
  classList.add(...newClasses);
2472
2342
  } else {
2473
2343
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
@@ -3416,10 +3286,16 @@ var forceUpdate = (ref) => {
3416
3286
  return false;
3417
3287
  };
3418
3288
  var appDidLoad = (who) => {
3289
+ var _a;
3419
3290
  if (BUILD21.asyncQueue) {
3420
3291
  plt.$flags$ |= 2 /* appLoaded */;
3421
3292
  }
3422
3293
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
3294
+ if (BUILD21.hydrateClientSide) {
3295
+ if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
3296
+ plt.$orgLocNodes$.clear();
3297
+ }
3298
+ }
3423
3299
  if (BUILD21.profile && performance.measure) {
3424
3300
  performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${who})`, "st:app:start");
3425
3301
  }
@@ -3851,6 +3727,11 @@ var connectedCallback = (elm) => {
3851
3727
  if (BUILD25.hydrateServerSide || (BUILD25.slot || BUILD25.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
3852
3728
  cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
3853
3729
  setContentReference(elm);
3730
+ } else if (BUILD25.hydrateClientSide && !(cmpMeta.$flags$ & 4 /* hasSlotRelocation */)) {
3731
+ const commendPlaceholder = elm.firstChild;
3732
+ if ((commendPlaceholder == null ? void 0 : commendPlaceholder.nodeType) === 8 /* CommentNode */ && !commendPlaceholder["s-cn"] && !commendPlaceholder.nodeValue) {
3733
+ elm.removeChild(commendPlaceholder);
3734
+ }
3854
3735
  }
3855
3736
  }
3856
3737
  if (BUILD25.asyncLoading) {