lwc 2.5.10 → 2.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +674 -471
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +674 -471
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -9
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +647 -446
  5. package/dist/engine-dom/iife/es5/engine-dom.js +737 -433
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -9
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +704 -408
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +674 -471
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -9
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +647 -446
  11. package/dist/engine-dom/umd/es5/engine-dom.js +737 -433
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -9
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +704 -408
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +754 -549
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -9
  16. package/dist/engine-server/esm/es2017/engine-server.js +754 -549
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +135 -140
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +135 -140
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +135 -140
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +146 -137
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +146 -137
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +135 -140
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +135 -140
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +146 -137
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +146 -137
  30. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  31. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  33. package/dist/wire-service/iife/es5/wire-service.js +11 -11
  34. package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
  35. package/dist/wire-service/iife/es5/wire-service_debug.js +11 -11
  36. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  37. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  38. package/dist/wire-service/umd/es5/wire-service.js +11 -11
  39. package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
  40. package/dist/wire-service/umd/es5/wire-service_debug.js +11 -11
  41. package/package.json +8 -8
@@ -299,7 +299,7 @@ function htmlPropertyToAttribute(propName) {
299
299
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
300
300
  return attributeName;
301
301
  }
302
- /** version: 2.5.10 */
302
+ /** version: 2.6.3 */
303
303
 
304
304
  /*
305
305
  * Copyright (c) 2018, salesforce.com, inc.
@@ -413,8 +413,6 @@ const features = {
413
413
  ENABLE_NODE_LIST_PATCH: null,
414
414
  ENABLE_HTML_COLLECTIONS_PATCH: null,
415
415
  ENABLE_NODE_PATCH: null,
416
- ENABLE_NON_COMPOSED_EVENTS_LEAKAGE: null,
417
- ENABLE_MIXED_SHADOW_MODE: null,
418
416
  ENABLE_WIRE_SYNC_EMIT: null
419
417
  };
420
418
 
@@ -479,7 +477,7 @@ function setFeatureFlagForTest(name, value) {
479
477
  setFeatureFlag(name, value);
480
478
  }
481
479
  }
482
- /** version: 2.5.10 */
480
+ /** version: 2.6.3 */
483
481
 
484
482
  /* proxy-compat-disable */
485
483
 
@@ -553,6 +551,249 @@ function parseStyleText(cssText) {
553
551
  }
554
552
 
555
553
  return styleMap;
554
+ } //
555
+ // Primitives
556
+ //
557
+
558
+
559
+ let ssr$1;
560
+
561
+ function setSsr(ssrImpl) {
562
+ ssr$1 = ssrImpl;
563
+ }
564
+
565
+ let isNativeShadowDefined$1;
566
+
567
+ function setIsNativeShadowDefined(isNativeShadowDefinedImpl) {
568
+ isNativeShadowDefined$1 = isNativeShadowDefinedImpl;
569
+ }
570
+
571
+ let isSyntheticShadowDefined$1;
572
+
573
+ function setIsSyntheticShadowDefined(isSyntheticShadowDefinedImpl) {
574
+ isSyntheticShadowDefined$1 = isSyntheticShadowDefinedImpl;
575
+ }
576
+
577
+ let HTMLElementExported$1;
578
+
579
+ function setHTMLElement(HTMLElementImpl) {
580
+ HTMLElementExported$1 = HTMLElementImpl;
581
+ }
582
+
583
+ let isHydrating$1;
584
+
585
+ function setIsHydrating$1(isHydratingImpl) {
586
+ isHydrating$1 = isHydratingImpl;
587
+ }
588
+
589
+ let insert$1;
590
+
591
+ function setInsert(insertImpl) {
592
+ insert$1 = insertImpl;
593
+ }
594
+
595
+ let remove$1;
596
+
597
+ function setRemove(removeImpl) {
598
+ remove$1 = removeImpl;
599
+ }
600
+
601
+ let createElement$2;
602
+
603
+ function setCreateElement(createElementImpl) {
604
+ createElement$2 = createElementImpl;
605
+ }
606
+
607
+ let createText$1;
608
+
609
+ function setCreateText(createTextImpl) {
610
+ createText$1 = createTextImpl;
611
+ }
612
+
613
+ let createComment$1;
614
+
615
+ function setCreateComment(createCommentImpl) {
616
+ createComment$1 = createCommentImpl;
617
+ }
618
+
619
+ let nextSibling$1;
620
+
621
+ function setNextSibling(nextSiblingImpl) {
622
+ nextSibling$1 = nextSiblingImpl;
623
+ }
624
+
625
+ let attachShadow$1;
626
+
627
+ function setAttachShadow(attachShadowImpl) {
628
+ attachShadow$1 = attachShadowImpl;
629
+ }
630
+
631
+ let getProperty$1;
632
+
633
+ function setGetProperty(getPropertyImpl) {
634
+ getProperty$1 = getPropertyImpl;
635
+ }
636
+
637
+ let setProperty$1;
638
+
639
+ function setSetProperty(setPropertyImpl) {
640
+ setProperty$1 = setPropertyImpl;
641
+ }
642
+
643
+ let setText$1;
644
+
645
+ function setSetText(setTextImpl) {
646
+ setText$1 = setTextImpl;
647
+ }
648
+
649
+ let getAttribute$1;
650
+
651
+ function setGetAttribute(getAttributeImpl) {
652
+ getAttribute$1 = getAttributeImpl;
653
+ }
654
+
655
+ let setAttribute$1;
656
+
657
+ function setSetAttribute(setAttributeImpl) {
658
+ setAttribute$1 = setAttributeImpl;
659
+ }
660
+
661
+ let removeAttribute$1;
662
+
663
+ function setRemoveAttribute(removeAttributeImpl) {
664
+ removeAttribute$1 = removeAttributeImpl;
665
+ }
666
+
667
+ let addEventListener$1;
668
+
669
+ function setAddEventListener(addEventListenerImpl) {
670
+ addEventListener$1 = addEventListenerImpl;
671
+ }
672
+
673
+ let removeEventListener$1;
674
+
675
+ function setRemoveEventListener(removeEventListenerImpl) {
676
+ removeEventListener$1 = removeEventListenerImpl;
677
+ }
678
+
679
+ let dispatchEvent$1;
680
+
681
+ function setDispatchEvent(dispatchEventImpl) {
682
+ dispatchEvent$1 = dispatchEventImpl;
683
+ }
684
+
685
+ let getClassList$1;
686
+
687
+ function setGetClassList(getClassListImpl) {
688
+ getClassList$1 = getClassListImpl;
689
+ }
690
+
691
+ let setCSSStyleProperty$1;
692
+
693
+ function setSetCSSStyleProperty(setCSSStylePropertyImpl) {
694
+ setCSSStyleProperty$1 = setCSSStylePropertyImpl;
695
+ }
696
+
697
+ let getBoundingClientRect$1;
698
+
699
+ function setGetBoundingClientRect(getBoundingClientRectImpl) {
700
+ getBoundingClientRect$1 = getBoundingClientRectImpl;
701
+ }
702
+
703
+ let querySelector$1;
704
+
705
+ function setQuerySelector(querySelectorImpl) {
706
+ querySelector$1 = querySelectorImpl;
707
+ }
708
+
709
+ let querySelectorAll$1;
710
+
711
+ function setQuerySelectorAll(querySelectorAllImpl) {
712
+ querySelectorAll$1 = querySelectorAllImpl;
713
+ }
714
+
715
+ let getElementsByTagName$1;
716
+
717
+ function setGetElementsByTagName(getElementsByTagNameImpl) {
718
+ getElementsByTagName$1 = getElementsByTagNameImpl;
719
+ }
720
+
721
+ let getElementsByClassName$1;
722
+
723
+ function setGetElementsByClassName(getElementsByClassNameImpl) {
724
+ getElementsByClassName$1 = getElementsByClassNameImpl;
725
+ }
726
+
727
+ let getChildren$1;
728
+
729
+ function setGetChildren(getChildrenImpl) {
730
+ getChildren$1 = getChildrenImpl;
731
+ }
732
+
733
+ let getChildNodes$1;
734
+
735
+ function setGetChildNodes(getChildNodesImpl) {
736
+ getChildNodes$1 = getChildNodesImpl;
737
+ }
738
+
739
+ let getFirstChild$1;
740
+
741
+ function setGetFirstChild(getFirstChildImpl) {
742
+ getFirstChild$1 = getFirstChildImpl;
743
+ }
744
+
745
+ let getFirstElementChild$1;
746
+
747
+ function setGetFirstElementChild(getFirstElementChildImpl) {
748
+ getFirstElementChild$1 = getFirstElementChildImpl;
749
+ }
750
+
751
+ let getLastChild$1;
752
+
753
+ function setGetLastChild(getLastChildImpl) {
754
+ getLastChild$1 = getLastChildImpl;
755
+ }
756
+
757
+ let getLastElementChild$1;
758
+
759
+ function setGetLastElementChild(getLastElementChildImpl) {
760
+ getLastElementChild$1 = getLastElementChildImpl;
761
+ }
762
+
763
+ let isConnected$1;
764
+
765
+ function setIsConnected(isConnectedImpl) {
766
+ isConnected$1 = isConnectedImpl;
767
+ }
768
+
769
+ let insertGlobalStylesheet$1;
770
+
771
+ function setInsertGlobalStylesheet(insertGlobalStylesheetImpl) {
772
+ insertGlobalStylesheet$1 = insertGlobalStylesheetImpl;
773
+ }
774
+
775
+ let insertStylesheet$1;
776
+
777
+ function setInsertStylesheet(insertStylesheetImpl) {
778
+ insertStylesheet$1 = insertStylesheetImpl;
779
+ }
780
+
781
+ let assertInstanceOfHTMLElement$1;
782
+
783
+ function setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElementImpl) {
784
+ assertInstanceOfHTMLElement$1 = assertInstanceOfHTMLElementImpl;
785
+ }
786
+
787
+ let defineCustomElement$1;
788
+
789
+ function setDefineCustomElement(defineCustomElementImpl) {
790
+ defineCustomElement$1 = defineCustomElementImpl;
791
+ }
792
+
793
+ let getCustomElement$1;
794
+
795
+ function setGetCustomElement(getCustomElementImpl) {
796
+ getCustomElement$1 = getCustomElementImpl;
556
797
  }
557
798
  /*
558
799
  * Copyright (c) 2019, salesforce.com, inc.
@@ -806,9 +1047,6 @@ function createAllEventListeners(vnode) {
806
1047
  elm,
807
1048
  data: {
808
1049
  on
809
- },
810
- owner: {
811
- renderer
812
1050
  }
813
1051
  } = vnode;
814
1052
 
@@ -821,7 +1059,7 @@ function createAllEventListeners(vnode) {
821
1059
  let name;
822
1060
 
823
1061
  for (name in on) {
824
- renderer.addEventListener(elm, name, listener);
1062
+ addEventListener$1(elm, name, listener);
825
1063
  }
826
1064
  }
827
1065
 
@@ -963,9 +1201,6 @@ function updateAttrs(oldVnode, vnode) {
963
1201
  const {
964
1202
  data: {
965
1203
  attrs
966
- },
967
- owner: {
968
- renderer
969
1204
  }
970
1205
  } = vnode;
971
1206
 
@@ -988,10 +1223,6 @@ function updateAttrs(oldVnode, vnode) {
988
1223
  }
989
1224
 
990
1225
  const elm = vnode.elm;
991
- const {
992
- setAttribute,
993
- removeAttribute
994
- } = renderer;
995
1226
  let key;
996
1227
  oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
997
1228
  // this routine is only useful for data-* attributes in all kind of elements
@@ -1006,14 +1237,14 @@ function updateAttrs(oldVnode, vnode) {
1006
1237
 
1007
1238
  if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
1008
1239
  // Assume xml namespace
1009
- setAttribute(elm, key, cur, xmlNS);
1240
+ setAttribute$1(elm, key, cur, xmlNS);
1010
1241
  } else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
1011
1242
  // Assume xlink namespace
1012
- setAttribute(elm, key, cur, xlinkNS);
1013
- } else if (isNull(cur)) {
1014
- removeAttribute(elm, key);
1243
+ setAttribute$1(elm, key, cur, xlinkNS);
1244
+ } else if (isNull(cur) || isUndefined$1(cur)) {
1245
+ removeAttribute$1(elm, key);
1015
1246
  } else {
1016
- setAttribute(elm, key, cur);
1247
+ setAttribute$1(elm, key, cur);
1017
1248
  }
1018
1249
 
1019
1250
  lockAttribute();
@@ -1061,17 +1292,14 @@ function update(oldVnode, vnode) {
1061
1292
  const isFirstPatch = isUndefined$1(oldProps);
1062
1293
  const {
1063
1294
  elm,
1064
- sel,
1065
- owner: {
1066
- renderer
1067
- }
1295
+ sel
1068
1296
  } = vnode;
1069
1297
 
1070
1298
  for (const key in props) {
1071
1299
  const cur = props[key]; // if it is the first time this element is patched, or the current value is different to the previous value...
1072
1300
 
1073
- if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? renderer.getProperty(elm, key) : oldProps[key])) {
1074
- renderer.setProperty(elm, key, cur);
1301
+ if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
1302
+ setProperty$1(elm, key, cur);
1075
1303
  }
1076
1304
  }
1077
1305
  }
@@ -1140,9 +1368,6 @@ function updateClassAttribute(oldVnode, vnode) {
1140
1368
  elm,
1141
1369
  data: {
1142
1370
  className: newClass
1143
- },
1144
- owner: {
1145
- renderer
1146
1371
  }
1147
1372
  } = vnode;
1148
1373
  const {
@@ -1155,7 +1380,7 @@ function updateClassAttribute(oldVnode, vnode) {
1155
1380
  return;
1156
1381
  }
1157
1382
 
1158
- const classList = renderer.getClassList(elm);
1383
+ const classList = getClassList$1(elm);
1159
1384
  const newClassMap = getMapFromClassName(newClass);
1160
1385
  const oldClassMap = getMapFromClassName(oldClass);
1161
1386
  let name;
@@ -1193,24 +1418,17 @@ function updateStyleAttribute(oldVnode, vnode) {
1193
1418
  elm,
1194
1419
  data: {
1195
1420
  style: newStyle
1196
- },
1197
- owner: {
1198
- renderer
1199
1421
  }
1200
1422
  } = vnode;
1201
- const {
1202
- setAttribute,
1203
- removeAttribute
1204
- } = renderer;
1205
1423
 
1206
1424
  if (oldVnode.data.style === newStyle) {
1207
1425
  return;
1208
1426
  }
1209
1427
 
1210
1428
  if (!isString(newStyle) || newStyle === '') {
1211
- removeAttribute(elm, 'style');
1429
+ removeAttribute$1(elm, 'style');
1212
1430
  } else {
1213
- setAttribute(elm, 'style', newStyle);
1431
+ setAttribute$1(elm, 'style', newStyle);
1214
1432
  }
1215
1433
  }
1216
1434
 
@@ -1235,9 +1453,6 @@ function createClassAttribute(vnode) {
1235
1453
  elm,
1236
1454
  data: {
1237
1455
  classMap
1238
- },
1239
- owner: {
1240
- renderer
1241
1456
  }
1242
1457
  } = vnode;
1243
1458
 
@@ -1245,7 +1460,7 @@ function createClassAttribute(vnode) {
1245
1460
  return;
1246
1461
  }
1247
1462
 
1248
- const classList = renderer.getClassList(elm);
1463
+ const classList = getClassList$1(elm);
1249
1464
 
1250
1465
  for (const name in classMap) {
1251
1466
  classList.add(name);
@@ -1269,9 +1484,6 @@ function createStyleAttribute(vnode) {
1269
1484
  elm,
1270
1485
  data: {
1271
1486
  styleDecls
1272
- },
1273
- owner: {
1274
- renderer
1275
1487
  }
1276
1488
  } = vnode;
1277
1489
 
@@ -1281,7 +1493,7 @@ function createStyleAttribute(vnode) {
1281
1493
 
1282
1494
  for (let i = 0; i < styleDecls.length; i++) {
1283
1495
  const [prop, value, important] = styleDecls[i];
1284
- renderer.setCSSStyleProperty(elm, prop, value, important);
1496
+ setCSSStyleProperty$1(elm, prop, value, important);
1285
1497
  }
1286
1498
  }
1287
1499
 
@@ -1295,15 +1507,6 @@ var modStaticStyle = {
1295
1507
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1296
1508
  */
1297
1509
 
1298
- /**
1299
- @license
1300
- Copyright (c) 2015 Simon Friis Vindum.
1301
- This code may only be used under the MIT License found at
1302
- https://github.com/snabbdom/snabbdom/blob/master/LICENSE
1303
- Code distributed by Snabbdom as part of the Snabbdom project at
1304
- https://github.com/snabbdom/snabbdom/
1305
- */
1306
-
1307
1510
  function isUndef(s) {
1308
1511
  return s === undefined;
1309
1512
  }
@@ -1391,7 +1594,7 @@ function updateDynamicChildren(parentElm, oldCh, newCh) {
1391
1594
  } else if (sameVnode(oldStartVnode, newEndVnode)) {
1392
1595
  // Vnode moved right
1393
1596
  patchVnode(oldStartVnode, newEndVnode);
1394
- newEndVnode.hook.move(oldStartVnode, parentElm, oldEndVnode.owner.renderer.nextSibling(oldEndVnode.elm));
1597
+ newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
1395
1598
  oldStartVnode = oldCh[++oldStartIdx];
1396
1599
  newEndVnode = newCh[--newEndIdx];
1397
1600
  } else if (sameVnode(oldEndVnode, newStartVnode)) {
@@ -1873,7 +2076,7 @@ function patchLightningElementPrototypeWithRestrictions(proto) {
1873
2076
  defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
1874
2077
  }
1875
2078
  /*
1876
- * Copyright (c) 2020, salesforce.com, inc.
2079
+ * Copyright (c) 2018, salesforce.com, inc.
1877
2080
  * All rights reserved.
1878
2081
  * SPDX-License-Identifier: MIT
1879
2082
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -1926,6 +2129,7 @@ const {
1926
2129
  isArray
1927
2130
  } = Array;
1928
2131
  const {
2132
+ prototype: ObjectDotPrototype,
1929
2133
  getPrototypeOf,
1930
2134
  create: ObjectCreate,
1931
2135
  defineProperty: ObjectDefineProperty,
@@ -2575,8 +2779,6 @@ if (process.env.NODE_ENV !== 'production') {
2575
2779
  init();
2576
2780
  }
2577
2781
 
2578
- const ObjectDotPrototype = Object.prototype;
2579
-
2580
2782
  function defaultValueIsObservable(value) {
2581
2783
  // intentionally checking for null
2582
2784
  if (value === null) {
@@ -2604,99 +2806,85 @@ const defaultValueMutated = (obj, key) => {
2604
2806
  /* do nothing */
2605
2807
  };
2606
2808
 
2607
- const defaultValueDistortion = value => value;
2608
-
2609
2809
  function createShadowTarget(value) {
2610
2810
  return isArray(value) ? [] : {};
2611
2811
  }
2612
2812
 
2613
- class ReactiveMembrane {
2614
- constructor(options) {
2615
- this.valueDistortion = defaultValueDistortion;
2616
- this.valueMutated = defaultValueMutated;
2617
- this.valueObserved = defaultValueObserved;
2618
- this.valueIsObservable = defaultValueIsObservable;
2813
+ class ObservableMembrane {
2814
+ constructor(options = {}) {
2619
2815
  this.readOnlyObjectGraph = new WeakMap();
2620
2816
  this.reactiveObjectGraph = new WeakMap();
2621
-
2622
- if (!isUndefined(options)) {
2623
- const {
2624
- valueDistortion,
2625
- valueMutated,
2626
- valueObserved,
2627
- valueIsObservable,
2628
- tagPropertyKey
2629
- } = options;
2630
- this.valueDistortion = isFunction(valueDistortion) ? valueDistortion : defaultValueDistortion;
2631
- this.valueMutated = isFunction(valueMutated) ? valueMutated : defaultValueMutated;
2632
- this.valueObserved = isFunction(valueObserved) ? valueObserved : defaultValueObserved;
2633
- this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
2634
- this.tagPropertyKey = tagPropertyKey;
2635
- }
2817
+ const {
2818
+ valueMutated,
2819
+ valueObserved,
2820
+ valueIsObservable,
2821
+ tagPropertyKey
2822
+ } = options;
2823
+ this.valueMutated = isFunction(valueMutated) ? valueMutated : defaultValueMutated;
2824
+ this.valueObserved = isFunction(valueObserved) ? valueObserved : defaultValueObserved;
2825
+ this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
2826
+ this.tagPropertyKey = tagPropertyKey;
2636
2827
  }
2637
2828
 
2638
2829
  getProxy(value) {
2639
2830
  const unwrappedValue = unwrap$1(value);
2640
- const distorted = this.valueDistortion(unwrappedValue);
2641
2831
 
2642
- if (this.valueIsObservable(distorted)) {
2643
- if (this.readOnlyObjectGraph.get(distorted) === value) {
2644
- // when trying to extract the writable version of a readonly
2645
- // we return the readonly.
2832
+ if (this.valueIsObservable(unwrappedValue)) {
2833
+ // When trying to extract the writable version of a readonly we return the readonly.
2834
+ if (this.readOnlyObjectGraph.get(unwrappedValue) === value) {
2646
2835
  return value;
2647
2836
  }
2648
2837
 
2649
- return this.getReactiveHandler(unwrappedValue, distorted);
2838
+ return this.getReactiveHandler(unwrappedValue);
2650
2839
  }
2651
2840
 
2652
- return distorted;
2841
+ return unwrappedValue;
2653
2842
  }
2654
2843
 
2655
2844
  getReadOnlyProxy(value) {
2656
2845
  value = unwrap$1(value);
2657
- const distorted = this.valueDistortion(value);
2658
2846
 
2659
- if (this.valueIsObservable(distorted)) {
2660
- return this.getReadOnlyHandler(value, distorted);
2847
+ if (this.valueIsObservable(value)) {
2848
+ return this.getReadOnlyHandler(value);
2661
2849
  }
2662
2850
 
2663
- return distorted;
2851
+ return value;
2664
2852
  }
2665
2853
 
2666
2854
  unwrapProxy(p) {
2667
2855
  return unwrap$1(p);
2668
2856
  }
2669
2857
 
2670
- getReactiveHandler(value, distortedValue) {
2671
- let proxy = this.reactiveObjectGraph.get(distortedValue);
2858
+ getReactiveHandler(value) {
2859
+ let proxy = this.reactiveObjectGraph.get(value);
2672
2860
 
2673
2861
  if (isUndefined(proxy)) {
2674
2862
  // caching the proxy after the first time it is accessed
2675
- const handler = new ReactiveProxyHandler(this, distortedValue);
2676
- proxy = new Proxy(createShadowTarget(distortedValue), handler);
2863
+ const handler = new ReactiveProxyHandler(this, value);
2864
+ proxy = new Proxy(createShadowTarget(value), handler);
2677
2865
  registerProxy(proxy, value);
2678
- this.reactiveObjectGraph.set(distortedValue, proxy);
2866
+ this.reactiveObjectGraph.set(value, proxy);
2679
2867
  }
2680
2868
 
2681
2869
  return proxy;
2682
2870
  }
2683
2871
 
2684
- getReadOnlyHandler(value, distortedValue) {
2685
- let proxy = this.readOnlyObjectGraph.get(distortedValue);
2872
+ getReadOnlyHandler(value) {
2873
+ let proxy = this.readOnlyObjectGraph.get(value);
2686
2874
 
2687
2875
  if (isUndefined(proxy)) {
2688
2876
  // caching the proxy after the first time it is accessed
2689
- const handler = new ReadOnlyHandler(this, distortedValue);
2690
- proxy = new Proxy(createShadowTarget(distortedValue), handler);
2877
+ const handler = new ReadOnlyHandler(this, value);
2878
+ proxy = new Proxy(createShadowTarget(value), handler);
2691
2879
  registerProxy(proxy, value);
2692
- this.readOnlyObjectGraph.set(distortedValue, proxy);
2880
+ this.readOnlyObjectGraph.set(value, proxy);
2693
2881
  }
2694
2882
 
2695
2883
  return proxy;
2696
2884
  }
2697
2885
 
2698
2886
  }
2699
- /** version: 1.1.5 */
2887
+ /** version: 2.0.0 */
2700
2888
 
2701
2889
  /*
2702
2890
  * Copyright (c) 2018, salesforce.com, inc.
@@ -2707,15 +2895,9 @@ class ReactiveMembrane {
2707
2895
 
2708
2896
 
2709
2897
  const lockerLivePropertyKey = Symbol.for('@@lockerLiveValue');
2710
-
2711
- function valueDistortion(value) {
2712
- return value;
2713
- }
2714
-
2715
- const reactiveMembrane = new ReactiveMembrane({
2898
+ const reactiveMembrane = new ObservableMembrane({
2716
2899
  valueObserved,
2717
2900
  valueMutated,
2718
- valueDistortion,
2719
2901
  tagPropertyKey: lockerLivePropertyKey
2720
2902
  });
2721
2903
  /**
@@ -2724,16 +2906,9 @@ const reactiveMembrane = new ReactiveMembrane({
2724
2906
  * change or being removed.
2725
2907
  */
2726
2908
 
2727
- const unwrap = function (value) {
2728
- const unwrapped = reactiveMembrane.unwrapProxy(value);
2729
-
2730
- if (unwrapped !== value) {
2731
- // if value is a proxy, unwrap to access original value and apply distortion
2732
- return valueDistortion(unwrapped);
2733
- }
2734
-
2735
- return value;
2736
- };
2909
+ function unwrap(value) {
2910
+ return reactiveMembrane.unwrapProxy(value);
2911
+ }
2737
2912
  /*
2738
2913
  * Copyright (c) 2018, salesforce.com, inc.
2739
2914
  * All rights reserved.
@@ -2821,9 +2996,7 @@ function createBridgeToElementDescriptor(propName, descriptor) {
2821
2996
 
2822
2997
 
2823
2998
  const LightningElement = function () {
2824
- var _a; // This should be as performant as possible, while any initialization should be done lazily
2825
-
2826
-
2999
+ // This should be as performant as possible, while any initialization should be done lazily
2827
3000
  if (isNull(vmBeingConstructed)) {
2828
3001
  throw new ReferenceError('Illegal constructor');
2829
3002
  }
@@ -2831,15 +3004,14 @@ const LightningElement = function () {
2831
3004
  const vm = vmBeingConstructed;
2832
3005
  const {
2833
3006
  def,
2834
- elm,
2835
- renderer
3007
+ elm
2836
3008
  } = vm;
2837
3009
  const {
2838
3010
  bridge
2839
3011
  } = def;
2840
3012
 
2841
3013
  if (process.env.NODE_ENV !== 'production') {
2842
- (_a = renderer.assertInstanceOfHTMLElement) === null || _a === void 0 ? void 0 : _a.call(renderer, vm.elm, `Component creation requires a DOM element to be associated to ${vm}.`);
3014
+ assertInstanceOfHTMLElement$1(vm.elm, `Component creation requires a DOM element to be associated to ${vm}.`);
2843
3015
  }
2844
3016
 
2845
3017
  const component = this;
@@ -2869,7 +3041,7 @@ const LightningElement = function () {
2869
3041
  if (vm.renderMode === 1
2870
3042
  /* Shadow */
2871
3043
  ) {
2872
- attachShadow(vm);
3044
+ doAttachShadow(vm);
2873
3045
  } // Adding extra guard rails in DEV mode.
2874
3046
 
2875
3047
 
@@ -2881,17 +3053,16 @@ const LightningElement = function () {
2881
3053
  return this;
2882
3054
  };
2883
3055
 
2884
- function attachShadow(vm) {
3056
+ function doAttachShadow(vm) {
2885
3057
  const {
2886
3058
  elm,
2887
3059
  mode,
2888
- renderer,
2889
3060
  shadowMode,
2890
3061
  def: {
2891
3062
  ctor
2892
3063
  }
2893
3064
  } = vm;
2894
- const cmpRoot = renderer.attachShadow(elm, {
3065
+ const cmpRoot = attachShadow$1(elm, {
2895
3066
  [KEY__SYNTHETIC_MODE]: shadowMode === 1
2896
3067
  /* Synthetic */
2897
3068
  ,
@@ -2918,21 +3089,15 @@ LightningElement.prototype = {
2918
3089
 
2919
3090
  dispatchEvent(event) {
2920
3091
  const {
2921
- elm,
2922
- renderer: {
2923
- dispatchEvent
2924
- }
3092
+ elm
2925
3093
  } = getAssociatedVM(this);
2926
- return dispatchEvent(elm, event);
3094
+ return dispatchEvent$1(elm, event);
2927
3095
  },
2928
3096
 
2929
3097
  addEventListener(type, listener, options) {
2930
3098
  const vm = getAssociatedVM(this);
2931
3099
  const {
2932
- elm,
2933
- renderer: {
2934
- addEventListener
2935
- }
3100
+ elm
2936
3101
  } = vm;
2937
3102
 
2938
3103
  if (process.env.NODE_ENV !== 'production') {
@@ -2943,92 +3108,68 @@ LightningElement.prototype = {
2943
3108
  }
2944
3109
 
2945
3110
  const wrappedListener = getWrappedComponentsListener(vm, listener);
2946
- addEventListener(elm, type, wrappedListener, options);
3111
+ addEventListener$1(elm, type, wrappedListener, options);
2947
3112
  },
2948
3113
 
2949
3114
  removeEventListener(type, listener, options) {
2950
3115
  const vm = getAssociatedVM(this);
2951
3116
  const {
2952
- elm,
2953
- renderer: {
2954
- removeEventListener
2955
- }
3117
+ elm
2956
3118
  } = vm;
2957
3119
  const wrappedListener = getWrappedComponentsListener(vm, listener);
2958
- removeEventListener(elm, type, wrappedListener, options);
3120
+ removeEventListener$1(elm, type, wrappedListener, options);
2959
3121
  },
2960
3122
 
2961
3123
  hasAttribute(name) {
2962
3124
  const {
2963
- elm,
2964
- renderer: {
2965
- getAttribute
2966
- }
3125
+ elm
2967
3126
  } = getAssociatedVM(this);
2968
- return !isNull(getAttribute(elm, name));
3127
+ return !isNull(getAttribute$1(elm, name));
2969
3128
  },
2970
3129
 
2971
3130
  hasAttributeNS(namespace, name) {
2972
3131
  const {
2973
- elm,
2974
- renderer: {
2975
- getAttribute
2976
- }
3132
+ elm
2977
3133
  } = getAssociatedVM(this);
2978
- return !isNull(getAttribute(elm, name, namespace));
3134
+ return !isNull(getAttribute$1(elm, name, namespace));
2979
3135
  },
2980
3136
 
2981
3137
  removeAttribute(name) {
2982
3138
  const {
2983
- elm,
2984
- renderer: {
2985
- removeAttribute
2986
- }
3139
+ elm
2987
3140
  } = getAssociatedVM(this);
2988
3141
  unlockAttribute(elm, name);
2989
- removeAttribute(elm, name);
3142
+ removeAttribute$1(elm, name);
2990
3143
  lockAttribute();
2991
3144
  },
2992
3145
 
2993
3146
  removeAttributeNS(namespace, name) {
2994
3147
  const {
2995
- elm,
2996
- renderer: {
2997
- removeAttribute
2998
- }
3148
+ elm
2999
3149
  } = getAssociatedVM(this);
3000
3150
  unlockAttribute(elm, name);
3001
- removeAttribute(elm, name, namespace);
3151
+ removeAttribute$1(elm, name, namespace);
3002
3152
  lockAttribute();
3003
3153
  },
3004
3154
 
3005
3155
  getAttribute(name) {
3006
3156
  const {
3007
- elm,
3008
- renderer: {
3009
- getAttribute
3010
- }
3157
+ elm
3011
3158
  } = getAssociatedVM(this);
3012
- return getAttribute(elm, name);
3159
+ return getAttribute$1(elm, name);
3013
3160
  },
3014
3161
 
3015
3162
  getAttributeNS(namespace, name) {
3016
3163
  const {
3017
- elm,
3018
- renderer: {
3019
- getAttribute
3020
- }
3164
+ elm
3021
3165
  } = getAssociatedVM(this);
3022
- return getAttribute(elm, name, namespace);
3166
+ return getAttribute$1(elm, name, namespace);
3023
3167
  },
3024
3168
 
3025
3169
  setAttribute(name, value) {
3026
3170
  const vm = getAssociatedVM(this);
3027
3171
  const {
3028
- elm,
3029
- renderer: {
3030
- setAttribute
3031
- }
3172
+ elm
3032
3173
  } = vm;
3033
3174
 
3034
3175
  if (process.env.NODE_ENV !== 'production') {
@@ -3036,17 +3177,14 @@ LightningElement.prototype = {
3036
3177
  }
3037
3178
 
3038
3179
  unlockAttribute(elm, name);
3039
- setAttribute(elm, name, value);
3180
+ setAttribute$1(elm, name, value);
3040
3181
  lockAttribute();
3041
3182
  },
3042
3183
 
3043
3184
  setAttributeNS(namespace, name, value) {
3044
3185
  const vm = getAssociatedVM(this);
3045
3186
  const {
3046
- elm,
3047
- renderer: {
3048
- setAttribute
3049
- }
3187
+ elm
3050
3188
  } = vm;
3051
3189
 
3052
3190
  if (process.env.NODE_ENV !== 'production') {
@@ -3054,43 +3192,34 @@ LightningElement.prototype = {
3054
3192
  }
3055
3193
 
3056
3194
  unlockAttribute(elm, name);
3057
- setAttribute(elm, name, value, namespace);
3195
+ setAttribute$1(elm, name, value, namespace);
3058
3196
  lockAttribute();
3059
3197
  },
3060
3198
 
3061
3199
  getBoundingClientRect() {
3062
3200
  const vm = getAssociatedVM(this);
3063
3201
  const {
3064
- elm,
3065
- renderer: {
3066
- getBoundingClientRect
3067
- }
3202
+ elm
3068
3203
  } = vm;
3069
3204
 
3070
3205
  if (process.env.NODE_ENV !== 'production') {
3071
3206
  warnIfInvokedDuringConstruction(vm, 'getBoundingClientRect()');
3072
3207
  }
3073
3208
 
3074
- return getBoundingClientRect(elm);
3209
+ return getBoundingClientRect$1(elm);
3075
3210
  },
3076
3211
 
3077
3212
  get isConnected() {
3078
3213
  const {
3079
- elm,
3080
- renderer: {
3081
- isConnected
3082
- }
3214
+ elm
3083
3215
  } = getAssociatedVM(this);
3084
- return isConnected(elm);
3216
+ return isConnected$1(elm);
3085
3217
  },
3086
3218
 
3087
3219
  get classList() {
3088
3220
  const vm = getAssociatedVM(this);
3089
3221
  const {
3090
- elm,
3091
- renderer: {
3092
- getClassList
3093
- }
3222
+ elm
3094
3223
  } = vm;
3095
3224
 
3096
3225
  if (process.env.NODE_ENV !== 'production') {
@@ -3099,7 +3228,7 @@ LightningElement.prototype = {
3099
3228
  assert.isFalse(isBeingConstructed(vm), `Failed to construct ${vm}: The result must not have attributes. Adding or tampering with classname in constructor is not allowed in a web component, use connectedCallback() instead.`);
3100
3229
  }
3101
3230
 
3102
- return getClassList(elm);
3231
+ return getClassList$1(elm);
3103
3232
  },
3104
3233
 
3105
3234
  get template() {
@@ -3133,23 +3262,48 @@ LightningElement.prototype = {
3133
3262
  }
3134
3263
 
3135
3264
  };
3136
- const queryAndChildGetterDescriptors = create(null);
3137
- const childGetters = [['children', 'getChildren'], ['childNodes', 'getChildNodes'], ['firstChild', 'getFirstChild'], ['firstElementChild', 'getFirstElementChild'], ['lastChild', 'getLastChild'], ['lastElementChild', 'getLastElementChild']]; // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
3265
+ const queryAndChildGetterDescriptors = create(null); // The reason we don't just call `import * as renderer from '../renderer'` here is that the bundle size
3266
+ // is smaller if we reference each function individually. Otherwise Rollup will create one big frozen
3267
+ // object representing the renderer, with a lot of methods we don't actually need.
3268
+
3269
+ const childGetters = ['children', 'childNodes', 'firstChild', 'firstElementChild', 'lastChild', 'lastElementChild'];
3270
+
3271
+ function getChildGetter(methodName) {
3272
+ switch (methodName) {
3273
+ case 'children':
3274
+ return getChildren$1;
3275
+
3276
+ case 'childNodes':
3277
+ return getChildNodes$1;
3278
+
3279
+ case 'firstChild':
3280
+ return getFirstChild$1;
3281
+
3282
+ case 'firstElementChild':
3283
+ return getFirstElementChild$1;
3284
+
3285
+ case 'lastChild':
3286
+ return getLastChild$1;
3287
+
3288
+ case 'lastElementChild':
3289
+ return getLastElementChild$1;
3290
+ }
3291
+ } // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
3292
+
3138
3293
 
3139
- for (const [elementProp, rendererMethod] of childGetters) {
3140
- queryAndChildGetterDescriptors[elementProp] = {
3294
+ for (const childGetter of childGetters) {
3295
+ queryAndChildGetterDescriptors[childGetter] = {
3141
3296
  get() {
3142
3297
  const vm = getAssociatedVM(this);
3143
3298
  const {
3144
- elm,
3145
- renderer
3299
+ elm
3146
3300
  } = vm;
3147
3301
 
3148
3302
  if (process.env.NODE_ENV !== 'production') {
3149
- warnIfInvokedDuringConstruction(vm, elementProp);
3303
+ warnIfInvokedDuringConstruction(vm, childGetter);
3150
3304
  }
3151
3305
 
3152
- return renderer[rendererMethod](elm);
3306
+ return getChildGetter(childGetter)(elm);
3153
3307
  },
3154
3308
 
3155
3309
  configurable: true,
@@ -3157,22 +3311,38 @@ for (const [elementProp, rendererMethod] of childGetters) {
3157
3311
  };
3158
3312
  }
3159
3313
 
3160
- const queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll']; // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
3314
+ const queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
3315
+
3316
+ function getQueryMethod(methodName) {
3317
+ switch (methodName) {
3318
+ case 'getElementsByClassName':
3319
+ return getElementsByClassName$1;
3320
+
3321
+ case 'getElementsByTagName':
3322
+ return getElementsByTagName$1;
3323
+
3324
+ case 'querySelector':
3325
+ return querySelector$1;
3326
+
3327
+ case 'querySelectorAll':
3328
+ return querySelectorAll$1;
3329
+ }
3330
+ } // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
3331
+
3161
3332
 
3162
3333
  for (const queryMethod of queryMethods) {
3163
3334
  queryAndChildGetterDescriptors[queryMethod] = {
3164
3335
  value(arg) {
3165
3336
  const vm = getAssociatedVM(this);
3166
3337
  const {
3167
- elm,
3168
- renderer
3338
+ elm
3169
3339
  } = vm;
3170
3340
 
3171
3341
  if (process.env.NODE_ENV !== 'production') {
3172
3342
  warnIfInvokedDuringConstruction(vm, `${queryMethod}()`);
3173
3343
  }
3174
3344
 
3175
- return renderer[queryMethod](elm, arg);
3345
+ return getQueryMethod(queryMethod)(elm, arg);
3176
3346
  },
3177
3347
 
3178
3348
  configurable: true,
@@ -4328,10 +4498,6 @@ function createComponentDef(Ctor) {
4328
4498
 
4329
4499
  assert.isTrue(Ctor.constructor, `Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
4330
4500
 
4331
- if (!runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
4332
- assert.isFalse('shadowSupportMode' in Ctor, `${ctorName || 'Anonymous class'} is an invalid LWC component. The shadowSupportMode static property is not available in this environment.`);
4333
- }
4334
-
4335
4501
  if (!isUndefined$1(ctorShadowSupportMode)) {
4336
4502
  assert.invariant(ctorShadowSupportMode === "any"
4337
4503
  /* Any */
@@ -4575,17 +4741,14 @@ function setScopeTokenClassIfNecessary(elm, owner) {
4575
4741
  const token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
4576
4742
 
4577
4743
  if (!isUndefined$1(token) && context.hasScopedStyles) {
4578
- owner.renderer.getClassList(elm).add(token);
4744
+ getClassList$1(elm).add(token);
4579
4745
  }
4580
4746
  }
4581
4747
 
4582
4748
  function updateNodeHook(oldVnode, vnode) {
4583
4749
  const {
4584
4750
  elm,
4585
- text,
4586
- owner: {
4587
- renderer
4588
- }
4751
+ text
4589
4752
  } = vnode;
4590
4753
 
4591
4754
  if (oldVnode.text !== text) {
@@ -4593,7 +4756,7 @@ function updateNodeHook(oldVnode, vnode) {
4593
4756
  unlockDomMutation();
4594
4757
  }
4595
4758
 
4596
- renderer.setText(elm, text);
4759
+ setText$1(elm, text);
4597
4760
 
4598
4761
  if (process.env.NODE_ENV !== 'production') {
4599
4762
  lockDomMutation();
@@ -4602,15 +4765,11 @@ function updateNodeHook(oldVnode, vnode) {
4602
4765
  }
4603
4766
 
4604
4767
  function insertNodeHook(vnode, parentNode, referenceNode) {
4605
- const {
4606
- renderer
4607
- } = vnode.owner;
4608
-
4609
4768
  if (process.env.NODE_ENV !== 'production') {
4610
4769
  unlockDomMutation();
4611
4770
  }
4612
4771
 
4613
- renderer.insert(vnode.elm, parentNode, referenceNode);
4772
+ insert$1(vnode.elm, parentNode, referenceNode);
4614
4773
 
4615
4774
  if (process.env.NODE_ENV !== 'production') {
4616
4775
  lockDomMutation();
@@ -4618,15 +4777,11 @@ function insertNodeHook(vnode, parentNode, referenceNode) {
4618
4777
  }
4619
4778
 
4620
4779
  function removeNodeHook(vnode, parentNode) {
4621
- const {
4622
- renderer
4623
- } = vnode.owner;
4624
-
4625
4780
  if (process.env.NODE_ENV !== 'production') {
4626
4781
  unlockDomMutation();
4627
4782
  }
4628
4783
 
4629
- renderer.remove(vnode.elm, parentNode);
4784
+ remove$1(vnode.elm, parentNode);
4630
4785
 
4631
4786
  if (process.env.NODE_ENV !== 'production') {
4632
4787
  lockDomMutation();
@@ -4718,13 +4873,15 @@ function updateElmHook(oldVnode, vnode) {
4718
4873
 
4719
4874
  function updateChildrenHook(oldVnode, vnode) {
4720
4875
  const {
4721
- children,
4722
- owner
4876
+ elm,
4877
+ children
4723
4878
  } = vnode;
4724
- const fn = hasDynamicChildren(children) ? updateDynamicChildren : updateStaticChildren;
4725
- runWithBoundaryProtection(owner, owner.owner, noop, () => {
4726
- fn(vnode.elm, oldVnode.children, children);
4727
- }, noop);
4879
+
4880
+ if (hasDynamicChildren(children)) {
4881
+ updateDynamicChildren(elm, oldVnode.children, children);
4882
+ } else {
4883
+ updateStaticChildren(elm, oldVnode.children, children);
4884
+ }
4728
4885
  }
4729
4886
 
4730
4887
  function allocateChildrenHook(vnode, vm) {
@@ -4790,8 +4947,7 @@ function createViewModelHook(elm, vnode) {
4790
4947
  createVM(elm, def, {
4791
4948
  mode,
4792
4949
  owner,
4793
- tagName: sel,
4794
- renderer: owner.renderer
4950
+ tagName: sel
4795
4951
  });
4796
4952
 
4797
4953
  if (process.env.NODE_ENV !== 'production') {
@@ -4837,16 +4993,13 @@ function vnodesAndElementHaveCompatibleAttrs(vnode, elm) {
4837
4993
  const {
4838
4994
  data: {
4839
4995
  attrs = {}
4840
- },
4841
- owner: {
4842
- renderer
4843
4996
  }
4844
4997
  } = vnode;
4845
4998
  let nodesAreCompatible = true; // Validate attributes, though we could always recovery from those by running the update mods.
4846
4999
  // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
4847
5000
 
4848
5001
  for (const [attrName, attrValue] of Object.entries(attrs)) {
4849
- const elmAttrValue = renderer.getAttribute(elm, attrName);
5002
+ const elmAttrValue = getAttribute$1(elm, attrName);
4850
5003
 
4851
5004
  if (String(attrValue) !== elmAttrValue) {
4852
5005
  logError(`Mismatch hydrating element <${elm.tagName.toLowerCase()}>: attribute "${attrName}" has different values, expected "${attrValue}" but found "${elmAttrValue}"`, vnode.owner);
@@ -4862,9 +5015,6 @@ function vnodesAndElementHaveCompatibleClass(vnode, elm) {
4862
5015
  data: {
4863
5016
  className,
4864
5017
  classMap
4865
- },
4866
- owner: {
4867
- renderer
4868
5018
  }
4869
5019
  } = vnode;
4870
5020
  let nodesAreCompatible = true;
@@ -4876,7 +5026,7 @@ function vnodesAndElementHaveCompatibleClass(vnode, elm) {
4876
5026
  vnodeClassName = className;
4877
5027
  } else if (!isUndefined$1(classMap)) {
4878
5028
  // classMap is used when class is set to static value.
4879
- const classList = renderer.getClassList(elm);
5029
+ const classList = getClassList$1(elm);
4880
5030
  let computedClassName = ''; // all classes from the vnode should be in the element.classList
4881
5031
 
4882
5032
  for (const name in classMap) {
@@ -4906,12 +5056,9 @@ function vnodesAndElementHaveCompatibleStyle(vnode, elm) {
4906
5056
  data: {
4907
5057
  style,
4908
5058
  styleDecls
4909
- },
4910
- owner: {
4911
- renderer
4912
5059
  }
4913
5060
  } = vnode;
4914
- const elmStyle = renderer.getAttribute(elm, 'style') || '';
5061
+ const elmStyle = getAttribute$1(elm, 'style') || '';
4915
5062
  let vnodeStyle;
4916
5063
  let nodesAreCompatible = true;
4917
5064
 
@@ -5048,12 +5195,12 @@ function hasDynamicChildren(children) {
5048
5195
  */
5049
5196
 
5050
5197
 
5051
- function getUpgradableConstructor(tagName, renderer) {
5198
+ function getUpgradableConstructor(tagName) {
5052
5199
  // Should never get a tag with upper case letter at this point, the compiler should
5053
5200
  // produce only tags with lowercase letters
5054
5201
  // But, for backwards compatibility, we will lower case the tagName
5055
5202
  tagName = tagName.toLowerCase();
5056
- let CE = renderer.getCustomElement(tagName);
5203
+ let CE = getCustomElement$1(tagName);
5057
5204
 
5058
5205
  if (!isUndefined$1(CE)) {
5059
5206
  return CE;
@@ -5064,7 +5211,7 @@ function getUpgradableConstructor(tagName, renderer) {
5064
5211
  */
5065
5212
 
5066
5213
 
5067
- CE = class LWCUpgradableElement extends renderer.HTMLElement {
5214
+ CE = class LWCUpgradableElement extends HTMLElementExported$1 {
5068
5215
  constructor(upgradeCallback) {
5069
5216
  super();
5070
5217
 
@@ -5074,7 +5221,7 @@ function getUpgradableConstructor(tagName, renderer) {
5074
5221
  }
5075
5222
 
5076
5223
  };
5077
- renderer.defineCustomElement(tagName, CE);
5224
+ defineCustomElement$1(tagName, CE);
5078
5225
  return CE;
5079
5226
  }
5080
5227
  /*
@@ -5092,10 +5239,7 @@ const TextHook = {
5092
5239
  const {
5093
5240
  owner
5094
5241
  } = vnode;
5095
- const {
5096
- renderer
5097
- } = owner;
5098
- const elm = renderer.createText(vnode.text);
5242
+ const elm = createText$1(vnode.text);
5099
5243
  linkNodeToShadow(elm, owner);
5100
5244
  vnode.elm = elm;
5101
5245
  },
@@ -5129,10 +5273,7 @@ const CommentHook = {
5129
5273
  owner,
5130
5274
  text
5131
5275
  } = vnode;
5132
- const {
5133
- renderer
5134
- } = owner;
5135
- const elm = renderer.createComment(text);
5276
+ const elm = createComment$1(text);
5136
5277
  linkNodeToShadow(elm, owner);
5137
5278
  vnode.elm = elm;
5138
5279
  },
@@ -5174,11 +5315,8 @@ const ElementHook = {
5174
5315
  svg
5175
5316
  }
5176
5317
  } = vnode;
5177
- const {
5178
- renderer
5179
- } = owner;
5180
5318
  const namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
5181
- const elm = renderer.createElement(sel, namespace);
5319
+ const elm = createElement$2(sel, namespace);
5182
5320
  linkNodeToShadow(elm, owner);
5183
5321
  fallbackElmHook(elm, vnode);
5184
5322
  vnode.elm = elm;
@@ -5238,10 +5376,7 @@ const CustomElementHook = {
5238
5376
  sel,
5239
5377
  owner
5240
5378
  } = vnode;
5241
- const {
5242
- renderer
5243
- } = owner;
5244
- const UpgradableConstructor = getUpgradableConstructor(sel, renderer);
5379
+ const UpgradableConstructor = getUpgradableConstructor(sel);
5245
5380
  /**
5246
5381
  * Note: if the upgradable constructor does not expect, or throw when we new it
5247
5382
  * with a callback as the first argument, we could implement a more advanced
@@ -5334,8 +5469,7 @@ const CustomElementHook = {
5334
5469
  createVM(elm, def, {
5335
5470
  mode,
5336
5471
  owner,
5337
- tagName: sel,
5338
- renderer: owner.renderer
5472
+ tagName: sel
5339
5473
  });
5340
5474
  vnode.elm = elm;
5341
5475
  const vm = getAssociatedVM(elm);
@@ -5364,12 +5498,11 @@ const CustomElementHook = {
5364
5498
 
5365
5499
  function linkNodeToShadow(elm, owner) {
5366
5500
  const {
5367
- renderer,
5368
5501
  renderMode,
5369
5502
  shadowMode
5370
5503
  } = owner; // TODO [#1164]: this should eventually be done by the polyfill directly
5371
5504
 
5372
- if (renderer.isSyntheticShadowDefined) {
5505
+ if (isSyntheticShadowDefined$1) {
5373
5506
  if (shadowMode === 1
5374
5507
  /* Synthetic */
5375
5508
  || renderMode === 0
@@ -5901,7 +6034,6 @@ function updateStylesheetToken(vm, template) {
5901
6034
  const {
5902
6035
  elm,
5903
6036
  context,
5904
- renderer,
5905
6037
  renderMode,
5906
6038
  shadowMode
5907
6039
  } = vm;
@@ -5928,11 +6060,11 @@ function updateStylesheetToken(vm, template) {
5928
6060
  } = context;
5929
6061
 
5930
6062
  if (oldHasTokenInClass) {
5931
- renderer.getClassList(elm).remove(makeHostToken(oldToken));
6063
+ getClassList$1(elm).remove(makeHostToken(oldToken));
5932
6064
  }
5933
6065
 
5934
6066
  if (oldHasTokenInAttribute) {
5935
- renderer.removeAttribute(elm, makeHostToken(oldToken));
6067
+ removeAttribute$1(elm, makeHostToken(oldToken));
5936
6068
  } // Apply the new template styling token to the host element, if the new template has any
5937
6069
  // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
5938
6070
 
@@ -5944,12 +6076,12 @@ function updateStylesheetToken(vm, template) {
5944
6076
 
5945
6077
  if (!isUndefined$1(newToken)) {
5946
6078
  if (hasScopedStyles) {
5947
- renderer.getClassList(elm).add(makeHostToken(newToken));
6079
+ getClassList$1(elm).add(makeHostToken(newToken));
5948
6080
  newHasTokenInClass = true;
5949
6081
  }
5950
6082
 
5951
6083
  if (isSyntheticShadow) {
5952
- renderer.setAttribute(elm, makeHostToken(newToken), '');
6084
+ setAttribute$1(elm, makeHostToken(newToken), '');
5953
6085
  newHasTokenInAttribute = true;
5954
6086
  }
5955
6087
  } // Update the styling tokens present on the context object.
@@ -5962,6 +6094,7 @@ function updateStylesheetToken(vm, template) {
5962
6094
 
5963
6095
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
5964
6096
  const content = [];
6097
+ let root;
5965
6098
 
5966
6099
  for (let i = 0; i < stylesheets.length; i++) {
5967
6100
  let stylesheet = stylesheets[i];
@@ -5974,23 +6107,46 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
5974
6107
  // the component instance might be attempting to use an old version of
5975
6108
  // the stylesheet, while internally, we have a replacement for it.
5976
6109
  stylesheet = getStyleOrSwappedStyle(stylesheet);
5977
- } // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
5978
- // native shadow DOM. Synthetic shadow DOM never uses `:host`.
6110
+ }
5979
6111
 
6112
+ const isScopedCss = stylesheet[KEY__SCOPED_CSS]; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
6113
+
6114
+ const scopeToken = isScopedCss || vm.shadowMode === 1
6115
+ /* Synthetic */
6116
+ && vm.renderMode === 1
6117
+ /* Shadow */
6118
+ ? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
6119
+ // native shadow DOM. Synthetic shadow DOM never uses `:host`.
5980
6120
 
5981
- const isScopedCss = stylesheet[KEY__SCOPED_CSS];
5982
6121
  const useActualHostSelector = vm.renderMode === 0
5983
6122
  /* Light */
5984
6123
  ? !isScopedCss : vm.shadowMode === 0
5985
6124
  /* Native */
5986
- ; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
6125
+ ; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
6126
+ // we use an attribute selector on the host to simulate :dir().
5987
6127
 
5988
- const scopeToken = isScopedCss || vm.shadowMode === 1
5989
- /* Synthetic */
5990
- && vm.renderMode === 1
6128
+ let useNativeDirPseudoclass;
6129
+
6130
+ if (vm.renderMode === 1
5991
6131
  /* Shadow */
5992
- ? stylesheetToken : undefined;
5993
- ArrayPush$1.call(content, stylesheet(useActualHostSelector, scopeToken));
6132
+ ) {
6133
+ useNativeDirPseudoclass = vm.shadowMode === 0
6134
+ /* Native */
6135
+ ;
6136
+ } else {
6137
+ // Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
6138
+ // At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
6139
+ if (isUndefined$1(root)) {
6140
+ // Only calculate the root once as necessary
6141
+ root = getNearestShadowComponent(vm);
6142
+ }
6143
+
6144
+ useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
6145
+ /* Native */
6146
+ ;
6147
+ }
6148
+
6149
+ ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
5994
6150
  }
5995
6151
  }
5996
6152
 
@@ -6014,14 +6170,12 @@ function getStylesheetsContent(vm, template) {
6014
6170
  // https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
6015
6171
 
6016
6172
 
6017
- function getNearestNativeShadowComponent(vm) {
6173
+ function getNearestShadowComponent(vm) {
6018
6174
  let owner = vm;
6019
6175
 
6020
6176
  while (!isNull(owner)) {
6021
6177
  if (owner.renderMode === 1
6022
6178
  /* Shadow */
6023
- && owner.shadowMode === 0
6024
- /* Native */
6025
6179
  ) {
6026
6180
  return owner;
6027
6181
  }
@@ -6032,9 +6186,22 @@ function getNearestNativeShadowComponent(vm) {
6032
6186
  return owner;
6033
6187
  }
6034
6188
 
6189
+ function getNearestNativeShadowComponent(vm) {
6190
+ const owner = getNearestShadowComponent(vm);
6191
+
6192
+ if (!isNull(owner) && owner.shadowMode === 1
6193
+ /* Synthetic */
6194
+ ) {
6195
+ // Synthetic-within-native is impossible. So if the nearest shadow component is
6196
+ // synthetic, we know we won't find a native component if we go any further.
6197
+ return null;
6198
+ }
6199
+
6200
+ return owner;
6201
+ }
6202
+
6035
6203
  function createStylesheet(vm, stylesheets) {
6036
6204
  const {
6037
- renderer,
6038
6205
  renderMode,
6039
6206
  shadowMode
6040
6207
  } = vm;
@@ -6045,9 +6212,9 @@ function createStylesheet(vm, stylesheets) {
6045
6212
  /* Synthetic */
6046
6213
  ) {
6047
6214
  for (let i = 0; i < stylesheets.length; i++) {
6048
- renderer.insertGlobalStylesheet(stylesheets[i]);
6215
+ insertGlobalStylesheet$1(stylesheets[i]);
6049
6216
  }
6050
- } else if (renderer.ssr || renderer.isHydrating()) {
6217
+ } else if (ssr$1 || isHydrating$1()) {
6051
6218
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
6052
6219
  // This works in the client, because the stylesheets are created, and cached in the VM
6053
6220
  // the first time the VM renders.
@@ -6061,10 +6228,10 @@ function createStylesheet(vm, stylesheets) {
6061
6228
 
6062
6229
  for (let i = 0; i < stylesheets.length; i++) {
6063
6230
  if (isGlobal) {
6064
- renderer.insertGlobalStylesheet(stylesheets[i]);
6231
+ insertGlobalStylesheet$1(stylesheets[i]);
6065
6232
  } else {
6066
6233
  // local level
6067
- renderer.insertStylesheet(stylesheets[i], root.cmpRoot);
6234
+ insertStylesheet$1(stylesheets[i], root.cmpRoot);
6068
6235
  }
6069
6236
  }
6070
6237
  }
@@ -6149,7 +6316,7 @@ function logOperationStart(opId, vm) {
6149
6316
  if (isProfilerEnabled) {
6150
6317
  currentDispatcher(opId, 0
6151
6318
  /* Start */
6152
- , vm.tagName, vm.idx);
6319
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
6153
6320
  }
6154
6321
  }
6155
6322
 
@@ -6163,7 +6330,7 @@ function logOperationEnd(opId, vm) {
6163
6330
  if (isProfilerEnabled) {
6164
6331
  currentDispatcher(opId, 1
6165
6332
  /* Stop */
6166
- , vm.tagName, vm.idx);
6333
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
6167
6334
  }
6168
6335
  }
6169
6336
 
@@ -6177,7 +6344,7 @@ function logGlobalOperationStart(opId, vm) {
6177
6344
  if (isProfilerEnabled) {
6178
6345
  currentDispatcher(opId, 0
6179
6346
  /* Start */
6180
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
6347
+ , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
6181
6348
  }
6182
6349
  }
6183
6350
 
@@ -6191,7 +6358,7 @@ function logGlobalOperationEnd(opId, vm) {
6191
6358
  if (isProfilerEnabled) {
6192
6359
  currentDispatcher(opId, 1
6193
6360
  /* Stop */
6194
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
6361
+ , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
6195
6362
  }
6196
6363
  }
6197
6364
  /*
@@ -6756,7 +6923,6 @@ function createVM(elm, def, options) {
6756
6923
  const {
6757
6924
  mode,
6758
6925
  owner,
6759
- renderer,
6760
6926
  tagName
6761
6927
  } = options;
6762
6928
  const vm = {
@@ -6771,7 +6937,6 @@ function createVM(elm, def, options) {
6771
6937
  tagName,
6772
6938
  mode,
6773
6939
  owner,
6774
- renderer,
6775
6940
  children: EmptyArray,
6776
6941
  aChildren: EmptyArray,
6777
6942
  velements: EmptyArray,
@@ -6826,16 +6991,11 @@ function createVM(elm, def, options) {
6826
6991
 
6827
6992
  function computeShadowMode(vm) {
6828
6993
  const {
6829
- def,
6830
- renderer
6994
+ def
6831
6995
  } = vm;
6832
- const {
6833
- isNativeShadowDefined,
6834
- isSyntheticShadowDefined
6835
- } = renderer;
6836
6996
  let shadowMode;
6837
6997
 
6838
- if (isSyntheticShadowDefined) {
6998
+ if (isSyntheticShadowDefined$1) {
6839
6999
  if (def.renderMode === 0
6840
7000
  /* Light */
6841
7001
  ) {
@@ -6844,7 +7004,7 @@ function computeShadowMode(vm) {
6844
7004
  shadowMode = 0
6845
7005
  /* Native */
6846
7006
  ;
6847
- } else if (isNativeShadowDefined) {
7007
+ } else if (isNativeShadowDefined$1) {
6848
7008
  if (def.shadowSupportMode === "any"
6849
7009
  /* Any */
6850
7010
  ) {
@@ -6984,13 +7144,12 @@ function patchShadowRoot(vm, newCh) {
6984
7144
 
6985
7145
  function runRenderedCallback(vm) {
6986
7146
  const {
6987
- renderer,
6988
7147
  def: {
6989
7148
  renderedCallback
6990
7149
  }
6991
7150
  } = vm;
6992
7151
 
6993
- if (isTrue(renderer.ssr)) {
7152
+ if (isTrue(ssr$1)) {
6994
7153
  return;
6995
7154
  }
6996
7155
 
@@ -7216,8 +7375,7 @@ function recursivelyDisconnectChildren(vnodes) {
7216
7375
 
7217
7376
  function resetComponentRoot(vm) {
7218
7377
  const {
7219
- children,
7220
- renderer
7378
+ children
7221
7379
  } = vm;
7222
7380
  const rootNode = getRenderRoot(vm);
7223
7381
 
@@ -7225,7 +7383,7 @@ function resetComponentRoot(vm) {
7225
7383
  const child = children[i];
7226
7384
 
7227
7385
  if (!isNull(child) && !isUndefined$1(child.elm)) {
7228
- renderer.remove(child.elm, rootNode);
7386
+ remove$1(child.elm, rootNode);
7229
7387
  }
7230
7388
  }
7231
7389
 
@@ -7235,7 +7393,7 @@ function resetComponentRoot(vm) {
7235
7393
  }
7236
7394
 
7237
7395
  function scheduleRehydration(vm) {
7238
- if (isTrue(vm.renderer.ssr) || isTrue(vm.isScheduled)) {
7396
+ if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
7239
7397
  return;
7240
7398
  }
7241
7399
 
@@ -7480,7 +7638,6 @@ function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
7480
7638
 
7481
7639
  const {
7482
7640
  elm,
7483
- renderer,
7484
7641
  context: {
7485
7642
  wiredConnecting,
7486
7643
  wiredDisconnecting
@@ -7507,7 +7664,7 @@ function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
7507
7664
  }
7508
7665
 
7509
7666
  });
7510
- renderer.dispatchEvent(elm, contextRegistrationEvent);
7667
+ dispatchEvent$1(elm, contextRegistrationEvent);
7511
7668
  });
7512
7669
  }
7513
7670
 
@@ -7772,7 +7929,7 @@ function setHooks(hooks) {
7772
7929
  hooksAreSet = true;
7773
7930
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
7774
7931
  }
7775
- /* version: 2.5.10 */
7932
+ /* version: 2.6.3 */
7776
7933
 
7777
7934
  /*
7778
7935
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7801,7 +7958,9 @@ const supportsConstructableStyleSheets = isFunction$1(CSSStyleSheet.prototype.re
7801
7958
  const styleElements = create(null);
7802
7959
  const styleSheets = create(null);
7803
7960
  const nodesToStyleSheets = new WeakMap();
7804
- let getCustomElement, defineCustomElement, HTMLElementConstructor;
7961
+ let getCustomElement;
7962
+ let defineCustomElement;
7963
+ let HTMLElementConstructor;
7805
7964
 
7806
7965
  function isCustomElementRegistryAvailable() {
7807
7966
  if (typeof customElements === 'undefined') {
@@ -7916,188 +8075,231 @@ if (isCustomElementRegistryAvailable()) {
7916
8075
  HTMLElementConstructor.prototype = HTMLElement.prototype;
7917
8076
  }
7918
8077
 
7919
- let isHydrating = false;
8078
+ let hydrating = false;
7920
8079
 
7921
- function setIsHydrating(v) {
7922
- isHydrating = v;
8080
+ function setIsHydrating(value) {
8081
+ hydrating = value;
7923
8082
  }
7924
8083
 
7925
- const renderer = {
7926
- ssr: false,
8084
+ const ssr = false;
7927
8085
 
7928
- isHydrating() {
7929
- return isHydrating;
7930
- },
8086
+ function isHydrating() {
8087
+ return hydrating;
8088
+ }
7931
8089
 
7932
- isNativeShadowDefined: _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED],
7933
- isSyntheticShadowDefined: hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN),
8090
+ const isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
8091
+ const isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
7934
8092
 
7935
- createElement(tagName, namespace) {
7936
- return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
7937
- },
8093
+ function createElement$1(tagName, namespace) {
8094
+ return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
8095
+ }
7938
8096
 
7939
- createText(content) {
7940
- return document.createTextNode(content);
7941
- },
8097
+ function createText(content) {
8098
+ return document.createTextNode(content);
8099
+ }
7942
8100
 
7943
- createComment(content) {
7944
- return document.createComment(content);
7945
- },
8101
+ function createComment(content) {
8102
+ return document.createComment(content);
8103
+ }
7946
8104
 
7947
- insert(node, parent, anchor) {
7948
- parent.insertBefore(node, anchor);
7949
- },
8105
+ function insert(node, parent, anchor) {
8106
+ parent.insertBefore(node, anchor);
8107
+ }
7950
8108
 
7951
- remove(node, parent) {
7952
- parent.removeChild(node);
7953
- },
8109
+ function remove(node, parent) {
8110
+ parent.removeChild(node);
8111
+ }
7954
8112
 
7955
- nextSibling(node) {
7956
- return node.nextSibling;
7957
- },
8113
+ function nextSibling(node) {
8114
+ return node.nextSibling;
8115
+ }
7958
8116
 
7959
- attachShadow(element, options) {
7960
- if (isHydrating) {
7961
- return element.shadowRoot;
7962
- }
8117
+ function attachShadow(element, options) {
8118
+ if (hydrating) {
8119
+ return element.shadowRoot;
8120
+ }
7963
8121
 
7964
- return element.attachShadow(options);
7965
- },
8122
+ return element.attachShadow(options);
8123
+ }
7966
8124
 
7967
- setText(node, content) {
7968
- node.nodeValue = content;
7969
- },
8125
+ function setText(node, content) {
8126
+ node.nodeValue = content;
8127
+ }
7970
8128
 
7971
- getProperty(node, key) {
7972
- return node[key];
7973
- },
8129
+ function getProperty(node, key) {
8130
+ return node[key];
8131
+ }
7974
8132
 
7975
- setProperty(node, key, value) {
7976
- if (process.env.NODE_ENV !== 'production') {
7977
- if (node instanceof Element && !(key in node)) {
7978
- // TODO [#1297]: Move this validation to the compiler
7979
- assert.fail(`Unknown public property "${key}" of element <${node.tagName}>. This is likely a typo on the corresponding attribute "${htmlPropertyToAttribute(key)}".`);
7980
- }
8133
+ function setProperty(node, key, value) {
8134
+ if (process.env.NODE_ENV !== 'production') {
8135
+ if (node instanceof Element && !(key in node)) {
8136
+ // TODO [#1297]: Move this validation to the compiler
8137
+ assert.fail(`Unknown public property "${key}" of element <${node.tagName}>. This is likely a typo on the corresponding attribute "${htmlPropertyToAttribute(key)}".`);
7981
8138
  }
8139
+ }
7982
8140
 
7983
- node[key] = value;
7984
- },
8141
+ node[key] = value;
8142
+ }
7985
8143
 
7986
- getAttribute(element, name, namespace) {
7987
- return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
7988
- },
8144
+ function getAttribute(element, name, namespace) {
8145
+ return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
8146
+ }
7989
8147
 
7990
- setAttribute(element, name, value, namespace) {
7991
- return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
7992
- },
8148
+ function setAttribute(element, name, value, namespace) {
8149
+ return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
8150
+ }
7993
8151
 
7994
- removeAttribute(element, name, namespace) {
7995
- if (isUndefined$1(namespace)) {
7996
- element.removeAttribute(name);
7997
- } else {
7998
- element.removeAttributeNS(namespace, name);
7999
- }
8000
- },
8152
+ function removeAttribute(element, name, namespace) {
8153
+ if (isUndefined$1(namespace)) {
8154
+ element.removeAttribute(name);
8155
+ } else {
8156
+ element.removeAttributeNS(namespace, name);
8157
+ }
8158
+ }
8001
8159
 
8002
- addEventListener(target, type, callback, options) {
8003
- target.addEventListener(type, callback, options);
8004
- },
8160
+ function addEventListener(target, type, callback, options) {
8161
+ target.addEventListener(type, callback, options);
8162
+ }
8005
8163
 
8006
- removeEventListener(target, type, callback, options) {
8007
- target.removeEventListener(type, callback, options);
8008
- },
8164
+ function removeEventListener(target, type, callback, options) {
8165
+ target.removeEventListener(type, callback, options);
8166
+ }
8009
8167
 
8010
- dispatchEvent(target, event) {
8011
- return target.dispatchEvent(event);
8012
- },
8168
+ function dispatchEvent(target, event) {
8169
+ return target.dispatchEvent(event);
8170
+ }
8013
8171
 
8014
- getClassList(element) {
8015
- return element.classList;
8016
- },
8172
+ function getClassList(element) {
8173
+ return element.classList;
8174
+ }
8017
8175
 
8018
- setCSSStyleProperty(element, name, value, important) {
8019
- // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
8020
- // represent elements in the engine?
8021
- element.style.setProperty(name, value, important ? 'important' : '');
8022
- },
8176
+ function setCSSStyleProperty(element, name, value, important) {
8177
+ // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
8178
+ // represent elements in the engine?
8179
+ element.style.setProperty(name, value, important ? 'important' : '');
8180
+ }
8023
8181
 
8024
- getBoundingClientRect(element) {
8025
- return element.getBoundingClientRect();
8026
- },
8182
+ function getBoundingClientRect(element) {
8183
+ return element.getBoundingClientRect();
8184
+ }
8027
8185
 
8028
- querySelector(element, selectors) {
8029
- return element.querySelector(selectors);
8030
- },
8186
+ function querySelector(element, selectors) {
8187
+ return element.querySelector(selectors);
8188
+ }
8031
8189
 
8032
- querySelectorAll(element, selectors) {
8033
- return element.querySelectorAll(selectors);
8034
- },
8190
+ function querySelectorAll(element, selectors) {
8191
+ return element.querySelectorAll(selectors);
8192
+ }
8035
8193
 
8036
- getElementsByTagName(element, tagNameOrWildCard) {
8037
- return element.getElementsByTagName(tagNameOrWildCard);
8038
- },
8194
+ function getElementsByTagName(element, tagNameOrWildCard) {
8195
+ return element.getElementsByTagName(tagNameOrWildCard);
8196
+ }
8039
8197
 
8040
- getElementsByClassName(element, names) {
8041
- return element.getElementsByClassName(names);
8042
- },
8198
+ function getElementsByClassName(element, names) {
8199
+ return element.getElementsByClassName(names);
8200
+ }
8043
8201
 
8044
- getChildren(element) {
8045
- return element.children;
8046
- },
8202
+ function getChildren(element) {
8203
+ return element.children;
8204
+ }
8047
8205
 
8048
- getChildNodes(element) {
8049
- return element.childNodes;
8050
- },
8206
+ function getChildNodes(element) {
8207
+ return element.childNodes;
8208
+ }
8051
8209
 
8052
- getFirstChild(element) {
8053
- return element.firstChild;
8054
- },
8210
+ function getFirstChild(element) {
8211
+ return element.firstChild;
8212
+ }
8055
8213
 
8056
- getFirstElementChild(element) {
8057
- return element.firstElementChild;
8058
- },
8214
+ function getFirstElementChild(element) {
8215
+ return element.firstElementChild;
8216
+ }
8059
8217
 
8060
- getLastChild(element) {
8061
- return element.lastChild;
8062
- },
8218
+ function getLastChild(element) {
8219
+ return element.lastChild;
8220
+ }
8063
8221
 
8064
- getLastElementChild(element) {
8065
- return element.lastElementChild;
8066
- },
8222
+ function getLastElementChild(element) {
8223
+ return element.lastElementChild;
8224
+ }
8067
8225
 
8068
- isConnected(node) {
8069
- return node.isConnected;
8070
- },
8226
+ function isConnected(node) {
8227
+ return node.isConnected;
8228
+ }
8071
8229
 
8072
- insertGlobalStylesheet(content) {
8073
- if (!isUndefined$1(globalStylesheets[content])) {
8074
- return;
8075
- }
8230
+ function insertGlobalStylesheet(content) {
8231
+ if (!isUndefined$1(globalStylesheets[content])) {
8232
+ return;
8233
+ }
8076
8234
 
8077
- globalStylesheets[content] = true;
8078
- const elm = document.createElement('style');
8079
- elm.type = 'text/css';
8080
- elm.textContent = content;
8081
- globalStylesheetsParentElement.appendChild(elm);
8082
- },
8235
+ globalStylesheets[content] = true;
8236
+ const elm = document.createElement('style');
8237
+ elm.type = 'text/css';
8238
+ elm.textContent = content;
8239
+ globalStylesheetsParentElement.appendChild(elm);
8240
+ }
8083
8241
 
8084
- insertStylesheet(content, target) {
8085
- if (supportsConstructableStyleSheets) {
8086
- insertConstructableStyleSheet(content, target);
8087
- } else {
8088
- // Fall back to <style> element
8089
- insertStyleElement(content, target);
8090
- }
8091
- },
8242
+ function insertStylesheet(content, target) {
8243
+ if (supportsConstructableStyleSheets) {
8244
+ insertConstructableStyleSheet(content, target);
8245
+ } else {
8246
+ // Fall back to <style> element
8247
+ insertStyleElement(content, target);
8248
+ }
8249
+ }
8092
8250
 
8093
- assertInstanceOfHTMLElement(elm, msg) {
8094
- assert.invariant(elm instanceof HTMLElement, msg);
8095
- },
8251
+ function assertInstanceOfHTMLElement(elm, msg) {
8252
+ assert.invariant(elm instanceof HTMLElement, msg);
8253
+ }
8096
8254
 
8097
- defineCustomElement,
8098
- getCustomElement,
8099
- HTMLElement: HTMLElementConstructor
8100
- };
8255
+ const HTMLElementExported = HTMLElementConstructor;
8256
+ /*
8257
+ * Copyright (c) 2020, salesforce.com, inc.
8258
+ * All rights reserved.
8259
+ * SPDX-License-Identifier: MIT
8260
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
8261
+ */
8262
+
8263
+ setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElement);
8264
+ setAttachShadow(attachShadow);
8265
+ setCreateComment(createComment);
8266
+ setCreateElement(createElement$1);
8267
+ setCreateText(createText);
8268
+ setDefineCustomElement(defineCustomElement);
8269
+ setDispatchEvent(dispatchEvent);
8270
+ setGetAttribute(getAttribute);
8271
+ setGetBoundingClientRect(getBoundingClientRect);
8272
+ setGetChildNodes(getChildNodes);
8273
+ setGetChildren(getChildren);
8274
+ setGetClassList(getClassList);
8275
+ setGetCustomElement(getCustomElement);
8276
+ setGetElementsByClassName(getElementsByClassName);
8277
+ setGetElementsByTagName(getElementsByTagName);
8278
+ setGetFirstChild(getFirstChild);
8279
+ setGetFirstElementChild(getFirstElementChild);
8280
+ setGetLastChild(getLastChild);
8281
+ setGetLastElementChild(getLastElementChild);
8282
+ setGetProperty(getProperty);
8283
+ setHTMLElement(HTMLElementExported);
8284
+ setInsert(insert);
8285
+ setInsertGlobalStylesheet(insertGlobalStylesheet);
8286
+ setInsertStylesheet(insertStylesheet);
8287
+ setIsConnected(isConnected);
8288
+ setIsHydrating$1(isHydrating);
8289
+ setIsNativeShadowDefined(isNativeShadowDefined);
8290
+ setIsSyntheticShadowDefined(isSyntheticShadowDefined);
8291
+ setNextSibling(nextSibling);
8292
+ setQuerySelector(querySelector);
8293
+ setQuerySelectorAll(querySelectorAll);
8294
+ setRemove(remove);
8295
+ setRemoveAttribute(removeAttribute);
8296
+ setRemoveEventListener(removeEventListener);
8297
+ setSetAttribute(setAttribute);
8298
+ setSetCSSStyleProperty(setCSSStyleProperty);
8299
+ setSetProperty(setProperty);
8300
+ setSetText(setText);
8301
+ setSsr(ssr);
8302
+ setAddEventListener(addEventListener);
8101
8303
  /*
8102
8304
  * Copyright (c) 2018, salesforce.com, inc.
8103
8305
  * All rights reserved.
@@ -8180,7 +8382,7 @@ function createElement(sel, options) {
8180
8382
  throw new TypeError(`"createElement" function expects an "is" option with a valid component constructor.`);
8181
8383
  }
8182
8384
 
8183
- const UpgradableConstructor = getUpgradableConstructor(sel, renderer);
8385
+ const UpgradableConstructor = getUpgradableConstructor(sel);
8184
8386
  let wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
8185
8387
 
8186
8388
  /**
@@ -8195,8 +8397,7 @@ function createElement(sel, options) {
8195
8397
  createVM(elm, def, {
8196
8398
  tagName: sel,
8197
8399
  mode: options.mode !== 'closed' ? 'open' : 'closed',
8198
- owner: null,
8199
- renderer
8400
+ owner: null
8200
8401
  });
8201
8402
  ConnectingSlot.set(elm, connectRootElement);
8202
8403
  DisconnectingSlot.set(elm, disconnectRootElement);
@@ -8219,6 +8420,10 @@ function createElement(sel, options) {
8219
8420
 
8220
8421
 
8221
8422
  function hydrateComponent(element, Ctor, props = {}) {
8423
+ if (!(element instanceof Element)) {
8424
+ throw new TypeError(`"hydrateComponent" expects a valid DOM element as the first parameter but instead received ${element}.`);
8425
+ }
8426
+
8222
8427
  if (!isFunction$1(Ctor)) {
8223
8428
  throw new TypeError(`"hydrateComponent" expects a valid component constructor as the second parameter but instead received ${Ctor}.`);
8224
8429
  }
@@ -8236,7 +8441,6 @@ function hydrateComponent(element, Ctor, props = {}) {
8236
8441
  createVM(element, def, {
8237
8442
  mode: 'open',
8238
8443
  owner: null,
8239
- renderer,
8240
8444
  tagName: element.tagName.toLowerCase()
8241
8445
  });
8242
8446
 
@@ -8307,8 +8511,7 @@ function buildCustomElementConstructor(Ctor) {
8307
8511
  createVM(this, def, {
8308
8512
  mode: 'open',
8309
8513
  owner: null,
8310
- tagName: this.tagName,
8311
- renderer
8514
+ tagName: this.tagName
8312
8515
  });
8313
8516
  }
8314
8517
 
@@ -8375,7 +8578,7 @@ function isNodeFromTemplate(node) {
8375
8578
  return false;
8376
8579
  }
8377
8580
 
8378
- if (renderer.isSyntheticShadowDefined) {
8581
+ if (isSyntheticShadowDefined) {
8379
8582
  // TODO [#1252]: old behavior that is still used by some pieces of the platform,
8380
8583
  // specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
8381
8584
  // used, will be considered global elements.
@@ -8428,6 +8631,6 @@ defineProperty(LightningElement, 'CustomElementConstructor', {
8428
8631
  });
8429
8632
  freeze(LightningElement);
8430
8633
  seal(LightningElement.prototype);
8431
- /* version: 2.5.10 */
8634
+ /* version: 2.6.3 */
8432
8635
 
8433
8636
  export { LightningElement, profilerControl as __unstable__ProfilerControl, api$1 as api, deprecatedBuildCustomElementConstructor as buildCustomElementConstructor, createContextProvider, createElement, getComponentConstructor, getComponentDef, hydrateComponent, isComponentConstructor, isNodeFromTemplate, readonly, register, registerComponent, registerDecorators, registerTemplate, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };