@everymatrix/casino-game-thumb-view 1.55.0 → 1.56.0

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.
Files changed (50) hide show
  1. package/dist/casino-game-thumb-view/casino-game-thumb-view.esm.js +1 -1
  2. package/dist/casino-game-thumb-view/p-13741d4d.js +2 -0
  3. package/dist/casino-game-thumb-view/p-53ba085b.entry.js +1 -0
  4. package/dist/casino-game-thumb-view/{p-c9da4e8b.entry.js → p-600af885.entry.js} +1 -1
  5. package/dist/casino-game-thumb-view/p-b13b5c25.entry.js +1 -0
  6. package/dist/casino-game-thumb-view/p-c6ee2783.entry.js +1 -0
  7. package/dist/casino-game-thumb-view/p-dd797f50.entry.js +7 -0
  8. package/dist/casino-game-thumb-view/p-ee2bdcce.entry.js +1 -0
  9. package/dist/cjs/casino-extrainfo-baccarat.cjs.entry.js +1 -5
  10. package/dist/cjs/casino-extrainfo-blackjack.cjs.entry.js +1 -6
  11. package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +4 -4
  12. package/dist/cjs/casino-game-thumb-view.cjs.js +2 -2
  13. package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +51 -40
  14. package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +2 -7
  15. package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +1 -2
  16. package/dist/cjs/{index-0892a7c6.js → index-b36c6933.js} +255 -145
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/collection/collection-manifest.json +1 -1
  19. package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js +4 -4
  20. package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js +2 -7
  21. package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +5 -3
  22. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +99 -33
  23. package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js +5 -3
  24. package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +3 -4
  25. package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +27 -6
  26. package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +2 -3
  27. package/dist/esm/casino-extrainfo-baccarat.entry.js +1 -5
  28. package/dist/esm/casino-extrainfo-blackjack.entry.js +1 -6
  29. package/dist/esm/casino-extrainfo-roulette.entry.js +4 -4
  30. package/dist/esm/casino-game-thumb-view.js +3 -3
  31. package/dist/esm/casino-game-thumb-view_2.entry.js +51 -40
  32. package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +2 -7
  33. package/dist/esm/casino-normal-game-thumbnail.entry.js +1 -2
  34. package/dist/esm/{index-bbccad17.js → index-23b4a4c5.js} +255 -145
  35. package/dist/esm/loader.js +2 -2
  36. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +2 -0
  37. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.dev.d.ts +2 -0
  38. package/package.json +1 -1
  39. package/dist/casino-game-thumb-view/p-3ac1ceb2.entry.js +0 -7
  40. package/dist/casino-game-thumb-view/p-6f25852e.entry.js +0 -1
  41. package/dist/casino-game-thumb-view/p-89d09251.js +0 -2
  42. package/dist/casino-game-thumb-view/p-c7ae1205.entry.js +0 -1
  43. package/dist/casino-game-thumb-view/p-cbb0566f.entry.js +0 -1
  44. package/dist/casino-game-thumb-view/p-cfd13ff8.entry.js +0 -1
  45. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +0 -2
  46. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.dev.d.ts +0 -2
  47. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/index.d.ts +0 -0
  48. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  49. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  50. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,17 +1,25 @@
1
1
  const NAMESPACE = 'casino-game-thumb-view';
2
- const BUILD = /* casino-game-thumb-view */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
2
+ const BUILD = /* casino-game-thumb-view */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
9
9
  for (var name in all)
10
10
  __defProp(target, name, { get: all[name], enumerable: true });
11
11
  };
12
+
13
+ // src/utils/constants.ts
14
+ var SVG_NS = "http://www.w3.org/2000/svg";
15
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
16
+
17
+ // src/client/client-host-ref.ts
12
18
  var hostRefs = /* @__PURE__ */ new WeakMap();
13
19
  var getHostRef = (ref) => hostRefs.get(ref);
14
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
20
+ var registerInstance = (lazyInstance, hostRef) => {
21
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
22
+ };
15
23
  var registerHost = (hostElement, cmpMeta) => {
16
24
  const hostRef = {
17
25
  $flags$: 0,
@@ -27,7 +35,8 @@ var registerHost = (hostElement, cmpMeta) => {
27
35
  hostElement["s-p"] = [];
28
36
  hostElement["s-rc"] = [];
29
37
  }
30
- return hostRefs.set(hostElement, hostRef);
38
+ const ref = hostRefs.set(hostElement, hostRef);
39
+ return ref;
31
40
  };
32
41
  var isMemberInElement = (elm, memberName) => memberName in elm;
33
42
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -84,16 +93,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
84
93
  /* webpackExclude: /\.system\.entry\.js$/ */
85
94
  /* webpackMode: "lazy" */
86
95
  `./${bundleId}.entry.js${""}`
87
- ).then((importedModule) => {
88
- {
89
- cmpModules.set(bundleId, importedModule);
96
+ ).then(
97
+ (importedModule) => {
98
+ {
99
+ cmpModules.set(bundleId, importedModule);
100
+ }
101
+ return importedModule[exportName];
102
+ },
103
+ (e) => {
104
+ consoleError(e, hostRef.$hostElement$);
90
105
  }
91
- return importedModule[exportName];
92
- }, consoleError);
106
+ );
93
107
  };
94
108
 
95
109
  // src/client/client-style.ts
96
110
  var styles = /* @__PURE__ */ new Map();
111
+ var HYDRATED_STYLE_ID = "sty-id";
97
112
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
98
113
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
99
114
  var XLINK_NS = "http://www.w3.org/1999/xlink";
@@ -168,14 +183,6 @@ var flush = () => {
168
183
  };
169
184
  var nextTick = (cb) => promiseResolve().then(cb);
170
185
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
171
-
172
- // src/utils/constants.ts
173
- var EMPTY_OBJ = {};
174
- var SVG_NS = "http://www.w3.org/2000/svg";
175
- var HTML_NS = "http://www.w3.org/1999/xhtml";
176
-
177
- // src/utils/helpers.ts
178
- var isDef = (v) => v != null;
179
186
  var isComplexType = (o) => {
180
187
  o = typeof o;
181
188
  return o === "object" || o === "function";
@@ -235,6 +242,63 @@ var unwrapErr = (result) => {
235
242
  throw result.value;
236
243
  }
237
244
  };
245
+ var updateFallbackSlotVisibility = (elm) => {
246
+ const childNodes = elm.__childNodes || elm.childNodes;
247
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
248
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
249
+ var _a;
250
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
251
+ if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
252
+ slotNode.hidden = true;
253
+ } else {
254
+ slotNode.hidden = false;
255
+ }
256
+ }
257
+ });
258
+ }
259
+ for (const childNode of childNodes) {
260
+ if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
261
+ updateFallbackSlotVisibility(childNode);
262
+ }
263
+ }
264
+ };
265
+ function getHostSlotNodes(childNodes, hostName, slotName) {
266
+ let i2 = 0;
267
+ let slottedNodes = [];
268
+ let childNode;
269
+ for (; i2 < childNodes.length; i2++) {
270
+ childNode = childNodes[i2];
271
+ if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
272
+ slottedNodes.push(childNode);
273
+ if (typeof slotName !== "undefined") return slottedNodes;
274
+ }
275
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
276
+ }
277
+ return slottedNodes;
278
+ }
279
+ var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
280
+ const childNodes = [];
281
+ if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
282
+ while ((node = node.nextSibling) && node["s-sn"] === slotName) {
283
+ childNodes.push(node);
284
+ }
285
+ return childNodes;
286
+ };
287
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
288
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
289
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
290
+ return true;
291
+ }
292
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
293
+ return true;
294
+ }
295
+ return false;
296
+ }
297
+ if (nodeToRelocate["s-sn"] === slotName) {
298
+ return true;
299
+ }
300
+ return slotName === "";
301
+ };
238
302
  var createTime = (fnName, tagName = "") => {
239
303
  {
240
304
  return () => {
@@ -426,7 +490,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
426
490
  }
427
491
  if (!appliedStyles.has(scopeId2)) {
428
492
  {
429
- styleElm = doc.createElement("style");
493
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
430
494
  styleElm.innerHTML = style;
431
495
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
432
496
  if (nonce != null) {
@@ -436,7 +500,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
436
500
  if (styleContainerNode.nodeName === "HEAD") {
437
501
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
438
502
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
439
- styleContainerNode.insertBefore(styleElm, referenceNode2);
503
+ styleContainerNode.insertBefore(
504
+ styleElm,
505
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
506
+ );
440
507
  } else if ("host" in styleContainerNode) {
441
508
  if (supportsConstructableStylesheets) {
442
509
  const stylesheet = new CSSStyleSheet();
@@ -454,7 +521,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
454
521
  styleContainerNode.append(styleElm);
455
522
  }
456
523
  }
457
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
524
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
458
525
  styleContainerNode.insertBefore(styleElm, null);
459
526
  }
460
527
  }
@@ -479,23 +546,25 @@ var attachStyles = (hostRef) => {
479
546
  const scopeId2 = addStyle(
480
547
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
481
548
  cmpMeta);
482
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
549
+ if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
483
550
  elm["s-sc"] = scopeId2;
484
551
  elm.classList.add(scopeId2 + "-h");
485
552
  }
486
553
  endAttachStyles();
487
554
  };
488
555
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
489
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
556
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
490
557
  if (oldValue !== newValue) {
491
558
  let isProp = isMemberInElement(elm, memberName);
492
559
  let ln = memberName.toLowerCase();
493
560
  if (memberName === "class") {
494
561
  const classList = elm.classList;
495
562
  const oldClasses = parseClassList(oldValue);
496
- const newClasses = parseClassList(newValue);
497
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
498
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
563
+ let newClasses = parseClassList(newValue);
564
+ {
565
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
566
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
567
+ }
499
568
  } else if (memberName === "style") {
500
569
  {
501
570
  for (const prop in oldValue) {
@@ -554,7 +623,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
554
623
  elm.setAttribute(memberName, n);
555
624
  }
556
625
  }
557
- } else {
626
+ } else if (elm[memberName] !== newValue) {
558
627
  elm[memberName] = newValue;
559
628
  }
560
629
  } catch (e) {
@@ -587,24 +656,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
587
656
  }
588
657
  };
589
658
  var parseClassListRegex = /\s/;
590
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
659
+ var parseClassList = (value) => {
660
+ if (typeof value === "object" && value && "baseVal" in value) {
661
+ value = value.baseVal;
662
+ }
663
+ if (!value || typeof value !== "string") {
664
+ return [];
665
+ }
666
+ return value.split(parseClassListRegex);
667
+ };
591
668
  var CAPTURE_EVENT_SUFFIX = "Capture";
592
669
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
593
670
 
594
671
  // src/runtime/vdom/update-element.ts
595
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
672
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
596
673
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
597
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
598
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
674
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
675
+ const newVnodeAttrs = newVnode.$attrs$ || {};
599
676
  {
600
677
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
601
678
  if (!(memberName in newVnodeAttrs)) {
602
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
679
+ setAccessor(
680
+ elm,
681
+ memberName,
682
+ oldVnodeAttrs[memberName],
683
+ void 0,
684
+ isSvgMode2,
685
+ newVnode.$flags$);
603
686
  }
604
687
  }
605
688
  }
606
689
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
607
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
690
+ setAccessor(
691
+ elm,
692
+ memberName,
693
+ oldVnodeAttrs[memberName],
694
+ newVnodeAttrs[memberName],
695
+ isSvgMode2,
696
+ newVnode.$flags$);
608
697
  }
609
698
  };
610
699
  function sortedAttrNames(attrNames) {
@@ -616,16 +705,13 @@ function sortedAttrNames(attrNames) {
616
705
  attrNames
617
706
  );
618
707
  }
619
-
620
- // src/runtime/vdom/vdom-render.ts
621
- var scopeId;
622
708
  var contentRef;
623
709
  var hostTagName;
624
710
  var useNativeShadowDom = false;
625
711
  var checkSlotFallbackVisibility = false;
626
712
  var checkSlotRelocate = false;
627
713
  var isSvgMode = false;
628
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
714
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
629
715
  var _a;
630
716
  const newVNode2 = newParentVNode.$children$[childIndex];
631
717
  let i2 = 0;
@@ -635,9 +721,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
635
721
  if (!useNativeShadowDom) {
636
722
  checkSlotRelocate = true;
637
723
  if (newVNode2.$tag$ === "slot") {
638
- if (scopeId) {
639
- parentElm.classList.add(scopeId + "-s");
640
- }
641
724
  newVNode2.$flags$ |= newVNode2.$children$ ? (
642
725
  // slot element has fallback content
643
726
  // still create an element that "mocks" the slot element
@@ -668,14 +751,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
668
751
  {
669
752
  updateElement(null, newVNode2, isSvgMode);
670
753
  }
671
- const rootNode = elm.getRootNode();
672
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
673
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
674
- elm.classList.add(elm["s-si"] = scopeId);
675
- }
676
754
  if (newVNode2.$children$) {
677
755
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
678
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
756
+ childNode = createElm(oldParentVNode, newVNode2, i2);
679
757
  if (childNode) {
680
758
  elm.appendChild(childNode);
681
759
  }
@@ -708,7 +786,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
708
786
  };
709
787
  var putBackInOriginalLocation = (parentElm, recursive) => {
710
788
  plt.$flags$ |= 1 /* isTmpDisconnected */;
711
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
789
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
712
790
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
713
791
  let node = parentElm;
714
792
  while (node = node.nextSibling) {
@@ -720,7 +798,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
720
798
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
721
799
  const childNode = oldSlotChildNodes[i2];
722
800
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
723
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
801
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
724
802
  childNode["s-ol"].remove();
725
803
  childNode["s-ol"] = void 0;
726
804
  childNode["s-sh"] = void 0;
@@ -740,7 +818,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
740
818
  }
741
819
  for (; startIdx <= endIdx; ++startIdx) {
742
820
  if (vnodes[startIdx]) {
743
- childNode = createElm(null, parentVNode, startIdx, parentElm);
821
+ childNode = createElm(null, parentVNode, startIdx);
744
822
  if (childNode) {
745
823
  vnodes[startIdx].$elm$ = childNode;
746
824
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -827,7 +905,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
827
905
  if (idxInOld >= 0) {
828
906
  elmToMove = oldCh[idxInOld];
829
907
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
830
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
908
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
831
909
  } else {
832
910
  patch(elmToMove, newStartVnode, isInitialRender);
833
911
  oldCh[idxInOld] = void 0;
@@ -835,12 +913,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
835
913
  }
836
914
  newStartVnode = newCh[++newStartIdx];
837
915
  } else {
838
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
916
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
839
917
  newStartVnode = newCh[++newStartIdx];
840
918
  }
841
919
  if (node) {
842
920
  {
843
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
921
+ insertBefore(
922
+ referenceNode(oldStartVnode.$elm$).parentNode,
923
+ node,
924
+ referenceNode(oldStartVnode.$elm$)
925
+ );
844
926
  }
845
927
  }
846
928
  }
@@ -861,28 +943,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
861
943
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
862
944
  if (leftVNode.$tag$ === rightVNode.$tag$) {
863
945
  if (leftVNode.$tag$ === "slot") {
864
- if (
865
- // The component gets hydrated and no VDOM has been initialized.
866
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
867
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
868
- // hydration comments to be removed
869
- leftVNode.$elm$.nodeType !== 8
870
- ) {
871
- return false;
872
- }
873
946
  return leftVNode.$name$ === rightVNode.$name$;
874
947
  }
875
948
  if (!isInitialRender) {
876
949
  return leftVNode.$key$ === rightVNode.$key$;
877
950
  }
951
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
952
+ leftVNode.$key$ = rightVNode.$key$;
953
+ }
878
954
  return true;
879
955
  }
880
956
  return false;
881
957
  };
882
- var referenceNode = (node) => {
883
- return node && node["s-ol"] || node;
884
- };
885
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
958
+ var referenceNode = (node) => node && node["s-ol"] || node;
886
959
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
887
960
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
888
961
  const oldChildren = oldVNode.$children$;
@@ -921,41 +994,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
921
994
  elm.data = text;
922
995
  }
923
996
  };
924
- var updateFallbackSlotVisibility = (elm) => {
925
- const childNodes = elm.childNodes;
926
- for (const childNode of childNodes) {
927
- if (childNode.nodeType === 1 /* ElementNode */) {
928
- if (childNode["s-sr"]) {
929
- const slotName = childNode["s-sn"];
930
- childNode.hidden = false;
931
- for (const siblingNode of childNodes) {
932
- if (siblingNode !== childNode) {
933
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
934
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
935
- childNode.hidden = true;
936
- break;
937
- }
938
- } else {
939
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
940
- childNode.hidden = true;
941
- break;
942
- }
943
- }
944
- }
945
- }
946
- }
947
- updateFallbackSlotVisibility(childNode);
948
- }
949
- }
950
- };
951
997
  var relocateNodes = [];
952
998
  var markSlotContentForRelocation = (elm) => {
953
999
  let node;
954
1000
  let hostContentNodes;
955
1001
  let j;
956
- for (const childNode of elm.childNodes) {
1002
+ const children = elm.__childNodes || elm.childNodes;
1003
+ for (const childNode of children) {
957
1004
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
958
- hostContentNodes = node.parentNode.childNodes;
1005
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
959
1006
  const slotName = childNode["s-sn"];
960
1007
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
961
1008
  node = hostContentNodes[j];
@@ -997,21 +1044,6 @@ var markSlotContentForRelocation = (elm) => {
997
1044
  }
998
1045
  }
999
1046
  };
1000
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1001
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1002
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1003
- return true;
1004
- }
1005
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1006
- return true;
1007
- }
1008
- return false;
1009
- }
1010
- if (nodeToRelocate["s-sn"] === slotName) {
1011
- return true;
1012
- }
1013
- return slotName === "";
1014
- };
1015
1047
  var nullifyVNodeRefs = (vNode) => {
1016
1048
  {
1017
1049
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -1019,8 +1051,9 @@ var nullifyVNodeRefs = (vNode) => {
1019
1051
  }
1020
1052
  };
1021
1053
  var insertBefore = (parent, newNode, reference) => {
1022
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1023
- return inserted;
1054
+ {
1055
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1056
+ }
1024
1057
  };
1025
1058
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1026
1059
  var _a, _b, _c, _d;
@@ -1040,10 +1073,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1040
1073
  rootVnode.$flags$ |= 4 /* isHost */;
1041
1074
  hostRef.$vnode$ = rootVnode;
1042
1075
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
1043
- {
1044
- scopeId = hostElm["s-sc"];
1045
- }
1046
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
1076
+ useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
1047
1077
  {
1048
1078
  contentRef = hostElm["s-cr"];
1049
1079
  checkSlotFallbackVisibility = false;
@@ -1071,7 +1101,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1071
1101
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1072
1102
  while (orgLocationNode) {
1073
1103
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1074
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
1104
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1075
1105
  refNode = refNode.nextSibling;
1076
1106
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1077
1107
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -1084,13 +1114,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1084
1114
  orgLocationNode = orgLocationNode.previousSibling;
1085
1115
  }
1086
1116
  }
1087
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1117
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
1118
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
1119
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1088
1120
  if (nodeToRelocate !== insertBeforeNode) {
1089
1121
  if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1090
1122
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1091
1123
  }
1092
1124
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1093
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1125
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1094
1126
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1095
1127
  }
1096
1128
  }
@@ -1118,7 +1150,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1118
1150
  // src/runtime/update-component.ts
1119
1151
  var attachToAncestor = (hostRef, ancestorComponent) => {
1120
1152
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1121
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
1153
+ const index = ancestorComponent["s-p"].push(
1154
+ new Promise(
1155
+ (r) => hostRef.$onRenderResolve$ = () => {
1156
+ ancestorComponent["s-p"].splice(index - 1, 1);
1157
+ r();
1158
+ }
1159
+ )
1160
+ );
1122
1161
  }
1123
1162
  };
1124
1163
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1147,16 +1186,16 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1147
1186
  {
1148
1187
  hostRef.$flags$ |= 256 /* isListenReady */;
1149
1188
  if (hostRef.$queuedListeners$) {
1150
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1189
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1151
1190
  hostRef.$queuedListeners$ = void 0;
1152
1191
  }
1153
1192
  }
1154
1193
  {
1155
- maybePromise = safeCall(instance, "componentWillLoad");
1194
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1156
1195
  }
1157
1196
  }
1158
1197
  {
1159
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
1198
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1160
1199
  }
1161
1200
  endSchedule();
1162
1201
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
@@ -1224,7 +1263,7 @@ var postUpdateComponent = (hostRef) => {
1224
1263
  const instance = hostRef.$lazyInstance$ ;
1225
1264
  const ancestorComponent = hostRef.$ancestorComponent$;
1226
1265
  {
1227
- safeCall(instance, "componentDidRender");
1266
+ safeCall(instance, "componentDidRender", void 0, elm);
1228
1267
  }
1229
1268
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1230
1269
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -1232,7 +1271,7 @@ var postUpdateComponent = (hostRef) => {
1232
1271
  addHydratedFlag(elm);
1233
1272
  }
1234
1273
  {
1235
- safeCall(instance, "componentDidLoad");
1274
+ safeCall(instance, "componentDidLoad", void 0, elm);
1236
1275
  }
1237
1276
  endPostUpdate();
1238
1277
  {
@@ -1259,17 +1298,14 @@ var postUpdateComponent = (hostRef) => {
1259
1298
  }
1260
1299
  };
1261
1300
  var appDidLoad = (who) => {
1262
- {
1263
- addHydratedFlag(doc.documentElement);
1264
- }
1265
1301
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1266
1302
  };
1267
- var safeCall = (instance, method, arg) => {
1303
+ var safeCall = (instance, method, arg, elm) => {
1268
1304
  if (instance && instance[method]) {
1269
1305
  try {
1270
1306
  return instance[method](arg);
1271
1307
  } catch (e) {
1272
- consoleError(e);
1308
+ consoleError(e, elm);
1273
1309
  }
1274
1310
  }
1275
1311
  return void 0;
@@ -1328,15 +1364,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1328
1364
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1329
1365
  members.map(([memberName, [memberFlags]]) => {
1330
1366
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1367
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1368
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1369
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1370
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
1371
+ Object.defineProperty(prototype, memberName, {
1372
+ get() {
1373
+ {
1374
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1375
+ return getValue(this, memberName);
1376
+ }
1377
+ const ref = getHostRef(this);
1378
+ const instance = ref ? ref.$lazyInstance$ : prototype;
1379
+ if (!instance) return;
1380
+ return instance[memberName];
1381
+ }
1382
+ },
1383
+ configurable: true,
1384
+ enumerable: true
1385
+ });
1386
+ }
1331
1387
  Object.defineProperty(prototype, memberName, {
1332
- get() {
1333
- return getValue(this, memberName);
1334
- },
1335
1388
  set(newValue) {
1336
- setValue(this, memberName, newValue, cmpMeta);
1337
- },
1338
- configurable: true,
1339
- enumerable: true
1389
+ const ref = getHostRef(this);
1390
+ if (origSetter) {
1391
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1392
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1393
+ newValue = ref.$instanceValues$.get(memberName);
1394
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1395
+ ref.$instanceValues$.set(memberName, currentValue);
1396
+ }
1397
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1398
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1399
+ setValue(this, memberName, newValue, cmpMeta);
1400
+ return;
1401
+ }
1402
+ {
1403
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1404
+ setValue(this, memberName, newValue, cmpMeta);
1405
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1406
+ ref.$onReadyPromise$.then(() => {
1407
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1408
+ ref.$lazyInstance$[memberName] = newValue;
1409
+ }
1410
+ });
1411
+ }
1412
+ return;
1413
+ }
1414
+ const setterSetVal = () => {
1415
+ const currentValue = ref.$lazyInstance$[memberName];
1416
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1417
+ ref.$instanceValues$.set(memberName, currentValue);
1418
+ }
1419
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1420
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1421
+ };
1422
+ if (ref.$lazyInstance$) {
1423
+ setterSetVal();
1424
+ } else {
1425
+ ref.$onReadyPromise$.then(() => setterSetVal());
1426
+ }
1427
+ }
1428
+ }
1340
1429
  });
1341
1430
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1342
1431
  Object.defineProperty(prototype, memberName, {
@@ -1357,7 +1446,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1357
1446
  plt.jmp(() => {
1358
1447
  var _a2;
1359
1448
  const propName = attrNameToPropName.get(attrName);
1360
- if (this.hasOwnProperty(propName)) {
1449
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1361
1450
  newValue = this[propName];
1362
1451
  delete this[propName];
1363
1452
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1377,7 +1466,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1377
1466
  }
1378
1467
  return;
1379
1468
  }
1380
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1469
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1470
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1471
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1472
+ this[propName] = newValue;
1473
+ }
1381
1474
  });
1382
1475
  };
1383
1476
  Cstr.observedAttributes = Array.from(
@@ -1402,7 +1495,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1402
1495
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1403
1496
  const bundleId = cmpMeta.$lazyBundleId$;
1404
1497
  if (bundleId) {
1405
- const CstrImport = loadModule(cmpMeta);
1498
+ const CstrImport = loadModule(cmpMeta, hostRef);
1406
1499
  if (CstrImport && "then" in CstrImport) {
1407
1500
  const endLoad = uniqueTime();
1408
1501
  Cstr = await CstrImport;
@@ -1427,7 +1520,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1427
1520
  try {
1428
1521
  new Cstr(hostRef);
1429
1522
  } catch (e) {
1430
- consoleError(e);
1523
+ consoleError(e, elm);
1431
1524
  }
1432
1525
  {
1433
1526
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1462,7 +1555,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1462
1555
  schedule();
1463
1556
  }
1464
1557
  };
1465
- var fireConnectedCallback = (instance) => {
1558
+ var fireConnectedCallback = (instance, elm) => {
1466
1559
  };
1467
1560
 
1468
1561
  // src/runtime/connected-callback.ts
@@ -1516,9 +1609,9 @@ var setContentReference = (elm) => {
1516
1609
  contentRefElm["s-cn"] = true;
1517
1610
  insertBefore(elm, contentRefElm, elm.firstChild);
1518
1611
  };
1519
- var disconnectInstance = (instance) => {
1612
+ var disconnectInstance = (instance, elm) => {
1520
1613
  {
1521
- safeCall(instance, "disconnectedCallback");
1614
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1522
1615
  }
1523
1616
  };
1524
1617
  var disconnectedCallback = async (elm) => {
@@ -1531,11 +1624,17 @@ var disconnectedCallback = async (elm) => {
1531
1624
  }
1532
1625
  }
1533
1626
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1534
- disconnectInstance(hostRef.$lazyInstance$);
1627
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1535
1628
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1536
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1629
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1537
1630
  }
1538
1631
  }
1632
+ if (rootAppliedStyles.has(elm)) {
1633
+ rootAppliedStyles.delete(elm);
1634
+ }
1635
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1636
+ rootAppliedStyles.delete(elm.shadowRoot);
1637
+ }
1539
1638
  };
1540
1639
 
1541
1640
  // src/runtime/bootstrap-lazy.ts
@@ -1617,6 +1716,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1617
1716
  }
1618
1717
  disconnectedCallback() {
1619
1718
  plt.jmp(() => disconnectedCallback(this));
1719
+ plt.raf(() => {
1720
+ var _a3;
1721
+ const hostRef = getHostRef(this);
1722
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1723
+ if (i2 > -1) {
1724
+ deferredConnectedCallbacks.splice(i2, 1);
1725
+ }
1726
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1727
+ delete hostRef.$vnode$.$elm$;
1728
+ }
1729
+ });
1620
1730
  }
1621
1731
  componentOnReady() {
1622
1732
  return getHostRef(this).$onReadyPromise$;
@@ -1680,7 +1790,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1680
1790
  }
1681
1791
  }
1682
1792
  } catch (e) {
1683
- consoleError(e);
1793
+ consoleError(e, hostRef.$hostElement$);
1684
1794
  }
1685
1795
  };
1686
1796
  var getHostListenerTarget = (elm, flags) => {