@amwaljs/checkout-button 0.3.1 → 0.3.2

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 (888) hide show
  1. package/README.md +1 -1
  2. package/dist/checkout/checkout.esm.js +1 -1
  3. package/dist/checkout/{p-c03b6161.entry.js → p-00045a8c.entry.js} +1 -1
  4. package/dist/checkout/p-01bbe74f.entry.js +1 -0
  5. package/dist/checkout/p-051412fa.entry.js +1 -0
  6. package/dist/checkout/p-09cbe586.entry.js +4 -0
  7. package/dist/checkout/{p-439ad699.entry.js → p-0a85a01f.entry.js} +2 -2
  8. package/dist/checkout/{p-d5652cd4.entry.js → p-0bbfeb3c.entry.js} +1 -1
  9. package/dist/checkout/{p-4ae1a390.entry.js → p-0d96b482.entry.js} +1 -1
  10. package/dist/checkout/{p-DUa_5Mmb.js → p-0f03cd28.js} +2 -2
  11. package/dist/checkout/p-104d7733.entry.js +1 -0
  12. package/dist/checkout/{p-8036cf49.entry.js → p-10ad151a.entry.js} +5 -5
  13. package/dist/checkout/p-112455b1.js +1 -0
  14. package/dist/checkout/p-11beffea.entry.js +1 -0
  15. package/dist/checkout/p-13245fd4.js +1 -0
  16. package/dist/checkout/p-13741a94.entry.js +1 -0
  17. package/dist/checkout/p-14ea2c82.entry.js +1 -0
  18. package/dist/checkout/p-167dc7a7.entry.js +4 -0
  19. package/dist/checkout/p-1a749b59.entry.js +1 -0
  20. package/dist/checkout/p-1c718939.entry.js +1 -0
  21. package/dist/checkout/{p-11205aeb.entry.js → p-1cbb13f2.entry.js} +1 -1
  22. package/dist/checkout/{p-46ff73b3.entry.js → p-20df5234.entry.js} +1 -1
  23. package/dist/checkout/p-24068b1c.entry.js +1 -0
  24. package/dist/checkout/{p-7006753a.entry.js → p-28ccecc7.entry.js} +2 -2
  25. package/dist/checkout/p-361649c3.js +4 -0
  26. package/dist/{components/p-DoR35tr_.js → checkout/p-39ad94cf.js} +2 -2
  27. package/dist/checkout/p-3b75b22a.js +5 -0
  28. package/dist/checkout/p-3b80783d.js +8 -0
  29. package/dist/checkout/p-3d3eefc3.js +4 -0
  30. package/dist/checkout/p-3e1e3453.js +4 -0
  31. package/dist/checkout/p-3e681e57.js +4 -0
  32. package/dist/checkout/{p-bf933eb6.entry.js → p-3e8da476.entry.js} +1 -1
  33. package/dist/checkout/{p-1dc08181.entry.js → p-4028c0d2.entry.js} +1 -1
  34. package/dist/checkout/p-44c91c42.entry.js +1 -0
  35. package/dist/checkout/p-464f5a60.entry.js +1 -0
  36. package/dist/checkout/p-46b7ee7f.entry.js +1 -0
  37. package/dist/checkout/p-48784250.entry.js +1 -0
  38. package/dist/{components/p-wiOwkFtc.js → checkout/p-4be20bf2.js} +1 -1
  39. package/dist/{components/p-Dl_WhQZu.js → checkout/p-4f78d3a0.js} +2 -2
  40. package/dist/checkout/{p-4da4ecc4.entry.js → p-529bce3f.entry.js} +1 -1
  41. package/dist/checkout/p-536a0294.js +4 -0
  42. package/dist/checkout/{p-eae2d3f2.entry.js → p-5eecd5ef.entry.js} +1 -1
  43. package/dist/checkout/p-64257c8d.entry.js +1 -0
  44. package/dist/checkout/{p-5903b3af.entry.js → p-64bd1dd3.entry.js} +1 -1
  45. package/dist/checkout/{p-9b7d7231.entry.js → p-68a4caba.entry.js} +1 -1
  46. package/dist/checkout/{p-978b3762.entry.js → p-69242ed6.entry.js} +1 -1
  47. package/dist/checkout/{p-62b7c8b0.entry.js → p-6d886d7e.entry.js} +1 -1
  48. package/dist/checkout/{p-ofaUly0p.js → p-6fa979e3.js} +2 -2
  49. package/dist/checkout/p-6fb474f3.entry.js +1 -0
  50. package/dist/checkout/p-77104220.js +7 -0
  51. package/dist/checkout/{p-aba43d04.entry.js → p-79ec3e4b.entry.js} +1 -1
  52. package/dist/checkout/{p-cd2c344b.entry.js → p-7b51bf67.entry.js} +2 -2
  53. package/dist/checkout/p-7f0004c9.js +4 -0
  54. package/dist/checkout/p-7fe50ab4.entry.js +1 -0
  55. package/dist/checkout/p-880b451c.entry.js +4 -0
  56. package/dist/checkout/p-886dad62.entry.js +1 -0
  57. package/dist/checkout/p-886e8746.entry.js +1 -0
  58. package/dist/checkout/p-88abdf59.js +4 -0
  59. package/dist/checkout/{p-f845e91b.entry.js → p-8a97a411.entry.js} +1 -1
  60. package/dist/checkout/p-8af3c6cc.entry.js +1 -0
  61. package/dist/checkout/{p-8b015c21.entry.js → p-8c022f5d.entry.js} +1 -1
  62. package/dist/checkout/{p-56e307eb.entry.js → p-91855eae.entry.js} +1 -1
  63. package/dist/checkout/{p-ca257d45.entry.js → p-9185e55b.entry.js} +1 -1
  64. package/dist/checkout/{p-4b34896c.entry.js → p-926eda98.entry.js} +1 -1
  65. package/dist/checkout/p-93e5b313.entry.js +4 -0
  66. package/dist/checkout/{p-4a86b731.entry.js → p-97024acb.entry.js} +1 -1
  67. package/dist/checkout/p-99e447f9.js +1 -0
  68. package/dist/{components/p-BgOwfqIY.js → checkout/p-9b519de5.js} +2 -2
  69. package/dist/checkout/{p-b8245f6a.entry.js → p-9b65a6e5.entry.js} +1 -1
  70. package/dist/checkout/{p-53ae9dd0.entry.js → p-9cc1fdfb.entry.js} +1 -1
  71. package/dist/checkout/{p-8fc1287a.entry.js → p-9f26fb71.entry.js} +1 -1
  72. package/dist/checkout/p-9f41a631.entry.js +1 -0
  73. package/dist/checkout/{p-5f005b5e.entry.js → p-a2ce8858.entry.js} +1 -1
  74. package/dist/checkout/{p-e4d0702d.entry.js → p-a3fca65c.entry.js} +1 -1
  75. package/dist/checkout/{p-d370e756.entry.js → p-a6056eb1.entry.js} +2 -2
  76. package/dist/checkout/{p-c929d6ea.entry.js → p-a7b2cbb9.entry.js} +1 -1
  77. package/dist/{components/p-Dwo-QLgs.js → checkout/p-ab16e6ce.js} +1 -1
  78. package/dist/checkout/{p-63db3363.entry.js → p-ab9a18c4.entry.js} +1 -1
  79. package/dist/checkout/p-b038db20.js +4 -0
  80. package/dist/checkout/p-b4ad8642.entry.js +1 -0
  81. package/dist/checkout/p-b4cf78ad.entry.js +1 -0
  82. package/dist/checkout/p-b7be2ec0.js +4 -0
  83. package/dist/checkout/p-b84d9e44.js +4 -0
  84. package/dist/{components/p-CwRU9ccI.js → checkout/p-b8fdd517.js} +1 -1
  85. package/dist/checkout/{p-d799009b.entry.js → p-b9d8ab12.entry.js} +1 -1
  86. package/dist/checkout/p-bb1f698e.js +4 -0
  87. package/dist/checkout/p-bd17be25.js +4 -0
  88. package/dist/checkout/p-bd4df0bc.entry.js +1 -0
  89. package/dist/checkout/p-c152bdea.js +4 -0
  90. package/dist/checkout/{p-f22v7XAM.js → p-c30e2b28.js} +2 -2
  91. package/dist/checkout/{p-c2296aa1.entry.js → p-c61a3d5d.entry.js} +1 -1
  92. package/dist/checkout/p-c6ee4bb6.entry.js +1 -0
  93. package/dist/checkout/p-c771a565.entry.js +1 -0
  94. package/dist/checkout/{p-3c9a8bee.entry.js → p-c82b2823.entry.js} +1 -1
  95. package/dist/checkout/p-c8f7d1b5.entry.js +1 -0
  96. package/dist/checkout/p-ceef30cd.entry.js +1 -0
  97. package/dist/checkout/p-d5733333.entry.js +1 -0
  98. package/dist/checkout/p-d5bba69c.entry.js +1 -0
  99. package/dist/checkout/p-d60b2328.js +4 -0
  100. package/dist/checkout/p-d60e05e2.entry.js +1 -0
  101. package/dist/checkout/p-d6b04157.entry.js +1 -0
  102. package/dist/checkout/p-d7a430bf.js +2 -0
  103. package/dist/checkout/{p-B3WORC1a.js → p-d839c693.js} +1 -1
  104. package/dist/checkout/{p-141f2eab.entry.js → p-d9dfb3ae.entry.js} +3 -3
  105. package/dist/checkout/p-dc51d318.js +5 -0
  106. package/dist/checkout/p-ddbe30b8.entry.js +1 -0
  107. package/dist/checkout/p-de418dd1.entry.js +1 -0
  108. package/dist/checkout/{p-b4000357.entry.js → p-defa5f72.entry.js} +2 -2
  109. package/dist/checkout/{p-b90c064e.entry.js → p-df0fa5e1.entry.js} +2 -2
  110. package/dist/checkout/{p-c8740acc.entry.js → p-e0f073f1.entry.js} +3 -3
  111. package/dist/checkout/p-e237d611.entry.js +1 -0
  112. package/dist/checkout/p-ea71fb8d.entry.js +1 -0
  113. package/dist/checkout/{p-95563c4c.entry.js → p-eda93a0b.entry.js} +1 -1
  114. package/dist/checkout/p-eee05053.entry.js +1 -0
  115. package/dist/checkout/{p-95431a73.entry.js → p-f8460dc4.entry.js} +1 -1
  116. package/dist/checkout/p-f875507d.entry.js +1 -0
  117. package/dist/checkout/p-faf06441.js +4 -0
  118. package/dist/checkout/p-fb147065.entry.js +1 -0
  119. package/dist/checkout/{p-af32124b.entry.js → p-fb45cdd1.entry.js} +1 -1
  120. package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
  121. package/dist/cjs/amwal-checkout-button_5.cjs.entry.js +1298 -2881
  122. package/dist/cjs/amwal-installments-guide.cjs.entry.js +42 -43
  123. package/dist/cjs/amwal-pos.cjs.entry.js +3180 -3452
  124. package/dist/cjs/amwal-widget-modal.cjs.entry.js +162 -175
  125. package/dist/cjs/amwal-widget.cjs.entry.js +314 -343
  126. package/dist/cjs/{animation-BhN-MT4J.js → animation-26241cb2.js} +2 -2
  127. package/dist/cjs/{app-globals-NtXImkuk.js → app-globals-42a13029.js} +1 -1
  128. package/dist/cjs/{ar-CbT6TM-Q.js → ar-3a6829a4.js} +10 -4
  129. package/dist/cjs/{capacitor-CqhugS19.js → capacitor-a9365f60.js} +1 -1
  130. package/dist/cjs/checkout.cjs.js +19 -16
  131. package/dist/cjs/{data-UgkxeXMB.js → data-19081291.js} +1 -1
  132. package/dist/cjs/{form-controller-DRf0gBOg.js → form-controller-3ffb27b1.js} +1 -1
  133. package/dist/cjs/{framework-delegate-D-6PUvOi.js → framework-delegate-ab2cc190.js} +1 -1
  134. package/dist/cjs/{gesture-controller-IMq9Cgi2.js → gesture-controller-b1c0efac.js} +1 -1
  135. package/dist/cjs/{haptic-CC9tl6g8.js → haptic-80174512.js} +1 -1
  136. package/dist/cjs/{hardware-back-button-C2D2eOk8.js → hardware-back-button-ddfefd22.js} +3 -3
  137. package/dist/cjs/{helpers-B4vhh9gt.js → helpers-72ba682d.js} +4 -1
  138. package/dist/cjs/i18n-18ad02d5.js +13 -0
  139. package/dist/cjs/{index-CKcQE8Zg.js → index-0d0b84fb.js} +4 -3
  140. package/dist/cjs/{index-6eOg4xTk.js → index-2602a653.js} +0 -1
  141. package/dist/cjs/{index-DZA7ogU0.js → index-2cd1a895.js} +4 -4
  142. package/dist/cjs/index-7522b3a9.js +2256 -0
  143. package/dist/cjs/{index-bc_r9XRf.js → index-9b7d2c31.js} +9 -9
  144. package/dist/cjs/{index-q1ImtF5k.js → index-ce06e6a3.js} +3 -3
  145. package/dist/cjs/{index-XMjUjboS.js → index-da554121.js} +3 -3
  146. package/dist/cjs/{input-shims-CCRbO2DB.js → input-shims-1a8ed779.js} +6 -6
  147. package/dist/cjs/{input.utils-CyVgmmWQ.js → input.utils-67143876.js} +3 -3
  148. package/dist/cjs/ion-accordion-group.cjs.entry.js +199 -203
  149. package/dist/cjs/ion-accordion.cjs.entry.js +305 -305
  150. package/dist/cjs/ion-action-sheet_3.cjs.entry.js +695 -705
  151. package/dist/cjs/ion-app.cjs.entry.js +95 -93
  152. package/dist/cjs/ion-avatar.cjs.entry.js +14 -12
  153. package/dist/cjs/ion-back-button.cjs.entry.js +78 -76
  154. package/dist/cjs/ion-backdrop.cjs.entry.js +44 -42
  155. package/dist/cjs/ion-badge.cjs.entry.js +19 -17
  156. package/dist/cjs/ion-breadcrumb.cjs.entry.js +86 -84
  157. package/dist/cjs/ion-breadcrumbs.cjs.entry.js +120 -124
  158. package/dist/cjs/ion-buttons_3.cjs.entry.js +822 -822
  159. package/dist/cjs/ion-card-content.cjs.entry.js +19 -17
  160. package/dist/cjs/ion-card-header.cjs.entry.js +22 -20
  161. package/dist/cjs/ion-card-subtitle.cjs.entry.js +20 -18
  162. package/dist/cjs/ion-card-title.cjs.entry.js +20 -18
  163. package/dist/cjs/ion-card.cjs.entry.js +55 -53
  164. package/dist/cjs/ion-checkbox_7.cjs.entry.js +862 -882
  165. package/dist/cjs/ion-chip.cjs.entry.js +24 -22
  166. package/dist/cjs/ion-col.cjs.entry.js +110 -108
  167. package/dist/cjs/ion-content.cjs.entry.js +376 -374
  168. package/dist/cjs/ion-datetime-button.cjs.entry.js +330 -328
  169. package/dist/cjs/ion-datetime.cjs.entry.js +1547 -1567
  170. package/dist/cjs/ion-fab-button.cjs.entry.js +78 -76
  171. package/dist/cjs/ion-fab-list.cjs.entry.js +31 -31
  172. package/dist/cjs/ion-fab.cjs.entry.js +58 -58
  173. package/dist/cjs/ion-footer.cjs.entry.js +94 -92
  174. package/dist/cjs/ion-grid.cjs.entry.js +17 -15
  175. package/dist/cjs/ion-header.cjs.entry.js +143 -141
  176. package/dist/cjs/ion-icon.cjs.entry.js +104 -112
  177. package/dist/cjs/ion-img.cjs.entry.js +83 -83
  178. package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +34 -32
  179. package/dist/cjs/ion-infinite-scroll.cjs.entry.js +174 -176
  180. package/dist/cjs/ion-input.cjs.entry.js +447 -453
  181. package/dist/cjs/ion-item-divider.cjs.entry.js +23 -21
  182. package/dist/cjs/ion-item-group.cjs.entry.js +20 -18
  183. package/dist/cjs/ion-item-option.cjs.entry.js +45 -43
  184. package/dist/cjs/ion-item-options.cjs.entry.js +40 -38
  185. package/dist/cjs/ion-item-sliding.cjs.entry.js +391 -391
  186. package/dist/cjs/ion-loading.cjs.entry.js +162 -164
  187. package/dist/cjs/ion-menu-button.cjs.entry.js +60 -58
  188. package/dist/cjs/ion-menu-toggle.cjs.entry.js +36 -34
  189. package/dist/cjs/ion-menu.cjs.entry.js +606 -612
  190. package/dist/cjs/ion-modal.cjs.entry.js +551 -553
  191. package/dist/cjs/ion-nav-link.cjs.entry.js +17 -15
  192. package/dist/cjs/ion-nav.cjs.entry.js +823 -825
  193. package/dist/cjs/ion-note.cjs.entry.js +19 -17
  194. package/dist/cjs/ion-picker-column.cjs.entry.js +327 -327
  195. package/dist/cjs/ion-picker.cjs.entry.js +198 -200
  196. package/dist/cjs/ion-popover.cjs.entry.js +326 -330
  197. package/dist/cjs/ion-progress-bar.cjs.entry.js +44 -42
  198. package/dist/cjs/ion-range.cjs.entry.js +644 -654
  199. package/dist/cjs/ion-refresher-content.cjs.entry.js +53 -51
  200. package/dist/cjs/ion-refresher.cjs.entry.js +586 -586
  201. package/dist/cjs/ion-reorder-group.cjs.entry.js +252 -252
  202. package/dist/cjs/ion-reorder.cjs.entry.js +26 -24
  203. package/dist/cjs/ion-route-redirect.cjs.entry.js +19 -21
  204. package/dist/cjs/ion-route.cjs.entry.js +37 -41
  205. package/dist/cjs/ion-router-link.cjs.entry.js +31 -29
  206. package/dist/cjs/ion-router-outlet.cjs.entry.js +178 -178
  207. package/dist/cjs/ion-router.cjs.entry.js +266 -264
  208. package/dist/cjs/ion-row.cjs.entry.js +12 -10
  209. package/dist/cjs/ion-searchbar.cjs.entry.js +388 -396
  210. package/dist/cjs/ion-segment-button.cjs.entry.js +96 -96
  211. package/dist/cjs/ion-segment.cjs.entry.js +414 -420
  212. package/dist/cjs/ion-select-option.cjs.entry.js +16 -14
  213. package/dist/cjs/ion-select.cjs.entry.js +693 -699
  214. package/dist/cjs/ion-skeleton-text.cjs.entry.js +35 -33
  215. package/dist/cjs/ion-spinner.cjs.entry.js +50 -48
  216. package/dist/cjs/ion-split-pane.cjs.entry.js +120 -124
  217. package/dist/cjs/ion-tab-bar.cjs.entry.js +66 -66
  218. package/dist/cjs/ion-tab-button.cjs.entry.js +82 -80
  219. package/dist/cjs/ion-tab.cjs.entry.js +50 -50
  220. package/dist/cjs/ion-tabs.cjs.entry.js +134 -132
  221. package/dist/cjs/ion-textarea.cjs.entry.js +396 -400
  222. package/dist/cjs/ion-thumbnail.cjs.entry.js +12 -10
  223. package/dist/cjs/ion-title.cjs.entry.js +43 -43
  224. package/dist/cjs/ion-toast.cjs.entry.js +371 -375
  225. package/dist/cjs/ion-toggle.cjs.entry.js +230 -230
  226. package/dist/cjs/ion-toolbar.cjs.entry.js +61 -59
  227. package/dist/cjs/{ionic-global-DRLi5Iq3.js → ionic-global-3915f1f1.js} +55 -58
  228. package/dist/cjs/{ios.transition-D4vyO_a_.js → ios.transition-b9c0b967.js} +5 -5
  229. package/dist/cjs/{keyboard-iyHR2ZF4.js → keyboard-5d4b83b3.js} +3 -3
  230. package/dist/cjs/{keyboard-DuKzsHsS.js → keyboard-bc8ebbf7.js} +1 -1
  231. package/dist/cjs/{keyboard-controller-rH21qC_2.js → keyboard-controller-c6633754.js} +2 -2
  232. package/dist/cjs/loader.cjs.js +19 -8
  233. package/dist/cjs/{md.transition-Dkxy3kpE.js → md.transition-830acbb7.js} +5 -5
  234. package/dist/cjs/{menu-toggle-util-CmPuayU0.js → menu-toggle-util-315c26b3.js} +1 -1
  235. package/dist/cjs/{notch-controller-Dtpow1eD.js → notch-controller-dcf09601.js} +2 -2
  236. package/dist/cjs/{overlays-Bc8tk6t5.js → overlays-08819e3f.js} +6 -6
  237. package/dist/cjs/{refresher.utils-CPl6gciv.js → refresher.utils-e41509f7.js} +3 -3
  238. package/dist/cjs/{status-tap-XtIhF72O.js → status-tap-ec021cb4.js} +4 -4
  239. package/dist/cjs/{swipe-back-C9j0kufI.js → swipe-back-3d3a5129.js} +4 -4
  240. package/dist/collection/collection-manifest.json +8 -8
  241. package/dist/collection/components/amwal-checkout-button/amwal-checkout-button.js +1714 -1888
  242. package/dist/collection/components/amwal-checkout-button/amwal-checkout-button.stories.js +84 -84
  243. package/dist/collection/components/amwal-installments-guide/amwal-installments-guide.js +75 -80
  244. package/dist/collection/components/amwal-installments-guide/amwal-installments-guide.stories.js +25 -25
  245. package/dist/collection/components/amwal-installments-timeline/amwal-installments-timeline.js +506 -569
  246. package/dist/collection/components/amwal-installments-timeline/amwal-installments-timeline.stories.js +80 -80
  247. package/dist/collection/components/amwal-pos/amwal-pos.js +1022 -1094
  248. package/dist/collection/components/amwal-pos/amwal-pos.stories.js +209 -209
  249. package/dist/collection/components/amwal-widget/amwal-widget-modal.js +326 -350
  250. package/dist/collection/components/amwal-widget/amwal-widget.js +673 -736
  251. package/dist/collection/components/amwal-widget/amwal-widget.stories.js +184 -184
  252. package/dist/collection/lang/i18n.js +7 -7
  253. package/dist/components/amwal-checkout-button.d.ts +2 -2
  254. package/dist/components/amwal-checkout-button.js +3811 -1
  255. package/dist/components/amwal-installments-guide.d.ts +2 -2
  256. package/dist/components/amwal-installments-guide.js +75 -1
  257. package/dist/components/amwal-installments-timeline.d.ts +2 -2
  258. package/dist/components/amwal-installments-timeline.js +6 -1
  259. package/dist/components/amwal-pos.d.ts +2 -2
  260. package/dist/components/amwal-pos.js +3391 -1
  261. package/dist/components/amwal-widget-modal.d.ts +2 -2
  262. package/dist/components/amwal-widget-modal.js +6 -1
  263. package/dist/components/amwal-widget.d.ts +2 -2
  264. package/dist/components/amwal-widget.js +389 -1
  265. package/dist/components/index.d.ts +0 -6
  266. package/dist/components/index.js +6 -1
  267. package/dist/components/ion-accordion-group.js +248 -1
  268. package/dist/components/ion-accordion.js +353 -1
  269. package/dist/components/ion-action-sheet.js +6 -1
  270. package/dist/components/ion-alert.js +6 -1
  271. package/dist/components/ion-app.js +125 -1
  272. package/dist/components/ion-avatar.js +39 -1
  273. package/dist/components/ion-back-button.js +127 -1
  274. package/dist/components/ion-backdrop.js +6 -1
  275. package/dist/components/ion-badge.js +46 -1
  276. package/dist/components/ion-breadcrumb.js +131 -1
  277. package/dist/components/ion-breadcrumbs.js +152 -1
  278. package/dist/components/ion-button.js +6 -1
  279. package/dist/components/ion-buttons.js +6 -1
  280. package/dist/components/ion-card-content.js +43 -1
  281. package/dist/components/ion-card-header.js +50 -1
  282. package/dist/components/ion-card-subtitle.js +47 -1
  283. package/dist/components/ion-card-title.js +47 -1
  284. package/dist/components/ion-card.js +98 -1
  285. package/dist/components/ion-checkbox.js +6 -1
  286. package/dist/components/ion-chip.js +59 -1
  287. package/dist/components/ion-col.js +186 -2
  288. package/dist/components/ion-content.js +440 -1
  289. package/dist/components/ion-datetime-button.js +378 -1
  290. package/dist/components/ion-datetime.js +1961 -2
  291. package/dist/components/ion-fab-button.js +130 -1
  292. package/dist/components/ion-fab-list.js +56 -1
  293. package/dist/components/ion-fab.js +90 -1
  294. package/dist/components/ion-footer.js +152 -2
  295. package/dist/components/ion-grid.js +41 -1
  296. package/dist/components/ion-header.js +356 -2
  297. package/dist/components/ion-icon.js +6 -1
  298. package/dist/components/ion-img.js +124 -1
  299. package/dist/components/ion-infinite-scroll-content.js +69 -1
  300. package/dist/components/ion-infinite-scroll.js +209 -1
  301. package/dist/components/ion-input.js +564 -1
  302. package/dist/components/ion-item-divider.js +51 -1
  303. package/dist/components/ion-item-group.js +44 -1
  304. package/dist/components/ion-item-option.js +85 -1
  305. package/dist/components/ion-item-options.js +67 -1
  306. package/dist/components/ion-item-sliding.js +449 -1
  307. package/dist/components/ion-item.js +6 -1
  308. package/dist/components/ion-label.js +6 -1
  309. package/dist/components/ion-list-header.js +6 -1
  310. package/dist/components/ion-list.js +6 -1
  311. package/dist/components/ion-loading.js +325 -3
  312. package/dist/components/ion-menu-button.js +100 -1
  313. package/dist/components/ion-menu-toggle.js +57 -1
  314. package/dist/components/ion-menu.js +679 -1
  315. package/dist/components/ion-modal.js +1775 -3
  316. package/dist/components/ion-nav-link.js +63 -2
  317. package/dist/components/ion-nav.js +945 -2
  318. package/dist/components/ion-note.js +6 -1
  319. package/dist/components/ion-picker-column-internal.js +6 -1
  320. package/dist/components/ion-picker-column.js +6 -1
  321. package/dist/components/ion-picker-internal.js +6 -1
  322. package/dist/components/ion-picker.js +317 -3
  323. package/dist/components/ion-popover.js +6 -1
  324. package/dist/components/ion-progress-bar.js +79 -1
  325. package/dist/components/ion-radio-group.js +6 -1
  326. package/dist/components/ion-radio.js +6 -1
  327. package/dist/components/ion-range.js +778 -2
  328. package/dist/components/ion-refresher-content.js +90 -1
  329. package/dist/components/ion-refresher.js +652 -1
  330. package/dist/components/ion-reorder-group.js +300 -1
  331. package/dist/components/ion-reorder.js +58 -1
  332. package/dist/components/ion-ripple-effect.js +6 -1
  333. package/dist/components/ion-route-redirect.js +42 -1
  334. package/dist/components/ion-route.js +66 -1
  335. package/dist/components/ion-router-link.js +60 -1
  336. package/dist/components/ion-router-outlet.js +219 -1
  337. package/dist/components/ion-router.js +833 -3
  338. package/dist/components/ion-row.js +34 -1
  339. package/dist/components/ion-searchbar.js +472 -1
  340. package/dist/components/ion-segment-button.js +139 -1
  341. package/dist/components/ion-segment.js +472 -1
  342. package/dist/components/ion-select-option.js +42 -1
  343. package/dist/components/ion-select-popover.js +6 -1
  344. package/dist/components/ion-select.js +864 -1
  345. package/dist/components/ion-skeleton-text.js +59 -1
  346. package/dist/components/ion-spinner.js +6 -1
  347. package/dist/components/ion-split-pane.js +166 -1
  348. package/dist/components/ion-tab-bar.js +95 -1
  349. package/dist/components/ion-tab-button.js +125 -1
  350. package/dist/components/ion-tab.js +80 -1
  351. package/dist/components/ion-tabs.js +176 -1
  352. package/dist/components/ion-text.js +6 -1
  353. package/dist/components/ion-textarea.js +496 -1
  354. package/dist/components/ion-thumbnail.js +34 -1
  355. package/dist/components/ion-title.js +71 -1
  356. package/dist/components/ion-toast.js +914 -3
  357. package/dist/components/ion-toggle.js +282 -1
  358. package/dist/components/ion-toolbar.js +91 -1
  359. package/dist/components/p-01b49f83.js +269 -0
  360. package/dist/{esm/ios.transition-DMsViooj.js → components/p-02b77441.js} +2 -5
  361. package/dist/components/p-02bc6b21.js +203 -0
  362. package/dist/components/p-031ed92d.js +389 -0
  363. package/dist/components/p-03803c7d.js +369 -0
  364. package/dist/components/p-089e034e.js +234 -0
  365. package/dist/components/p-0dc7a5ff.js +512 -0
  366. package/dist/components/p-110f8490.js +566 -0
  367. package/dist/components/p-112455b1.js +17 -0
  368. package/dist/{esm/index-BMJhFU53.js → components/p-1596e301.js} +4 -4
  369. package/dist/components/p-1785e30a.js +318 -0
  370. package/dist/{esm/helpers-C6kqtbmV.js → components/p-2bb89b46.js} +5 -2
  371. package/dist/components/p-2d7d745d.js +224 -0
  372. package/dist/components/p-2fc99fef.js +262 -0
  373. package/dist/{esm/input-shims-DSFPFhb7.js → components/p-3296ebd9.js} +4 -6
  374. package/dist/{esm/data-Cl-_yBA0.js → components/p-39ad94cf.js} +2 -2
  375. package/dist/{esm/capacitor-CG3xQUND.js → components/p-3d3eefc3.js} +1 -1
  376. package/dist/{esm/form-controller-xetTxjL6.js → components/p-3e1d2896.js} +1 -1
  377. package/dist/{esm/keyboard-controller-CqGCg8tB.js → components/p-3e1e3453.js} +2 -2
  378. package/dist/{esm/md.transition-BQT2r4ED.js → components/p-503328f2.js} +2 -5
  379. package/dist/components/p-51c44f42.js +98 -0
  380. package/dist/components/p-5280b372.js +42 -0
  381. package/dist/{esm/index-DuUXGZp2.js → components/p-53e2dbe4.js} +3 -3
  382. package/dist/components/p-5441c730.js +851 -0
  383. package/dist/{esm/refresher.utils-D4tPnZsM.js → components/p-74e68924.js} +4 -4
  384. package/dist/{esm/framework-delegate-D_uGiYYw.js → components/p-76525f0f.js} +1 -1
  385. package/dist/{esm/index-CcopIPA0.js → components/p-77104220.js} +6 -4
  386. package/dist/components/p-77ccb793.js +185 -0
  387. package/dist/components/p-83e529db.js +380 -0
  388. package/dist/{esm/animation-DRf3dwMu.js → components/p-89c4c5cb.js} +2 -2
  389. package/dist/components/p-8b3d1e06.js +67 -0
  390. package/dist/components/p-901c16c5.js +210 -0
  391. package/dist/components/p-93e2a608.js +374 -0
  392. package/dist/components/p-95c79593.js +43 -0
  393. package/dist/components/p-96073863.js +82 -0
  394. package/dist/components/p-99e447f9.js +13 -0
  395. package/dist/{esm/keyboard-DgiyREKb.js → components/p-9b519de5.js} +1 -1
  396. package/dist/{esm/input.utils-BuIvhxo3.js → components/p-9d350d61.js} +3 -3
  397. package/dist/{esm/notch-controller-CQeDnZLe.js → components/p-9df67c24.js} +2 -2
  398. package/dist/components/p-a0e691dd.js +39 -0
  399. package/dist/components/p-ab10d1ae.js +47 -0
  400. package/dist/components/p-abc01c5d.js +194 -0
  401. package/dist/components/p-abd248d1.js +196 -0
  402. package/dist/{esm/haptic-D5jGzBs8.js → components/p-af073aaf.js} +2 -2
  403. package/dist/{esm/swipe-back-DE05lWQD.js → components/p-b32529b9.js} +3 -4
  404. package/dist/{esm/index-C75BfBAE.js → components/p-b8fdd517.js} +1 -2
  405. package/dist/components/p-cebc113f.js +38 -0
  406. package/dist/components/p-d25fd077.js +331 -0
  407. package/dist/{esm/menu-toggle-util-wdO31cdC.js → components/p-d3596f64.js} +1 -1
  408. package/dist/{esm/keyboard-DcbqYXj5.js → components/p-d60b2328.js} +1 -3
  409. package/dist/components/p-d69dc32f.js +97 -0
  410. package/dist/{esm/hardware-back-button-CzxcJiYO.js → components/p-d72e8d7b.js} +2 -3
  411. package/dist/{esm/ar-B3WORC1a.js → components/p-d839c693.js} +12 -5
  412. package/dist/{esm/index-D8d_89Nl.js → components/p-e187a77c.js} +1 -1
  413. package/dist/components/p-e65ea9fb.js +1379 -0
  414. package/dist/components/p-ec0e3f3f.js +2040 -0
  415. package/dist/components/p-ecb4db1c.js +64 -0
  416. package/dist/{esm/gesture-controller-CukVBo5-.js → components/p-f728a68f.js} +1 -1
  417. package/dist/components/p-f7e3c502.js +73 -0
  418. package/dist/components/p-fe463a42.js +272 -0
  419. package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
  420. package/dist/esm/amwal-checkout-button_5.entry.js +1296 -2881
  421. package/dist/esm/amwal-installments-guide.entry.js +40 -43
  422. package/dist/esm/amwal-pos.entry.js +3178 -3452
  423. package/dist/esm/amwal-widget-modal.entry.js +160 -175
  424. package/dist/esm/amwal-widget.entry.js +312 -343
  425. package/dist/esm/animation-a6d5c3b1.js +1063 -0
  426. package/dist/esm/{app-globals-BHnkZZiH.js → app-globals-c817b28b.js} +1 -1
  427. package/dist/esm/ar-7d2629bf.js +51 -0
  428. package/dist/esm/capacitor-ba4337da.js +13 -0
  429. package/dist/esm/checkout.js +18 -16
  430. package/dist/esm/config-8e06237c.js +171 -0
  431. package/dist/esm/cubic-bezier-874f336d.js +90 -0
  432. package/dist/esm/data-8916315d.js +1628 -0
  433. package/dist/esm/dir-1d4aa386.js +18 -0
  434. package/dist/esm/focus-visible-32968d3d.js +75 -0
  435. package/dist/esm/form-controller-b1aa7393.js +64 -0
  436. package/dist/esm/framework-delegate-de1aa369.js +140 -0
  437. package/dist/esm/gesture-controller-58ffa500.js +195 -0
  438. package/dist/esm/haptic-4d4d8eb1.js +206 -0
  439. package/dist/esm/hardware-back-button-f93acff0.js +116 -0
  440. package/dist/esm/helpers-f0dcbd72.js +418 -0
  441. package/dist/esm/i18n-53f85411.js +13 -0
  442. package/dist/esm/{index-CNcx43L8.js → index-0b560278.js} +4 -4
  443. package/dist/esm/index-5894dd63.js +196 -0
  444. package/dist/esm/{index-DUF6JAQL.js → index-5a126e54.js} +6 -6
  445. package/dist/esm/index-5e663431.js +128 -0
  446. package/dist/esm/index-8cc94b11.js +2219 -0
  447. package/dist/esm/index-afdf867c.js +26 -0
  448. package/dist/esm/index-d9b41a43.js +34 -0
  449. package/dist/esm/index-f6dce931.js +466 -0
  450. package/dist/esm/index-fb97e55c.js +7 -0
  451. package/dist/esm/input-shims-75d4750d.js +617 -0
  452. package/dist/esm/input.utils-79bde07f.js +138 -0
  453. package/dist/esm/ion-accordion-group.entry.js +197 -203
  454. package/dist/esm/ion-accordion.entry.js +303 -305
  455. package/dist/esm/ion-action-sheet_3.entry.js +693 -705
  456. package/dist/esm/ion-app.entry.js +93 -93
  457. package/dist/esm/ion-avatar.entry.js +12 -12
  458. package/dist/esm/ion-back-button.entry.js +76 -76
  459. package/dist/esm/ion-backdrop.entry.js +42 -42
  460. package/dist/esm/ion-badge.entry.js +17 -17
  461. package/dist/esm/ion-breadcrumb.entry.js +84 -84
  462. package/dist/esm/ion-breadcrumbs.entry.js +118 -124
  463. package/dist/esm/ion-buttons_3.entry.js +820 -822
  464. package/dist/esm/ion-card-content.entry.js +17 -17
  465. package/dist/esm/ion-card-header.entry.js +20 -20
  466. package/dist/esm/ion-card-subtitle.entry.js +18 -18
  467. package/dist/esm/ion-card-title.entry.js +18 -18
  468. package/dist/esm/ion-card.entry.js +53 -53
  469. package/dist/esm/ion-checkbox_7.entry.js +860 -882
  470. package/dist/esm/ion-chip.entry.js +22 -22
  471. package/dist/esm/ion-col.entry.js +108 -108
  472. package/dist/esm/ion-content.entry.js +374 -374
  473. package/dist/esm/ion-datetime-button.entry.js +328 -328
  474. package/dist/esm/ion-datetime.entry.js +1545 -1567
  475. package/dist/esm/ion-fab-button.entry.js +76 -76
  476. package/dist/esm/ion-fab-list.entry.js +29 -31
  477. package/dist/esm/ion-fab.entry.js +56 -58
  478. package/dist/esm/ion-footer.entry.js +92 -92
  479. package/dist/esm/ion-grid.entry.js +15 -15
  480. package/dist/esm/ion-header.entry.js +141 -141
  481. package/dist/esm/ion-icon.entry.js +102 -112
  482. package/dist/esm/ion-img.entry.js +81 -83
  483. package/dist/esm/ion-infinite-scroll-content.entry.js +32 -32
  484. package/dist/esm/ion-infinite-scroll.entry.js +172 -176
  485. package/dist/esm/ion-input.entry.js +445 -453
  486. package/dist/esm/ion-item-divider.entry.js +21 -21
  487. package/dist/esm/ion-item-group.entry.js +18 -18
  488. package/dist/esm/ion-item-option.entry.js +43 -43
  489. package/dist/esm/ion-item-options.entry.js +38 -38
  490. package/dist/esm/ion-item-sliding.entry.js +389 -391
  491. package/dist/esm/ion-loading.entry.js +160 -164
  492. package/dist/esm/ion-menu-button.entry.js +58 -58
  493. package/dist/esm/ion-menu-toggle.entry.js +34 -34
  494. package/dist/esm/ion-menu.entry.js +604 -612
  495. package/dist/esm/ion-modal.entry.js +549 -553
  496. package/dist/esm/ion-nav-link.entry.js +15 -15
  497. package/dist/esm/ion-nav.entry.js +821 -825
  498. package/dist/esm/ion-note.entry.js +17 -17
  499. package/dist/esm/ion-picker-column.entry.js +325 -327
  500. package/dist/esm/ion-picker.entry.js +196 -200
  501. package/dist/esm/ion-popover.entry.js +324 -330
  502. package/dist/esm/ion-progress-bar.entry.js +42 -42
  503. package/dist/esm/ion-range.entry.js +642 -654
  504. package/dist/esm/ion-refresher-content.entry.js +51 -51
  505. package/dist/esm/ion-refresher.entry.js +584 -586
  506. package/dist/esm/ion-reorder-group.entry.js +250 -252
  507. package/dist/esm/ion-reorder.entry.js +24 -24
  508. package/dist/esm/ion-route-redirect.entry.js +17 -21
  509. package/dist/esm/ion-route.entry.js +35 -41
  510. package/dist/esm/ion-router-link.entry.js +29 -29
  511. package/dist/esm/ion-router-outlet.entry.js +176 -178
  512. package/dist/esm/ion-router.entry.js +264 -264
  513. package/dist/esm/ion-row.entry.js +10 -10
  514. package/dist/esm/ion-searchbar.entry.js +386 -396
  515. package/dist/esm/ion-segment-button.entry.js +94 -96
  516. package/dist/esm/ion-segment.entry.js +412 -420
  517. package/dist/esm/ion-select-option.entry.js +14 -14
  518. package/dist/esm/ion-select.entry.js +691 -699
  519. package/dist/esm/ion-skeleton-text.entry.js +33 -33
  520. package/dist/esm/ion-spinner.entry.js +48 -48
  521. package/dist/esm/ion-split-pane.entry.js +118 -124
  522. package/dist/esm/ion-tab-bar.entry.js +64 -66
  523. package/dist/esm/ion-tab-button.entry.js +80 -80
  524. package/dist/esm/ion-tab.entry.js +48 -50
  525. package/dist/esm/ion-tabs.entry.js +132 -132
  526. package/dist/esm/ion-textarea.entry.js +394 -400
  527. package/dist/esm/ion-thumbnail.entry.js +10 -10
  528. package/dist/esm/ion-title.entry.js +41 -43
  529. package/dist/esm/ion-toast.entry.js +369 -375
  530. package/dist/esm/ion-toggle.entry.js +228 -230
  531. package/dist/esm/ion-toolbar.entry.js +59 -59
  532. package/dist/esm/{ionic-global-DXXzPLPc.js → ionic-global-0b7766cb.js} +55 -58
  533. package/dist/esm/ios.transition-22fb53bc.js +651 -0
  534. package/dist/esm/keyboard-1f073554.js +82 -0
  535. package/dist/esm/keyboard-96b6e80b.js +146 -0
  536. package/dist/esm/keyboard-controller-5a2f625f.js +165 -0
  537. package/dist/esm/loader.js +17 -8
  538. package/dist/esm/lock-controller-632e3c10.js +38 -0
  539. package/dist/esm/md.transition-f6ff9834.js +57 -0
  540. package/dist/esm/menu-toggle-util-594849ff.js +12 -0
  541. package/dist/esm/notch-controller-d511b3b3.js +153 -0
  542. package/dist/esm/{overlays-SBLrmFy6.js → overlays-642a91df.js} +7 -7
  543. package/dist/esm/polyfills/core-js.js +11 -0
  544. package/dist/esm/polyfills/css-shim.js +1 -0
  545. package/dist/esm/polyfills/dom.js +79 -0
  546. package/dist/esm/polyfills/es5-html-element.js +1 -0
  547. package/dist/esm/polyfills/index.js +34 -0
  548. package/dist/esm/polyfills/system.js +6 -0
  549. package/dist/esm/refresher.utils-19137568.js +196 -0
  550. package/dist/esm/{status-tap-CjxQA4Bj.js → status-tap-bb6959a8.js} +4 -4
  551. package/dist/esm/swipe-back-6cec4c33.js +79 -0
  552. package/dist/esm/theme-35c700b7.js +43 -0
  553. package/dist/esm/watch-options-7bf43687.js +47 -0
  554. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.ios.css +193 -0
  555. package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.md.css +135 -0
  556. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.ios.css +127 -0
  557. package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.md.css +229 -0
  558. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.ios.css +456 -0
  559. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.md.css +384 -0
  560. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.ios.css +755 -0
  561. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.md.css +770 -0
  562. package/dist/node_modules/@ionic/core/dist/collection/components/app/app.css +17 -0
  563. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.ios.css +132 -0
  564. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.md.css +132 -0
  565. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.ios.css +372 -0
  566. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.md.css +385 -0
  567. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.ios.css +136 -0
  568. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.md.css +136 -0
  569. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.ios.css +168 -0
  570. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.md.css +164 -0
  571. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.ios.css +326 -0
  572. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.md.css +310 -0
  573. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.ios.css +81 -0
  574. package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.md.css +80 -0
  575. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.ios.css +596 -0
  576. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.md.css +517 -0
  577. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.ios.css +279 -0
  578. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.md.css +299 -0
  579. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.ios.css +203 -0
  580. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.md.css +198 -0
  581. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.ios.css +163 -0
  582. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.md.css +165 -0
  583. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.ios.css +141 -0
  584. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.md.css +138 -0
  585. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.ios.css +138 -0
  586. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.md.css +136 -0
  587. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.ios.css +137 -0
  588. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.md.css +137 -0
  589. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.ios.css +536 -0
  590. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.md.css +552 -0
  591. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.ios.css +212 -0
  592. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.md.css +207 -0
  593. package/dist/node_modules/@ionic/core/dist/collection/components/col/col.css +200 -0
  594. package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +282 -0
  595. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +850 -0
  596. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +706 -0
  597. package/dist/node_modules/@ionic/core/dist/collection/components/datetime-button/datetime-button.css +100 -0
  598. package/dist/node_modules/@ionic/core/dist/collection/components/fab/fab.css +366 -0
  599. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.ios.css +422 -0
  600. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.md.css +393 -0
  601. package/dist/node_modules/@ionic/core/dist/collection/components/fab-list/fab-list.css +240 -0
  602. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.ios.css +146 -0
  603. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.md.css +129 -0
  604. package/dist/node_modules/@ionic/core/dist/collection/components/grid/grid.css +235 -0
  605. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.ios.css +250 -0
  606. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.md.css +133 -0
  607. package/dist/node_modules/@ionic/core/dist/collection/components/img/img.css +12 -0
  608. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll/infinite-scroll.css +8 -0
  609. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +156 -0
  610. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +156 -0
  611. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.ios.css +833 -0
  612. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.md.css +1446 -0
  613. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +815 -0
  614. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +1187 -0
  615. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.ios.css +351 -0
  616. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.md.css +417 -0
  617. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.ios.css +114 -0
  618. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.md.css +114 -0
  619. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +242 -0
  620. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +236 -0
  621. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.ios.css +287 -0
  622. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.md.css +284 -0
  623. package/dist/node_modules/@ionic/core/dist/collection/components/item-sliding/item-sliding.css +121 -0
  624. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +334 -0
  625. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.md.css +421 -0
  626. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.ios.css +242 -0
  627. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.md.css +287 -0
  628. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.ios.css +285 -0
  629. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.md.css +266 -0
  630. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +205 -0
  631. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +196 -0
  632. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +378 -0
  633. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +374 -0
  634. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.ios.css +279 -0
  635. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.md.css +282 -0
  636. package/dist/node_modules/@ionic/core/dist/collection/components/menu-toggle/menu-toggle.css +3 -0
  637. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +357 -0
  638. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +272 -0
  639. package/dist/node_modules/@ionic/core/dist/collection/components/nav/nav.css +64 -0
  640. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.ios.css +127 -0
  641. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.md.css +127 -0
  642. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.ios.css +367 -0
  643. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.md.css +354 -0
  644. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.ios.css +255 -0
  645. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.md.css +246 -0
  646. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +138 -0
  647. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.md.css +196 -0
  648. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.ios.css +262 -0
  649. package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.md.css +258 -0
  650. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.ios.css +366 -0
  651. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.md.css +266 -0
  652. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css +261 -0
  653. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css +261 -0
  654. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.ios.css +557 -0
  655. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.md.css +580 -0
  656. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +660 -0
  657. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +819 -0
  658. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.ios.css +321 -0
  659. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.md.css +316 -0
  660. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.ios.css +77 -0
  661. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.md.css +77 -0
  662. package/dist/node_modules/@ionic/core/dist/collection/components/reorder-group/reorder-group.css +89 -0
  663. package/dist/node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.css +113 -0
  664. package/dist/node_modules/@ionic/core/dist/collection/components/router-link/router-link.css +84 -0
  665. package/dist/node_modules/@ionic/core/dist/collection/components/router-outlet/router-outlet.css +64 -0
  666. package/dist/node_modules/@ionic/core/dist/collection/components/row/row.css +136 -0
  667. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.ios.css +477 -0
  668. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.md.css +456 -0
  669. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.ios.css +224 -0
  670. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.md.css +214 -0
  671. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.ios.css +520 -0
  672. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.md.css +506 -0
  673. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.ios.css +787 -0
  674. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.md.css +1374 -0
  675. package/dist/node_modules/@ionic/core/dist/collection/components/select-option/select-option.css +3 -0
  676. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.ios.css +190 -0
  677. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.md.css +212 -0
  678. package/dist/node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css +108 -0
  679. package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +232 -0
  680. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.ios.css +265 -0
  681. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.md.css +265 -0
  682. package/dist/node_modules/@ionic/core/dist/collection/components/tab/tab.css +4 -0
  683. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.ios.css +252 -0
  684. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.md.css +239 -0
  685. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.ios.css +477 -0
  686. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.md.css +501 -0
  687. package/dist/node_modules/@ionic/core/dist/collection/components/tabs/tabs.css +74 -0
  688. package/dist/node_modules/@ionic/core/dist/collection/components/text/text.css +58 -0
  689. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +987 -0
  690. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +1553 -0
  691. package/dist/node_modules/@ionic/core/dist/collection/components/thumbnail/thumbnail.css +76 -0
  692. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.ios.css +183 -0
  693. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.md.css +102 -0
  694. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css +399 -0
  695. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.md.css +429 -0
  696. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +680 -0
  697. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +625 -0
  698. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.ios.css +265 -0
  699. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.md.css +244 -0
  700. package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +144 -0
  701. package/dist/types/components/amwal-checkout-button/amwal-checkout-button.d.ts +327 -327
  702. package/dist/types/components/amwal-checkout-button/amwal-checkout-button.stories.d.ts +34 -34
  703. package/dist/types/components/amwal-installments-guide/amwal-installments-guide.d.ts +14 -14
  704. package/dist/types/components/amwal-installments-guide/amwal-installments-guide.stories.d.ts +17 -17
  705. package/dist/types/components/amwal-installments-timeline/amwal-installments-timeline.d.ts +106 -106
  706. package/dist/types/components/amwal-installments-timeline/amwal-installments-timeline.stories.d.ts +67 -67
  707. package/dist/types/components/amwal-pos/amwal-pos.d.ts +228 -228
  708. package/dist/types/components/amwal-pos/amwal-pos.stories.d.ts +185 -185
  709. package/dist/types/components/amwal-widget/amwal-widget-modal.d.ts +56 -56
  710. package/dist/types/components/amwal-widget/amwal-widget.d.ts +165 -165
  711. package/dist/types/components/amwal-widget/amwal-widget.stories.d.ts +101 -101
  712. package/dist/types/components.d.ts +0 -206
  713. package/dist/types/lang/i18n.d.ts +1 -1
  714. package/dist/types/stencil-public-runtime.d.ts +21 -191
  715. package/loader/cdn.js +3 -1
  716. package/loader/index.cjs.js +3 -1
  717. package/loader/index.d.ts +1 -4
  718. package/loader/index.es2017.js +3 -1
  719. package/loader/index.js +3 -1
  720. package/loader/package.json +11 -0
  721. package/package.json +28 -34
  722. package/dist/checkout/p-0161d109.entry.js +0 -1
  723. package/dist/checkout/p-0a8ef1ec.entry.js +0 -1
  724. package/dist/checkout/p-10a72fbe.entry.js +0 -1
  725. package/dist/checkout/p-12ed4081.entry.js +0 -1
  726. package/dist/checkout/p-13c36adc.entry.js +0 -1
  727. package/dist/checkout/p-194b17d8.entry.js +0 -1
  728. package/dist/checkout/p-272a1ffd.entry.js +0 -1
  729. package/dist/checkout/p-307af48b.entry.js +0 -1
  730. package/dist/checkout/p-3207674d.entry.js +0 -1
  731. package/dist/checkout/p-3208e56f.entry.js +0 -1
  732. package/dist/checkout/p-4426eb3b.entry.js +0 -1
  733. package/dist/checkout/p-458da59f.entry.js +0 -1
  734. package/dist/checkout/p-46e69508.entry.js +0 -1
  735. package/dist/checkout/p-49046c16.entry.js +0 -4
  736. package/dist/checkout/p-53dc0e86.entry.js +0 -1
  737. package/dist/checkout/p-5a6fc9fd.entry.js +0 -1
  738. package/dist/checkout/p-5e65653a.entry.js +0 -1
  739. package/dist/checkout/p-5f124c24.entry.js +0 -1
  740. package/dist/checkout/p-6a8ad104.entry.js +0 -1
  741. package/dist/checkout/p-76fb4325.entry.js +0 -1
  742. package/dist/checkout/p-78db60fb.entry.js +0 -1
  743. package/dist/checkout/p-8e34a1bb.entry.js +0 -1
  744. package/dist/checkout/p-91474b10.entry.js +0 -1
  745. package/dist/checkout/p-93OyAGoo.js +0 -2
  746. package/dist/checkout/p-94a57258.entry.js +0 -1
  747. package/dist/checkout/p-BEVStXwd.js +0 -7
  748. package/dist/checkout/p-BQu7QPd5.js +0 -4
  749. package/dist/checkout/p-BR7SJd-v.js +0 -4
  750. package/dist/checkout/p-BcFRJSFv.js +0 -4
  751. package/dist/checkout/p-BcUxrseY.js +0 -1
  752. package/dist/checkout/p-BdG893XR.js +0 -4
  753. package/dist/checkout/p-BgOwfqIY.js +0 -4
  754. package/dist/checkout/p-Bm9bMvCb.js +0 -4
  755. package/dist/checkout/p-C03M5ZSM.js +0 -1
  756. package/dist/checkout/p-C6kqtbmV.js +0 -4
  757. package/dist/checkout/p-C75BfBAE.js +0 -1
  758. package/dist/checkout/p-CVrvo9Qz.js +0 -4
  759. package/dist/checkout/p-ChixdDt6.js +0 -4
  760. package/dist/checkout/p-Cjnmql4G.js +0 -8
  761. package/dist/checkout/p-D0I0TqZU.js +0 -4
  762. package/dist/checkout/p-D2NxOvQ8.js +0 -4
  763. package/dist/checkout/p-D8d_89Nl.js +0 -4
  764. package/dist/checkout/p-DAhcxcAh.js +0 -4
  765. package/dist/checkout/p-DDtPO7yO.js +0 -4
  766. package/dist/checkout/p-DKg_dYcq.js +0 -4
  767. package/dist/checkout/p-DMAPbDyG.js +0 -4
  768. package/dist/checkout/p-DihS-5gH.js +0 -4
  769. package/dist/checkout/p-DkrNcwKK.js +0 -5
  770. package/dist/checkout/p-Dzj_jqIY.js +0 -4
  771. package/dist/checkout/p-E8AXUhZ3.js +0 -7
  772. package/dist/checkout/p-Ufaww5Lq.js +0 -4
  773. package/dist/checkout/p-a90efa79.entry.js +0 -1
  774. package/dist/checkout/p-abd12b84.entry.js +0 -1
  775. package/dist/checkout/p-abe1becc.entry.js +0 -1
  776. package/dist/checkout/p-b2f66c60.entry.js +0 -4
  777. package/dist/checkout/p-b45f5952.entry.js +0 -1
  778. package/dist/checkout/p-c2240d19.entry.js +0 -1
  779. package/dist/checkout/p-c28b4374.entry.js +0 -1
  780. package/dist/checkout/p-cb2db223.entry.js +0 -1
  781. package/dist/checkout/p-cb3967fc.entry.js +0 -1
  782. package/dist/checkout/p-cef16f11.entry.js +0 -1
  783. package/dist/checkout/p-df1b4347.entry.js +0 -4
  784. package/dist/checkout/p-e4bc42fb.entry.js +0 -1
  785. package/dist/checkout/p-e785fb8a.entry.js +0 -1
  786. package/dist/checkout/p-e8bd206a.entry.js +0 -1
  787. package/dist/checkout/p-ef749875.entry.js +0 -1
  788. package/dist/checkout/p-f157b6b2.entry.js +0 -4
  789. package/dist/checkout/p-f351a19a.entry.js +0 -1
  790. package/dist/checkout/p-ff2e59e3.entry.js +0 -1
  791. package/dist/checkout/p-hAETByzF.js +0 -5
  792. package/dist/checkout/p-vn1iXXUO.js +0 -9
  793. package/dist/cjs/i18n-uGNv9SLK.js +0 -13
  794. package/dist/cjs/index-DncWzXDA.js +0 -3738
  795. package/dist/components/p-55BwDerf.js +0 -8
  796. package/dist/components/p-B-M4K7iJ.js +0 -7
  797. package/dist/components/p-B-hirT0v.js +0 -4
  798. package/dist/components/p-B3WORC1a.js +0 -1
  799. package/dist/components/p-B5XH2zAk.js +0 -1
  800. package/dist/components/p-B5ZghgSh.js +0 -4
  801. package/dist/components/p-BEVStXwd.js +0 -7
  802. package/dist/components/p-BH0TCnxk.js +0 -4
  803. package/dist/components/p-BIA8A9ZO.js +0 -1
  804. package/dist/components/p-BOkYKP6F.js +0 -1
  805. package/dist/components/p-BOm0KT2x.js +0 -1
  806. package/dist/components/p-Bb_Zji0h.js +0 -4
  807. package/dist/components/p-BmVRXR1y.js +0 -4
  808. package/dist/components/p-BnQDByf2.js +0 -1
  809. package/dist/components/p-BoxjYI-Q.js +0 -4
  810. package/dist/components/p-BriBxgcM.js +0 -1
  811. package/dist/components/p-BwKjt_Dc.js +0 -4
  812. package/dist/components/p-Bx78uXfc.js +0 -5
  813. package/dist/components/p-C-20JWsp.js +0 -4
  814. package/dist/components/p-C03M5ZSM.js +0 -1
  815. package/dist/components/p-C53feagD.js +0 -4
  816. package/dist/components/p-CLrB3zV0.js +0 -4
  817. package/dist/components/p-CN34uOrj.js +0 -9
  818. package/dist/components/p-CQmcNwZM.js +0 -4
  819. package/dist/components/p-CYd0Smt1.js +0 -1
  820. package/dist/components/p-CgPXSjzI.js +0 -4
  821. package/dist/components/p-Cho32MPa.js +0 -4
  822. package/dist/components/p-ClE6rMJs.js +0 -4
  823. package/dist/components/p-Cm9b7fIl.js +0 -1
  824. package/dist/components/p-CukVBo5-.js +0 -4
  825. package/dist/components/p-D2NxOvQ8.js +0 -4
  826. package/dist/components/p-D4DqwBlW.js +0 -4
  827. package/dist/components/p-D7YY0NXg.js +0 -4
  828. package/dist/components/p-D8OVJo1v.js +0 -7
  829. package/dist/components/p-DKg_dYcq.js +0 -4
  830. package/dist/components/p-DLVYPrYs.js +0 -1
  831. package/dist/components/p-DMmSL7_l.js +0 -1
  832. package/dist/components/p-DOPF2QRF.js +0 -1
  833. package/dist/components/p-DTgJTJD6.js +0 -1
  834. package/dist/components/p-DiVJyqlX.js +0 -4
  835. package/dist/components/p-DrS88eFz.js +0 -1
  836. package/dist/components/p-Dtdm8lKC.js +0 -4
  837. package/dist/components/p-DuZ7hY1a.js +0 -4
  838. package/dist/components/p-Dx-C8Ob_.js +0 -7
  839. package/dist/components/p-DxEgz9x_.js +0 -1
  840. package/dist/components/p-DxSo4SXG.js +0 -1
  841. package/dist/components/p-HSPzo8it.js +0 -1
  842. package/dist/components/p-OrwCUtWu.js +0 -4
  843. package/dist/components/p-UgkI2Wa4.js +0 -1
  844. package/dist/components/p-VeNdmYSo.js +0 -1
  845. package/dist/components/p-YbpebnFS.js +0 -4
  846. package/dist/components/p-ZjP4CjeZ.js +0 -4
  847. package/dist/components/p-_VuKPdkD.js +0 -4
  848. package/dist/components/p-aWL6BxTN.js +0 -4
  849. package/dist/components/p-hHmYLOfE.js +0 -4
  850. package/dist/components/p-qoI-S7yk.js +0 -4
  851. package/dist/components/p-uXV7tzS3.js +0 -1
  852. package/dist/components/p-yu3xCFhr.js +0 -7
  853. package/dist/components/p-zp5f483d.js +0 -1
  854. package/dist/esm/i18n-C_AfxZ5D.js +0 -13
  855. package/dist/esm/index-93OyAGoo.js +0 -3721
  856. /package/dist/checkout/{p-B-hirT0v.js → p-01ad898f.js} +0 -0
  857. /package/dist/checkout/{p-DiVJyqlX.js → p-350e7423.js} +0 -0
  858. /package/dist/checkout/{p-sObYyvOy.js → p-52b4c112.js} +0 -0
  859. /package/dist/checkout/{p-BmVRXR1y.js → p-620fa0ec.js} +0 -0
  860. /package/dist/checkout/{p-hHmYLOfE.js → p-94286cc3.js} +0 -0
  861. /package/dist/checkout/{p-D4RIp70E.js → p-9efbca93.js} +0 -0
  862. /package/dist/checkout/{p-Dtdm8lKC.js → p-9f4ac833.js} +0 -0
  863. /package/dist/checkout/{p-yu3xCFhr.js → p-b2289937.js} +0 -0
  864. /package/dist/checkout/{p-C53feagD.js → p-d5862637.js} +0 -0
  865. /package/dist/checkout/{p-ZjP4CjeZ.js → p-d7fe59ee.js} +0 -0
  866. /package/dist/{components/p-CYPPT3AE.js → checkout/p-e187a77c.js} +0 -0
  867. /package/dist/checkout/{p-CukVBo5-.js → p-f728a68f.js} +0 -0
  868. /package/dist/cjs/{compare-with-utils-JlLIkecm.js → compare-with-utils-adbe64a6.js} +0 -0
  869. /package/dist/cjs/{config-ptk2Lf4l.js → config-e2a8c0c7.js} +0 -0
  870. /package/dist/cjs/{cubic-bezier-Bv3PvaRI.js → cubic-bezier-5ff9b04e.js} +0 -0
  871. /package/dist/cjs/{dir-Br-7_bel.js → dir-374f13f2.js} +0 -0
  872. /package/dist/cjs/{focus-visible-Da2o6bTP.js → focus-visible-b7381162.js} +0 -0
  873. /package/dist/cjs/{index-CH3IFTaK.js → index-071786b4.js} +0 -0
  874. /package/dist/cjs/{index-D3mJ1Cix.js → index-a281cac3.js} +0 -0
  875. /package/dist/cjs/{lock-controller-58TZFRHC.js → lock-controller-e2dfece6.js} +0 -0
  876. /package/dist/cjs/{spinner-configs-BN41iw42.js → spinner-configs-036ebfd8.js} +0 -0
  877. /package/dist/cjs/{theme-DbHdw1Nx.js → theme-12dec869.js} +0 -0
  878. /package/dist/cjs/{watch-options-DOFUPyuf.js → watch-options-1cccbe6a.js} +0 -0
  879. /package/dist/{esm/lock-controller-B-hirT0v.js → components/p-01ad898f.js} +0 -0
  880. /package/dist/{esm/theme-DiVJyqlX.js → components/p-350e7423.js} +0 -0
  881. /package/dist/{esm/focus-visible-BmVRXR1y.js → components/p-620fa0ec.js} +0 -0
  882. /package/dist/{esm/cubic-bezier-hHmYLOfE.js → components/p-94286cc3.js} +0 -0
  883. /package/dist/{esm/watch-options-Dtdm8lKC.js → components/p-9f4ac833.js} +0 -0
  884. /package/dist/{esm/config-yu3xCFhr.js → components/p-b2289937.js} +0 -0
  885. /package/dist/{esm/dir-C53feagD.js → components/p-d5862637.js} +0 -0
  886. /package/dist/{esm/index-ZjP4CjeZ.js → components/p-d7fe59ee.js} +0 -0
  887. /package/dist/esm/{compare-with-utils-sObYyvOy.js → compare-with-utils-d58be312.js} +0 -0
  888. /package/dist/esm/{spinner-configs-D4RIp70E.js → spinner-configs-c9fb0813.js} +0 -0
@@ -0,0 +1,2256 @@
1
+ 'use strict';
2
+
3
+ function _interopNamespace(e) {
4
+ if (e && e.__esModule) return e;
5
+ var n = Object.create(null);
6
+ if (e) {
7
+ Object.keys(e).forEach(function (k) {
8
+ if (k !== 'default') {
9
+ var d = Object.getOwnPropertyDescriptor(e, k);
10
+ Object.defineProperty(n, k, d.get ? d : {
11
+ enumerable: true,
12
+ get: function () {
13
+ return e[k];
14
+ }
15
+ });
16
+ }
17
+ });
18
+ }
19
+ n['default'] = e;
20
+ return Object.freeze(n);
21
+ }
22
+
23
+ const NAMESPACE = 'checkout';
24
+
25
+ /**
26
+ * Virtual DOM patching algorithm based on Snabbdom by
27
+ * Simon Friis Vindum (@paldepind)
28
+ * Licensed under the MIT License
29
+ * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
30
+ *
31
+ * Modified for Stencil's renderer and slot projection
32
+ */
33
+ let scopeId;
34
+ let contentRef;
35
+ let hostTagName;
36
+ let useNativeShadowDom = false;
37
+ let checkSlotFallbackVisibility = false;
38
+ let checkSlotRelocate = false;
39
+ let isSvgMode = false;
40
+ let queuePending = false;
41
+ const Build = {
42
+ isDev: false,
43
+ isBrowser: true,
44
+ isServer: false,
45
+ isTesting: false,
46
+ };
47
+ const getAssetPath = (path) => {
48
+ const assetUrl = new URL(path, plt.$resourcesUrl$);
49
+ return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
50
+ };
51
+ const createTime = (fnName, tagName = '') => {
52
+ {
53
+ return () => {
54
+ return;
55
+ };
56
+ }
57
+ };
58
+ const uniqueTime = (key, measureText) => {
59
+ {
60
+ return () => {
61
+ return;
62
+ };
63
+ }
64
+ };
65
+ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
66
+ const XLINK_NS = 'http://www.w3.org/1999/xlink';
67
+ /**
68
+ * Default style mode id
69
+ */
70
+ /**
71
+ * Reusable empty obj/array
72
+ * Don't add values to these!!
73
+ */
74
+ const EMPTY_OBJ = {};
75
+ /**
76
+ * Namespaces
77
+ */
78
+ const SVG_NS = 'http://www.w3.org/2000/svg';
79
+ const HTML_NS = 'http://www.w3.org/1999/xhtml';
80
+ const isDef = (v) => v != null;
81
+ /**
82
+ * Check whether a value is a 'complex type', defined here as an object or a
83
+ * function.
84
+ *
85
+ * @param o the value to check
86
+ * @returns whether it's a complex type or not
87
+ */
88
+ const isComplexType = (o) => {
89
+ // https://jsperf.com/typeof-fn-object/5
90
+ o = typeof o;
91
+ return o === 'object' || o === 'function';
92
+ };
93
+ /**
94
+ * Helper method for querying a `meta` tag that contains a nonce value
95
+ * out of a DOM's head.
96
+ *
97
+ * @param doc The DOM containing the `head` to query against
98
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
99
+ * exists or the tag has no content.
100
+ */
101
+ function queryNonceMetaTagContent(doc) {
102
+ var _a, _b, _c;
103
+ return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
104
+ }
105
+ /**
106
+ * Production h() function based on Preact by
107
+ * Jason Miller (@developit)
108
+ * Licensed under the MIT License
109
+ * https://github.com/developit/preact/blob/master/LICENSE
110
+ *
111
+ * Modified for Stencil's compiler and vdom
112
+ */
113
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
114
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
115
+ const h = (nodeName, vnodeData, ...children) => {
116
+ let child = null;
117
+ let key = null;
118
+ let slotName = null;
119
+ let simple = false;
120
+ let lastSimple = false;
121
+ const vNodeChildren = [];
122
+ const walk = (c) => {
123
+ for (let i = 0; i < c.length; i++) {
124
+ child = c[i];
125
+ if (Array.isArray(child)) {
126
+ walk(child);
127
+ }
128
+ else if (child != null && typeof child !== 'boolean') {
129
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
130
+ child = String(child);
131
+ }
132
+ if (simple && lastSimple) {
133
+ // If the previous child was simple (string), we merge both
134
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
135
+ }
136
+ else {
137
+ // Append a new vNode, if it's text, we create a text vNode
138
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
139
+ }
140
+ lastSimple = simple;
141
+ }
142
+ }
143
+ };
144
+ walk(children);
145
+ if (vnodeData) {
146
+ // normalize class / classname attributes
147
+ if (vnodeData.key) {
148
+ key = vnodeData.key;
149
+ }
150
+ if (vnodeData.name) {
151
+ slotName = vnodeData.name;
152
+ }
153
+ {
154
+ const classData = vnodeData.className || vnodeData.class;
155
+ if (classData) {
156
+ vnodeData.class =
157
+ typeof classData !== 'object'
158
+ ? classData
159
+ : Object.keys(classData)
160
+ .filter((k) => classData[k])
161
+ .join(' ');
162
+ }
163
+ }
164
+ }
165
+ if (typeof nodeName === 'function') {
166
+ // nodeName is a functional component
167
+ return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
168
+ }
169
+ const vnode = newVNode(nodeName, null);
170
+ vnode.$attrs$ = vnodeData;
171
+ if (vNodeChildren.length > 0) {
172
+ vnode.$children$ = vNodeChildren;
173
+ }
174
+ {
175
+ vnode.$key$ = key;
176
+ }
177
+ {
178
+ vnode.$name$ = slotName;
179
+ }
180
+ return vnode;
181
+ };
182
+ /**
183
+ * A utility function for creating a virtual DOM node from a tag and some
184
+ * possible text content.
185
+ *
186
+ * @param tag the tag for this element
187
+ * @param text possible text content for the node
188
+ * @returns a newly-minted virtual DOM node
189
+ */
190
+ const newVNode = (tag, text) => {
191
+ const vnode = {
192
+ $flags$: 0,
193
+ $tag$: tag,
194
+ $text$: text,
195
+ $elm$: null,
196
+ $children$: null,
197
+ };
198
+ {
199
+ vnode.$attrs$ = null;
200
+ }
201
+ {
202
+ vnode.$key$ = null;
203
+ }
204
+ {
205
+ vnode.$name$ = null;
206
+ }
207
+ return vnode;
208
+ };
209
+ const Host = {};
210
+ /**
211
+ * Check whether a given node is a Host node or not
212
+ *
213
+ * @param node the virtual DOM node to check
214
+ * @returns whether it's a Host node or not
215
+ */
216
+ const isHost = (node) => node && node.$tag$ === Host;
217
+ /**
218
+ * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
219
+ *
220
+ * Note that these functions convert from {@link d.VNode} to
221
+ * {@link d.ChildNode} to give functional component developers a friendly
222
+ * interface.
223
+ */
224
+ const vdomFnUtils = {
225
+ forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
226
+ map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
227
+ };
228
+ /**
229
+ * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
230
+ * friendlier public interface (hence, 'convertToPublic').
231
+ *
232
+ * @param node the virtual DOM node to convert
233
+ * @returns a converted child node
234
+ */
235
+ const convertToPublic = (node) => ({
236
+ vattrs: node.$attrs$,
237
+ vchildren: node.$children$,
238
+ vkey: node.$key$,
239
+ vname: node.$name$,
240
+ vtag: node.$tag$,
241
+ vtext: node.$text$,
242
+ });
243
+ /**
244
+ * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
245
+ * order to use the resulting object in the virtual DOM. The initial object was
246
+ * likely created as part of presenting a public API, so converting it back
247
+ * involved making it 'private' again (hence, `convertToPrivate`).
248
+ *
249
+ * @param node the child node to convert
250
+ * @returns a converted virtual DOM node
251
+ */
252
+ const convertToPrivate = (node) => {
253
+ if (typeof node.vtag === 'function') {
254
+ const vnodeData = Object.assign({}, node.vattrs);
255
+ if (node.vkey) {
256
+ vnodeData.key = node.vkey;
257
+ }
258
+ if (node.vname) {
259
+ vnodeData.name = node.vname;
260
+ }
261
+ return h(node.vtag, vnodeData, ...(node.vchildren || []));
262
+ }
263
+ const vnode = newVNode(node.vtag, node.vtext);
264
+ vnode.$attrs$ = node.vattrs;
265
+ vnode.$children$ = node.vchildren;
266
+ vnode.$key$ = node.vkey;
267
+ vnode.$name$ = node.vname;
268
+ return vnode;
269
+ };
270
+ // Private
271
+ const computeMode = (elm) => modeResolutionChain.map((h) => h(elm)).find((m) => !!m);
272
+ // Public
273
+ const setMode = (handler) => modeResolutionChain.push(handler);
274
+ const getMode = (ref) => getHostRef(ref).$modeName$;
275
+ /**
276
+ * Parse a new property value for a given property type.
277
+ *
278
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
279
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
280
+ * 1. `any`, the type given to `propValue` in the function signature
281
+ * 2. the type stored from `propType`.
282
+ *
283
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
284
+ *
285
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
286
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
287
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
288
+ * ```tsx
289
+ * <my-cmp prop-val={0}></my-cmp>
290
+ * ```
291
+ *
292
+ * HTML prop values on the other hand, will always a string
293
+ *
294
+ * @param propValue the new value to coerce to some type
295
+ * @param propType the type of the prop, expressed as a binary number
296
+ * @returns the parsed/coerced value
297
+ */
298
+ const parsePropertyValue = (propValue, propType) => {
299
+ // ensure this value is of the correct prop type
300
+ if (propValue != null && !isComplexType(propValue)) {
301
+ if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
302
+ // per the HTML spec, any string value means it is a boolean true value
303
+ // but we'll cheat here and say that the string "false" is the boolean false
304
+ return propValue === 'false' ? false : propValue === '' || !!propValue;
305
+ }
306
+ if (propType & 2 /* MEMBER_FLAGS.Number */) {
307
+ // force it to be a number
308
+ return parseFloat(propValue);
309
+ }
310
+ if (propType & 1 /* MEMBER_FLAGS.String */) {
311
+ // could have been passed as a number or boolean
312
+ // but we still want it as a string
313
+ return String(propValue);
314
+ }
315
+ // redundant return here for better minification
316
+ return propValue;
317
+ }
318
+ // not sure exactly what type we want
319
+ // so no need to change to a different type
320
+ return propValue;
321
+ };
322
+ const getElement = (ref) => (getHostRef(ref).$hostElement$ );
323
+ const createEvent = (ref, name, flags) => {
324
+ const elm = getElement(ref);
325
+ return {
326
+ emit: (detail) => {
327
+ return emitEvent(elm, name, {
328
+ bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
329
+ composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
330
+ cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
331
+ detail,
332
+ });
333
+ },
334
+ };
335
+ };
336
+ /**
337
+ * Helper function to create & dispatch a custom Event on a provided target
338
+ * @param elm the target of the Event
339
+ * @param name the name to give the custom Event
340
+ * @param opts options for configuring a custom Event
341
+ * @returns the custom Event
342
+ */
343
+ const emitEvent = (elm, name, opts) => {
344
+ const ev = plt.ce(name, opts);
345
+ elm.dispatchEvent(ev);
346
+ return ev;
347
+ };
348
+ const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
349
+ const registerStyle = (scopeId, cssText, allowCS) => {
350
+ let style = styles.get(scopeId);
351
+ if (supportsConstructableStylesheets && allowCS) {
352
+ style = (style || new CSSStyleSheet());
353
+ if (typeof style === 'string') {
354
+ style = cssText;
355
+ }
356
+ else {
357
+ style.replaceSync(cssText);
358
+ }
359
+ }
360
+ else {
361
+ style = cssText;
362
+ }
363
+ styles.set(scopeId, style);
364
+ };
365
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
366
+ var _a;
367
+ let scopeId = getScopeId(cmpMeta, mode);
368
+ const style = styles.get(scopeId);
369
+ // if an element is NOT connected then getRootNode() will return the wrong root node
370
+ // so the fallback is to always use the document for the root node in those cases
371
+ styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
372
+ if (style) {
373
+ if (typeof style === 'string') {
374
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
375
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
376
+ let styleElm;
377
+ if (!appliedStyles) {
378
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
379
+ }
380
+ if (!appliedStyles.has(scopeId)) {
381
+ {
382
+ // TODO(STENCIL-659): Remove code implementing the CSS variable shim
383
+ {
384
+ styleElm = doc.createElement('style');
385
+ styleElm.innerHTML = style;
386
+ }
387
+ // Apply CSP nonce to the style tag if it exists
388
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
389
+ if (nonce != null) {
390
+ styleElm.setAttribute('nonce', nonce);
391
+ }
392
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
393
+ }
394
+ if (appliedStyles) {
395
+ appliedStyles.add(scopeId);
396
+ }
397
+ }
398
+ }
399
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
400
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
401
+ }
402
+ }
403
+ return scopeId;
404
+ };
405
+ const attachStyles = (hostRef) => {
406
+ const cmpMeta = hostRef.$cmpMeta$;
407
+ const elm = hostRef.$hostElement$;
408
+ const flags = cmpMeta.$flags$;
409
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
410
+ const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$);
411
+ // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
412
+ if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
413
+ // only required when we're NOT using native shadow dom (slot)
414
+ // or this browser doesn't support native shadow dom
415
+ // and this host element was NOT created with SSR
416
+ // let's pick out the inner content for slot projection
417
+ // create a node to represent where the original
418
+ // content was first placed, which is useful later on
419
+ // DOM WRITE!!
420
+ elm['s-sc'] = scopeId;
421
+ elm.classList.add(scopeId + '-h');
422
+ if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
423
+ elm.classList.add(scopeId + '-s');
424
+ }
425
+ }
426
+ endAttachStyles();
427
+ };
428
+ const getScopeId = (cmp, mode) => 'sc-' + (mode && cmp.$flags$ & 32 /* CMP_FLAGS.hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);
429
+ /**
430
+ * Production setAccessor() function based on Preact by
431
+ * Jason Miller (@developit)
432
+ * Licensed under the MIT License
433
+ * https://github.com/developit/preact/blob/master/LICENSE
434
+ *
435
+ * Modified for Stencil's compiler and vdom
436
+ */
437
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
438
+ if (oldValue !== newValue) {
439
+ let isProp = isMemberInElement(elm, memberName);
440
+ let ln = memberName.toLowerCase();
441
+ if (memberName === 'class') {
442
+ const classList = elm.classList;
443
+ const oldClasses = parseClassList(oldValue);
444
+ const newClasses = parseClassList(newValue);
445
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
446
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
447
+ }
448
+ else if (memberName === 'style') {
449
+ // update style attribute, css properties and values
450
+ {
451
+ for (const prop in oldValue) {
452
+ if (!newValue || newValue[prop] == null) {
453
+ if (prop.includes('-')) {
454
+ elm.style.removeProperty(prop);
455
+ }
456
+ else {
457
+ elm.style[prop] = '';
458
+ }
459
+ }
460
+ }
461
+ }
462
+ for (const prop in newValue) {
463
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
464
+ if (prop.includes('-')) {
465
+ elm.style.setProperty(prop, newValue[prop]);
466
+ }
467
+ else {
468
+ elm.style[prop] = newValue[prop];
469
+ }
470
+ }
471
+ }
472
+ }
473
+ else if (memberName === 'key')
474
+ ;
475
+ else if (memberName === 'ref') {
476
+ // minifier will clean this up
477
+ if (newValue) {
478
+ newValue(elm);
479
+ }
480
+ }
481
+ else if ((!isProp ) &&
482
+ memberName[0] === 'o' &&
483
+ memberName[1] === 'n') {
484
+ // Event Handlers
485
+ // so if the member name starts with "on" and the 3rd characters is
486
+ // a capital letter, and it's not already a member on the element,
487
+ // then we're assuming it's an event listener
488
+ if (memberName[2] === '-') {
489
+ // on- prefixed events
490
+ // allows to be explicit about the dom event to listen without any magic
491
+ // under the hood:
492
+ // <my-cmp on-click> // listens for "click"
493
+ // <my-cmp on-Click> // listens for "Click"
494
+ // <my-cmp on-ionChange> // listens for "ionChange"
495
+ // <my-cmp on-EVENTS> // listens for "EVENTS"
496
+ memberName = memberName.slice(3);
497
+ }
498
+ else if (isMemberInElement(win, ln)) {
499
+ // standard event
500
+ // the JSX attribute could have been "onMouseOver" and the
501
+ // member name "onmouseover" is on the window's prototype
502
+ // so let's add the listener "mouseover", which is all lowercased
503
+ memberName = ln.slice(2);
504
+ }
505
+ else {
506
+ // custom event
507
+ // the JSX attribute could have been "onMyCustomEvent"
508
+ // so let's trim off the "on" prefix and lowercase the first character
509
+ // and add the listener "myCustomEvent"
510
+ // except for the first character, we keep the event name case
511
+ memberName = ln[2] + memberName.slice(3);
512
+ }
513
+ if (oldValue) {
514
+ plt.rel(elm, memberName, oldValue, false);
515
+ }
516
+ if (newValue) {
517
+ plt.ael(elm, memberName, newValue, false);
518
+ }
519
+ }
520
+ else {
521
+ // Set property if it exists and it's not a SVG
522
+ const isComplex = isComplexType(newValue);
523
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
524
+ try {
525
+ if (!elm.tagName.includes('-')) {
526
+ const n = newValue == null ? '' : newValue;
527
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
528
+ if (memberName === 'list') {
529
+ isProp = false;
530
+ }
531
+ else if (oldValue == null || elm[memberName] != n) {
532
+ elm[memberName] = n;
533
+ }
534
+ }
535
+ else {
536
+ elm[memberName] = newValue;
537
+ }
538
+ }
539
+ catch (e) { }
540
+ }
541
+ /**
542
+ * Need to manually update attribute if:
543
+ * - memberName is not an attribute
544
+ * - if we are rendering the host element in order to reflect attribute
545
+ * - if it's a SVG, since properties might not work in <svg>
546
+ * - if the newValue is null/undefined or 'false'.
547
+ */
548
+ let xlink = false;
549
+ {
550
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
551
+ memberName = ln;
552
+ xlink = true;
553
+ }
554
+ }
555
+ if (newValue == null || newValue === false) {
556
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
557
+ if (xlink) {
558
+ elm.removeAttributeNS(XLINK_NS, memberName);
559
+ }
560
+ else {
561
+ elm.removeAttribute(memberName);
562
+ }
563
+ }
564
+ }
565
+ else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
566
+ newValue = newValue === true ? '' : newValue;
567
+ if (xlink) {
568
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
569
+ }
570
+ else {
571
+ elm.setAttribute(memberName, newValue);
572
+ }
573
+ }
574
+ }
575
+ }
576
+ };
577
+ const parseClassListRegex = /\s/;
578
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
579
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
580
+ // if the element passed in is a shadow root, which is a document fragment
581
+ // then we want to be adding attrs/props to the shadow root's "host" element
582
+ // if it's not a shadow root, then we add attrs/props to the same element
583
+ const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
584
+ ? newVnode.$elm$.host
585
+ : newVnode.$elm$;
586
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
587
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
588
+ {
589
+ // remove attributes no longer present on the vnode by setting them to undefined
590
+ for (memberName in oldVnodeAttrs) {
591
+ if (!(memberName in newVnodeAttrs)) {
592
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
593
+ }
594
+ }
595
+ }
596
+ // add new & update changed attributes
597
+ for (memberName in newVnodeAttrs) {
598
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
599
+ }
600
+ };
601
+ /**
602
+ * Create a DOM Node corresponding to one of the children of a given VNode.
603
+ *
604
+ * @param oldParentVNode the parent VNode from the previous render
605
+ * @param newParentVNode the parent VNode from the current render
606
+ * @param childIndex the index of the VNode, in the _new_ parent node's
607
+ * children, for which we will create a new DOM node
608
+ * @param parentElm the parent DOM node which our new node will be a child of
609
+ * @returns the newly created node
610
+ */
611
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
612
+ // tslint:disable-next-line: prefer-const
613
+ const newVNode = newParentVNode.$children$[childIndex];
614
+ let i = 0;
615
+ let elm;
616
+ let childNode;
617
+ let oldVNode;
618
+ if (!useNativeShadowDom) {
619
+ // remember for later we need to check to relocate nodes
620
+ checkSlotRelocate = true;
621
+ if (newVNode.$tag$ === 'slot') {
622
+ if (scopeId) {
623
+ // scoped css needs to add its scoped id to the parent element
624
+ parentElm.classList.add(scopeId + '-s');
625
+ }
626
+ newVNode.$flags$ |= newVNode.$children$
627
+ ? // slot element has fallback content
628
+ 2 /* VNODE_FLAGS.isSlotFallback */
629
+ : // slot element does not have fallback content
630
+ 1 /* VNODE_FLAGS.isSlotReference */;
631
+ }
632
+ }
633
+ if (newVNode.$text$ !== null) {
634
+ // create text node
635
+ elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
636
+ }
637
+ else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
638
+ // create a slot reference node
639
+ elm = newVNode.$elm$ =
640
+ doc.createTextNode('');
641
+ }
642
+ else {
643
+ if (!isSvgMode) {
644
+ isSvgMode = newVNode.$tag$ === 'svg';
645
+ }
646
+ // create element
647
+ elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
648
+ ? 'slot-fb'
649
+ : newVNode.$tag$)
650
+ );
651
+ if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
652
+ isSvgMode = false;
653
+ }
654
+ // add css classes, attrs, props, listeners, etc.
655
+ {
656
+ updateElement(null, newVNode, isSvgMode);
657
+ }
658
+ if (isDef(scopeId) && elm['s-si'] !== scopeId) {
659
+ // if there is a scopeId and this is the initial render
660
+ // then let's add the scopeId as a css class
661
+ elm.classList.add((elm['s-si'] = scopeId));
662
+ }
663
+ if (newVNode.$children$) {
664
+ for (i = 0; i < newVNode.$children$.length; ++i) {
665
+ // create the node
666
+ childNode = createElm(oldParentVNode, newVNode, i, elm);
667
+ // return node could have been null
668
+ if (childNode) {
669
+ // append our new node
670
+ elm.appendChild(childNode);
671
+ }
672
+ }
673
+ }
674
+ {
675
+ if (newVNode.$tag$ === 'svg') {
676
+ // Only reset the SVG context when we're exiting <svg> element
677
+ isSvgMode = false;
678
+ }
679
+ else if (elm.tagName === 'foreignObject') {
680
+ // Reenter SVG context when we're exiting <foreignObject> element
681
+ isSvgMode = true;
682
+ }
683
+ }
684
+ }
685
+ {
686
+ elm['s-hn'] = hostTagName;
687
+ if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
688
+ // remember the content reference comment
689
+ elm['s-sr'] = true;
690
+ // remember the content reference comment
691
+ elm['s-cr'] = contentRef;
692
+ // remember the slot name, or empty string for default slot
693
+ elm['s-sn'] = newVNode.$name$ || '';
694
+ // check if we've got an old vnode for this slot
695
+ oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
696
+ if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
697
+ // we've got an old slot vnode and the wrapper is being replaced
698
+ // so let's move the old slot content back to it's original location
699
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
700
+ }
701
+ }
702
+ }
703
+ return elm;
704
+ };
705
+ const putBackInOriginalLocation = (parentElm, recursive) => {
706
+ plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
707
+ const oldSlotChildNodes = parentElm.childNodes;
708
+ for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
709
+ const childNode = oldSlotChildNodes[i];
710
+ if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
711
+ // // this child node in the old element is from another component
712
+ // // remove this node from the old slot's parent
713
+ // childNode.remove();
714
+ // and relocate it back to it's original location
715
+ parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
716
+ // remove the old original location comment entirely
717
+ // later on the patch function will know what to do
718
+ // and move this to the correct spot in need be
719
+ childNode['s-ol'].remove();
720
+ childNode['s-ol'] = undefined;
721
+ checkSlotRelocate = true;
722
+ }
723
+ if (recursive) {
724
+ putBackInOriginalLocation(childNode, recursive);
725
+ }
726
+ }
727
+ plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
728
+ };
729
+ /**
730
+ * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
731
+ * add them to the DOM in the appropriate place.
732
+ *
733
+ * @param parentElm the DOM node which should be used as a parent for the new
734
+ * DOM nodes
735
+ * @param before a child of the `parentElm` which the new children should be
736
+ * inserted before (optional)
737
+ * @param parentVNode the parent virtual DOM node
738
+ * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
739
+ * @param startIdx the index in the child virtual DOM nodes at which to start
740
+ * creating DOM nodes (inclusive)
741
+ * @param endIdx the index in the child virtual DOM nodes at which to stop
742
+ * creating DOM nodes (inclusive)
743
+ */
744
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
745
+ let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
746
+ let childNode;
747
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
748
+ containerElm = containerElm.shadowRoot;
749
+ }
750
+ for (; startIdx <= endIdx; ++startIdx) {
751
+ if (vnodes[startIdx]) {
752
+ childNode = createElm(null, parentVNode, startIdx, parentElm);
753
+ if (childNode) {
754
+ vnodes[startIdx].$elm$ = childNode;
755
+ containerElm.insertBefore(childNode, referenceNode(before) );
756
+ }
757
+ }
758
+ }
759
+ };
760
+ /**
761
+ * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
762
+ * This can be used to, for instance, clean up after a list of children which
763
+ * should no longer be shown.
764
+ *
765
+ * This function also handles some of Stencil's slot relocation logic.
766
+ *
767
+ * @param vnodes a list of virtual DOM nodes to remove
768
+ * @param startIdx the index at which to start removing nodes (inclusive)
769
+ * @param endIdx the index at which to stop removing nodes (inclusive)
770
+ */
771
+ const removeVnodes = (vnodes, startIdx, endIdx) => {
772
+ for (let index = startIdx; index <= endIdx; ++index) {
773
+ const vnode = vnodes[index];
774
+ if (vnode) {
775
+ const elm = vnode.$elm$;
776
+ nullifyVNodeRefs(vnode);
777
+ if (elm) {
778
+ {
779
+ // we're removing this element
780
+ // so it's possible we need to show slot fallback content now
781
+ checkSlotFallbackVisibility = true;
782
+ if (elm['s-ol']) {
783
+ // remove the original location comment
784
+ elm['s-ol'].remove();
785
+ }
786
+ else {
787
+ // it's possible that child nodes of the node
788
+ // that's being removed are slot nodes
789
+ putBackInOriginalLocation(elm, true);
790
+ }
791
+ }
792
+ // remove the vnode's element from the dom
793
+ elm.remove();
794
+ }
795
+ }
796
+ }
797
+ };
798
+ /**
799
+ * Reconcile the children of a new VNode with the children of an old VNode by
800
+ * traversing the two collections of children, identifying nodes that are
801
+ * conserved or changed, calling out to `patch` to make any necessary
802
+ * updates to the DOM, and rearranging DOM nodes as needed.
803
+ *
804
+ * The algorithm for reconciling children works by analyzing two 'windows' onto
805
+ * the two arrays of children (`oldCh` and `newCh`). We keep track of the
806
+ * 'windows' by storing start and end indices and references to the
807
+ * corresponding array entries. Initially the two 'windows' are basically equal
808
+ * to the entire array, but we progressively narrow the windows until there are
809
+ * no children left to update by doing the following:
810
+ *
811
+ * 1. Skip any `null` entries at the beginning or end of the two arrays, so
812
+ * that if we have an initial array like the following we'll end up dealing
813
+ * only with a window bounded by the highlighted elements:
814
+ *
815
+ * [null, null, VNode1 , ... , VNode2, null, null]
816
+ * ^^^^^^ ^^^^^^
817
+ *
818
+ * 2. Check to see if the elements at the head and tail positions are equal
819
+ * across the windows. This will basically detect elements which haven't
820
+ * been added, removed, or changed position, i.e. if you had the following
821
+ * VNode elements (represented as HTML):
822
+ *
823
+ * oldVNode: `<div><p><span>HEY</span></p></div>`
824
+ * newVNode: `<div><p><span>THERE</span></p></div>`
825
+ *
826
+ * Then when comparing the children of the `<div>` tag we check the equality
827
+ * of the VNodes corresponding to the `<p>` tags and, since they are the
828
+ * same tag in the same position, we'd be able to avoid completely
829
+ * re-rendering the subtree under them with a new DOM element and would just
830
+ * call out to `patch` to handle reconciling their children and so on.
831
+ *
832
+ * 3. Check, for both windows, to see if the element at the beginning of the
833
+ * window corresponds to the element at the end of the other window. This is
834
+ * a heuristic which will let us identify _some_ situations in which
835
+ * elements have changed position, for instance it _should_ detect that the
836
+ * children nodes themselves have not changed but merely moved in the
837
+ * following example:
838
+ *
839
+ * oldVNode: `<div><element-one /><element-two /></div>`
840
+ * newVNode: `<div><element-two /><element-one /></div>`
841
+ *
842
+ * If we find cases like this then we also need to move the concrete DOM
843
+ * elements corresponding to the moved children to write the re-order to the
844
+ * DOM.
845
+ *
846
+ * 4. Finally, if VNodes have the `key` attribute set on them we check for any
847
+ * nodes in the old children which have the same key as the first element in
848
+ * our window on the new children. If we find such a node we handle calling
849
+ * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
850
+ * what we find.
851
+ *
852
+ * Finally, once we've narrowed our 'windows' to the point that either of them
853
+ * collapse (i.e. they have length 0) we then handle any remaining VNode
854
+ * insertion or deletion that needs to happen to get a DOM state that correctly
855
+ * reflects the new child VNodes. If, for instance, after our window on the old
856
+ * children has collapsed we still have more nodes on the new children that
857
+ * we haven't dealt with yet then we need to add them, or if the new children
858
+ * collapse but we still have unhandled _old_ children then we need to make
859
+ * sure the corresponding DOM nodes are removed.
860
+ *
861
+ * @param parentElm the node into which the parent VNode is rendered
862
+ * @param oldCh the old children of the parent node
863
+ * @param newVNode the new VNode which will replace the parent
864
+ * @param newCh the new children of the parent node
865
+ */
866
+ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
867
+ let oldStartIdx = 0;
868
+ let newStartIdx = 0;
869
+ let idxInOld = 0;
870
+ let i = 0;
871
+ let oldEndIdx = oldCh.length - 1;
872
+ let oldStartVnode = oldCh[0];
873
+ let oldEndVnode = oldCh[oldEndIdx];
874
+ let newEndIdx = newCh.length - 1;
875
+ let newStartVnode = newCh[0];
876
+ let newEndVnode = newCh[newEndIdx];
877
+ let node;
878
+ let elmToMove;
879
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
880
+ if (oldStartVnode == null) {
881
+ // VNode might have been moved left
882
+ oldStartVnode = oldCh[++oldStartIdx];
883
+ }
884
+ else if (oldEndVnode == null) {
885
+ oldEndVnode = oldCh[--oldEndIdx];
886
+ }
887
+ else if (newStartVnode == null) {
888
+ newStartVnode = newCh[++newStartIdx];
889
+ }
890
+ else if (newEndVnode == null) {
891
+ newEndVnode = newCh[--newEndIdx];
892
+ }
893
+ else if (isSameVnode(oldStartVnode, newStartVnode)) {
894
+ // if the start nodes are the same then we should patch the new VNode
895
+ // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
896
+ // indices to reflect that. We don't need to move any DOM Nodes around
897
+ // since things are matched up in order.
898
+ patch(oldStartVnode, newStartVnode);
899
+ oldStartVnode = oldCh[++oldStartIdx];
900
+ newStartVnode = newCh[++newStartIdx];
901
+ }
902
+ else if (isSameVnode(oldEndVnode, newEndVnode)) {
903
+ // likewise, if the end nodes are the same we patch new onto old and
904
+ // decrement our end indices, and also likewise in this case we don't
905
+ // need to move any DOM Nodes.
906
+ patch(oldEndVnode, newEndVnode);
907
+ oldEndVnode = oldCh[--oldEndIdx];
908
+ newEndVnode = newCh[--newEndIdx];
909
+ }
910
+ else if (isSameVnode(oldStartVnode, newEndVnode)) {
911
+ // case: "Vnode moved right"
912
+ //
913
+ // We've found that the last node in our window on the new children is
914
+ // the same VNode as the _first_ node in our window on the old children
915
+ // we're dealing with now. Visually, this is the layout of these two
916
+ // nodes:
917
+ //
918
+ // newCh: [..., newStartVnode , ... , newEndVnode , ...]
919
+ // ^^^^^^^^^^^
920
+ // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
921
+ // ^^^^^^^^^^^^^
922
+ //
923
+ // In this situation we need to patch `newEndVnode` onto `oldStartVnode`
924
+ // and move the DOM element for `oldStartVnode`.
925
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
926
+ putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
927
+ }
928
+ patch(oldStartVnode, newEndVnode);
929
+ // We need to move the element for `oldStartVnode` into a position which
930
+ // will be appropriate for `newEndVnode`. For this we can use
931
+ // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
932
+ // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
933
+ // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
934
+ //
935
+ // <old-start-node />
936
+ // <some-intervening-node />
937
+ // <old-end-node />
938
+ // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
939
+ // <next-sibling />
940
+ //
941
+ // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
942
+ // the node for `oldStartVnode` at the end of the children of
943
+ // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
944
+ // aren't any siblings, and passing `null` to `Node.insertBefore` will
945
+ // append it to the children of the parent element.
946
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
947
+ oldStartVnode = oldCh[++oldStartIdx];
948
+ newEndVnode = newCh[--newEndIdx];
949
+ }
950
+ else if (isSameVnode(oldEndVnode, newStartVnode)) {
951
+ // case: "Vnode moved left"
952
+ //
953
+ // We've found that the first node in our window on the new children is
954
+ // the same VNode as the _last_ node in our window on the old children.
955
+ // Visually, this is the layout of these two nodes:
956
+ //
957
+ // newCh: [..., newStartVnode , ... , newEndVnode , ...]
958
+ // ^^^^^^^^^^^^^
959
+ // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
960
+ // ^^^^^^^^^^^
961
+ //
962
+ // In this situation we need to patch `newStartVnode` onto `oldEndVnode`
963
+ // (which will handle updating any changed attributes, reconciling their
964
+ // children etc) but we also need to move the DOM node to which
965
+ // `oldEndVnode` corresponds.
966
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
967
+ putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
968
+ }
969
+ patch(oldEndVnode, newStartVnode);
970
+ // We've already checked above if `oldStartVnode` and `newStartVnode` are
971
+ // the same node, so since we're here we know that they are not. Thus we
972
+ // can move the element for `oldEndVnode` _before_ the element for
973
+ // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
974
+ // future.
975
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
976
+ oldEndVnode = oldCh[--oldEndIdx];
977
+ newStartVnode = newCh[++newStartIdx];
978
+ }
979
+ else {
980
+ // Here we do some checks to match up old and new nodes based on the
981
+ // `$key$` attribute, which is set by putting a `key="my-key"` attribute
982
+ // in the JSX for a DOM element in the implementation of a Stencil
983
+ // component.
984
+ //
985
+ // First we check to see if there are any nodes in the array of old
986
+ // children which have the same key as the first node in the new
987
+ // children.
988
+ idxInOld = -1;
989
+ {
990
+ for (i = oldStartIdx; i <= oldEndIdx; ++i) {
991
+ if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
992
+ idxInOld = i;
993
+ break;
994
+ }
995
+ }
996
+ }
997
+ if (idxInOld >= 0) {
998
+ // We found a node in the old children which matches up with the first
999
+ // node in the new children! So let's deal with that
1000
+ elmToMove = oldCh[idxInOld];
1001
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1002
+ // the tag doesn't match so we'll need a new DOM element
1003
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
1004
+ }
1005
+ else {
1006
+ patch(elmToMove, newStartVnode);
1007
+ // invalidate the matching old node so that we won't try to update it
1008
+ // again later on
1009
+ oldCh[idxInOld] = undefined;
1010
+ node = elmToMove.$elm$;
1011
+ }
1012
+ newStartVnode = newCh[++newStartIdx];
1013
+ }
1014
+ else {
1015
+ // We either didn't find an element in the old children that matches
1016
+ // the key of the first new child OR the build is not using `key`
1017
+ // attributes at all. In either case we need to create a new element
1018
+ // for the new node.
1019
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
1020
+ newStartVnode = newCh[++newStartIdx];
1021
+ }
1022
+ if (node) {
1023
+ // if we created a new node then handle inserting it to the DOM
1024
+ {
1025
+ parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
1026
+ }
1027
+ }
1028
+ }
1029
+ }
1030
+ if (oldStartIdx > oldEndIdx) {
1031
+ // we have some more new nodes to add which don't match up with old nodes
1032
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
1033
+ }
1034
+ else if (newStartIdx > newEndIdx) {
1035
+ // there are nodes in the `oldCh` array which no longer correspond to nodes
1036
+ // in the new array, so lets remove them (which entails cleaning up the
1037
+ // relevant DOM nodes)
1038
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
1039
+ }
1040
+ };
1041
+ /**
1042
+ * Compare two VNodes to determine if they are the same
1043
+ *
1044
+ * **NB**: This function is an equality _heuristic_ based on the available
1045
+ * information set on the two VNodes and can be misleading under certain
1046
+ * circumstances. In particular, if the two nodes do not have `key` attrs
1047
+ * (available under `$key$` on VNodes) then the function falls back on merely
1048
+ * checking that they have the same tag.
1049
+ *
1050
+ * So, in other words, if `key` attrs are not set on VNodes which may be
1051
+ * changing order within a `children` array or something along those lines then
1052
+ * we could obtain a false negative and then have to do needless re-rendering
1053
+ * (i.e. we'd say two VNodes aren't equal when in fact they should be).
1054
+ *
1055
+ * @param leftVNode the first VNode to check
1056
+ * @param rightVNode the second VNode to check
1057
+ * @returns whether they're equal or not
1058
+ */
1059
+ const isSameVnode = (leftVNode, rightVNode) => {
1060
+ // compare if two vnode to see if they're "technically" the same
1061
+ // need to have the same element tag, and same key to be the same
1062
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
1063
+ if (leftVNode.$tag$ === 'slot') {
1064
+ return leftVNode.$name$ === rightVNode.$name$;
1065
+ }
1066
+ // this will be set if components in the build have `key` attrs set on them
1067
+ {
1068
+ return leftVNode.$key$ === rightVNode.$key$;
1069
+ }
1070
+ }
1071
+ return false;
1072
+ };
1073
+ const referenceNode = (node) => {
1074
+ // this node was relocated to a new location in the dom
1075
+ // because of some other component's slot
1076
+ // but we still have an html comment in place of where
1077
+ // it's original location was according to it's original vdom
1078
+ return (node && node['s-ol']) || node;
1079
+ };
1080
+ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
1081
+ /**
1082
+ * Handle reconciling an outdated VNode with a new one which corresponds to
1083
+ * it. This function handles flushing updates to the DOM and reconciling the
1084
+ * children of the two nodes (if any).
1085
+ *
1086
+ * @param oldVNode an old VNode whose DOM element and children we want to update
1087
+ * @param newVNode a new VNode representing an updated version of the old one
1088
+ */
1089
+ const patch = (oldVNode, newVNode) => {
1090
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
1091
+ const oldChildren = oldVNode.$children$;
1092
+ const newChildren = newVNode.$children$;
1093
+ const tag = newVNode.$tag$;
1094
+ const text = newVNode.$text$;
1095
+ let defaultHolder;
1096
+ if (text === null) {
1097
+ {
1098
+ // test if we're rendering an svg element, or still rendering nodes inside of one
1099
+ // only add this to the when the compiler sees we're using an svg somewhere
1100
+ isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
1101
+ }
1102
+ {
1103
+ if (tag === 'slot')
1104
+ ;
1105
+ else {
1106
+ // either this is the first render of an element OR it's an update
1107
+ // AND we already know it's possible it could have changed
1108
+ // this updates the element's css classes, attrs, props, listeners, etc.
1109
+ updateElement(oldVNode, newVNode, isSvgMode);
1110
+ }
1111
+ }
1112
+ if (oldChildren !== null && newChildren !== null) {
1113
+ // looks like there's child vnodes for both the old and new vnodes
1114
+ // so we need to call `updateChildren` to reconcile them
1115
+ updateChildren(elm, oldChildren, newVNode, newChildren);
1116
+ }
1117
+ else if (newChildren !== null) {
1118
+ // no old child vnodes, but there are new child vnodes to add
1119
+ if (oldVNode.$text$ !== null) {
1120
+ // the old vnode was text, so be sure to clear it out
1121
+ elm.textContent = '';
1122
+ }
1123
+ // add the new vnode children
1124
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
1125
+ }
1126
+ else if (oldChildren !== null) {
1127
+ // no new child vnodes, but there are old child vnodes to remove
1128
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
1129
+ }
1130
+ if (isSvgMode && tag === 'svg') {
1131
+ isSvgMode = false;
1132
+ }
1133
+ }
1134
+ else if ((defaultHolder = elm['s-cr'])) {
1135
+ // this element has slotted content
1136
+ defaultHolder.parentNode.textContent = text;
1137
+ }
1138
+ else if (oldVNode.$text$ !== text) {
1139
+ // update the text content for the text only vnode
1140
+ // and also only if the text is different than before
1141
+ elm.data = text;
1142
+ }
1143
+ };
1144
+ const updateFallbackSlotVisibility = (elm) => {
1145
+ // tslint:disable-next-line: prefer-const
1146
+ const childNodes = elm.childNodes;
1147
+ let childNode;
1148
+ let i;
1149
+ let ilen;
1150
+ let j;
1151
+ let slotNameAttr;
1152
+ let nodeType;
1153
+ for (i = 0, ilen = childNodes.length; i < ilen; i++) {
1154
+ childNode = childNodes[i];
1155
+ if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1156
+ if (childNode['s-sr']) {
1157
+ // this is a slot fallback node
1158
+ // get the slot name for this slot reference node
1159
+ slotNameAttr = childNode['s-sn'];
1160
+ // by default always show a fallback slot node
1161
+ // then hide it if there are other slots in the light dom
1162
+ childNode.hidden = false;
1163
+ for (j = 0; j < ilen; j++) {
1164
+ nodeType = childNodes[j].nodeType;
1165
+ if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
1166
+ // this sibling node is from a different component OR is a named fallback slot node
1167
+ if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
1168
+ childNode.hidden = true;
1169
+ break;
1170
+ }
1171
+ }
1172
+ else {
1173
+ // this is a default fallback slot node
1174
+ // any element or text node (with content)
1175
+ // should hide the default fallback slot node
1176
+ if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1177
+ (nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
1178
+ childNode.hidden = true;
1179
+ break;
1180
+ }
1181
+ }
1182
+ }
1183
+ }
1184
+ // keep drilling down
1185
+ updateFallbackSlotVisibility(childNode);
1186
+ }
1187
+ }
1188
+ };
1189
+ const relocateNodes = [];
1190
+ const relocateSlotContent = (elm) => {
1191
+ // tslint:disable-next-line: prefer-const
1192
+ let childNode;
1193
+ let node;
1194
+ let hostContentNodes;
1195
+ let slotNameAttr;
1196
+ let relocateNodeData;
1197
+ let j;
1198
+ let i = 0;
1199
+ const childNodes = elm.childNodes;
1200
+ const ilen = childNodes.length;
1201
+ for (; i < ilen; i++) {
1202
+ childNode = childNodes[i];
1203
+ if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
1204
+ // first got the content reference comment node
1205
+ // then we got it's parent, which is where all the host content is in now
1206
+ hostContentNodes = node.parentNode.childNodes;
1207
+ slotNameAttr = childNode['s-sn'];
1208
+ for (j = hostContentNodes.length - 1; j >= 0; j--) {
1209
+ node = hostContentNodes[j];
1210
+ if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
1211
+ // let's do some relocating to its new home
1212
+ // but never relocate a content reference node
1213
+ // that is suppose to always represent the original content location
1214
+ if (isNodeLocatedInSlot(node, slotNameAttr)) {
1215
+ // it's possible we've already decided to relocate this node
1216
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1217
+ // made some changes to slots
1218
+ // let's make sure we also double check
1219
+ // fallbacks are correctly hidden or shown
1220
+ checkSlotFallbackVisibility = true;
1221
+ node['s-sn'] = node['s-sn'] || slotNameAttr;
1222
+ if (relocateNodeData) {
1223
+ // previously we never found a slot home for this node
1224
+ // but turns out we did, so let's remember it now
1225
+ relocateNodeData.$slotRefNode$ = childNode;
1226
+ }
1227
+ else {
1228
+ // add to our list of nodes to relocate
1229
+ relocateNodes.push({
1230
+ $slotRefNode$: childNode,
1231
+ $nodeToRelocate$: node,
1232
+ });
1233
+ }
1234
+ if (node['s-sr']) {
1235
+ relocateNodes.map((relocateNode) => {
1236
+ if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
1237
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1238
+ if (relocateNodeData && !relocateNode.$slotRefNode$) {
1239
+ relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
1240
+ }
1241
+ }
1242
+ });
1243
+ }
1244
+ }
1245
+ else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1246
+ // so far this element does not have a slot home, not setting slotRefNode on purpose
1247
+ // if we never find a home for this element then we'll need to hide it
1248
+ relocateNodes.push({
1249
+ $nodeToRelocate$: node,
1250
+ });
1251
+ }
1252
+ }
1253
+ }
1254
+ }
1255
+ if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1256
+ relocateSlotContent(childNode);
1257
+ }
1258
+ }
1259
+ };
1260
+ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
1261
+ if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1262
+ if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
1263
+ return true;
1264
+ }
1265
+ if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
1266
+ return true;
1267
+ }
1268
+ return false;
1269
+ }
1270
+ if (nodeToRelocate['s-sn'] === slotNameAttr) {
1271
+ return true;
1272
+ }
1273
+ return slotNameAttr === '';
1274
+ };
1275
+ /**
1276
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
1277
+ * calling them with `null`. This signals that the DOM element corresponding to
1278
+ * the VDom node has been removed from the DOM.
1279
+ *
1280
+ * @param vNode a virtual DOM node
1281
+ */
1282
+ const nullifyVNodeRefs = (vNode) => {
1283
+ {
1284
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1285
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1286
+ }
1287
+ };
1288
+ /**
1289
+ * The main entry point for Stencil's virtual DOM-based rendering engine
1290
+ *
1291
+ * Given a {@link d.HostRef} container and some virtual DOM nodes, this
1292
+ * function will handle creating a virtual DOM tree with a single root, patching
1293
+ * the current virtual DOM tree onto an old one (if any), dealing with slot
1294
+ * relocation, and reflecting attributes.
1295
+ *
1296
+ * @param hostRef data needed to root and render the virtual DOM tree, such as
1297
+ * the DOM node into which it should be rendered.
1298
+ * @param renderFnResults the virtual DOM nodes to be rendered
1299
+ */
1300
+ const renderVdom = (hostRef, renderFnResults) => {
1301
+ const hostElm = hostRef.$hostElement$;
1302
+ const cmpMeta = hostRef.$cmpMeta$;
1303
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1304
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1305
+ hostTagName = hostElm.tagName;
1306
+ if (cmpMeta.$attrsToReflect$) {
1307
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1308
+ cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
1309
+ }
1310
+ rootVnode.$tag$ = null;
1311
+ rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
1312
+ hostRef.$vnode$ = rootVnode;
1313
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
1314
+ {
1315
+ scopeId = hostElm['s-sc'];
1316
+ }
1317
+ {
1318
+ contentRef = hostElm['s-cr'];
1319
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1320
+ // always reset
1321
+ checkSlotFallbackVisibility = false;
1322
+ }
1323
+ // synchronous patch
1324
+ patch(oldVNode, rootVnode);
1325
+ {
1326
+ // while we're moving nodes around existing nodes, temporarily disable
1327
+ // the disconnectCallback from working
1328
+ plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1329
+ if (checkSlotRelocate) {
1330
+ relocateSlotContent(rootVnode.$elm$);
1331
+ let relocateData;
1332
+ let nodeToRelocate;
1333
+ let orgLocationNode;
1334
+ let parentNodeRef;
1335
+ let insertBeforeNode;
1336
+ let refNode;
1337
+ let i = 0;
1338
+ for (; i < relocateNodes.length; i++) {
1339
+ relocateData = relocateNodes[i];
1340
+ nodeToRelocate = relocateData.$nodeToRelocate$;
1341
+ if (!nodeToRelocate['s-ol']) {
1342
+ // add a reference node marking this node's original location
1343
+ // keep a reference to this node for later lookups
1344
+ orgLocationNode =
1345
+ doc.createTextNode('');
1346
+ orgLocationNode['s-nr'] = nodeToRelocate;
1347
+ nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
1348
+ }
1349
+ }
1350
+ for (i = 0; i < relocateNodes.length; i++) {
1351
+ relocateData = relocateNodes[i];
1352
+ nodeToRelocate = relocateData.$nodeToRelocate$;
1353
+ if (relocateData.$slotRefNode$) {
1354
+ // by default we're just going to insert it directly
1355
+ // after the slot reference node
1356
+ parentNodeRef = relocateData.$slotRefNode$.parentNode;
1357
+ insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
1358
+ orgLocationNode = nodeToRelocate['s-ol'];
1359
+ while ((orgLocationNode = orgLocationNode.previousSibling)) {
1360
+ refNode = orgLocationNode['s-nr'];
1361
+ if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1362
+ refNode = refNode.nextSibling;
1363
+ if (!refNode || !refNode['s-nr']) {
1364
+ insertBeforeNode = refNode;
1365
+ break;
1366
+ }
1367
+ }
1368
+ }
1369
+ if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
1370
+ nodeToRelocate.nextSibling !== insertBeforeNode) {
1371
+ // we've checked that it's worth while to relocate
1372
+ // since that the node to relocate
1373
+ // has a different next sibling or parent relocated
1374
+ if (nodeToRelocate !== insertBeforeNode) {
1375
+ if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
1376
+ // probably a component in the index.html that doesn't have it's hostname set
1377
+ nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1378
+ }
1379
+ // add it back to the dom but in its new home
1380
+ parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1381
+ }
1382
+ }
1383
+ }
1384
+ else {
1385
+ // this node doesn't have a slot home to go to, so let's hide it
1386
+ if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1387
+ nodeToRelocate.hidden = true;
1388
+ }
1389
+ }
1390
+ }
1391
+ }
1392
+ if (checkSlotFallbackVisibility) {
1393
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1394
+ }
1395
+ // done moving nodes around
1396
+ // allow the disconnect callback to work again
1397
+ plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1398
+ // always reset
1399
+ relocateNodes.length = 0;
1400
+ }
1401
+ };
1402
+ const attachToAncestor = (hostRef, ancestorComponent) => {
1403
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
1404
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
1405
+ }
1406
+ };
1407
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
1408
+ {
1409
+ hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
1410
+ }
1411
+ if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
1412
+ hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
1413
+ return;
1414
+ }
1415
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1416
+ // there is no ancestor component or the ancestor component
1417
+ // has already fired off its lifecycle update then
1418
+ // fire off the initial update
1419
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1420
+ return writeTask(dispatch) ;
1421
+ };
1422
+ /**
1423
+ * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
1424
+ * component lifecycle methods like `componentWillLoad` as well as
1425
+ * {@link updateComponent}, which will kick off the virtual DOM re-render.
1426
+ *
1427
+ * @param hostRef a reference to a host DOM node
1428
+ * @param isInitialLoad whether we're on the initial load or not
1429
+ * @returns an empty Promise which is used to enqueue a series of operations for
1430
+ * the component
1431
+ */
1432
+ const dispatchHooks = (hostRef, isInitialLoad) => {
1433
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
1434
+ const instance = hostRef.$lazyInstance$ ;
1435
+ // We're going to use this variable together with `enqueue` to implement a
1436
+ // little promise-based queue. We start out with it `undefined`. When we add
1437
+ // the first function to the queue we'll set this variable to be that
1438
+ // function's return value. When we attempt to add subsequent values to the
1439
+ // queue we'll check that value and, if it was a `Promise`, we'll then chain
1440
+ // the new function off of that `Promise` using `.then()`. This will give our
1441
+ // queue two nice properties:
1442
+ //
1443
+ // 1. If all functions added to the queue are synchronous they'll be called
1444
+ // synchronously right away.
1445
+ // 2. If all functions added to the queue are asynchronous they'll all be
1446
+ // called in order after `dispatchHooks` exits.
1447
+ let maybePromise;
1448
+ if (isInitialLoad) {
1449
+ {
1450
+ hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
1451
+ if (hostRef.$queuedListeners$) {
1452
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1453
+ hostRef.$queuedListeners$ = undefined;
1454
+ }
1455
+ }
1456
+ {
1457
+ // If `componentWillLoad` returns a `Promise` then we want to wait on
1458
+ // whatever's going on in that `Promise` before we launch into
1459
+ // rendering the component, doing other lifecycle stuff, etc. So
1460
+ // in that case we assign the returned promise to the variable we
1461
+ // declared above to hold a possible 'queueing' Promise
1462
+ maybePromise = safeCall(instance, 'componentWillLoad');
1463
+ }
1464
+ }
1465
+ {
1466
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, 'componentWillRender'));
1467
+ }
1468
+ endSchedule();
1469
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1470
+ };
1471
+ /**
1472
+ * This function uses a Promise to implement a simple first-in, first-out queue
1473
+ * of functions to be called.
1474
+ *
1475
+ * The queue is ordered on the basis of the first argument. If it's
1476
+ * `undefined`, then nothing is on the queue yet, so the provided function can
1477
+ * be called synchronously (although note that this function may return a
1478
+ * `Promise`). The idea is that then the return value of that enqueueing
1479
+ * operation is kept around, so that if it was a `Promise` then subsequent
1480
+ * functions can be enqueued by calling this function again with that `Promise`
1481
+ * as the first argument.
1482
+ *
1483
+ * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
1484
+ * @param fn a function to enqueue
1485
+ * @returns either a `Promise` or the return value of the provided function
1486
+ */
1487
+ const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
1488
+ /**
1489
+ * Check that a value is a `Promise`. To check, we first see if the value is an
1490
+ * instance of the `Promise` global. In a few circumstances, in particular if
1491
+ * the global has been overwritten, this is could be misleading, so we also do
1492
+ * a little 'duck typing' check to see if the `.then` property of the value is
1493
+ * defined and a function.
1494
+ *
1495
+ * @param maybePromise it might be a promise!
1496
+ * @returns whether it is or not
1497
+ */
1498
+ const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
1499
+ (maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
1500
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1501
+ var _a;
1502
+ const elm = hostRef.$hostElement$;
1503
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
1504
+ const rc = elm['s-rc'];
1505
+ if (isInitialLoad) {
1506
+ // DOM WRITE!
1507
+ attachStyles(hostRef);
1508
+ }
1509
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
1510
+ {
1511
+ callRender(hostRef, instance);
1512
+ }
1513
+ if (rc) {
1514
+ // ok, so turns out there are some child host elements
1515
+ // waiting on this parent element to load
1516
+ // let's fire off all update callbacks waiting
1517
+ rc.map((cb) => cb());
1518
+ elm['s-rc'] = undefined;
1519
+ }
1520
+ endRender();
1521
+ endUpdate();
1522
+ {
1523
+ const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
1524
+ const postUpdate = () => postUpdateComponent(hostRef);
1525
+ if (childrenPromises.length === 0) {
1526
+ postUpdate();
1527
+ }
1528
+ else {
1529
+ Promise.all(childrenPromises).then(postUpdate);
1530
+ hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
1531
+ childrenPromises.length = 0;
1532
+ }
1533
+ }
1534
+ };
1535
+ const callRender = (hostRef, instance, elm) => {
1536
+ try {
1537
+ instance = instance.render && instance.render();
1538
+ {
1539
+ hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
1540
+ }
1541
+ {
1542
+ hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
1543
+ }
1544
+ {
1545
+ {
1546
+ // looks like we've got child nodes to render into this host element
1547
+ // or we need to update the css class/attrs on the host element
1548
+ // DOM WRITE!
1549
+ {
1550
+ renderVdom(hostRef, instance);
1551
+ }
1552
+ }
1553
+ }
1554
+ }
1555
+ catch (e) {
1556
+ consoleError(e, hostRef.$hostElement$);
1557
+ }
1558
+ return null;
1559
+ };
1560
+ const postUpdateComponent = (hostRef) => {
1561
+ const tagName = hostRef.$cmpMeta$.$tagName$;
1562
+ const elm = hostRef.$hostElement$;
1563
+ const endPostUpdate = createTime('postUpdate', tagName);
1564
+ const instance = hostRef.$lazyInstance$ ;
1565
+ const ancestorComponent = hostRef.$ancestorComponent$;
1566
+ {
1567
+ safeCall(instance, 'componentDidRender');
1568
+ }
1569
+ if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
1570
+ hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
1571
+ {
1572
+ // DOM WRITE!
1573
+ addHydratedFlag(elm);
1574
+ }
1575
+ {
1576
+ safeCall(instance, 'componentDidLoad');
1577
+ }
1578
+ endPostUpdate();
1579
+ {
1580
+ hostRef.$onReadyResolve$(elm);
1581
+ if (!ancestorComponent) {
1582
+ appDidLoad();
1583
+ }
1584
+ }
1585
+ }
1586
+ else {
1587
+ {
1588
+ safeCall(instance, 'componentDidUpdate');
1589
+ }
1590
+ endPostUpdate();
1591
+ }
1592
+ {
1593
+ hostRef.$onInstanceResolve$(elm);
1594
+ }
1595
+ // load events fire from bottom to top
1596
+ // the deepest elements load first then bubbles up
1597
+ {
1598
+ if (hostRef.$onRenderResolve$) {
1599
+ hostRef.$onRenderResolve$();
1600
+ hostRef.$onRenderResolve$ = undefined;
1601
+ }
1602
+ if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
1603
+ nextTick(() => scheduleUpdate(hostRef, false));
1604
+ }
1605
+ hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
1606
+ }
1607
+ // ( •_•)
1608
+ // ( •_•)>⌐■-■
1609
+ // (⌐■_■)
1610
+ };
1611
+ const forceUpdate = (ref) => {
1612
+ {
1613
+ const hostRef = getHostRef(ref);
1614
+ const isConnected = hostRef.$hostElement$.isConnected;
1615
+ if (isConnected &&
1616
+ (hostRef.$flags$ & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1617
+ scheduleUpdate(hostRef, false);
1618
+ }
1619
+ // Returns "true" when the forced update was successfully scheduled
1620
+ return isConnected;
1621
+ }
1622
+ };
1623
+ const appDidLoad = (who) => {
1624
+ // on appload
1625
+ // we have finish the first big initial render
1626
+ {
1627
+ addHydratedFlag(doc.documentElement);
1628
+ }
1629
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1630
+ };
1631
+ const safeCall = (instance, method, arg) => {
1632
+ if (instance && instance[method]) {
1633
+ try {
1634
+ return instance[method](arg);
1635
+ }
1636
+ catch (e) {
1637
+ consoleError(e);
1638
+ }
1639
+ }
1640
+ return undefined;
1641
+ };
1642
+ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
1643
+ ;
1644
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1645
+ const setValue = (ref, propName, newVal, cmpMeta) => {
1646
+ // check our new property value against our internal value
1647
+ const hostRef = getHostRef(ref);
1648
+ const elm = hostRef.$hostElement$ ;
1649
+ const oldVal = hostRef.$instanceValues$.get(propName);
1650
+ const flags = hostRef.$flags$;
1651
+ const instance = hostRef.$lazyInstance$ ;
1652
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1653
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1654
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1655
+ const didValueChange = newVal !== oldVal && !areBothNaN;
1656
+ if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
1657
+ // gadzooks! the property's value has changed!!
1658
+ // set our new value!
1659
+ hostRef.$instanceValues$.set(propName, newVal);
1660
+ if (instance) {
1661
+ // get an array of method names of watch functions to call
1662
+ if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
1663
+ const watchMethods = cmpMeta.$watchers$[propName];
1664
+ if (watchMethods) {
1665
+ // this instance is watching for when this property changed
1666
+ watchMethods.map((watchMethodName) => {
1667
+ try {
1668
+ // fire off each of the watch methods that are watching this property
1669
+ instance[watchMethodName](newVal, oldVal, propName);
1670
+ }
1671
+ catch (e) {
1672
+ consoleError(e, elm);
1673
+ }
1674
+ });
1675
+ }
1676
+ }
1677
+ if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
1678
+ // looks like this value actually changed, so we've got work to do!
1679
+ // but only if we've already rendered, otherwise just chill out
1680
+ // queue that we need to do an update, but don't worry about queuing
1681
+ // up millions cuz this function ensures it only runs once
1682
+ scheduleUpdate(hostRef, false);
1683
+ }
1684
+ }
1685
+ }
1686
+ };
1687
+ /**
1688
+ * Attach a series of runtime constructs to a compiled Stencil component
1689
+ * constructor, including getters and setters for the `@Prop` and `@State`
1690
+ * decorators, callbacks for when attributes change, and so on.
1691
+ *
1692
+ * @param Cstr the constructor for a component that we need to process
1693
+ * @param cmpMeta metadata collected previously about the component
1694
+ * @param flags a number used to store a series of bit flags
1695
+ * @returns a reference to the same constructor passed in (but now mutated)
1696
+ */
1697
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
1698
+ if (cmpMeta.$members$) {
1699
+ if (Cstr.watchers) {
1700
+ cmpMeta.$watchers$ = Cstr.watchers;
1701
+ }
1702
+ // It's better to have a const than two Object.entries()
1703
+ const members = Object.entries(cmpMeta.$members$);
1704
+ const prototype = Cstr.prototype;
1705
+ members.map(([memberName, [memberFlags]]) => {
1706
+ if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1707
+ ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
1708
+ // proxyComponent - prop
1709
+ Object.defineProperty(prototype, memberName, {
1710
+ get() {
1711
+ // proxyComponent, get value
1712
+ return getValue(this, memberName);
1713
+ },
1714
+ set(newValue) {
1715
+ // proxyComponent, set value
1716
+ setValue(this, memberName, newValue, cmpMeta);
1717
+ },
1718
+ configurable: true,
1719
+ enumerable: true,
1720
+ });
1721
+ }
1722
+ else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
1723
+ memberFlags & 64 /* MEMBER_FLAGS.Method */) {
1724
+ // proxyComponent - method
1725
+ Object.defineProperty(prototype, memberName, {
1726
+ value(...args) {
1727
+ const ref = getHostRef(this);
1728
+ return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args));
1729
+ },
1730
+ });
1731
+ }
1732
+ });
1733
+ if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
1734
+ const attrNameToPropName = new Map();
1735
+ prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
1736
+ plt.jmp(() => {
1737
+ const propName = attrNameToPropName.get(attrName);
1738
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1739
+ // in the case where an attribute was set inline.
1740
+ // ```html
1741
+ // <my-component some-attribute="some-value"></my-component>
1742
+ // ```
1743
+ //
1744
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
1745
+ // programmatically changes it before it has been upgraded as shown below:
1746
+ //
1747
+ // ```html
1748
+ // <!-- this component has _not_ been upgraded yet -->
1749
+ // <my-component id="test" some-attribute="some-value"></my-component>
1750
+ // <script>
1751
+ // // grab non-upgraded component
1752
+ // el = document.querySelector("#test");
1753
+ // el.someAttribute = "another-value";
1754
+ // // upgrade component
1755
+ // customElements.define('my-component', MyComponent);
1756
+ // </script>
1757
+ // ```
1758
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1759
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1760
+ // to the value that was set inline i.e. "some-value" from above example. When
1761
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1762
+ //
1763
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1764
+ // by connectedCallback as this attributeChangedCallback will not fire.
1765
+ //
1766
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1767
+ //
1768
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1769
+ // properties here given that this goes against best practices outlined here
1770
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1771
+ if (this.hasOwnProperty(propName)) {
1772
+ newValue = this[propName];
1773
+ delete this[propName];
1774
+ }
1775
+ else if (prototype.hasOwnProperty(propName) &&
1776
+ typeof this[propName] === 'number' &&
1777
+ this[propName] == newValue) {
1778
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1779
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1780
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1781
+ return;
1782
+ }
1783
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1784
+ });
1785
+ };
1786
+ // create an array of attributes to observe
1787
+ // and also create a map of html attribute name to js property name
1788
+ Cstr.observedAttributes = members
1789
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
1790
+ .map(([propName, m]) => {
1791
+ const attrName = m[1] || propName;
1792
+ attrNameToPropName.set(attrName, propName);
1793
+ if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1794
+ cmpMeta.$attrsToReflect$.push([propName, attrName]);
1795
+ }
1796
+ return attrName;
1797
+ });
1798
+ }
1799
+ }
1800
+ return Cstr;
1801
+ };
1802
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1803
+ // initializeComponent
1804
+ if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1805
+ // Let the runtime know that the component has been initialized
1806
+ hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1807
+ {
1808
+ // lazy loaded components
1809
+ // request the component's implementation to be
1810
+ // wired up with the host element
1811
+ Cstr = loadModule(cmpMeta);
1812
+ if (Cstr.then) {
1813
+ // Await creates a micro-task avoid if possible
1814
+ const endLoad = uniqueTime();
1815
+ Cstr = await Cstr;
1816
+ endLoad();
1817
+ }
1818
+ if (!Cstr.isProxied) {
1819
+ // we've never proxied this Constructor before
1820
+ // let's add the getters/setters to its prototype before
1821
+ // the first time we create an instance of the implementation
1822
+ {
1823
+ cmpMeta.$watchers$ = Cstr.watchers;
1824
+ }
1825
+ proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1826
+ Cstr.isProxied = true;
1827
+ }
1828
+ const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1829
+ // ok, time to construct the instance
1830
+ // but let's keep track of when we start and stop
1831
+ // so that the getters/setters don't incorrectly step on data
1832
+ {
1833
+ hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
1834
+ }
1835
+ // construct the lazy-loaded component implementation
1836
+ // passing the hostRef is very important during
1837
+ // construction in order to directly wire together the
1838
+ // host element and the lazy-loaded instance
1839
+ try {
1840
+ new Cstr(hostRef);
1841
+ }
1842
+ catch (e) {
1843
+ consoleError(e);
1844
+ }
1845
+ {
1846
+ hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1847
+ }
1848
+ {
1849
+ hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1850
+ }
1851
+ endNewInstance();
1852
+ fireConnectedCallback(hostRef.$lazyInstance$);
1853
+ }
1854
+ if (Cstr.style) {
1855
+ // this component has styles but we haven't registered them yet
1856
+ let style = Cstr.style;
1857
+ if (typeof style !== 'string') {
1858
+ style = style[(hostRef.$modeName$ = computeMode(elm))];
1859
+ }
1860
+ const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);
1861
+ if (!styles.has(scopeId)) {
1862
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1863
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1864
+ endRegisterStyles();
1865
+ }
1866
+ }
1867
+ }
1868
+ // we've successfully created a lazy instance
1869
+ const ancestorComponent = hostRef.$ancestorComponent$;
1870
+ const schedule = () => scheduleUpdate(hostRef, true);
1871
+ if (ancestorComponent && ancestorComponent['s-rc']) {
1872
+ // this is the initial load and this component it has an ancestor component
1873
+ // but the ancestor component has NOT fired its will update lifecycle yet
1874
+ // so let's just cool our jets and wait for the ancestor to continue first
1875
+ // this will get fired off when the ancestor component
1876
+ // finally gets around to rendering its lazy self
1877
+ // fire off the initial update
1878
+ ancestorComponent['s-rc'].push(schedule);
1879
+ }
1880
+ else {
1881
+ schedule();
1882
+ }
1883
+ };
1884
+ const fireConnectedCallback = (instance) => {
1885
+ {
1886
+ safeCall(instance, 'connectedCallback');
1887
+ }
1888
+ };
1889
+ const connectedCallback = (elm) => {
1890
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1891
+ const hostRef = getHostRef(elm);
1892
+ const cmpMeta = hostRef.$cmpMeta$;
1893
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1894
+ if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1895
+ // first time this component has connected
1896
+ hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1897
+ {
1898
+ // initUpdate
1899
+ // if the slot polyfill is required we'll need to put some nodes
1900
+ // in here to act as original content anchors as we move nodes around
1901
+ // host element has been connected to the DOM
1902
+ if ((// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
1903
+ cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
1904
+ setContentReference(elm);
1905
+ }
1906
+ }
1907
+ {
1908
+ // find the first ancestor component (if there is one) and register
1909
+ // this component as one of the actively loading child components for its ancestor
1910
+ let ancestorComponent = elm;
1911
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1912
+ // climb up the ancestors looking for the first
1913
+ // component that hasn't finished its lifecycle update yet
1914
+ if (ancestorComponent['s-p']) {
1915
+ // we found this components first ancestor component
1916
+ // keep a reference to this component's ancestor component
1917
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1918
+ break;
1919
+ }
1920
+ }
1921
+ }
1922
+ // Lazy properties
1923
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1924
+ if (cmpMeta.$members$) {
1925
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1926
+ if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1927
+ const value = elm[memberName];
1928
+ delete elm[memberName];
1929
+ elm[memberName] = value;
1930
+ }
1931
+ });
1932
+ }
1933
+ {
1934
+ initializeComponent(elm, hostRef, cmpMeta);
1935
+ }
1936
+ }
1937
+ else {
1938
+ // not the first time this has connected
1939
+ // reattach any event listeners to the host
1940
+ // since they would have been removed when disconnected
1941
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1942
+ // fire off connectedCallback() on component instance
1943
+ fireConnectedCallback(hostRef.$lazyInstance$);
1944
+ }
1945
+ endConnected();
1946
+ }
1947
+ };
1948
+ const setContentReference = (elm) => {
1949
+ // only required when we're NOT using native shadow dom (slot)
1950
+ // or this browser doesn't support native shadow dom
1951
+ // and this host element was NOT created with SSR
1952
+ // let's pick out the inner content for slot projection
1953
+ // create a node to represent where the original
1954
+ // content was first placed, which is useful later on
1955
+ const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1956
+ contentRefElm['s-cn'] = true;
1957
+ elm.insertBefore(contentRefElm, elm.firstChild);
1958
+ };
1959
+ const disconnectedCallback = (elm) => {
1960
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1961
+ const hostRef = getHostRef(elm);
1962
+ const instance = hostRef.$lazyInstance$ ;
1963
+ {
1964
+ if (hostRef.$rmListeners$) {
1965
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1966
+ hostRef.$rmListeners$ = undefined;
1967
+ }
1968
+ }
1969
+ {
1970
+ safeCall(instance, 'disconnectedCallback');
1971
+ }
1972
+ }
1973
+ };
1974
+ const bootstrapLazy = (lazyBundles, options = {}) => {
1975
+ var _a;
1976
+ const endBootstrap = createTime();
1977
+ const cmpTags = [];
1978
+ const exclude = options.exclude || [];
1979
+ const customElements = win.customElements;
1980
+ const head = doc.head;
1981
+ const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1982
+ const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1983
+ const deferredConnectedCallbacks = [];
1984
+ let appLoadFallback;
1985
+ let isBootstrapping = true;
1986
+ Object.assign(plt, options);
1987
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1988
+ lazyBundles.map((lazyBundle) => {
1989
+ lazyBundle[1].map((compactMeta) => {
1990
+ const cmpMeta = {
1991
+ $flags$: compactMeta[0],
1992
+ $tagName$: compactMeta[1],
1993
+ $members$: compactMeta[2],
1994
+ $listeners$: compactMeta[3],
1995
+ };
1996
+ {
1997
+ cmpMeta.$members$ = compactMeta[2];
1998
+ }
1999
+ {
2000
+ cmpMeta.$listeners$ = compactMeta[3];
2001
+ }
2002
+ {
2003
+ cmpMeta.$attrsToReflect$ = [];
2004
+ }
2005
+ {
2006
+ cmpMeta.$watchers$ = {};
2007
+ }
2008
+ const tagName = cmpMeta.$tagName$;
2009
+ const HostElement = class extends HTMLElement {
2010
+ // StencilLazyHost
2011
+ constructor(self) {
2012
+ // @ts-ignore
2013
+ super(self);
2014
+ self = this;
2015
+ registerHost(self, cmpMeta);
2016
+ if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
2017
+ // this component is using shadow dom
2018
+ // and this browser supports shadow dom
2019
+ // add the read-only property "shadowRoot" to the host element
2020
+ // adding the shadow root build conditionals to minimize runtime
2021
+ {
2022
+ {
2023
+ self.attachShadow({
2024
+ mode: 'open',
2025
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),
2026
+ });
2027
+ }
2028
+ }
2029
+ }
2030
+ }
2031
+ connectedCallback() {
2032
+ if (appLoadFallback) {
2033
+ clearTimeout(appLoadFallback);
2034
+ appLoadFallback = null;
2035
+ }
2036
+ if (isBootstrapping) {
2037
+ // connectedCallback will be processed once all components have been registered
2038
+ deferredConnectedCallbacks.push(this);
2039
+ }
2040
+ else {
2041
+ plt.jmp(() => connectedCallback(this));
2042
+ }
2043
+ }
2044
+ disconnectedCallback() {
2045
+ plt.jmp(() => disconnectedCallback(this));
2046
+ }
2047
+ componentOnReady() {
2048
+ return getHostRef(this).$onReadyPromise$;
2049
+ }
2050
+ };
2051
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
2052
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
2053
+ cmpTags.push(tagName);
2054
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
2055
+ }
2056
+ });
2057
+ });
2058
+ {
2059
+ visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
2060
+ visibilityStyle.setAttribute('data-styles', '');
2061
+ // Apply CSP nonce to the style tag if it exists
2062
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
2063
+ if (nonce != null) {
2064
+ visibilityStyle.setAttribute('nonce', nonce);
2065
+ }
2066
+ head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
2067
+ }
2068
+ // Process deferred connectedCallbacks now all components have been registered
2069
+ isBootstrapping = false;
2070
+ if (deferredConnectedCallbacks.length) {
2071
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
2072
+ }
2073
+ else {
2074
+ {
2075
+ plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
2076
+ }
2077
+ }
2078
+ // Fallback appLoad event
2079
+ endBootstrap();
2080
+ };
2081
+ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
2082
+ if (listeners) {
2083
+ listeners.map(([flags, name, method]) => {
2084
+ const target = getHostListenerTarget(elm, flags) ;
2085
+ const handler = hostListenerProxy(hostRef, method);
2086
+ const opts = hostListenerOpts(flags);
2087
+ plt.ael(target, name, handler, opts);
2088
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
2089
+ });
2090
+ }
2091
+ };
2092
+ const hostListenerProxy = (hostRef, methodName) => (ev) => {
2093
+ try {
2094
+ {
2095
+ if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
2096
+ // instance is ready, let's call it's member method for this event
2097
+ hostRef.$lazyInstance$[methodName](ev);
2098
+ }
2099
+ else {
2100
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
2101
+ }
2102
+ }
2103
+ }
2104
+ catch (e) {
2105
+ consoleError(e);
2106
+ }
2107
+ };
2108
+ const getHostListenerTarget = (elm, flags) => {
2109
+ if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
2110
+ return doc;
2111
+ if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
2112
+ return win;
2113
+ if (flags & 16 /* LISTENER_FLAGS.TargetBody */)
2114
+ return doc.body;
2115
+ return elm;
2116
+ };
2117
+ // prettier-ignore
2118
+ const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
2119
+ /**
2120
+ * Assigns the given value to the nonce property on the runtime platform object.
2121
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
2122
+ * @param nonce The value to be assigned to the platform nonce property.
2123
+ * @returns void
2124
+ */
2125
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
2126
+ const hostRefs = /*@__PURE__*/ new WeakMap();
2127
+ const getHostRef = (ref) => hostRefs.get(ref);
2128
+ const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
2129
+ const registerHost = (elm, cmpMeta) => {
2130
+ const hostRef = {
2131
+ $flags$: 0,
2132
+ $hostElement$: elm,
2133
+ $cmpMeta$: cmpMeta,
2134
+ $instanceValues$: new Map(),
2135
+ };
2136
+ {
2137
+ hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
2138
+ }
2139
+ {
2140
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
2141
+ elm['s-p'] = [];
2142
+ elm['s-rc'] = [];
2143
+ }
2144
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
2145
+ return hostRefs.set(elm, hostRef);
2146
+ };
2147
+ const isMemberInElement = (elm, memberName) => memberName in elm;
2148
+ const consoleError = (e, el) => (0, console.error)(e, el);
2149
+ const cmpModules = /*@__PURE__*/ new Map();
2150
+ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2151
+ // loadModuleImport
2152
+ const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
2153
+ const bundleId = cmpMeta.$lazyBundleId$;
2154
+ const module = cmpModules.get(bundleId) ;
2155
+ if (module) {
2156
+ return module[exportName];
2157
+ }
2158
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
2159
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
2160
+ /* @vite-ignore */
2161
+ /* webpackInclude: /\.entry\.js$/ */
2162
+ /* webpackExclude: /\.system\.entry\.js$/ */
2163
+ /* webpackMode: "lazy" */
2164
+ `./${bundleId}.entry.js${''}`)); }).then((importedModule) => {
2165
+ {
2166
+ cmpModules.set(bundleId, importedModule);
2167
+ }
2168
+ return importedModule[exportName];
2169
+ }, consoleError);
2170
+ };
2171
+ const styles = /*@__PURE__*/ new Map();
2172
+ const modeResolutionChain = [];
2173
+ const win = typeof window !== 'undefined' ? window : {};
2174
+ const doc = win.document || { head: {} };
2175
+ const plt = {
2176
+ $flags$: 0,
2177
+ $resourcesUrl$: '',
2178
+ jmp: (h) => h(),
2179
+ raf: (h) => requestAnimationFrame(h),
2180
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
2181
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
2182
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
2183
+ };
2184
+ const setPlatformHelpers = (helpers) => {
2185
+ Object.assign(plt, helpers);
2186
+ };
2187
+ const promiseResolve = (v) => Promise.resolve(v);
2188
+ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
2189
+ try {
2190
+ new CSSStyleSheet();
2191
+ return typeof new CSSStyleSheet().replaceSync === 'function';
2192
+ }
2193
+ catch (e) { }
2194
+ return false;
2195
+ })()
2196
+ ;
2197
+ const queueDomReads = [];
2198
+ const queueDomWrites = [];
2199
+ const queueTask = (queue, write) => (cb) => {
2200
+ queue.push(cb);
2201
+ if (!queuePending) {
2202
+ queuePending = true;
2203
+ if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
2204
+ nextTick(flush);
2205
+ }
2206
+ else {
2207
+ plt.raf(flush);
2208
+ }
2209
+ }
2210
+ };
2211
+ const consume = (queue) => {
2212
+ for (let i = 0; i < queue.length; i++) {
2213
+ try {
2214
+ queue[i](performance.now());
2215
+ }
2216
+ catch (e) {
2217
+ consoleError(e);
2218
+ }
2219
+ }
2220
+ queue.length = 0;
2221
+ };
2222
+ const flush = () => {
2223
+ // always force a bunch of medium callbacks to run, but still have
2224
+ // a throttle on how many can run in a certain time
2225
+ // DOM READS!!!
2226
+ consume(queueDomReads);
2227
+ // DOM WRITES!!!
2228
+ {
2229
+ consume(queueDomWrites);
2230
+ if ((queuePending = queueDomReads.length > 0)) {
2231
+ // still more to do yet, but we've run out of time
2232
+ // let's let this thing cool off and try again in the next tick
2233
+ plt.raf(flush);
2234
+ }
2235
+ }
2236
+ };
2237
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
2238
+ const readTask = /*@__PURE__*/ queueTask(queueDomReads, false);
2239
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2240
+
2241
+ exports.Build = Build;
2242
+ exports.Host = Host;
2243
+ exports.bootstrapLazy = bootstrapLazy;
2244
+ exports.createEvent = createEvent;
2245
+ exports.forceUpdate = forceUpdate;
2246
+ exports.getAssetPath = getAssetPath;
2247
+ exports.getElement = getElement;
2248
+ exports.getMode = getMode;
2249
+ exports.h = h;
2250
+ exports.promiseResolve = promiseResolve;
2251
+ exports.readTask = readTask;
2252
+ exports.registerInstance = registerInstance;
2253
+ exports.setMode = setMode;
2254
+ exports.setNonce = setNonce;
2255
+ exports.setPlatformHelpers = setPlatformHelpers;
2256
+ exports.writeTask = writeTask;