lwc 2.6.2 → 2.7.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 +1114 -1054
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +1114 -1054
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -9
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +1084 -1018
  5. package/dist/engine-dom/iife/es5/engine-dom.js +1166 -999
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -9
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +1181 -1014
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +1114 -1054
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -9
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +1084 -1018
  11. package/dist/engine-dom/umd/es5/engine-dom.js +1166 -999
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -9
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +1181 -1014
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +1286 -1227
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -9
  16. package/dist/engine-server/esm/es2017/engine-server.js +1286 -1227
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +74 -9
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +74 -9
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +74 -9
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +78 -9
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +78 -9
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +74 -9
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +74 -9
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +78 -9
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +78 -9
  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 +3 -3
  34. package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
  35. package/dist/wire-service/iife/es5/wire-service_debug.js +3 -3
  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 +3 -3
  39. package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
  40. package/dist/wire-service/umd/es5/wire-service_debug.js +3 -3
  41. package/package.json +8 -8
@@ -21,7 +21,7 @@ var LWC = (function (exports) {
21
21
 
22
22
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
23
 
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
25
 
26
26
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
27
 
@@ -341,7 +341,7 @@ var LWC = (function (exports) {
341
341
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
342
342
  return attributeName;
343
343
  }
344
- /** version: 2.6.2 */
344
+ /** version: 2.7.3 */
345
345
 
346
346
  /*
347
347
  * Copyright (c) 2018, salesforce.com, inc.
@@ -453,7 +453,6 @@ var LWC = (function (exports) {
453
453
  ENABLE_NODE_LIST_PATCH: null,
454
454
  ENABLE_HTML_COLLECTIONS_PATCH: null,
455
455
  ENABLE_NODE_PATCH: null,
456
- ENABLE_MIXED_SHADOW_MODE: null,
457
456
  ENABLE_WIRE_SYNC_EMIT: null
458
457
  };
459
458
 
@@ -512,7 +511,7 @@ var LWC = (function (exports) {
512
511
 
513
512
  function setFeatureFlagForTest(name, value) {
514
513
  }
515
- /** version: 2.6.2 */
514
+ /** version: 2.7.3 */
516
515
 
517
516
  /* proxy-compat-disable */
518
517
 
@@ -555,6 +554,243 @@ var LWC = (function (exports) {
555
554
 
556
555
  return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
557
556
  } // Borrowed from Vue template compiler.
557
+ // Primitives
558
+ //
559
+
560
+
561
+ var ssr$1;
562
+
563
+ function setSsr(ssrImpl) {
564
+ ssr$1 = ssrImpl;
565
+ }
566
+
567
+ var isNativeShadowDefined$1;
568
+
569
+ function setIsNativeShadowDefined(isNativeShadowDefinedImpl) {
570
+ isNativeShadowDefined$1 = isNativeShadowDefinedImpl;
571
+ }
572
+
573
+ var isSyntheticShadowDefined$1;
574
+
575
+ function setIsSyntheticShadowDefined(isSyntheticShadowDefinedImpl) {
576
+ isSyntheticShadowDefined$1 = isSyntheticShadowDefinedImpl;
577
+ }
578
+
579
+ var HTMLElementExported$1;
580
+
581
+ function setHTMLElement(HTMLElementImpl) {
582
+ HTMLElementExported$1 = HTMLElementImpl;
583
+ }
584
+
585
+ var isHydrating$1;
586
+
587
+ function setIsHydrating$1(isHydratingImpl) {
588
+ isHydrating$1 = isHydratingImpl;
589
+ }
590
+
591
+ var insert$1;
592
+
593
+ function setInsert(insertImpl) {
594
+ insert$1 = insertImpl;
595
+ }
596
+
597
+ var remove$1;
598
+
599
+ function setRemove(removeImpl) {
600
+ remove$1 = removeImpl;
601
+ }
602
+
603
+ var createElement$2;
604
+
605
+ function setCreateElement(createElementImpl) {
606
+ createElement$2 = createElementImpl;
607
+ }
608
+
609
+ var createText$1;
610
+
611
+ function setCreateText(createTextImpl) {
612
+ createText$1 = createTextImpl;
613
+ }
614
+
615
+ var createComment$1;
616
+
617
+ function setCreateComment(createCommentImpl) {
618
+ createComment$1 = createCommentImpl;
619
+ }
620
+
621
+ var nextSibling$1;
622
+
623
+ function setNextSibling(nextSiblingImpl) {
624
+ nextSibling$1 = nextSiblingImpl;
625
+ }
626
+
627
+ var attachShadow$1;
628
+
629
+ function setAttachShadow(attachShadowImpl) {
630
+ attachShadow$1 = attachShadowImpl;
631
+ }
632
+
633
+ var getProperty$1;
634
+
635
+ function setGetProperty(getPropertyImpl) {
636
+ getProperty$1 = getPropertyImpl;
637
+ }
638
+
639
+ var setProperty$1;
640
+
641
+ function setSetProperty(setPropertyImpl) {
642
+ setProperty$1 = setPropertyImpl;
643
+ }
644
+
645
+ var setText$1;
646
+
647
+ function setSetText(setTextImpl) {
648
+ setText$1 = setTextImpl;
649
+ }
650
+
651
+ var getAttribute$1;
652
+
653
+ function setGetAttribute(getAttributeImpl) {
654
+ getAttribute$1 = getAttributeImpl;
655
+ }
656
+
657
+ var setAttribute$1;
658
+
659
+ function setSetAttribute(setAttributeImpl) {
660
+ setAttribute$1 = setAttributeImpl;
661
+ }
662
+
663
+ var removeAttribute$1;
664
+
665
+ function setRemoveAttribute(removeAttributeImpl) {
666
+ removeAttribute$1 = removeAttributeImpl;
667
+ }
668
+
669
+ var addEventListener$1;
670
+
671
+ function setAddEventListener(addEventListenerImpl) {
672
+ addEventListener$1 = addEventListenerImpl;
673
+ }
674
+
675
+ var removeEventListener$1;
676
+
677
+ function setRemoveEventListener(removeEventListenerImpl) {
678
+ removeEventListener$1 = removeEventListenerImpl;
679
+ }
680
+
681
+ var dispatchEvent$1;
682
+
683
+ function setDispatchEvent(dispatchEventImpl) {
684
+ dispatchEvent$1 = dispatchEventImpl;
685
+ }
686
+
687
+ var getClassList$1;
688
+
689
+ function setGetClassList(getClassListImpl) {
690
+ getClassList$1 = getClassListImpl;
691
+ }
692
+
693
+ var setCSSStyleProperty$1;
694
+
695
+ function setSetCSSStyleProperty(setCSSStylePropertyImpl) {
696
+ setCSSStyleProperty$1 = setCSSStylePropertyImpl;
697
+ }
698
+
699
+ var getBoundingClientRect$1;
700
+
701
+ function setGetBoundingClientRect(getBoundingClientRectImpl) {
702
+ getBoundingClientRect$1 = getBoundingClientRectImpl;
703
+ }
704
+
705
+ var querySelector$1;
706
+
707
+ function setQuerySelector(querySelectorImpl) {
708
+ querySelector$1 = querySelectorImpl;
709
+ }
710
+
711
+ var querySelectorAll$1;
712
+
713
+ function setQuerySelectorAll(querySelectorAllImpl) {
714
+ querySelectorAll$1 = querySelectorAllImpl;
715
+ }
716
+
717
+ var getElementsByTagName$1;
718
+
719
+ function setGetElementsByTagName(getElementsByTagNameImpl) {
720
+ getElementsByTagName$1 = getElementsByTagNameImpl;
721
+ }
722
+
723
+ var getElementsByClassName$1;
724
+
725
+ function setGetElementsByClassName(getElementsByClassNameImpl) {
726
+ getElementsByClassName$1 = getElementsByClassNameImpl;
727
+ }
728
+
729
+ var getChildren$1;
730
+
731
+ function setGetChildren(getChildrenImpl) {
732
+ getChildren$1 = getChildrenImpl;
733
+ }
734
+
735
+ var getChildNodes$1;
736
+
737
+ function setGetChildNodes(getChildNodesImpl) {
738
+ getChildNodes$1 = getChildNodesImpl;
739
+ }
740
+
741
+ var getFirstChild$1;
742
+
743
+ function setGetFirstChild(getFirstChildImpl) {
744
+ getFirstChild$1 = getFirstChildImpl;
745
+ }
746
+
747
+ var getFirstElementChild$1;
748
+
749
+ function setGetFirstElementChild(getFirstElementChildImpl) {
750
+ getFirstElementChild$1 = getFirstElementChildImpl;
751
+ }
752
+
753
+ var getLastChild$1;
754
+
755
+ function setGetLastChild(getLastChildImpl) {
756
+ getLastChild$1 = getLastChildImpl;
757
+ }
758
+
759
+ var getLastElementChild$1;
760
+
761
+ function setGetLastElementChild(getLastElementChildImpl) {
762
+ getLastElementChild$1 = getLastElementChildImpl;
763
+ }
764
+
765
+ var isConnected$1;
766
+
767
+ function setIsConnected(isConnectedImpl) {
768
+ isConnected$1 = isConnectedImpl;
769
+ }
770
+
771
+ var insertGlobalStylesheet$1;
772
+
773
+ function setInsertGlobalStylesheet(insertGlobalStylesheetImpl) {
774
+ insertGlobalStylesheet$1 = insertGlobalStylesheetImpl;
775
+ }
776
+
777
+ var insertStylesheet$1;
778
+
779
+ function setInsertStylesheet(insertStylesheetImpl) {
780
+ insertStylesheet$1 = insertStylesheetImpl;
781
+ }
782
+
783
+ var defineCustomElement$1;
784
+
785
+ function setDefineCustomElement(defineCustomElementImpl) {
786
+ defineCustomElement$1 = defineCustomElementImpl;
787
+ }
788
+
789
+ var getCustomElement$1;
790
+
791
+ function setGetCustomElement(getCustomElementImpl) {
792
+ getCustomElement$1 = getCustomElementImpl;
793
+ }
558
794
  /*
559
795
  * Copyright (c) 2019, salesforce.com, inc.
560
796
  * All rights reserved.
@@ -768,591 +1004,116 @@ var LWC = (function (exports) {
768
1004
  */
769
1005
 
770
1006
 
771
- function handleEvent(event, vnode) {
772
- var type = event.type;
773
- var on = vnode.data.on;
774
- var handler = on && on[type]; // call event handler if exists
1007
+ function isUndef(s) {
1008
+ return s === undefined;
1009
+ }
775
1010
 
776
- if (handler) {
777
- handler.call(undefined, event);
778
- }
1011
+ function sameVnode(vnode1, vnode2) {
1012
+ return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel;
779
1013
  }
780
1014
 
781
- function createListener() {
782
- return function handler(event) {
783
- handleEvent(event, handler.vnode);
784
- };
1015
+ function isVNode(vnode) {
1016
+ return vnode != null;
785
1017
  }
786
1018
 
787
- function updateAllEventListeners(oldVnode, vnode) {
788
- if (isUndefined$1(oldVnode.listener)) {
789
- createAllEventListeners(vnode);
790
- } else {
791
- vnode.listener = oldVnode.listener;
792
- vnode.listener.vnode = vnode;
1019
+ function createKeyToOldIdx(children, beginIdx, endIdx) {
1020
+ var map = {};
1021
+ var j, key, ch; // TODO [#1637]: simplify this by assuming that all vnodes has keys
1022
+
1023
+ for (j = beginIdx; j <= endIdx; ++j) {
1024
+ ch = children[j];
1025
+
1026
+ if (isVNode(ch)) {
1027
+ key = ch.key;
1028
+
1029
+ if (key !== undefined) {
1030
+ map[key] = j;
1031
+ }
1032
+ }
793
1033
  }
1034
+
1035
+ return map;
794
1036
  }
795
1037
 
796
- function createAllEventListeners(vnode) {
797
- var elm = vnode.elm,
798
- on = vnode.data.on,
799
- renderer = vnode.owner.renderer;
1038
+ function addVnodes(parentElm, before, vnodes, startIdx, endIdx) {
1039
+ for (; startIdx <= endIdx; ++startIdx) {
1040
+ var ch = vnodes[startIdx];
800
1041
 
801
- if (isUndefined$1(on)) {
802
- return;
1042
+ if (isVNode(ch)) {
1043
+ ch.hook.create(ch);
1044
+ ch.hook.insert(ch, parentElm, before);
1045
+ }
803
1046
  }
1047
+ }
804
1048
 
805
- var listener = vnode.listener = createListener();
806
- listener.vnode = vnode;
807
- var name;
1049
+ function removeVnodes(parentElm, vnodes, startIdx, endIdx) {
1050
+ for (; startIdx <= endIdx; ++startIdx) {
1051
+ var ch = vnodes[startIdx]; // text nodes do not have logic associated to them
808
1052
 
809
- for (name in on) {
810
- renderer.addEventListener(elm, name, listener);
1053
+ if (isVNode(ch)) {
1054
+ ch.hook.remove(ch, parentElm);
1055
+ }
811
1056
  }
812
1057
  }
813
1058
 
814
- var modEvents = {
815
- update: updateAllEventListeners,
816
- create: createAllEventListeners
817
- };
818
- /*
819
- * Copyright (c) 2018, salesforce.com, inc.
820
- * All rights reserved.
821
- * SPDX-License-Identifier: MIT
822
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
823
- */
1059
+ function updateDynamicChildren(parentElm, oldCh, newCh) {
1060
+ var oldStartIdx = 0;
1061
+ var newStartIdx = 0;
1062
+ var oldEndIdx = oldCh.length - 1;
1063
+ var oldStartVnode = oldCh[0];
1064
+ var oldEndVnode = oldCh[oldEndIdx];
1065
+ var newChEnd = newCh.length - 1;
1066
+ var newEndIdx = newChEnd;
1067
+ var newStartVnode = newCh[0];
1068
+ var newEndVnode = newCh[newEndIdx];
1069
+ var oldKeyToIdx;
1070
+ var idxInOld;
1071
+ var elmToMove;
1072
+ var before;
824
1073
 
825
- var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
1074
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
1075
+ if (!isVNode(oldStartVnode)) {
1076
+ oldStartVnode = oldCh[++oldStartIdx]; // Vnode might have been moved left
1077
+ } else if (!isVNode(oldEndVnode)) {
1078
+ oldEndVnode = oldCh[--oldEndIdx];
1079
+ } else if (!isVNode(newStartVnode)) {
1080
+ newStartVnode = newCh[++newStartIdx];
1081
+ } else if (!isVNode(newEndVnode)) {
1082
+ newEndVnode = newCh[--newEndIdx];
1083
+ } else if (sameVnode(oldStartVnode, newStartVnode)) {
1084
+ patchVnode(oldStartVnode, newStartVnode);
1085
+ oldStartVnode = oldCh[++oldStartIdx];
1086
+ newStartVnode = newCh[++newStartIdx];
1087
+ } else if (sameVnode(oldEndVnode, newEndVnode)) {
1088
+ patchVnode(oldEndVnode, newEndVnode);
1089
+ oldEndVnode = oldCh[--oldEndIdx];
1090
+ newEndVnode = newCh[--newEndIdx];
1091
+ } else if (sameVnode(oldStartVnode, newEndVnode)) {
1092
+ // Vnode moved right
1093
+ patchVnode(oldStartVnode, newEndVnode);
1094
+ newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
1095
+ oldStartVnode = oldCh[++oldStartIdx];
1096
+ newEndVnode = newCh[--newEndIdx];
1097
+ } else if (sameVnode(oldEndVnode, newStartVnode)) {
1098
+ // Vnode moved left
1099
+ patchVnode(oldEndVnode, newStartVnode);
1100
+ newStartVnode.hook.move(oldEndVnode, parentElm, oldStartVnode.elm);
1101
+ oldEndVnode = oldCh[--oldEndIdx];
1102
+ newStartVnode = newCh[++newStartIdx];
1103
+ } else {
1104
+ if (oldKeyToIdx === undefined) {
1105
+ oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
1106
+ }
826
1107
 
827
- function offsetPropertyErrorMessage(name) {
828
- return "Using the `".concat(name, "` property is an anti-pattern because it rounds the value to an integer. Instead, use the `getBoundingClientRect` method to obtain fractional values for the size of an element and its position relative to the viewport.");
829
- } // Global HTML Attributes & Properties
830
- // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
831
- // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
1108
+ idxInOld = oldKeyToIdx[newStartVnode.key];
832
1109
 
833
-
834
- assign(create(null), {
835
- accessKey: {
836
- attribute: 'accesskey'
837
- },
838
- accessKeyLabel: {
839
- readOnly: true
840
- },
841
- className: {
842
- attribute: 'class',
843
- error: 'Using the `className` property is an anti-pattern because of slow runtime behavior and potential conflicts with classes provided by the owner element. Use the `classList` API instead.'
844
- },
845
- contentEditable: {
846
- attribute: 'contenteditable'
847
- },
848
- dataset: {
849
- readOnly: true,
850
- error: "Using the `dataset` property is an anti-pattern because it can't be statically analyzed. Expose each property individually using the `@api` decorator instead."
851
- },
852
- dir: {
853
- attribute: 'dir'
854
- },
855
- draggable: {
856
- attribute: 'draggable'
857
- },
858
- dropzone: {
859
- attribute: 'dropzone',
860
- readOnly: true
861
- },
862
- hidden: {
863
- attribute: 'hidden'
864
- },
865
- id: {
866
- attribute: 'id'
867
- },
868
- inputMode: {
869
- attribute: 'inputmode'
870
- },
871
- lang: {
872
- attribute: 'lang'
873
- },
874
- slot: {
875
- attribute: 'slot',
876
- error: 'Using the `slot` property is an anti-pattern.'
877
- },
878
- spellcheck: {
879
- attribute: 'spellcheck'
880
- },
881
- style: {
882
- attribute: 'style'
883
- },
884
- tabIndex: {
885
- attribute: 'tabindex'
886
- },
887
- title: {
888
- attribute: 'title'
889
- },
890
- translate: {
891
- attribute: 'translate'
892
- },
893
- // additional "global attributes" that are not present in the link above.
894
- isContentEditable: {
895
- readOnly: true
896
- },
897
- offsetHeight: {
898
- readOnly: true,
899
- error: offsetPropertyErrorMessage('offsetHeight')
900
- },
901
- offsetLeft: {
902
- readOnly: true,
903
- error: offsetPropertyErrorMessage('offsetLeft')
904
- },
905
- offsetParent: {
906
- readOnly: true
907
- },
908
- offsetTop: {
909
- readOnly: true,
910
- error: offsetPropertyErrorMessage('offsetTop')
911
- },
912
- offsetWidth: {
913
- readOnly: true,
914
- error: offsetPropertyErrorMessage('offsetWidth')
915
- },
916
- role: {
917
- attribute: 'role'
918
- }
919
- });
920
- var controlledElement = null;
921
- var controlledAttributeName;
922
-
923
- function isAttributeLocked(elm, attrName) {
924
- return elm !== controlledElement || attrName !== controlledAttributeName;
925
- }
926
-
927
- function lockAttribute(_elm, _key) {
928
- controlledElement = null;
929
- controlledAttributeName = undefined;
930
- }
931
-
932
- function unlockAttribute(elm, key) {
933
- controlledElement = elm;
934
- controlledAttributeName = key;
935
- }
936
- /*
937
- * Copyright (c) 2018, salesforce.com, inc.
938
- * All rights reserved.
939
- * SPDX-License-Identifier: MIT
940
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
941
- */
942
-
943
-
944
- var xlinkNS = 'http://www.w3.org/1999/xlink';
945
- var xmlNS = 'http://www.w3.org/XML/1998/namespace';
946
- var ColonCharCode = 58;
947
-
948
- function updateAttrs(oldVnode, vnode) {
949
- var attrs = vnode.data.attrs,
950
- renderer = vnode.owner.renderer;
951
-
952
- if (isUndefined$1(attrs)) {
953
- return;
954
- }
955
-
956
- var oldAttrs = oldVnode.data.attrs;
957
-
958
- if (oldAttrs === attrs) {
959
- return;
960
- }
961
-
962
- var elm = vnode.elm;
963
- var setAttribute = renderer.setAttribute,
964
- removeAttribute = renderer.removeAttribute;
965
- var key;
966
- oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
967
- // this routine is only useful for data-* attributes in all kind of elements
968
- // and aria-* in standard elements (custom elements will use props for these)
969
-
970
- for (key in attrs) {
971
- var cur = attrs[key];
972
- var old = oldAttrs[key];
973
-
974
- if (old !== cur) {
975
- unlockAttribute(elm, key);
976
-
977
- if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
978
- // Assume xml namespace
979
- setAttribute(elm, key, cur, xmlNS);
980
- } else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
981
- // Assume xlink namespace
982
- setAttribute(elm, key, cur, xlinkNS);
983
- } else if (isNull(cur)) {
984
- removeAttribute(elm, key);
985
- } else {
986
- setAttribute(elm, key, cur);
987
- }
988
-
989
- lockAttribute();
990
- }
991
- }
992
- }
993
-
994
- var emptyVNode$3 = {
995
- data: {}
996
- };
997
- var modAttrs = {
998
- create: function create(vnode) {
999
- return updateAttrs(emptyVNode$3, vnode);
1000
- },
1001
- update: updateAttrs
1002
- };
1003
- /*
1004
- * Copyright (c) 2018, salesforce.com, inc.
1005
- * All rights reserved.
1006
- * SPDX-License-Identifier: MIT
1007
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1008
- */
1009
-
1010
- function isLiveBindingProp(sel, key) {
1011
- // For properties with live bindings, we read values from the DOM element
1012
- // instead of relying on internally tracked values.
1013
- return sel === 'input' && (key === 'value' || key === 'checked');
1014
- }
1015
-
1016
- function update(oldVnode, vnode) {
1017
- var props = vnode.data.props;
1018
-
1019
- if (isUndefined$1(props)) {
1020
- return;
1021
- }
1022
-
1023
- var oldProps = oldVnode.data.props;
1024
-
1025
- if (oldProps === props) {
1026
- return;
1027
- }
1028
-
1029
- var isFirstPatch = isUndefined$1(oldProps);
1030
- var elm = vnode.elm,
1031
- sel = vnode.sel,
1032
- renderer = vnode.owner.renderer;
1033
-
1034
- for (var key in props) {
1035
- var cur = props[key]; // if it is the first time this element is patched, or the current value is different to the previous value...
1036
-
1037
- if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? renderer.getProperty(elm, key) : oldProps[key])) {
1038
- renderer.setProperty(elm, key, cur);
1039
- }
1040
- }
1041
- }
1042
-
1043
- var emptyVNode$2 = {
1044
- data: {}
1045
- };
1046
- var modProps = {
1047
- create: function create(vnode) {
1048
- return update(emptyVNode$2, vnode);
1049
- },
1050
- update: update
1051
- };
1052
- /*
1053
- * Copyright (c) 2018, salesforce.com, inc.
1054
- * All rights reserved.
1055
- * SPDX-License-Identifier: MIT
1056
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1057
- */
1058
-
1059
- var classNameToClassMap = create(null);
1060
-
1061
- function getMapFromClassName(className) {
1062
- // Intentionally using == to match undefined and null values from computed style attribute
1063
- if (className == null) {
1064
- return EmptyObject;
1065
- } // computed class names must be string
1066
-
1067
-
1068
- className = isString(className) ? className : className + '';
1069
- var map = classNameToClassMap[className];
1070
-
1071
- if (map) {
1072
- return map;
1073
- }
1074
-
1075
- map = create(null);
1076
- var start = 0;
1077
- var o;
1078
- var len = className.length;
1079
-
1080
- for (o = 0; o < len; o++) {
1081
- if (StringCharCodeAt.call(className, o) === SPACE_CHAR) {
1082
- if (o > start) {
1083
- map[StringSlice.call(className, start, o)] = true;
1084
- }
1085
-
1086
- start = o + 1;
1087
- }
1088
- }
1089
-
1090
- if (o > start) {
1091
- map[StringSlice.call(className, start, o)] = true;
1092
- }
1093
-
1094
- classNameToClassMap[className] = map;
1095
-
1096
- return map;
1097
- }
1098
-
1099
- function updateClassAttribute(oldVnode, vnode) {
1100
- var elm = vnode.elm,
1101
- newClass = vnode.data.className,
1102
- renderer = vnode.owner.renderer;
1103
- var oldClass = oldVnode.data.className;
1104
-
1105
- if (oldClass === newClass) {
1106
- return;
1107
- }
1108
-
1109
- var classList = renderer.getClassList(elm);
1110
- var newClassMap = getMapFromClassName(newClass);
1111
- var oldClassMap = getMapFromClassName(oldClass);
1112
- var name;
1113
-
1114
- for (name in oldClassMap) {
1115
- // remove only if it is not in the new class collection and it is not set from within the instance
1116
- if (isUndefined$1(newClassMap[name])) {
1117
- classList.remove(name);
1118
- }
1119
- }
1120
-
1121
- for (name in newClassMap) {
1122
- if (isUndefined$1(oldClassMap[name])) {
1123
- classList.add(name);
1124
- }
1125
- }
1126
- }
1127
-
1128
- var emptyVNode$1 = {
1129
- data: {}
1130
- };
1131
- var modComputedClassName = {
1132
- create: function create(vnode) {
1133
- return updateClassAttribute(emptyVNode$1, vnode);
1134
- },
1135
- update: updateClassAttribute
1136
- };
1137
- /*
1138
- * Copyright (c) 2018, salesforce.com, inc.
1139
- * All rights reserved.
1140
- * SPDX-License-Identifier: MIT
1141
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1142
- */
1143
-
1144
- function updateStyleAttribute(oldVnode, vnode) {
1145
- var elm = vnode.elm,
1146
- newStyle = vnode.data.style,
1147
- renderer = vnode.owner.renderer;
1148
- var setAttribute = renderer.setAttribute,
1149
- removeAttribute = renderer.removeAttribute;
1150
-
1151
- if (oldVnode.data.style === newStyle) {
1152
- return;
1153
- }
1154
-
1155
- if (!isString(newStyle) || newStyle === '') {
1156
- removeAttribute(elm, 'style');
1157
- } else {
1158
- setAttribute(elm, 'style', newStyle);
1159
- }
1160
- }
1161
-
1162
- var emptyVNode = {
1163
- data: {}
1164
- };
1165
- var modComputedStyle = {
1166
- create: function create(vnode) {
1167
- return updateStyleAttribute(emptyVNode, vnode);
1168
- },
1169
- update: updateStyleAttribute
1170
- };
1171
- /*
1172
- * Copyright (c) 2018, salesforce.com, inc.
1173
- * All rights reserved.
1174
- * SPDX-License-Identifier: MIT
1175
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1176
- */
1177
- // The compiler takes care of transforming the inline classnames into an object. It's faster to set the
1178
- // different classnames properties individually instead of via a string.
1179
-
1180
- function createClassAttribute(vnode) {
1181
- var elm = vnode.elm,
1182
- classMap = vnode.data.classMap,
1183
- renderer = vnode.owner.renderer;
1184
-
1185
- if (isUndefined$1(classMap)) {
1186
- return;
1187
- }
1188
-
1189
- var classList = renderer.getClassList(elm);
1190
-
1191
- for (var name in classMap) {
1192
- classList.add(name);
1193
- }
1194
- }
1195
-
1196
- var modStaticClassName = {
1197
- create: createClassAttribute
1198
- };
1199
- /*
1200
- * Copyright (c) 2018, salesforce.com, inc.
1201
- * All rights reserved.
1202
- * SPDX-License-Identifier: MIT
1203
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1204
- */
1205
- // The compiler takes care of transforming the inline style into an object. It's faster to set the
1206
- // different style properties individually instead of via a string.
1207
-
1208
- function createStyleAttribute(vnode) {
1209
- var elm = vnode.elm,
1210
- styleDecls = vnode.data.styleDecls,
1211
- renderer = vnode.owner.renderer;
1212
-
1213
- if (isUndefined$1(styleDecls)) {
1214
- return;
1215
- }
1216
-
1217
- for (var _i6 = 0; _i6 < styleDecls.length; _i6++) {
1218
- var _styleDecls$_i = _slicedToArray(styleDecls[_i6], 3),
1219
- prop = _styleDecls$_i[0],
1220
- value = _styleDecls$_i[1],
1221
- important = _styleDecls$_i[2];
1222
-
1223
- renderer.setCSSStyleProperty(elm, prop, value, important);
1224
- }
1225
- }
1226
-
1227
- var modStaticStyle = {
1228
- create: createStyleAttribute
1229
- };
1230
- /*
1231
- * Copyright (c) 2018, salesforce.com, inc.
1232
- * All rights reserved.
1233
- * SPDX-License-Identifier: MIT
1234
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1235
- */
1236
-
1237
- /**
1238
- @license
1239
- Copyright (c) 2015 Simon Friis Vindum.
1240
- This code may only be used under the MIT License found at
1241
- https://github.com/snabbdom/snabbdom/blob/master/LICENSE
1242
- Code distributed by Snabbdom as part of the Snabbdom project at
1243
- https://github.com/snabbdom/snabbdom/
1244
- */
1245
-
1246
- function isUndef(s) {
1247
- return s === undefined;
1248
- }
1249
-
1250
- function sameVnode(vnode1, vnode2) {
1251
- return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel;
1252
- }
1253
-
1254
- function isVNode(vnode) {
1255
- return vnode != null;
1256
- }
1257
-
1258
- function createKeyToOldIdx(children, beginIdx, endIdx) {
1259
- var map = {};
1260
- var j, key, ch; // TODO [#1637]: simplify this by assuming that all vnodes has keys
1261
-
1262
- for (j = beginIdx; j <= endIdx; ++j) {
1263
- ch = children[j];
1264
-
1265
- if (isVNode(ch)) {
1266
- key = ch.key;
1267
-
1268
- if (key !== undefined) {
1269
- map[key] = j;
1270
- }
1271
- }
1272
- }
1273
-
1274
- return map;
1275
- }
1276
-
1277
- function addVnodes(parentElm, before, vnodes, startIdx, endIdx) {
1278
- for (; startIdx <= endIdx; ++startIdx) {
1279
- var ch = vnodes[startIdx];
1280
-
1281
- if (isVNode(ch)) {
1282
- ch.hook.create(ch);
1283
- ch.hook.insert(ch, parentElm, before);
1284
- }
1285
- }
1286
- }
1287
-
1288
- function removeVnodes(parentElm, vnodes, startIdx, endIdx) {
1289
- for (; startIdx <= endIdx; ++startIdx) {
1290
- var ch = vnodes[startIdx]; // text nodes do not have logic associated to them
1291
-
1292
- if (isVNode(ch)) {
1293
- ch.hook.remove(ch, parentElm);
1294
- }
1295
- }
1296
- }
1297
-
1298
- function updateDynamicChildren(parentElm, oldCh, newCh) {
1299
- var oldStartIdx = 0;
1300
- var newStartIdx = 0;
1301
- var oldEndIdx = oldCh.length - 1;
1302
- var oldStartVnode = oldCh[0];
1303
- var oldEndVnode = oldCh[oldEndIdx];
1304
- var newChEnd = newCh.length - 1;
1305
- var newEndIdx = newChEnd;
1306
- var newStartVnode = newCh[0];
1307
- var newEndVnode = newCh[newEndIdx];
1308
- var oldKeyToIdx;
1309
- var idxInOld;
1310
- var elmToMove;
1311
- var before;
1312
-
1313
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
1314
- if (!isVNode(oldStartVnode)) {
1315
- oldStartVnode = oldCh[++oldStartIdx]; // Vnode might have been moved left
1316
- } else if (!isVNode(oldEndVnode)) {
1317
- oldEndVnode = oldCh[--oldEndIdx];
1318
- } else if (!isVNode(newStartVnode)) {
1319
- newStartVnode = newCh[++newStartIdx];
1320
- } else if (!isVNode(newEndVnode)) {
1321
- newEndVnode = newCh[--newEndIdx];
1322
- } else if (sameVnode(oldStartVnode, newStartVnode)) {
1323
- patchVnode(oldStartVnode, newStartVnode);
1324
- oldStartVnode = oldCh[++oldStartIdx];
1325
- newStartVnode = newCh[++newStartIdx];
1326
- } else if (sameVnode(oldEndVnode, newEndVnode)) {
1327
- patchVnode(oldEndVnode, newEndVnode);
1328
- oldEndVnode = oldCh[--oldEndIdx];
1329
- newEndVnode = newCh[--newEndIdx];
1330
- } else if (sameVnode(oldStartVnode, newEndVnode)) {
1331
- // Vnode moved right
1332
- patchVnode(oldStartVnode, newEndVnode);
1333
- newEndVnode.hook.move(oldStartVnode, parentElm, oldEndVnode.owner.renderer.nextSibling(oldEndVnode.elm));
1334
- oldStartVnode = oldCh[++oldStartIdx];
1335
- newEndVnode = newCh[--newEndIdx];
1336
- } else if (sameVnode(oldEndVnode, newStartVnode)) {
1337
- // Vnode moved left
1338
- patchVnode(oldEndVnode, newStartVnode);
1339
- newStartVnode.hook.move(oldEndVnode, parentElm, oldStartVnode.elm);
1340
- oldEndVnode = oldCh[--oldEndIdx];
1341
- newStartVnode = newCh[++newStartIdx];
1342
- } else {
1343
- if (oldKeyToIdx === undefined) {
1344
- oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
1345
- }
1346
-
1347
- idxInOld = oldKeyToIdx[newStartVnode.key];
1348
-
1349
- if (isUndef(idxInOld)) {
1350
- // New element
1351
- newStartVnode.hook.create(newStartVnode);
1352
- newStartVnode.hook.insert(newStartVnode, parentElm, oldStartVnode.elm);
1353
- newStartVnode = newCh[++newStartIdx];
1354
- } else {
1355
- elmToMove = oldCh[idxInOld];
1110
+ if (isUndef(idxInOld)) {
1111
+ // New element
1112
+ newStartVnode.hook.create(newStartVnode);
1113
+ newStartVnode.hook.insert(newStartVnode, parentElm, oldStartVnode.elm);
1114
+ newStartVnode = newCh[++newStartIdx];
1115
+ } else {
1116
+ elmToMove = oldCh[idxInOld];
1356
1117
 
1357
1118
  if (isVNode(elmToMove)) {
1358
1119
  if (elmToMove.sel !== newStartVnode.sel) {
@@ -1375,12 +1136,12 @@ var LWC = (function (exports) {
1375
1136
  if (oldStartIdx > oldEndIdx) {
1376
1137
  // There's some cases in which the sub array of vnodes to be inserted is followed by null(s) and an
1377
1138
  // already processed vnode, in such cases the vnodes to be inserted should be before that processed vnode.
1378
- var _i7 = newEndIdx;
1139
+ var _i6 = newEndIdx;
1379
1140
  var n;
1380
1141
 
1381
1142
  do {
1382
- n = newCh[++_i7];
1383
- } while (!isVNode(n) && _i7 < newChEnd);
1143
+ n = newCh[++_i6];
1144
+ } while (!isVNode(n) && _i6 < newChEnd);
1384
1145
 
1385
1146
  before = isVNode(n) ? n.elm : null;
1386
1147
  addVnodes(parentElm, before, newCh, newStartIdx, newEndIdx);
@@ -1411,9 +1172,9 @@ var LWC = (function (exports) {
1411
1172
 
1412
1173
  var referenceElm = null;
1413
1174
 
1414
- for (var _i8 = newChLength - 1; _i8 >= 0; _i8 -= 1) {
1415
- var vnode = newCh[_i8];
1416
- var oldVNode = oldCh[_i8];
1175
+ for (var _i7 = newChLength - 1; _i7 >= 0; _i7 -= 1) {
1176
+ var vnode = newCh[_i7];
1177
+ var oldVNode = oldCh[_i7];
1417
1178
 
1418
1179
  if (vnode !== oldVNode) {
1419
1180
  if (isVNode(oldVNode)) {
@@ -1429,21 +1190,140 @@ var LWC = (function (exports) {
1429
1190
  // this condition is unnecessary
1430
1191
  vnode.hook.create(vnode); // insert the new node one since the old one is null
1431
1192
 
1432
- vnode.hook.insert(vnode, parentElm, referenceElm);
1433
- referenceElm = vnode.elm;
1434
- }
1435
- }
1436
- }
1193
+ vnode.hook.insert(vnode, parentElm, referenceElm);
1194
+ referenceElm = vnode.elm;
1195
+ }
1196
+ }
1197
+ }
1198
+ }
1199
+
1200
+ function patchVnode(oldVnode, vnode) {
1201
+ if (oldVnode !== vnode) {
1202
+ vnode.elm = oldVnode.elm;
1203
+ vnode.hook.update(oldVnode, vnode);
1204
+ }
1205
+ }
1206
+ /*
1207
+ * Copyright (c) 2018, salesforce.com, inc.
1208
+ * All rights reserved.
1209
+ * SPDX-License-Identifier: MIT
1210
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1211
+ */
1212
+
1213
+
1214
+ var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
1215
+
1216
+ function offsetPropertyErrorMessage(name) {
1217
+ return "Using the `".concat(name, "` property is an anti-pattern because it rounds the value to an integer. Instead, use the `getBoundingClientRect` method to obtain fractional values for the size of an element and its position relative to the viewport.");
1218
+ } // Global HTML Attributes & Properties
1219
+ // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
1220
+ // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
1221
+
1222
+
1223
+ assign(create(null), {
1224
+ accessKey: {
1225
+ attribute: 'accesskey'
1226
+ },
1227
+ accessKeyLabel: {
1228
+ readOnly: true
1229
+ },
1230
+ className: {
1231
+ attribute: 'class',
1232
+ error: 'Using the `className` property is an anti-pattern because of slow runtime behavior and potential conflicts with classes provided by the owner element. Use the `classList` API instead.'
1233
+ },
1234
+ contentEditable: {
1235
+ attribute: 'contenteditable'
1236
+ },
1237
+ dataset: {
1238
+ readOnly: true,
1239
+ error: "Using the `dataset` property is an anti-pattern because it can't be statically analyzed. Expose each property individually using the `@api` decorator instead."
1240
+ },
1241
+ dir: {
1242
+ attribute: 'dir'
1243
+ },
1244
+ draggable: {
1245
+ attribute: 'draggable'
1246
+ },
1247
+ dropzone: {
1248
+ attribute: 'dropzone',
1249
+ readOnly: true
1250
+ },
1251
+ hidden: {
1252
+ attribute: 'hidden'
1253
+ },
1254
+ id: {
1255
+ attribute: 'id'
1256
+ },
1257
+ inputMode: {
1258
+ attribute: 'inputmode'
1259
+ },
1260
+ lang: {
1261
+ attribute: 'lang'
1262
+ },
1263
+ slot: {
1264
+ attribute: 'slot',
1265
+ error: 'Using the `slot` property is an anti-pattern.'
1266
+ },
1267
+ spellcheck: {
1268
+ attribute: 'spellcheck'
1269
+ },
1270
+ style: {
1271
+ attribute: 'style'
1272
+ },
1273
+ tabIndex: {
1274
+ attribute: 'tabindex'
1275
+ },
1276
+ title: {
1277
+ attribute: 'title'
1278
+ },
1279
+ translate: {
1280
+ attribute: 'translate'
1281
+ },
1282
+ // additional "global attributes" that are not present in the link above.
1283
+ isContentEditable: {
1284
+ readOnly: true
1285
+ },
1286
+ offsetHeight: {
1287
+ readOnly: true,
1288
+ error: offsetPropertyErrorMessage('offsetHeight')
1289
+ },
1290
+ offsetLeft: {
1291
+ readOnly: true,
1292
+ error: offsetPropertyErrorMessage('offsetLeft')
1293
+ },
1294
+ offsetParent: {
1295
+ readOnly: true
1296
+ },
1297
+ offsetTop: {
1298
+ readOnly: true,
1299
+ error: offsetPropertyErrorMessage('offsetTop')
1300
+ },
1301
+ offsetWidth: {
1302
+ readOnly: true,
1303
+ error: offsetPropertyErrorMessage('offsetWidth')
1304
+ },
1305
+ role: {
1306
+ attribute: 'role'
1307
+ }
1308
+ });
1309
+ var controlledElement = null;
1310
+ var controlledAttributeName;
1311
+
1312
+ function isAttributeLocked(elm, attrName) {
1313
+ return elm !== controlledElement || attrName !== controlledAttributeName;
1314
+ }
1315
+
1316
+ function lockAttribute(_elm, _key) {
1317
+ controlledElement = null;
1318
+ controlledAttributeName = undefined;
1437
1319
  }
1438
1320
 
1439
- function patchVnode(oldVnode, vnode) {
1440
- if (oldVnode !== vnode) {
1441
- vnode.elm = oldVnode.elm;
1442
- vnode.hook.update(oldVnode, vnode);
1443
- }
1321
+ function unlockAttribute(elm, key) {
1322
+ controlledElement = elm;
1323
+ controlledAttributeName = key;
1444
1324
  }
1445
1325
  /*
1446
- * Copyright (c) 2020, salesforce.com, inc.
1326
+ * Copyright (c) 2018, salesforce.com, inc.
1447
1327
  * All rights reserved.
1448
1328
  * SPDX-License-Identifier: MIT
1449
1329
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -2214,8 +2094,7 @@ var LWC = (function (exports) {
2214
2094
 
2215
2095
 
2216
2096
  var LightningElement = function LightningElement() {
2217
-
2218
-
2097
+ // This should be as performant as possible, while any initialization should be done lazily
2219
2098
  if (isNull(vmBeingConstructed)) {
2220
2099
  throw new ReferenceError('Illegal constructor');
2221
2100
  }
@@ -2223,7 +2102,6 @@ var LWC = (function (exports) {
2223
2102
  var vm = vmBeingConstructed;
2224
2103
  var def = vm.def,
2225
2104
  elm = vm.elm;
2226
- vm.renderer;
2227
2105
  var bridge = def.bridge;
2228
2106
 
2229
2107
  var component = this;
@@ -2252,21 +2130,20 @@ var LWC = (function (exports) {
2252
2130
  if (vm.renderMode === 1
2253
2131
  /* Shadow */
2254
2132
  ) {
2255
- attachShadow(vm);
2133
+ doAttachShadow(vm);
2256
2134
  } // Adding extra guard rails in DEV mode.
2257
2135
 
2258
2136
  return this;
2259
2137
  };
2260
2138
 
2261
- function attachShadow(vm) {
2262
- var _renderer$attachShado;
2139
+ function doAttachShadow(vm) {
2140
+ var _attachShadow$;
2263
2141
 
2264
2142
  var elm = vm.elm,
2265
2143
  mode = vm.mode,
2266
- renderer = vm.renderer,
2267
2144
  shadowMode = vm.shadowMode,
2268
2145
  ctor = vm.def.ctor;
2269
- var cmpRoot = renderer.attachShadow(elm, (_renderer$attachShado = {}, _defineProperty(_renderer$attachShado, KEY__SYNTHETIC_MODE, shadowMode === 1), _defineProperty(_renderer$attachShado, "delegatesFocus", Boolean(ctor.delegatesFocus)), _defineProperty(_renderer$attachShado, "mode", mode), _renderer$attachShado));
2146
+ var cmpRoot = attachShadow$1(elm, (_attachShadow$ = {}, _defineProperty(_attachShadow$, KEY__SYNTHETIC_MODE, shadowMode === 1), _defineProperty(_attachShadow$, "delegatesFocus", Boolean(ctor.delegatesFocus)), _defineProperty(_attachShadow$, "mode", mode), _attachShadow$));
2270
2147
  vm.cmpRoot = cmpRoot;
2271
2148
  associateVM(cmpRoot, vm);
2272
2149
  }
@@ -2276,112 +2153,98 @@ var LWC = (function (exports) {
2276
2153
  constructor: LightningElement,
2277
2154
  dispatchEvent: function dispatchEvent(event) {
2278
2155
  var _getAssociatedVM = getAssociatedVM(this),
2279
- elm = _getAssociatedVM.elm,
2280
- dispatchEvent = _getAssociatedVM.renderer.dispatchEvent;
2156
+ elm = _getAssociatedVM.elm;
2281
2157
 
2282
- return dispatchEvent(elm, event);
2158
+ return dispatchEvent$1(elm, event);
2283
2159
  },
2284
2160
  addEventListener: function addEventListener(type, listener, options) {
2285
2161
  var vm = getAssociatedVM(this);
2286
- var elm = vm.elm,
2287
- addEventListener = vm.renderer.addEventListener;
2162
+ var elm = vm.elm;
2288
2163
 
2289
2164
  var wrappedListener = getWrappedComponentsListener(vm, listener);
2290
- addEventListener(elm, type, wrappedListener, options);
2165
+ addEventListener$1(elm, type, wrappedListener, options);
2291
2166
  },
2292
2167
  removeEventListener: function removeEventListener(type, listener, options) {
2293
2168
  var vm = getAssociatedVM(this);
2294
- var elm = vm.elm,
2295
- removeEventListener = vm.renderer.removeEventListener;
2169
+ var elm = vm.elm;
2296
2170
  var wrappedListener = getWrappedComponentsListener(vm, listener);
2297
- removeEventListener(elm, type, wrappedListener, options);
2171
+ removeEventListener$1(elm, type, wrappedListener, options);
2298
2172
  },
2299
2173
  hasAttribute: function hasAttribute(name) {
2300
2174
  var _getAssociatedVM2 = getAssociatedVM(this),
2301
- elm = _getAssociatedVM2.elm,
2302
- getAttribute = _getAssociatedVM2.renderer.getAttribute;
2175
+ elm = _getAssociatedVM2.elm;
2303
2176
 
2304
- return !isNull(getAttribute(elm, name));
2177
+ return !isNull(getAttribute$1(elm, name));
2305
2178
  },
2306
2179
  hasAttributeNS: function hasAttributeNS(namespace, name) {
2307
2180
  var _getAssociatedVM3 = getAssociatedVM(this),
2308
- elm = _getAssociatedVM3.elm,
2309
- getAttribute = _getAssociatedVM3.renderer.getAttribute;
2181
+ elm = _getAssociatedVM3.elm;
2310
2182
 
2311
- return !isNull(getAttribute(elm, name, namespace));
2183
+ return !isNull(getAttribute$1(elm, name, namespace));
2312
2184
  },
2313
2185
  removeAttribute: function removeAttribute(name) {
2314
2186
  var _getAssociatedVM4 = getAssociatedVM(this),
2315
- elm = _getAssociatedVM4.elm,
2316
- removeAttribute = _getAssociatedVM4.renderer.removeAttribute;
2187
+ elm = _getAssociatedVM4.elm;
2317
2188
 
2318
2189
  unlockAttribute(elm, name);
2319
- removeAttribute(elm, name);
2190
+ removeAttribute$1(elm, name);
2320
2191
  lockAttribute();
2321
2192
  },
2322
2193
  removeAttributeNS: function removeAttributeNS(namespace, name) {
2323
2194
  var _getAssociatedVM5 = getAssociatedVM(this),
2324
- elm = _getAssociatedVM5.elm,
2325
- removeAttribute = _getAssociatedVM5.renderer.removeAttribute;
2195
+ elm = _getAssociatedVM5.elm;
2326
2196
 
2327
2197
  unlockAttribute(elm, name);
2328
- removeAttribute(elm, name, namespace);
2198
+ removeAttribute$1(elm, name, namespace);
2329
2199
  lockAttribute();
2330
2200
  },
2331
2201
  getAttribute: function getAttribute(name) {
2332
2202
  var _getAssociatedVM6 = getAssociatedVM(this),
2333
- elm = _getAssociatedVM6.elm,
2334
- getAttribute = _getAssociatedVM6.renderer.getAttribute;
2203
+ elm = _getAssociatedVM6.elm;
2335
2204
 
2336
- return getAttribute(elm, name);
2205
+ return getAttribute$1(elm, name);
2337
2206
  },
2338
2207
  getAttributeNS: function getAttributeNS(namespace, name) {
2339
2208
  var _getAssociatedVM7 = getAssociatedVM(this),
2340
- elm = _getAssociatedVM7.elm,
2341
- getAttribute = _getAssociatedVM7.renderer.getAttribute;
2209
+ elm = _getAssociatedVM7.elm;
2342
2210
 
2343
- return getAttribute(elm, name, namespace);
2211
+ return getAttribute$1(elm, name, namespace);
2344
2212
  },
2345
2213
  setAttribute: function setAttribute(name, value) {
2346
2214
  var vm = getAssociatedVM(this);
2347
- var elm = vm.elm,
2348
- setAttribute = vm.renderer.setAttribute;
2215
+ var elm = vm.elm;
2349
2216
 
2350
2217
  unlockAttribute(elm, name);
2351
- setAttribute(elm, name, value);
2218
+ setAttribute$1(elm, name, value);
2352
2219
  lockAttribute();
2353
2220
  },
2354
2221
  setAttributeNS: function setAttributeNS(namespace, name, value) {
2355
2222
  var vm = getAssociatedVM(this);
2356
- var elm = vm.elm,
2357
- setAttribute = vm.renderer.setAttribute;
2223
+ var elm = vm.elm;
2358
2224
 
2359
2225
  unlockAttribute(elm, name);
2360
- setAttribute(elm, name, value, namespace);
2226
+ setAttribute$1(elm, name, value, namespace);
2361
2227
  lockAttribute();
2362
2228
  },
2363
2229
  getBoundingClientRect: function getBoundingClientRect() {
2364
2230
  var vm = getAssociatedVM(this);
2365
- var elm = vm.elm,
2366
- getBoundingClientRect = vm.renderer.getBoundingClientRect;
2231
+ var elm = vm.elm;
2367
2232
 
2368
- return getBoundingClientRect(elm);
2233
+ return getBoundingClientRect$1(elm);
2369
2234
  },
2370
2235
 
2371
2236
  get isConnected() {
2372
2237
  var _getAssociatedVM8 = getAssociatedVM(this),
2373
- elm = _getAssociatedVM8.elm,
2374
- isConnected = _getAssociatedVM8.renderer.isConnected;
2238
+ elm = _getAssociatedVM8.elm;
2375
2239
 
2376
- return isConnected(elm);
2240
+ return isConnected$1(elm);
2377
2241
  },
2378
2242
 
2379
2243
  get classList() {
2380
2244
  var vm = getAssociatedVM(this);
2381
- var elm = vm.elm,
2382
- getClassList = vm.renderer.getClassList;
2245
+ var elm = vm.elm;
2383
2246
 
2384
- return getClassList(elm);
2247
+ return getClassList$1(elm);
2385
2248
  },
2386
2249
 
2387
2250
  get template() {
@@ -2405,42 +2268,80 @@ var LWC = (function (exports) {
2405
2268
  return "[object ".concat(vm.def.name, "]");
2406
2269
  }
2407
2270
  };
2408
- var queryAndChildGetterDescriptors = create(null);
2409
- var 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
2271
+ var queryAndChildGetterDescriptors = create(null); // The reason we don't just call `import * as renderer from '../renderer'` here is that the bundle size
2272
+ // is smaller if we reference each function individually. Otherwise Rollup will create one big frozen
2273
+ // object representing the renderer, with a lot of methods we don't actually need.
2410
2274
 
2411
- var _loop = function _loop() {
2412
- var _childGetters$_i = _slicedToArray(_childGetters[_i9], 2),
2413
- elementProp = _childGetters$_i[0],
2414
- rendererMethod = _childGetters$_i[1];
2275
+ var childGetters = ['children', 'childNodes', 'firstChild', 'firstElementChild', 'lastChild', 'lastElementChild'];
2276
+
2277
+ function getChildGetter(methodName) {
2278
+ switch (methodName) {
2279
+ case 'children':
2280
+ return getChildren$1;
2281
+
2282
+ case 'childNodes':
2283
+ return getChildNodes$1;
2415
2284
 
2416
- queryAndChildGetterDescriptors[elementProp] = {
2285
+ case 'firstChild':
2286
+ return getFirstChild$1;
2287
+
2288
+ case 'firstElementChild':
2289
+ return getFirstElementChild$1;
2290
+
2291
+ case 'lastChild':
2292
+ return getLastChild$1;
2293
+
2294
+ case 'lastElementChild':
2295
+ return getLastElementChild$1;
2296
+ }
2297
+ } // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
2298
+
2299
+
2300
+ var _loop = function _loop() {
2301
+ var childGetter = _childGetters[_i8];
2302
+ queryAndChildGetterDescriptors[childGetter] = {
2417
2303
  get: function get() {
2418
2304
  var vm = getAssociatedVM(this);
2419
- var elm = vm.elm,
2420
- renderer = vm.renderer;
2305
+ var elm = vm.elm;
2421
2306
 
2422
- return renderer[rendererMethod](elm);
2307
+ return getChildGetter(childGetter)(elm);
2423
2308
  },
2424
2309
  configurable: true,
2425
2310
  enumerable: true
2426
2311
  };
2427
2312
  };
2428
2313
 
2429
- for (var _i9 = 0, _childGetters = childGetters; _i9 < _childGetters.length; _i9++) {
2314
+ for (var _i8 = 0, _childGetters = childGetters; _i8 < _childGetters.length; _i8++) {
2430
2315
  _loop();
2431
2316
  }
2432
2317
 
2433
- var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll']; // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
2318
+ var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
2319
+
2320
+ function getQueryMethod(methodName) {
2321
+ switch (methodName) {
2322
+ case 'getElementsByClassName':
2323
+ return getElementsByClassName$1;
2324
+
2325
+ case 'getElementsByTagName':
2326
+ return getElementsByTagName$1;
2327
+
2328
+ case 'querySelector':
2329
+ return querySelector$1;
2330
+
2331
+ case 'querySelectorAll':
2332
+ return querySelectorAll$1;
2333
+ }
2334
+ } // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
2335
+
2434
2336
 
2435
2337
  var _loop2 = function _loop2() {
2436
- var queryMethod = _queryMethods[_i10];
2338
+ var queryMethod = _queryMethods[_i9];
2437
2339
  queryAndChildGetterDescriptors[queryMethod] = {
2438
2340
  value: function value(arg) {
2439
2341
  var vm = getAssociatedVM(this);
2440
- var elm = vm.elm,
2441
- renderer = vm.renderer;
2342
+ var elm = vm.elm;
2442
2343
 
2443
- return renderer[queryMethod](elm, arg);
2344
+ return getQueryMethod(queryMethod)(elm, arg);
2444
2345
  },
2445
2346
  configurable: true,
2446
2347
  enumerable: true,
@@ -2448,7 +2349,7 @@ var LWC = (function (exports) {
2448
2349
  };
2449
2350
  };
2450
2351
 
2451
- for (var _i10 = 0, _queryMethods = queryMethods; _i10 < _queryMethods.length; _i10++) {
2352
+ for (var _i9 = 0, _queryMethods = queryMethods; _i9 < _queryMethods.length; _i9++) {
2452
2353
  _loop2();
2453
2354
  }
2454
2355
 
@@ -2809,8 +2710,8 @@ var LWC = (function (exports) {
2809
2710
  }
2810
2711
 
2811
2712
  if (!isUndefined$1(fields)) {
2812
- for (var _i11 = 0, n = fields.length; _i11 < n; _i11++) {
2813
- var _fieldName2 = fields[_i11];
2713
+ for (var _i10 = 0, n = fields.length; _i10 < n; _i10++) {
2714
+ var _fieldName2 = fields[_i10];
2814
2715
  descriptor = getOwnPropertyDescriptor$1(proto, _fieldName2);
2815
2716
  // tracked property. This is only here for backward compatibility purposes.
2816
2717
 
@@ -3027,8 +2928,8 @@ var LWC = (function (exports) {
3027
2928
  superObservedAttributes = _SuperClass$observedA === void 0 ? [] : _SuperClass$observedA;
3028
2929
  var descriptors = create(null); // expose getters and setters for each public props on the new Element Bridge
3029
2930
 
3030
- for (var _i12 = 0, _len3 = props.length; _i12 < _len3; _i12 += 1) {
3031
- var _propName2 = props[_i12];
2931
+ for (var _i11 = 0, _len3 = props.length; _i11 < _len3; _i11 += 1) {
2932
+ var _propName2 = props[_i11];
3032
2933
  attributeToPropMap[htmlPropertyToAttribute(_propName2)] = _propName2;
3033
2934
  descriptors[_propName2] = {
3034
2935
  get: createGetter(_propName2),
@@ -3039,8 +2940,8 @@ var LWC = (function (exports) {
3039
2940
  } // expose public methods as props on the new Element Bridge
3040
2941
 
3041
2942
 
3042
- for (var _i13 = 0, _len4 = methods.length; _i13 < _len4; _i13 += 1) {
3043
- var methodName = methods[_i13];
2943
+ for (var _i12 = 0, _len4 = methods.length; _i12 < _len4; _i12 += 1) {
2944
+ var methodName = methods[_i12];
3044
2945
  descriptors[methodName] = {
3045
2946
  value: createMethodCaller(methodName),
3046
2947
  writable: true,
@@ -3338,12 +3239,272 @@ var LWC = (function (exports) {
3338
3239
  publicMethods[_key2] = methods[_key2].value;
3339
3240
  }
3340
3241
 
3341
- return {
3342
- ctor: ctor,
3343
- name: name,
3344
- props: publicProps,
3345
- methods: publicMethods
3346
- };
3242
+ return {
3243
+ ctor: ctor,
3244
+ name: name,
3245
+ props: publicProps,
3246
+ methods: publicMethods
3247
+ };
3248
+ }
3249
+ /*
3250
+ * Copyright (c) 2018, salesforce.com, inc.
3251
+ * All rights reserved.
3252
+ * SPDX-License-Identifier: MIT
3253
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3254
+ */
3255
+
3256
+
3257
+ var xlinkNS = 'http://www.w3.org/1999/xlink';
3258
+ var xmlNS = 'http://www.w3.org/XML/1998/namespace';
3259
+ var ColonCharCode = 58;
3260
+
3261
+ function patchAttributes(oldVnode, vnode) {
3262
+ var attrs = vnode.data.attrs;
3263
+
3264
+ if (isUndefined$1(attrs)) {
3265
+ return;
3266
+ }
3267
+
3268
+ var oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
3269
+
3270
+ if (oldAttrs === attrs) {
3271
+ return;
3272
+ }
3273
+
3274
+ var elm = vnode.elm;
3275
+
3276
+ for (var key in attrs) {
3277
+ var cur = attrs[key];
3278
+ var old = oldAttrs[key];
3279
+
3280
+ if (old !== cur) {
3281
+ unlockAttribute(elm, key);
3282
+
3283
+ if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
3284
+ // Assume xml namespace
3285
+ setAttribute$1(elm, key, cur, xmlNS);
3286
+ } else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
3287
+ // Assume xlink namespace
3288
+ setAttribute$1(elm, key, cur, xlinkNS);
3289
+ } else if (isNull(cur) || isUndefined$1(cur)) {
3290
+ removeAttribute$1(elm, key);
3291
+ } else {
3292
+ setAttribute$1(elm, key, cur);
3293
+ }
3294
+
3295
+ lockAttribute();
3296
+ }
3297
+ }
3298
+ }
3299
+ /*
3300
+ * Copyright (c) 2018, salesforce.com, inc.
3301
+ * All rights reserved.
3302
+ * SPDX-License-Identifier: MIT
3303
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3304
+ */
3305
+
3306
+
3307
+ function isLiveBindingProp(sel, key) {
3308
+ // For properties with live bindings, we read values from the DOM element
3309
+ // instead of relying on internally tracked values.
3310
+ return sel === 'input' && (key === 'value' || key === 'checked');
3311
+ }
3312
+
3313
+ function patchProps(oldVnode, vnode) {
3314
+ var props = vnode.data.props;
3315
+
3316
+ if (isUndefined$1(props)) {
3317
+ return;
3318
+ }
3319
+
3320
+ var oldProps = isNull(oldVnode) ? EmptyObject : oldVnode.data.props;
3321
+
3322
+ if (oldProps === props) {
3323
+ return;
3324
+ }
3325
+
3326
+ var isFirstPatch = isNull(oldVnode);
3327
+ var elm = vnode.elm,
3328
+ sel = vnode.sel;
3329
+
3330
+ for (var key in props) {
3331
+ var cur = props[key]; // Set the property if it's the first time is is patched or if the previous property is
3332
+ // different than the one previously set.
3333
+
3334
+ if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
3335
+ setProperty$1(elm, key, cur);
3336
+ }
3337
+ }
3338
+ }
3339
+ /*
3340
+ * Copyright (c) 2018, salesforce.com, inc.
3341
+ * All rights reserved.
3342
+ * SPDX-License-Identifier: MIT
3343
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3344
+ */
3345
+
3346
+
3347
+ var classNameToClassMap = create(null);
3348
+
3349
+ function getMapFromClassName(className) {
3350
+ // Intentionally using == to match undefined and null values from computed style attribute
3351
+ if (className == null) {
3352
+ return EmptyObject;
3353
+ } // computed class names must be string
3354
+
3355
+
3356
+ className = isString(className) ? className : className + '';
3357
+ var map = classNameToClassMap[className];
3358
+
3359
+ if (map) {
3360
+ return map;
3361
+ }
3362
+
3363
+ map = create(null);
3364
+ var start = 0;
3365
+ var o;
3366
+ var len = className.length;
3367
+
3368
+ for (o = 0; o < len; o++) {
3369
+ if (StringCharCodeAt.call(className, o) === SPACE_CHAR) {
3370
+ if (o > start) {
3371
+ map[StringSlice.call(className, start, o)] = true;
3372
+ }
3373
+
3374
+ start = o + 1;
3375
+ }
3376
+ }
3377
+
3378
+ if (o > start) {
3379
+ map[StringSlice.call(className, start, o)] = true;
3380
+ }
3381
+
3382
+ classNameToClassMap[className] = map;
3383
+
3384
+ return map;
3385
+ }
3386
+
3387
+ function patchClassAttribute(oldVnode, vnode) {
3388
+ var elm = vnode.elm,
3389
+ newClass = vnode.data.className;
3390
+ var oldClass = isNull(oldVnode) ? undefined : oldVnode.data.className;
3391
+
3392
+ if (oldClass === newClass) {
3393
+ return;
3394
+ }
3395
+
3396
+ var classList = getClassList$1(elm);
3397
+ var newClassMap = getMapFromClassName(newClass);
3398
+ var oldClassMap = getMapFromClassName(oldClass);
3399
+ var name;
3400
+
3401
+ for (name in oldClassMap) {
3402
+ // remove only if it is not in the new class collection and it is not set from within the instance
3403
+ if (isUndefined$1(newClassMap[name])) {
3404
+ classList.remove(name);
3405
+ }
3406
+ }
3407
+
3408
+ for (name in newClassMap) {
3409
+ if (isUndefined$1(oldClassMap[name])) {
3410
+ classList.add(name);
3411
+ }
3412
+ }
3413
+ }
3414
+ /*
3415
+ * Copyright (c) 2018, salesforce.com, inc.
3416
+ * All rights reserved.
3417
+ * SPDX-License-Identifier: MIT
3418
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3419
+ */
3420
+
3421
+
3422
+ function patchStyleAttribute(oldVnode, vnode) {
3423
+ var elm = vnode.elm,
3424
+ newStyle = vnode.data.style;
3425
+ var oldStyle = isNull(oldVnode) ? undefined : oldVnode.data.style;
3426
+
3427
+ if (oldStyle === newStyle) {
3428
+ return;
3429
+ }
3430
+
3431
+ if (!isString(newStyle) || newStyle === '') {
3432
+ removeAttribute$1(elm, 'style');
3433
+ } else {
3434
+ setAttribute$1(elm, 'style', newStyle);
3435
+ }
3436
+ }
3437
+ /*
3438
+ * Copyright (c) 2018, salesforce.com, inc.
3439
+ * All rights reserved.
3440
+ * SPDX-License-Identifier: MIT
3441
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3442
+ */
3443
+
3444
+
3445
+ function applyEventListeners(vnode) {
3446
+ var elm = vnode.elm,
3447
+ on = vnode.data.on;
3448
+
3449
+ if (isUndefined$1(on)) {
3450
+ return;
3451
+ }
3452
+
3453
+ for (var name in on) {
3454
+ var handler = on[name];
3455
+ addEventListener$1(elm, name, handler);
3456
+ }
3457
+ }
3458
+ /*
3459
+ * Copyright (c) 2018, salesforce.com, inc.
3460
+ * All rights reserved.
3461
+ * SPDX-License-Identifier: MIT
3462
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3463
+ */
3464
+ // The compiler takes care of transforming the inline classnames into an object. It's faster to set the
3465
+ // different classnames properties individually instead of via a string.
3466
+
3467
+
3468
+ function applyStaticClassAttribute(vnode) {
3469
+ var elm = vnode.elm,
3470
+ classMap = vnode.data.classMap;
3471
+
3472
+ if (isUndefined$1(classMap)) {
3473
+ return;
3474
+ }
3475
+
3476
+ var classList = getClassList$1(elm);
3477
+
3478
+ for (var name in classMap) {
3479
+ classList.add(name);
3480
+ }
3481
+ }
3482
+ /*
3483
+ * Copyright (c) 2018, salesforce.com, inc.
3484
+ * All rights reserved.
3485
+ * SPDX-License-Identifier: MIT
3486
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3487
+ */
3488
+ // The compiler takes care of transforming the inline style into an object. It's faster to set the
3489
+ // different style properties individually instead of via a string.
3490
+
3491
+
3492
+ function applyStaticStyleAttribute(vnode) {
3493
+ var elm = vnode.elm,
3494
+ styleDecls = vnode.data.styleDecls;
3495
+
3496
+ if (isUndefined$1(styleDecls)) {
3497
+ return;
3498
+ }
3499
+
3500
+ for (var _i13 = 0; _i13 < styleDecls.length; _i13++) {
3501
+ var _styleDecls$_i = _slicedToArray(styleDecls[_i13], 3),
3502
+ prop = _styleDecls$_i[0],
3503
+ value = _styleDecls$_i[1],
3504
+ important = _styleDecls$_i[2];
3505
+
3506
+ setCSSStyleProperty$1(elm, prop, value, important);
3507
+ }
3347
3508
  }
3348
3509
  /*
3349
3510
  * Copyright (c) 2018, salesforce.com, inc.
@@ -3368,55 +3529,48 @@ var LWC = (function (exports) {
3368
3529
  var token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
3369
3530
 
3370
3531
  if (!isUndefined$1(token) && context.hasScopedStyles) {
3371
- owner.renderer.getClassList(elm).add(token);
3532
+ getClassList$1(elm).add(token);
3372
3533
  }
3373
3534
  }
3374
3535
 
3375
3536
  function updateNodeHook(oldVnode, vnode) {
3376
3537
  var elm = vnode.elm,
3377
- text = vnode.text,
3378
- renderer = vnode.owner.renderer;
3538
+ text = vnode.text;
3379
3539
 
3380
3540
  if (oldVnode.text !== text) {
3381
3541
 
3382
- renderer.setText(elm, text);
3542
+ setText$1(elm, text);
3383
3543
  }
3384
3544
  }
3385
3545
 
3386
3546
  function insertNodeHook(vnode, parentNode, referenceNode) {
3387
- var renderer = vnode.owner.renderer;
3388
3547
 
3389
- renderer.insert(vnode.elm, parentNode, referenceNode);
3548
+ insert$1(vnode.elm, parentNode, referenceNode);
3390
3549
  }
3391
3550
 
3392
3551
  function removeNodeHook(vnode, parentNode) {
3393
- var renderer = vnode.owner.renderer;
3394
3552
 
3395
- renderer.remove(vnode.elm, parentNode);
3553
+ remove$1(vnode.elm, parentNode);
3396
3554
  }
3397
3555
 
3398
- function createElmHook(vnode) {
3399
- modEvents.create(vnode); // Attrs need to be applied to element before props
3400
- // IE11 will wipe out value on radio inputs if value
3401
- // is set before type=radio.
3556
+ function patchElementPropsAndAttrs(oldVnode, vnode) {
3557
+ if (isNull(oldVnode)) {
3558
+ applyEventListeners(vnode);
3559
+ applyStaticClassAttribute(vnode);
3560
+ applyStaticStyleAttribute(vnode);
3561
+ } // Attrs need to be applied to element before props IE11 will wipe out value on radio inputs if
3562
+ // value is set before type=radio.
3563
+
3402
3564
 
3403
- modAttrs.create(vnode);
3404
- modProps.create(vnode);
3405
- modStaticClassName.create(vnode);
3406
- modStaticStyle.create(vnode);
3407
- modComputedClassName.create(vnode);
3408
- modComputedStyle.create(vnode);
3565
+ patchClassAttribute(oldVnode, vnode);
3566
+ patchStyleAttribute(oldVnode, vnode);
3567
+ patchAttributes(oldVnode, vnode);
3568
+ patchProps(oldVnode, vnode);
3409
3569
  }
3410
3570
 
3411
3571
  function hydrateElmHook(vnode) {
3412
- modEvents.create(vnode); // Attrs are already on the element.
3413
- // modAttrs.create(vnode);
3414
-
3415
- modProps.create(vnode); // Already set.
3416
- // modStaticClassName.create(vnode);
3417
- // modStaticStyle.create(vnode);
3418
- // modComputedClassName.create(vnode);
3419
- // modComputedStyle.create(vnode);
3572
+ applyEventListeners(vnode);
3573
+ patchProps(null, vnode);
3420
3574
  }
3421
3575
 
3422
3576
  function fallbackElmHook(elm, vnode) {
@@ -3442,24 +3596,11 @@ var LWC = (function (exports) {
3442
3596
  }
3443
3597
  }
3444
3598
 
3445
- function updateElmHook(oldVnode, vnode) {
3446
- // Attrs need to be applied to element before props
3447
- // IE11 will wipe out value on radio inputs if value
3448
- // is set before type=radio.
3449
- modAttrs.update(oldVnode, vnode);
3450
- modProps.update(oldVnode, vnode);
3451
- modComputedClassName.update(oldVnode, vnode);
3452
- modComputedStyle.update(oldVnode, vnode);
3453
- }
3454
-
3455
- function updateChildrenHook(oldVnode, vnode) {
3456
- var elm = vnode.elm,
3457
- children = vnode.children;
3458
-
3459
- if (hasDynamicChildren(children)) {
3460
- updateDynamicChildren(elm, oldVnode.children, children);
3599
+ function patchChildren(parent, oldCh, newCh) {
3600
+ if (hasDynamicChildren(newCh)) {
3601
+ updateDynamicChildren(parent, oldCh, newCh);
3461
3602
  } else {
3462
- updateStaticChildren(elm, oldVnode.children, children);
3603
+ updateStaticChildren(parent, oldCh, newCh);
3463
3604
  }
3464
3605
  }
3465
3606
 
@@ -3520,24 +3661,10 @@ var LWC = (function (exports) {
3520
3661
  createVM(elm, def, {
3521
3662
  mode: mode,
3522
3663
  owner: owner,
3523
- tagName: sel,
3524
- renderer: owner.renderer
3664
+ tagName: sel
3525
3665
  });
3526
3666
  }
3527
3667
 
3528
- function createCustomElmHook(vnode) {
3529
- modEvents.create(vnode); // Attrs need to be applied to element before props
3530
- // IE11 will wipe out value on radio inputs if value
3531
- // is set before type=radio.
3532
-
3533
- modAttrs.create(vnode);
3534
- modProps.create(vnode);
3535
- modStaticClassName.create(vnode);
3536
- modStaticStyle.create(vnode);
3537
- modComputedClassName.create(vnode);
3538
- modComputedStyle.create(vnode);
3539
- }
3540
-
3541
3668
  function createChildrenHook(vnode) {
3542
3669
  var elm = vnode.elm,
3543
3670
  children = vnode.children;
@@ -3568,16 +3695,6 @@ var LWC = (function (exports) {
3568
3695
  }
3569
3696
  }
3570
3697
 
3571
- function updateCustomElmHook(oldVnode, vnode) {
3572
- // Attrs need to be applied to element before props
3573
- // IE11 will wipe out value on radio inputs if value
3574
- // is set before type=radio.
3575
- modAttrs.update(oldVnode, vnode);
3576
- modProps.update(oldVnode, vnode);
3577
- modComputedClassName.update(oldVnode, vnode);
3578
- modComputedStyle.update(oldVnode, vnode);
3579
- }
3580
-
3581
3698
  function removeElmHook(vnode) {
3582
3699
  // this method only needs to search on child vnodes from template
3583
3700
  // to trigger the remove hook just in case some of those children
@@ -3592,6 +3709,62 @@ var LWC = (function (exports) {
3592
3709
  ch.hook.remove(ch, elm);
3593
3710
  }
3594
3711
  }
3712
+ }
3713
+
3714
+ function allocateInSlot(vm, children) {
3715
+ var oldSlots = vm.cmpSlots;
3716
+ var cmpSlots = vm.cmpSlots = create(null);
3717
+
3718
+ for (var _i16 = 0, _len6 = children.length; _i16 < _len6; _i16 += 1) {
3719
+ var vnode = children[_i16];
3720
+
3721
+ if (isNull(vnode)) {
3722
+ continue;
3723
+ }
3724
+
3725
+ var data = vnode.data;
3726
+ var slotName = data.attrs && data.attrs.slot || '';
3727
+ var vnodes = cmpSlots[slotName] = cmpSlots[slotName] || []; // re-keying the vnodes is necessary to avoid conflicts with default content for the slot
3728
+ // which might have similar keys. Each vnode will always have a key that
3729
+ // starts with a numeric character from compiler. In this case, we add a unique
3730
+ // notation for slotted vnodes keys, e.g.: `@foo:1:1`
3731
+
3732
+ if (!isUndefined$1(vnode.key)) {
3733
+ vnode.key = "@".concat(slotName, ":").concat(vnode.key);
3734
+ }
3735
+
3736
+ ArrayPush$1.call(vnodes, vnode);
3737
+ }
3738
+
3739
+ if (isFalse(vm.isDirty)) {
3740
+ // We need to determine if the old allocation is really different from the new one
3741
+ // and mark the vm as dirty
3742
+ var oldKeys = keys(oldSlots);
3743
+
3744
+ if (oldKeys.length !== keys(cmpSlots).length) {
3745
+ markComponentAsDirty(vm);
3746
+ return;
3747
+ }
3748
+
3749
+ for (var _i17 = 0, _len7 = oldKeys.length; _i17 < _len7; _i17 += 1) {
3750
+ var key = oldKeys[_i17];
3751
+
3752
+ if (isUndefined$1(cmpSlots[key]) || oldSlots[key].length !== cmpSlots[key].length) {
3753
+ markComponentAsDirty(vm);
3754
+ return;
3755
+ }
3756
+
3757
+ var oldVNodes = oldSlots[key];
3758
+ var _vnodes = cmpSlots[key];
3759
+
3760
+ for (var j = 0, a = cmpSlots[key].length; j < a; j += 1) {
3761
+ if (oldVNodes[j] !== _vnodes[j]) {
3762
+ markComponentAsDirty(vm);
3763
+ return;
3764
+ }
3765
+ }
3766
+ }
3767
+ }
3595
3768
  } // Using a WeakMap instead of a WeakSet because this one works in IE11 :(
3596
3769
 
3597
3770
 
@@ -3613,12 +3786,12 @@ var LWC = (function (exports) {
3613
3786
  */
3614
3787
 
3615
3788
 
3616
- function getUpgradableConstructor(tagName, renderer) {
3789
+ function getUpgradableConstructor(tagName) {
3617
3790
  // Should never get a tag with upper case letter at this point, the compiler should
3618
3791
  // produce only tags with lowercase letters
3619
3792
  // But, for backwards compatibility, we will lower case the tagName
3620
3793
  tagName = tagName.toLowerCase();
3621
- var CE = renderer.getCustomElement(tagName);
3794
+ var CE = getCustomElement$1(tagName);
3622
3795
 
3623
3796
  if (!isUndefined$1(CE)) {
3624
3797
  return CE;
@@ -3629,8 +3802,8 @@ var LWC = (function (exports) {
3629
3802
  */
3630
3803
 
3631
3804
 
3632
- CE = /*#__PURE__*/function (_renderer$HTMLElement) {
3633
- _inherits(LWCUpgradableElement, _renderer$HTMLElement);
3805
+ CE = /*#__PURE__*/function (_HTMLElementExported$) {
3806
+ _inherits(LWCUpgradableElement, _HTMLElementExported$);
3634
3807
 
3635
3808
  var _super5 = _createSuper(LWCUpgradableElement);
3636
3809
 
@@ -3649,9 +3822,9 @@ var LWC = (function (exports) {
3649
3822
  }
3650
3823
 
3651
3824
  return _createClass(LWCUpgradableElement);
3652
- }(renderer.HTMLElement);
3825
+ }(HTMLElementExported$1);
3653
3826
 
3654
- renderer.defineCustomElement(tagName, CE);
3827
+ defineCustomElement$1(tagName, CE);
3655
3828
  return CE;
3656
3829
  }
3657
3830
  /*
@@ -3667,8 +3840,7 @@ var LWC = (function (exports) {
3667
3840
  var TextHook = {
3668
3841
  create: function create(vnode) {
3669
3842
  var owner = vnode.owner;
3670
- var renderer = owner.renderer;
3671
- var elm = renderer.createText(vnode.text);
3843
+ var elm = createText$1(vnode.text);
3672
3844
  linkNodeToShadow(elm, owner);
3673
3845
  vnode.elm = elm;
3674
3846
  },
@@ -3688,8 +3860,7 @@ var LWC = (function (exports) {
3688
3860
  create: function create(vnode) {
3689
3861
  var owner = vnode.owner,
3690
3862
  text = vnode.text;
3691
- var renderer = owner.renderer;
3692
- var elm = renderer.createComment(text);
3863
+ var elm = createComment$1(text);
3693
3864
  linkNodeToShadow(elm, owner);
3694
3865
  vnode.elm = elm;
3695
3866
  },
@@ -3715,17 +3886,16 @@ var LWC = (function (exports) {
3715
3886
  var sel = vnode.sel,
3716
3887
  owner = vnode.owner,
3717
3888
  svg = vnode.data.svg;
3718
- var renderer = owner.renderer;
3719
3889
  var namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
3720
- var elm = renderer.createElement(sel, namespace);
3890
+ var elm = createElement$2(sel, namespace);
3721
3891
  linkNodeToShadow(elm, owner);
3722
3892
  fallbackElmHook(elm, vnode);
3723
3893
  vnode.elm = elm;
3724
- createElmHook(vnode);
3894
+ patchElementPropsAndAttrs(null, vnode);
3725
3895
  },
3726
3896
  update: function update(oldVnode, vnode) {
3727
- updateElmHook(oldVnode, vnode);
3728
- updateChildrenHook(oldVnode, vnode);
3897
+ patchElementPropsAndAttrs(oldVnode, vnode);
3898
+ patchChildren(vnode.elm, oldVnode.children, vnode.children);
3729
3899
  },
3730
3900
  insert: function insert(vnode, parentNode, referenceNode) {
3731
3901
  insertNodeHook(vnode, parentNode, referenceNode);
@@ -3771,8 +3941,7 @@ var LWC = (function (exports) {
3771
3941
  create: function create(vnode) {
3772
3942
  var sel = vnode.sel,
3773
3943
  owner = vnode.owner;
3774
- var renderer = owner.renderer;
3775
- var UpgradableConstructor = getUpgradableConstructor(sel, renderer);
3944
+ var UpgradableConstructor = getUpgradableConstructor(sel);
3776
3945
  /**
3777
3946
  * Note: if the upgradable constructor does not expect, or throw when we new it
3778
3947
  * with a callback as the first argument, we could implement a more advanced
@@ -3794,10 +3963,10 @@ var LWC = (function (exports) {
3794
3963
  throw new TypeError("Incorrect Component Constructor");
3795
3964
  }
3796
3965
 
3797
- createCustomElmHook(vnode);
3966
+ patchElementPropsAndAttrs(null, vnode);
3798
3967
  },
3799
3968
  update: function update(oldVnode, vnode) {
3800
- updateCustomElmHook(oldVnode, vnode);
3969
+ patchElementPropsAndAttrs(oldVnode, vnode);
3801
3970
  var vm = getAssociatedVMIfPresent(vnode.elm);
3802
3971
 
3803
3972
  if (vm) {
@@ -3808,7 +3977,7 @@ var LWC = (function (exports) {
3808
3977
  // will happen, but in native, it does allocate the light dom
3809
3978
 
3810
3979
 
3811
- updateChildrenHook(oldVnode, vnode);
3980
+ patchChildren(vnode.elm, oldVnode.children, vnode.children);
3812
3981
 
3813
3982
  if (vm) {
3814
3983
  // this is important to preserve the top to bottom synchronous rendering phase.
@@ -3855,8 +4024,7 @@ var LWC = (function (exports) {
3855
4024
  createVM(elm, def, {
3856
4025
  mode: mode,
3857
4026
  owner: owner,
3858
- tagName: sel,
3859
- renderer: owner.renderer
4027
+ tagName: sel
3860
4028
  });
3861
4029
  vnode.elm = elm;
3862
4030
  var vm = getAssociatedVM(elm);
@@ -3878,11 +4046,10 @@ var LWC = (function (exports) {
3878
4046
  };
3879
4047
 
3880
4048
  function linkNodeToShadow(elm, owner) {
3881
- var renderer = owner.renderer,
3882
- renderMode = owner.renderMode,
4049
+ var renderMode = owner.renderMode,
3883
4050
  shadowMode = owner.shadowMode; // TODO [#1164]: this should eventually be done by the polyfill directly
3884
4051
 
3885
- if (renderer.isSyntheticShadowDefined) {
4052
+ if (isSyntheticShadowDefined$1) {
3886
4053
  if (shadowMode === 1
3887
4054
  /* Synthetic */
3888
4055
  || renderMode === 0
@@ -4281,7 +4448,6 @@ var LWC = (function (exports) {
4281
4448
  function updateStylesheetToken(vm, template) {
4282
4449
  var elm = vm.elm,
4283
4450
  context = vm.context,
4284
- renderer = vm.renderer,
4285
4451
  renderMode = vm.renderMode,
4286
4452
  shadowMode = vm.shadowMode;
4287
4453
  var newStylesheets = template.stylesheets,
@@ -4301,11 +4467,11 @@ var LWC = (function (exports) {
4301
4467
  oldHasTokenInAttribute = context.hasTokenInAttribute;
4302
4468
 
4303
4469
  if (oldHasTokenInClass) {
4304
- renderer.getClassList(elm).remove(makeHostToken(oldToken));
4470
+ getClassList$1(elm).remove(makeHostToken(oldToken));
4305
4471
  }
4306
4472
 
4307
4473
  if (oldHasTokenInAttribute) {
4308
- renderer.removeAttribute(elm, makeHostToken(oldToken));
4474
+ removeAttribute$1(elm, makeHostToken(oldToken));
4309
4475
  } // Apply the new template styling token to the host element, if the new template has any
4310
4476
  // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
4311
4477
 
@@ -4317,12 +4483,12 @@ var LWC = (function (exports) {
4317
4483
 
4318
4484
  if (!isUndefined$1(newToken)) {
4319
4485
  if (hasScopedStyles) {
4320
- renderer.getClassList(elm).add(makeHostToken(newToken));
4486
+ getClassList$1(elm).add(makeHostToken(newToken));
4321
4487
  newHasTokenInClass = true;
4322
4488
  }
4323
4489
 
4324
4490
  if (isSyntheticShadow) {
4325
- renderer.setAttribute(elm, makeHostToken(newToken), '');
4491
+ setAttribute$1(elm, makeHostToken(newToken), '');
4326
4492
  newHasTokenInAttribute = true;
4327
4493
  }
4328
4494
  } // Update the styling tokens present on the context object.
@@ -4337,8 +4503,8 @@ var LWC = (function (exports) {
4337
4503
  var content = [];
4338
4504
  var root;
4339
4505
 
4340
- for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
4341
- var stylesheet = stylesheets[_i16];
4506
+ for (var _i18 = 0; _i18 < stylesheets.length; _i18++) {
4507
+ var stylesheet = stylesheets[_i18];
4342
4508
 
4343
4509
  if (isArray$1(stylesheet)) {
4344
4510
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
@@ -4434,8 +4600,7 @@ var LWC = (function (exports) {
4434
4600
  }
4435
4601
 
4436
4602
  function createStylesheet(vm, stylesheets) {
4437
- var renderer = vm.renderer,
4438
- renderMode = vm.renderMode,
4603
+ var renderMode = vm.renderMode,
4439
4604
  shadowMode = vm.shadowMode;
4440
4605
 
4441
4606
  if (renderMode === 1
@@ -4443,10 +4608,10 @@ var LWC = (function (exports) {
4443
4608
  && shadowMode === 1
4444
4609
  /* Synthetic */
4445
4610
  ) {
4446
- for (var _i17 = 0; _i17 < stylesheets.length; _i17++) {
4447
- renderer.insertGlobalStylesheet(stylesheets[_i17]);
4611
+ for (var _i19 = 0; _i19 < stylesheets.length; _i19++) {
4612
+ insertGlobalStylesheet$1(stylesheets[_i19]);
4448
4613
  }
4449
- } else if (renderer.ssr || renderer.isHydrating()) {
4614
+ } else if (ssr$1 || isHydrating$1()) {
4450
4615
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
4451
4616
  // This works in the client, because the stylesheets are created, and cached in the VM
4452
4617
  // the first time the VM renders.
@@ -4458,12 +4623,12 @@ var LWC = (function (exports) {
4458
4623
  var root = getNearestNativeShadowComponent(vm);
4459
4624
  var isGlobal = isNull(root);
4460
4625
 
4461
- for (var _i18 = 0; _i18 < stylesheets.length; _i18++) {
4626
+ for (var _i20 = 0; _i20 < stylesheets.length; _i20++) {
4462
4627
  if (isGlobal) {
4463
- renderer.insertGlobalStylesheet(stylesheets[_i18]);
4628
+ insertGlobalStylesheet$1(stylesheets[_i20]);
4464
4629
  } else {
4465
4630
  // local level
4466
- renderer.insertStylesheet(stylesheets[_i18], root.cmpRoot);
4631
+ insertStylesheet$1(stylesheets[_i20], root.cmpRoot);
4467
4632
  }
4468
4633
  }
4469
4634
  }
@@ -4648,8 +4813,8 @@ var LWC = (function (exports) {
4648
4813
  var stylesheets = template.stylesheets;
4649
4814
 
4650
4815
  if (!isUndefined$1(stylesheets)) {
4651
- for (var _i19 = 0; _i19 < stylesheets.length; _i19++) {
4652
- if (isTrue(stylesheets[_i19][KEY__SCOPED_CSS])) {
4816
+ for (var _i21 = 0; _i21 < stylesheets.length; _i21++) {
4817
+ if (isTrue(stylesheets[_i21][KEY__SCOPED_CSS])) {
4653
4818
  return true;
4654
4819
  }
4655
4820
  }
@@ -4850,8 +5015,8 @@ var LWC = (function (exports) {
4850
5015
 
4851
5016
  function register(service) {
4852
5017
 
4853
- for (var _i20 = 0; _i20 < hooks.length; ++_i20) {
4854
- var hookName = hooks[_i20];
5018
+ for (var _i22 = 0; _i22 < hooks.length; ++_i22) {
5019
+ var hookName = hooks[_i22];
4855
5020
 
4856
5021
  if (hookName in service) {
4857
5022
  var l = Services[hookName];
@@ -4871,8 +5036,8 @@ var LWC = (function (exports) {
4871
5036
  def = vm.def,
4872
5037
  context = vm.context;
4873
5038
 
4874
- for (var _i21 = 0, _len6 = cbs.length; _i21 < _len6; ++_i21) {
4875
- cbs[_i21].call(undefined, component, {}, def, context);
5039
+ for (var _i23 = 0, _len8 = cbs.length; _i23 < _len8; ++_i23) {
5040
+ cbs[_i23].call(undefined, component, {}, def, context);
4876
5041
  }
4877
5042
  }
4878
5043
  /*
@@ -4990,7 +5155,6 @@ var LWC = (function (exports) {
4990
5155
  function createVM(elm, def, options) {
4991
5156
  var mode = options.mode,
4992
5157
  owner = options.owner,
4993
- renderer = options.renderer,
4994
5158
  tagName = options.tagName;
4995
5159
  var vm = {
4996
5160
  elm: elm,
@@ -5004,7 +5168,6 @@ var LWC = (function (exports) {
5004
5168
  tagName: tagName,
5005
5169
  mode: mode,
5006
5170
  owner: owner,
5007
- renderer: renderer,
5008
5171
  children: EmptyArray,
5009
5172
  aChildren: EmptyArray,
5010
5173
  velements: EmptyArray,
@@ -5046,13 +5209,10 @@ var LWC = (function (exports) {
5046
5209
  }
5047
5210
 
5048
5211
  function computeShadowMode(vm) {
5049
- var def = vm.def,
5050
- renderer = vm.renderer;
5051
- var isNativeShadowDefined = renderer.isNativeShadowDefined,
5052
- isSyntheticShadowDefined = renderer.isSyntheticShadowDefined;
5212
+ var def = vm.def;
5053
5213
  var shadowMode;
5054
5214
 
5055
- if (isSyntheticShadowDefined) {
5215
+ if (isSyntheticShadowDefined$1) {
5056
5216
  if (def.renderMode === 0
5057
5217
  /* Light */
5058
5218
  ) {
@@ -5061,7 +5221,7 @@ var LWC = (function (exports) {
5061
5221
  shadowMode = 0
5062
5222
  /* Native */
5063
5223
  ;
5064
- } else if (isNativeShadowDefined) {
5224
+ } else if (isNativeShadowDefined$1) {
5065
5225
  if (def.shadowSupportMode === "any"
5066
5226
  /* Any */
5067
5227
  ) {
@@ -5151,7 +5311,6 @@ var LWC = (function (exports) {
5151
5311
  // patch function mutates vnodes by adding the element reference,
5152
5312
  // however, if patching fails it contains partial changes.
5153
5313
  if (oldCh !== newCh) {
5154
- var fn = hasDynamicChildren(newCh) ? updateDynamicChildren : updateStaticChildren;
5155
5314
  runWithBoundaryProtection(vm, vm, function () {
5156
5315
  // pre
5157
5316
  logOperationStart(2
@@ -5159,8 +5318,8 @@ var LWC = (function (exports) {
5159
5318
  , vm);
5160
5319
  }, function () {
5161
5320
  // job
5162
- var elementToRenderTo = getRenderRoot(vm);
5163
- fn(elementToRenderTo, oldCh, newCh);
5321
+ var renderRoot = getRenderRoot(vm);
5322
+ patchChildren(renderRoot, oldCh, newCh);
5164
5323
  }, function () {
5165
5324
  // post
5166
5325
  logOperationEnd(2
@@ -5182,10 +5341,9 @@ var LWC = (function (exports) {
5182
5341
  }
5183
5342
 
5184
5343
  function runRenderedCallback(vm) {
5185
- var renderer = vm.renderer,
5186
- renderedCallback = vm.def.renderedCallback;
5344
+ var renderedCallback = vm.def.renderedCallback;
5187
5345
 
5188
- if (isTrue(renderer.ssr)) {
5346
+ if (isTrue(ssr$1)) {
5189
5347
  return;
5190
5348
  }
5191
5349
 
@@ -5218,19 +5376,19 @@ var LWC = (function (exports) {
5218
5376
  });
5219
5377
  rehydrateQueue = []; // reset to a new queue
5220
5378
 
5221
- for (var _i22 = 0, _len7 = vms.length; _i22 < _len7; _i22 += 1) {
5222
- var vm = vms[_i22];
5379
+ for (var _i24 = 0, _len9 = vms.length; _i24 < _len9; _i24 += 1) {
5380
+ var vm = vms[_i24];
5223
5381
 
5224
5382
  try {
5225
5383
  rehydrate(vm);
5226
5384
  } catch (error) {
5227
- if (_i22 + 1 < _len7) {
5385
+ if (_i24 + 1 < _len9) {
5228
5386
  // pieces of the queue are still pending to be rehydrated, those should have priority
5229
5387
  if (rehydrateQueue.length === 0) {
5230
5388
  addCallbackToNextTick(flushRehydrationQueue);
5231
5389
  }
5232
5390
 
5233
- ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i22 + 1));
5391
+ ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i24 + 1));
5234
5392
  } // we need to end the measure before throwing.
5235
5393
 
5236
5394
 
@@ -5329,8 +5487,8 @@ var LWC = (function (exports) {
5329
5487
  var vCustomElementCollection = vm.velements; // Reporting disconnection for every child in inverse order since they are
5330
5488
  // inserted in reserved order.
5331
5489
 
5332
- for (var _i23 = vCustomElementCollection.length - 1; _i23 >= 0; _i23 -= 1) {
5333
- var elm = vCustomElementCollection[_i23].elm; // There are two cases where the element could be undefined:
5490
+ for (var _i25 = vCustomElementCollection.length - 1; _i25 >= 0; _i25 -= 1) {
5491
+ var elm = vCustomElementCollection[_i25].elm; // There are two cases where the element could be undefined:
5334
5492
  // * when there is an error during the construction phase, and an error
5335
5493
  // boundary picks it, there is a possibility that the VCustomElement
5336
5494
  // is not properly initialized, and therefore is should be ignored.
@@ -5364,8 +5522,8 @@ var LWC = (function (exports) {
5364
5522
 
5365
5523
 
5366
5524
  function recursivelyDisconnectChildren(vnodes) {
5367
- for (var _i24 = 0, _len8 = vnodes.length; _i24 < _len8; _i24 += 1) {
5368
- var vnode = vnodes[_i24];
5525
+ for (var _i26 = 0, _len10 = vnodes.length; _i26 < _len10; _i26 += 1) {
5526
+ var vnode = vnodes[_i26];
5369
5527
 
5370
5528
  if (!isNull(vnode) && isArray$1(vnode.children) && !isUndefined$1(vnode.elm)) {
5371
5529
  // vnode is a VElement with children
@@ -5385,15 +5543,14 @@ var LWC = (function (exports) {
5385
5543
 
5386
5544
 
5387
5545
  function resetComponentRoot(vm) {
5388
- var children = vm.children,
5389
- renderer = vm.renderer;
5546
+ var children = vm.children;
5390
5547
  var rootNode = getRenderRoot(vm);
5391
5548
 
5392
- for (var _i25 = 0, _len9 = children.length; _i25 < _len9; _i25++) {
5393
- var child = children[_i25];
5549
+ for (var _i27 = 0, _len11 = children.length; _i27 < _len11; _i27++) {
5550
+ var child = children[_i27];
5394
5551
 
5395
5552
  if (!isNull(child) && !isUndefined$1(child.elm)) {
5396
- renderer.remove(child.elm, rootNode);
5553
+ remove$1(child.elm, rootNode);
5397
5554
  }
5398
5555
  }
5399
5556
 
@@ -5403,7 +5560,7 @@ var LWC = (function (exports) {
5403
5560
  }
5404
5561
 
5405
5562
  function scheduleRehydration(vm) {
5406
- if (isTrue(vm.renderer.ssr) || isTrue(vm.isScheduled)) {
5563
+ if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
5407
5564
  return;
5408
5565
  }
5409
5566
 
@@ -5426,65 +5583,6 @@ var LWC = (function (exports) {
5426
5583
 
5427
5584
  currentVm = currentVm.owner;
5428
5585
  }
5429
- } // slow path routine
5430
- // NOTE: we should probably more this routine to the synthetic shadow folder
5431
- // and get the allocation to be cached by in the elm instead of in the VM
5432
-
5433
-
5434
- function allocateInSlot(vm, children) {
5435
- var oldSlots = vm.cmpSlots;
5436
- var cmpSlots = vm.cmpSlots = create(null);
5437
-
5438
- for (var _i26 = 0, _len10 = children.length; _i26 < _len10; _i26 += 1) {
5439
- var vnode = children[_i26];
5440
-
5441
- if (isNull(vnode)) {
5442
- continue;
5443
- }
5444
-
5445
- var data = vnode.data;
5446
- var slotName = data.attrs && data.attrs.slot || '';
5447
- var vnodes = cmpSlots[slotName] = cmpSlots[slotName] || []; // re-keying the vnodes is necessary to avoid conflicts with default content for the slot
5448
- // which might have similar keys. Each vnode will always have a key that
5449
- // starts with a numeric character from compiler. In this case, we add a unique
5450
- // notation for slotted vnodes keys, e.g.: `@foo:1:1`
5451
-
5452
- if (!isUndefined$1(vnode.key)) {
5453
- vnode.key = "@".concat(slotName, ":").concat(vnode.key);
5454
- }
5455
-
5456
- ArrayPush$1.call(vnodes, vnode);
5457
- }
5458
-
5459
- if (isFalse(vm.isDirty)) {
5460
- // We need to determine if the old allocation is really different from the new one
5461
- // and mark the vm as dirty
5462
- var oldKeys = keys(oldSlots);
5463
-
5464
- if (oldKeys.length !== keys(cmpSlots).length) {
5465
- markComponentAsDirty(vm);
5466
- return;
5467
- }
5468
-
5469
- for (var _i27 = 0, _len11 = oldKeys.length; _i27 < _len11; _i27 += 1) {
5470
- var key = oldKeys[_i27];
5471
-
5472
- if (isUndefined$1(cmpSlots[key]) || oldSlots[key].length !== cmpSlots[key].length) {
5473
- markComponentAsDirty(vm);
5474
- return;
5475
- }
5476
-
5477
- var oldVNodes = oldSlots[key];
5478
- var _vnodes = cmpSlots[key];
5479
-
5480
- for (var j = 0, a = cmpSlots[key].length; j < a; j += 1) {
5481
- if (oldVNodes[j] !== _vnodes[j]) {
5482
- markComponentAsDirty(vm);
5483
- return;
5484
- }
5485
- }
5486
- }
5487
- }
5488
5586
  }
5489
5587
 
5490
5588
  function runWithBoundaryProtection(vm, owner, pre, job, post) {
@@ -5633,7 +5731,6 @@ var LWC = (function (exports) {
5633
5731
  }
5634
5732
 
5635
5733
  var elm = vm.elm,
5636
- renderer = vm.renderer,
5637
5734
  _vm$context = vm.context,
5638
5735
  wiredConnecting = _vm$context.wiredConnecting,
5639
5736
  wiredDisconnecting = _vm$context.wiredDisconnecting; // waiting for the component to be connected to formally request the context via the token
@@ -5656,7 +5753,7 @@ var LWC = (function (exports) {
5656
5753
  ArrayPush$1.call(wiredDisconnecting, disconnectCallback);
5657
5754
  }
5658
5755
  });
5659
- renderer.dispatchEvent(elm, contextRegistrationEvent);
5756
+ dispatchEvent$1(elm, contextRegistrationEvent);
5660
5757
  });
5661
5758
  }
5662
5759
 
@@ -5900,7 +5997,7 @@ var LWC = (function (exports) {
5900
5997
  hooksAreSet = true;
5901
5998
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
5902
5999
  }
5903
- /* version: 2.6.2 */
6000
+ /* version: 2.7.3 */
5904
6001
 
5905
6002
  /*
5906
6003
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5920,7 +6017,9 @@ var LWC = (function (exports) {
5920
6017
  var styleElements = create(null);
5921
6018
  var styleSheets = create(null);
5922
6019
  var nodesToStyleSheets = new WeakMap();
5923
- var getCustomElement, defineCustomElement, HTMLElementConstructor;
6020
+ var getCustomElement;
6021
+ var defineCustomElement;
6022
+ var HTMLElementConstructor;
5924
6023
 
5925
6024
  function isCustomElementRegistryAvailable() {
5926
6025
  if (typeof customElements === 'undefined') {
@@ -6045,146 +6144,213 @@ var LWC = (function (exports) {
6045
6144
  HTMLElementConstructor.prototype = HTMLElement.prototype;
6046
6145
  }
6047
6146
 
6048
- var _isHydrating = false;
6147
+ var hydrating = false;
6049
6148
 
6050
- function setIsHydrating(v) {
6051
- _isHydrating = v;
6149
+ function setIsHydrating(value) {
6150
+ hydrating = value;
6052
6151
  }
6053
6152
 
6054
- var renderer = {
6055
- ssr: false,
6056
- isHydrating: function isHydrating() {
6057
- return _isHydrating;
6058
- },
6059
- isNativeShadowDefined: _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED],
6060
- isSyntheticShadowDefined: hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN),
6061
- createElement: function createElement(tagName, namespace) {
6062
- return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
6063
- },
6064
- createText: function createText(content) {
6065
- return document.createTextNode(content);
6066
- },
6067
- createComment: function createComment(content) {
6068
- return document.createComment(content);
6069
- },
6070
- insert: function insert(node, parent, anchor) {
6071
- parent.insertBefore(node, anchor);
6072
- },
6073
- remove: function remove(node, parent) {
6074
- parent.removeChild(node);
6075
- },
6076
- nextSibling: function nextSibling(node) {
6077
- return node.nextSibling;
6078
- },
6079
- attachShadow: function attachShadow(element, options) {
6080
- if (_isHydrating) {
6081
- return element.shadowRoot;
6082
- }
6153
+ var ssr = false;
6083
6154
 
6084
- return element.attachShadow(options);
6085
- },
6086
- setText: function setText(node, content) {
6087
- node.nodeValue = content;
6088
- },
6089
- getProperty: function getProperty(node, key) {
6090
- return node[key];
6091
- },
6092
- setProperty: function setProperty(node, key, value) {
6155
+ function isHydrating() {
6156
+ return hydrating;
6157
+ }
6093
6158
 
6094
- node[key] = value;
6095
- },
6096
- getAttribute: function getAttribute(element, name, namespace) {
6097
- return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
6098
- },
6099
- setAttribute: function setAttribute(element, name, value, namespace) {
6100
- return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
6101
- },
6102
- removeAttribute: function removeAttribute(element, name, namespace) {
6103
- if (isUndefined$1(namespace)) {
6104
- element.removeAttribute(name);
6105
- } else {
6106
- element.removeAttributeNS(namespace, name);
6107
- }
6108
- },
6109
- addEventListener: function addEventListener(target, type, callback, options) {
6110
- target.addEventListener(type, callback, options);
6111
- },
6112
- removeEventListener: function removeEventListener(target, type, callback, options) {
6113
- target.removeEventListener(type, callback, options);
6114
- },
6115
- dispatchEvent: function dispatchEvent(target, event) {
6116
- return target.dispatchEvent(event);
6117
- },
6118
- getClassList: function getClassList(element) {
6119
- return element.classList;
6120
- },
6121
- setCSSStyleProperty: function setCSSStyleProperty(element, name, value, important) {
6122
- // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
6123
- // represent elements in the engine?
6124
- element.style.setProperty(name, value, important ? 'important' : '');
6125
- },
6126
- getBoundingClientRect: function getBoundingClientRect(element) {
6127
- return element.getBoundingClientRect();
6128
- },
6129
- querySelector: function querySelector(element, selectors) {
6130
- return element.querySelector(selectors);
6131
- },
6132
- querySelectorAll: function querySelectorAll(element, selectors) {
6133
- return element.querySelectorAll(selectors);
6134
- },
6135
- getElementsByTagName: function getElementsByTagName(element, tagNameOrWildCard) {
6136
- return element.getElementsByTagName(tagNameOrWildCard);
6137
- },
6138
- getElementsByClassName: function getElementsByClassName(element, names) {
6139
- return element.getElementsByClassName(names);
6140
- },
6141
- getChildren: function getChildren(element) {
6142
- return element.children;
6143
- },
6144
- getChildNodes: function getChildNodes(element) {
6145
- return element.childNodes;
6146
- },
6147
- getFirstChild: function getFirstChild(element) {
6148
- return element.firstChild;
6149
- },
6150
- getFirstElementChild: function getFirstElementChild(element) {
6151
- return element.firstElementChild;
6152
- },
6153
- getLastChild: function getLastChild(element) {
6154
- return element.lastChild;
6155
- },
6156
- getLastElementChild: function getLastElementChild(element) {
6157
- return element.lastElementChild;
6158
- },
6159
- isConnected: function isConnected(node) {
6160
- return node.isConnected;
6161
- },
6162
- insertGlobalStylesheet: function insertGlobalStylesheet(content) {
6163
- if (!isUndefined$1(globalStylesheets[content])) {
6164
- return;
6165
- }
6159
+ var isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
6160
+ var isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
6166
6161
 
6167
- globalStylesheets[content] = true;
6168
- var elm = document.createElement('style');
6169
- elm.type = 'text/css';
6170
- elm.textContent = content;
6171
- globalStylesheetsParentElement.appendChild(elm);
6172
- },
6173
- insertStylesheet: function insertStylesheet(content, target) {
6174
- if (supportsConstructableStyleSheets) {
6175
- insertConstructableStyleSheet(content, target);
6176
- } else {
6177
- // Fall back to <style> element
6178
- insertStyleElement(content, target);
6179
- }
6180
- },
6181
- assertInstanceOfHTMLElement: function assertInstanceOfHTMLElement(elm, msg) {
6182
- assert.invariant(elm instanceof HTMLElement, msg);
6183
- },
6184
- defineCustomElement: defineCustomElement,
6185
- getCustomElement: getCustomElement,
6186
- HTMLElement: HTMLElementConstructor
6187
- };
6162
+ function createElement$1(tagName, namespace) {
6163
+ return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
6164
+ }
6165
+
6166
+ function createText(content) {
6167
+ return document.createTextNode(content);
6168
+ }
6169
+
6170
+ function createComment(content) {
6171
+ return document.createComment(content);
6172
+ }
6173
+
6174
+ function insert(node, parent, anchor) {
6175
+ parent.insertBefore(node, anchor);
6176
+ }
6177
+
6178
+ function remove(node, parent) {
6179
+ parent.removeChild(node);
6180
+ }
6181
+
6182
+ function nextSibling(node) {
6183
+ return node.nextSibling;
6184
+ }
6185
+
6186
+ function attachShadow(element, options) {
6187
+ if (hydrating) {
6188
+ return element.shadowRoot;
6189
+ }
6190
+
6191
+ return element.attachShadow(options);
6192
+ }
6193
+
6194
+ function setText(node, content) {
6195
+ node.nodeValue = content;
6196
+ }
6197
+
6198
+ function getProperty(node, key) {
6199
+ return node[key];
6200
+ }
6201
+
6202
+ function setProperty(node, key, value) {
6203
+
6204
+ node[key] = value;
6205
+ }
6206
+
6207
+ function getAttribute(element, name, namespace) {
6208
+ return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
6209
+ }
6210
+
6211
+ function setAttribute(element, name, value, namespace) {
6212
+ return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
6213
+ }
6214
+
6215
+ function removeAttribute(element, name, namespace) {
6216
+ if (isUndefined$1(namespace)) {
6217
+ element.removeAttribute(name);
6218
+ } else {
6219
+ element.removeAttributeNS(namespace, name);
6220
+ }
6221
+ }
6222
+
6223
+ function addEventListener(target, type, callback, options) {
6224
+ target.addEventListener(type, callback, options);
6225
+ }
6226
+
6227
+ function removeEventListener(target, type, callback, options) {
6228
+ target.removeEventListener(type, callback, options);
6229
+ }
6230
+
6231
+ function dispatchEvent(target, event) {
6232
+ return target.dispatchEvent(event);
6233
+ }
6234
+
6235
+ function getClassList(element) {
6236
+ return element.classList;
6237
+ }
6238
+
6239
+ function setCSSStyleProperty(element, name, value, important) {
6240
+ // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
6241
+ // represent elements in the engine?
6242
+ element.style.setProperty(name, value, important ? 'important' : '');
6243
+ }
6244
+
6245
+ function getBoundingClientRect(element) {
6246
+ return element.getBoundingClientRect();
6247
+ }
6248
+
6249
+ function querySelector(element, selectors) {
6250
+ return element.querySelector(selectors);
6251
+ }
6252
+
6253
+ function querySelectorAll(element, selectors) {
6254
+ return element.querySelectorAll(selectors);
6255
+ }
6256
+
6257
+ function getElementsByTagName(element, tagNameOrWildCard) {
6258
+ return element.getElementsByTagName(tagNameOrWildCard);
6259
+ }
6260
+
6261
+ function getElementsByClassName(element, names) {
6262
+ return element.getElementsByClassName(names);
6263
+ }
6264
+
6265
+ function getChildren(element) {
6266
+ return element.children;
6267
+ }
6268
+
6269
+ function getChildNodes(element) {
6270
+ return element.childNodes;
6271
+ }
6272
+
6273
+ function getFirstChild(element) {
6274
+ return element.firstChild;
6275
+ }
6276
+
6277
+ function getFirstElementChild(element) {
6278
+ return element.firstElementChild;
6279
+ }
6280
+
6281
+ function getLastChild(element) {
6282
+ return element.lastChild;
6283
+ }
6284
+
6285
+ function getLastElementChild(element) {
6286
+ return element.lastElementChild;
6287
+ }
6288
+
6289
+ function isConnected(node) {
6290
+ return node.isConnected;
6291
+ }
6292
+
6293
+ function insertGlobalStylesheet(content) {
6294
+ if (!isUndefined$1(globalStylesheets[content])) {
6295
+ return;
6296
+ }
6297
+
6298
+ globalStylesheets[content] = true;
6299
+ var elm = document.createElement('style');
6300
+ elm.type = 'text/css';
6301
+ elm.textContent = content;
6302
+ globalStylesheetsParentElement.appendChild(elm);
6303
+ }
6304
+
6305
+ function insertStylesheet(content, target) {
6306
+ if (supportsConstructableStyleSheets) {
6307
+ insertConstructableStyleSheet(content, target);
6308
+ } else {
6309
+ // Fall back to <style> element
6310
+ insertStyleElement(content, target);
6311
+ }
6312
+ }
6313
+
6314
+ var HTMLElementExported = HTMLElementConstructor;
6315
+ setAttachShadow(attachShadow);
6316
+ setCreateComment(createComment);
6317
+ setCreateElement(createElement$1);
6318
+ setCreateText(createText);
6319
+ setDefineCustomElement(defineCustomElement);
6320
+ setDispatchEvent(dispatchEvent);
6321
+ setGetAttribute(getAttribute);
6322
+ setGetBoundingClientRect(getBoundingClientRect);
6323
+ setGetChildNodes(getChildNodes);
6324
+ setGetChildren(getChildren);
6325
+ setGetClassList(getClassList);
6326
+ setGetCustomElement(getCustomElement);
6327
+ setGetElementsByClassName(getElementsByClassName);
6328
+ setGetElementsByTagName(getElementsByTagName);
6329
+ setGetFirstChild(getFirstChild);
6330
+ setGetFirstElementChild(getFirstElementChild);
6331
+ setGetLastChild(getLastChild);
6332
+ setGetLastElementChild(getLastElementChild);
6333
+ setGetProperty(getProperty);
6334
+ setHTMLElement(HTMLElementExported);
6335
+ setInsert(insert);
6336
+ setInsertGlobalStylesheet(insertGlobalStylesheet);
6337
+ setInsertStylesheet(insertStylesheet);
6338
+ setIsConnected(isConnected);
6339
+ setIsHydrating$1(isHydrating);
6340
+ setIsNativeShadowDefined(isNativeShadowDefined);
6341
+ setIsSyntheticShadowDefined(isSyntheticShadowDefined);
6342
+ setNextSibling(nextSibling);
6343
+ setQuerySelector(querySelector);
6344
+ setQuerySelectorAll(querySelectorAll);
6345
+ setRemove(remove);
6346
+ setRemoveAttribute(removeAttribute);
6347
+ setRemoveEventListener(removeEventListener);
6348
+ setSetAttribute(setAttribute);
6349
+ setSetCSSStyleProperty(setCSSStyleProperty);
6350
+ setSetProperty(setProperty);
6351
+ setSetText(setText);
6352
+ setSsr(ssr);
6353
+ setAddEventListener(addEventListener);
6188
6354
  /*
6189
6355
  * Copyright (c) 2018, salesforce.com, inc.
6190
6356
  * All rights reserved.
@@ -6263,7 +6429,7 @@ var LWC = (function (exports) {
6263
6429
  throw new TypeError("\"createElement\" function expects an \"is\" option with a valid component constructor.");
6264
6430
  }
6265
6431
 
6266
- var UpgradableConstructor = getUpgradableConstructor(sel, renderer);
6432
+ var UpgradableConstructor = getUpgradableConstructor(sel);
6267
6433
  var wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
6268
6434
 
6269
6435
  /**
@@ -6278,8 +6444,7 @@ var LWC = (function (exports) {
6278
6444
  createVM(elm, def, {
6279
6445
  tagName: sel,
6280
6446
  mode: options.mode !== 'closed' ? 'open' : 'closed',
6281
- owner: null,
6282
- renderer: renderer
6447
+ owner: null
6283
6448
  });
6284
6449
  ConnectingSlot.set(elm, connectRootElement);
6285
6450
  DisconnectingSlot.set(elm, disconnectRootElement);
@@ -6304,6 +6469,10 @@ var LWC = (function (exports) {
6304
6469
  function hydrateComponent(element, Ctor) {
6305
6470
  var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
6306
6471
 
6472
+ if (!(element instanceof Element)) {
6473
+ throw new TypeError("\"hydrateComponent\" expects a valid DOM element as the first parameter but instead received ".concat(element, "."));
6474
+ }
6475
+
6307
6476
  if (!isFunction$1(Ctor)) {
6308
6477
  throw new TypeError("\"hydrateComponent\" expects a valid component constructor as the second parameter but instead received ".concat(Ctor, "."));
6309
6478
  }
@@ -6321,7 +6490,6 @@ var LWC = (function (exports) {
6321
6490
  createVM(element, def, {
6322
6491
  mode: 'open',
6323
6492
  owner: null,
6324
- renderer: renderer,
6325
6493
  tagName: element.tagName.toLowerCase()
6326
6494
  });
6327
6495
 
@@ -6404,8 +6572,7 @@ var LWC = (function (exports) {
6404
6572
  createVM(_assertThisInitialized(_this6), def, {
6405
6573
  mode: 'open',
6406
6574
  owner: null,
6407
- tagName: _this6.tagName,
6408
- renderer: renderer
6575
+ tagName: _this6.tagName
6409
6576
  });
6410
6577
  return _this6;
6411
6578
  }
@@ -6478,7 +6645,7 @@ var LWC = (function (exports) {
6478
6645
  return false;
6479
6646
  }
6480
6647
 
6481
- if (renderer.isSyntheticShadowDefined) {
6648
+ if (isSyntheticShadowDefined) {
6482
6649
  // TODO [#1252]: old behavior that is still used by some pieces of the platform,
6483
6650
  // specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
6484
6651
  // used, will be considered global elements.
@@ -6530,7 +6697,7 @@ var LWC = (function (exports) {
6530
6697
  });
6531
6698
  freeze(LightningElement);
6532
6699
  seal(LightningElement.prototype);
6533
- /* version: 2.6.2 */
6700
+ /* version: 2.7.3 */
6534
6701
 
6535
6702
  exports.LightningElement = LightningElement;
6536
6703
  exports.__unstable__ProfilerControl = profilerControl;