@rindo/core 4.23.0 → 4.23.1

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
- Rindo Client Platform v4.23.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Client Platform v4.23.1 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
@@ -18,9 +18,21 @@ var Build = {
18
18
 
19
19
  // src/client/client-host-ref.ts
20
20
  import { BUILD as BUILD2 } from "@rindo/core/internal/app-data";
21
+
22
+ // src/utils/constants.ts
23
+ var EMPTY_OBJ = {};
24
+ var SVG_NS = "http://www.w3.org/2000/svg";
25
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
26
+
27
+ // src/client/client-host-ref.ts
21
28
  var hostRefs = BUILD2.hotModuleReplacement ? window.__RINDO_HOSTREFS__ || (window.__RINDO_HOSTREFS__ = /* @__PURE__ */ new WeakMap()) : /* @__PURE__ */ new WeakMap();
22
29
  var getHostRef = (ref) => hostRefs.get(ref);
23
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
30
+ var registerInstance = (lazyInstance, hostRef) => {
31
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
32
+ if (BUILD2.modernPropertyDecls && (BUILD2.state || BUILD2.prop)) {
33
+ reWireGetterSetter(lazyInstance, hostRef);
34
+ }
35
+ };
24
36
  var registerHost = (hostElement, cmpMeta) => {
25
37
  const hostRef = {
26
38
  $flags$: 0,
@@ -39,9 +51,35 @@ var registerHost = (hostElement, cmpMeta) => {
39
51
  hostElement["s-p"] = [];
40
52
  hostElement["s-rc"] = [];
41
53
  }
42
- return hostRefs.set(hostElement, hostRef);
54
+ const ref = hostRefs.set(hostElement, hostRef);
55
+ if (!BUILD2.lazyLoad && BUILD2.modernPropertyDecls && (BUILD2.state || BUILD2.prop)) {
56
+ reWireGetterSetter(hostElement, hostRef);
57
+ }
58
+ return ref;
43
59
  };
44
60
  var isMemberInElement = (elm, memberName) => memberName in elm;
61
+ var reWireGetterSetter = (instance, hostRef) => {
62
+ var _a;
63
+ const cmpMeta = hostRef.$cmpMeta$;
64
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
65
+ members.map(([memberName, [memberFlags]]) => {
66
+ if (BUILD2.state && BUILD2.prop && (memberFlags & 2048 /* Getter */) === 0 && (memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
67
+ const ogValue = instance[memberName];
68
+ const lazyDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(instance), memberName);
69
+ Object.defineProperty(instance, memberName, {
70
+ get() {
71
+ return lazyDescriptor.get.call(this);
72
+ },
73
+ set(newValue) {
74
+ lazyDescriptor.set.call(this, newValue);
75
+ },
76
+ configurable: true,
77
+ enumerable: true
78
+ });
79
+ instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
80
+ }
81
+ });
82
+ };
45
83
 
46
84
  // src/client/client-load-module.ts
47
85
  import { BUILD as BUILD4 } from "@rindo/core/internal/app-data";
@@ -243,7 +281,7 @@ var readTask = /* @__PURE__ */ queueTask(queueDomReads, false);
243
281
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
244
282
 
245
283
  // src/client/index.ts
246
- import { BUILD as BUILD27, Env, NAMESPACE as NAMESPACE2 } from "@rindo/core/internal/app-data";
284
+ import { BUILD as BUILD28, Env, NAMESPACE as NAMESPACE2 } from "@rindo/core/internal/app-data";
247
285
 
248
286
  // src/runtime/asset-path.ts
249
287
  var getAssetPath = (path) => {
@@ -253,15 +291,10 @@ var getAssetPath = (path) => {
253
291
  var setAssetPath = (path) => plt.$resourcesUrl$ = path;
254
292
 
255
293
  // src/runtime/bootstrap-custom-element.ts
256
- import { BUILD as BUILD24 } from "@rindo/core/internal/app-data";
257
-
258
- // src/utils/constants.ts
259
- var EMPTY_OBJ = {};
260
- var SVG_NS = "http://www.w3.org/2000/svg";
261
- var HTML_NS = "http://www.w3.org/1999/xhtml";
294
+ import { BUILD as BUILD25 } from "@rindo/core/internal/app-data";
262
295
 
263
296
  // src/utils/helpers.ts
264
- var isDef = (v) => v != null;
297
+ var isDef = (v) => v != null && v !== void 0;
265
298
  var isComplexType = (o) => {
266
299
  o = typeof o;
267
300
  return o === "object" || o === "function";
@@ -323,19 +356,122 @@ var unwrapErr = (result) => {
323
356
  };
324
357
 
325
358
  // src/runtime/connected-callback.ts
326
- import { BUILD as BUILD22 } from "@rindo/core/internal/app-data";
359
+ import { BUILD as BUILD23 } from "@rindo/core/internal/app-data";
327
360
 
328
361
  // src/runtime/client-hydrate.ts
329
- import { BUILD as BUILD13 } from "@rindo/core/internal/app-data";
362
+ import { BUILD as BUILD14 } from "@rindo/core/internal/app-data";
330
363
 
331
364
  // src/runtime/dom-extras.ts
332
- import { BUILD as BUILD11 } from "@rindo/core/internal/app-data";
365
+ import { BUILD as BUILD12 } from "@rindo/core/internal/app-data";
366
+
367
+ // src/runtime/slot-polyfill-utils.ts
368
+ import { BUILD as BUILD7 } from "@rindo/core/internal/app-data";
369
+ var updateFallbackSlotVisibility = (elm) => {
370
+ const childNodes = elm.__childNodes || elm.childNodes;
371
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
372
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
373
+ var _a;
374
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
375
+ if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
376
+ slotNode.hidden = true;
377
+ } else {
378
+ slotNode.hidden = false;
379
+ }
380
+ }
381
+ });
382
+ }
383
+ for (const childNode of childNodes) {
384
+ if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
385
+ updateFallbackSlotVisibility(childNode);
386
+ }
387
+ }
388
+ };
389
+ var getSlottedChildNodes = (childNodes) => {
390
+ const result = [];
391
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
392
+ const slottedNode = childNodes[i2]["s-nr"];
393
+ if (slottedNode && slottedNode.isConnected) {
394
+ result.push(slottedNode);
395
+ }
396
+ }
397
+ return result;
398
+ };
399
+ var getHostSlotNodes = (childNodes, hostName, slotName) => {
400
+ let i2 = 0;
401
+ let slottedNodes = [];
402
+ let childNode;
403
+ for (; i2 < childNodes.length; i2++) {
404
+ childNode = childNodes[i2];
405
+ if (childNode["s-sr"] && childNode["s-hn"] === hostName && (!slotName || childNode["s-sn"] === slotName)) {
406
+ slottedNodes.push(childNode);
407
+ if (typeof slotName !== "undefined") return slottedNodes;
408
+ }
409
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
410
+ }
411
+ return slottedNodes;
412
+ };
413
+ var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
414
+ const childNodes = [];
415
+ if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
416
+ while ((node = node.nextSibling) && node["s-sn"] === slotName) {
417
+ childNodes.push(node);
418
+ }
419
+ return childNodes;
420
+ };
421
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
422
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
423
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
424
+ return true;
425
+ }
426
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
427
+ return true;
428
+ }
429
+ return false;
430
+ }
431
+ if (nodeToRelocate["s-sn"] === slotName) {
432
+ return true;
433
+ }
434
+ return slotName === "";
435
+ };
436
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
437
+ let slottedNodeLocation;
438
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
439
+ slottedNodeLocation = newChild["s-ol"];
440
+ } else {
441
+ slottedNodeLocation = document.createTextNode("");
442
+ slottedNodeLocation["s-nr"] = newChild;
443
+ }
444
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
445
+ const parent = slotNode["s-cr"].parentNode;
446
+ const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
447
+ if (typeof position !== "undefined") {
448
+ if (BUILD7.hydrateClientSide) {
449
+ slottedNodeLocation["s-oo"] = position;
450
+ const childNodes = parent.__childNodes || parent.childNodes;
451
+ const slotRelocateNodes = [slottedNodeLocation];
452
+ childNodes.forEach((n) => {
453
+ if (n["s-nr"]) slotRelocateNodes.push(n);
454
+ });
455
+ slotRelocateNodes.sort((a, b) => {
456
+ if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
457
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
458
+ return 0;
459
+ });
460
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
461
+ }
462
+ } else {
463
+ appendMethod.call(parent, slottedNodeLocation);
464
+ }
465
+ newChild["s-ol"] = slottedNodeLocation;
466
+ newChild["s-sh"] = slotNode["s-hn"];
467
+ };
468
+ var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
333
469
 
334
470
  // src/runtime/vdom/vdom-render.ts
335
- import { BUILD as BUILD10 } from "@rindo/core/internal/app-data";
471
+ import { BUILD as BUILD11 } from "@rindo/core/internal/app-data";
336
472
 
337
473
  // src/runtime/vdom/h.ts
338
- import { BUILD as BUILD7 } from "@rindo/core/internal/app-data";
474
+ import { BUILD as BUILD8 } from "@rindo/core/internal/app-data";
339
475
  var h = (nodeName, vnodeData, ...children) => {
340
476
  let child = null;
341
477
  let key = null;
@@ -351,7 +487,7 @@ var h = (nodeName, vnodeData, ...children) => {
351
487
  } else if (child != null && typeof child !== "boolean") {
352
488
  if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
353
489
  child = String(child);
354
- } else if (BUILD7.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
490
+ } else if (BUILD8.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
355
491
  consoleDevError(`vNode passed as children has unexpected type.
356
492
  Make sure it's using the correct h() function.
357
493
  Empty objects can also be the cause, look for JSX comments that became objects.`);
@@ -367,28 +503,28 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
367
503
  };
368
504
  walk(children);
369
505
  if (vnodeData) {
370
- if (BUILD7.isDev && nodeName === "input") {
506
+ if (BUILD8.isDev && nodeName === "input") {
371
507
  validateInputProperties(vnodeData);
372
508
  }
373
- if (BUILD7.vdomKey && vnodeData.key) {
509
+ if (BUILD8.vdomKey && vnodeData.key) {
374
510
  key = vnodeData.key;
375
511
  }
376
- if (BUILD7.slotRelocation && vnodeData.name) {
512
+ if (BUILD8.slotRelocation && vnodeData.name) {
377
513
  slotName = vnodeData.name;
378
514
  }
379
- if (BUILD7.vdomClass) {
515
+ if (BUILD8.vdomClass) {
380
516
  const classData = vnodeData.className || vnodeData.class;
381
517
  if (classData) {
382
518
  vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
383
519
  }
384
520
  }
385
521
  }
386
- if (BUILD7.isDev && vNodeChildren.some(isHost)) {
522
+ if (BUILD8.isDev && vNodeChildren.some(isHost)) {
387
523
  consoleDevError(`The <Host> must be the single root component. Make sure:
388
524
  - You are NOT using hostData() and <Host> in the same component.
389
525
  - <Host> is used once, and it's the single root component of the render() function.`);
390
526
  }
391
- if (BUILD7.vdomFunctional && typeof nodeName === "function") {
527
+ if (BUILD8.vdomFunctional && typeof nodeName === "function") {
392
528
  return nodeName(
393
529
  vnodeData === null ? {} : vnodeData,
394
530
  vNodeChildren,
@@ -400,10 +536,10 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
400
536
  if (vNodeChildren.length > 0) {
401
537
  vnode.$children$ = vNodeChildren;
402
538
  }
403
- if (BUILD7.vdomKey) {
539
+ if (BUILD8.vdomKey) {
404
540
  vnode.$key$ = key;
405
541
  }
406
- if (BUILD7.slotRelocation) {
542
+ if (BUILD8.slotRelocation) {
407
543
  vnode.$name$ = slotName;
408
544
  }
409
545
  return vnode;
@@ -416,13 +552,13 @@ var newVNode = (tag, text) => {
416
552
  $elm$: null,
417
553
  $children$: null
418
554
  };
419
- if (BUILD7.vdomAttribute) {
555
+ if (BUILD8.vdomAttribute) {
420
556
  vnode.$attrs$ = null;
421
557
  }
422
- if (BUILD7.vdomKey) {
558
+ if (BUILD8.vdomKey) {
423
559
  vnode.$key$ = null;
424
560
  }
425
- if (BUILD7.slotRelocation) {
561
+ if (BUILD8.slotRelocation) {
426
562
  vnode.$name$ = null;
427
563
  }
428
564
  return vnode;
@@ -475,28 +611,35 @@ var validateInputProperties = (inputElm) => {
475
611
  };
476
612
 
477
613
  // src/runtime/vdom/update-element.ts
478
- import { BUILD as BUILD9 } from "@rindo/core/internal/app-data";
614
+ import { BUILD as BUILD10 } from "@rindo/core/internal/app-data";
479
615
 
480
616
  // src/runtime/vdom/set-accessor.ts
481
- import { BUILD as BUILD8 } from "@rindo/core/internal/app-data";
617
+ import { BUILD as BUILD9 } from "@rindo/core/internal/app-data";
482
618
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
483
619
  if (oldValue !== newValue) {
484
620
  let isProp = isMemberInElement(elm, memberName);
485
621
  let ln = memberName.toLowerCase();
486
- if (BUILD8.vdomClass && memberName === "class") {
622
+ if (BUILD9.vdomClass && memberName === "class") {
487
623
  const classList = elm.classList;
488
624
  const oldClasses = parseClassList(oldValue);
489
- const newClasses = parseClassList(newValue);
490
- if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
625
+ let newClasses = parseClassList(newValue);
626
+ if (elm["s-si"]) {
491
627
  newClasses.push(elm["s-si"]);
628
+ oldClasses.forEach((c) => {
629
+ if (c.startsWith(elm["s-si"])) newClasses.push(c);
630
+ });
631
+ newClasses = [...new Set(newClasses)];
632
+ classList.add(...newClasses);
633
+ delete elm["s-si"];
634
+ } else {
635
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
636
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
492
637
  }
493
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
494
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
495
- } else if (BUILD8.vdomStyle && memberName === "style") {
496
- if (BUILD8.updatable) {
638
+ } else if (BUILD9.vdomStyle && memberName === "style") {
639
+ if (BUILD9.updatable) {
497
640
  for (const prop in oldValue) {
498
641
  if (!newValue || newValue[prop] == null) {
499
- if (!BUILD8.hydrateServerSide && prop.includes("-")) {
642
+ if (!BUILD9.hydrateServerSide && prop.includes("-")) {
500
643
  elm.style.removeProperty(prop);
501
644
  } else {
502
645
  elm.style[prop] = "";
@@ -506,19 +649,19 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
506
649
  }
507
650
  for (const prop in newValue) {
508
651
  if (!oldValue || newValue[prop] !== oldValue[prop]) {
509
- if (!BUILD8.hydrateServerSide && prop.includes("-")) {
652
+ if (!BUILD9.hydrateServerSide && prop.includes("-")) {
510
653
  elm.style.setProperty(prop, newValue[prop]);
511
654
  } else {
512
655
  elm.style[prop] = newValue[prop];
513
656
  }
514
657
  }
515
658
  }
516
- } else if (BUILD8.vdomKey && memberName === "key") {
517
- } else if (BUILD8.vdomRef && memberName === "ref") {
659
+ } else if (BUILD9.vdomKey && memberName === "key") {
660
+ } else if (BUILD9.vdomRef && memberName === "ref") {
518
661
  if (newValue) {
519
662
  newValue(elm);
520
663
  }
521
- } else if (BUILD8.vdomListener && (BUILD8.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
664
+ } else if (BUILD9.vdomListener && (BUILD9.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
522
665
  if (memberName[2] === "-") {
523
666
  memberName = memberName.slice(3);
524
667
  } else if (isMemberInElement(win, ln)) {
@@ -536,7 +679,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
536
679
  plt.ael(elm, memberName, newValue, capture);
537
680
  }
538
681
  }
539
- } else if (BUILD8.vdomPropOrAttr) {
682
+ } else if (BUILD9.vdomPropOrAttr) {
540
683
  const isComplex = isComplexType(newValue);
541
684
  if ((isProp || isComplex && newValue !== null) && !isSvg) {
542
685
  try {
@@ -558,7 +701,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
558
701
  }
559
702
  }
560
703
  let xlink = false;
561
- if (BUILD8.vdomXlink) {
704
+ if (BUILD9.vdomXlink) {
562
705
  if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
563
706
  memberName = ln;
564
707
  xlink = true;
@@ -566,7 +709,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
566
709
  }
567
710
  if (newValue == null || newValue === false) {
568
711
  if (newValue !== false || elm.getAttribute(memberName) === "") {
569
- if (BUILD8.vdomXlink && xlink) {
712
+ if (BUILD9.vdomXlink && xlink) {
570
713
  elm.removeAttributeNS(XLINK_NS, memberName);
571
714
  } else {
572
715
  elm.removeAttribute(memberName);
@@ -574,7 +717,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
574
717
  }
575
718
  } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
576
719
  newValue = newValue === true ? "" : newValue;
577
- if (BUILD8.vdomXlink && xlink) {
720
+ if (BUILD9.vdomXlink && xlink) {
578
721
  elm.setAttributeNS(XLINK_NS, memberName, newValue);
579
722
  } else {
580
723
  elm.setAttribute(memberName, newValue);
@@ -584,7 +727,15 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
584
727
  }
585
728
  };
586
729
  var parseClassListRegex = /\s/;
587
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
730
+ var parseClassList = (value) => {
731
+ if (typeof value === "object" && "baseVal" in value) {
732
+ value = value.baseVal;
733
+ }
734
+ if (!value) {
735
+ return [];
736
+ }
737
+ return value.split(parseClassListRegex);
738
+ };
588
739
  var CAPTURE_EVENT_SUFFIX = "Capture";
589
740
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
590
741
 
@@ -593,7 +744,7 @@ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
593
744
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
594
745
  const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
595
746
  const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
596
- if (BUILD9.updatable) {
747
+ if (BUILD10.updatable) {
597
748
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
598
749
  if (!(memberName in newVnodeAttrs)) {
599
750
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
@@ -622,19 +773,16 @@ var useNativeShadowDom = false;
622
773
  var checkSlotFallbackVisibility = false;
623
774
  var checkSlotRelocate = false;
624
775
  var isSvgMode = false;
625
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
776
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
626
777
  var _a;
627
778
  const newVNode2 = newParentVNode.$children$[childIndex];
628
779
  let i2 = 0;
629
780
  let elm;
630
781
  let childNode;
631
782
  let oldVNode;
632
- if (BUILD10.slotRelocation && !useNativeShadowDom) {
783
+ if (BUILD11.slotRelocation && !useNativeShadowDom) {
633
784
  checkSlotRelocate = true;
634
785
  if (newVNode2.$tag$ === "slot") {
635
- if (scopeId) {
636
- parentElm.classList.add(scopeId + "-s");
637
- }
638
786
  newVNode2.$flags$ |= newVNode2.$children$ ? (
639
787
  // slot element has fallback content
640
788
  // still create an element that "mocks" the slot element
@@ -647,48 +795,43 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
647
795
  );
648
796
  }
649
797
  }
650
- if (BUILD10.isDev && newVNode2.$elm$) {
798
+ if (BUILD11.isDev && newVNode2.$elm$) {
651
799
  consoleDevError(
652
800
  `The JSX ${newVNode2.$text$ !== null ? `"${newVNode2.$text$}" text` : `"${newVNode2.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://rindojs.web.app/docs/templating-jsx#avoid-shared-jsx-nodes`
653
801
  );
654
802
  }
655
- if (BUILD10.vdomText && newVNode2.$text$ !== null) {
803
+ if (BUILD11.vdomText && newVNode2.$text$ !== null) {
656
804
  elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
657
- } else if (BUILD10.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
658
- elm = newVNode2.$elm$ = BUILD10.isDebug || BUILD10.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : doc.createTextNode("");
805
+ } else if (BUILD11.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
806
+ elm = newVNode2.$elm$ = BUILD11.isDebug || BUILD11.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : doc.createTextNode("");
659
807
  } else {
660
- if (BUILD10.svg && !isSvgMode) {
808
+ if (BUILD11.svg && !isSvgMode) {
661
809
  isSvgMode = newVNode2.$tag$ === "svg";
662
810
  }
663
- elm = newVNode2.$elm$ = BUILD10.svg ? doc.createElementNS(
811
+ elm = newVNode2.$elm$ = BUILD11.svg ? doc.createElementNS(
664
812
  isSvgMode ? SVG_NS : HTML_NS,
665
- !useNativeShadowDom && BUILD10.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
813
+ !useNativeShadowDom && BUILD11.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
666
814
  ) : doc.createElement(
667
- !useNativeShadowDom && BUILD10.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
815
+ !useNativeShadowDom && BUILD11.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
668
816
  );
669
- if (BUILD10.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
817
+ if (BUILD11.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
670
818
  isSvgMode = false;
671
819
  }
672
- if (BUILD10.vdomAttribute) {
820
+ if (BUILD11.vdomAttribute) {
673
821
  updateElement(null, newVNode2, isSvgMode);
674
822
  }
675
- const rootNode = elm.getRootNode();
676
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
677
- if (!isElementWithinShadowRoot && BUILD10.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
823
+ if (BUILD11.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
678
824
  elm.classList.add(elm["s-si"] = scopeId);
679
825
  }
680
- if (BUILD10.scoped) {
681
- updateElementScopeIds(elm, parentElm);
682
- }
683
826
  if (newVNode2.$children$) {
684
827
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
685
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
828
+ childNode = createElm(oldParentVNode, newVNode2, i2);
686
829
  if (childNode) {
687
830
  elm.appendChild(childNode);
688
831
  }
689
832
  }
690
833
  }
691
- if (BUILD10.svg) {
834
+ if (BUILD11.svg) {
692
835
  if (newVNode2.$tag$ === "svg") {
693
836
  isSvgMode = false;
694
837
  } else if (elm.tagName === "foreignObject") {
@@ -697,7 +840,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
697
840
  }
698
841
  }
699
842
  elm["s-hn"] = hostTagName;
700
- if (BUILD10.slotRelocation) {
843
+ if (BUILD11.slotRelocation) {
701
844
  if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
702
845
  elm["s-sr"] = true;
703
846
  elm["s-cr"] = contentRef;
@@ -705,12 +848,15 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
705
848
  elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
706
849
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
707
850
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
708
- if (BUILD10.experimentalSlotFixes) {
851
+ if (BUILD11.experimentalSlotFixes) {
709
852
  relocateToHostRoot(oldParentVNode.$elm$);
710
853
  } else {
711
854
  putBackInOriginalLocation(oldParentVNode.$elm$, false);
712
855
  }
713
856
  }
857
+ if (BUILD11.scoped) {
858
+ addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
859
+ }
714
860
  }
715
861
  }
716
862
  return elm;
@@ -738,7 +884,7 @@ var relocateToHostRoot = (parentElm) => {
738
884
  var putBackInOriginalLocation = (parentElm, recursive) => {
739
885
  plt.$flags$ |= 1 /* isTmpDisconnected */;
740
886
  const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
741
- if (parentElm["s-sr"] && BUILD10.experimentalSlotFixes) {
887
+ if (parentElm["s-sr"] && BUILD11.experimentalSlotFixes) {
742
888
  let node = parentElm;
743
889
  while (node = node.nextSibling) {
744
890
  if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
@@ -749,7 +895,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
749
895
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
750
896
  const childNode = oldSlotChildNodes[i2];
751
897
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
752
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
898
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
753
899
  childNode["s-ol"].remove();
754
900
  childNode["s-ol"] = void 0;
755
901
  childNode["s-sh"] = void 0;
@@ -762,17 +908,17 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
762
908
  plt.$flags$ &= ~1 /* isTmpDisconnected */;
763
909
  };
764
910
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
765
- let containerElm = BUILD10.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
911
+ let containerElm = BUILD11.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
766
912
  let childNode;
767
- if (BUILD10.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
913
+ if (BUILD11.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
768
914
  containerElm = containerElm.shadowRoot;
769
915
  }
770
916
  for (; startIdx <= endIdx; ++startIdx) {
771
917
  if (vnodes[startIdx]) {
772
- childNode = createElm(null, parentVNode, startIdx, parentElm);
918
+ childNode = createElm(null, parentVNode, startIdx);
773
919
  if (childNode) {
774
920
  vnodes[startIdx].$elm$ = childNode;
775
- insertBefore(containerElm, childNode, BUILD10.slotRelocation ? referenceNode(before) : before);
921
+ insertBefore(containerElm, childNode, BUILD11.slotRelocation ? referenceNode(before) : before);
776
922
  }
777
923
  }
778
924
  }
@@ -784,7 +930,7 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
784
930
  const elm = vnode.$elm$;
785
931
  nullifyVNodeRefs(vnode);
786
932
  if (elm) {
787
- if (BUILD10.slotRelocation) {
933
+ if (BUILD11.slotRelocation) {
788
934
  checkSlotFallbackVisibility = true;
789
935
  if (elm["s-ol"]) {
790
936
  elm["s-ol"].remove();
@@ -828,7 +974,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
828
974
  oldEndVnode = oldCh[--oldEndIdx];
829
975
  newEndVnode = newCh[--newEndIdx];
830
976
  } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
831
- if (BUILD10.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
977
+ if (BUILD11.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
832
978
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
833
979
  }
834
980
  patch(oldStartVnode, newEndVnode, isInitialRender);
@@ -836,7 +982,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
836
982
  oldStartVnode = oldCh[++oldStartIdx];
837
983
  newEndVnode = newCh[--newEndIdx];
838
984
  } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
839
- if (BUILD10.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
985
+ if (BUILD11.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
840
986
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
841
987
  }
842
988
  patch(oldEndVnode, newStartVnode, isInitialRender);
@@ -845,7 +991,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
845
991
  newStartVnode = newCh[++newStartIdx];
846
992
  } else {
847
993
  idxInOld = -1;
848
- if (BUILD10.vdomKey) {
994
+ if (BUILD11.vdomKey) {
849
995
  for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
850
996
  if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
851
997
  idxInOld = i2;
@@ -853,10 +999,10 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
853
999
  }
854
1000
  }
855
1001
  }
856
- if (BUILD10.vdomKey && idxInOld >= 0) {
1002
+ if (BUILD11.vdomKey && idxInOld >= 0) {
857
1003
  elmToMove = oldCh[idxInOld];
858
1004
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
859
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
1005
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
860
1006
  } else {
861
1007
  patch(elmToMove, newStartVnode, isInitialRender);
862
1008
  oldCh[idxInOld] = void 0;
@@ -864,12 +1010,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
864
1010
  }
865
1011
  newStartVnode = newCh[++newStartIdx];
866
1012
  } else {
867
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
1013
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
868
1014
  newStartVnode = newCh[++newStartIdx];
869
1015
  }
870
1016
  if (node) {
871
- if (BUILD10.slotRelocation) {
872
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
1017
+ if (BUILD11.slotRelocation) {
1018
+ insertBefore(
1019
+ referenceNode(oldStartVnode.$elm$).parentNode,
1020
+ node,
1021
+ referenceNode(oldStartVnode.$elm$)
1022
+ );
873
1023
  } else {
874
1024
  insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
875
1025
  }
@@ -885,35 +1035,26 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
885
1035
  newStartIdx,
886
1036
  newEndIdx
887
1037
  );
888
- } else if (BUILD10.updatable && newStartIdx > newEndIdx) {
1038
+ } else if (BUILD11.updatable && newStartIdx > newEndIdx) {
889
1039
  removeVnodes(oldCh, oldStartIdx, oldEndIdx);
890
1040
  }
891
1041
  };
892
1042
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
893
1043
  if (leftVNode.$tag$ === rightVNode.$tag$) {
894
- if (BUILD10.slotRelocation && leftVNode.$tag$ === "slot") {
895
- if (
896
- // The component gets hydrated and no VDOM has been initialized.
897
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
898
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
899
- // hydration comments to be removed
900
- leftVNode.$elm$.nodeType !== 8
901
- ) {
902
- return false;
903
- }
1044
+ if (BUILD11.slotRelocation && leftVNode.$tag$ === "slot") {
904
1045
  return leftVNode.$name$ === rightVNode.$name$;
905
1046
  }
906
- if (BUILD10.vdomKey && !isInitialRender) {
1047
+ if (BUILD11.vdomKey && !isInitialRender) {
907
1048
  return leftVNode.$key$ === rightVNode.$key$;
908
1049
  }
1050
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
1051
+ leftVNode.$key$ = rightVNode.$key$;
1052
+ }
909
1053
  return true;
910
1054
  }
911
1055
  return false;
912
1056
  };
913
- var referenceNode = (node) => {
914
- return node && node["s-ol"] || node;
915
- };
916
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
1057
+ var referenceNode = (node) => node && node["s-ol"] || node;
917
1058
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
918
1059
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
919
1060
  const oldChildren = oldVNode.$children$;
@@ -921,13 +1062,13 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
921
1062
  const tag = newVNode2.$tag$;
922
1063
  const text = newVNode2.$text$;
923
1064
  let defaultHolder;
924
- if (!BUILD10.vdomText || text === null) {
925
- if (BUILD10.svg) {
1065
+ if (!BUILD11.vdomText || text === null) {
1066
+ if (BUILD11.svg) {
926
1067
  isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
927
1068
  }
928
- if (BUILD10.vdomAttribute || BUILD10.reflect) {
929
- if (BUILD10.slot && tag === "slot" && !useNativeShadowDom) {
930
- if (BUILD10.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
1069
+ if (BUILD11.vdomAttribute || BUILD11.reflect) {
1070
+ if (BUILD11.slot && tag === "slot" && !useNativeShadowDom) {
1071
+ if (BUILD11.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
931
1072
  newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
932
1073
  relocateToHostRoot(newVNode2.$elm$.parentElement);
933
1074
  }
@@ -935,55 +1076,28 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
935
1076
  updateElement(oldVNode, newVNode2, isSvgMode);
936
1077
  }
937
1078
  }
938
- if (BUILD10.updatable && oldChildren !== null && newChildren !== null) {
1079
+ if (BUILD11.updatable && oldChildren !== null && newChildren !== null) {
939
1080
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
940
1081
  } else if (newChildren !== null) {
941
- if (BUILD10.updatable && BUILD10.vdomText && oldVNode.$text$ !== null) {
1082
+ if (BUILD11.updatable && BUILD11.vdomText && oldVNode.$text$ !== null) {
942
1083
  elm.textContent = "";
943
1084
  }
944
1085
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
945
1086
  } else if (
946
1087
  // don't do this on initial render as it can cause non-hydrated content to be removed
947
- !isInitialRender && BUILD10.updatable && oldChildren !== null
1088
+ !isInitialRender && BUILD11.updatable && oldChildren !== null
948
1089
  ) {
949
1090
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
950
1091
  }
951
- if (BUILD10.svg && isSvgMode && tag === "svg") {
1092
+ if (BUILD11.svg && isSvgMode && tag === "svg") {
952
1093
  isSvgMode = false;
953
1094
  }
954
- } else if (BUILD10.vdomText && BUILD10.slotRelocation && (defaultHolder = elm["s-cr"])) {
1095
+ } else if (BUILD11.vdomText && BUILD11.slotRelocation && (defaultHolder = elm["s-cr"])) {
955
1096
  defaultHolder.parentNode.textContent = text;
956
- } else if (BUILD10.vdomText && oldVNode.$text$ !== text) {
1097
+ } else if (BUILD11.vdomText && oldVNode.$text$ !== text) {
957
1098
  elm.data = text;
958
1099
  }
959
1100
  };
960
- var updateFallbackSlotVisibility = (elm) => {
961
- const childNodes = elm.__childNodes || elm.childNodes;
962
- for (const childNode of childNodes) {
963
- if (childNode.nodeType === 1 /* ElementNode */) {
964
- if (childNode["s-sr"]) {
965
- const slotName = childNode["s-sn"];
966
- childNode.hidden = false;
967
- for (const siblingNode of childNodes) {
968
- if (siblingNode !== childNode) {
969
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
970
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
971
- childNode.hidden = true;
972
- break;
973
- }
974
- } else if (slotName === siblingNode["s-sn"]) {
975
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
976
- childNode.hidden = true;
977
- break;
978
- }
979
- }
980
- }
981
- }
982
- }
983
- updateFallbackSlotVisibility(childNode);
984
- }
985
- }
986
- };
987
1101
  var relocateNodes = [];
988
1102
  var markSlotContentForRelocation = (elm) => {
989
1103
  let node;
@@ -996,7 +1110,7 @@ var markSlotContentForRelocation = (elm) => {
996
1110
  const slotName = childNode["s-sn"];
997
1111
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
998
1112
  node = hostContentNodes[j];
999
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD10.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
1113
+ if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD11.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
1000
1114
  if (isNodeLocatedInSlot(node, slotName)) {
1001
1115
  let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1002
1116
  checkSlotFallbackVisibility = true;
@@ -1034,60 +1148,40 @@ var markSlotContentForRelocation = (elm) => {
1034
1148
  }
1035
1149
  }
1036
1150
  };
1037
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1038
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1039
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1040
- return true;
1041
- }
1042
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1043
- return true;
1044
- }
1045
- return false;
1046
- }
1047
- if (nodeToRelocate["s-sn"] === slotName) {
1048
- return true;
1049
- }
1050
- return slotName === "";
1051
- };
1052
1151
  var nullifyVNodeRefs = (vNode) => {
1053
- if (BUILD10.vdomRef) {
1152
+ if (BUILD11.vdomRef) {
1054
1153
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1055
1154
  vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1056
1155
  }
1057
1156
  };
1058
1157
  var insertBefore = (parent, newNode, reference) => {
1059
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1060
- if (BUILD10.scoped) {
1061
- updateElementScopeIds(newNode, parent);
1158
+ if (BUILD11.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
1159
+ addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
1062
1160
  }
1161
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1063
1162
  return inserted;
1064
1163
  };
1065
- var findScopeIds = (element) => {
1066
- const scopeIds = [];
1067
- if (element) {
1068
- scopeIds.push(
1069
- ...element["s-scs"] || [],
1070
- element["s-si"],
1071
- element["s-sc"],
1072
- ...findScopeIds(element.parentElement)
1073
- );
1074
- }
1075
- return scopeIds;
1076
- };
1077
- var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1164
+ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
1078
1165
  var _a;
1079
- if (element && parent && element.nodeType === 1 /* ElementNode */) {
1080
- const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1081
- if (scopeIds.size) {
1082
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = Array.from(scopeIds));
1083
- if (element["s-ol"] || iterateChildNodes) {
1084
- for (const childNode of Array.from(element.__childNodes || element.childNodes)) {
1085
- updateElementScopeIds(childNode, element, true);
1166
+ let scopeId2;
1167
+ if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
1168
+ const scopeName = slotNode["s-sn"];
1169
+ const hostName = slotNode["s-hn"];
1170
+ (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
1171
+ if (oldParent && oldParent.classList.contains(scopeId2 + "-s")) {
1172
+ let child = (oldParent.__childNodes || oldParent.childNodes)[0];
1173
+ let found = false;
1174
+ while (child) {
1175
+ if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
1176
+ found = true;
1177
+ break;
1086
1178
  }
1179
+ child = child.nextSibling;
1087
1180
  }
1181
+ if (!found) oldParent.classList.remove(scopeId2 + "-s");
1088
1182
  }
1089
1183
  }
1090
- };
1184
+ }
1091
1185
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1092
1186
  var _a, _b, _c, _d, _e;
1093
1187
  const hostElm = hostRef.$hostElement$;
@@ -1095,7 +1189,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1095
1189
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1096
1190
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1097
1191
  hostTagName = hostElm.tagName;
1098
- if (BUILD10.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
1192
+ if (BUILD11.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
1099
1193
  throw new Error(`The <Host> must be the single root component.
1100
1194
  Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
1101
1195
 
@@ -1109,7 +1203,7 @@ render() {
1109
1203
  }
1110
1204
  `);
1111
1205
  }
1112
- if (BUILD10.reflect && cmpMeta.$attrsToReflect$) {
1206
+ if (BUILD11.reflect && cmpMeta.$attrsToReflect$) {
1113
1207
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1114
1208
  cmpMeta.$attrsToReflect$.map(
1115
1209
  ([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
@@ -1125,24 +1219,24 @@ render() {
1125
1219
  rootVnode.$tag$ = null;
1126
1220
  rootVnode.$flags$ |= 4 /* isHost */;
1127
1221
  hostRef.$vnode$ = rootVnode;
1128
- rootVnode.$elm$ = oldVNode.$elm$ = BUILD10.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
1129
- if (BUILD10.scoped || BUILD10.shadowDom) {
1222
+ rootVnode.$elm$ = oldVNode.$elm$ = BUILD11.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
1223
+ if (BUILD11.scoped || BUILD11.shadowDom) {
1130
1224
  scopeId = hostElm["s-sc"];
1131
1225
  }
1132
1226
  useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
1133
- if (BUILD10.slotRelocation) {
1227
+ if (BUILD11.slotRelocation) {
1134
1228
  contentRef = hostElm["s-cr"];
1135
1229
  checkSlotFallbackVisibility = false;
1136
1230
  }
1137
1231
  patch(oldVNode, rootVnode, isInitialLoad);
1138
- if (BUILD10.slotRelocation) {
1232
+ if (BUILD11.slotRelocation) {
1139
1233
  plt.$flags$ |= 1 /* isTmpDisconnected */;
1140
1234
  if (checkSlotRelocate) {
1141
1235
  markSlotContentForRelocation(rootVnode.$elm$);
1142
1236
  for (const relocateData of relocateNodes) {
1143
1237
  const nodeToRelocate = relocateData.$nodeToRelocate$;
1144
1238
  if (!nodeToRelocate["s-ol"]) {
1145
- const orgLocationNode = BUILD10.isDebug || BUILD10.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
1239
+ const orgLocationNode = BUILD11.isDebug || BUILD11.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
1146
1240
  orgLocationNode["s-nr"] = nodeToRelocate;
1147
1241
  insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1148
1242
  }
@@ -1153,7 +1247,7 @@ render() {
1153
1247
  if (slotRefNode) {
1154
1248
  const parentNodeRef = slotRefNode.parentNode;
1155
1249
  let insertBeforeNode = slotRefNode.nextSibling;
1156
- if (!BUILD10.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
1250
+ if (!BUILD11.hydrateServerSide && (!BUILD11.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1157
1251
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1158
1252
  while (orgLocationNode) {
1159
1253
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
@@ -1172,11 +1266,11 @@ render() {
1172
1266
  }
1173
1267
  if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1174
1268
  if (nodeToRelocate !== insertBeforeNode) {
1175
- if (!BUILD10.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1269
+ if (!BUILD11.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1176
1270
  nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1177
1271
  }
1178
1272
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1179
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1273
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1180
1274
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1181
1275
  }
1182
1276
  }
@@ -1198,7 +1292,7 @@ render() {
1198
1292
  plt.$flags$ &= ~1 /* isTmpDisconnected */;
1199
1293
  relocateNodes.length = 0;
1200
1294
  }
1201
- if (BUILD10.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1295
+ if (BUILD11.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1202
1296
  const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
1203
1297
  for (const childNode of children) {
1204
1298
  if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
@@ -1235,9 +1329,9 @@ var patchCloneNode = (HostElementPrototype) => {
1235
1329
  const orgCloneNode = HostElementPrototype.cloneNode;
1236
1330
  HostElementPrototype.cloneNode = function(deep) {
1237
1331
  const srcNode = this;
1238
- const isShadowDom = BUILD11.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
1332
+ const isShadowDom = BUILD12.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
1239
1333
  const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1240
- if (BUILD11.slot && !isShadowDom && deep) {
1334
+ if (BUILD12.slot && !isShadowDom && deep) {
1241
1335
  let i2 = 0;
1242
1336
  let slotted, nonRindoNode;
1243
1337
  const rindoPrivates = [
@@ -1262,7 +1356,7 @@ var patchCloneNode = (HostElementPrototype) => {
1262
1356
  slotted = childNodes[i2]["s-nr"];
1263
1357
  nonRindoNode = rindoPrivates.every((privateField) => !childNodes[i2][privateField]);
1264
1358
  if (slotted) {
1265
- if (BUILD11.appendChildSlotFix && clonedNode.__appendChild) {
1359
+ if (BUILD12.appendChildSlotFix && clonedNode.__appendChild) {
1266
1360
  clonedNode.__appendChild(slotted.cloneNode(true));
1267
1361
  } else {
1268
1362
  clonedNode.appendChild(slotted.cloneNode(true));
@@ -1280,7 +1374,7 @@ var patchSlotAppendChild = (HostElementPrototype) => {
1280
1374
  HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1281
1375
  HostElementPrototype.appendChild = function(newChild) {
1282
1376
  const slotName = newChild["s-sn"] = getSlotName(newChild);
1283
- const slotNode = getHostSlotNode(this.__childNodes || this.childNodes, slotName, this.tagName);
1377
+ const slotNode = getHostSlotNodes(this.__childNodes || this.childNodes, this.tagName, slotName)[0];
1284
1378
  if (slotNode) {
1285
1379
  addSlotRelocateNode(newChild, slotNode);
1286
1380
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
@@ -1297,7 +1391,7 @@ var patchSlotRemoveChild = (ElementPrototype) => {
1297
1391
  ElementPrototype.removeChild = function(toRemove) {
1298
1392
  if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1299
1393
  const childNodes = this.__childNodes || this.childNodes;
1300
- const slotNode = getHostSlotNode(childNodes, toRemove["s-sn"], this.tagName);
1394
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
1301
1395
  if (slotNode && toRemove.isConnected) {
1302
1396
  toRemove.remove();
1303
1397
  updateFallbackSlotVisibility(this);
@@ -1316,7 +1410,7 @@ var patchSlotPrepend = (HostElementPrototype) => {
1316
1410
  }
1317
1411
  const slotName = newChild["s-sn"] = getSlotName(newChild);
1318
1412
  const childNodes = this.__childNodes || this.childNodes;
1319
- const slotNode = getHostSlotNode(childNodes, slotName, this.tagName);
1413
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
1320
1414
  if (slotNode) {
1321
1415
  addSlotRelocateNode(newChild, slotNode, true);
1322
1416
  const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
@@ -1383,11 +1477,7 @@ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
1383
1477
  };
1384
1478
  };
1385
1479
  var patchTextContent = (hostElementPrototype) => {
1386
- let descriptor = globalThis.Node && Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
1387
- if (!descriptor) {
1388
- descriptor = Object.getOwnPropertyDescriptor(hostElementPrototype, "textContent");
1389
- }
1390
- if (descriptor) Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
1480
+ patchHostOriginalAccessor("textContent", hostElementPrototype);
1391
1481
  Object.defineProperty(hostElementPrototype, "textContent", {
1392
1482
  get: function() {
1393
1483
  let text = "";
@@ -1411,16 +1501,7 @@ var patchChildSlotNodes = (elm) => {
1411
1501
  return this[n];
1412
1502
  }
1413
1503
  }
1414
- let childNodesFn = globalThis.Node && Object.getOwnPropertyDescriptor(Node.prototype, "childNodes");
1415
- if (!childNodesFn) {
1416
- childNodesFn = Object.getOwnPropertyDescriptor(elm, "childNodes");
1417
- }
1418
- if (childNodesFn) Object.defineProperty(elm, "__childNodes", childNodesFn);
1419
- let childrenFn = Object.getOwnPropertyDescriptor(Element.prototype, "children");
1420
- if (!childrenFn) {
1421
- childrenFn = Object.getOwnPropertyDescriptor(elm, "children");
1422
- }
1423
- if (childrenFn) Object.defineProperty(elm, "__children", childrenFn);
1504
+ patchHostOriginalAccessor("children", elm);
1424
1505
  Object.defineProperty(elm, "children", {
1425
1506
  get() {
1426
1507
  return this.childNodes.filter((n) => n.nodeType === 1);
@@ -1431,7 +1512,19 @@ var patchChildSlotNodes = (elm) => {
1431
1512
  return this.children.length;
1432
1513
  }
1433
1514
  });
1434
- if (!childNodesFn) return;
1515
+ patchHostOriginalAccessor("firstChild", elm);
1516
+ Object.defineProperty(elm, "firstChild", {
1517
+ get() {
1518
+ return this.childNodes[0];
1519
+ }
1520
+ });
1521
+ patchHostOriginalAccessor("lastChild", elm);
1522
+ Object.defineProperty(elm, "lastChild", {
1523
+ get() {
1524
+ return this.childNodes[this.childNodes.length - 1];
1525
+ }
1526
+ });
1527
+ patchHostOriginalAccessor("childNodes", elm);
1435
1528
  Object.defineProperty(elm, "childNodes", {
1436
1529
  get() {
1437
1530
  var _a, _b;
@@ -1445,77 +1538,102 @@ var patchChildSlotNodes = (elm) => {
1445
1538
  }
1446
1539
  });
1447
1540
  };
1448
- var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
1449
- let slottedNodeLocation;
1450
- if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
1451
- slottedNodeLocation = newChild["s-ol"];
1452
- } else {
1453
- slottedNodeLocation = document.createTextNode("");
1454
- slottedNodeLocation["s-nr"] = newChild;
1541
+ var patchNextPrev = (node) => {
1542
+ if (!node || node.__nextSibling || !globalThis.Node) return;
1543
+ patchNextSibling(node);
1544
+ patchPreviousSibling(node);
1545
+ if (node.nodeType === Node.ELEMENT_NODE) {
1546
+ patchNextElementSibling(node);
1547
+ patchPreviousElementSibling(node);
1455
1548
  }
1456
- if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
1457
- const parent = slotNode["s-cr"].parentNode;
1458
- const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
1459
- if (typeof position !== "undefined") {
1460
- if (BUILD11.hydrateClientSide) {
1461
- slottedNodeLocation["s-oo"] = position;
1462
- const childNodes = parent.__childNodes || parent.childNodes;
1463
- const slotRelocateNodes = [slottedNodeLocation];
1464
- childNodes.forEach((n) => {
1465
- if (n["s-nr"]) slotRelocateNodes.push(n);
1466
- });
1467
- slotRelocateNodes.sort((a, b) => {
1468
- if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
1469
- else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
1470
- return 0;
1471
- });
1472
- slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
1549
+ };
1550
+ var patchNextSibling = (node) => {
1551
+ if (!node || node.__nextSibling) return;
1552
+ patchHostOriginalAccessor("nextSibling", node);
1553
+ Object.defineProperty(node, "nextSibling", {
1554
+ get: function() {
1555
+ var _a;
1556
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1557
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1558
+ if (parentNodes && index > -1) {
1559
+ return parentNodes[index + 1];
1560
+ }
1561
+ return this.__nextSibling;
1473
1562
  }
1474
- } else {
1475
- appendMethod.call(parent, slottedNodeLocation);
1476
- }
1477
- newChild["s-ol"] = slottedNodeLocation;
1478
- newChild["s-sh"] = slotNode["s-hn"];
1563
+ });
1479
1564
  };
1480
- var getSlottedChildNodes = (childNodes) => {
1481
- const result = [];
1482
- for (let i2 = 0; i2 < childNodes.length; i2++) {
1483
- const slottedNode = childNodes[i2]["s-nr"];
1484
- if (slottedNode && slottedNode.isConnected) {
1485
- result.push(slottedNode);
1565
+ var patchNextElementSibling = (element) => {
1566
+ if (!element || element.__nextElementSibling) return;
1567
+ patchHostOriginalAccessor("nextElementSibling", element);
1568
+ Object.defineProperty(element, "nextElementSibling", {
1569
+ get: function() {
1570
+ var _a;
1571
+ const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1572
+ const index = parentEles == null ? void 0 : parentEles.indexOf(this);
1573
+ if (parentEles && index > -1) {
1574
+ return parentEles[index + 1];
1575
+ }
1576
+ return this.__nextElementSibling;
1486
1577
  }
1487
- }
1488
- return result;
1578
+ });
1489
1579
  };
1490
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
1491
- var getHostSlotNode = (childNodes, slotName, hostName) => {
1492
- let i2 = 0;
1493
- let childNode;
1494
- for (; i2 < childNodes.length; i2++) {
1495
- childNode = childNodes[i2];
1496
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
1497
- return childNode;
1580
+ var patchPreviousSibling = (node) => {
1581
+ if (!node || node.__previousSibling) return;
1582
+ patchHostOriginalAccessor("previousSibling", node);
1583
+ Object.defineProperty(node, "previousSibling", {
1584
+ get: function() {
1585
+ var _a;
1586
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1587
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1588
+ if (parentNodes && index > -1) {
1589
+ return parentNodes[index - 1];
1590
+ }
1591
+ return this.__previousSibling;
1498
1592
  }
1499
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
1500
- if (childNode) {
1501
- return childNode;
1593
+ });
1594
+ };
1595
+ var patchPreviousElementSibling = (element) => {
1596
+ if (!element || element.__previousElementSibling) return;
1597
+ patchHostOriginalAccessor("previousElementSibling", element);
1598
+ Object.defineProperty(element, "previousElementSibling", {
1599
+ get: function() {
1600
+ var _a;
1601
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1602
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1603
+ if (parentNodes && index > -1) {
1604
+ return parentNodes[index - 1];
1605
+ }
1606
+ return this.__previousElementSibling;
1502
1607
  }
1503
- }
1504
- return null;
1608
+ });
1505
1609
  };
1506
- var getHostSlotChildNodes = (n, slotName) => {
1507
- const childNodes = [n];
1508
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
1509
- childNodes.push(n);
1610
+ var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1611
+ var validNodesPatches = [
1612
+ "childNodes",
1613
+ "firstChild",
1614
+ "lastChild",
1615
+ "nextSibling",
1616
+ "previousSibling",
1617
+ "textContent"
1618
+ ];
1619
+ function patchHostOriginalAccessor(accessorName, node) {
1620
+ let accessor;
1621
+ if (validElementPatches.includes(accessorName)) {
1622
+ accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
1623
+ } else if (validNodesPatches.includes(accessorName)) {
1624
+ accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
1510
1625
  }
1511
- return childNodes;
1512
- };
1626
+ if (!accessor) {
1627
+ accessor = Object.getOwnPropertyDescriptor(node, accessorName);
1628
+ }
1629
+ if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1630
+ }
1513
1631
 
1514
1632
  // src/runtime/profile.ts
1515
- import { BUILD as BUILD12 } from "@rindo/core/internal/app-data";
1633
+ import { BUILD as BUILD13 } from "@rindo/core/internal/app-data";
1516
1634
  var i = 0;
1517
1635
  var createTime = (fnName, tagName = "") => {
1518
- if (BUILD12.profile && performance.mark) {
1636
+ if (BUILD13.profile && performance.mark) {
1519
1637
  const key = `st:${fnName}:${tagName}:${i++}`;
1520
1638
  performance.mark(key);
1521
1639
  return () => performance.measure(`[Rindo] ${fnName}() <${tagName}>`, key);
@@ -1526,7 +1644,7 @@ var createTime = (fnName, tagName = "") => {
1526
1644
  }
1527
1645
  };
1528
1646
  var uniqueTime = (key, measureText) => {
1529
- if (BUILD12.profile && performance.mark) {
1647
+ if (BUILD13.profile && performance.mark) {
1530
1648
  if (performance.getEntriesByName(key, "mark").length === 0) {
1531
1649
  performance.mark(key);
1532
1650
  }
@@ -1584,7 +1702,7 @@ var inspect = (ref) => {
1584
1702
  };
1585
1703
  };
1586
1704
  var installDevTools = () => {
1587
- if (BUILD12.devTools) {
1705
+ if (BUILD13.devTools) {
1588
1706
  const rindo = win.rindo = win.rindo || {};
1589
1707
  const originalInspect = rindo.inspect;
1590
1708
  rindo.inspect = (ref) => {
@@ -1604,9 +1722,19 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1604
1722
  const childRenderNodes = [];
1605
1723
  const slotNodes = [];
1606
1724
  const slottedNodes = [];
1607
- const shadowRootNodes = BUILD13.shadowDom && shadowRoot ? [] : null;
1725
+ const shadowRootNodes = BUILD14.shadowDom && shadowRoot ? [] : null;
1608
1726
  const vnode = newVNode(tagName, null);
1609
1727
  vnode.$elm$ = hostElm;
1728
+ let scopeId2;
1729
+ if (BUILD14.scoped) {
1730
+ const cmpMeta = hostRef.$cmpMeta$;
1731
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1732
+ scopeId2 = hostElm["s-sc"];
1733
+ hostElm.classList.add(scopeId2 + "-h");
1734
+ } else if (hostElm["s-sc"]) {
1735
+ delete hostElm["s-sc"];
1736
+ }
1737
+ }
1610
1738
  if (!plt.$orgLocNodes$) {
1611
1739
  initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1612
1740
  }
@@ -1636,6 +1764,18 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1636
1764
  node["s-cr"] = hostElm["s-cr"];
1637
1765
  }
1638
1766
  }
1767
+ if (childRenderNode.$tag$ === "slot") {
1768
+ if (childRenderNode.$children$) {
1769
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1770
+ if (!childRenderNode.$elm$.childNodes.length) {
1771
+ childRenderNode.$children$.forEach((c) => {
1772
+ childRenderNode.$elm$.appendChild(c.$elm$);
1773
+ });
1774
+ }
1775
+ } else {
1776
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
1777
+ }
1778
+ }
1639
1779
  if (orgLocationNode && orgLocationNode.isConnected) {
1640
1780
  if (shadowRoot && orgLocationNode["s-en"] === "") {
1641
1781
  orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
@@ -1648,8 +1788,8 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1648
1788
  plt.$orgLocNodes$.delete(orgLocationId);
1649
1789
  }
1650
1790
  const hosts = [];
1651
- let snIndex = 0;
1652
1791
  const snLen = slottedNodes.length;
1792
+ let snIndex = 0;
1653
1793
  let slotGroup;
1654
1794
  let snGroupIdx;
1655
1795
  let snGroupLen;
@@ -1671,17 +1811,24 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1671
1811
  if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1672
1812
  slottedItem.slot["s-cr"] = hostEle;
1673
1813
  } else {
1674
- const hostChildren = hostEle.__childNodes || hostEle.childNodes;
1675
- slottedItem.slot["s-cr"] = hostChildren[0];
1814
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1676
1815
  }
1677
1816
  addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1817
+ if (BUILD14.experimentalSlotFixes) {
1818
+ patchNextPrev(slottedItem.node);
1819
+ }
1678
1820
  }
1679
1821
  if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1680
1822
  hostEle.appendChild(slottedItem.node);
1681
1823
  }
1682
1824
  }
1683
1825
  }
1684
- if (BUILD13.shadowDom && shadowRoot) {
1826
+ if (BUILD14.scoped && scopeId2 && slotNodes.length) {
1827
+ slotNodes.forEach((slot) => {
1828
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1829
+ });
1830
+ }
1831
+ if (BUILD14.shadowDom && shadowRoot) {
1685
1832
  let rnIdex = 0;
1686
1833
  const rnLen = shadowRootNodes.length;
1687
1834
  for (rnIdex; rnIdex < rnLen; rnIdex++) {
@@ -1715,15 +1862,19 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1715
1862
  $index$: childIdSplt[3],
1716
1863
  $tag$: node.tagName.toLowerCase(),
1717
1864
  $elm$: node,
1718
- // If we don't add the initial classes to the VNode, the first `vdom-render.ts` reconciliation will fail:
1719
- // client side changes before componentDidLoad will be ignored, `set-accessor.ts` will just take the element's initial classes
1720
- $attrs$: { class: node.className }
1865
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1866
+ // won't try to reconcile them. Classes set on the node will be blown away.
1867
+ $attrs$: { class: node.className || "" }
1721
1868
  });
1722
1869
  childRenderNodes.push(childVNode);
1723
1870
  node.removeAttribute(HYDRATE_CHILD_ID);
1724
1871
  if (!parentVNode.$children$) {
1725
1872
  parentVNode.$children$ = [];
1726
1873
  }
1874
+ if (BUILD14.scoped && scopeId2) {
1875
+ node["s-si"] = scopeId2;
1876
+ childVNode.$attrs$.class += " " + scopeId2;
1877
+ }
1727
1878
  const slotName = childVNode.$elm$.getAttribute("s-sn");
1728
1879
  if (typeof slotName === "string") {
1729
1880
  if (childVNode.$tag$ === "slot-fb") {
@@ -1738,6 +1889,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1738
1889
  shadowRootNodes,
1739
1890
  slottedNodes
1740
1891
  );
1892
+ if (BUILD14.scoped && scopeId2) {
1893
+ node.classList.add(scopeId2);
1894
+ }
1741
1895
  }
1742
1896
  childVNode.$elm$["s-sn"] = slotName;
1743
1897
  childVNode.$elm$.removeAttribute("s-sn");
@@ -1745,7 +1899,6 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1745
1899
  if (childVNode.$index$ !== void 0) {
1746
1900
  parentVNode.$children$[childVNode.$index$] = childVNode;
1747
1901
  }
1748
- if (scopeId2) node["s-si"] = scopeId2;
1749
1902
  parentVNode = childVNode;
1750
1903
  if (shadowRootNodes && childVNode.$depth$ === "0") {
1751
1904
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
@@ -1820,8 +1973,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1820
1973
  }
1821
1974
  } else if (childVNode.$hostId$ === hostId) {
1822
1975
  if (childNodeType === SLOT_NODE_ID) {
1823
- childVNode.$tag$ = "slot";
1824
- const slotName = node["s-sn"] = childVNode.$name$ = childIdSplt[5] || "";
1976
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
1825
1977
  addSlot(
1826
1978
  slotName,
1827
1979
  childIdSplt[2],
@@ -1834,9 +1986,9 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1834
1986
  slottedNodes
1835
1987
  );
1836
1988
  } else if (childNodeType === CONTENT_REF_ID) {
1837
- if (BUILD13.shadowDom && shadowRootNodes) {
1989
+ if (BUILD14.shadowDom && shadowRootNodes) {
1838
1990
  node.remove();
1839
- } else if (BUILD13.slotRelocation) {
1991
+ } else if (BUILD14.slotRelocation) {
1840
1992
  hostElm["s-cr"] = node;
1841
1993
  node["s-cn"] = true;
1842
1994
  }
@@ -1895,8 +2047,10 @@ var createSimpleVNode = (vnode) => {
1895
2047
  };
1896
2048
  function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1897
2049
  node["s-sr"] = true;
2050
+ childVNode.$name$ = slotName || null;
2051
+ childVNode.$tag$ = "slot";
1898
2052
  const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1899
- if (BUILD13.shadowDom && shadowRootNodes) {
2053
+ if (BUILD14.shadowDom && shadowRootNodes) {
1900
2054
  const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
1901
2055
  if (childVNode.$name$) {
1902
2056
  childVNode.$elm$.setAttribute("name", slotName);
@@ -1937,7 +2091,7 @@ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) =>
1937
2091
  };
1938
2092
 
1939
2093
  // src/runtime/initialize-component.ts
1940
- import { BUILD as BUILD21 } from "@rindo/core/internal/app-data";
2094
+ import { BUILD as BUILD22 } from "@rindo/core/internal/app-data";
1941
2095
 
1942
2096
  // src/runtime/mode.ts
1943
2097
  var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
@@ -1945,22 +2099,22 @@ var setMode = (handler) => modeResolutionChain.push(handler);
1945
2099
  var getMode = (ref) => getHostRef(ref).$modeName$;
1946
2100
 
1947
2101
  // src/runtime/proxy-component.ts
1948
- import { BUILD as BUILD20 } from "@rindo/core/internal/app-data";
2102
+ import { BUILD as BUILD21 } from "@rindo/core/internal/app-data";
1949
2103
 
1950
2104
  // src/runtime/set-value.ts
1951
- import { BUILD as BUILD19 } from "@rindo/core/internal/app-data";
2105
+ import { BUILD as BUILD20 } from "@rindo/core/internal/app-data";
1952
2106
 
1953
2107
  // src/runtime/parse-property-value.ts
1954
- import { BUILD as BUILD14 } from "@rindo/core/internal/app-data";
2108
+ import { BUILD as BUILD15 } from "@rindo/core/internal/app-data";
1955
2109
  var parsePropertyValue = (propValue, propType) => {
1956
2110
  if (propValue != null && !isComplexType(propValue)) {
1957
- if (BUILD14.propBoolean && propType & 4 /* Boolean */) {
2111
+ if (BUILD15.propBoolean && propType & 4 /* Boolean */) {
1958
2112
  return propValue === "false" ? false : propValue === "" || !!propValue;
1959
2113
  }
1960
- if (BUILD14.propNumber && propType & 2 /* Number */) {
2114
+ if (BUILD15.propNumber && propType & 2 /* Number */) {
1961
2115
  return parseFloat(propValue);
1962
2116
  }
1963
- if (BUILD14.propString && propType & 1 /* String */) {
2117
+ if (BUILD15.propString && propType & 1 /* String */) {
1964
2118
  return String(propValue);
1965
2119
  }
1966
2120
  return propValue;
@@ -1969,21 +2123,21 @@ var parsePropertyValue = (propValue, propType) => {
1969
2123
  };
1970
2124
 
1971
2125
  // src/runtime/update-component.ts
1972
- import { BUILD as BUILD18, NAMESPACE } from "@rindo/core/internal/app-data";
2126
+ import { BUILD as BUILD19, NAMESPACE } from "@rindo/core/internal/app-data";
1973
2127
 
1974
2128
  // src/runtime/event-emitter.ts
1975
- import { BUILD as BUILD16 } from "@rindo/core/internal/app-data";
2129
+ import { BUILD as BUILD17 } from "@rindo/core/internal/app-data";
1976
2130
 
1977
2131
  // src/runtime/element.ts
1978
- import { BUILD as BUILD15 } from "@rindo/core/internal/app-data";
1979
- var getElement = (ref) => BUILD15.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2132
+ import { BUILD as BUILD16 } from "@rindo/core/internal/app-data";
2133
+ var getElement = (ref) => BUILD16.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
1980
2134
 
1981
2135
  // src/runtime/event-emitter.ts
1982
2136
  var createEvent = (ref, name, flags) => {
1983
2137
  const elm = getElement(ref);
1984
2138
  return {
1985
2139
  emit: (detail) => {
1986
- if (BUILD16.isDev && !elm.isConnected) {
2140
+ if (BUILD17.isDev && !elm.isConnected) {
1987
2141
  consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
1988
2142
  }
1989
2143
  return emitEvent(elm, name, {
@@ -2002,7 +2156,7 @@ var emitEvent = (elm, name, opts) => {
2002
2156
  };
2003
2157
 
2004
2158
  // src/runtime/styles.ts
2005
- import { BUILD as BUILD17 } from "@rindo/core/internal/app-data";
2159
+ import { BUILD as BUILD18 } from "@rindo/core/internal/app-data";
2006
2160
  var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
2007
2161
  var registerStyle = (scopeId2, cssText, allowCS) => {
2008
2162
  let style = styles.get(scopeId2);
@@ -2022,7 +2176,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2022
2176
  var _a;
2023
2177
  const scopeId2 = getScopeId(cmpMeta, mode);
2024
2178
  const style = styles.get(scopeId2);
2025
- if (!BUILD17.attachStyles) {
2179
+ if (!BUILD18.attachStyles) {
2026
2180
  return scopeId2;
2027
2181
  }
2028
2182
  styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
@@ -2035,16 +2189,16 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2035
2189
  rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2036
2190
  }
2037
2191
  if (!appliedStyles.has(scopeId2)) {
2038
- if (BUILD17.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
2192
+ if (BUILD18.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
2039
2193
  styleElm.innerHTML = style;
2040
2194
  } else {
2041
- styleElm = doc.createElement("style");
2195
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
2042
2196
  styleElm.innerHTML = style;
2043
2197
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
2044
2198
  if (nonce != null) {
2045
2199
  styleElm.setAttribute("nonce", nonce);
2046
2200
  }
2047
- if ((BUILD17.hydrateServerSide || BUILD17.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2201
+ if ((BUILD18.hydrateServerSide || BUILD18.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2048
2202
  styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
2049
2203
  }
2050
2204
  if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
@@ -2080,7 +2234,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2080
2234
  appliedStyles.add(scopeId2);
2081
2235
  }
2082
2236
  }
2083
- } else if (BUILD17.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
2237
+ } else if (BUILD18.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
2084
2238
  styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
2085
2239
  }
2086
2240
  }
@@ -2092,43 +2246,40 @@ var attachStyles = (hostRef) => {
2092
2246
  const flags = cmpMeta.$flags$;
2093
2247
  const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
2094
2248
  const scopeId2 = addStyle(
2095
- BUILD17.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2249
+ BUILD18.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2096
2250
  cmpMeta,
2097
2251
  hostRef.$modeName$
2098
2252
  );
2099
- if ((BUILD17.shadowDom || BUILD17.scoped) && BUILD17.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
2253
+ if ((BUILD18.shadowDom || BUILD18.scoped) && BUILD18.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
2100
2254
  elm["s-sc"] = scopeId2;
2101
2255
  elm.classList.add(scopeId2 + "-h");
2102
- if (BUILD17.scoped && flags & 2 /* scopedCssEncapsulation */) {
2103
- elm.classList.add(scopeId2 + "-s");
2104
- }
2105
2256
  }
2106
2257
  endAttachStyles();
2107
2258
  };
2108
- var getScopeId = (cmp, mode) => "sc-" + (BUILD17.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
2259
+ var getScopeId = (cmp, mode) => "sc-" + (BUILD18.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
2109
2260
 
2110
2261
  // src/runtime/update-component.ts
2111
2262
  var attachToAncestor = (hostRef, ancestorComponent) => {
2112
- if (BUILD18.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
2263
+ if (BUILD19.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
2113
2264
  ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
2114
2265
  }
2115
2266
  };
2116
2267
  var scheduleUpdate = (hostRef, isInitialLoad) => {
2117
- if (BUILD18.taskQueue && BUILD18.updatable) {
2268
+ if (BUILD19.taskQueue && BUILD19.updatable) {
2118
2269
  hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
2119
2270
  }
2120
- if (BUILD18.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
2271
+ if (BUILD19.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
2121
2272
  hostRef.$flags$ |= 512 /* needsRerender */;
2122
2273
  return;
2123
2274
  }
2124
2275
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
2125
2276
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
2126
- return BUILD18.taskQueue ? writeTask(dispatch) : dispatch();
2277
+ return BUILD19.taskQueue ? writeTask(dispatch) : dispatch();
2127
2278
  };
2128
2279
  var dispatchHooks = (hostRef, isInitialLoad) => {
2129
2280
  const elm = hostRef.$hostElement$;
2130
2281
  const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
2131
- const instance = BUILD18.lazyLoad ? hostRef.$lazyInstance$ : elm;
2282
+ const instance = BUILD19.lazyLoad ? hostRef.$lazyInstance$ : elm;
2132
2283
  if (!instance) {
2133
2284
  throw new Error(
2134
2285
  `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Rindo runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://rindojs.web.app/docs/custom-elements#externalruntime`
@@ -2136,7 +2287,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
2136
2287
  }
2137
2288
  let maybePromise;
2138
2289
  if (isInitialLoad) {
2139
- if (BUILD18.lazyLoad && BUILD18.hostListener) {
2290
+ if (BUILD19.lazyLoad && BUILD19.hostListener) {
2140
2291
  hostRef.$flags$ |= 256 /* isListenReady */;
2141
2292
  if (hostRef.$queuedListeners$) {
2142
2293
  hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
@@ -2144,17 +2295,17 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
2144
2295
  }
2145
2296
  }
2146
2297
  emitLifecycleEvent(elm, "componentWillLoad");
2147
- if (BUILD18.cmpWillLoad) {
2298
+ if (BUILD19.cmpWillLoad) {
2148
2299
  maybePromise = safeCall(instance, "componentWillLoad");
2149
2300
  }
2150
2301
  } else {
2151
2302
  emitLifecycleEvent(elm, "componentWillUpdate");
2152
- if (BUILD18.cmpWillUpdate) {
2303
+ if (BUILD19.cmpWillUpdate) {
2153
2304
  maybePromise = safeCall(instance, "componentWillUpdate");
2154
2305
  }
2155
2306
  }
2156
2307
  emitLifecycleEvent(elm, "componentWillRender");
2157
- if (BUILD18.cmpWillRender) {
2308
+ if (BUILD19.cmpWillRender) {
2158
2309
  maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
2159
2310
  }
2160
2311
  endSchedule();
@@ -2170,23 +2321,23 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2170
2321
  const elm = hostRef.$hostElement$;
2171
2322
  const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
2172
2323
  const rc = elm["s-rc"];
2173
- if (BUILD18.style && isInitialLoad) {
2324
+ if (BUILD19.style && isInitialLoad) {
2174
2325
  attachStyles(hostRef);
2175
2326
  }
2176
2327
  const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
2177
- if (BUILD18.isDev) {
2328
+ if (BUILD19.isDev) {
2178
2329
  hostRef.$flags$ |= 1024 /* devOnRender */;
2179
2330
  }
2180
- if (BUILD18.hydrateServerSide) {
2331
+ if (BUILD19.hydrateServerSide) {
2181
2332
  await callRender(hostRef, instance, elm, isInitialLoad);
2182
2333
  } else {
2183
2334
  callRender(hostRef, instance, elm, isInitialLoad);
2184
2335
  }
2185
- if (BUILD18.isDev) {
2336
+ if (BUILD19.isDev) {
2186
2337
  hostRef.$renderCount$ = hostRef.$renderCount$ === void 0 ? 1 : hostRef.$renderCount$ + 1;
2187
2338
  hostRef.$flags$ &= ~1024 /* devOnRender */;
2188
2339
  }
2189
- if (BUILD18.hydrateServerSide) {
2340
+ if (BUILD19.hydrateServerSide) {
2190
2341
  try {
2191
2342
  serverSideConnected(elm);
2192
2343
  if (isInitialLoad) {
@@ -2200,13 +2351,13 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2200
2351
  consoleError(e, elm);
2201
2352
  }
2202
2353
  }
2203
- if (BUILD18.asyncLoading && rc) {
2354
+ if (BUILD19.asyncLoading && rc) {
2204
2355
  rc.map((cb) => cb());
2205
2356
  elm["s-rc"] = void 0;
2206
2357
  }
2207
2358
  endRender();
2208
2359
  endUpdate();
2209
- if (BUILD18.asyncLoading) {
2360
+ if (BUILD19.asyncLoading) {
2210
2361
  const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
2211
2362
  const postUpdate = () => postUpdateComponent(hostRef);
2212
2363
  if (childrenPromises.length === 0) {
@@ -2222,10 +2373,10 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2222
2373
  };
2223
2374
  var renderingRef = null;
2224
2375
  var callRender = (hostRef, instance, elm, isInitialLoad) => {
2225
- const allRenderFn = BUILD18.allRenderFn ? true : false;
2226
- const lazyLoad = BUILD18.lazyLoad ? true : false;
2227
- const taskQueue = BUILD18.taskQueue ? true : false;
2228
- const updatable = BUILD18.updatable ? true : false;
2376
+ const allRenderFn = BUILD19.allRenderFn ? true : false;
2377
+ const lazyLoad = BUILD19.lazyLoad ? true : false;
2378
+ const taskQueue = BUILD19.taskQueue ? true : false;
2379
+ const updatable = BUILD19.updatable ? true : false;
2229
2380
  try {
2230
2381
  renderingRef = instance;
2231
2382
  instance = allRenderFn ? instance.render() : instance.render && instance.render();
@@ -2235,9 +2386,9 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
2235
2386
  if (updatable || lazyLoad) {
2236
2387
  hostRef.$flags$ |= 2 /* hasRendered */;
2237
2388
  }
2238
- if (BUILD18.hasRenderFn || BUILD18.reflect) {
2239
- if (BUILD18.vdomRender || BUILD18.reflect) {
2240
- if (BUILD18.hydrateServerSide) {
2389
+ if (BUILD19.hasRenderFn || BUILD19.reflect) {
2390
+ if (BUILD19.vdomRender || BUILD19.reflect) {
2391
+ if (BUILD19.hydrateServerSide) {
2241
2392
  return Promise.resolve(instance).then((value) => renderVdom(hostRef, value, isInitialLoad));
2242
2393
  } else {
2243
2394
  renderVdom(hostRef, instance, isInitialLoad);
@@ -2262,57 +2413,57 @@ var postUpdateComponent = (hostRef) => {
2262
2413
  const tagName = hostRef.$cmpMeta$.$tagName$;
2263
2414
  const elm = hostRef.$hostElement$;
2264
2415
  const endPostUpdate = createTime("postUpdate", tagName);
2265
- const instance = BUILD18.lazyLoad ? hostRef.$lazyInstance$ : elm;
2416
+ const instance = BUILD19.lazyLoad ? hostRef.$lazyInstance$ : elm;
2266
2417
  const ancestorComponent = hostRef.$ancestorComponent$;
2267
- if (BUILD18.cmpDidRender) {
2268
- if (BUILD18.isDev) {
2418
+ if (BUILD19.cmpDidRender) {
2419
+ if (BUILD19.isDev) {
2269
2420
  hostRef.$flags$ |= 1024 /* devOnRender */;
2270
2421
  }
2271
2422
  safeCall(instance, "componentDidRender");
2272
- if (BUILD18.isDev) {
2423
+ if (BUILD19.isDev) {
2273
2424
  hostRef.$flags$ &= ~1024 /* devOnRender */;
2274
2425
  }
2275
2426
  }
2276
2427
  emitLifecycleEvent(elm, "componentDidRender");
2277
2428
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
2278
2429
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
2279
- if (BUILD18.asyncLoading && BUILD18.cssAnnotations) {
2430
+ if (BUILD19.asyncLoading && BUILD19.cssAnnotations) {
2280
2431
  addHydratedFlag(elm);
2281
2432
  }
2282
- if (BUILD18.cmpDidLoad) {
2283
- if (BUILD18.isDev) {
2433
+ if (BUILD19.cmpDidLoad) {
2434
+ if (BUILD19.isDev) {
2284
2435
  hostRef.$flags$ |= 2048 /* devOnDidLoad */;
2285
2436
  }
2286
2437
  safeCall(instance, "componentDidLoad");
2287
- if (BUILD18.isDev) {
2438
+ if (BUILD19.isDev) {
2288
2439
  hostRef.$flags$ &= ~2048 /* devOnDidLoad */;
2289
2440
  }
2290
2441
  }
2291
2442
  emitLifecycleEvent(elm, "componentDidLoad");
2292
2443
  endPostUpdate();
2293
- if (BUILD18.asyncLoading) {
2444
+ if (BUILD19.asyncLoading) {
2294
2445
  hostRef.$onReadyResolve$(elm);
2295
2446
  if (!ancestorComponent) {
2296
2447
  appDidLoad(tagName);
2297
2448
  }
2298
2449
  }
2299
2450
  } else {
2300
- if (BUILD18.cmpDidUpdate) {
2301
- if (BUILD18.isDev) {
2451
+ if (BUILD19.cmpDidUpdate) {
2452
+ if (BUILD19.isDev) {
2302
2453
  hostRef.$flags$ |= 1024 /* devOnRender */;
2303
2454
  }
2304
2455
  safeCall(instance, "componentDidUpdate");
2305
- if (BUILD18.isDev) {
2456
+ if (BUILD19.isDev) {
2306
2457
  hostRef.$flags$ &= ~1024 /* devOnRender */;
2307
2458
  }
2308
2459
  }
2309
2460
  emitLifecycleEvent(elm, "componentDidUpdate");
2310
2461
  endPostUpdate();
2311
2462
  }
2312
- if (BUILD18.method && BUILD18.lazyLoad) {
2463
+ if (BUILD19.method && BUILD19.lazyLoad) {
2313
2464
  hostRef.$onInstanceResolve$(elm);
2314
2465
  }
2315
- if (BUILD18.asyncLoading) {
2466
+ if (BUILD19.asyncLoading) {
2316
2467
  if (hostRef.$onRenderResolve$) {
2317
2468
  hostRef.$onRenderResolve$();
2318
2469
  hostRef.$onRenderResolve$ = void 0;
@@ -2324,7 +2475,7 @@ var postUpdateComponent = (hostRef) => {
2324
2475
  }
2325
2476
  };
2326
2477
  var forceUpdate = (ref) => {
2327
- if (BUILD18.updatable && (Build.isBrowser || Build.isTesting)) {
2478
+ if (BUILD19.updatable && (Build.isBrowser || Build.isTesting)) {
2328
2479
  const hostRef = getHostRef(ref);
2329
2480
  const isConnected = hostRef.$hostElement$.isConnected;
2330
2481
  if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
@@ -2335,14 +2486,14 @@ var forceUpdate = (ref) => {
2335
2486
  return false;
2336
2487
  };
2337
2488
  var appDidLoad = (who) => {
2338
- if (BUILD18.cssAnnotations) {
2489
+ if (BUILD19.cssAnnotations) {
2339
2490
  addHydratedFlag(doc.documentElement);
2340
2491
  }
2341
- if (BUILD18.asyncQueue) {
2492
+ if (BUILD19.asyncQueue) {
2342
2493
  plt.$flags$ |= 2 /* appLoaded */;
2343
2494
  }
2344
2495
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
2345
- if (BUILD18.profile && performance.measure) {
2496
+ if (BUILD19.profile && performance.measure) {
2346
2497
  performance.measure(`[Rindo] ${NAMESPACE} initial load (by ${who})`, "st:app:start");
2347
2498
  }
2348
2499
  };
@@ -2357,7 +2508,7 @@ var safeCall = (instance, method, arg) => {
2357
2508
  return void 0;
2358
2509
  };
2359
2510
  var emitLifecycleEvent = (elm, lifecycleName) => {
2360
- if (BUILD18.lifecycleDOMEvents) {
2511
+ if (BUILD19.lifecycleDOMEvents) {
2361
2512
  emitEvent(elm, "rindo_" + lifecycleName, {
2362
2513
  bubbles: true,
2363
2514
  composed: true,
@@ -2369,7 +2520,7 @@ var emitLifecycleEvent = (elm, lifecycleName) => {
2369
2520
  };
2370
2521
  var addHydratedFlag = (elm) => {
2371
2522
  var _a, _b;
2372
- return BUILD18.hydratedClass ? elm.classList.add((_a = BUILD18.hydratedSelectorName) != null ? _a : "hydrated") : BUILD18.hydratedAttribute ? elm.setAttribute((_b = BUILD18.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
2523
+ return BUILD19.hydratedClass ? elm.classList.add((_a = BUILD19.hydratedSelectorName) != null ? _a : "hydrated") : BUILD19.hydratedAttribute ? elm.setAttribute((_b = BUILD19.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
2373
2524
  };
2374
2525
  var serverSideConnected = (elm) => {
2375
2526
  const children = elm.children;
@@ -2388,21 +2539,21 @@ var serverSideConnected = (elm) => {
2388
2539
  var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
2389
2540
  var setValue = (ref, propName, newVal, cmpMeta) => {
2390
2541
  const hostRef = getHostRef(ref);
2391
- if (BUILD19.lazyLoad && !hostRef) {
2542
+ if (BUILD20.lazyLoad && !hostRef) {
2392
2543
  throw new Error(
2393
2544
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Rindo runtime. This usually happens when integrating a 3rd party Rindo component with another Rindo component or application.`
2394
2545
  );
2395
2546
  }
2396
- const elm = BUILD19.lazyLoad ? hostRef.$hostElement$ : ref;
2547
+ const elm = BUILD20.lazyLoad ? hostRef.$hostElement$ : ref;
2397
2548
  const oldVal = hostRef.$instanceValues$.get(propName);
2398
2549
  const flags = hostRef.$flags$;
2399
- const instance = BUILD19.lazyLoad ? hostRef.$lazyInstance$ : elm;
2550
+ const instance = BUILD20.lazyLoad ? hostRef.$lazyInstance$ : elm;
2400
2551
  newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
2401
2552
  const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
2402
2553
  const didValueChange = newVal !== oldVal && !areBothNaN;
2403
- if ((!BUILD19.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
2554
+ if ((!BUILD20.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
2404
2555
  hostRef.$instanceValues$.set(propName, newVal);
2405
- if (BUILD19.isDev) {
2556
+ if (BUILD20.isDev) {
2406
2557
  if (hostRef.$flags$ & 1024 /* devOnRender */) {
2407
2558
  consoleDevWarn(
2408
2559
  `The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,
@@ -2425,8 +2576,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2425
2576
  );
2426
2577
  }
2427
2578
  }
2428
- if (!BUILD19.lazyLoad || instance) {
2429
- if (BUILD19.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
2579
+ if (!BUILD20.lazyLoad || instance) {
2580
+ if (BUILD20.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
2430
2581
  const watchMethods = cmpMeta.$watchers$[propName];
2431
2582
  if (watchMethods) {
2432
2583
  watchMethods.map((watchMethodName) => {
@@ -2438,8 +2589,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2438
2589
  });
2439
2590
  }
2440
2591
  }
2441
- if (BUILD19.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2442
- if (BUILD19.cmpShouldUpdate && instance.componentShouldUpdate) {
2592
+ if (BUILD20.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2593
+ if (BUILD20.cmpShouldUpdate && instance.componentShouldUpdate) {
2443
2594
  if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
2444
2595
  return;
2445
2596
  }
@@ -2454,40 +2605,40 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2454
2605
  var proxyComponent = (Cstr, cmpMeta, flags) => {
2455
2606
  var _a, _b;
2456
2607
  const prototype = Cstr.prototype;
2457
- if (BUILD20.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
2608
+ if (BUILD21.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
2458
2609
  FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
2459
2610
  const originalFormAssociatedCallback = prototype[cbName];
2460
2611
  Object.defineProperty(prototype, cbName, {
2461
2612
  value(...args) {
2462
2613
  const hostRef = getHostRef(this);
2463
- const instance = BUILD20.lazyLoad ? hostRef.$lazyInstance$ : this;
2614
+ const instance = BUILD21.lazyLoad ? hostRef.$lazyInstance$ : this;
2464
2615
  if (!instance) {
2465
2616
  hostRef.$onReadyPromise$.then((asyncInstance) => {
2466
2617
  const cb = asyncInstance[cbName];
2467
2618
  typeof cb === "function" && cb.call(asyncInstance, ...args);
2468
2619
  });
2469
2620
  } else {
2470
- const cb = BUILD20.lazyLoad ? instance[cbName] : originalFormAssociatedCallback;
2621
+ const cb = BUILD21.lazyLoad ? instance[cbName] : originalFormAssociatedCallback;
2471
2622
  typeof cb === "function" && cb.call(instance, ...args);
2472
2623
  }
2473
2624
  }
2474
2625
  });
2475
2626
  });
2476
2627
  }
2477
- if (BUILD20.member && cmpMeta.$members$ || BUILD20.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
2478
- if (BUILD20.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
2628
+ if (BUILD21.member && cmpMeta.$members$ || BUILD21.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
2629
+ if (BUILD21.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
2479
2630
  cmpMeta.$watchers$ = Cstr.watchers;
2480
2631
  }
2481
2632
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
2482
2633
  members.map(([memberName, [memberFlags]]) => {
2483
- if ((BUILD20.prop || BUILD20.state) && (memberFlags & 31 /* Prop */ || (!BUILD20.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2634
+ if ((BUILD21.prop || BUILD21.state) && (memberFlags & 31 /* Prop */ || (!BUILD21.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2484
2635
  if ((memberFlags & 2048 /* Getter */) === 0) {
2485
2636
  Object.defineProperty(prototype, memberName, {
2486
2637
  get() {
2487
2638
  return getValue(this, memberName);
2488
2639
  },
2489
2640
  set(newValue) {
2490
- if (BUILD20.isDev) {
2641
+ if (BUILD21.isDev) {
2491
2642
  const ref = getHostRef(this);
2492
2643
  if (
2493
2644
  // we are proxying the instance (not element)
@@ -2508,11 +2659,11 @@ More information: https://rindojs.web.app/docs/properties#prop-mutability`
2508
2659
  enumerable: true
2509
2660
  });
2510
2661
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2511
- if (BUILD20.lazyLoad) {
2662
+ if (BUILD21.lazyLoad) {
2512
2663
  Object.defineProperty(prototype, memberName, {
2513
2664
  get() {
2514
2665
  const ref = getHostRef(this);
2515
- const instance = BUILD20.lazyLoad && ref ? ref.$lazyInstance$ : prototype;
2666
+ const instance = BUILD21.lazyLoad && ref ? ref.$lazyInstance$ : prototype;
2516
2667
  if (!instance) return;
2517
2668
  return instance[memberName];
2518
2669
  },
@@ -2552,7 +2703,7 @@ More information: https://rindojs.web.app/docs/properties#prop-mutability`
2552
2703
  });
2553
2704
  }
2554
2705
  }
2555
- } else if (BUILD20.lazyLoad && BUILD20.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
2706
+ } else if (BUILD21.lazyLoad && BUILD21.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
2556
2707
  Object.defineProperty(prototype, memberName, {
2557
2708
  value(...args) {
2558
2709
  var _a2;
@@ -2565,13 +2716,13 @@ More information: https://rindojs.web.app/docs/properties#prop-mutability`
2565
2716
  });
2566
2717
  }
2567
2718
  });
2568
- if (BUILD20.observeAttribute && (!BUILD20.lazyLoad || flags & 1 /* isElementConstructor */)) {
2719
+ if (BUILD21.observeAttribute && (!BUILD21.lazyLoad || flags & 1 /* isElementConstructor */)) {
2569
2720
  const attrNameToPropName = /* @__PURE__ */ new Map();
2570
2721
  prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
2571
2722
  plt.jmp(() => {
2572
2723
  var _a2;
2573
2724
  const propName = attrNameToPropName.get(attrName);
2574
- if (this.hasOwnProperty(propName)) {
2725
+ if (this.hasOwnProperty(propName) && BUILD21.lazyLoad) {
2575
2726
  newValue = this[propName];
2576
2727
  delete this[propName];
2577
2728
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -2581,8 +2732,8 @@ More information: https://rindojs.web.app/docs/properties#prop-mutability`
2581
2732
  const hostRef = getHostRef(this);
2582
2733
  const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
2583
2734
  if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
2584
- const elm = BUILD20.lazyLoad ? hostRef.$hostElement$ : this;
2585
- const instance = BUILD20.lazyLoad ? hostRef.$lazyInstance$ : elm;
2735
+ const elm = BUILD21.lazyLoad ? hostRef.$hostElement$ : this;
2736
+ const instance = BUILD21.lazyLoad ? hostRef.$lazyInstance$ : elm;
2586
2737
  const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
2587
2738
  entry == null ? void 0 : entry.forEach((callbackName) => {
2588
2739
  if (instance[callbackName] != null) {
@@ -2605,7 +2756,7 @@ More information: https://rindojs.web.app/docs/properties#prop-mutability`
2605
2756
  var _a2;
2606
2757
  const attrName = m[1] || propName;
2607
2758
  attrNameToPropName.set(attrName, propName);
2608
- if (BUILD20.reflect && m[0] & 512 /* ReflectAttr */) {
2759
+ if (BUILD21.reflect && m[0] & 512 /* ReflectAttr */) {
2609
2760
  (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
2610
2761
  }
2611
2762
  return attrName;
@@ -2623,7 +2774,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2623
2774
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
2624
2775
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
2625
2776
  const bundleId = cmpMeta.$lazyBundleId$;
2626
- if ((BUILD21.lazyLoad || BUILD21.hydrateClientSide) && bundleId) {
2777
+ if ((BUILD22.lazyLoad || BUILD22.hydrateClientSide) && bundleId) {
2627
2778
  const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
2628
2779
  if (CstrImport && "then" in CstrImport) {
2629
2780
  const endLoad = uniqueTime(
@@ -2638,15 +2789,15 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2638
2789
  if (!Cstr) {
2639
2790
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
2640
2791
  }
2641
- if (BUILD21.member && !Cstr.isProxied) {
2642
- if (BUILD21.watchCallback) {
2792
+ if (BUILD22.member && !Cstr.isProxied) {
2793
+ if (BUILD22.watchCallback) {
2643
2794
  cmpMeta.$watchers$ = Cstr.watchers;
2644
2795
  }
2645
2796
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
2646
2797
  Cstr.isProxied = true;
2647
2798
  }
2648
2799
  const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
2649
- if (BUILD21.member) {
2800
+ if (BUILD22.member) {
2650
2801
  hostRef.$flags$ |= 8 /* isConstructingInstance */;
2651
2802
  }
2652
2803
  try {
@@ -2654,10 +2805,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2654
2805
  } catch (e) {
2655
2806
  consoleError(e);
2656
2807
  }
2657
- if (BUILD21.member) {
2808
+ if (BUILD22.member) {
2658
2809
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
2659
2810
  }
2660
- if (BUILD21.watchCallback) {
2811
+ if (BUILD22.watchCallback) {
2661
2812
  hostRef.$flags$ |= 128 /* isWatchReady */;
2662
2813
  }
2663
2814
  endNewInstance();
@@ -2667,24 +2818,24 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2667
2818
  const cmpTag = elm.localName;
2668
2819
  customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
2669
2820
  }
2670
- if (BUILD21.style && Cstr && Cstr.style) {
2821
+ if (BUILD22.style && Cstr && Cstr.style) {
2671
2822
  let style;
2672
2823
  if (typeof Cstr.style === "string") {
2673
2824
  style = Cstr.style;
2674
- } else if (BUILD21.mode && typeof Cstr.style !== "string") {
2825
+ } else if (BUILD22.mode && typeof Cstr.style !== "string") {
2675
2826
  hostRef.$modeName$ = computeMode(elm);
2676
2827
  if (hostRef.$modeName$) {
2677
2828
  style = Cstr.style[hostRef.$modeName$];
2678
2829
  }
2679
- if (BUILD21.hydrateServerSide && hostRef.$modeName$) {
2830
+ if (BUILD22.hydrateServerSide && hostRef.$modeName$) {
2680
2831
  elm.setAttribute("s-mode", hostRef.$modeName$);
2681
2832
  }
2682
2833
  }
2683
2834
  const scopeId2 = getScopeId(cmpMeta, hostRef.$modeName$);
2684
2835
  if (!styles.has(scopeId2)) {
2685
2836
  const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
2686
- if (!BUILD21.hydrateServerSide && BUILD21.shadowDom && // TODO(RINDO-854): Remove code related to legacy shadowDomShim field
2687
- BUILD21.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2837
+ if (!BUILD22.hydrateServerSide && BUILD22.shadowDom && // TODO(RINDO-854): Remove code related to legacy shadowDomShim field
2838
+ BUILD22.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2688
2839
  style = await import("./shadow-css.js").then((m) => m.scopeCss(style, scopeId2));
2689
2840
  }
2690
2841
  registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
@@ -2694,14 +2845,14 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2694
2845
  }
2695
2846
  const ancestorComponent = hostRef.$ancestorComponent$;
2696
2847
  const schedule = () => scheduleUpdate(hostRef, true);
2697
- if (BUILD21.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
2848
+ if (BUILD22.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
2698
2849
  ancestorComponent["s-rc"].push(schedule);
2699
2850
  } else {
2700
2851
  schedule();
2701
2852
  }
2702
2853
  };
2703
2854
  var fireConnectedCallback = (instance) => {
2704
- if (BUILD21.lazyLoad && BUILD21.connectedCallback) {
2855
+ if (BUILD22.lazyLoad && BUILD22.connectedCallback) {
2705
2856
  safeCall(instance, "connectedCallback");
2706
2857
  }
2707
2858
  };
@@ -2712,41 +2863,41 @@ var connectedCallback = (elm) => {
2712
2863
  const hostRef = getHostRef(elm);
2713
2864
  const cmpMeta = hostRef.$cmpMeta$;
2714
2865
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
2715
- if (BUILD22.hostListenerTargetParent) {
2866
+ if (BUILD23.hostListenerTargetParent) {
2716
2867
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);
2717
2868
  }
2718
2869
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
2719
2870
  hostRef.$flags$ |= 1 /* hasConnected */;
2720
2871
  let hostId;
2721
- if (BUILD22.hydrateClientSide) {
2872
+ if (BUILD23.hydrateClientSide) {
2722
2873
  hostId = elm.getAttribute(HYDRATE_ID);
2723
2874
  if (hostId) {
2724
- if (BUILD22.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2725
- const scopeId2 = BUILD22.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
2875
+ if (BUILD23.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2876
+ const scopeId2 = BUILD23.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
2726
2877
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2727
- } else if (BUILD22.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2728
- const scopeId2 = getScopeId(cmpMeta, BUILD22.mode ? elm.getAttribute("s-mode") : void 0);
2878
+ } else if (BUILD23.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2879
+ const scopeId2 = getScopeId(cmpMeta, BUILD23.mode ? elm.getAttribute("s-mode") : void 0);
2729
2880
  elm["s-sc"] = scopeId2;
2730
2881
  }
2731
2882
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2732
2883
  }
2733
2884
  }
2734
- if (BUILD22.slotRelocation && !hostId) {
2735
- if (BUILD22.hydrateServerSide || (BUILD22.slot || BUILD22.shadowDom) && // TODO(RINDO-854): Remove code related to legacy shadowDomShim field
2885
+ if (BUILD23.slotRelocation && !hostId) {
2886
+ if (BUILD23.hydrateServerSide || (BUILD23.slot || BUILD23.shadowDom) && // TODO(RINDO-854): Remove code related to legacy shadowDomShim field
2736
2887
  cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
2737
2888
  setContentReference(elm);
2738
2889
  }
2739
2890
  }
2740
- if (BUILD22.asyncLoading) {
2891
+ if (BUILD23.asyncLoading) {
2741
2892
  let ancestorComponent = elm;
2742
2893
  while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
2743
- if (BUILD22.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
2894
+ if (BUILD23.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
2744
2895
  attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
2745
2896
  break;
2746
2897
  }
2747
2898
  }
2748
2899
  }
2749
- if (BUILD22.prop && !BUILD22.hydrateServerSide && cmpMeta.$members$) {
2900
+ if (BUILD23.prop && !BUILD23.hydrateServerSide && cmpMeta.$members$) {
2750
2901
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
2751
2902
  if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
2752
2903
  const value = elm[memberName];
@@ -2755,7 +2906,7 @@ var connectedCallback = (elm) => {
2755
2906
  }
2756
2907
  });
2757
2908
  }
2758
- if (BUILD22.initializeNextTick) {
2909
+ if (BUILD23.initializeNextTick) {
2759
2910
  nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
2760
2911
  } else {
2761
2912
  initializeComponent(elm, hostRef, cmpMeta);
@@ -2773,32 +2924,32 @@ var connectedCallback = (elm) => {
2773
2924
  };
2774
2925
  var setContentReference = (elm) => {
2775
2926
  const contentRefElm = elm["s-cr"] = doc.createComment(
2776
- BUILD22.isDebug ? `content-ref (host=${elm.localName})` : ""
2927
+ BUILD23.isDebug ? `content-ref (host=${elm.localName})` : ""
2777
2928
  );
2778
2929
  contentRefElm["s-cn"] = true;
2779
2930
  insertBefore(elm, contentRefElm, elm.firstChild);
2780
2931
  };
2781
2932
 
2782
2933
  // src/runtime/disconnected-callback.ts
2783
- import { BUILD as BUILD23 } from "@rindo/core/internal/app-data";
2934
+ import { BUILD as BUILD24 } from "@rindo/core/internal/app-data";
2784
2935
  var disconnectInstance = (instance) => {
2785
- if (BUILD23.lazyLoad && BUILD23.disconnectedCallback) {
2936
+ if (BUILD24.lazyLoad && BUILD24.disconnectedCallback) {
2786
2937
  safeCall(instance, "disconnectedCallback");
2787
2938
  }
2788
- if (BUILD23.cmpDidUnload) {
2939
+ if (BUILD24.cmpDidUnload) {
2789
2940
  safeCall(instance, "componentDidUnload");
2790
2941
  }
2791
2942
  };
2792
2943
  var disconnectedCallback = async (elm) => {
2793
2944
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
2794
2945
  const hostRef = getHostRef(elm);
2795
- if (BUILD23.hostListener) {
2946
+ if (BUILD24.hostListener) {
2796
2947
  if (hostRef.$rmListeners$) {
2797
2948
  hostRef.$rmListeners$.map((rmListener) => rmListener());
2798
2949
  hostRef.$rmListeners$ = void 0;
2799
2950
  }
2800
2951
  }
2801
- if (!BUILD23.lazyLoad) {
2952
+ if (!BUILD24.lazyLoad) {
2802
2953
  disconnectInstance(elm);
2803
2954
  } else if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
2804
2955
  disconnectInstance(hostRef.$lazyInstance$);
@@ -2817,36 +2968,36 @@ var proxyCustomElement = (Cstr, compactMeta) => {
2817
2968
  $flags$: compactMeta[0],
2818
2969
  $tagName$: compactMeta[1]
2819
2970
  };
2820
- if (BUILD24.member) {
2971
+ if (BUILD25.member) {
2821
2972
  cmpMeta.$members$ = compactMeta[2];
2822
2973
  }
2823
- if (BUILD24.hostListener) {
2974
+ if (BUILD25.hostListener) {
2824
2975
  cmpMeta.$listeners$ = compactMeta[3];
2825
2976
  }
2826
- if (BUILD24.watchCallback) {
2977
+ if (BUILD25.watchCallback) {
2827
2978
  cmpMeta.$watchers$ = Cstr.$watchers$;
2828
2979
  }
2829
- if (BUILD24.reflect) {
2980
+ if (BUILD25.reflect) {
2830
2981
  cmpMeta.$attrsToReflect$ = [];
2831
2982
  }
2832
- if (BUILD24.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2983
+ if (BUILD25.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2833
2984
  cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2834
2985
  }
2835
- if (BUILD24.experimentalSlotFixes) {
2836
- if (BUILD24.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2986
+ if (BUILD25.experimentalSlotFixes) {
2987
+ if (BUILD25.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2837
2988
  patchPseudoShadowDom(Cstr.prototype);
2838
2989
  }
2839
2990
  } else {
2840
- if (BUILD24.slotChildNodesFix) {
2991
+ if (BUILD25.slotChildNodesFix) {
2841
2992
  patchChildSlotNodes(Cstr.prototype);
2842
2993
  }
2843
- if (BUILD24.cloneNodeFix) {
2994
+ if (BUILD25.cloneNodeFix) {
2844
2995
  patchCloneNode(Cstr.prototype);
2845
2996
  }
2846
- if (BUILD24.appendChildSlotFix) {
2997
+ if (BUILD25.appendChildSlotFix) {
2847
2998
  patchSlotAppendChild(Cstr.prototype);
2848
2999
  }
2849
- if (BUILD24.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3000
+ if (BUILD25.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2850
3001
  patchTextContent(Cstr.prototype);
2851
3002
  }
2852
3003
  }
@@ -2864,20 +3015,20 @@ var proxyCustomElement = (Cstr, compactMeta) => {
2864
3015
  this.__hasHostListenerAttached = true;
2865
3016
  }
2866
3017
  connectedCallback(this);
2867
- if (BUILD24.connectedCallback && originalConnectedCallback) {
3018
+ if (BUILD25.connectedCallback && originalConnectedCallback) {
2868
3019
  originalConnectedCallback.call(this);
2869
3020
  }
2870
3021
  },
2871
3022
  disconnectedCallback() {
2872
3023
  disconnectedCallback(this);
2873
- if (BUILD24.disconnectedCallback && originalDisconnectedCallback) {
3024
+ if (BUILD25.disconnectedCallback && originalDisconnectedCallback) {
2874
3025
  originalDisconnectedCallback.call(this);
2875
3026
  }
2876
3027
  },
2877
3028
  __attachShadow() {
2878
3029
  if (supportsShadow) {
2879
3030
  if (!this.shadowRoot) {
2880
- if (BUILD24.shadowDelegatesFocus) {
3031
+ if (BUILD25.shadowDelegatesFocus) {
2881
3032
  this.attachShadow({
2882
3033
  mode: "open",
2883
3034
  delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
@@ -2901,7 +3052,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
2901
3052
  return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
2902
3053
  };
2903
3054
  var forceModeUpdate = (elm) => {
2904
- if (BUILD24.style && BUILD24.mode && !BUILD24.lazyLoad) {
3055
+ if (BUILD25.style && BUILD25.mode && !BUILD25.lazyLoad) {
2905
3056
  const mode = computeMode(elm);
2906
3057
  const hostRef = getHostRef(elm);
2907
3058
  if (hostRef.$modeName$ !== mode) {
@@ -2924,7 +3075,7 @@ var forceModeUpdate = (elm) => {
2924
3075
  };
2925
3076
 
2926
3077
  // src/runtime/bootstrap-lazy.ts
2927
- import { BUILD as BUILD25 } from "@rindo/core/internal/app-data";
3078
+ import { BUILD as BUILD26 } from "@rindo/core/internal/app-data";
2928
3079
 
2929
3080
  // src/runtime/hmr-component.ts
2930
3081
  var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
@@ -2936,7 +3087,7 @@ var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
2936
3087
  // src/runtime/bootstrap-lazy.ts
2937
3088
  var bootstrapLazy = (lazyBundles, options = {}) => {
2938
3089
  var _a;
2939
- if (BUILD25.profile && performance.mark) {
3090
+ if (BUILD26.profile && performance.mark) {
2940
3091
  performance.mark("st:app:start");
2941
3092
  }
2942
3093
  installDevTools();
@@ -2952,12 +3103,12 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2952
3103
  let isBootstrapping = true;
2953
3104
  Object.assign(plt, options);
2954
3105
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
2955
- if (BUILD25.asyncQueue) {
3106
+ if (BUILD26.asyncQueue) {
2956
3107
  if (options.syncQueue) {
2957
3108
  plt.$flags$ |= 4 /* queueSync */;
2958
3109
  }
2959
3110
  }
2960
- if (BUILD25.hydrateClientSide) {
3111
+ if (BUILD26.hydrateClientSide) {
2961
3112
  plt.$flags$ |= 2 /* appLoaded */;
2962
3113
  }
2963
3114
  let hasSlotRelocation = false;
@@ -2973,22 +3124,22 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2973
3124
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
2974
3125
  hasSlotRelocation = true;
2975
3126
  }
2976
- if (BUILD25.member) {
3127
+ if (BUILD26.member) {
2977
3128
  cmpMeta.$members$ = compactMeta[2];
2978
3129
  }
2979
- if (BUILD25.hostListener) {
3130
+ if (BUILD26.hostListener) {
2980
3131
  cmpMeta.$listeners$ = compactMeta[3];
2981
3132
  }
2982
- if (BUILD25.reflect) {
3133
+ if (BUILD26.reflect) {
2983
3134
  cmpMeta.$attrsToReflect$ = [];
2984
3135
  }
2985
- if (BUILD25.watchCallback) {
3136
+ if (BUILD26.watchCallback) {
2986
3137
  cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
2987
3138
  }
2988
- if (BUILD25.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3139
+ if (BUILD26.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2989
3140
  cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2990
3141
  }
2991
- const tagName = BUILD25.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
3142
+ const tagName = BUILD26.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
2992
3143
  const HostElement = class extends HTMLElement {
2993
3144
  // RindoLazyHost
2994
3145
  constructor(self) {
@@ -2996,10 +3147,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2996
3147
  this.hasRegisteredEventListeners = false;
2997
3148
  self = this;
2998
3149
  registerHost(self, cmpMeta);
2999
- if (BUILD25.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3150
+ if (BUILD26.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3000
3151
  if (supportsShadow) {
3001
3152
  if (!self.shadowRoot) {
3002
- if (BUILD25.shadowDelegatesFocus) {
3153
+ if (BUILD26.shadowDelegatesFocus) {
3003
3154
  self.attachShadow({
3004
3155
  mode: "open",
3005
3156
  delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
@@ -3014,7 +3165,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3014
3165
  );
3015
3166
  }
3016
3167
  }
3017
- } else if (!BUILD25.hydrateServerSide && !("shadowRoot" in self)) {
3168
+ } else if (!BUILD26.hydrateServerSide && !("shadowRoot" in self)) {
3018
3169
  self.shadowRoot = self;
3019
3170
  }
3020
3171
  }
@@ -3042,28 +3193,28 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3042
3193
  return getHostRef(this).$onReadyPromise$;
3043
3194
  }
3044
3195
  };
3045
- if (BUILD25.experimentalSlotFixes) {
3046
- if (BUILD25.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3196
+ if (BUILD26.experimentalSlotFixes) {
3197
+ if (BUILD26.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3047
3198
  patchPseudoShadowDom(HostElement.prototype);
3048
3199
  }
3049
3200
  } else {
3050
- if (BUILD25.slotChildNodesFix) {
3201
+ if (BUILD26.slotChildNodesFix) {
3051
3202
  patchChildSlotNodes(HostElement.prototype);
3052
3203
  }
3053
- if (BUILD25.cloneNodeFix) {
3204
+ if (BUILD26.cloneNodeFix) {
3054
3205
  patchCloneNode(HostElement.prototype);
3055
3206
  }
3056
- if (BUILD25.appendChildSlotFix) {
3207
+ if (BUILD26.appendChildSlotFix) {
3057
3208
  patchSlotAppendChild(HostElement.prototype);
3058
3209
  }
3059
- if (BUILD25.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3210
+ if (BUILD26.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3060
3211
  patchTextContent(HostElement.prototype);
3061
3212
  }
3062
3213
  }
3063
- if (BUILD25.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
3214
+ if (BUILD26.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
3064
3215
  HostElement.formAssociated = true;
3065
3216
  }
3066
- if (BUILD25.hotModuleReplacement) {
3217
+ if (BUILD26.hotModuleReplacement) {
3067
3218
  HostElement.prototype["s-hmr"] = function(hmrVersionId) {
3068
3219
  hmrStart(this, cmpMeta, hmrVersionId);
3069
3220
  };
@@ -3082,7 +3233,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3082
3233
  if (hasSlotRelocation) {
3083
3234
  dataStyles.textContent += SLOT_FB_CSS;
3084
3235
  }
3085
- if (BUILD25.invisiblePrehydration && (BUILD25.hydratedClass || BUILD25.hydratedAttribute)) {
3236
+ if (BUILD26.invisiblePrehydration && (BUILD26.hydratedClass || BUILD26.hydratedAttribute)) {
3086
3237
  dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
3087
3238
  }
3088
3239
  if (dataStyles.innerHTML.length) {
@@ -3098,7 +3249,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3098
3249
  if (deferredConnectedCallbacks.length) {
3099
3250
  deferredConnectedCallbacks.map((host) => host.connectedCallback());
3100
3251
  } else {
3101
- if (BUILD25.profile) {
3252
+ if (BUILD26.profile) {
3102
3253
  plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30, "timeout"));
3103
3254
  } else {
3104
3255
  plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
@@ -3111,10 +3262,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3111
3262
  var Fragment = (_, children) => children;
3112
3263
 
3113
3264
  // src/runtime/host-listener.ts
3114
- import { BUILD as BUILD26 } from "@rindo/core/internal/app-data";
3265
+ import { BUILD as BUILD27 } from "@rindo/core/internal/app-data";
3115
3266
  var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
3116
- if (BUILD26.hostListener && listeners) {
3117
- if (BUILD26.hostListenerTargetParent) {
3267
+ if (BUILD27.hostListener && listeners) {
3268
+ if (BUILD27.hostListenerTargetParent) {
3118
3269
  if (attachParentListeners) {
3119
3270
  listeners = listeners.filter(([flags]) => flags & 32 /* TargetParent */);
3120
3271
  } else {
@@ -3122,7 +3273,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
3122
3273
  }
3123
3274
  }
3124
3275
  listeners.map(([flags, name, method]) => {
3125
- const target = BUILD26.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
3276
+ const target = BUILD27.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
3126
3277
  const handler = hostListenerProxy(hostRef, method);
3127
3278
  const opts = hostListenerOpts(flags);
3128
3279
  plt.ael(target, name, handler, opts);
@@ -3133,7 +3284,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
3133
3284
  var hostListenerProxy = (hostRef, methodName) => (ev) => {
3134
3285
  var _a;
3135
3286
  try {
3136
- if (BUILD26.lazyLoad) {
3287
+ if (BUILD27.lazyLoad) {
3137
3288
  if (hostRef.$flags$ & 256 /* isListenReady */) {
3138
3289
  (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
3139
3290
  } else {
@@ -3147,10 +3298,10 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
3147
3298
  }
3148
3299
  };
3149
3300
  var getHostListenerTarget = (elm, flags) => {
3150
- if (BUILD26.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
3151
- if (BUILD26.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
3152
- if (BUILD26.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
3153
- if (BUILD26.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement)
3301
+ if (BUILD27.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
3302
+ if (BUILD27.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
3303
+ if (BUILD27.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
3304
+ if (BUILD27.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement)
3154
3305
  return elm.parentElement;
3155
3306
  return elm;
3156
3307
  };
@@ -3310,7 +3461,7 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
3310
3461
  }
3311
3462
  };
3312
3463
  export {
3313
- BUILD27 as BUILD,
3464
+ BUILD28 as BUILD,
3314
3465
  Build,
3315
3466
  Env,
3316
3467
  Fragment,