@stencil/core 4.18.0-dev.1715576505.d345412 → 4.18.1-dev.1715662900.e420eb6

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 Hydrate Runner v4.18.0-dev.1715576505.d345412 | MIT Licensed | https://stenciljs.com
2
+ Stencil Hydrate Runner v4.18.1-dev.1715662900.e420eb6 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -115,10 +115,8 @@ function cloneAttributes(srcAttrs, sortByName = false) {
115
115
  return dstAttrs;
116
116
  }
117
117
  function sortAttributes(a, b) {
118
- if (a.name < b.name)
119
- return -1;
120
- if (a.name > b.name)
121
- return 1;
118
+ if (a.name < b.name) return -1;
119
+ if (a.name > b.name) return 1;
122
120
  return 0;
123
121
  }
124
122
  var MockAttr = class {
@@ -14130,8 +14128,7 @@ var parseCss = (css, filePath) => {
14130
14128
  const diagnostics = [];
14131
14129
  const updatePosition = (str) => {
14132
14130
  const lines = str.match(/\n/g);
14133
- if (lines)
14134
- lineno += lines.length;
14131
+ if (lines) lineno += lines.length;
14135
14132
  const i = str.lastIndexOf("\n");
14136
14133
  column = ~i ? str.length - i : column + str.length;
14137
14134
  };
@@ -14198,8 +14195,7 @@ var parseCss = (css, filePath) => {
14198
14195
  const close = () => match(/^}/);
14199
14196
  const match = (re) => {
14200
14197
  const m = re.exec(css);
14201
- if (!m)
14202
- return;
14198
+ if (!m) return;
14203
14199
  const str = m[0];
14204
14200
  updatePosition(str);
14205
14201
  css = css.slice(str.length);
@@ -14227,11 +14223,9 @@ var parseCss = (css, filePath) => {
14227
14223
  };
14228
14224
  const comment = () => {
14229
14225
  const pos = position();
14230
- if ("/" !== css.charAt(0) || "*" !== css.charAt(1))
14231
- return null;
14226
+ if ("/" !== css.charAt(0) || "*" !== css.charAt(1)) return null;
14232
14227
  let i = 2;
14233
- while ("" !== css.charAt(i) && ("*" !== css.charAt(i) || "/" !== css.charAt(i + 1)))
14234
- ++i;
14228
+ while ("" !== css.charAt(i) && ("*" !== css.charAt(i) || "/" !== css.charAt(i + 1))) ++i;
14235
14229
  i += 2;
14236
14230
  if ("" === css.charAt(i - 1)) {
14237
14231
  return error("End of comment missing");
@@ -14248,8 +14242,7 @@ var parseCss = (css, filePath) => {
14248
14242
  };
14249
14243
  const selector = () => {
14250
14244
  const m = match(/^([^{]+)/);
14251
- if (!m)
14252
- return null;
14245
+ if (!m) return null;
14253
14246
  return trim(m[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, "").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, function(m2) {
14254
14247
  return m2.replace(/,/g, "\u200C");
14255
14248
  }).split(/\s*(?![^(]*\)),\s*/).map(function(s) {
@@ -14259,11 +14252,9 @@ var parseCss = (css, filePath) => {
14259
14252
  const declaration = () => {
14260
14253
  const pos = position();
14261
14254
  let prop = match(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
14262
- if (!prop)
14263
- return null;
14255
+ if (!prop) return null;
14264
14256
  prop = trim(prop[0]);
14265
- if (!match(/^:\s*/))
14266
- return error(`property missing ':'`);
14257
+ if (!match(/^:\s*/)) return error(`property missing ':'`);
14267
14258
  const val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/);
14268
14259
  const ret = pos({
14269
14260
  type: 4 /* Declaration */,
@@ -14275,16 +14266,14 @@ var parseCss = (css, filePath) => {
14275
14266
  };
14276
14267
  const declarations = () => {
14277
14268
  const decls = [];
14278
- if (!open())
14279
- return error(`missing '{'`);
14269
+ if (!open()) return error(`missing '{'`);
14280
14270
  comments(decls);
14281
14271
  let decl;
14282
14272
  while (decl = declaration()) {
14283
14273
  decls.push(decl);
14284
14274
  comments(decls);
14285
14275
  }
14286
- if (!close())
14287
- return error(`missing '}'`);
14276
+ if (!close()) return error(`missing '}'`);
14288
14277
  return decls;
14289
14278
  };
14290
14279
  const keyframe = () => {
@@ -14295,8 +14284,7 @@ var parseCss = (css, filePath) => {
14295
14284
  values.push(m[1]);
14296
14285
  match(/^,\s*/);
14297
14286
  }
14298
- if (!values.length)
14299
- return null;
14287
+ if (!values.length) return null;
14300
14288
  return pos({
14301
14289
  type: 9 /* KeyFrame */,
14302
14290
  values,
@@ -14306,23 +14294,19 @@ var parseCss = (css, filePath) => {
14306
14294
  const atkeyframes = () => {
14307
14295
  const pos = position();
14308
14296
  let m = match(/^@([-\w]+)?keyframes\s*/);
14309
- if (!m)
14310
- return null;
14297
+ if (!m) return null;
14311
14298
  const vendor = m[1];
14312
14299
  m = match(/^([-\w]+)\s*/);
14313
- if (!m)
14314
- return error(`@keyframes missing name`);
14300
+ if (!m) return error(`@keyframes missing name`);
14315
14301
  const name = m[1];
14316
- if (!open())
14317
- return error(`@keyframes missing '{'`);
14302
+ if (!open()) return error(`@keyframes missing '{'`);
14318
14303
  let frame;
14319
14304
  let frames = comments();
14320
14305
  while (frame = keyframe()) {
14321
14306
  frames.push(frame);
14322
14307
  frames = frames.concat(comments());
14323
14308
  }
14324
- if (!close())
14325
- return error(`@keyframes missing '}'`);
14309
+ if (!close()) return error(`@keyframes missing '}'`);
14326
14310
  return pos({
14327
14311
  type: 8 /* KeyFrames */,
14328
14312
  name,
@@ -14333,14 +14317,11 @@ var parseCss = (css, filePath) => {
14333
14317
  const atsupports = () => {
14334
14318
  const pos = position();
14335
14319
  const m = match(/^@supports *([^{]+)/);
14336
- if (!m)
14337
- return null;
14320
+ if (!m) return null;
14338
14321
  const supports = trim(m[1]);
14339
- if (!open())
14340
- return error(`@supports missing '{'`);
14322
+ if (!open()) return error(`@supports missing '{'`);
14341
14323
  const style = comments().concat(rules());
14342
- if (!close())
14343
- return error(`@supports missing '}'`);
14324
+ if (!close()) return error(`@supports missing '}'`);
14344
14325
  return pos({
14345
14326
  type: 15 /* Supports */,
14346
14327
  supports,
@@ -14350,13 +14331,10 @@ var parseCss = (css, filePath) => {
14350
14331
  const athost = () => {
14351
14332
  const pos = position();
14352
14333
  const m = match(/^@host\s*/);
14353
- if (!m)
14354
- return null;
14355
- if (!open())
14356
- return error(`@host missing '{'`);
14334
+ if (!m) return null;
14335
+ if (!open()) return error(`@host missing '{'`);
14357
14336
  const style = comments().concat(rules());
14358
- if (!close())
14359
- return error(`@host missing '}'`);
14337
+ if (!close()) return error(`@host missing '}'`);
14360
14338
  return pos({
14361
14339
  type: 6 /* Host */,
14362
14340
  rules: style
@@ -14365,14 +14343,11 @@ var parseCss = (css, filePath) => {
14365
14343
  const atmedia = () => {
14366
14344
  const pos = position();
14367
14345
  const m = match(/^@media *([^{]+)/);
14368
- if (!m)
14369
- return null;
14346
+ if (!m) return null;
14370
14347
  const media = trim(m[1]);
14371
- if (!open())
14372
- return error(`@media missing '{'`);
14348
+ if (!open()) return error(`@media missing '{'`);
14373
14349
  const style = comments().concat(rules());
14374
- if (!close())
14375
- return error(`@media missing '}'`);
14350
+ if (!close()) return error(`@media missing '}'`);
14376
14351
  return pos({
14377
14352
  type: 10 /* Media */,
14378
14353
  media,
@@ -14382,8 +14357,7 @@ var parseCss = (css, filePath) => {
14382
14357
  const atcustommedia = () => {
14383
14358
  const pos = position();
14384
14359
  const m = match(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);
14385
- if (!m)
14386
- return null;
14360
+ if (!m) return null;
14387
14361
  return pos({
14388
14362
  type: 2 /* CustomMedia */,
14389
14363
  name: trim(m[1]),
@@ -14393,19 +14367,16 @@ var parseCss = (css, filePath) => {
14393
14367
  const atpage = () => {
14394
14368
  const pos = position();
14395
14369
  const m = match(/^@page */);
14396
- if (!m)
14397
- return null;
14370
+ if (!m) return null;
14398
14371
  const sel = selector() || [];
14399
- if (!open())
14400
- return error(`@page missing '{'`);
14372
+ if (!open()) return error(`@page missing '{'`);
14401
14373
  let decls = comments();
14402
14374
  let decl;
14403
14375
  while (decl = declaration()) {
14404
14376
  decls.push(decl);
14405
14377
  decls = decls.concat(comments());
14406
14378
  }
14407
- if (!close())
14408
- return error(`@page missing '}'`);
14379
+ if (!close()) return error(`@page missing '}'`);
14409
14380
  return pos({
14410
14381
  type: 12 /* Page */,
14411
14382
  selectors: sel,
@@ -14415,15 +14386,12 @@ var parseCss = (css, filePath) => {
14415
14386
  const atdocument = () => {
14416
14387
  const pos = position();
14417
14388
  const m = match(/^@([-\w]+)?document *([^{]+)/);
14418
- if (!m)
14419
- return null;
14389
+ if (!m) return null;
14420
14390
  const vendor = trim(m[1]);
14421
14391
  const doc = trim(m[2]);
14422
- if (!open())
14423
- return error(`@document missing '{'`);
14392
+ if (!open()) return error(`@document missing '{'`);
14424
14393
  const style = comments().concat(rules());
14425
- if (!close())
14426
- return error(`@document missing '}'`);
14394
+ if (!close()) return error(`@document missing '}'`);
14427
14395
  return pos({
14428
14396
  type: 3 /* Document */,
14429
14397
  document: doc,
@@ -14434,18 +14402,15 @@ var parseCss = (css, filePath) => {
14434
14402
  const atfontface = () => {
14435
14403
  const pos = position();
14436
14404
  const m = match(/^@font-face\s*/);
14437
- if (!m)
14438
- return null;
14439
- if (!open())
14440
- return error(`@font-face missing '{'`);
14405
+ if (!m) return null;
14406
+ if (!open()) return error(`@font-face missing '{'`);
14441
14407
  let decls = comments();
14442
14408
  let decl;
14443
14409
  while (decl = declaration()) {
14444
14410
  decls.push(decl);
14445
14411
  decls = decls.concat(comments());
14446
14412
  }
14447
- if (!close())
14448
- return error(`@font-face missing '}'`);
14413
+ if (!close()) return error(`@font-face missing '}'`);
14449
14414
  return pos({
14450
14415
  type: 5 /* FontFace */,
14451
14416
  declarations: decls
@@ -14456,8 +14421,7 @@ var parseCss = (css, filePath) => {
14456
14421
  return () => {
14457
14422
  const pos = position();
14458
14423
  const m = match(re);
14459
- if (!m)
14460
- return null;
14424
+ if (!m) return null;
14461
14425
  const node = {
14462
14426
  type: nodeType
14463
14427
  };
@@ -14469,15 +14433,13 @@ var parseCss = (css, filePath) => {
14469
14433
  const atcharset = compileAtrule("charset", 0 /* Charset */);
14470
14434
  const atnamespace = compileAtrule("namespace", 11 /* Namespace */);
14471
14435
  const atrule = () => {
14472
- if (css[0] !== "@")
14473
- return null;
14436
+ if (css[0] !== "@") return null;
14474
14437
  return atkeyframes() || atmedia() || atcustommedia() || atsupports() || atimport() || atcharset() || atnamespace() || atdocument() || atpage() || athost() || atfontface();
14475
14438
  };
14476
14439
  const rule = () => {
14477
14440
  const pos = position();
14478
14441
  const sel = selector();
14479
- if (!sel)
14480
- return error("selector missing");
14442
+ if (!sel) return error("selector missing");
14481
14443
  comments();
14482
14444
  return pos({
14483
14445
  type: 13 /* Rule */,
@@ -14531,8 +14493,7 @@ var getCssSelectors = (sel) => {
14531
14493
  const items = sel.split(" ");
14532
14494
  for (let i = 0, l = items.length; i < l; i++) {
14533
14495
  items[i] = items[i].split(":")[0];
14534
- if (items[i].length === 0)
14535
- continue;
14496
+ if (items[i].length === 0) continue;
14536
14497
  if (items[i].charAt(0) === ".") {
14537
14498
  SELECTORS.classNames.push(items[i].slice(1));
14538
14499
  } else if (items[i].charAt(0) === "#") {
@@ -14545,10 +14506,8 @@ var getCssSelectors = (sel) => {
14545
14506
  }
14546
14507
  }
14547
14508
  SELECTORS.classNames = SELECTORS.classNames.sort((a, b) => {
14548
- if (a.length < b.length)
14549
- return -1;
14550
- if (a.length > b.length)
14551
- return 1;
14509
+ if (a.length < b.length) return -1;
14510
+ if (a.length > b.length) return 1;
14552
14511
  return 0;
14553
14512
  });
14554
14513
  return SELECTORS;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "4.18.0-dev.1715576505.d345412",
3
+ "version": "4.18.1-dev.1715662900.e420eb6",
4
4
  "description": "Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -927,7 +927,7 @@ var checkSlotFallbackVisibility = false;
927
927
  var checkSlotRelocate = false;
928
928
  var isSvgMode = false;
929
929
  var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
930
- var _a, _b, _c, _d;
930
+ var _a;
931
931
  const newVNode2 = newParentVNode.$children$[childIndex];
932
932
  let i2 = 0;
933
933
  let elm;
@@ -979,13 +979,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
979
979
  if ((import_app_data10.BUILD.shadowDom || import_app_data10.BUILD.scoped) && isDef(scopeId) && elm["s-si"] !== scopeId) {
980
980
  elm.classList.add(elm["s-si"] = scopeId);
981
981
  }
982
- if (import_app_data10.BUILD.scoped) {
983
- const rootScopeId = ((_a = newParentVNode.$elm$) == null ? void 0 : _a["s-rsc"]) || ((_b = newParentVNode.$elm$) == null ? void 0 : _b["s-si"]) || ((_c = newParentVNode.$elm$) == null ? void 0 : _c["s-sc"]);
984
- if (rootScopeId) {
985
- elm["s-rsc"] = rootScopeId;
986
- !elm.classList.contains(rootScopeId) && elm.classList.add(rootScopeId);
987
- }
988
- }
989
982
  if (newVNode2.$children$) {
990
983
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
991
984
  childNode = createElm(oldParentVNode, newVNode2, i2, elm);
@@ -1008,7 +1001,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
1008
1001
  elm["s-sr"] = true;
1009
1002
  elm["s-cr"] = contentRef;
1010
1003
  elm["s-sn"] = newVNode2.$name$ || "";
1011
- elm["s-rf"] = (_d = newVNode2.$attrs$) == null ? void 0 : _d.ref;
1004
+ elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
1012
1005
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
1013
1006
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
1014
1007
  if (import_app_data10.BUILD.experimentalSlotFixes) {
@@ -1029,7 +1022,7 @@ var relocateToHostRoot = (parentElm) => {
1029
1022
  const childNodeArray = Array.from(parentElm.childNodes);
1030
1023
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
1031
1024
  if (childNode["s-sh"] != null) {
1032
- host.insertBefore(childNode, contentRefNode != null ? contentRefNode : null);
1025
+ insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
1033
1026
  childNode["s-sh"] = void 0;
1034
1027
  checkSlotRelocate = true;
1035
1028
  }
@@ -1051,7 +1044,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
1051
1044
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
1052
1045
  const childNode = oldSlotChildNodes[i2];
1053
1046
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
1054
- parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
1047
+ insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
1055
1048
  childNode["s-ol"].remove();
1056
1049
  childNode["s-ol"] = void 0;
1057
1050
  childNode["s-sh"] = void 0;
@@ -1074,7 +1067,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
1074
1067
  childNode = createElm(null, parentVNode, startIdx, parentElm);
1075
1068
  if (childNode) {
1076
1069
  vnodes[startIdx].$elm$ = childNode;
1077
- containerElm.insertBefore(childNode, import_app_data10.BUILD.slotRelocation ? referenceNode(before) : before);
1070
+ insertBefore(containerElm, childNode, import_app_data10.BUILD.slotRelocation ? referenceNode(before) : before);
1078
1071
  }
1079
1072
  }
1080
1073
  }
@@ -1134,7 +1127,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1134
1127
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
1135
1128
  }
1136
1129
  patch(oldStartVnode, newEndVnode, isInitialRender);
1137
- parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
1130
+ insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
1138
1131
  oldStartVnode = oldCh[++oldStartIdx];
1139
1132
  newEndVnode = newCh[--newEndIdx];
1140
1133
  } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
@@ -1142,7 +1135,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1142
1135
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
1143
1136
  }
1144
1137
  patch(oldEndVnode, newStartVnode, isInitialRender);
1145
- parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
1138
+ insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
1146
1139
  oldEndVnode = oldCh[--oldEndIdx];
1147
1140
  newStartVnode = newCh[++newStartIdx];
1148
1141
  } else {
@@ -1171,9 +1164,9 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1171
1164
  }
1172
1165
  if (node) {
1173
1166
  if (import_app_data10.BUILD.slotRelocation) {
1174
- parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
1167
+ insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
1175
1168
  } else {
1176
- oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
1169
+ insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
1177
1170
  }
1178
1171
  }
1179
1172
  }
@@ -1344,6 +1337,28 @@ var nullifyVNodeRefs = (vNode) => {
1344
1337
  vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1345
1338
  }
1346
1339
  };
1340
+ var insertBefore = (parent, newNode, reference) => {
1341
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1342
+ if (import_app_data10.BUILD.scoped) {
1343
+ setParentScopeIdAsClassName(newNode, parent);
1344
+ }
1345
+ return inserted;
1346
+ };
1347
+ var findParentScopeId = (element) => {
1348
+ return element ? element["s-rsc"] || element["s-si"] || element["s-sc"] || findParentScopeId(element.parentElement) : void 0;
1349
+ };
1350
+ var setParentScopeIdAsClassName = (element, parent) => {
1351
+ var _a, _b, _c;
1352
+ if (element && parent) {
1353
+ const oldRootScopeId = element["s-rsc"];
1354
+ const newRootScopeId = findParentScopeId(parent);
1355
+ oldRootScopeId && ((_a = element.classList) == null ? void 0 : _a.contains(oldRootScopeId)) && element.classList.remove(oldRootScopeId);
1356
+ if (newRootScopeId) {
1357
+ element["s-rsc"] = newRootScopeId;
1358
+ !((_b = element.classList) == null ? void 0 : _b.contains(newRootScopeId)) && ((_c = element.classList) == null ? void 0 : _c.add(newRootScopeId));
1359
+ }
1360
+ }
1361
+ };
1347
1362
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1348
1363
  var _a, _b, _c, _d, _e;
1349
1364
  const hostElm = hostRef.$hostElement$;
@@ -1400,7 +1415,7 @@ render() {
1400
1415
  if (!nodeToRelocate["s-ol"]) {
1401
1416
  const orgLocationNode = import_app_data10.BUILD.isDebug || import_app_data10.BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
1402
1417
  orgLocationNode["s-nr"] = nodeToRelocate;
1403
- nodeToRelocate.parentNode.insertBefore(nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1418
+ insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1404
1419
  }
1405
1420
  }
1406
1421
  for (const relocateData of relocateNodes) {
@@ -1431,7 +1446,7 @@ render() {
1431
1446
  if (!import_app_data10.BUILD.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1432
1447
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1433
1448
  }
1434
- parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1449
+ insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1435
1450
  if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1436
1451
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1437
1452
  }
@@ -2070,7 +2085,7 @@ var setContentReference = (elm) => {
2070
2085
  import_app_data15.BUILD.isDebug ? `content-ref (host=${elm.localName})` : ""
2071
2086
  );
2072
2087
  contentRefElm["s-cn"] = true;
2073
- elm.insertBefore(contentRefElm, elm.firstChild);
2088
+ insertBefore(elm, contentRefElm, elm.firstChild);
2074
2089
  };
2075
2090
 
2076
2091
  // src/runtime/disconnected-callback.ts
@@ -2139,7 +2154,8 @@ var patchCloneNode = (HostElementPrototype) => {
2139
2154
  "s-ol",
2140
2155
  "s-nr",
2141
2156
  "s-si",
2142
- "s-rf"
2157
+ "s-rf",
2158
+ "s-rsc"
2143
2159
  ];
2144
2160
  for (; i2 < srcNode.childNodes.length; i2++) {
2145
2161
  slotted = srcNode.childNodes[i2]["s-nr"];
@@ -2167,7 +2183,7 @@ var patchSlotAppendChild = (HostElementPrototype) => {
2167
2183
  if (slotNode) {
2168
2184
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
2169
2185
  const appendAfter = slotChildNodes[slotChildNodes.length - 1];
2170
- const insertedNode = appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);
2186
+ const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
2171
2187
  updateFallbackSlotVisibility(this);
2172
2188
  return insertedNode;
2173
2189
  }
@@ -2208,7 +2224,7 @@ var patchSlotPrepend = (HostElementPrototype) => {
2208
2224
  newChild["s-ol"] = slotPlaceholder;
2209
2225
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
2210
2226
  const appendAfter = slotChildNodes[0];
2211
- return appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);
2227
+ return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
2212
2228
  }
2213
2229
  if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
2214
2230
  newChild.hidden = true;
@@ -2306,7 +2322,7 @@ var patchTextContent = (hostElementPrototype) => {
2306
2322
  if (node["s-sn"] === "") {
2307
2323
  const textNode = this.ownerDocument.createTextNode(value);
2308
2324
  textNode["s-sn"] = "";
2309
- node.parentElement.insertBefore(textNode, node.nextSibling);
2325
+ insertBefore(node.parentElement, textNode, node.nextSibling);
2310
2326
  } else {
2311
2327
  node.remove();
2312
2328
  }
@@ -2337,7 +2353,7 @@ var patchTextContent = (hostElementPrototype) => {
2337
2353
  this.__textContent = value;
2338
2354
  const contentRefElm = this["s-cr"];
2339
2355
  if (contentRefElm) {
2340
- this.insertBefore(contentRefElm, this.firstChild);
2356
+ insertBefore(this, contentRefElm, this.firstChild);
2341
2357
  }
2342
2358
  }
2343
2359
  }
@@ -2731,14 +2747,10 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
2731
2747
  }
2732
2748
  };
2733
2749
  var getHostListenerTarget = (elm, flags) => {
2734
- if (import_app_data20.BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */)
2735
- return doc;
2736
- if (import_app_data20.BUILD.hostListenerTargetWindow && flags & 8 /* TargetWindow */)
2737
- return win;
2738
- if (import_app_data20.BUILD.hostListenerTargetBody && flags & 16 /* TargetBody */)
2739
- return doc.body;
2740
- if (import_app_data20.BUILD.hostListenerTargetParent && flags & 32 /* TargetParent */)
2741
- return elm.parentElement;
2750
+ if (import_app_data20.BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
2751
+ if (import_app_data20.BUILD.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
2752
+ if (import_app_data20.BUILD.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
2753
+ if (import_app_data20.BUILD.hostListenerTargetParent && flags & 32 /* TargetParent */) return elm.parentElement;
2742
2754
  return elm;
2743
2755
  };
2744
2756
  var hostListenerOpts = (flags) => supportsListenerOptions ? {
@@ -2763,7 +2775,7 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
2763
2775
  const orgLocationNodes = [];
2764
2776
  parseVNodeAnnotations(doc2, doc2.body, docData, orgLocationNodes);
2765
2777
  orgLocationNodes.forEach((orgLocationNode) => {
2766
- var _a, _b;
2778
+ var _a;
2767
2779
  if (orgLocationNode != null && orgLocationNode["s-nr"]) {
2768
2780
  const nodeRef = orgLocationNode["s-nr"];
2769
2781
  let hostId = nodeRef["s-host-id"];
@@ -2786,7 +2798,7 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
2786
2798
  }
2787
2799
  const commentBeforeTextNode = doc2.createComment(childId);
2788
2800
  commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
2789
- (_b = nodeRef.parentNode) == null ? void 0 : _b.insertBefore(commentBeforeTextNode, nodeRef);
2801
+ insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
2790
2802
  }
2791
2803
  }
2792
2804
  let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
@@ -2871,7 +2883,7 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
2871
2883
  if (nodeName !== "STYLE" && nodeName !== "SCRIPT") {
2872
2884
  const textNodeId = `${TEXT_NODE_ID}.${childId}`;
2873
2885
  const commentBeforeTextNode = doc2.createComment(textNodeId);
2874
- parentNode == null ? void 0 : parentNode.insertBefore(commentBeforeTextNode, childElm);
2886
+ insertBefore(parentNode, commentBeforeTextNode, childElm);
2875
2887
  }
2876
2888
  } else if (childElm.nodeType === 8 /* CommentNode */) {
2877
2889
  if (childElm["s-sr"]) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/testing",
3
- "version": "4.18.0-dev.1715576505.d345412",
3
+ "version": "4.18.1-dev.1715662900.e420eb6",
4
4
  "description": "Stencil internal testing platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true