@stencil/core 4.35.3-dev.1752210255.bfbd683 → 4.35.3-dev.1752469555.051522f

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.3-dev.1752210255.bfbd683 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Platform v4.35.3-dev.1752469555.051522f | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -1430,7 +1430,7 @@ var validateInputProperties = (inputElm) => {
1430
1430
 
1431
1431
  // src/runtime/client-hydrate.ts
1432
1432
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1433
- var _a, _b;
1433
+ var _a, _b, _c;
1434
1434
  const endHydrate = createTime("hydrateClient", tagName);
1435
1435
  const shadowRoot = hostElm.shadowRoot;
1436
1436
  const childRenderNodes = [];
@@ -1494,15 +1494,17 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1494
1494
  if (childRenderNode.$tag$ === "slot") {
1495
1495
  node["s-cr"] = hostElm["s-cr"];
1496
1496
  }
1497
- } else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && !childRenderNode.$elm$.shadowRoot) {
1497
+ } else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
1498
1498
  const cmpMeta = getHostRef(childRenderNode.$elm$);
1499
- const scopeId3 = getScopeId(
1500
- cmpMeta.$cmpMeta$,
1501
- BUILD14.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
1502
- );
1503
- const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
1504
- if (styleSheet) {
1505
- hostElm.shadowRoot.append(styleSheet.cloneNode(true));
1499
+ if (cmpMeta) {
1500
+ const scopeId3 = getScopeId(
1501
+ cmpMeta.$cmpMeta$,
1502
+ BUILD14.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
1503
+ );
1504
+ const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
1505
+ if (styleSheet) {
1506
+ hostElm.shadowRoot.append(styleSheet.cloneNode(true));
1507
+ }
1506
1508
  }
1507
1509
  }
1508
1510
  if (childRenderNode.$tag$ === "slot") {
@@ -1550,6 +1552,9 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1550
1552
  }
1551
1553
  if (!hosts[slottedItem.hostId]) continue;
1552
1554
  const hostEle = hosts[slottedItem.hostId];
1555
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1556
+ hostEle.appendChild(slottedItem.node);
1557
+ }
1553
1558
  if (!hostEle.shadowRoot || !shadowRoot) {
1554
1559
  if (!slottedItem.slot["s-cr"]) {
1555
1560
  slottedItem.slot["s-cr"] = hostEle["s-cr"];
@@ -1560,13 +1565,13 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1560
1565
  }
1561
1566
  }
1562
1567
  addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1568
+ if (((_c = slottedItem.node.parentElement) == null ? void 0 : _c.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
1569
+ slottedItem.node.removeAttribute("slot");
1570
+ }
1563
1571
  if (BUILD14.experimentalSlotFixes) {
1564
1572
  patchSlottedNode(slottedItem.node);
1565
1573
  }
1566
1574
  }
1567
- if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1568
- hostEle.appendChild(slottedItem.node);
1569
- }
1570
1575
  }
1571
1576
  }
1572
1577
  if (BUILD14.scoped && scopeId2 && slotNodes.length) {
@@ -1838,13 +1843,17 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1838
1843
  parentVNode.$children$[childVNode.$index$] = childVNode;
1839
1844
  }
1840
1845
  var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1846
+ var _a, _b;
1841
1847
  let slottedNode = slotNode.nextSibling;
1842
1848
  slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1843
- 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"))) {
1844
- slottedNode["s-sn"] = slotName;
1845
- slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1846
- slottedNode = slottedNode.nextSibling;
1847
- }
1849
+ if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
1850
+ do {
1851
+ if (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (!slottedNode["getAttribute"] || !slottedNode.getAttribute("slot")) && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */))) {
1852
+ slottedNode["s-sn"] = slotName;
1853
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1854
+ }
1855
+ slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
1856
+ } while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
1848
1857
  };
1849
1858
  var findCorrespondingNode = (node, type) => {
1850
1859
  let sibling = node;
@@ -2266,7 +2275,10 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
2266
2275
  // src/runtime/mode.ts
2267
2276
  var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
2268
2277
  var setMode = (handler) => modeResolutionChain.push(handler);
2269
- var getMode = (ref) => getHostRef(ref).$modeName$;
2278
+ var getMode = (ref) => {
2279
+ var _a;
2280
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$modeName$;
2281
+ };
2270
2282
 
2271
2283
  // src/runtime/proxy-component.ts
2272
2284
  import { BUILD as BUILD23 } from "@stencil/core/internal/app-data";
@@ -2315,7 +2327,10 @@ import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
2315
2327
 
2316
2328
  // src/runtime/element.ts
2317
2329
  import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
2318
- var getElement = (ref) => BUILD16.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2330
+ var getElement = (ref) => {
2331
+ var _a;
2332
+ return BUILD16.lazyLoad ? (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ : ref;
2333
+ };
2319
2334
 
2320
2335
  // src/runtime/event-emitter.ts
2321
2336
  var createEvent = (ref, name, flags) => {
@@ -3115,6 +3130,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
3115
3130
  }
3116
3131
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
3117
3132
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
3133
+ if (isInitialLoad) {
3134
+ queueMicrotask(() => {
3135
+ dispatch();
3136
+ });
3137
+ return;
3138
+ }
3118
3139
  return BUILD21.taskQueue ? writeTask(dispatch) : dispatch();
3119
3140
  };
3120
3141
  var dispatchHooks = (hostRef, isInitialLoad) => {
@@ -3304,9 +3325,10 @@ var postUpdateComponent = (hostRef) => {
3304
3325
  }
3305
3326
  };
3306
3327
  var forceUpdate = (ref) => {
3328
+ var _a;
3307
3329
  if (BUILD21.updatable && (Build.isBrowser || Build.isTesting)) {
3308
3330
  const hostRef = getHostRef(ref);
3309
- const isConnected = hostRef.$hostElement$.isConnected;
3331
+ const isConnected = (_a = hostRef == null ? void 0 : hostRef.$hostElement$) == null ? void 0 : _a.isConnected;
3310
3332
  if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
3311
3333
  scheduleUpdate(hostRef, false);
3312
3334
  }
@@ -3371,6 +3393,9 @@ var serverSideConnected = (elm) => {
3371
3393
  var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
3372
3394
  var setValue = (ref, propName, newVal, cmpMeta) => {
3373
3395
  const hostRef = getHostRef(ref);
3396
+ if (!hostRef) {
3397
+ return;
3398
+ }
3374
3399
  if (BUILD22.lazyLoad && !hostRef) {
3375
3400
  throw new Error(
3376
3401
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
@@ -3452,10 +3477,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
3452
3477
  const originalFormAssociatedCallback = prototype[cbName];
3453
3478
  Object.defineProperty(prototype, cbName, {
3454
3479
  value(...args) {
3480
+ var _a2;
3455
3481
  const hostRef = getHostRef(this);
3456
- const instance = BUILD23.lazyLoad ? hostRef.$lazyInstance$ : this;
3482
+ const instance = BUILD23.lazyLoad ? hostRef == null ? void 0 : hostRef.$lazyInstance$ : this;
3457
3483
  if (!instance) {
3458
- hostRef.$onReadyPromise$.then((asyncInstance) => {
3484
+ (_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
3459
3485
  const cb = asyncInstance[cbName];
3460
3486
  typeof cb === "function" && cb.call(asyncInstance, ...args);
3461
3487
  });
@@ -3500,6 +3526,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
3500
3526
  Object.defineProperty(prototype, memberName, {
3501
3527
  set(newValue) {
3502
3528
  const ref = getHostRef(this);
3529
+ if (!ref) {
3530
+ return;
3531
+ }
3503
3532
  if (BUILD23.isDev) {
3504
3533
  if (
3505
3534
  // we are proxying the instance (not element)
@@ -3597,7 +3626,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
3597
3626
  } else if (propName == null) {
3598
3627
  const hostRef = getHostRef(this);
3599
3628
  const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
3600
- if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
3629
+ if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
3601
3630
  const elm = BUILD23.lazyLoad ? hostRef.$hostElement$ : this;
3602
3631
  const instance = BUILD23.lazyLoad ? hostRef.$lazyInstance$ : elm;
3603
3632
  const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
@@ -3731,6 +3760,9 @@ var fireConnectedCallback = (instance, elm) => {
3731
3760
  var connectedCallback = (elm) => {
3732
3761
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
3733
3762
  const hostRef = getHostRef(elm);
3763
+ if (!hostRef) {
3764
+ return;
3765
+ }
3734
3766
  const cmpMeta = hostRef.$cmpMeta$;
3735
3767
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
3736
3768
  if (BUILD25.hostListenerTargetParent) {
@@ -3819,7 +3851,7 @@ var disconnectedCallback = async (elm) => {
3819
3851
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
3820
3852
  const hostRef = getHostRef(elm);
3821
3853
  if (BUILD26.hostListener) {
3822
- if (hostRef.$rmListeners$) {
3854
+ if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
3823
3855
  hostRef.$rmListeners$.map((rmListener) => rmListener());
3824
3856
  hostRef.$rmListeners$ = void 0;
3825
3857
  }
@@ -3895,6 +3927,9 @@ var proxyCustomElement = (Cstr, compactMeta) => {
3895
3927
  connectedCallback() {
3896
3928
  if (!this.__hasHostListenerAttached) {
3897
3929
  const hostRef = getHostRef(this);
3930
+ if (!hostRef) {
3931
+ return;
3932
+ }
3898
3933
  addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
3899
3934
  this.__hasHostListenerAttached = true;
3900
3935
  }
@@ -3932,7 +3967,7 @@ var forceModeUpdate = (elm) => {
3932
3967
  if (BUILD27.style && BUILD27.mode && !BUILD27.lazyLoad) {
3933
3968
  const mode = computeMode(elm);
3934
3969
  const hostRef = getHostRef(elm);
3935
- if (hostRef.$modeName$ !== mode) {
3970
+ if (hostRef && hostRef.$modeName$ !== mode) {
3936
3971
  const cmpMeta = hostRef.$cmpMeta$;
3937
3972
  const oldScopeId = elm["s-sc"];
3938
3973
  const scopeId2 = getScopeId(cmpMeta, mode);
@@ -3957,6 +3992,9 @@ import { BUILD as BUILD28 } from "@stencil/core/internal/app-data";
3957
3992
  // src/runtime/hmr-component.ts
3958
3993
  var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
3959
3994
  const hostRef = getHostRef(hostElement);
3995
+ if (!hostRef) {
3996
+ return;
3997
+ }
3960
3998
  hostRef.$flags$ = 1 /* hasConnected */;
3961
3999
  initializeComponent(hostElement, hostRef, cmpMeta, hmrVersionId);
3962
4000
  };
@@ -4049,6 +4087,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
4049
4087
  }
4050
4088
  connectedCallback() {
4051
4089
  const hostRef = getHostRef(this);
4090
+ if (!hostRef) {
4091
+ return;
4092
+ }
4052
4093
  if (!this.hasRegisteredEventListeners) {
4053
4094
  this.hasRegisteredEventListeners = true;
4054
4095
  addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
@@ -4068,6 +4109,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
4068
4109
  plt.raf(() => {
4069
4110
  var _a3;
4070
4111
  const hostRef = getHostRef(this);
4112
+ if (!hostRef) {
4113
+ return;
4114
+ }
4071
4115
  const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
4072
4116
  if (i2 > -1) {
4073
4117
  deferredConnectedCallbacks.splice(i2, 1);
@@ -4078,7 +4122,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
4078
4122
  });
4079
4123
  }
4080
4124
  componentOnReady() {
4081
- return getHostRef(this).$onReadyPromise$;
4125
+ var _a3;
4126
+ return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
4082
4127
  }
4083
4128
  };
4084
4129
  if (BUILD28.experimentalSlotFixes) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/client",
3
- "version": "4.35.3-dev.1752210255.bfbd683",
3
+ "version": "4.35.3-dev.1752469555.051522f",
4
4
  "description": "Stencil internal client platform to be imported by the Stencil Compiler and internal runtime. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "exports": "./index.js",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Patch Browser v4.35.3-dev.1752210255.bfbd683 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Patch Browser v4.35.3-dev.1752469555.051522f | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
 
5
5
  // src/client/client-patch-browser.ts
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Hydrate Platform v4.35.3-dev.1752210255.bfbd683 | MIT Licensed | https://stenciljs.com
2
+ Stencil Hydrate Platform v4.35.3-dev.1752469555.051522f | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -1197,7 +1197,7 @@ var validateInputProperties = (inputElm) => {
1197
1197
 
1198
1198
  // src/runtime/client-hydrate.ts
1199
1199
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1200
- var _a, _b;
1200
+ var _a, _b, _c;
1201
1201
  const endHydrate = createTime("hydrateClient", tagName);
1202
1202
  const shadowRoot = hostElm.shadowRoot;
1203
1203
  const childRenderNodes = [];
@@ -1261,15 +1261,17 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1261
1261
  if (childRenderNode.$tag$ === "slot") {
1262
1262
  node["s-cr"] = hostElm["s-cr"];
1263
1263
  }
1264
- } else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && !childRenderNode.$elm$.shadowRoot) {
1264
+ } else if (((_b = childRenderNode.$tag$) == null ? void 0 : _b.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
1265
1265
  const cmpMeta = getHostRef(childRenderNode.$elm$);
1266
- const scopeId3 = getScopeId(
1267
- cmpMeta.$cmpMeta$,
1268
- BUILD8.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
1269
- );
1270
- const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
1271
- if (styleSheet) {
1272
- hostElm.shadowRoot.append(styleSheet.cloneNode(true));
1266
+ if (cmpMeta) {
1267
+ const scopeId3 = getScopeId(
1268
+ cmpMeta.$cmpMeta$,
1269
+ BUILD8.mode ? childRenderNode.$elm$.getAttribute("s-mode") : void 0
1270
+ );
1271
+ const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
1272
+ if (styleSheet) {
1273
+ hostElm.shadowRoot.append(styleSheet.cloneNode(true));
1274
+ }
1273
1275
  }
1274
1276
  }
1275
1277
  if (childRenderNode.$tag$ === "slot") {
@@ -1317,6 +1319,9 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1317
1319
  }
1318
1320
  if (!hosts[slottedItem.hostId]) continue;
1319
1321
  const hostEle = hosts[slottedItem.hostId];
1322
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1323
+ hostEle.appendChild(slottedItem.node);
1324
+ }
1320
1325
  if (!hostEle.shadowRoot || !shadowRoot) {
1321
1326
  if (!slottedItem.slot["s-cr"]) {
1322
1327
  slottedItem.slot["s-cr"] = hostEle["s-cr"];
@@ -1327,13 +1332,13 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1327
1332
  }
1328
1333
  }
1329
1334
  addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1335
+ if (((_c = slottedItem.node.parentElement) == null ? void 0 : _c.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
1336
+ slottedItem.node.removeAttribute("slot");
1337
+ }
1330
1338
  if (BUILD8.experimentalSlotFixes) {
1331
1339
  patchSlottedNode(slottedItem.node);
1332
1340
  }
1333
1341
  }
1334
- if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1335
- hostEle.appendChild(slottedItem.node);
1336
- }
1337
1342
  }
1338
1343
  }
1339
1344
  if (BUILD8.scoped && scopeId2 && slotNodes.length) {
@@ -1605,13 +1610,17 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1605
1610
  parentVNode.$children$[childVNode.$index$] = childVNode;
1606
1611
  }
1607
1612
  var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1613
+ var _a, _b;
1608
1614
  let slottedNode = slotNode.nextSibling;
1609
1615
  slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1610
- 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"))) {
1611
- slottedNode["s-sn"] = slotName;
1612
- slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1613
- slottedNode = slottedNode.nextSibling;
1614
- }
1616
+ if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
1617
+ do {
1618
+ if (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (!slottedNode["getAttribute"] || !slottedNode.getAttribute("slot")) && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */))) {
1619
+ slottedNode["s-sn"] = slotName;
1620
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1621
+ }
1622
+ slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
1623
+ } while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
1615
1624
  };
1616
1625
  var findCorrespondingNode = (node, type) => {
1617
1626
  let sibling = node;
@@ -2033,7 +2042,10 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
2033
2042
  // src/runtime/mode.ts
2034
2043
  var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
2035
2044
  var setMode = (handler) => modeResolutionChain.push(handler);
2036
- var getMode = (ref) => getHostRef(ref).$modeName$;
2045
+ var getMode = (ref) => {
2046
+ var _a;
2047
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$modeName$;
2048
+ };
2037
2049
 
2038
2050
  // src/runtime/proxy-component.ts
2039
2051
  import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
@@ -2082,7 +2094,10 @@ import { BUILD as BUILD11 } from "@stencil/core/internal/app-data";
2082
2094
 
2083
2095
  // src/runtime/element.ts
2084
2096
  import { BUILD as BUILD10 } from "@stencil/core/internal/app-data";
2085
- var getElement = (ref) => BUILD10.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2097
+ var getElement = (ref) => {
2098
+ var _a;
2099
+ return BUILD10.lazyLoad ? (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ : ref;
2100
+ };
2086
2101
 
2087
2102
  // src/runtime/event-emitter.ts
2088
2103
  var createEvent = (ref, name, flags) => {
@@ -2882,6 +2897,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
2882
2897
  }
2883
2898
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
2884
2899
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
2900
+ if (isInitialLoad) {
2901
+ queueMicrotask(() => {
2902
+ dispatch();
2903
+ });
2904
+ return;
2905
+ }
2885
2906
  return BUILD15.taskQueue ? writeTask(dispatch) : dispatch();
2886
2907
  };
2887
2908
  var dispatchHooks = (hostRef, isInitialLoad) => {
@@ -3071,9 +3092,10 @@ var postUpdateComponent = (hostRef) => {
3071
3092
  }
3072
3093
  };
3073
3094
  var forceUpdate = (ref) => {
3095
+ var _a;
3074
3096
  if (BUILD15.updatable && (Build.isBrowser || Build.isTesting)) {
3075
3097
  const hostRef = getHostRef(ref);
3076
- const isConnected = hostRef.$hostElement$.isConnected;
3098
+ const isConnected = (_a = hostRef == null ? void 0 : hostRef.$hostElement$) == null ? void 0 : _a.isConnected;
3077
3099
  if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
3078
3100
  scheduleUpdate(hostRef, false);
3079
3101
  }
@@ -3138,6 +3160,9 @@ var serverSideConnected = (elm) => {
3138
3160
  var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
3139
3161
  var setValue = (ref, propName, newVal, cmpMeta) => {
3140
3162
  const hostRef = getHostRef(ref);
3163
+ if (!hostRef) {
3164
+ return;
3165
+ }
3141
3166
  if (BUILD16.lazyLoad && !hostRef) {
3142
3167
  throw new Error(
3143
3168
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
@@ -3219,10 +3244,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
3219
3244
  const originalFormAssociatedCallback = prototype[cbName];
3220
3245
  Object.defineProperty(prototype, cbName, {
3221
3246
  value(...args) {
3247
+ var _a2;
3222
3248
  const hostRef = getHostRef(this);
3223
- const instance = BUILD17.lazyLoad ? hostRef.$lazyInstance$ : this;
3249
+ const instance = BUILD17.lazyLoad ? hostRef == null ? void 0 : hostRef.$lazyInstance$ : this;
3224
3250
  if (!instance) {
3225
- hostRef.$onReadyPromise$.then((asyncInstance) => {
3251
+ (_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
3226
3252
  const cb = asyncInstance[cbName];
3227
3253
  typeof cb === "function" && cb.call(asyncInstance, ...args);
3228
3254
  });
@@ -3267,6 +3293,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
3267
3293
  Object.defineProperty(prototype, memberName, {
3268
3294
  set(newValue) {
3269
3295
  const ref = getHostRef(this);
3296
+ if (!ref) {
3297
+ return;
3298
+ }
3270
3299
  if (BUILD17.isDev) {
3271
3300
  if (
3272
3301
  // we are proxying the instance (not element)
@@ -3364,7 +3393,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
3364
3393
  } else if (propName == null) {
3365
3394
  const hostRef = getHostRef(this);
3366
3395
  const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
3367
- if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
3396
+ if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
3368
3397
  const elm = BUILD17.lazyLoad ? hostRef.$hostElement$ : this;
3369
3398
  const instance = BUILD17.lazyLoad ? hostRef.$lazyInstance$ : elm;
3370
3399
  const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
@@ -3498,6 +3527,9 @@ var fireConnectedCallback = (instance, elm) => {
3498
3527
  var connectedCallback = (elm) => {
3499
3528
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
3500
3529
  const hostRef = getHostRef(elm);
3530
+ if (!hostRef) {
3531
+ return;
3532
+ }
3501
3533
  const cmpMeta = hostRef.$cmpMeta$;
3502
3534
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
3503
3535
  if (BUILD19.hostListenerTargetParent) {
@@ -3586,7 +3618,7 @@ var disconnectedCallback = async (elm) => {
3586
3618
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
3587
3619
  const hostRef = getHostRef(elm);
3588
3620
  if (BUILD20.hostListener) {
3589
- if (hostRef.$rmListeners$) {
3621
+ if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
3590
3622
  hostRef.$rmListeners$.map((rmListener) => rmListener());
3591
3623
  hostRef.$rmListeners$ = void 0;
3592
3624
  }
@@ -3662,6 +3694,9 @@ var proxyCustomElement = (Cstr, compactMeta) => {
3662
3694
  connectedCallback() {
3663
3695
  if (!this.__hasHostListenerAttached) {
3664
3696
  const hostRef = getHostRef(this);
3697
+ if (!hostRef) {
3698
+ return;
3699
+ }
3665
3700
  addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
3666
3701
  this.__hasHostListenerAttached = true;
3667
3702
  }
@@ -3699,7 +3734,7 @@ var forceModeUpdate = (elm) => {
3699
3734
  if (BUILD21.style && BUILD21.mode && !BUILD21.lazyLoad) {
3700
3735
  const mode = computeMode(elm);
3701
3736
  const hostRef = getHostRef(elm);
3702
- if (hostRef.$modeName$ !== mode) {
3737
+ if (hostRef && hostRef.$modeName$ !== mode) {
3703
3738
  const cmpMeta = hostRef.$cmpMeta$;
3704
3739
  const oldScopeId = elm["s-sc"];
3705
3740
  const scopeId2 = getScopeId(cmpMeta, mode);
@@ -3724,6 +3759,9 @@ import { BUILD as BUILD22 } from "@stencil/core/internal/app-data";
3724
3759
  // src/runtime/hmr-component.ts
3725
3760
  var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
3726
3761
  const hostRef = getHostRef(hostElement);
3762
+ if (!hostRef) {
3763
+ return;
3764
+ }
3727
3765
  hostRef.$flags$ = 1 /* hasConnected */;
3728
3766
  initializeComponent(hostElement, hostRef, cmpMeta, hmrVersionId);
3729
3767
  };
@@ -3816,6 +3854,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3816
3854
  }
3817
3855
  connectedCallback() {
3818
3856
  const hostRef = getHostRef(this);
3857
+ if (!hostRef) {
3858
+ return;
3859
+ }
3819
3860
  if (!this.hasRegisteredEventListeners) {
3820
3861
  this.hasRegisteredEventListeners = true;
3821
3862
  addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
@@ -3835,6 +3876,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3835
3876
  plt.raf(() => {
3836
3877
  var _a3;
3837
3878
  const hostRef = getHostRef(this);
3879
+ if (!hostRef) {
3880
+ return;
3881
+ }
3838
3882
  const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
3839
3883
  if (i2 > -1) {
3840
3884
  deferredConnectedCallbacks.splice(i2, 1);
@@ -3845,7 +3889,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3845
3889
  });
3846
3890
  }
3847
3891
  componentOnReady() {
3848
- return getHostRef(this).$onReadyPromise$;
3892
+ var _a3;
3893
+ return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
3849
3894
  }
3850
3895
  };
3851
3896
  if (BUILD22.experimentalSlotFixes) {
@@ -4194,7 +4239,7 @@ function proxyHostElement(elm, cstr) {
4194
4239
  get: function() {
4195
4240
  var _a2;
4196
4241
  const ref = getHostRef(this);
4197
- const attrPropVal2 = (_a2 = ref.$instanceValues$) == null ? void 0 : _a2.get(memberName);
4242
+ const attrPropVal2 = (_a2 = ref == null ? void 0 : ref.$instanceValues$) == null ? void 0 : _a2.get(memberName);
4198
4243
  if (origGetter && attrPropVal2 === void 0 && !getValue(this, memberName)) {
4199
4244
  setValue(this, memberName, origGetter.apply(this), cmpMeta);
4200
4245
  }
@@ -4355,13 +4400,16 @@ async function hydrateComponent(win2, results, tagName, elm, waitingElements) {
4355
4400
  if (cmpMeta != null) {
4356
4401
  waitingElements.add(elm);
4357
4402
  const hostRef = getHostRef(this);
4403
+ if (!hostRef) {
4404
+ return;
4405
+ }
4358
4406
  addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
4359
4407
  try {
4360
4408
  connectedCallback(elm);
4361
4409
  await elm.componentOnReady();
4362
4410
  results.hydratedCount++;
4363
4411
  const ref = getHostRef(elm);
4364
- const modeName = !ref.$modeName$ ? "$" : ref.$modeName$;
4412
+ const modeName = !(ref == null ? void 0 : ref.$modeName$) ? "$" : ref == null ? void 0 : ref.$modeName$;
4365
4413
  if (!results.components.some((c) => c.tag === tagName && c.mode === modeName)) {
4366
4414
  results.components.push({
4367
4415
  tag: tagName,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal/hydrate",
3
- "version": "4.35.3-dev.1752210255.bfbd683",
3
+ "version": "4.35.3-dev.1752469555.051522f",
4
4
  "description": "Stencil internal hydrate 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
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Hydrate Runner v4.35.3-dev.1752210255.bfbd683 | MIT Licensed | https://stenciljs.com
2
+ Stencil Hydrate Runner v4.35.3-dev.1752469555.051522f | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "4.35.3-dev.1752210255.bfbd683",
3
+ "version": "4.35.3-dev.1752469555.051522f",
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",