smoothly 0.1.77 → 0.1.81

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 (220) hide show
  1. package/dist/cjs/{App-eff713bd.js → App-ffc56e72.js} +1 -1
  2. package/dist/cjs/{Notice-e43922ea.js → Notice-9120d311.js} +1 -1
  3. package/dist/cjs/{css-shim-e3f30f9a.js → css-shim-88cc6900.js} +1 -1
  4. package/dist/cjs/{dom-c8b6d1a7.js → dom-95afd968.js} +1 -1
  5. package/dist/cjs/{generate-7f7f7d99.js → generate-14aca5d2.js} +1 -1
  6. package/dist/cjs/{index-b7e6a72c.js → index-138c41c2.js} +342 -147
  7. package/dist/cjs/{index-5537d93a.js → index-41a36ce2.js} +154 -88
  8. package/dist/cjs/{index-7c9d0102.js → index-42db74b3.js} +2 -2
  9. package/dist/cjs/{index-c973259c.js → index-de5d1ee1.js} +10 -7
  10. package/dist/cjs/{index-e37f73fe.js → index-fc82954f.js} +311 -12
  11. package/dist/cjs/index.cjs.js +3 -3
  12. package/dist/cjs/loader.cjs.js +4 -4
  13. package/dist/cjs/{shadow-css-6cbb23a9.js → shadow-css-71d0f821.js} +12 -6
  14. package/dist/cjs/smoothly-accordion-item.cjs.entry.js +2 -2
  15. package/dist/cjs/smoothly-accordion.cjs.entry.js +2 -2
  16. package/dist/cjs/{smoothly-accordion_46.cjs.entry.js → smoothly-accordion_47.cjs.entry.js} +7965 -2493
  17. package/dist/cjs/smoothly-app-demo.cjs.entry.js +3 -3
  18. package/dist/cjs/smoothly-app.cjs.entry.js +2 -2
  19. package/dist/cjs/smoothly-calendar.cjs.entry.js +4 -4
  20. package/dist/cjs/smoothly-checkbox.cjs.entry.js +5707 -504
  21. package/dist/cjs/smoothly-dialog-demo.cjs.entry.js +2 -2
  22. package/dist/cjs/smoothly-dialog.cjs.entry.js +3 -3
  23. package/dist/cjs/smoothly-display-amount.cjs.entry.js +3 -3
  24. package/dist/cjs/smoothly-display-date-time.cjs.entry.js +2 -2
  25. package/dist/cjs/smoothly-display-demo.cjs.entry.js +4 -4
  26. package/dist/cjs/smoothly-display.cjs.entry.js +3 -3
  27. package/dist/cjs/smoothly-frame.cjs.entry.js +3 -3
  28. package/dist/cjs/smoothly-icon-demo.cjs.entry.js +2 -2
  29. package/dist/cjs/smoothly-icon.cjs.entry.js +2 -2
  30. package/dist/cjs/smoothly-input-date-range.cjs.entry.js +3 -3
  31. package/dist/cjs/smoothly-input-date.cjs.entry.js +3 -3
  32. package/dist/cjs/smoothly-input-demo.cjs.entry.js +2 -2
  33. package/dist/cjs/smoothly-input-month.cjs.entry.js +4 -4
  34. package/dist/cjs/smoothly-input.cjs.entry.js +19 -12
  35. package/dist/cjs/smoothly-item.cjs.entry.js +6 -2
  36. package/dist/cjs/smoothly-menu-options.cjs.entry.js +2 -2
  37. package/dist/cjs/smoothly-notification.cjs.entry.js +2 -2
  38. package/dist/cjs/smoothly-notifier.cjs.entry.js +2 -2
  39. package/dist/cjs/smoothly-option.cjs.entry.js +2 -2
  40. package/dist/cjs/smoothly-picker.cjs.entry.js +2 -2
  41. package/dist/cjs/smoothly-popup.cjs.entry.js +2 -2
  42. package/dist/cjs/smoothly-quiet.cjs.entry.js +19 -0
  43. package/dist/cjs/smoothly-radio-group.cjs.entry.js +2 -2
  44. package/dist/cjs/smoothly-radio.cjs.entry.js +2 -2
  45. package/dist/cjs/smoothly-reorder.cjs.entry.js +2 -2
  46. package/dist/cjs/smoothly-room.cjs.entry.js +2 -2
  47. package/dist/cjs/smoothly-select-demo.cjs.entry.js +2 -2
  48. package/dist/cjs/smoothly-select.cjs.entry.js +2 -2
  49. package/dist/cjs/smoothly-selector.cjs.entry.js +2 -2
  50. package/dist/cjs/smoothly-spinner.cjs.entry.js +2 -2
  51. package/dist/cjs/smoothly-submit.cjs.entry.js +2 -2
  52. package/dist/cjs/smoothly-tab-switch.cjs.entry.js +2 -2
  53. package/dist/cjs/smoothly-tab.cjs.entry.js +2 -2
  54. package/dist/cjs/smoothly-table-cell.cjs.entry.js +2 -2
  55. package/dist/cjs/smoothly-table-demo.cjs.entry.js +2 -2
  56. package/dist/cjs/smoothly-table-expandable-cell.cjs.entry.js +2 -2
  57. package/dist/cjs/smoothly-table-expandable-row.cjs.entry.js +2 -2
  58. package/dist/cjs/smoothly-table-header.cjs.entry.js +2 -2
  59. package/dist/cjs/smoothly-table-row.cjs.entry.js +2 -2
  60. package/dist/cjs/smoothly-table.cjs.entry.js +2 -2
  61. package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +3 -3
  62. package/dist/cjs/smoothly-trigger-source.cjs.entry.js +3 -3
  63. package/dist/cjs/smoothly-trigger.cjs.entry.js +2 -2
  64. package/dist/cjs/smoothly-tuple.cjs.entry.js +2 -2
  65. package/dist/cjs/smoothly-urlencoded.cjs.entry.js +2 -2
  66. package/dist/cjs/smoothly.cjs.js +10 -7
  67. package/dist/collection/collection-manifest.json +3 -2
  68. package/dist/collection/components/display-demo/index.js +4 -1
  69. package/dist/collection/components/input/index.js +16 -9
  70. package/dist/collection/components/item/index.js +4 -0
  71. package/dist/collection/components/quiet/index.js +34 -0
  72. package/dist/collection/components/quiet/style.css +3 -0
  73. package/dist/custom-elements/index.d.ts +6 -0
  74. package/dist/custom-elements/index.js +8186 -2655
  75. package/dist/{smoothly/App-bf78807d.js → esm/App-c5f6000f.js} +1 -1
  76. package/dist/esm/{Notice-966edc54.js → Notice-d87d90f7.js} +1 -1
  77. package/dist/esm/{css-shim-003e9264.js → css-shim-c64026cd.js} +1 -1
  78. package/dist/esm/{dom-1b195079.js → dom-a712b575.js} +1 -1
  79. package/dist/esm/{generate-7090dc14.js → generate-be25a8d1.js} +1 -1
  80. package/dist/esm/{index-0dd5f791.js → index-02a70ac1.js} +342 -147
  81. package/dist/{smoothly/index-01fedb5b.js → esm/index-36a04e8c.js} +2 -2
  82. package/dist/esm/{index-531e2f06.js → index-68492ed9.js} +10 -7
  83. package/dist/{smoothly/index-13251390.js → esm/index-a28d88cf.js} +311 -12
  84. package/dist/esm/{index-9d550804.js → index-dcb2b612.js} +154 -88
  85. package/dist/esm/index.js +3 -3
  86. package/dist/esm/loader.js +4 -4
  87. package/dist/esm/{shadow-css-c1ad5fdc.js → shadow-css-1e16431b.js} +12 -6
  88. package/dist/esm/smoothly-accordion-item.entry.js +2 -2
  89. package/dist/esm/smoothly-accordion.entry.js +2 -2
  90. package/dist/esm/{smoothly-accordion_46.entry.js → smoothly-accordion_47.entry.js} +7965 -2494
  91. package/dist/esm/smoothly-app-demo.entry.js +3 -3
  92. package/dist/esm/smoothly-app.entry.js +2 -2
  93. package/dist/esm/smoothly-calendar.entry.js +4 -4
  94. package/dist/esm/smoothly-checkbox.entry.js +5703 -500
  95. package/dist/esm/smoothly-dialog-demo.entry.js +2 -2
  96. package/dist/esm/smoothly-dialog.entry.js +3 -3
  97. package/dist/esm/smoothly-display-amount.entry.js +3 -3
  98. package/dist/esm/smoothly-display-date-time.entry.js +2 -2
  99. package/dist/esm/smoothly-display-demo.entry.js +4 -4
  100. package/dist/esm/smoothly-display.entry.js +3 -3
  101. package/dist/esm/smoothly-frame.entry.js +3 -3
  102. package/dist/esm/smoothly-icon-demo.entry.js +2 -2
  103. package/dist/esm/smoothly-icon.entry.js +2 -2
  104. package/dist/esm/smoothly-input-date-range.entry.js +3 -3
  105. package/dist/esm/smoothly-input-date.entry.js +3 -3
  106. package/dist/esm/smoothly-input-demo.entry.js +2 -2
  107. package/dist/esm/smoothly-input-month.entry.js +4 -4
  108. package/dist/esm/smoothly-input.entry.js +19 -12
  109. package/dist/esm/smoothly-item.entry.js +6 -2
  110. package/dist/esm/smoothly-menu-options.entry.js +2 -2
  111. package/dist/esm/smoothly-notification.entry.js +2 -2
  112. package/dist/esm/smoothly-notifier.entry.js +2 -2
  113. package/dist/esm/smoothly-option.entry.js +2 -2
  114. package/dist/esm/smoothly-picker.entry.js +2 -2
  115. package/dist/esm/smoothly-popup.entry.js +2 -2
  116. package/dist/esm/smoothly-quiet.entry.js +15 -0
  117. package/dist/esm/smoothly-radio-group.entry.js +2 -2
  118. package/dist/esm/smoothly-radio.entry.js +2 -2
  119. package/dist/esm/smoothly-reorder.entry.js +2 -2
  120. package/dist/esm/smoothly-room.entry.js +2 -2
  121. package/dist/esm/smoothly-select-demo.entry.js +2 -2
  122. package/dist/esm/smoothly-select.entry.js +2 -2
  123. package/dist/esm/smoothly-selector.entry.js +2 -2
  124. package/dist/esm/smoothly-spinner.entry.js +2 -2
  125. package/dist/esm/smoothly-submit.entry.js +2 -2
  126. package/dist/esm/smoothly-tab-switch.entry.js +2 -2
  127. package/dist/esm/smoothly-tab.entry.js +2 -2
  128. package/dist/esm/smoothly-table-cell.entry.js +2 -2
  129. package/dist/esm/smoothly-table-demo.entry.js +2 -2
  130. package/dist/esm/smoothly-table-expandable-cell.entry.js +2 -2
  131. package/dist/esm/smoothly-table-expandable-row.entry.js +2 -2
  132. package/dist/esm/smoothly-table-header.entry.js +2 -2
  133. package/dist/esm/smoothly-table-row.entry.js +2 -2
  134. package/dist/esm/smoothly-table.entry.js +2 -2
  135. package/dist/esm/smoothly-trigger-sink.entry.js +3 -3
  136. package/dist/esm/smoothly-trigger-source.entry.js +3 -3
  137. package/dist/esm/smoothly-trigger.entry.js +2 -2
  138. package/dist/esm/smoothly-tuple.entry.js +2 -2
  139. package/dist/esm/smoothly-urlencoded.entry.js +2 -2
  140. package/dist/esm/smoothly.js +10 -7
  141. package/dist/{esm/App-bf78807d.js → smoothly/App-c5f6000f.js} +1 -1
  142. package/dist/smoothly/{css-shim-003e9264.js → css-shim-c64026cd.js} +1 -1
  143. package/dist/smoothly/{dom-1b195079.js → dom-a712b575.js} +1 -1
  144. package/dist/smoothly/{generate-7090dc14.js → generate-be25a8d1.js} +1 -1
  145. package/dist/smoothly/{index-0dd5f791.js → index-02a70ac1.js} +342 -147
  146. package/dist/{esm/index-01fedb5b.js → smoothly/index-36a04e8c.js} +2 -2
  147. package/dist/smoothly/{index-531e2f06.js → index-68492ed9.js} +10 -7
  148. package/dist/{esm/index-13251390.js → smoothly/index-a28d88cf.js} +311 -12
  149. package/dist/smoothly/index.esm.js +3 -3
  150. package/dist/smoothly/{p-0906d4b2.js → p-074a0448.js} +1 -1
  151. package/dist/smoothly/p-09d633f8.entry.js +1 -0
  152. package/dist/smoothly/p-0c1e9588.entry.js +1 -0
  153. package/dist/smoothly/p-1a81597b.entry.js +1 -0
  154. package/dist/smoothly/{p-7f5dd95f.js → p-1e768876.js} +1 -1
  155. package/dist/smoothly/p-9fa3ab06.entry.js +1 -0
  156. package/dist/smoothly/p-c9d01e9b.entry.js +1 -0
  157. package/dist/smoothly/{shadow-css-c1ad5fdc.js → shadow-css-1e16431b.js} +12 -6
  158. package/dist/smoothly/smoothly-accordion-item.entry.js +2 -2
  159. package/dist/smoothly/smoothly-accordion.entry.js +2 -2
  160. package/dist/smoothly/smoothly-app-demo.entry.js +3 -3
  161. package/dist/smoothly/smoothly-app.entry.js +2 -2
  162. package/dist/smoothly/smoothly-calendar.entry.js +4 -4
  163. package/dist/smoothly/smoothly-checkbox.entry.js +5703 -500
  164. package/dist/smoothly/smoothly-dialog-demo.entry.js +2 -2
  165. package/dist/smoothly/smoothly-dialog.entry.js +3 -3
  166. package/dist/smoothly/smoothly-display-amount.entry.js +3 -3
  167. package/dist/smoothly/smoothly-display-date-time.entry.js +2 -2
  168. package/dist/smoothly/smoothly-display-demo.entry.js +4 -4
  169. package/dist/smoothly/smoothly-display.entry.js +3 -3
  170. package/dist/smoothly/smoothly-frame.entry.js +3 -3
  171. package/dist/smoothly/smoothly-icon-demo.entry.js +2 -2
  172. package/dist/smoothly/smoothly-icon.entry.js +2 -2
  173. package/dist/smoothly/smoothly-input-date-range.entry.js +3 -3
  174. package/dist/smoothly/smoothly-input-date.entry.js +3 -3
  175. package/dist/smoothly/smoothly-input-demo.entry.js +2 -2
  176. package/dist/smoothly/smoothly-input-month.entry.js +4 -4
  177. package/dist/smoothly/smoothly-input.entry.js +19 -12
  178. package/dist/smoothly/smoothly-item.entry.js +6 -2
  179. package/dist/smoothly/smoothly-menu-options.entry.js +2 -2
  180. package/dist/smoothly/smoothly-notification.entry.js +2 -2
  181. package/dist/smoothly/smoothly-notifier.entry.js +2 -2
  182. package/dist/smoothly/smoothly-option.entry.js +2 -2
  183. package/dist/smoothly/smoothly-picker.entry.js +2 -2
  184. package/dist/smoothly/smoothly-popup.entry.js +2 -2
  185. package/dist/smoothly/smoothly-quiet.entry.js +15 -0
  186. package/dist/smoothly/smoothly-radio-group.entry.js +2 -2
  187. package/dist/smoothly/smoothly-radio.entry.js +2 -2
  188. package/dist/smoothly/smoothly-reorder.entry.js +2 -2
  189. package/dist/smoothly/smoothly-room.entry.js +2 -2
  190. package/dist/smoothly/smoothly-select-demo.entry.js +2 -2
  191. package/dist/smoothly/smoothly-select.entry.js +2 -2
  192. package/dist/smoothly/smoothly-selector.entry.js +2 -2
  193. package/dist/smoothly/smoothly-spinner.entry.js +2 -2
  194. package/dist/smoothly/smoothly-submit.entry.js +2 -2
  195. package/dist/smoothly/smoothly-tab-switch.entry.js +2 -2
  196. package/dist/smoothly/smoothly-tab.entry.js +2 -2
  197. package/dist/smoothly/smoothly-table-cell.entry.js +2 -2
  198. package/dist/smoothly/smoothly-table-demo.entry.js +2 -2
  199. package/dist/smoothly/smoothly-table-expandable-cell.entry.js +2 -2
  200. package/dist/smoothly/smoothly-table-expandable-row.entry.js +2 -2
  201. package/dist/smoothly/smoothly-table-header.entry.js +2 -2
  202. package/dist/smoothly/smoothly-table-row.entry.js +2 -2
  203. package/dist/smoothly/smoothly-table.entry.js +2 -2
  204. package/dist/smoothly/smoothly-trigger-sink.entry.js +3 -3
  205. package/dist/smoothly/smoothly-trigger-source.entry.js +3 -3
  206. package/dist/smoothly/smoothly-trigger.entry.js +2 -2
  207. package/dist/smoothly/smoothly-tuple.entry.js +2 -2
  208. package/dist/smoothly/smoothly-urlencoded.entry.js +2 -2
  209. package/dist/smoothly/smoothly.esm.js +10 -7
  210. package/dist/types/components/item/index.d.ts +1 -0
  211. package/dist/types/components/quiet/index.d.ts +4 -0
  212. package/dist/types/components.d.ts +15 -0
  213. package/dist/types/stencil-public-runtime.d.ts +183 -182
  214. package/loader/index.d.ts +0 -1
  215. package/package.json +89 -90
  216. package/dist/smoothly/p-22bce579.entry.js +0 -1
  217. package/dist/smoothly/p-41528fcb.entry.js +0 -1
  218. package/dist/smoothly/p-89fe12b0.entry.js +0 -1
  219. package/dist/smoothly/p-e3d91e7a.entry.js +0 -1
  220. package/dist/smoothly/p-e79800d9.entry.js +0 -1
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'smoothly';
24
- const BUILD = /* smoothly */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, cssVarShim: false, devTools: false, disconnectedCallback: true, dynamicImportShim: false, element: false, event: true, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, isDebug: false, isDev: true, isTesting: true, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: true, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, safari10: false, scoped: true, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
24
+ const BUILD = /* smoothly */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, cssVarShim: false, devTools: false, disconnectedCallback: true, dynamicImportShim: false, element: false, event: true, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: true, isTesting: true, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: true, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, safari10: false, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
25
25
  const Env = /* smoothly */ {};
26
26
 
27
27
  let scopeId;
@@ -44,8 +44,8 @@ const H = (win.HTMLElement || class {
44
44
  const plt = {
45
45
  $flags$: 0,
46
46
  $resourcesUrl$: '',
47
- jmp: h => h(),
48
- raf: h => requestAnimationFrame(h),
47
+ jmp: (h) => h(),
48
+ raf: (h) => requestAnimationFrame(h),
49
49
  ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
50
50
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
51
51
  ce: (eventName, opts) => new CustomEvent(eventName, opts),
@@ -53,7 +53,9 @@ const plt = {
53
53
  const setPlatformHelpers = (helpers) => {
54
54
  Object.assign(plt, helpers);
55
55
  };
56
- const supportsShadow = BUILD.shadowDomShim && BUILD.shadowDom ? /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)() : true;
56
+ const supportsShadow = BUILD.shadowDomShim && BUILD.shadowDom
57
+ ? /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)()
58
+ : true;
57
59
  const supportsListenerOptions = /*@__PURE__*/ (() => {
58
60
  let supportsListenerOptions = false;
59
61
  try {
@@ -71,7 +73,7 @@ const supportsConstructibleStylesheets = BUILD.constructableCSS
71
73
  ? /*@__PURE__*/ (() => {
72
74
  try {
73
75
  new CSSStyleSheet();
74
- return typeof (new CSSStyleSheet()).replace === 'function';
76
+ return typeof new CSSStyleSheet().replace === 'function';
75
77
  }
76
78
  catch (e) { }
77
79
  return false;
@@ -270,7 +272,9 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
270
272
  rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
271
273
  }
272
274
  if (!appliedStyles.has(scopeId)) {
273
- if (BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
275
+ if (BUILD.hydrateClientSide &&
276
+ styleContainerNode.host &&
277
+ (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
274
278
  // This is only happening on native shadow-dom, do not needs CSS var shim
275
279
  styleElm.innerHTML = style;
276
280
  }
@@ -331,7 +335,7 @@ const attachStyles = (hostRef) => {
331
335
  const getScopeId = (cmp, mode) => 'sc-' + (BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);
332
336
  const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
333
337
  // Private
334
- const computeMode = (elm) => modeResolutionChain.map(h => h(elm)).find(m => !!m);
338
+ const computeMode = (elm) => modeResolutionChain.map((h) => h(elm)).find((m) => !!m);
335
339
  // Public
336
340
  const setMode = (handler) => modeResolutionChain.push(handler);
337
341
  const getMode = (ref) => getHostRef(ref).$modeName$;
@@ -418,7 +422,7 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
418
422
  typeof classData !== 'object'
419
423
  ? classData
420
424
  : Object.keys(classData)
421
- .filter(k => classData[k])
425
+ .filter((k) => classData[k])
422
426
  .join(' ');
423
427
  }
424
428
  }
@@ -526,8 +530,8 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
526
530
  const classList = elm.classList;
527
531
  const oldClasses = parseClassList(oldValue);
528
532
  const newClasses = parseClassList(newValue);
529
- classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c)));
530
- classList.add(...newClasses.filter(c => c && !oldClasses.includes(c)));
533
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
534
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
531
535
  }
532
536
  else if (BUILD.vdomStyle && memberName === 'style') {
533
537
  // update style attribute, css properties and values
@@ -562,7 +566,10 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
562
566
  newValue(elm);
563
567
  }
564
568
  }
565
- else if (BUILD.vdomListener && (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === 'o' && memberName[1] === 'n') {
569
+ else if (BUILD.vdomListener &&
570
+ (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) &&
571
+ memberName[0] === 'o' &&
572
+ memberName[1] === 'n') {
566
573
  // Event Handlers
567
574
  // so if the member name starts with "on" and the 3rd characters is
568
575
  // a capital letter, and it's not already a member on the element,
@@ -609,7 +616,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
609
616
  // Workaround for Safari, moving the <input> caret when re-assigning the same valued
610
617
  if (memberName === 'list') {
611
618
  isProp = false;
612
- // tslint:disable-next-line: triple-equals
613
619
  }
614
620
  else if (oldValue == null || elm[memberName] != n) {
615
621
  elm[memberName] = n;
@@ -663,7 +669,9 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
663
669
  // if the element passed in is a shadow root, which is a document fragment
664
670
  // then we want to be adding attrs/props to the shadow root's "host" element
665
671
  // if it's not a shadow root, then we add attrs/props to the same element
666
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
672
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
673
+ ? newVnode.$elm$.host
674
+ : newVnode.$elm$;
667
675
  const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
668
676
  const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
669
677
  if (BUILD.updatable) {
@@ -710,7 +718,8 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
710
718
  }
711
719
  else if (BUILD.slotRelocation && newVNode.$flags$ & 1 /* isSlotReference */) {
712
720
  // create a slot reference node
713
- elm = newVNode.$elm$ = BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode) : doc.createTextNode('');
721
+ elm = newVNode.$elm$ =
722
+ BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode) : doc.createTextNode('');
714
723
  }
715
724
  else {
716
725
  if (BUILD.svg && !isSvgMode) {
@@ -718,8 +727,12 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
718
727
  }
719
728
  // create element
720
729
  elm = newVNode.$elm$ = (BUILD.svg
721
- ? doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, BUILD.slotRelocation && newVNode.$flags$ & 2 /* isSlotFallback */ ? 'slot-fb' : newVNode.$tag$)
722
- : doc.createElement(BUILD.slotRelocation && newVNode.$flags$ & 2 /* isSlotFallback */ ? 'slot-fb' : newVNode.$tag$));
730
+ ? doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, BUILD.slotRelocation && newVNode.$flags$ & 2 /* isSlotFallback */
731
+ ? 'slot-fb'
732
+ : newVNode.$tag$)
733
+ : doc.createElement(BUILD.slotRelocation && newVNode.$flags$ & 2 /* isSlotFallback */
734
+ ? 'slot-fb'
735
+ : newVNode.$tag$));
723
736
  if (BUILD.svg && isSvgMode && newVNode.$tag$ === 'foreignObject') {
724
737
  isSvgMode = false;
725
738
  }
@@ -1089,7 +1102,7 @@ const relocateSlotContent = (elm) => {
1089
1102
  // that is suppose to always represent the original content location
1090
1103
  if (isNodeLocatedInSlot(node, slotNameAttr)) {
1091
1104
  // it's possible we've already decided to relocate this node
1092
- relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
1105
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1093
1106
  // made some changes to slots
1094
1107
  // let's make sure we also double check
1095
1108
  // fallbacks are correctly hidden or shown
@@ -1108,9 +1121,9 @@ const relocateSlotContent = (elm) => {
1108
1121
  });
1109
1122
  }
1110
1123
  if (node['s-sr']) {
1111
- relocateNodes.map(relocateNode => {
1124
+ relocateNodes.map((relocateNode) => {
1112
1125
  if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
1113
- relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
1126
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1114
1127
  if (relocateNodeData && !relocateNode.$slotRefNode$) {
1115
1128
  relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
1116
1129
  }
@@ -1118,7 +1131,7 @@ const relocateSlotContent = (elm) => {
1118
1131
  });
1119
1132
  }
1120
1133
  }
1121
- else if (!relocateNodes.some(r => r.$nodeToRelocate$ === node)) {
1134
+ else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1122
1135
  // so far this element does not have a slot home, not setting slotRefNode on purpose
1123
1136
  // if we never find a home for this element then we'll need to hide it
1124
1137
  relocateNodes.push({
@@ -1213,7 +1226,10 @@ render() {
1213
1226
  if (!nodeToRelocate['s-ol']) {
1214
1227
  // add a reference node marking this node's original location
1215
1228
  // keep a reference to this node for later lookups
1216
- orgLocationNode = BUILD.isDebug || BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode('');
1229
+ orgLocationNode =
1230
+ BUILD.isDebug || BUILD.hydrateServerSide
1231
+ ? originalLocationDebugNode(nodeToRelocate)
1232
+ : doc.createTextNode('');
1217
1233
  orgLocationNode['s-nr'] = nodeToRelocate;
1218
1234
  nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
1219
1235
  }
@@ -1237,7 +1253,8 @@ render() {
1237
1253
  }
1238
1254
  }
1239
1255
  }
1240
- if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) || nodeToRelocate.nextSibling !== insertBeforeNode) {
1256
+ if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
1257
+ nodeToRelocate.nextSibling !== insertBeforeNode) {
1241
1258
  // we've checked that it's worth while to relocate
1242
1259
  // since that the node to relocate
1243
1260
  // has a different next sibling or parent relocated
@@ -1272,7 +1289,10 @@ render() {
1272
1289
  // slot comment debug nodes only created with the `--debug` flag
1273
1290
  // otherwise these nodes are text nodes w/out content
1274
1291
  const slotReferenceDebugNode = (slotVNode) => doc.createComment(`<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ''}> (host=${hostTagName.toLowerCase()})`);
1275
- const originalLocationDebugNode = (nodeToRelocate) => doc.createComment(`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate['s-hn']})` : `[${nodeToRelocate.textContent}]`));
1292
+ const originalLocationDebugNode = (nodeToRelocate) => doc.createComment(`org-location for ` +
1293
+ (nodeToRelocate.localName
1294
+ ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate['s-hn']})`
1295
+ : `[${nodeToRelocate.textContent}]`));
1276
1296
  const getElement = (ref) => (BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref);
1277
1297
  const createEvent = (ref, name, flags) => {
1278
1298
  const elm = getElement(ref);
@@ -1290,6 +1310,13 @@ const createEvent = (ref, name, flags) => {
1290
1310
  },
1291
1311
  };
1292
1312
  };
1313
+ /**
1314
+ * Helper function to create & dispatch a custom Event on a provided target
1315
+ * @param elm the target of the Event
1316
+ * @param name the name to give the custom Event
1317
+ * @param opts options for configuring a custom Event
1318
+ * @returns the custom Event
1319
+ */
1293
1320
  const emitEvent = (elm, name, opts) => {
1294
1321
  const ev = plt.ce(name, opts);
1295
1322
  elm.dispatchEvent(ev);
@@ -1297,7 +1324,7 @@ const emitEvent = (elm, name, opts) => {
1297
1324
  };
1298
1325
  const attachToAncestor = (hostRef, ancestorComponent) => {
1299
1326
  if (BUILD.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1300
- ancestorComponent['s-p'].push(new Promise(r => (hostRef.$onRenderResolve$ = r)));
1327
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1301
1328
  }
1302
1329
  };
1303
1330
  const scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1394,7 +1421,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1394
1421
  // ok, so turns out there are some child host elements
1395
1422
  // waiting on this parent element to load
1396
1423
  // let's fire off all update callbacks waiting
1397
- rc.map(cb => cb());
1424
+ rc.map((cb) => cb());
1398
1425
  elm['s-rc'] = undefined;
1399
1426
  }
1400
1427
  endRender();
@@ -1438,7 +1465,7 @@ const callRender = (hostRef, instance, elm) => {
1438
1465
  // or we need to update the css class/attrs on the host element
1439
1466
  // DOM WRITE!
1440
1467
  if (BUILD.hydrateServerSide) {
1441
- return Promise.resolve(instance).then(value => renderVdom(hostRef, value));
1468
+ return Promise.resolve(instance).then((value) => renderVdom(hostRef, value));
1442
1469
  }
1443
1470
  else {
1444
1471
  renderVdom(hostRef, instance);
@@ -1539,7 +1566,8 @@ const forceUpdate = (ref) => {
1539
1566
  if (BUILD.updatable) {
1540
1567
  const hostRef = getHostRef(ref);
1541
1568
  const isConnected = hostRef.$hostElement$.isConnected;
1542
- if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1569
+ if (isConnected &&
1570
+ (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1543
1571
  scheduleUpdate(hostRef, false);
1544
1572
  }
1545
1573
  // Returns "true" when the forced update was successfully scheduled
@@ -1586,7 +1614,11 @@ const emitLifecycleEvent = (elm, lifecycleName) => {
1586
1614
  });
1587
1615
  }
1588
1616
  };
1589
- const addHydratedFlag = (elm) => (BUILD.hydratedClass ? elm.classList.add('hydrated') : BUILD.hydratedAttribute ? elm.setAttribute('hydrated', '') : undefined);
1617
+ const addHydratedFlag = (elm) => BUILD.hydratedClass
1618
+ ? elm.classList.add('hydrated')
1619
+ : BUILD.hydratedAttribute
1620
+ ? elm.setAttribute('hydrated', '')
1621
+ : undefined;
1590
1622
  const serverSideConnected = (elm) => {
1591
1623
  const children = elm.children;
1592
1624
  if (children != null) {
@@ -1612,7 +1644,7 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1612
1644
  hostElm[HYDRATE_ID] = hostId;
1613
1645
  hostElm.removeAttribute(HYDRATE_ID);
1614
1646
  clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
1615
- childRenderNodes.map(c => {
1647
+ childRenderNodes.map((c) => {
1616
1648
  const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
1617
1649
  const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
1618
1650
  const node = c.$elm$;
@@ -1629,7 +1661,7 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1629
1661
  plt.$orgLocNodes$.delete(orgLocationId);
1630
1662
  });
1631
1663
  if (BUILD.shadowDom && shadowRoot) {
1632
- shadowRootNodes.map(shadowRootNode => {
1664
+ shadowRootNodes.map((shadowRootNode) => {
1633
1665
  if (shadowRootNode) {
1634
1666
  shadowRoot.appendChild(shadowRootNode);
1635
1667
  }
@@ -1855,7 +1887,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1855
1887
  const watchMethods = cmpMeta.$watchers$[propName];
1856
1888
  if (watchMethods) {
1857
1889
  // this instance is watching for when this property changed
1858
- watchMethods.map(watchMethodName => {
1890
+ watchMethods.map((watchMethodName) => {
1859
1891
  try {
1860
1892
  // fire off each of the watch methods that are watching this property
1861
1893
  instance[watchMethodName](newVal, oldVal, propName);
@@ -1866,7 +1898,8 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1866
1898
  });
1867
1899
  }
1868
1900
  }
1869
- if (BUILD.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1901
+ if (BUILD.updatable &&
1902
+ (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1870
1903
  if (BUILD.cmpShouldUpdate && instance.componentShouldUpdate) {
1871
1904
  if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
1872
1905
  return;
@@ -1890,7 +1923,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1890
1923
  const members = Object.entries(cmpMeta.$members$);
1891
1924
  const prototype = Cstr.prototype;
1892
1925
  members.map(([memberName, [memberFlags]]) => {
1893
- if ((BUILD.prop || BUILD.state) && (memberFlags & 31 /* Prop */ || ((!BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
1926
+ if ((BUILD.prop || BUILD.state) &&
1927
+ (memberFlags & 31 /* Prop */ ||
1928
+ ((!BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
1894
1929
  // proxyComponent - prop
1895
1930
  Object.defineProperty(prototype, memberName, {
1896
1931
  get() {
@@ -1920,7 +1955,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1920
1955
  enumerable: true,
1921
1956
  });
1922
1957
  }
1923
- else if (BUILD.lazyLoad && BUILD.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1958
+ else if (BUILD.lazyLoad &&
1959
+ BUILD.method &&
1960
+ flags & 1 /* isElementConstructor */ &&
1961
+ memberFlags & 64 /* Method */) {
1924
1962
  // proxyComponent - method
1925
1963
  Object.defineProperty(prototype, memberName, {
1926
1964
  value(...args) {
@@ -1935,6 +1973,51 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1935
1973
  prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1936
1974
  plt.jmp(() => {
1937
1975
  const propName = attrNameToPropName.get(attrName);
1976
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1977
+ // in the case where an attribute was set inline.
1978
+ // ```html
1979
+ // <my-component some-attribute="some-value"></my-component>
1980
+ // ```
1981
+ //
1982
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
1983
+ // programmatically changes it before it has been upgraded as shown below:
1984
+ //
1985
+ // ```html
1986
+ // <!-- this component has _not_ been upgraded yet -->
1987
+ // <my-component id="test" some-attribute="some-value"></my-component>
1988
+ // <script>
1989
+ // // grab non-upgraded component
1990
+ // el = document.querySelector("#test");
1991
+ // el.someAttribute = "another-value";
1992
+ // // upgrade component
1993
+ // customElements.define('my-component', MyComponent);
1994
+ // </script>
1995
+ // ```
1996
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1997
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1998
+ // to the value that was set inline i.e. "some-value" from above example. When
1999
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
2000
+ //
2001
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
2002
+ // by connectedCallback as this attributeChangedCallback will not fire.
2003
+ //
2004
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
2005
+ //
2006
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
2007
+ // properties here given that this goes against best practices outlined here
2008
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
2009
+ if (this.hasOwnProperty(propName)) {
2010
+ newValue = this[propName];
2011
+ delete this[propName];
2012
+ }
2013
+ else if (prototype.hasOwnProperty(propName) &&
2014
+ typeof this[propName] === 'number' &&
2015
+ this[propName] == newValue) {
2016
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
2017
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
2018
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
2019
+ return;
2020
+ }
1938
2021
  this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1939
2022
  });
1940
2023
  };
@@ -1956,7 +2039,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1956
2039
  };
1957
2040
  const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1958
2041
  // initializeComponent
1959
- if ((BUILD.lazyLoad || BUILD.hydrateServerSide || BUILD.style) && (hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
2042
+ if ((BUILD.lazyLoad || BUILD.hydrateServerSide || BUILD.style) &&
2043
+ (hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1960
2044
  if (BUILD.lazyLoad || BUILD.hydrateClientSide) {
1961
2045
  // we haven't initialized this element yet
1962
2046
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
@@ -1974,7 +2058,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1974
2058
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1975
2059
  }
1976
2060
  if (BUILD.member && !Cstr.isProxied) {
1977
- // we'eve never proxied this Constructor before
2061
+ // we've never proxied this Constructor before
1978
2062
  // let's add the getters/setters to its prototype before
1979
2063
  // the first time we create an instance of the implementation
1980
2064
  if (BUILD.watchCallback) {
@@ -2012,7 +2096,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
2012
2096
  else {
2013
2097
  // sync constructor component
2014
2098
  Cstr = elm.constructor;
2015
- hostRef.$flags$ |= 128 /* isWatchReady */ | 32 /* hasInitializedComponent */;
2099
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
2100
+ // wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,
2101
+ // watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_
2102
+ // Stencil has completed instantiating the component.
2103
+ customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* isWatchReady */));
2016
2104
  }
2017
2105
  if (BUILD.style && Cstr.style) {
2018
2106
  // this component has styles but we haven't registered them yet
@@ -2026,8 +2114,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
2026
2114
  const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);
2027
2115
  if (!styles.has(scopeId)) {
2028
2116
  const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
2029
- if (!BUILD.hydrateServerSide && BUILD.shadowDom && BUILD.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2030
- style = await Promise.resolve().then(function () { return require('./shadow-css-6cbb23a9.js'); }).then(m => m.scopeCss(style, scopeId, false));
2117
+ if (!BUILD.hydrateServerSide &&
2118
+ BUILD.shadowDom &&
2119
+ BUILD.shadowDomShim &&
2120
+ cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2121
+ style = await Promise.resolve().then(function () { return require('./shadow-css-71d0f821.js'); }).then((m) => m.scopeCss(style, scopeId, false));
2031
2122
  }
2032
2123
  registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
2033
2124
  endRegisterStyles();
@@ -2038,7 +2129,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
2038
2129
  const ancestorComponent = hostRef.$ancestorComponent$;
2039
2130
  const schedule = () => scheduleUpdate(hostRef, true);
2040
2131
  if (BUILD.asyncLoading && ancestorComponent && ancestorComponent['s-rc']) {
2041
- // this is the intial load and this component it has an ancestor component
2132
+ // this is the initial load and this component it has an ancestor component
2042
2133
  // but the ancestor component has NOT fired its will update lifecycle yet
2043
2134
  // so let's just cool our jets and wait for the ancestor to continue first
2044
2135
  // this will get fired off when the ancestor component
@@ -2072,7 +2163,9 @@ const connectedCallback = (elm) => {
2072
2163
  hostId = elm.getAttribute(HYDRATE_ID);
2073
2164
  if (hostId) {
2074
2165
  if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2075
- const scopeId = BUILD.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode')) : addStyle(elm.shadowRoot, cmpMeta);
2166
+ const scopeId = BUILD.mode
2167
+ ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode'))
2168
+ : addStyle(elm.shadowRoot, cmpMeta);
2076
2169
  elm.classList.remove(scopeId + '-h', scopeId + '-s');
2077
2170
  }
2078
2171
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
@@ -2083,7 +2176,9 @@ const connectedCallback = (elm) => {
2083
2176
  // if the slot polyfill is required we'll need to put some nodes
2084
2177
  // in here to act as original content anchors as we move nodes around
2085
2178
  // host element has been connected to the DOM
2086
- if (BUILD.hydrateServerSide || ((BUILD.slot || BUILD.shadowDom) && cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
2179
+ if (BUILD.hydrateServerSide ||
2180
+ ((BUILD.slot || BUILD.shadowDom) &&
2181
+ cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
2087
2182
  setContentReference(elm);
2088
2183
  }
2089
2184
  }
@@ -2094,7 +2189,10 @@ const connectedCallback = (elm) => {
2094
2189
  while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
2095
2190
  // climb up the ancestors looking for the first
2096
2191
  // component that hasn't finished its lifecycle update yet
2097
- if ((BUILD.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute('s-id') && ancestorComponent['s-p']) ||
2192
+ if ((BUILD.hydrateClientSide &&
2193
+ ancestorComponent.nodeType === 1 /* ElementNode */ &&
2194
+ ancestorComponent.hasAttribute('s-id') &&
2195
+ ancestorComponent['s-p']) ||
2098
2196
  ancestorComponent['s-p']) {
2099
2197
  // we found this components first ancestor component
2100
2198
  // keep a reference to this component's ancestor component
@@ -2105,7 +2203,7 @@ const connectedCallback = (elm) => {
2105
2203
  }
2106
2204
  // Lazy properties
2107
2205
  // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
2108
- if (BUILD.prop && BUILD.lazyLoad && !BUILD.hydrateServerSide && cmpMeta.$members$) {
2206
+ if (BUILD.prop && !BUILD.hydrateServerSide && cmpMeta.$members$) {
2109
2207
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
2110
2208
  if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
2111
2209
  const value = elm[memberName];
@@ -2153,7 +2251,7 @@ const disconnectedCallback = (elm) => {
2153
2251
  const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2154
2252
  if (BUILD.hostListener) {
2155
2253
  if (hostRef.$rmListeners$) {
2156
- hostRef.$rmListeners$.map(rmListener => rmListener());
2254
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
2157
2255
  hostRef.$rmListeners$ = undefined;
2158
2256
  }
2159
2257
  }
@@ -2210,6 +2308,22 @@ const proxyCustomElement = (Cstr, compactMeta) => {
2210
2308
  originalDisconnectedCallback.call(this);
2211
2309
  }
2212
2310
  },
2311
+ __attachShadow() {
2312
+ if (supportsShadow) {
2313
+ if (BUILD.shadowDelegatesFocus) {
2314
+ this.attachShadow({
2315
+ mode: 'open',
2316
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),
2317
+ });
2318
+ }
2319
+ else {
2320
+ this.attachShadow({ mode: 'open' });
2321
+ }
2322
+ }
2323
+ else {
2324
+ this.shadowRoot = this;
2325
+ }
2326
+ },
2213
2327
  });
2214
2328
  Cstr.is = cmpMeta.$tagName$;
2215
2329
  return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
@@ -2236,14 +2350,6 @@ const forceModeUpdate = (elm) => {
2236
2350
  }
2237
2351
  }
2238
2352
  };
2239
- const attachShadow = (el) => {
2240
- if (supportsShadow) {
2241
- el.attachShadow({ mode: 'open' });
2242
- }
2243
- else {
2244
- el.shadowRoot = el;
2245
- }
2246
- };
2247
2353
  const hmrStart = (elm, cmpMeta, hmrVersionId) => {
2248
2354
  // ¯\_(ツ)_/¯
2249
2355
  const hostRef = getHostRef(elm);
@@ -2270,7 +2376,21 @@ const patchCloneNode = (HostElementPrototype) => {
2270
2376
  if (BUILD.slot && !isShadowDom && deep) {
2271
2377
  let i = 0;
2272
2378
  let slotted, nonStencilNode;
2273
- let stencilPrivates = ['s-id', 's-cr', 's-lr', 's-rc', 's-sc', 's-p', 's-cn', 's-sr', 's-sn', 's-hn', 's-ol', 's-nr', 's-si'];
2379
+ let stencilPrivates = [
2380
+ 's-id',
2381
+ 's-cr',
2382
+ 's-lr',
2383
+ 's-rc',
2384
+ 's-sc',
2385
+ 's-p',
2386
+ 's-cn',
2387
+ 's-sr',
2388
+ 's-sn',
2389
+ 's-hn',
2390
+ 's-ol',
2391
+ 's-nr',
2392
+ 's-si',
2393
+ ];
2274
2394
  for (; i < srcNode.childNodes.length; i++) {
2275
2395
  slotted = srcNode.childNodes[i]['s-nr'];
2276
2396
  nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i][privateField]);
@@ -2303,6 +2423,62 @@ const patchSlotAppendChild = (HostElementPrototype) => {
2303
2423
  return this.__appendChild(newChild);
2304
2424
  };
2305
2425
  };
2426
+ /**
2427
+ * Patches the text content of an unnamed slotted node inside a scoped component
2428
+ * @param hostElementPrototype the `Element` to be patched
2429
+ * @param cmpMeta component runtime metadata used to determine if the component should be patched or not
2430
+ */
2431
+ const patchTextContent = (hostElementPrototype, cmpMeta) => {
2432
+ if (BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2433
+ const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent');
2434
+ Object.defineProperty(hostElementPrototype, '__textContent', descriptor);
2435
+ Object.defineProperty(hostElementPrototype, 'textContent', {
2436
+ get() {
2437
+ var _a;
2438
+ // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is
2439
+ // the empty string
2440
+ const slotNode = getHostSlotNode(this.childNodes, '');
2441
+ // when a slot node is found, the textContent _may_ be found in the next sibling (text) node, depending on how
2442
+ // nodes were reordered during the vdom render. first try to get the text content from the sibling.
2443
+ if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* TEXT_NODE */) {
2444
+ return slotNode.nextSibling.textContent;
2445
+ }
2446
+ else if (slotNode) {
2447
+ return slotNode.textContent;
2448
+ }
2449
+ else {
2450
+ // fallback to the original implementation
2451
+ return this.__textContent;
2452
+ }
2453
+ },
2454
+ set(value) {
2455
+ var _a;
2456
+ // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is
2457
+ // the empty string
2458
+ const slotNode = getHostSlotNode(this.childNodes, '');
2459
+ // when a slot node is found, the textContent _may_ need to be placed in the next sibling (text) node,
2460
+ // depending on how nodes were reordered during the vdom render. first try to set the text content on the
2461
+ // sibling.
2462
+ if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* TEXT_NODE */) {
2463
+ slotNode.nextSibling.textContent = value;
2464
+ }
2465
+ else if (slotNode) {
2466
+ slotNode.textContent = value;
2467
+ }
2468
+ else {
2469
+ // we couldn't find a slot, but that doesn't mean that there isn't one. if this check ran before the DOM
2470
+ // loaded, we could have missed it. check for a content reference element on the scoped component and insert
2471
+ // it there
2472
+ this.__textContent = value;
2473
+ const contentRefElm = this['s-cr'];
2474
+ if (contentRefElm) {
2475
+ this.insertBefore(contentRefElm, this.firstChild);
2476
+ }
2477
+ }
2478
+ },
2479
+ });
2480
+ }
2481
+ };
2306
2482
  const patchChildSlotNodes = (elm, cmpMeta) => {
2307
2483
  class FakeNodeList extends Array {
2308
2484
  item(n) {
@@ -2324,7 +2500,8 @@ const patchChildSlotNodes = (elm, cmpMeta) => {
2324
2500
  Object.defineProperty(elm, 'childNodes', {
2325
2501
  get() {
2326
2502
  const childNodes = childNodesFn.call(this);
2327
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2503
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 &&
2504
+ getHostRef(this).$flags$ & 2 /* hasRendered */) {
2328
2505
  const result = new FakeNodeList();
2329
2506
  for (let i = 0; i < childNodes.length; i++) {
2330
2507
  const slot = childNodes[i]['s-nr'];
@@ -2340,6 +2517,12 @@ const patchChildSlotNodes = (elm, cmpMeta) => {
2340
2517
  }
2341
2518
  };
2342
2519
  const getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';
2520
+ /**
2521
+ * Recursively searches a series of child nodes for a slot with the provided name.
2522
+ * @param childNodes the nodes to search for a slot with a specific name.
2523
+ * @param slotName the name of the slot to match on.
2524
+ * @returns a reference to the slot node that matches the provided name, `null` otherwise
2525
+ */
2343
2526
  const getHostSlotNode = (childNodes, slotName) => {
2344
2527
  let i = 0;
2345
2528
  let childNode;
@@ -2396,98 +2579,105 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2396
2579
  registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
2397
2580
  }
2398
2581
  }
2399
- lazyBundles.map(lazyBundle => lazyBundle[1].map(compactMeta => {
2400
- const cmpMeta = {
2401
- $flags$: compactMeta[0],
2402
- $tagName$: compactMeta[1],
2403
- $members$: compactMeta[2],
2404
- $listeners$: compactMeta[3],
2405
- };
2406
- if (BUILD.member) {
2407
- cmpMeta.$members$ = compactMeta[2];
2408
- }
2409
- if (BUILD.hostListener) {
2410
- cmpMeta.$listeners$ = compactMeta[3];
2411
- }
2412
- if (BUILD.reflect) {
2413
- cmpMeta.$attrsToReflect$ = [];
2414
- }
2415
- if (BUILD.watchCallback) {
2416
- cmpMeta.$watchers$ = {};
2417
- }
2418
- if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2419
- cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2420
- }
2421
- const tagName = BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
2422
- const HostElement = class extends HTMLElement {
2423
- // StencilLazyHost
2424
- constructor(self) {
2425
- // @ts-ignore
2426
- super(self);
2427
- self = this;
2428
- registerHost(self, cmpMeta);
2429
- if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2430
- // this component is using shadow dom
2431
- // and this browser supports shadow dom
2432
- // add the read-only property "shadowRoot" to the host element
2433
- // adding the shadow root build conditionals to minimize runtime
2434
- if (supportsShadow) {
2435
- if (BUILD.shadowDelegatesFocus) {
2436
- self.attachShadow({
2437
- mode: 'open',
2438
- delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),
2439
- });
2582
+ lazyBundles.map((lazyBundle) => {
2583
+ lazyBundle[1].map((compactMeta) => {
2584
+ const cmpMeta = {
2585
+ $flags$: compactMeta[0],
2586
+ $tagName$: compactMeta[1],
2587
+ $members$: compactMeta[2],
2588
+ $listeners$: compactMeta[3],
2589
+ };
2590
+ if (BUILD.member) {
2591
+ cmpMeta.$members$ = compactMeta[2];
2592
+ }
2593
+ if (BUILD.hostListener) {
2594
+ cmpMeta.$listeners$ = compactMeta[3];
2595
+ }
2596
+ if (BUILD.reflect) {
2597
+ cmpMeta.$attrsToReflect$ = [];
2598
+ }
2599
+ if (BUILD.watchCallback) {
2600
+ cmpMeta.$watchers$ = {};
2601
+ }
2602
+ if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2603
+ cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2604
+ }
2605
+ const tagName = BUILD.transformTagName && options.transformTagName
2606
+ ? options.transformTagName(cmpMeta.$tagName$)
2607
+ : cmpMeta.$tagName$;
2608
+ const HostElement = class extends HTMLElement {
2609
+ // StencilLazyHost
2610
+ constructor(self) {
2611
+ // @ts-ignore
2612
+ super(self);
2613
+ self = this;
2614
+ registerHost(self, cmpMeta);
2615
+ if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2616
+ // this component is using shadow dom
2617
+ // and this browser supports shadow dom
2618
+ // add the read-only property "shadowRoot" to the host element
2619
+ // adding the shadow root build conditionals to minimize runtime
2620
+ if (supportsShadow) {
2621
+ if (BUILD.shadowDelegatesFocus) {
2622
+ self.attachShadow({
2623
+ mode: 'open',
2624
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),
2625
+ });
2626
+ }
2627
+ else {
2628
+ self.attachShadow({ mode: 'open' });
2629
+ }
2440
2630
  }
2441
- else {
2442
- self.attachShadow({ mode: 'open' });
2631
+ else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {
2632
+ self.shadowRoot = self;
2443
2633
  }
2444
2634
  }
2445
- else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {
2446
- self.shadowRoot = self;
2635
+ if (BUILD.slotChildNodesFix) {
2636
+ patchChildSlotNodes(self, cmpMeta);
2447
2637
  }
2448
2638
  }
2449
- if (BUILD.slotChildNodesFix) {
2450
- patchChildSlotNodes(self, cmpMeta);
2451
- }
2452
- }
2453
- connectedCallback() {
2454
- if (appLoadFallback) {
2455
- clearTimeout(appLoadFallback);
2456
- appLoadFallback = null;
2639
+ connectedCallback() {
2640
+ if (appLoadFallback) {
2641
+ clearTimeout(appLoadFallback);
2642
+ appLoadFallback = null;
2643
+ }
2644
+ if (isBootstrapping) {
2645
+ // connectedCallback will be processed once all components have been registered
2646
+ deferredConnectedCallbacks.push(this);
2647
+ }
2648
+ else {
2649
+ plt.jmp(() => connectedCallback(this));
2650
+ }
2457
2651
  }
2458
- if (isBootstrapping) {
2459
- // connectedCallback will be processed once all components have been registered
2460
- deferredConnectedCallbacks.push(this);
2652
+ disconnectedCallback() {
2653
+ plt.jmp(() => disconnectedCallback(this));
2461
2654
  }
2462
- else {
2463
- plt.jmp(() => connectedCallback(this));
2655
+ componentOnReady() {
2656
+ return getHostRef(this).$onReadyPromise$;
2464
2657
  }
2658
+ };
2659
+ if (BUILD.cloneNodeFix) {
2660
+ patchCloneNode(HostElement.prototype);
2465
2661
  }
2466
- disconnectedCallback() {
2467
- plt.jmp(() => disconnectedCallback(this));
2662
+ if (BUILD.appendChildSlotFix) {
2663
+ patchSlotAppendChild(HostElement.prototype);
2468
2664
  }
2469
- componentOnReady() {
2470
- return getHostRef(this).$onReadyPromise$;
2665
+ if (BUILD.hotModuleReplacement) {
2666
+ HostElement.prototype['s-hmr'] = function (hmrVersionId) {
2667
+ hmrStart(this, cmpMeta, hmrVersionId);
2668
+ };
2471
2669
  }
2472
- };
2473
- if (BUILD.cloneNodeFix) {
2474
- patchCloneNode(HostElement.prototype);
2475
- }
2476
- if (BUILD.appendChildSlotFix) {
2477
- patchSlotAppendChild(HostElement.prototype);
2478
- }
2479
- if (BUILD.hotModuleReplacement) {
2480
- HostElement.prototype['s-hmr'] = function (hmrVersionId) {
2481
- hmrStart(this, cmpMeta, hmrVersionId);
2482
- };
2483
- }
2484
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
2485
- if (!exclude.includes(tagName) && !customElements.get(tagName)) {
2486
- cmpTags.push(tagName);
2487
- customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
2488
- }
2489
- }));
2490
- if (BUILD.hydratedClass || BUILD.hydratedAttribute) {
2670
+ if (BUILD.scopedSlotTextContentFix) {
2671
+ patchTextContent(HostElement.prototype, cmpMeta);
2672
+ }
2673
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
2674
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
2675
+ cmpTags.push(tagName);
2676
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
2677
+ }
2678
+ });
2679
+ });
2680
+ if (BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)) {
2491
2681
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
2492
2682
  visibilityStyle.setAttribute('data-styles', '');
2493
2683
  head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
@@ -2495,7 +2685,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2495
2685
  // Process deferred connectedCallbacks now all components have been registered
2496
2686
  isBootstrapping = false;
2497
2687
  if (deferredConnectedCallbacks.length) {
2498
- deferredConnectedCallbacks.map(host => host.connectedCallback());
2688
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
2499
2689
  }
2500
2690
  else {
2501
2691
  if (BUILD.profile) {
@@ -2523,7 +2713,7 @@ const getConnect = (_ref, tagName) => {
2523
2713
  return typeof elm.componentOnReady === 'function' ? elm.componentOnReady() : Promise.resolve(elm);
2524
2714
  };
2525
2715
  const create = (...args) => {
2526
- return componentOnReady().then(el => el.create(...args));
2716
+ return componentOnReady().then((el) => el.create(...args));
2527
2717
  };
2528
2718
  return {
2529
2719
  create,
@@ -2571,7 +2761,7 @@ const insertVdomAnnotations = (doc, staticComponents) => {
2571
2761
  };
2572
2762
  const orgLocationNodes = [];
2573
2763
  parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);
2574
- orgLocationNodes.forEach(orgLocationNode => {
2764
+ orgLocationNodes.forEach((orgLocationNode) => {
2575
2765
  if (orgLocationNode != null) {
2576
2766
  const nodeRef = orgLocationNode['s-nr'];
2577
2767
  let hostId = nodeRef['s-host-id'];
@@ -2628,7 +2818,7 @@ const parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
2628
2818
  orgLocationNodes.push(node);
2629
2819
  }
2630
2820
  if (node.nodeType === 1 /* ElementNode */) {
2631
- node.childNodes.forEach(childNode => {
2821
+ node.childNodes.forEach((childNode) => {
2632
2822
  const hostRef = getHostRef(childNode);
2633
2823
  if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {
2634
2824
  const cmpData = {
@@ -2657,7 +2847,7 @@ const insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
2657
2847
  const parent = hostElm.parentElement;
2658
2848
  if (parent && parent.childNodes) {
2659
2849
  const parentChildNodes = Array.from(parent.childNodes);
2660
- const comment = parentChildNodes.find(node => node.nodeType === 8 /* CommentNode */ && node['s-sr']);
2850
+ const comment = parentChildNodes.find((node) => node.nodeType === 8 /* CommentNode */ && node['s-sr']);
2661
2851
  if (comment) {
2662
2852
  const index = parentChildNodes.indexOf(hostElm) - 1;
2663
2853
  vnode.$elm$.setAttribute(HYDRATE_CHILD_ID, `${comment['s-host-id']}.${comment['s-node-id']}.0.${index}`);
@@ -2717,10 +2907,10 @@ const registerHost = (elm, cmpMeta) => {
2717
2907
  hostRef.$renderCount$ = 0;
2718
2908
  }
2719
2909
  if (BUILD.method && BUILD.lazyLoad) {
2720
- hostRef.$onInstancePromise$ = new Promise(r => (hostRef.$onInstanceResolve$ = r));
2910
+ hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
2721
2911
  }
2722
2912
  if (BUILD.asyncLoading) {
2723
- hostRef.$onReadyPromise$ = new Promise(r => (hostRef.$onReadyResolve$ = r));
2913
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
2724
2914
  elm['s-p'] = [];
2725
2915
  elm['s-rc'] = [];
2726
2916
  }
@@ -2731,11 +2921,14 @@ const isMemberInElement = (elm, memberName) => memberName in elm;
2731
2921
  const consoleError = (e, el) => (customError || console.error)(e, el);
2732
2922
  const STENCIL_DEV_MODE = BUILD.isTesting
2733
2923
  ? ['STENCIL:'] // E2E testing
2734
- : ['%cstencil', 'color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px'];
2924
+ : [
2925
+ '%cstencil',
2926
+ 'color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px',
2927
+ ];
2735
2928
  const consoleDevError = (...m) => console.error(...STENCIL_DEV_MODE, ...m);
2736
2929
  const consoleDevWarn = (...m) => console.warn(...STENCIL_DEV_MODE, ...m);
2737
2930
  const consoleDevInfo = (...m) => console.info(...STENCIL_DEV_MODE, ...m);
2738
- const setErrorHandler = (handler) => customError = handler;
2931
+ const setErrorHandler = (handler) => (customError = handler);
2739
2932
  const cmpModules = /*@__PURE__*/ new Map();
2740
2933
  const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2741
2934
  // loadModuleImport
@@ -2753,7 +2946,7 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2753
2946
  /* webpackInclude: /\.entry\.js$/ */
2754
2947
  /* webpackExclude: /\.system\.entry\.js$/ */
2755
2948
  /* webpackMode: "lazy" */
2756
- `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? '?s-hmr=' + hmrVersionId : ''}`)); }).then(importedModule => {
2949
+ `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? '?s-hmr=' + hmrVersionId : ''}`)); }).then((importedModule) => {
2757
2950
  if (!BUILD.hotModuleReplacement) {
2758
2951
  cmpModules.set(bundleId, importedModule);
2759
2952
  }
@@ -2816,7 +3009,9 @@ const flush = () => {
2816
3009
  consume(queueDomReads);
2817
3010
  // DOM WRITES!!!
2818
3011
  if (BUILD.asyncQueue) {
2819
- const timeout = (plt.$flags$ & 6 /* queueMask */) === 2 /* appLoaded */ ? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0)) : Infinity;
3012
+ const timeout = (plt.$flags$ & 6 /* queueMask */) === 2 /* appLoaded */
3013
+ ? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0))
3014
+ : Infinity;
2820
3015
  consumeTimeout(queueDomWrites, timeout);
2821
3016
  consumeTimeout(queueDomWritesLow, timeout);
2822
3017
  if (queueDomWrites.length > 0) {