@everymatrix/casino-engagement-suite-tournament 1.53.0 → 1.53.11

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 (27) hide show
  1. package/dist/casino-engagement-suite-tournament/casino-engagement-suite-tournament.esm.js +1 -1
  2. package/dist/casino-engagement-suite-tournament/index.esm.js +1 -1
  3. package/dist/casino-engagement-suite-tournament/p-399401c8.js +2 -0
  4. package/dist/casino-engagement-suite-tournament/p-575729c8.js +1 -0
  5. package/dist/casino-engagement-suite-tournament/{p-6d03bbf5.entry.js → p-f3795238.entry.js} +1 -1
  6. package/dist/cjs/casino-engagement-suite-progress-bar_3.cjs.entry.js +39 -13
  7. package/dist/cjs/{casino-engagement-suite-tournament-71606d08.js → casino-engagement-suite-tournament-c194e96a.js} +505 -10
  8. package/dist/cjs/casino-engagement-suite-tournament.cjs.js +2 -2
  9. package/dist/cjs/{index-4eb9b2e6.js → index-6ea4215d.js} +247 -145
  10. package/dist/cjs/index.cjs.js +2 -2
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/collection/collection-manifest.json +1 -1
  13. package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +36 -5
  14. package/dist/esm/casino-engagement-suite-progress-bar_3.entry.js +39 -13
  15. package/dist/esm/{casino-engagement-suite-tournament-d6f0ee89.js → casino-engagement-suite-tournament-18e62f35.js} +587 -92
  16. package/dist/esm/casino-engagement-suite-tournament.js +3 -3
  17. package/dist/esm/{index-3124114b.js → index-b5adca25.js} +247 -145
  18. package/dist/esm/index.js +2 -2
  19. package/dist/esm/loader.js +2 -2
  20. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.d.ts +2 -0
  21. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.dev.d.ts +2 -0
  22. package/dist/types/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.d.ts +1 -1
  23. package/package.json +1 -1
  24. package/dist/casino-engagement-suite-tournament/p-1cd75583.js +0 -2
  25. package/dist/casino-engagement-suite-tournament/p-c416546b.js +0 -1
  26. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.d.ts +0 -2
  27. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.dev.d.ts +0 -2
@@ -21,19 +21,23 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'casino-engagement-suite-tournament';
24
- const BUILD = /* casino-engagement-suite-tournament */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, 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: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
24
+ const BUILD = /* casino-engagement-suite-tournament */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, 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: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
31
31
  for (var name in all)
32
32
  __defProp(target, name, { get: all[name], enumerable: true });
33
33
  };
34
+
35
+ // src/client/client-host-ref.ts
34
36
  var hostRefs = /* @__PURE__ */ new WeakMap();
35
37
  var getHostRef = (ref) => hostRefs.get(ref);
36
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
38
+ var registerInstance = (lazyInstance, hostRef) => {
39
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
40
+ };
37
41
  var registerHost = (hostElement, cmpMeta) => {
38
42
  const hostRef = {
39
43
  $flags$: 0,
@@ -46,7 +50,8 @@ var registerHost = (hostElement, cmpMeta) => {
46
50
  hostElement["s-p"] = [];
47
51
  hostElement["s-rc"] = [];
48
52
  }
49
- return hostRefs.set(hostElement, hostRef);
53
+ const ref = hostRefs.set(hostElement, hostRef);
54
+ return ref;
50
55
  };
51
56
  var isMemberInElement = (elm, memberName) => memberName in elm;
52
57
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -83,16 +88,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
83
88
  /* webpackExclude: /\.system\.entry\.js$/ */
84
89
  /* webpackMode: "lazy" */
85
90
  `./${bundleId}.entry.js${""}`
86
- )); }).then((importedModule) => {
87
- {
88
- cmpModules.set(bundleId, importedModule);
91
+ )); }).then(
92
+ (importedModule) => {
93
+ {
94
+ cmpModules.set(bundleId, importedModule);
95
+ }
96
+ return importedModule[exportName];
97
+ },
98
+ (e) => {
99
+ consoleError(e, hostRef.$hostElement$);
89
100
  }
90
- return importedModule[exportName];
91
- }, consoleError);
101
+ );
92
102
  };
93
103
 
94
104
  // src/client/client-style.ts
95
105
  var styles = /* @__PURE__ */ new Map();
106
+ var HYDRATED_STYLE_ID = "sty-id";
96
107
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
97
108
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
98
109
  var XLINK_NS = "http://www.w3.org/1999/xlink";
@@ -167,12 +178,6 @@ var flush = () => {
167
178
  };
168
179
  var nextTick = (cb) => promiseResolve().then(cb);
169
180
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
170
-
171
- // src/utils/constants.ts
172
- var EMPTY_OBJ = {};
173
-
174
- // src/utils/helpers.ts
175
- var isDef = (v) => v != null;
176
181
  var isComplexType = (o) => {
177
182
  o = typeof o;
178
183
  return o === "object" || o === "function";
@@ -232,6 +237,63 @@ var unwrapErr = (result) => {
232
237
  throw result.value;
233
238
  }
234
239
  };
240
+ var updateFallbackSlotVisibility = (elm) => {
241
+ const childNodes = elm.__childNodes || elm.childNodes;
242
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
243
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
244
+ var _a;
245
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
246
+ if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
247
+ slotNode.hidden = true;
248
+ } else {
249
+ slotNode.hidden = false;
250
+ }
251
+ }
252
+ });
253
+ }
254
+ for (const childNode of childNodes) {
255
+ if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
256
+ updateFallbackSlotVisibility(childNode);
257
+ }
258
+ }
259
+ };
260
+ function getHostSlotNodes(childNodes, hostName, slotName) {
261
+ let i2 = 0;
262
+ let slottedNodes = [];
263
+ let childNode;
264
+ for (; i2 < childNodes.length; i2++) {
265
+ childNode = childNodes[i2];
266
+ if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
267
+ slottedNodes.push(childNode);
268
+ if (typeof slotName !== "undefined") return slottedNodes;
269
+ }
270
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
271
+ }
272
+ return slottedNodes;
273
+ }
274
+ var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
275
+ const childNodes = [];
276
+ if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
277
+ while ((node = node.nextSibling) && node["s-sn"] === slotName) {
278
+ childNodes.push(node);
279
+ }
280
+ return childNodes;
281
+ };
282
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
283
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
284
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
285
+ return true;
286
+ }
287
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
288
+ return true;
289
+ }
290
+ return false;
291
+ }
292
+ if (nodeToRelocate["s-sn"] === slotName) {
293
+ return true;
294
+ }
295
+ return slotName === "";
296
+ };
235
297
  var createTime = (fnName, tagName = "") => {
236
298
  {
237
299
  return () => {
@@ -386,7 +448,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
386
448
  }
387
449
  if (!appliedStyles.has(scopeId2)) {
388
450
  {
389
- styleElm = doc.createElement("style");
451
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
390
452
  styleElm.innerHTML = style;
391
453
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
392
454
  if (nonce != null) {
@@ -396,7 +458,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
396
458
  if (styleContainerNode.nodeName === "HEAD") {
397
459
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
398
460
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
399
- styleContainerNode.insertBefore(styleElm, referenceNode2);
461
+ styleContainerNode.insertBefore(
462
+ styleElm,
463
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
464
+ );
400
465
  } else if ("host" in styleContainerNode) {
401
466
  if (supportsConstructableStylesheets) {
402
467
  const stylesheet = new CSSStyleSheet();
@@ -446,16 +511,18 @@ var attachStyles = (hostRef) => {
446
511
  endAttachStyles();
447
512
  };
448
513
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
449
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
514
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
450
515
  if (oldValue !== newValue) {
451
516
  let isProp = isMemberInElement(elm, memberName);
452
517
  let ln = memberName.toLowerCase();
453
518
  if (memberName === "class") {
454
519
  const classList = elm.classList;
455
520
  const oldClasses = parseClassList(oldValue);
456
- const newClasses = parseClassList(newValue);
457
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
458
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
521
+ let newClasses = parseClassList(newValue);
522
+ {
523
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
524
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
525
+ }
459
526
  } else if (memberName === "style") {
460
527
  {
461
528
  for (const prop in oldValue) {
@@ -514,7 +581,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
514
581
  elm.setAttribute(memberName, n);
515
582
  }
516
583
  }
517
- } else {
584
+ } else if (elm[memberName] !== newValue) {
518
585
  elm[memberName] = newValue;
519
586
  }
520
587
  } catch (e) {
@@ -547,24 +614,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
547
614
  }
548
615
  };
549
616
  var parseClassListRegex = /\s/;
550
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
617
+ var parseClassList = (value) => {
618
+ if (typeof value === "object" && value && "baseVal" in value) {
619
+ value = value.baseVal;
620
+ }
621
+ if (!value || typeof value !== "string") {
622
+ return [];
623
+ }
624
+ return value.split(parseClassListRegex);
625
+ };
551
626
  var CAPTURE_EVENT_SUFFIX = "Capture";
552
627
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
553
628
 
554
629
  // src/runtime/vdom/update-element.ts
555
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
630
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
556
631
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
557
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
558
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
632
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
633
+ const newVnodeAttrs = newVnode.$attrs$ || {};
559
634
  {
560
635
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
561
636
  if (!(memberName in newVnodeAttrs)) {
562
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
637
+ setAccessor(
638
+ elm,
639
+ memberName,
640
+ oldVnodeAttrs[memberName],
641
+ void 0,
642
+ isSvgMode2,
643
+ newVnode.$flags$);
563
644
  }
564
645
  }
565
646
  }
566
647
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
567
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
648
+ setAccessor(
649
+ elm,
650
+ memberName,
651
+ oldVnodeAttrs[memberName],
652
+ newVnodeAttrs[memberName],
653
+ isSvgMode2,
654
+ newVnode.$flags$);
568
655
  }
569
656
  };
570
657
  function sortedAttrNames(attrNames) {
@@ -576,16 +663,13 @@ function sortedAttrNames(attrNames) {
576
663
  attrNames
577
664
  );
578
665
  }
579
-
580
- // src/runtime/vdom/vdom-render.ts
581
- var scopeId;
582
666
  var contentRef;
583
667
  var hostTagName;
584
668
  var useNativeShadowDom = false;
585
669
  var checkSlotFallbackVisibility = false;
586
670
  var checkSlotRelocate = false;
587
671
  var isSvgMode = false;
588
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
672
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
589
673
  var _a;
590
674
  const newVNode2 = newParentVNode.$children$[childIndex];
591
675
  let i2 = 0;
@@ -595,9 +679,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
595
679
  if (!useNativeShadowDom) {
596
680
  checkSlotRelocate = true;
597
681
  if (newVNode2.$tag$ === "slot") {
598
- if (scopeId) {
599
- parentElm.classList.add(scopeId + "-s");
600
- }
601
682
  newVNode2.$flags$ |= newVNode2.$children$ ? (
602
683
  // slot element has fallback content
603
684
  // still create an element that "mocks" the slot element
@@ -621,14 +702,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
621
702
  {
622
703
  updateElement(null, newVNode2, isSvgMode);
623
704
  }
624
- const rootNode = elm.getRootNode();
625
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
626
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
627
- elm.classList.add(elm["s-si"] = scopeId);
628
- }
629
705
  if (newVNode2.$children$) {
630
706
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
631
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
707
+ childNode = createElm(oldParentVNode, newVNode2, i2);
632
708
  if (childNode) {
633
709
  elm.appendChild(childNode);
634
710
  }
@@ -654,7 +730,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
654
730
  };
655
731
  var putBackInOriginalLocation = (parentElm, recursive) => {
656
732
  plt.$flags$ |= 1 /* isTmpDisconnected */;
657
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
733
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
658
734
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
659
735
  let node = parentElm;
660
736
  while (node = node.nextSibling) {
@@ -666,7 +742,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
666
742
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
667
743
  const childNode = oldSlotChildNodes[i2];
668
744
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
669
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
745
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
670
746
  childNode["s-ol"].remove();
671
747
  childNode["s-ol"] = void 0;
672
748
  childNode["s-sh"] = void 0;
@@ -686,7 +762,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
686
762
  }
687
763
  for (; startIdx <= endIdx; ++startIdx) {
688
764
  if (vnodes[startIdx]) {
689
- childNode = createElm(null, parentVNode, startIdx, parentElm);
765
+ childNode = createElm(null, parentVNode, startIdx);
690
766
  if (childNode) {
691
767
  vnodes[startIdx].$elm$ = childNode;
692
768
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -773,7 +849,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
773
849
  if (idxInOld >= 0) {
774
850
  elmToMove = oldCh[idxInOld];
775
851
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
776
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
852
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
777
853
  } else {
778
854
  patch(elmToMove, newStartVnode, isInitialRender);
779
855
  oldCh[idxInOld] = void 0;
@@ -781,12 +857,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
781
857
  }
782
858
  newStartVnode = newCh[++newStartIdx];
783
859
  } else {
784
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
860
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
785
861
  newStartVnode = newCh[++newStartIdx];
786
862
  }
787
863
  if (node) {
788
864
  {
789
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
865
+ insertBefore(
866
+ referenceNode(oldStartVnode.$elm$).parentNode,
867
+ node,
868
+ referenceNode(oldStartVnode.$elm$)
869
+ );
790
870
  }
791
871
  }
792
872
  }
@@ -807,28 +887,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
807
887
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
808
888
  if (leftVNode.$tag$ === rightVNode.$tag$) {
809
889
  if (leftVNode.$tag$ === "slot") {
810
- if (
811
- // The component gets hydrated and no VDOM has been initialized.
812
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
813
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
814
- // hydration comments to be removed
815
- leftVNode.$elm$.nodeType !== 8
816
- ) {
817
- return false;
818
- }
819
890
  return leftVNode.$name$ === rightVNode.$name$;
820
891
  }
821
892
  if (!isInitialRender) {
822
893
  return leftVNode.$key$ === rightVNode.$key$;
823
894
  }
895
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
896
+ leftVNode.$key$ = rightVNode.$key$;
897
+ }
824
898
  return true;
825
899
  }
826
900
  return false;
827
901
  };
828
- var referenceNode = (node) => {
829
- return node && node["s-ol"] || node;
830
- };
831
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
902
+ var referenceNode = (node) => node && node["s-ol"] || node;
832
903
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
833
904
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
834
905
  const oldChildren = oldVNode.$children$;
@@ -861,41 +932,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
861
932
  elm.data = text;
862
933
  }
863
934
  };
864
- var updateFallbackSlotVisibility = (elm) => {
865
- const childNodes = elm.childNodes;
866
- for (const childNode of childNodes) {
867
- if (childNode.nodeType === 1 /* ElementNode */) {
868
- if (childNode["s-sr"]) {
869
- const slotName = childNode["s-sn"];
870
- childNode.hidden = false;
871
- for (const siblingNode of childNodes) {
872
- if (siblingNode !== childNode) {
873
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
874
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
875
- childNode.hidden = true;
876
- break;
877
- }
878
- } else {
879
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
880
- childNode.hidden = true;
881
- break;
882
- }
883
- }
884
- }
885
- }
886
- }
887
- updateFallbackSlotVisibility(childNode);
888
- }
889
- }
890
- };
891
935
  var relocateNodes = [];
892
936
  var markSlotContentForRelocation = (elm) => {
893
937
  let node;
894
938
  let hostContentNodes;
895
939
  let j;
896
- for (const childNode of elm.childNodes) {
940
+ const children = elm.__childNodes || elm.childNodes;
941
+ for (const childNode of children) {
897
942
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
898
- hostContentNodes = node.parentNode.childNodes;
943
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
899
944
  const slotName = childNode["s-sn"];
900
945
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
901
946
  node = hostContentNodes[j];
@@ -937,21 +982,6 @@ var markSlotContentForRelocation = (elm) => {
937
982
  }
938
983
  }
939
984
  };
940
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
941
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
942
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
943
- return true;
944
- }
945
- if (nodeToRelocate.getAttribute("slot") === slotName) {
946
- return true;
947
- }
948
- return false;
949
- }
950
- if (nodeToRelocate["s-sn"] === slotName) {
951
- return true;
952
- }
953
- return slotName === "";
954
- };
955
985
  var nullifyVNodeRefs = (vNode) => {
956
986
  {
957
987
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -959,8 +989,9 @@ var nullifyVNodeRefs = (vNode) => {
959
989
  }
960
990
  };
961
991
  var insertBefore = (parent, newNode, reference) => {
962
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
963
- return inserted;
992
+ {
993
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
994
+ }
964
995
  };
965
996
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
966
997
  var _a, _b, _c, _d;
@@ -986,9 +1017,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
986
1017
  rootVnode.$flags$ |= 4 /* isHost */;
987
1018
  hostRef.$vnode$ = rootVnode;
988
1019
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
989
- {
990
- scopeId = hostElm["s-sc"];
991
- }
992
1020
  useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
993
1021
  {
994
1022
  contentRef = hostElm["s-cr"];
@@ -1017,7 +1045,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1017
1045
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1018
1046
  while (orgLocationNode) {
1019
1047
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1020
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
1048
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1021
1049
  refNode = refNode.nextSibling;
1022
1050
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1023
1051
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -1030,13 +1058,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1030
1058
  orgLocationNode = orgLocationNode.previousSibling;
1031
1059
  }
1032
1060
  }
1033
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1061
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
1062
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
1063
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1034
1064
  if (nodeToRelocate !== insertBeforeNode) {
1035
1065
  if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1036
1066
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1037
1067
  }
1038
1068
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1039
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1069
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1040
1070
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1041
1071
  }
1042
1072
  }
@@ -1064,7 +1094,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1064
1094
  // src/runtime/update-component.ts
1065
1095
  var attachToAncestor = (hostRef, ancestorComponent) => {
1066
1096
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1067
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
1097
+ const index = ancestorComponent["s-p"].push(
1098
+ new Promise(
1099
+ (r) => hostRef.$onRenderResolve$ = () => {
1100
+ ancestorComponent["s-p"].splice(index - 1, 1);
1101
+ r();
1102
+ }
1103
+ )
1104
+ );
1068
1105
  }
1069
1106
  };
1070
1107
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1093,12 +1130,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1093
1130
  {
1094
1131
  hostRef.$flags$ |= 256 /* isListenReady */;
1095
1132
  if (hostRef.$queuedListeners$) {
1096
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1133
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1097
1134
  hostRef.$queuedListeners$ = void 0;
1098
1135
  }
1099
1136
  }
1100
1137
  {
1101
- maybePromise = safeCall(instance, "componentWillLoad");
1138
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1102
1139
  }
1103
1140
  }
1104
1141
  endSchedule();
@@ -1167,7 +1204,7 @@ var postUpdateComponent = (hostRef) => {
1167
1204
  const instance = hostRef.$lazyInstance$ ;
1168
1205
  const ancestorComponent = hostRef.$ancestorComponent$;
1169
1206
  {
1170
- safeCall(instance, "componentDidRender");
1207
+ safeCall(instance, "componentDidRender", void 0, elm);
1171
1208
  }
1172
1209
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1173
1210
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -1201,12 +1238,12 @@ var appDidLoad = (who) => {
1201
1238
  }
1202
1239
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1203
1240
  };
1204
- var safeCall = (instance, method, arg) => {
1241
+ var safeCall = (instance, method, arg, elm) => {
1205
1242
  if (instance && instance[method]) {
1206
1243
  try {
1207
1244
  return instance[method](arg);
1208
1245
  } catch (e) {
1209
- consoleError(e);
1246
+ consoleError(e, elm);
1210
1247
  }
1211
1248
  }
1212
1249
  return void 0;
@@ -1265,15 +1302,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1265
1302
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1266
1303
  members.map(([memberName, [memberFlags]]) => {
1267
1304
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1305
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1306
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1307
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1308
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
1309
+ Object.defineProperty(prototype, memberName, {
1310
+ get() {
1311
+ {
1312
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1313
+ return getValue(this, memberName);
1314
+ }
1315
+ const ref = getHostRef(this);
1316
+ const instance = ref ? ref.$lazyInstance$ : prototype;
1317
+ if (!instance) return;
1318
+ return instance[memberName];
1319
+ }
1320
+ },
1321
+ configurable: true,
1322
+ enumerable: true
1323
+ });
1324
+ }
1268
1325
  Object.defineProperty(prototype, memberName, {
1269
- get() {
1270
- return getValue(this, memberName);
1271
- },
1272
1326
  set(newValue) {
1273
- setValue(this, memberName, newValue, cmpMeta);
1274
- },
1275
- configurable: true,
1276
- enumerable: true
1327
+ const ref = getHostRef(this);
1328
+ if (origSetter) {
1329
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1330
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1331
+ newValue = ref.$instanceValues$.get(memberName);
1332
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1333
+ ref.$instanceValues$.set(memberName, currentValue);
1334
+ }
1335
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1336
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1337
+ setValue(this, memberName, newValue, cmpMeta);
1338
+ return;
1339
+ }
1340
+ {
1341
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1342
+ setValue(this, memberName, newValue, cmpMeta);
1343
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1344
+ ref.$onReadyPromise$.then(() => {
1345
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1346
+ ref.$lazyInstance$[memberName] = newValue;
1347
+ }
1348
+ });
1349
+ }
1350
+ return;
1351
+ }
1352
+ const setterSetVal = () => {
1353
+ const currentValue = ref.$lazyInstance$[memberName];
1354
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1355
+ ref.$instanceValues$.set(memberName, currentValue);
1356
+ }
1357
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1358
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1359
+ };
1360
+ if (ref.$lazyInstance$) {
1361
+ setterSetVal();
1362
+ } else {
1363
+ ref.$onReadyPromise$.then(() => setterSetVal());
1364
+ }
1365
+ }
1366
+ }
1277
1367
  });
1278
1368
  }
1279
1369
  });
@@ -1283,7 +1373,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1283
1373
  plt.jmp(() => {
1284
1374
  var _a2;
1285
1375
  const propName = attrNameToPropName.get(attrName);
1286
- if (this.hasOwnProperty(propName)) {
1376
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1287
1377
  newValue = this[propName];
1288
1378
  delete this[propName];
1289
1379
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1303,7 +1393,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1303
1393
  }
1304
1394
  return;
1305
1395
  }
1306
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1396
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1397
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1398
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1399
+ this[propName] = newValue;
1400
+ }
1307
1401
  });
1308
1402
  };
1309
1403
  Cstr.observedAttributes = Array.from(
@@ -1330,9 +1424,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1330
1424
  let Cstr;
1331
1425
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1332
1426
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1333
- const bundleId = cmpMeta.$lazyBundleId$;
1334
- if (bundleId) {
1335
- const CstrImport = loadModule(cmpMeta);
1427
+ {
1428
+ const CstrImport = loadModule(cmpMeta, hostRef);
1336
1429
  if (CstrImport && "then" in CstrImport) {
1337
1430
  const endLoad = uniqueTime();
1338
1431
  Cstr = await CstrImport;
@@ -1357,7 +1450,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1357
1450
  try {
1358
1451
  new Cstr(hostRef);
1359
1452
  } catch (e) {
1360
- consoleError(e);
1453
+ consoleError(e, elm);
1361
1454
  }
1362
1455
  {
1363
1456
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1366,11 +1459,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1366
1459
  hostRef.$flags$ |= 128 /* isWatchReady */;
1367
1460
  }
1368
1461
  endNewInstance();
1369
- fireConnectedCallback(hostRef.$lazyInstance$);
1370
- } else {
1371
- Cstr = elm.constructor;
1372
- const cmpTag = elm.localName;
1373
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1462
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1374
1463
  }
1375
1464
  if (Cstr && Cstr.style) {
1376
1465
  let style;
@@ -1393,9 +1482,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1393
1482
  schedule();
1394
1483
  }
1395
1484
  };
1396
- var fireConnectedCallback = (instance) => {
1485
+ var fireConnectedCallback = (instance, elm) => {
1397
1486
  {
1398
- safeCall(instance, "connectedCallback");
1487
+ safeCall(instance, "connectedCallback", void 0, elm);
1399
1488
  }
1400
1489
  };
1401
1490
 
@@ -1437,9 +1526,9 @@ var connectedCallback = (elm) => {
1437
1526
  } else {
1438
1527
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1439
1528
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1440
- fireConnectedCallback(hostRef.$lazyInstance$);
1529
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1441
1530
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1442
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
1531
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1443
1532
  }
1444
1533
  }
1445
1534
  endConnected();
@@ -1452,9 +1541,9 @@ var setContentReference = (elm) => {
1452
1541
  contentRefElm["s-cn"] = true;
1453
1542
  insertBefore(elm, contentRefElm, elm.firstChild);
1454
1543
  };
1455
- var disconnectInstance = (instance) => {
1544
+ var disconnectInstance = (instance, elm) => {
1456
1545
  {
1457
- safeCall(instance, "disconnectedCallback");
1546
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1458
1547
  }
1459
1548
  };
1460
1549
  var disconnectedCallback = async (elm) => {
@@ -1467,11 +1556,17 @@ var disconnectedCallback = async (elm) => {
1467
1556
  }
1468
1557
  }
1469
1558
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1470
- disconnectInstance(hostRef.$lazyInstance$);
1559
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1471
1560
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1472
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1561
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1473
1562
  }
1474
1563
  }
1564
+ if (rootAppliedStyles.has(elm)) {
1565
+ rootAppliedStyles.delete(elm);
1566
+ }
1567
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1568
+ rootAppliedStyles.delete(elm.shadowRoot);
1569
+ }
1475
1570
  };
1476
1571
 
1477
1572
  // src/runtime/bootstrap-lazy.ts
@@ -1556,6 +1651,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1556
1651
  }
1557
1652
  disconnectedCallback() {
1558
1653
  plt.jmp(() => disconnectedCallback(this));
1654
+ plt.raf(() => {
1655
+ var _a3;
1656
+ const hostRef = getHostRef(this);
1657
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1658
+ delete hostRef.$vnode$.$elm$;
1659
+ }
1660
+ });
1559
1661
  }
1560
1662
  componentOnReady() {
1561
1663
  return getHostRef(this).$onReadyPromise$;
@@ -1619,7 +1721,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1619
1721
  }
1620
1722
  }
1621
1723
  } catch (e) {
1622
- consoleError(e);
1724
+ consoleError(e, hostRef.$hostElement$);
1623
1725
  }
1624
1726
  };
1625
1727
  var getHostListenerTarget = (elm, flags) => {