globuswebcomponents 0.6.3 → 0.6.4

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 (763) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  2. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  3. package/dist/cjs/gb-avatar-add-button.cjs.entry.js +26 -0
  4. package/dist/cjs/gb-avatar-add-button.cjs.entry.js.map +1 -0
  5. package/dist/cjs/gb-avatar-dropdown.cjs.entry.js +57 -0
  6. package/dist/cjs/gb-avatar-dropdown.cjs.entry.js.map +1 -0
  7. package/dist/cjs/gb-avatar-group.cjs.entry.js +57 -0
  8. package/dist/cjs/gb-avatar-group.cjs.entry.js.map +1 -0
  9. package/dist/cjs/gb-avatar-label-group.cjs.entry.js +96 -0
  10. package/dist/cjs/gb-avatar-label-group.cjs.entry.js.map +1 -0
  11. package/dist/cjs/gb-avatar-profile-photo.cjs.entry.js +57 -0
  12. package/dist/cjs/gb-avatar-profile-photo.cjs.entry.js.map +1 -0
  13. package/dist/cjs/gb-avatar_34.cjs.entry.js +1521 -0
  14. package/dist/cjs/gb-avatar_34.cjs.entry.js.map +1 -0
  15. package/dist/cjs/gb-button-close_2.cjs.entry.js +43 -0
  16. package/dist/cjs/gb-button-close_2.cjs.entry.js.map +1 -0
  17. package/dist/cjs/gb-checkbox-group-item.cjs.entry.js +107 -0
  18. package/dist/cjs/gb-checkbox-group-item.cjs.entry.js.map +1 -0
  19. package/dist/cjs/gb-checkbox-group.cjs.entry.js +27 -0
  20. package/dist/cjs/gb-checkbox-group.cjs.entry.js.map +1 -0
  21. package/dist/cjs/gb-dropdown-items-with-shortcut.cjs.entry.js +32 -0
  22. package/dist/cjs/gb-dropdown-items-with-shortcut.cjs.entry.js.map +1 -0
  23. package/dist/cjs/gb-file-type-icon.cjs.entry.js +22 -0
  24. package/dist/cjs/gb-file-type-icon.cjs.entry.js.map +1 -0
  25. package/dist/cjs/gb-file-upload-item-base.cjs.entry.js +37 -0
  26. package/dist/cjs/gb-file-upload-item-base.cjs.entry.js.map +1 -0
  27. package/dist/cjs/gb-file-upload.cjs.entry.js +40 -0
  28. package/dist/cjs/gb-file-upload.cjs.entry.js.map +1 -0
  29. package/dist/cjs/gb-help-dropdown.cjs.entry.js +24 -0
  30. package/dist/cjs/gb-help-dropdown.cjs.entry.js.map +1 -0
  31. package/dist/cjs/gb-megainput-field.cjs.entry.js +42 -0
  32. package/dist/cjs/gb-megainput-field.cjs.entry.js.map +1 -0
  33. package/dist/cjs/gb-progress-circle.cjs.entry.js +26 -0
  34. package/dist/cjs/gb-progress-circle.cjs.entry.js.map +1 -0
  35. package/dist/cjs/gb-rich-text.cjs.entry.js +34 -0
  36. package/dist/cjs/gb-rich-text.cjs.entry.js.map +1 -0
  37. package/dist/cjs/gb-scrollbar.cjs.entry.js +23 -0
  38. package/dist/cjs/gb-scrollbar.cjs.entry.js.map +1 -0
  39. package/dist/cjs/gb-slider-control-handle.cjs.entry.js +38 -0
  40. package/dist/cjs/gb-slider-control-handle.cjs.entry.js.map +1 -0
  41. package/dist/cjs/gb-slider.cjs.entry.js +77 -0
  42. package/dist/cjs/gb-slider.cjs.entry.js.map +1 -0
  43. package/dist/cjs/gb-textarea-input-field.cjs.entry.js +40 -0
  44. package/dist/cjs/gb-textarea-input-field.cjs.entry.js.map +1 -0
  45. package/dist/cjs/gb-toast-button.cjs.entry.js +29 -0
  46. package/dist/cjs/gb-toast-button.cjs.entry.js.map +1 -0
  47. package/dist/cjs/gb-toast.cjs.entry.js +57 -0
  48. package/dist/cjs/gb-toast.cjs.entry.js.map +1 -0
  49. package/dist/cjs/gb-toggle.cjs.entry.js +53 -0
  50. package/dist/cjs/gb-toggle.cjs.entry.js.map +1 -0
  51. package/dist/cjs/gb-token-field.cjs.entry.js +28 -0
  52. package/dist/cjs/gb-token-field.cjs.entry.js.map +1 -0
  53. package/dist/cjs/gb-verification-code-field.cjs.entry.js +32 -0
  54. package/dist/cjs/gb-verification-code-field.cjs.entry.js.map +1 -0
  55. package/dist/cjs/gb-wysiwyg-editor-icon.cjs.entry.js +29 -0
  56. package/dist/cjs/gb-wysiwyg-editor-icon.cjs.entry.js.map +1 -0
  57. package/dist/cjs/gb-wysiwyg-toolbar.cjs.entry.js +33 -0
  58. package/dist/cjs/gb-wysiwyg-toolbar.cjs.entry.js.map +1 -0
  59. package/dist/cjs/gb-wysiwyg-tooltip.cjs.entry.js +28 -0
  60. package/dist/cjs/gb-wysiwyg-tooltip.cjs.entry.js.map +1 -0
  61. package/dist/cjs/globuscomponents.cjs.js +27 -0
  62. package/dist/cjs/globuscomponents.cjs.js.map +1 -0
  63. package/dist/cjs/index-804eab7e.js +1644 -0
  64. package/dist/cjs/index-804eab7e.js.map +1 -0
  65. package/dist/cjs/index.cjs.js +11 -0
  66. package/dist/cjs/index.cjs.js.map +1 -0
  67. package/dist/cjs/loader.cjs.js +17 -0
  68. package/dist/cjs/loader.cjs.js.map +1 -0
  69. package/dist/cjs/reusableModels-e50f3440.js +21 -0
  70. package/dist/cjs/reusableModels-e50f3440.js.map +1 -0
  71. package/dist/collection/assets/NG.svg +14 -0
  72. package/dist/collection/assets/Tooltip.svg +4 -0
  73. package/dist/collection/assets/alert-02.svg +6 -0
  74. package/dist/collection/assets/alert_02.svg +3 -0
  75. package/dist/collection/assets/arrow-left-02.svg +3 -0
  76. package/dist/collection/assets/arrow-right-02.svg +5 -0
  77. package/dist/collection/assets/arrow-turn-backward.svg +5 -0
  78. package/dist/collection/assets/arrow_pointing_right.svg +3 -0
  79. package/dist/collection/assets/arrow_pointing_up.svg +9 -0
  80. package/dist/collection/assets/arrow_up.svg +3 -0
  81. package/dist/collection/assets/avatar_pic.jpg +0 -0
  82. package/dist/collection/assets/bar.svg +3 -0
  83. package/dist/collection/assets/bar_white.svg +3 -0
  84. package/dist/collection/assets/blush_brush.svg +3 -0
  85. package/dist/collection/assets/book_open.svg +3 -0
  86. package/dist/collection/assets/bug_02.svg +4 -0
  87. package/dist/collection/assets/calendar-02.svg +6 -0
  88. package/dist/collection/assets/cancel-01.svg +5 -0
  89. package/dist/collection/assets/cancel-button.svg +3 -0
  90. package/dist/collection/assets/checkbox disabled_indeterminate.svg +5 -0
  91. package/dist/collection/assets/checkcircle default_checked.svg +5 -0
  92. package/dist/collection/assets/checkcircle default_unchecked.svg +3 -0
  93. package/dist/collection/assets/checkcircle disabled_checked.svg +5 -0
  94. package/dist/collection/assets/checkcircle disabled_unchecked.svg +3 -0
  95. package/dist/collection/assets/checked_indeterminate.svg +5 -0
  96. package/dist/collection/assets/checkmark.svg +3 -0
  97. package/dist/collection/assets/circle.svg +6 -0
  98. package/dist/collection/assets/column-insert.svg +5 -0
  99. package/dist/collection/assets/company.svg +4 -0
  100. package/dist/collection/assets/company_icon.svg +4 -0
  101. package/dist/collection/assets/configuration_02.svg +3 -0
  102. package/dist/collection/assets/copy-01.svg +5 -0
  103. package/dist/collection/assets/copy.svg +3 -0
  104. package/dist/collection/assets/country_icon.svg +29 -0
  105. package/dist/collection/assets/dark_theme.svg +3 -0
  106. package/dist/collection/assets/dashboard-square-03.svg +14 -0
  107. package/dist/collection/assets/database-sync.svg +6 -0
  108. package/dist/collection/assets/default_checked.svg +5 -0
  109. package/dist/collection/assets/default_unchecked.svg +3 -0
  110. package/dist/collection/assets/delete-02.svg +3 -0
  111. package/dist/collection/assets/disabled.svg +4 -0
  112. package/dist/collection/assets/disabled_checked.svg +5 -0
  113. package/dist/collection/assets/disabled_indeterminate.svg +5 -0
  114. package/dist/collection/assets/dot.svg +3 -0
  115. package/dist/collection/assets/exchange-01.svg +5 -0
  116. package/dist/collection/assets/file-verified.svg +6 -0
  117. package/dist/collection/assets/flag-01.svg +5 -0
  118. package/dist/collection/assets/globus_bank_logo.svg +11 -0
  119. package/dist/collection/assets/globus_bank_logo_blue.svg +13 -0
  120. package/dist/collection/assets/globus_bank_logo_white.svg +13 -0
  121. package/dist/collection/assets/help-circle.svg +5 -0
  122. package/dist/collection/assets/logout_button.svg +3 -0
  123. package/dist/collection/assets/mail-02.svg +5 -0
  124. package/dist/collection/assets/minus_sign.svg +3 -0
  125. package/dist/collection/assets/no_notification_frame.png +0 -0
  126. package/dist/collection/assets/no_notification_frame.svg +139 -0
  127. package/dist/collection/assets/notification-03.svg +5 -0
  128. package/dist/collection/assets/panel_bell.svg +85 -0
  129. package/dist/collection/assets/pattern_wrapper.png +0 -0
  130. package/dist/collection/assets/pattern_wrapper.svg +1359 -0
  131. package/dist/collection/assets/plus_sign.svg +3 -0
  132. package/dist/collection/assets/radiobutton default_checked.svg +4 -0
  133. package/dist/collection/assets/radiobutton default_unchecked.svg +3 -0
  134. package/dist/collection/assets/radiobutton disabled_checked.svg +4 -0
  135. package/dist/collection/assets/radiobutton disabled_unchecked.svg +3 -0
  136. package/dist/collection/assets/sample.svg +5 -0
  137. package/dist/collection/assets/search-01.svg +3 -0
  138. package/dist/collection/assets/shuffle-square.svg +6 -0
  139. package/dist/collection/assets/square-arrow-data-transfer-diagonal.svg +6 -0
  140. package/dist/collection/assets/ticked_01.svg +5 -0
  141. package/dist/collection/assets/tooltip.png +0 -0
  142. package/dist/collection/assets/user-group.svg +10 -0
  143. package/dist/collection/assets/user_add.svg +3 -0
  144. package/dist/collection/assets/user_group.svg +3 -0
  145. package/dist/collection/assets/user_profile.svg +4 -0
  146. package/dist/collection/assets/verified_tick.svg +11 -0
  147. package/dist/collection/collection-manifest.json +74 -0
  148. package/dist/collection/components/gb-WYSIWYG editor-icon/gb-WYSIWYG-editor-icon.css +2711 -0
  149. package/dist/collection/components/gb-WYSIWYG editor-icon/gb-WYSIWYG-editor-icon.js +84 -0
  150. package/dist/collection/components/gb-WYSIWYG editor-icon/gb-WYSIWYG-editor-icon.js.map +1 -0
  151. package/dist/collection/components/gb-WYSIWYG-toolbar/gb-WYSIWYG-toolbar.css +2660 -0
  152. package/dist/collection/components/gb-WYSIWYG-toolbar/gb-WYSIWYG-toolbar.js +223 -0
  153. package/dist/collection/components/gb-WYSIWYG-toolbar/gb-WYSIWYG-toolbar.js.map +1 -0
  154. package/dist/collection/components/gb-WYSIWYG-tooltip/gb-WYSIWYG-tooltip.js +65 -0
  155. package/dist/collection/components/gb-WYSIWYG-tooltip/gb-WYSIWYG-tooltip.js.map +1 -0
  156. package/dist/collection/components/gb-WYSIWYG-tooltip/gb-WYSIWYG-tooltip.tsx +43 -0
  157. package/dist/collection/components/gb-avatar/gb-avatar.css +2956 -0
  158. package/dist/collection/components/gb-avatar/gb-avatar.js +271 -0
  159. package/dist/collection/components/gb-avatar/gb-avatar.js.map +1 -0
  160. package/dist/collection/components/gb-avatar-add-button/gb-avatar-add-button.css +2762 -0
  161. package/dist/collection/components/gb-avatar-add-button/gb-avatar-add-button.js +113 -0
  162. package/dist/collection/components/gb-avatar-add-button/gb-avatar-add-button.js.map +1 -0
  163. package/dist/collection/components/gb-avatar-contrast-inner-border/gb-avatar-contrast-inner-border.css +2699 -0
  164. package/dist/collection/components/gb-avatar-contrast-inner-border/gb-avatar-contrast-inner-border.js +119 -0
  165. package/dist/collection/components/gb-avatar-contrast-inner-border/gb-avatar-contrast-inner-border.js.map +1 -0
  166. package/dist/collection/components/gb-avatar-dropdown/gb-avatar-dropdown.css +2761 -0
  167. package/dist/collection/components/gb-avatar-dropdown/gb-avatar-dropdown.js +258 -0
  168. package/dist/collection/components/gb-avatar-dropdown/gb-avatar-dropdown.js.map +1 -0
  169. package/dist/collection/components/gb-avatar-group/gb-avatar-group.css +2719 -0
  170. package/dist/collection/components/gb-avatar-group/gb-avatar-group.js +174 -0
  171. package/dist/collection/components/gb-avatar-group/gb-avatar-group.js.map +1 -0
  172. package/dist/collection/components/gb-avatar-label-group/gb-avatar-label-group.css +2710 -0
  173. package/dist/collection/components/gb-avatar-label-group/gb-avatar-label-group.js +223 -0
  174. package/dist/collection/components/gb-avatar-label-group/gb-avatar-label-group.js.map +1 -0
  175. package/dist/collection/components/gb-avatar-profile-photo/gb-avatar-profile-photo.css +2698 -0
  176. package/dist/collection/components/gb-avatar-profile-photo/gb-avatar-profile-photo.js +155 -0
  177. package/dist/collection/components/gb-avatar-profile-photo/gb-avatar-profile-photo.js.map +1 -0
  178. package/dist/collection/components/gb-badge-close/gb-badge-close.css +2756 -0
  179. package/dist/collection/components/gb-badge-close/gb-badge-close.js +67 -0
  180. package/dist/collection/components/gb-badge-close/gb-badge-close.js.map +1 -0
  181. package/dist/collection/components/gb-badges/gb-badges.css +2922 -0
  182. package/dist/collection/components/gb-badges/gb-badges.js +253 -0
  183. package/dist/collection/components/gb-badges/gb-badges.js.map +1 -0
  184. package/dist/collection/components/gb-btn/gb-btn.css +2965 -0
  185. package/dist/collection/components/gb-btn/gb-btn.js +267 -0
  186. package/dist/collection/components/gb-btn/gb-btn.js.map +1 -0
  187. package/dist/collection/components/gb-button/gb-button.css +2965 -0
  188. package/dist/collection/components/gb-button/gb-button.js +267 -0
  189. package/dist/collection/components/gb-button/gb-button.js.map +1 -0
  190. package/dist/collection/components/gb-button/gb-button.tsx +97 -0
  191. package/dist/collection/components/gb-button/readme.md +50 -0
  192. package/dist/collection/components/gb-button-close/gb-button-close.css +2797 -0
  193. package/dist/collection/components/gb-button-close/gb-button-close.js +73 -0
  194. package/dist/collection/components/gb-button-close/gb-button-close.js.map +1 -0
  195. package/dist/collection/components/gb-carousel-arrow/gb-carousel-arrow.css +2680 -0
  196. package/dist/collection/components/gb-carousel-arrow/gb-carousel-arrow.js +66 -0
  197. package/dist/collection/components/gb-carousel-arrow/gb-carousel-arrow.js.map +1 -0
  198. package/dist/collection/components/gb-checkbox/gb-checkbox.css +2692 -0
  199. package/dist/collection/components/gb-checkbox/gb-checkbox.js +200 -0
  200. package/dist/collection/components/gb-checkbox/gb-checkbox.js.map +1 -0
  201. package/dist/collection/components/gb-checkbox-base/gb-checkbox-base.css +2711 -0
  202. package/dist/collection/components/gb-checkbox-base/gb-checkbox-base.js +235 -0
  203. package/dist/collection/components/gb-checkbox-base/gb-checkbox-base.js.map +1 -0
  204. package/dist/collection/components/gb-checkbox-group/gb-checkbox-group.css +0 -0
  205. package/dist/collection/components/gb-checkbox-group/gb-checkbox-group.js +129 -0
  206. package/dist/collection/components/gb-checkbox-group/gb-checkbox-group.js.map +1 -0
  207. package/dist/collection/components/gb-checkbox-group-item/gb-checkbox-group-item.css +2842 -0
  208. package/dist/collection/components/gb-checkbox-group-item/gb-checkbox-group-item.js +232 -0
  209. package/dist/collection/components/gb-checkbox-group-item/gb-checkbox-group-item.js.map +1 -0
  210. package/dist/collection/components/gb-collapse-button/gb-collapse-button.css +2734 -0
  211. package/dist/collection/components/gb-collapse-button/gb-collapse-button.js +156 -0
  212. package/dist/collection/components/gb-collapse-button/gb-collapse-button.js.map +1 -0
  213. package/dist/collection/components/gb-dropdown-items-with-shortcut/gb-dropdown-items-with-shortcut.css +2745 -0
  214. package/dist/collection/components/gb-dropdown-items-with-shortcut/gb-dropdown-items-with-shortcut.js +159 -0
  215. package/dist/collection/components/gb-dropdown-items-with-shortcut/gb-dropdown-items-with-shortcut.js.map +1 -0
  216. package/dist/collection/components/gb-file-type-icon/gb-file-type-icon.css +0 -0
  217. package/dist/collection/components/gb-file-type-icon/gb-file-type-icon.js +18 -0
  218. package/dist/collection/components/gb-file-type-icon/gb-file-type-icon.js.map +1 -0
  219. package/dist/collection/components/gb-file-upload/gb-file-upload.css +171 -0
  220. package/dist/collection/components/gb-file-upload/gb-file-upload.js +189 -0
  221. package/dist/collection/components/gb-file-upload/gb-file-upload.js.map +1 -0
  222. package/dist/collection/components/gb-file-upload-item-base/gb-file-upload-item-base.css +2958 -0
  223. package/dist/collection/components/gb-file-upload-item-base/gb-file-upload-item-base.js +151 -0
  224. package/dist/collection/components/gb-file-upload-item-base/gb-file-upload-item-base.js.map +1 -0
  225. package/dist/collection/components/gb-header/gb-header.css +29 -0
  226. package/dist/collection/components/gb-header/gb-header.js +200 -0
  227. package/dist/collection/components/gb-header/gb-header.js.map +1 -0
  228. package/dist/collection/components/gb-header-icon/gb-header-icon.css +2704 -0
  229. package/dist/collection/components/gb-header-icon/gb-header-icon.js +96 -0
  230. package/dist/collection/components/gb-header-icon/gb-header-icon.js.map +1 -0
  231. package/dist/collection/components/gb-help-dropdown/gb-help-dropdown.css +2688 -0
  232. package/dist/collection/components/gb-help-dropdown/gb-help-dropdown.js +65 -0
  233. package/dist/collection/components/gb-help-dropdown/gb-help-dropdown.js.map +1 -0
  234. package/dist/collection/components/gb-help-tooltip/gb-help-tooltip.css +2671 -0
  235. package/dist/collection/components/gb-help-tooltip/gb-help-tooltip.js +80 -0
  236. package/dist/collection/components/gb-help-tooltip/gb-help-tooltip.js.map +1 -0
  237. package/dist/collection/components/gb-horizontal-tabs/gb-horizontal-tabs.css +2711 -0
  238. package/dist/collection/components/gb-horizontal-tabs/gb-horizontal-tabs.js +520 -0
  239. package/dist/collection/components/gb-horizontal-tabs/gb-horizontal-tabs.js.map +1 -0
  240. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.css +2803 -0
  241. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.js +468 -0
  242. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.js.map +1 -0
  243. package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.css +2763 -0
  244. package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.js +127 -0
  245. package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.js.map +1 -0
  246. package/dist/collection/components/gb-input-field/gb-input-field.css +2883 -0
  247. package/dist/collection/components/gb-input-field/gb-input-field.js +401 -0
  248. package/dist/collection/components/gb-input-field/gb-input-field.js.map +1 -0
  249. package/dist/collection/components/gb-megainput-field-base/gb-megainput-field.css +2758 -0
  250. package/dist/collection/components/gb-megainput-field-base/gb-megainput-field.js +90 -0
  251. package/dist/collection/components/gb-megainput-field-base/gb-megainput-field.js.map +1 -0
  252. package/dist/collection/components/gb-notification-content/gb-notification-content.css +2717 -0
  253. package/dist/collection/components/gb-notification-content/gb-notification-content.js +101 -0
  254. package/dist/collection/components/gb-notification-content/gb-notification-content.js.map +1 -0
  255. package/dist/collection/components/gb-notification-pane/gb-notification-pane.css +2704 -0
  256. package/dist/collection/components/gb-notification-pane/gb-notification-pane.js +93 -0
  257. package/dist/collection/components/gb-notification-pane/gb-notification-pane.js.map +1 -0
  258. package/dist/collection/components/gb-pagination/gb-pagination.css +2701 -0
  259. package/dist/collection/components/gb-pagination/gb-pagination.js +135 -0
  260. package/dist/collection/components/gb-pagination/gb-pagination.js.map +1 -0
  261. package/dist/collection/components/gb-pagination-button-group-base/gb-pagination-button-group-base.css +31 -0
  262. package/dist/collection/components/gb-pagination-button-group-base/gb-pagination-button-group-base.js +86 -0
  263. package/dist/collection/components/gb-pagination-button-group-base/gb-pagination-button-group-base.js.map +1 -0
  264. package/dist/collection/components/gb-pagination-dot-indicator/gb-pagination-dot-indicator.css +30 -0
  265. package/dist/collection/components/gb-pagination-dot-indicator/gb-pagination-dot-indicator.js +87 -0
  266. package/dist/collection/components/gb-pagination-dot-indicator/gb-pagination-dot-indicator.js.map +1 -0
  267. package/dist/collection/components/gb-pagination-number-base/gb-pagination-number-base.css +2687 -0
  268. package/dist/collection/components/gb-pagination-number-base/gb-pagination-number-base.js +56 -0
  269. package/dist/collection/components/gb-pagination-number-base/gb-pagination-number-base.js.map +1 -0
  270. package/dist/collection/components/gb-password-button/gb-password-button.css +2671 -0
  271. package/dist/collection/components/gb-password-button/gb-password-button.js +52 -0
  272. package/dist/collection/components/gb-password-button/gb-password-button.js.map +1 -0
  273. package/dist/collection/components/gb-progress-bar/gb-progress-bar.css +2783 -0
  274. package/dist/collection/components/gb-progress-bar/gb-progress-bar.js +102 -0
  275. package/dist/collection/components/gb-progress-bar/gb-progress-bar.js.map +1 -0
  276. package/dist/collection/components/gb-progress-circle/gb-progress-circle.css +39 -0
  277. package/dist/collection/components/gb-progress-circle/gb-progress-circle.js +105 -0
  278. package/dist/collection/components/gb-progress-circle/gb-progress-circle.js.map +1 -0
  279. package/dist/collection/components/gb-rich-text/gb-rich-text.css +2660 -0
  280. package/dist/collection/components/gb-rich-text/gb-rich-text.js +173 -0
  281. package/dist/collection/components/gb-rich-text/gb-rich-text.js.map +1 -0
  282. package/dist/collection/components/gb-scrollbar/gb-scrollbar.css +2693 -0
  283. package/dist/collection/components/gb-scrollbar/gb-scrollbar.js +44 -0
  284. package/dist/collection/components/gb-scrollbar/gb-scrollbar.js.map +1 -0
  285. package/dist/collection/components/gb-side-bar-item/gb-side-bar-item.css +2825 -0
  286. package/dist/collection/components/gb-side-bar-item/gb-side-bar-item.js +227 -0
  287. package/dist/collection/components/gb-side-bar-item/gb-side-bar-item.js.map +1 -0
  288. package/dist/collection/components/gb-sidebar/gb-sidebar.css +2821 -0
  289. package/dist/collection/components/gb-sidebar/gb-sidebar.js +629 -0
  290. package/dist/collection/components/gb-sidebar/gb-sidebar.js.map +1 -0
  291. package/dist/collection/components/gb-slider/gb-slider.css +2688 -0
  292. package/dist/collection/components/gb-slider/gb-slider.js +157 -0
  293. package/dist/collection/components/gb-slider/gb-slider.js.map +1 -0
  294. package/dist/collection/components/gb-slider-control-handle/slider-control-handle.css +2745 -0
  295. package/dist/collection/components/gb-slider-control-handle/slider-control-handle.js +82 -0
  296. package/dist/collection/components/gb-slider-control-handle/slider-control-handle.js.map +1 -0
  297. package/dist/collection/components/gb-status-indicator/gb-status-indicator.css +2816 -0
  298. package/dist/collection/components/gb-status-indicator/gb-status-indicator.js +115 -0
  299. package/dist/collection/components/gb-status-indicator/gb-status-indicator.js.map +1 -0
  300. package/dist/collection/components/gb-tab-button-base/gb-tab-button-base.css +2938 -0
  301. package/dist/collection/components/gb-tab-button-base/gb-tab-button-base.js +206 -0
  302. package/dist/collection/components/gb-tab-button-base/gb-tab-button-base.js.map +1 -0
  303. package/dist/collection/components/gb-tag/gb-tag.css +2727 -0
  304. package/dist/collection/components/gb-tag/gb-tag.js +140 -0
  305. package/dist/collection/components/gb-tag/gb-tag.js.map +1 -0
  306. package/dist/collection/components/gb-tag-checkbox/gb-tag-checkbox.css +2732 -0
  307. package/dist/collection/components/gb-tag-checkbox/gb-tag-checkbox.js +82 -0
  308. package/dist/collection/components/gb-tag-checkbox/gb-tag-checkbox.js.map +1 -0
  309. package/dist/collection/components/gb-tag-close/gb-tag-close.css +2701 -0
  310. package/dist/collection/components/gb-tag-close/gb-tag-close.js +49 -0
  311. package/dist/collection/components/gb-tag-close/gb-tag-close.js.map +1 -0
  312. package/dist/collection/components/gb-tag-count/gb-tag-count.css +2722 -0
  313. package/dist/collection/components/gb-tag-count/gb-tag-count.js +49 -0
  314. package/dist/collection/components/gb-tag-count/gb-tag-count.js.map +1 -0
  315. package/dist/collection/components/gb-textarea-input-field/gb-textarea-input-field.css +0 -0
  316. package/dist/collection/components/gb-textarea-input-field/gb-textarea-input-field.js +198 -0
  317. package/dist/collection/components/gb-textarea-input-field/gb-textarea-input-field.js.map +1 -0
  318. package/dist/collection/components/gb-toast/gb-toast.css +2943 -0
  319. package/dist/collection/components/gb-toast/gb-toast.js +177 -0
  320. package/dist/collection/components/gb-toast/gb-toast.js.map +1 -0
  321. package/dist/collection/components/gb-toast-button/gb-toast-button.css +2723 -0
  322. package/dist/collection/components/gb-toast-button/gb-toast-button.js +78 -0
  323. package/dist/collection/components/gb-toast-button/gb-toast-button.js.map +1 -0
  324. package/dist/collection/components/gb-toggle/gb-toggle.css +28 -0
  325. package/dist/collection/components/gb-toggle/gb-toggle.js +138 -0
  326. package/dist/{globuscomponents/gb-toggle.entry.js.map → collection/components/gb-toggle/gb-toggle.js.map} +1 -1
  327. package/dist/collection/components/gb-toggle-base/gb-toggle-base.css +2769 -0
  328. package/dist/collection/components/gb-toggle-base/gb-toggle-base.js +119 -0
  329. package/dist/collection/components/gb-toggle-base/gb-toggle-base.js.map +1 -0
  330. package/dist/collection/components/gb-token-field/gb-token-field.css +2660 -0
  331. package/dist/collection/components/gb-token-field/gb-token-field.js +141 -0
  332. package/dist/collection/components/gb-token-field/gb-token-field.js.map +1 -0
  333. package/dist/collection/components/gb-tooltip/gb-tooltip.css +2804 -0
  334. package/dist/collection/components/gb-tooltip/gb-tooltip.js +102 -0
  335. package/dist/collection/components/gb-tooltip/gb-tooltip.js.map +1 -0
  336. package/dist/collection/components/gb-verification-code-field/gb-verification-code-field.css +2685 -0
  337. package/dist/collection/components/gb-verification-code-field/gb-verification-code-field.js +145 -0
  338. package/dist/collection/components/gb-verification-code-field/gb-verification-code-field.js.map +1 -0
  339. package/dist/collection/global/global.css +2660 -0
  340. package/dist/collection/global/spacing.css +43 -0
  341. package/dist/collection/global/tailwind.css +3 -0
  342. package/dist/collection/global/typo.css +496 -0
  343. package/dist/collection/global/typography.css +1020 -0
  344. package/dist/collection/index.js +11 -0
  345. package/dist/collection/index.js.map +1 -0
  346. package/dist/collection/models/reusableModels.js +19 -0
  347. package/dist/collection/models/reusableModels.js.map +1 -0
  348. package/dist/collection/utils/utils.js +4 -0
  349. package/dist/collection/utils/utils.js.map +1 -0
  350. package/dist/components/gb-avatar-add-button.js +8 -0
  351. package/dist/components/gb-avatar-add-button.js.map +1 -0
  352. package/dist/components/gb-avatar-contrast-inner-border.js +8 -0
  353. package/dist/components/gb-avatar-contrast-inner-border.js.map +1 -0
  354. package/dist/components/gb-avatar-dropdown.js +126 -0
  355. package/dist/components/gb-avatar-dropdown.js.map +1 -0
  356. package/dist/components/gb-avatar-group.js +109 -0
  357. package/dist/components/gb-avatar-group.js.map +1 -0
  358. package/dist/components/gb-avatar-label-group.js +8 -0
  359. package/dist/components/gb-avatar-label-group.js.map +1 -0
  360. package/dist/components/gb-avatar-profile-photo.js +96 -0
  361. package/dist/components/gb-avatar-profile-photo.js.map +1 -0
  362. package/dist/components/gb-avatar.js +8 -0
  363. package/dist/components/gb-avatar.js.map +1 -0
  364. package/dist/components/gb-badge-close.js +8 -0
  365. package/dist/components/gb-badge-close.js.map +1 -0
  366. package/dist/components/gb-badge.js +8 -0
  367. package/dist/components/gb-badge.js.map +1 -0
  368. package/dist/components/gb-btn.js +8 -0
  369. package/dist/components/gb-btn.js.map +1 -0
  370. package/dist/components/gb-button-close.js +8 -0
  371. package/dist/components/gb-button-close.js.map +1 -0
  372. package/dist/components/gb-button.js +8 -0
  373. package/dist/components/gb-button.js.map +1 -0
  374. package/dist/{globuscomponents/gb-carousel-arrow.entry.js → components/gb-carousel-arrow.js} +30 -8
  375. package/dist/components/gb-carousel-arrow.js.map +1 -0
  376. package/dist/components/gb-checkbox-base.js +8 -0
  377. package/dist/components/gb-checkbox-base.js.map +1 -0
  378. package/dist/components/gb-checkbox-group-item.js +8 -0
  379. package/dist/components/gb-checkbox-group-item.js.map +1 -0
  380. package/dist/components/gb-checkbox-group.js +90 -0
  381. package/dist/components/gb-checkbox-group.js.map +1 -0
  382. package/dist/components/gb-checkbox.js +8 -0
  383. package/dist/components/gb-checkbox.js.map +1 -0
  384. package/dist/components/gb-collapse-button.js +8 -0
  385. package/dist/components/gb-collapse-button.js.map +1 -0
  386. package/dist/components/gb-dropdown-items-with-shortcut.js +8 -0
  387. package/dist/components/gb-dropdown-items-with-shortcut.js.map +1 -0
  388. package/dist/components/gb-file-type-icon.js +37 -0
  389. package/dist/components/gb-file-type-icon.js.map +1 -0
  390. package/dist/components/gb-file-upload-item-base.js +8 -0
  391. package/dist/components/gb-file-upload-item-base.js.map +1 -0
  392. package/dist/components/gb-file-upload.js +93 -0
  393. package/dist/components/gb-file-upload.js.map +1 -0
  394. package/dist/components/gb-header-icon.js +8 -0
  395. package/dist/components/gb-header-icon.js.map +1 -0
  396. package/dist/{globuscomponents/gb-header.entry.js → components/gb-header.js} +61 -10
  397. package/dist/components/gb-header.js.map +1 -0
  398. package/dist/components/gb-help-dropdown.js +60 -0
  399. package/dist/components/gb-help-dropdown.js.map +1 -0
  400. package/dist/components/gb-help-tooltip.js +8 -0
  401. package/dist/components/gb-help-tooltip.js.map +1 -0
  402. package/dist/{globuscomponents/gb-horizontal-tabs.entry.js → components/gb-horizontal-tabs.js} +90 -13
  403. package/dist/components/gb-horizontal-tabs.js.map +1 -0
  404. package/dist/components/gb-input-dropdown-menu-item.js +8 -0
  405. package/dist/components/gb-input-dropdown-menu-item.js.map +1 -0
  406. package/dist/components/gb-input-dropdown.js +8 -0
  407. package/dist/components/gb-input-dropdown.js.map +1 -0
  408. package/dist/{globuscomponents/gb-input-field.entry.js → components/gb-input-field.js} +86 -16
  409. package/dist/components/gb-input-field.js.map +1 -0
  410. package/dist/components/gb-megainput-field.js +8 -0
  411. package/dist/components/gb-megainput-field.js.map +1 -0
  412. package/dist/components/gb-notification-content.js +8 -0
  413. package/dist/components/gb-notification-content.js.map +1 -0
  414. package/dist/{globuscomponents/gb-notification-pane.entry.js → components/gb-notification-pane.js} +47 -12
  415. package/dist/components/gb-notification-pane.js.map +1 -0
  416. package/dist/components/gb-pagination-button-group-base.js +51 -0
  417. package/dist/components/gb-pagination-button-group-base.js.map +1 -0
  418. package/dist/components/gb-pagination-dot-indicator.js +45 -0
  419. package/dist/components/gb-pagination-dot-indicator.js.map +1 -0
  420. package/dist/{globuscomponents/gb-pagination-number-base.entry.js → components/gb-pagination-number-base.js} +32 -10
  421. package/dist/components/gb-pagination-number-base.js.map +1 -0
  422. package/dist/{globuscomponents/gb-pagination.entry.js → components/gb-pagination.js} +41 -9
  423. package/dist/components/gb-pagination.js.map +1 -0
  424. package/dist/components/gb-password-button.js +8 -0
  425. package/dist/components/gb-password-button.js.map +1 -0
  426. package/dist/components/gb-progress-bar.js +8 -0
  427. package/dist/components/gb-progress-bar.js.map +1 -0
  428. package/dist/components/gb-progress-circle.js +46 -0
  429. package/dist/components/gb-progress-circle.js.map +1 -0
  430. package/dist/components/gb-rich-text.js +148 -0
  431. package/dist/components/gb-rich-text.js.map +1 -0
  432. package/dist/components/gb-scrollbar.js +40 -0
  433. package/dist/components/gb-scrollbar.js.map +1 -0
  434. package/dist/components/gb-side-bar-item.js +8 -0
  435. package/dist/components/gb-side-bar-item.js.map +1 -0
  436. package/dist/{globuscomponents/gb-sidebar.entry.js → components/gb-sidebar.js} +108 -10
  437. package/dist/components/gb-sidebar.js.map +1 -0
  438. package/dist/components/gb-slider-control-handle.js +8 -0
  439. package/dist/components/gb-slider-control-handle.js.map +1 -0
  440. package/dist/components/gb-slider.js +110 -0
  441. package/dist/components/gb-slider.js.map +1 -0
  442. package/dist/components/gb-status-indicator.js +8 -0
  443. package/dist/components/gb-status-indicator.js.map +1 -0
  444. package/dist/components/gb-tab-button-base.js +8 -0
  445. package/dist/components/gb-tab-button-base.js.map +1 -0
  446. package/dist/components/gb-tag-checkbox.js +8 -0
  447. package/dist/components/gb-tag-checkbox.js.map +1 -0
  448. package/dist/components/gb-tag-close.js +8 -0
  449. package/dist/components/gb-tag-close.js.map +1 -0
  450. package/dist/components/gb-tag-count.js +8 -0
  451. package/dist/components/gb-tag-count.js.map +1 -0
  452. package/dist/components/gb-tag.js +8 -0
  453. package/dist/components/gb-tag.js.map +1 -0
  454. package/dist/components/gb-textarea-input-field.js +65 -0
  455. package/dist/components/gb-textarea-input-field.js.map +1 -0
  456. package/dist/components/gb-toast-button.js +8 -0
  457. package/dist/components/gb-toast-button.js.map +1 -0
  458. package/dist/components/gb-toast.js +97 -0
  459. package/dist/components/gb-toast.js.map +1 -0
  460. package/dist/components/gb-toggle-base.js +8 -0
  461. package/dist/components/gb-toggle-base.js.map +1 -0
  462. package/dist/components/gb-toggle.js +79 -0
  463. package/dist/components/gb-toggle.js.map +1 -0
  464. package/dist/components/gb-token-field.js +56 -0
  465. package/dist/components/gb-token-field.js.map +1 -0
  466. package/dist/components/gb-tooltip.js +8 -0
  467. package/dist/components/gb-tooltip.js.map +1 -0
  468. package/dist/components/gb-verification-code-field.js +60 -0
  469. package/dist/components/gb-verification-code-field.js.map +1 -0
  470. package/dist/components/gb-wysiwyg-editor-icon.js +8 -0
  471. package/dist/components/gb-wysiwyg-editor-icon.js.map +1 -0
  472. package/dist/components/gb-wysiwyg-toolbar.js +8 -0
  473. package/dist/components/gb-wysiwyg-toolbar.js.map +1 -0
  474. package/dist/components/gb-wysiwyg-tooltip.js +52 -0
  475. package/dist/components/gb-wysiwyg-tooltip.js.map +1 -0
  476. package/dist/components/index.js +9 -0
  477. package/dist/components/index.js.map +1 -0
  478. package/dist/{globuscomponents/gb-checkbox.entry.js → components/p-02b6abc5.js} +40 -9
  479. package/dist/components/p-02b6abc5.js.map +1 -0
  480. package/dist/{globuscomponents/gb-help-tooltip.entry.js → components/p-07a41a89.js} +36 -9
  481. package/dist/components/p-07a41a89.js.map +1 -0
  482. package/dist/components/p-0a66bea5.js +61 -0
  483. package/dist/components/p-0a66bea5.js.map +1 -0
  484. package/dist/{globuscomponents/gb-password-button.entry.js → components/p-2593d460.js} +41 -9
  485. package/dist/components/p-2593d460.js.map +1 -0
  486. package/dist/{globuscomponents/gb-tag-checkbox.entry.js → components/p-269fc593.js} +30 -9
  487. package/dist/components/p-269fc593.js.map +1 -0
  488. package/dist/{globuscomponents/gb-tag.entry.js → components/p-27c7572c.js} +69 -9
  489. package/dist/components/p-27c7572c.js.map +1 -0
  490. package/dist/components/p-30dc7ace.js +141 -0
  491. package/dist/components/p-30dc7ace.js.map +1 -0
  492. package/dist/{globuscomponents/gb-checkbox-base.entry.js → components/p-328ca954.js} +32 -9
  493. package/dist/components/p-328ca954.js.map +1 -0
  494. package/dist/components/p-33ef73e5.js +58 -0
  495. package/dist/components/p-33ef73e5.js.map +1 -0
  496. package/dist/components/p-3926487a.js +133 -0
  497. package/dist/components/p-3926487a.js.map +1 -0
  498. package/dist/{globuscomponents/gb-tab-button-base.entry.js → components/p-4586ba04.js} +66 -12
  499. package/dist/components/p-4586ba04.js.map +1 -0
  500. package/dist/{globuscomponents/gb-status-indicator.entry.js → components/p-45e9db9f.js} +32 -10
  501. package/dist/components/p-45e9db9f.js.map +1 -0
  502. package/dist/{globuscomponents/reusableModels-850e92f6.js → components/p-47052b60.js} +1 -2
  503. package/dist/components/p-47052b60.js.map +1 -0
  504. package/dist/{globuscomponents/gb-header-icon.entry.js → components/p-4bcb105b.js} +30 -9
  505. package/dist/components/p-4bcb105b.js.map +1 -0
  506. package/dist/{globuscomponents/gb-tag-close.entry.js → components/p-4e1f9e69.js} +28 -9
  507. package/dist/components/p-4e1f9e69.js.map +1 -0
  508. package/dist/components/p-51845b4a.js +64 -0
  509. package/dist/components/p-51845b4a.js.map +1 -0
  510. package/dist/{globuscomponents/gb-notification-content.entry.js → components/p-529d167d.js} +31 -9
  511. package/dist/components/p-529d167d.js.map +1 -0
  512. package/dist/components/p-69eb05e6.js +49 -0
  513. package/dist/components/p-69eb05e6.js.map +1 -0
  514. package/dist/{globuscomponents/gb-badge-close.entry.js → components/p-7701862d.js} +28 -8
  515. package/dist/components/p-7701862d.js.map +1 -0
  516. package/dist/{globuscomponents/gb-tooltip.entry.js → components/p-88985c81.js} +31 -10
  517. package/dist/components/p-88985c81.js.map +1 -0
  518. package/dist/{globuscomponents/gb-progress-bar.entry.js → components/p-8c11bf30.js} +37 -9
  519. package/dist/components/p-8c11bf30.js.map +1 -0
  520. package/dist/{globuscomponents/gb-toggle-base.entry.js → components/p-9002f572.js} +31 -10
  521. package/dist/components/p-9002f572.js.map +1 -0
  522. package/dist/{globuscomponents/gb-collapse-button.entry.js → components/p-93f34aac.js} +38 -8
  523. package/dist/components/p-93f34aac.js.map +1 -0
  524. package/dist/{globuscomponents/gb-side-bar-item.entry.js → components/p-96e978a1.js} +74 -10
  525. package/dist/components/p-96e978a1.js.map +1 -0
  526. package/dist/{globuscomponents/gb-input-dropdown-menu-item.entry.js → components/p-982a08fb.js} +61 -9
  527. package/dist/components/p-982a08fb.js.map +1 -0
  528. package/dist/{globuscomponents/gb-avatar-contrast-inner-border.entry.js → components/p-9c84cfb8.js} +30 -9
  529. package/dist/components/p-9c84cfb8.js.map +1 -0
  530. package/dist/{globuscomponents/gb-button.entry.js → components/p-a4c5c121.js} +38 -9
  531. package/dist/components/p-a4c5c121.js.map +1 -0
  532. package/dist/components/p-aafa633a.js +79 -0
  533. package/dist/components/p-aafa633a.js.map +1 -0
  534. package/dist/{globuscomponents/gb-button-close.entry.js → components/p-b0799e51.js} +28 -8
  535. package/dist/components/p-b0799e51.js.map +1 -0
  536. package/dist/{globuscomponents/gb-input-dropdown.entry.js → components/p-bea0b305.js} +120 -10
  537. package/dist/components/p-bea0b305.js.map +1 -0
  538. package/dist/components/p-c991b6ce.js +1439 -0
  539. package/dist/components/p-c991b6ce.js.map +1 -0
  540. package/dist/components/p-cff1083f.js +162 -0
  541. package/dist/components/p-cff1083f.js.map +1 -0
  542. package/dist/{globuscomponents/gb-btn.entry.js → components/p-e408918c.js} +37 -9
  543. package/dist/components/p-e408918c.js.map +1 -0
  544. package/dist/{globuscomponents/gb-avatar.entry.js → components/p-e52f2d0e.js} +49 -10
  545. package/dist/components/p-e52f2d0e.js.map +1 -0
  546. package/dist/{globuscomponents/gb-tag-count.entry.js → components/p-e5e4535f.js} +28 -9
  547. package/dist/components/p-e5e4535f.js.map +1 -0
  548. package/dist/components/p-e756f170.js +44 -0
  549. package/dist/components/p-e756f170.js.map +1 -0
  550. package/dist/{globuscomponents/gb-badge.entry.js → components/p-ee813bff.js} +61 -9
  551. package/dist/{globuscomponents/gb-badge.entry.js.map → components/p-ee813bff.js.map} +1 -1
  552. package/dist/components/p-f305b3a4.js +45 -0
  553. package/dist/components/p-f305b3a4.js.map +1 -0
  554. package/dist/{globuscomponents → esm}/gb-avatar-add-button.entry.js +3 -2
  555. package/dist/esm/gb-avatar-add-button.entry.js.map +1 -0
  556. package/dist/{globuscomponents → esm}/gb-avatar-dropdown.entry.js +3 -2
  557. package/dist/esm/gb-avatar-dropdown.entry.js.map +1 -0
  558. package/dist/{globuscomponents → esm}/gb-avatar-group.entry.js +4 -3
  559. package/dist/esm/gb-avatar-group.entry.js.map +1 -0
  560. package/dist/{globuscomponents → esm}/gb-avatar-label-group.entry.js +4 -3
  561. package/dist/esm/gb-avatar-label-group.entry.js.map +1 -0
  562. package/dist/{globuscomponents → esm}/gb-avatar-profile-photo.entry.js +4 -3
  563. package/dist/esm/gb-avatar-profile-photo.entry.js.map +1 -0
  564. package/dist/esm/gb-avatar_34.entry.js +1484 -0
  565. package/dist/esm/gb-avatar_34.entry.js.map +1 -0
  566. package/dist/esm/gb-button-close_2.entry.js +38 -0
  567. package/dist/esm/gb-button-close_2.entry.js.map +1 -0
  568. package/dist/{globuscomponents → esm}/gb-checkbox-group-item.entry.js +3 -2
  569. package/dist/esm/gb-checkbox-group-item.entry.js.map +1 -0
  570. package/dist/{globuscomponents → esm}/gb-checkbox-group.entry.js +3 -2
  571. package/dist/esm/gb-checkbox-group.entry.js.map +1 -0
  572. package/dist/{globuscomponents → esm}/gb-dropdown-items-with-shortcut.entry.js +4 -3
  573. package/dist/esm/gb-dropdown-items-with-shortcut.entry.js.map +1 -0
  574. package/dist/{globuscomponents → esm}/gb-file-type-icon.entry.js +3 -2
  575. package/dist/esm/gb-file-type-icon.entry.js.map +1 -0
  576. package/dist/{globuscomponents → esm}/gb-file-upload-item-base.entry.js +4 -3
  577. package/dist/esm/gb-file-upload-item-base.entry.js.map +1 -0
  578. package/dist/{globuscomponents → esm}/gb-file-upload.entry.js +4 -3
  579. package/dist/esm/gb-file-upload.entry.js.map +1 -0
  580. package/dist/{globuscomponents → esm}/gb-help-dropdown.entry.js +3 -2
  581. package/dist/esm/gb-help-dropdown.entry.js.map +1 -0
  582. package/dist/{globuscomponents → esm}/gb-megainput-field.entry.js +5 -4
  583. package/dist/esm/gb-megainput-field.entry.js.map +1 -0
  584. package/dist/{globuscomponents → esm}/gb-progress-circle.entry.js +4 -3
  585. package/dist/esm/gb-progress-circle.entry.js.map +1 -0
  586. package/dist/{globuscomponents → esm}/gb-rich-text.entry.js +4 -3
  587. package/dist/esm/gb-rich-text.entry.js.map +1 -0
  588. package/dist/{globuscomponents → esm}/gb-scrollbar.entry.js +4 -3
  589. package/dist/esm/gb-scrollbar.entry.js.map +1 -0
  590. package/dist/{globuscomponents → esm}/gb-slider-control-handle.entry.js +4 -3
  591. package/dist/esm/gb-slider-control-handle.entry.js.map +1 -0
  592. package/dist/{globuscomponents → esm}/gb-slider.entry.js +4 -3
  593. package/dist/esm/gb-slider.entry.js.map +1 -0
  594. package/dist/{globuscomponents → esm}/gb-textarea-input-field.entry.js +3 -2
  595. package/dist/esm/gb-textarea-input-field.entry.js.map +1 -0
  596. package/dist/{globuscomponents → esm}/gb-toast-button.entry.js +4 -3
  597. package/dist/esm/gb-toast-button.entry.js.map +1 -0
  598. package/dist/{globuscomponents → esm}/gb-toast.entry.js +5 -4
  599. package/dist/esm/gb-toast.entry.js.map +1 -0
  600. package/dist/{globuscomponents → esm}/gb-toggle.entry.js +4 -3
  601. package/dist/esm/gb-toggle.entry.js.map +1 -0
  602. package/dist/{globuscomponents → esm}/gb-token-field.entry.js +4 -3
  603. package/dist/esm/gb-token-field.entry.js.map +1 -0
  604. package/dist/{globuscomponents → esm}/gb-verification-code-field.entry.js +5 -4
  605. package/dist/esm/gb-verification-code-field.entry.js.map +1 -0
  606. package/dist/{globuscomponents → esm}/gb-wysiwyg-editor-icon.entry.js +3 -2
  607. package/dist/esm/gb-wysiwyg-editor-icon.entry.js.map +1 -0
  608. package/dist/{globuscomponents → esm}/gb-wysiwyg-toolbar.entry.js +3 -2
  609. package/dist/esm/gb-wysiwyg-toolbar.entry.js.map +1 -0
  610. package/dist/{globuscomponents → esm}/gb-wysiwyg-tooltip.entry.js +3 -2
  611. package/dist/esm/gb-wysiwyg-tooltip.entry.js.map +1 -0
  612. package/dist/esm/globuscomponents.js +22 -0
  613. package/dist/esm/globuscomponents.js.map +1 -0
  614. package/dist/esm/index-be73e596.js +1614 -0
  615. package/dist/esm/index-be73e596.js.map +1 -0
  616. package/dist/esm/index.js +7 -0
  617. package/dist/esm/index.js.map +1 -0
  618. package/dist/esm/loader.js +13 -0
  619. package/dist/esm/loader.js.map +1 -0
  620. package/dist/esm/reusableModels-8496e911.js +21 -0
  621. package/dist/esm/reusableModels-8496e911.js.map +1 -0
  622. package/dist/globuscomponents/globuscomponents.esm.js +1 -48
  623. package/dist/globuscomponents/globuscomponents.esm.js.map +1 -1
  624. package/dist/globuscomponents/index.esm.js +1 -16
  625. package/dist/globuscomponents/index.esm.js.map +1 -1
  626. package/dist/globuscomponents/p-0869d175.entry.js +2 -0
  627. package/dist/globuscomponents/p-0869d175.entry.js.map +1 -0
  628. package/dist/globuscomponents/p-0cb1a784.entry.js +2 -0
  629. package/dist/globuscomponents/p-0cb1a784.entry.js.map +1 -0
  630. package/dist/globuscomponents/p-0cc29bc9.entry.js +2 -0
  631. package/dist/globuscomponents/p-0cc29bc9.entry.js.map +1 -0
  632. package/dist/globuscomponents/p-19885058.entry.js +2 -0
  633. package/dist/globuscomponents/p-19885058.entry.js.map +1 -0
  634. package/dist/globuscomponents/p-202a3c9c.entry.js +2 -0
  635. package/dist/globuscomponents/p-202a3c9c.entry.js.map +1 -0
  636. package/dist/globuscomponents/p-205f99af.entry.js +2 -0
  637. package/dist/globuscomponents/{gb-avatar-profile-photo.entry.js.map → p-205f99af.entry.js.map} +1 -1
  638. package/dist/globuscomponents/p-42f1db13.entry.js +2 -0
  639. package/dist/globuscomponents/p-42f1db13.entry.js.map +1 -0
  640. package/dist/globuscomponents/p-47052b60.js +2 -0
  641. package/dist/globuscomponents/p-47052b60.js.map +1 -0
  642. package/dist/globuscomponents/p-4a27e1e0.entry.js +2 -0
  643. package/dist/globuscomponents/p-4a27e1e0.entry.js.map +1 -0
  644. package/dist/globuscomponents/p-4eebea94.entry.js +2 -0
  645. package/dist/globuscomponents/p-4eebea94.entry.js.map +1 -0
  646. package/dist/globuscomponents/p-50bf5e16.entry.js +2 -0
  647. package/dist/globuscomponents/p-50bf5e16.entry.js.map +1 -0
  648. package/dist/globuscomponents/p-56845361.entry.js +2 -0
  649. package/dist/globuscomponents/p-56845361.entry.js.map +1 -0
  650. package/dist/globuscomponents/p-593875d5.js +3 -0
  651. package/dist/globuscomponents/p-593875d5.js.map +1 -0
  652. package/dist/globuscomponents/p-5f10aee0.entry.js +2 -0
  653. package/dist/globuscomponents/p-5f10aee0.entry.js.map +1 -0
  654. package/dist/globuscomponents/p-63af3f30.entry.js +2 -0
  655. package/dist/globuscomponents/p-63af3f30.entry.js.map +1 -0
  656. package/dist/globuscomponents/p-70484be9.entry.js +2 -0
  657. package/dist/globuscomponents/p-70484be9.entry.js.map +1 -0
  658. package/dist/globuscomponents/p-781b650f.entry.js +2 -0
  659. package/dist/globuscomponents/p-781b650f.entry.js.map +1 -0
  660. package/dist/globuscomponents/p-798ec804.entry.js +2 -0
  661. package/dist/globuscomponents/p-798ec804.entry.js.map +1 -0
  662. package/dist/globuscomponents/p-81eb4639.entry.js +2 -0
  663. package/dist/globuscomponents/p-81eb4639.entry.js.map +1 -0
  664. package/dist/globuscomponents/p-8a1d870a.entry.js +2 -0
  665. package/dist/globuscomponents/p-8a1d870a.entry.js.map +1 -0
  666. package/dist/globuscomponents/p-908d4964.entry.js +2 -0
  667. package/dist/globuscomponents/p-908d4964.entry.js.map +1 -0
  668. package/dist/globuscomponents/p-9409a80e.entry.js +2 -0
  669. package/dist/globuscomponents/p-9409a80e.entry.js.map +1 -0
  670. package/dist/globuscomponents/p-a40011a7.entry.js +2 -0
  671. package/dist/globuscomponents/p-a40011a7.entry.js.map +1 -0
  672. package/dist/globuscomponents/p-ab529741.entry.js +2 -0
  673. package/dist/globuscomponents/p-ab529741.entry.js.map +1 -0
  674. package/dist/globuscomponents/p-ac35cbea.entry.js +2 -0
  675. package/dist/globuscomponents/p-ac35cbea.entry.js.map +1 -0
  676. package/dist/globuscomponents/p-bfa0476e.entry.js +2 -0
  677. package/dist/globuscomponents/p-bfa0476e.entry.js.map +1 -0
  678. package/dist/globuscomponents/p-c652e197.entry.js +2 -0
  679. package/dist/globuscomponents/p-c652e197.entry.js.map +1 -0
  680. package/dist/globuscomponents/p-cab01c3b.entry.js +2 -0
  681. package/dist/globuscomponents/p-cab01c3b.entry.js.map +1 -0
  682. package/dist/globuscomponents/p-d01d820f.entry.js +2 -0
  683. package/dist/globuscomponents/p-d01d820f.entry.js.map +1 -0
  684. package/dist/globuscomponents/p-d808b613.entry.js +2 -0
  685. package/dist/globuscomponents/p-d808b613.entry.js.map +1 -0
  686. package/dist/globuscomponents/p-e1255160.js +2 -0
  687. package/dist/globuscomponents/p-e1255160.js.map +1 -0
  688. package/dist/globuscomponents/p-e3e0a65e.entry.js +2 -0
  689. package/dist/globuscomponents/p-e3e0a65e.entry.js.map +1 -0
  690. package/dist/index.cjs.js +1 -0
  691. package/dist/index.js +1 -0
  692. package/dist/types/components/gb-horizontal-tabs/gb-horizontal-tabs.d.ts +1 -2
  693. package/dist/types/components.d.ts +0 -2
  694. package/package.json +3 -1
  695. package/dist/globuscomponents/gb-avatar-add-button.entry.js.map +0 -1
  696. package/dist/globuscomponents/gb-avatar-contrast-inner-border.entry.js.map +0 -1
  697. package/dist/globuscomponents/gb-avatar-dropdown.entry.js.map +0 -1
  698. package/dist/globuscomponents/gb-avatar-group.entry.js.map +0 -1
  699. package/dist/globuscomponents/gb-avatar-label-group.entry.js.map +0 -1
  700. package/dist/globuscomponents/gb-avatar.entry.js.map +0 -1
  701. package/dist/globuscomponents/gb-badge-close.entry.js.map +0 -1
  702. package/dist/globuscomponents/gb-btn.entry.js.map +0 -1
  703. package/dist/globuscomponents/gb-button-close.entry.js.map +0 -1
  704. package/dist/globuscomponents/gb-button.entry.js.map +0 -1
  705. package/dist/globuscomponents/gb-carousel-arrow.entry.js.map +0 -1
  706. package/dist/globuscomponents/gb-checkbox-base.entry.js.map +0 -1
  707. package/dist/globuscomponents/gb-checkbox-group-item.entry.js.map +0 -1
  708. package/dist/globuscomponents/gb-checkbox-group.entry.js.map +0 -1
  709. package/dist/globuscomponents/gb-checkbox.entry.js.map +0 -1
  710. package/dist/globuscomponents/gb-collapse-button.entry.js.map +0 -1
  711. package/dist/globuscomponents/gb-dropdown-items-with-shortcut.entry.js.map +0 -1
  712. package/dist/globuscomponents/gb-file-type-icon.entry.js.map +0 -1
  713. package/dist/globuscomponents/gb-file-upload-item-base.entry.js.map +0 -1
  714. package/dist/globuscomponents/gb-file-upload.entry.js.map +0 -1
  715. package/dist/globuscomponents/gb-header-icon.entry.js.map +0 -1
  716. package/dist/globuscomponents/gb-header.entry.js.map +0 -1
  717. package/dist/globuscomponents/gb-help-dropdown.entry.js.map +0 -1
  718. package/dist/globuscomponents/gb-help-tooltip.entry.js.map +0 -1
  719. package/dist/globuscomponents/gb-horizontal-tabs.entry.js.map +0 -1
  720. package/dist/globuscomponents/gb-input-dropdown-menu-item.entry.js.map +0 -1
  721. package/dist/globuscomponents/gb-input-dropdown.entry.js.map +0 -1
  722. package/dist/globuscomponents/gb-input-field.entry.js.map +0 -1
  723. package/dist/globuscomponents/gb-megainput-field.entry.js.map +0 -1
  724. package/dist/globuscomponents/gb-notification-content.entry.js.map +0 -1
  725. package/dist/globuscomponents/gb-notification-pane.entry.js.map +0 -1
  726. package/dist/globuscomponents/gb-pagination-button-group-base.entry.js +0 -27
  727. package/dist/globuscomponents/gb-pagination-button-group-base.entry.js.map +0 -1
  728. package/dist/globuscomponents/gb-pagination-dot-indicator.entry.js +0 -22
  729. package/dist/globuscomponents/gb-pagination-dot-indicator.entry.js.map +0 -1
  730. package/dist/globuscomponents/gb-pagination-number-base.entry.js.map +0 -1
  731. package/dist/globuscomponents/gb-pagination.entry.js.map +0 -1
  732. package/dist/globuscomponents/gb-password-button.entry.js.map +0 -1
  733. package/dist/globuscomponents/gb-progress-bar.entry.js.map +0 -1
  734. package/dist/globuscomponents/gb-progress-circle.entry.js.map +0 -1
  735. package/dist/globuscomponents/gb-rich-text.entry.js.map +0 -1
  736. package/dist/globuscomponents/gb-scrollbar.entry.js.map +0 -1
  737. package/dist/globuscomponents/gb-side-bar-item.entry.js.map +0 -1
  738. package/dist/globuscomponents/gb-sidebar.entry.js.map +0 -1
  739. package/dist/globuscomponents/gb-slider-control-handle.entry.js.map +0 -1
  740. package/dist/globuscomponents/gb-slider.entry.js.map +0 -1
  741. package/dist/globuscomponents/gb-status-indicator.entry.js.map +0 -1
  742. package/dist/globuscomponents/gb-tab-button-base.entry.js.map +0 -1
  743. package/dist/globuscomponents/gb-tag-checkbox.entry.js.map +0 -1
  744. package/dist/globuscomponents/gb-tag-close.entry.js.map +0 -1
  745. package/dist/globuscomponents/gb-tag-count.entry.js.map +0 -1
  746. package/dist/globuscomponents/gb-tag.entry.js.map +0 -1
  747. package/dist/globuscomponents/gb-textarea-input-field.entry.js.map +0 -1
  748. package/dist/globuscomponents/gb-toast-button.entry.js.map +0 -1
  749. package/dist/globuscomponents/gb-toast.entry.js.map +0 -1
  750. package/dist/globuscomponents/gb-toggle-base.entry.js.map +0 -1
  751. package/dist/globuscomponents/gb-token-field.entry.js.map +0 -1
  752. package/dist/globuscomponents/gb-tooltip.entry.js.map +0 -1
  753. package/dist/globuscomponents/gb-verification-code-field.entry.js.map +0 -1
  754. package/dist/globuscomponents/gb-wysiwyg-editor-icon.entry.js.map +0 -1
  755. package/dist/globuscomponents/gb-wysiwyg-toolbar.entry.js.map +0 -1
  756. package/dist/globuscomponents/gb-wysiwyg-tooltip.entry.js.map +0 -1
  757. package/dist/globuscomponents/index-7559531b.js +0 -3013
  758. package/dist/globuscomponents/index-7559531b.js.map +0 -1
  759. package/dist/globuscomponents/reusableModels-850e92f6.js.map +0 -1
  760. package/dist/globuscomponents/shadow-css-7ad5caf8.js +0 -334
  761. package/dist/globuscomponents/shadow-css-7ad5caf8.js.map +0 -1
  762. /package/dist/{globuscomponents → esm}/app-globals-0f993ce5.js +0 -0
  763. /package/dist/{globuscomponents → esm}/app-globals-0f993ce5.js.map +0 -0
@@ -1,3013 +0,0 @@
1
- const NAMESPACE = 'globuscomponents';
2
- const BUILD = /* globuscomponents */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: false, cssAnnotations: true, devTools: true, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: true, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: true, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: true, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
3
- const Env = /* globuscomponents */ {};
4
-
5
- /*
6
- Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
7
- */
8
- var __defProp = Object.defineProperty;
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var Build = {
14
- isDev: BUILD.isDev ? true : false,
15
- isBrowser: true,
16
- isServer: false,
17
- isTesting: BUILD.isTesting ? true : false
18
- };
19
- var hostRefs = BUILD.hotModuleReplacement ? window.__STENCIL_HOSTREFS__ || (window.__STENCIL_HOSTREFS__ = /* @__PURE__ */ new WeakMap()) : /* @__PURE__ */ new WeakMap();
20
- var getHostRef = (ref) => hostRefs.get(ref);
21
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
22
- var registerHost = (hostElement, cmpMeta) => {
23
- const hostRef = {
24
- $flags$: 0,
25
- $hostElement$: hostElement,
26
- $cmpMeta$: cmpMeta,
27
- $instanceValues$: /* @__PURE__ */ new Map()
28
- };
29
- if (BUILD.isDev) {
30
- hostRef.$renderCount$ = 0;
31
- }
32
- if (BUILD.method && BUILD.lazyLoad) {
33
- hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
34
- }
35
- if (BUILD.asyncLoading) {
36
- hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
37
- hostElement["s-p"] = [];
38
- hostElement["s-rc"] = [];
39
- }
40
- return hostRefs.set(hostElement, hostRef);
41
- };
42
- var isMemberInElement = (elm, memberName) => memberName in elm;
43
- var customError;
44
- var consoleError = (e, el) => (customError || console.error)(e, el);
45
- var STENCIL_DEV_MODE = BUILD.isTesting ? ["STENCIL:"] : [
46
- "%cstencil",
47
- "color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"
48
- ];
49
- var consoleDevError = (...m) => console.error(...STENCIL_DEV_MODE, ...m);
50
- var consoleDevWarn = (...m) => console.warn(...STENCIL_DEV_MODE, ...m);
51
- var consoleDevInfo = (...m) => console.info(...STENCIL_DEV_MODE, ...m);
52
- var setErrorHandler = (handler) => customError = handler;
53
-
54
- // src/client/client-load-module.ts
55
- var cmpModules = /* @__PURE__ */ new Map();
56
- var MODULE_IMPORT_PREFIX = "./";
57
- var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
58
- const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
59
- const bundleId = cmpMeta.$lazyBundleId$;
60
- if (BUILD.isDev && typeof bundleId !== "string") {
61
- consoleDevError(
62
- `Trying to lazily load component <${cmpMeta.$tagName$}> with style mode "${hostRef.$modeName$}", but it does not exist.`
63
- );
64
- return void 0;
65
- } else if (!bundleId) {
66
- return void 0;
67
- }
68
- const module = !BUILD.hotModuleReplacement ? cmpModules.get(bundleId) : false;
69
- if (module) {
70
- return module[exportName];
71
- }
72
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
73
- return import(
74
- /* @vite-ignore */
75
- /* webpackInclude: /\.entry\.js$/ */
76
- /* webpackExclude: /\.system\.entry\.js$/ */
77
- /* webpackMode: "lazy" */
78
- `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? "?s-hmr=" + hmrVersionId : ""}`
79
- ).then((importedModule) => {
80
- if (!BUILD.hotModuleReplacement) {
81
- cmpModules.set(bundleId, importedModule);
82
- }
83
- return importedModule[exportName];
84
- }, consoleError);
85
- };
86
-
87
- // src/client/client-style.ts
88
- var styles = /* @__PURE__ */ new Map();
89
- var modeResolutionChain = [];
90
-
91
- // src/runtime/runtime-constants.ts
92
- var CONTENT_REF_ID = "r";
93
- var ORG_LOCATION_ID = "o";
94
- var SLOT_NODE_ID = "s";
95
- var TEXT_NODE_ID = "t";
96
- var HYDRATE_ID = "s-id";
97
- var HYDRATED_STYLE_ID = "sty-id";
98
- var HYDRATE_CHILD_ID = "c-id";
99
- var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
100
- var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
101
- var XLINK_NS = "http://www.w3.org/1999/xlink";
102
- var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
103
- "formAssociatedCallback",
104
- "formResetCallback",
105
- "formDisabledCallback",
106
- "formStateRestoreCallback"
107
- ];
108
- var win = typeof window !== "undefined" ? window : {};
109
- var doc = win.document || { head: {} };
110
- var H = win.HTMLElement || class {
111
- };
112
- var plt = {
113
- $flags$: 0,
114
- $resourcesUrl$: "",
115
- jmp: (h2) => h2(),
116
- raf: (h2) => requestAnimationFrame(h2),
117
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
118
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
119
- ce: (eventName, opts) => new CustomEvent(eventName, opts)
120
- };
121
- var setPlatformHelpers = (helpers) => {
122
- Object.assign(plt, helpers);
123
- };
124
- var supportsShadow = BUILD.shadowDom;
125
- var supportsListenerOptions = /* @__PURE__ */ (() => {
126
- let supportsListenerOptions2 = false;
127
- try {
128
- doc.addEventListener(
129
- "e",
130
- null,
131
- Object.defineProperty({}, "passive", {
132
- get() {
133
- supportsListenerOptions2 = true;
134
- }
135
- })
136
- );
137
- } catch (e) {
138
- }
139
- return supportsListenerOptions2;
140
- })();
141
- var promiseResolve = (v) => Promise.resolve(v);
142
- var supportsConstructableStylesheets = BUILD.constructableCSS ? /* @__PURE__ */ (() => {
143
- try {
144
- new CSSStyleSheet();
145
- return typeof new CSSStyleSheet().replaceSync === "function";
146
- } catch (e) {
147
- }
148
- return false;
149
- })() : false;
150
-
151
- // src/client/client-task-queue.ts
152
- var queueCongestion = 0;
153
- var queuePending = false;
154
- var queueDomReads = [];
155
- var queueDomWrites = [];
156
- var queueDomWritesLow = [];
157
- var queueTask = (queue, write) => (cb) => {
158
- queue.push(cb);
159
- if (!queuePending) {
160
- queuePending = true;
161
- if (write && plt.$flags$ & 4 /* queueSync */) {
162
- nextTick(flush);
163
- } else {
164
- plt.raf(flush);
165
- }
166
- }
167
- };
168
- var consume = (queue) => {
169
- for (let i2 = 0; i2 < queue.length; i2++) {
170
- try {
171
- queue[i2](performance.now());
172
- } catch (e) {
173
- consoleError(e);
174
- }
175
- }
176
- queue.length = 0;
177
- };
178
- var consumeTimeout = (queue, timeout) => {
179
- let i2 = 0;
180
- let ts = 0;
181
- while (i2 < queue.length && (ts = performance.now()) < timeout) {
182
- try {
183
- queue[i2++](ts);
184
- } catch (e) {
185
- consoleError(e);
186
- }
187
- }
188
- if (i2 === queue.length) {
189
- queue.length = 0;
190
- } else if (i2 !== 0) {
191
- queue.splice(0, i2);
192
- }
193
- };
194
- var flush = () => {
195
- if (BUILD.asyncQueue) {
196
- queueCongestion++;
197
- }
198
- consume(queueDomReads);
199
- if (BUILD.asyncQueue) {
200
- const timeout = (plt.$flags$ & 6 /* queueMask */) === 2 /* appLoaded */ ? performance.now() + 14 * Math.ceil(queueCongestion * (1 / 10)) : Infinity;
201
- consumeTimeout(queueDomWrites, timeout);
202
- consumeTimeout(queueDomWritesLow, timeout);
203
- if (queueDomWrites.length > 0) {
204
- queueDomWritesLow.push(...queueDomWrites);
205
- queueDomWrites.length = 0;
206
- }
207
- if (queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0) {
208
- plt.raf(flush);
209
- } else {
210
- queueCongestion = 0;
211
- }
212
- } else {
213
- consume(queueDomWrites);
214
- if (queuePending = queueDomReads.length > 0) {
215
- plt.raf(flush);
216
- }
217
- }
218
- };
219
- var nextTick = (cb) => promiseResolve().then(cb);
220
- var readTask = /* @__PURE__ */ queueTask(queueDomReads, false);
221
- var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
222
-
223
- // src/runtime/asset-path.ts
224
- var getAssetPath = (path) => {
225
- const assetUrl = new URL(path, plt.$resourcesUrl$);
226
- return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
227
- };
228
- var setAssetPath = (path) => plt.$resourcesUrl$ = path;
229
-
230
- // src/utils/constants.ts
231
- var EMPTY_OBJ = {};
232
- var SVG_NS = "http://www.w3.org/2000/svg";
233
- var HTML_NS = "http://www.w3.org/1999/xhtml";
234
-
235
- // src/utils/helpers.ts
236
- var isDef = (v) => v != null;
237
- var isComplexType = (o) => {
238
- o = typeof o;
239
- return o === "object" || o === "function";
240
- };
241
-
242
- // src/utils/query-nonce-meta-tag-content.ts
243
- function queryNonceMetaTagContent(doc2) {
244
- var _a, _b, _c;
245
- return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
246
- }
247
-
248
- // src/utils/result.ts
249
- var result_exports = {};
250
- __export(result_exports, {
251
- err: () => err,
252
- map: () => map,
253
- ok: () => ok,
254
- unwrap: () => unwrap,
255
- unwrapErr: () => unwrapErr
256
- });
257
- var ok = (value) => ({
258
- isOk: true,
259
- isErr: false,
260
- value
261
- });
262
- var err = (value) => ({
263
- isOk: false,
264
- isErr: true,
265
- value
266
- });
267
- function map(result, fn) {
268
- if (result.isOk) {
269
- const val = fn(result.value);
270
- if (val instanceof Promise) {
271
- return val.then((newVal) => ok(newVal));
272
- } else {
273
- return ok(val);
274
- }
275
- }
276
- if (result.isErr) {
277
- const value = result.value;
278
- return err(value);
279
- }
280
- throw "should never get here";
281
- }
282
- var unwrap = (result) => {
283
- if (result.isOk) {
284
- return result.value;
285
- } else {
286
- throw result.value;
287
- }
288
- };
289
- var unwrapErr = (result) => {
290
- if (result.isErr) {
291
- return result.value;
292
- } else {
293
- throw result.value;
294
- }
295
- };
296
- var i = 0;
297
- var createTime = (fnName, tagName = "") => {
298
- if (BUILD.profile && performance.mark) {
299
- const key = `st:${fnName}:${tagName}:${i++}`;
300
- performance.mark(key);
301
- return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);
302
- } else {
303
- return () => {
304
- return;
305
- };
306
- }
307
- };
308
- var uniqueTime = (key, measureText) => {
309
- if (BUILD.profile && performance.mark) {
310
- if (performance.getEntriesByName(key, "mark").length === 0) {
311
- performance.mark(key);
312
- }
313
- return () => {
314
- if (performance.getEntriesByName(measureText, "measure").length === 0) {
315
- performance.measure(measureText, key);
316
- }
317
- };
318
- } else {
319
- return () => {
320
- return;
321
- };
322
- }
323
- };
324
- var inspect = (ref) => {
325
- const hostRef = getHostRef(ref);
326
- if (!hostRef) {
327
- return void 0;
328
- }
329
- const flags = hostRef.$flags$;
330
- const hostElement = hostRef.$hostElement$;
331
- return {
332
- renderCount: hostRef.$renderCount$,
333
- flags: {
334
- hasRendered: !!(flags & 2 /* hasRendered */),
335
- hasConnected: !!(flags & 1 /* hasConnected */),
336
- isWaitingForChildren: !!(flags & 4 /* isWaitingForChildren */),
337
- isConstructingInstance: !!(flags & 8 /* isConstructingInstance */),
338
- isQueuedForUpdate: !!(flags & 16 /* isQueuedForUpdate */),
339
- hasInitializedComponent: !!(flags & 32 /* hasInitializedComponent */),
340
- hasLoadedComponent: !!(flags & 64 /* hasLoadedComponent */),
341
- isWatchReady: !!(flags & 128 /* isWatchReady */),
342
- isListenReady: !!(flags & 256 /* isListenReady */),
343
- needsRerender: !!(flags & 512 /* needsRerender */)
344
- },
345
- instanceValues: hostRef.$instanceValues$,
346
- ancestorComponent: hostRef.$ancestorComponent$,
347
- hostElement,
348
- lazyInstance: hostRef.$lazyInstance$,
349
- vnode: hostRef.$vnode$,
350
- modeName: hostRef.$modeName$,
351
- onReadyPromise: hostRef.$onReadyPromise$,
352
- onReadyResolve: hostRef.$onReadyResolve$,
353
- onInstancePromise: hostRef.$onInstancePromise$,
354
- onInstanceResolve: hostRef.$onInstanceResolve$,
355
- onRenderResolve: hostRef.$onRenderResolve$,
356
- queuedListeners: hostRef.$queuedListeners$,
357
- rmListeners: hostRef.$rmListeners$,
358
- ["s-id"]: hostElement["s-id"],
359
- ["s-cr"]: hostElement["s-cr"],
360
- ["s-lr"]: hostElement["s-lr"],
361
- ["s-p"]: hostElement["s-p"],
362
- ["s-rc"]: hostElement["s-rc"],
363
- ["s-sc"]: hostElement["s-sc"]
364
- };
365
- };
366
- var installDevTools = () => {
367
- if (BUILD.devTools) {
368
- const stencil = win.stencil = win.stencil || {};
369
- const originalInspect = stencil.inspect;
370
- stencil.inspect = (ref) => {
371
- let result = inspect(ref);
372
- if (!result && typeof originalInspect === "function") {
373
- result = originalInspect(ref);
374
- }
375
- return result;
376
- };
377
- }
378
- };
379
- var h = (nodeName, vnodeData, ...children) => {
380
- let child = null;
381
- let key = null;
382
- let slotName = null;
383
- let simple = false;
384
- let lastSimple = false;
385
- const vNodeChildren = [];
386
- const walk = (c) => {
387
- for (let i2 = 0; i2 < c.length; i2++) {
388
- child = c[i2];
389
- if (Array.isArray(child)) {
390
- walk(child);
391
- } else if (child != null && typeof child !== "boolean") {
392
- if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
393
- child = String(child);
394
- } else if (BUILD.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
395
- consoleDevError(`vNode passed as children has unexpected type.
396
- Make sure it's using the correct h() function.
397
- Empty objects can also be the cause, look for JSX comments that became objects.`);
398
- }
399
- if (simple && lastSimple) {
400
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
401
- } else {
402
- vNodeChildren.push(simple ? newVNode(null, child) : child);
403
- }
404
- lastSimple = simple;
405
- }
406
- }
407
- };
408
- walk(children);
409
- if (vnodeData) {
410
- if (BUILD.isDev && nodeName === "input") {
411
- validateInputProperties(vnodeData);
412
- }
413
- if (BUILD.vdomKey && vnodeData.key) {
414
- key = vnodeData.key;
415
- }
416
- if (BUILD.slotRelocation && vnodeData.name) {
417
- slotName = vnodeData.name;
418
- }
419
- if (BUILD.vdomClass) {
420
- const classData = vnodeData.className || vnodeData.class;
421
- if (classData) {
422
- vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
423
- }
424
- }
425
- }
426
- if (BUILD.isDev && vNodeChildren.some(isHost)) {
427
- consoleDevError(`The <Host> must be the single root component. Make sure:
428
- - You are NOT using hostData() and <Host> in the same component.
429
- - <Host> is used once, and it's the single root component of the render() function.`);
430
- }
431
- if (BUILD.vdomFunctional && typeof nodeName === "function") {
432
- return nodeName(
433
- vnodeData === null ? {} : vnodeData,
434
- vNodeChildren,
435
- vdomFnUtils
436
- );
437
- }
438
- const vnode = newVNode(nodeName, null);
439
- vnode.$attrs$ = vnodeData;
440
- if (vNodeChildren.length > 0) {
441
- vnode.$children$ = vNodeChildren;
442
- }
443
- if (BUILD.vdomKey) {
444
- vnode.$key$ = key;
445
- }
446
- if (BUILD.slotRelocation) {
447
- vnode.$name$ = slotName;
448
- }
449
- return vnode;
450
- };
451
- var newVNode = (tag, text) => {
452
- const vnode = {
453
- $flags$: 0,
454
- $tag$: tag,
455
- $text$: text,
456
- $elm$: null,
457
- $children$: null
458
- };
459
- if (BUILD.vdomAttribute) {
460
- vnode.$attrs$ = null;
461
- }
462
- if (BUILD.vdomKey) {
463
- vnode.$key$ = null;
464
- }
465
- if (BUILD.slotRelocation) {
466
- vnode.$name$ = null;
467
- }
468
- return vnode;
469
- };
470
- var Host = {};
471
- var isHost = (node) => node && node.$tag$ === Host;
472
- var vdomFnUtils = {
473
- forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
474
- map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
475
- };
476
- var convertToPublic = (node) => ({
477
- vattrs: node.$attrs$,
478
- vchildren: node.$children$,
479
- vkey: node.$key$,
480
- vname: node.$name$,
481
- vtag: node.$tag$,
482
- vtext: node.$text$
483
- });
484
- var convertToPrivate = (node) => {
485
- if (typeof node.vtag === "function") {
486
- const vnodeData = { ...node.vattrs };
487
- if (node.vkey) {
488
- vnodeData.key = node.vkey;
489
- }
490
- if (node.vname) {
491
- vnodeData.name = node.vname;
492
- }
493
- return h(node.vtag, vnodeData, ...node.vchildren || []);
494
- }
495
- const vnode = newVNode(node.vtag, node.vtext);
496
- vnode.$attrs$ = node.vattrs;
497
- vnode.$children$ = node.vchildren;
498
- vnode.$key$ = node.vkey;
499
- vnode.$name$ = node.vname;
500
- return vnode;
501
- };
502
- var validateInputProperties = (inputElm) => {
503
- const props = Object.keys(inputElm);
504
- const value = props.indexOf("value");
505
- if (value === -1) {
506
- return;
507
- }
508
- const typeIndex = props.indexOf("type");
509
- const minIndex = props.indexOf("min");
510
- const maxIndex = props.indexOf("max");
511
- const stepIndex = props.indexOf("step");
512
- if (value < typeIndex || value < minIndex || value < maxIndex || value < stepIndex) {
513
- consoleDevWarn(`The "value" prop of <input> should be set after "min", "max", "type" and "step"`);
514
- }
515
- };
516
-
517
- // src/runtime/client-hydrate.ts
518
- var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
519
- const endHydrate = createTime("hydrateClient", tagName);
520
- const shadowRoot = hostElm.shadowRoot;
521
- const childRenderNodes = [];
522
- const slotNodes = [];
523
- const shadowRootNodes = BUILD.shadowDom && shadowRoot ? [] : null;
524
- const vnode = hostRef.$vnode$ = newVNode(tagName, null);
525
- if (!plt.$orgLocNodes$) {
526
- initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
527
- }
528
- hostElm[HYDRATE_ID] = hostId;
529
- hostElm.removeAttribute(HYDRATE_ID);
530
- clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
531
- childRenderNodes.map((c) => {
532
- const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
533
- const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
534
- const node = c.$elm$;
535
- if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
536
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
537
- }
538
- if (!shadowRoot) {
539
- node["s-hn"] = tagName;
540
- if (orgLocationNode) {
541
- node["s-ol"] = orgLocationNode;
542
- node["s-ol"]["s-nr"] = node;
543
- }
544
- }
545
- plt.$orgLocNodes$.delete(orgLocationId);
546
- });
547
- if (BUILD.shadowDom && shadowRoot) {
548
- shadowRootNodes.map((shadowRootNode) => {
549
- if (shadowRootNode) {
550
- shadowRoot.appendChild(shadowRootNode);
551
- }
552
- });
553
- }
554
- endHydrate();
555
- };
556
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
557
- let childNodeType;
558
- let childIdSplt;
559
- let childVNode;
560
- let i2;
561
- if (node.nodeType === 1 /* ElementNode */) {
562
- childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
563
- if (childNodeType) {
564
- childIdSplt = childNodeType.split(".");
565
- if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
566
- childVNode = {
567
- $flags$: 0,
568
- $hostId$: childIdSplt[0],
569
- $nodeId$: childIdSplt[1],
570
- $depth$: childIdSplt[2],
571
- $index$: childIdSplt[3],
572
- $tag$: node.tagName.toLowerCase(),
573
- $elm$: node,
574
- $attrs$: null,
575
- $children$: null,
576
- $key$: null,
577
- $name$: null,
578
- $text$: null
579
- };
580
- childRenderNodes.push(childVNode);
581
- node.removeAttribute(HYDRATE_CHILD_ID);
582
- if (!parentVNode.$children$) {
583
- parentVNode.$children$ = [];
584
- }
585
- parentVNode.$children$[childVNode.$index$] = childVNode;
586
- parentVNode = childVNode;
587
- if (shadowRootNodes && childVNode.$depth$ === "0") {
588
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
589
- }
590
- }
591
- }
592
- if (node.shadowRoot) {
593
- for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
594
- clientHydrate(
595
- parentVNode,
596
- childRenderNodes,
597
- slotNodes,
598
- shadowRootNodes,
599
- hostElm,
600
- node.shadowRoot.childNodes[i2],
601
- hostId
602
- );
603
- }
604
- }
605
- for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
606
- clientHydrate(
607
- parentVNode,
608
- childRenderNodes,
609
- slotNodes,
610
- shadowRootNodes,
611
- hostElm,
612
- node.childNodes[i2],
613
- hostId
614
- );
615
- }
616
- } else if (node.nodeType === 8 /* CommentNode */) {
617
- childIdSplt = node.nodeValue.split(".");
618
- if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
619
- childNodeType = childIdSplt[0];
620
- childVNode = {
621
- $flags$: 0,
622
- $hostId$: childIdSplt[1],
623
- $nodeId$: childIdSplt[2],
624
- $depth$: childIdSplt[3],
625
- $index$: childIdSplt[4],
626
- $elm$: node,
627
- $attrs$: null,
628
- $children$: null,
629
- $key$: null,
630
- $name$: null,
631
- $tag$: null,
632
- $text$: null
633
- };
634
- if (childNodeType === TEXT_NODE_ID) {
635
- childVNode.$elm$ = node.nextSibling;
636
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
637
- childVNode.$text$ = childVNode.$elm$.textContent;
638
- childRenderNodes.push(childVNode);
639
- node.remove();
640
- if (!parentVNode.$children$) {
641
- parentVNode.$children$ = [];
642
- }
643
- parentVNode.$children$[childVNode.$index$] = childVNode;
644
- if (shadowRootNodes && childVNode.$depth$ === "0") {
645
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
646
- }
647
- }
648
- } else if (childVNode.$hostId$ === hostId) {
649
- if (childNodeType === SLOT_NODE_ID) {
650
- childVNode.$tag$ = "slot";
651
- if (childIdSplt[5]) {
652
- node["s-sn"] = childVNode.$name$ = childIdSplt[5];
653
- } else {
654
- node["s-sn"] = "";
655
- }
656
- node["s-sr"] = true;
657
- if (BUILD.shadowDom && shadowRootNodes) {
658
- childVNode.$elm$ = doc.createElement(childVNode.$tag$);
659
- if (childVNode.$name$) {
660
- childVNode.$elm$.setAttribute("name", childVNode.$name$);
661
- }
662
- node.parentNode.insertBefore(childVNode.$elm$, node);
663
- node.remove();
664
- if (childVNode.$depth$ === "0") {
665
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
666
- }
667
- }
668
- slotNodes.push(childVNode);
669
- if (!parentVNode.$children$) {
670
- parentVNode.$children$ = [];
671
- }
672
- parentVNode.$children$[childVNode.$index$] = childVNode;
673
- } else if (childNodeType === CONTENT_REF_ID) {
674
- if (BUILD.shadowDom && shadowRootNodes) {
675
- node.remove();
676
- } else if (BUILD.slotRelocation) {
677
- hostElm["s-cr"] = node;
678
- node["s-cn"] = true;
679
- }
680
- }
681
- }
682
- }
683
- } else if (parentVNode && parentVNode.$tag$ === "style") {
684
- const vnode = newVNode(null, node.textContent);
685
- vnode.$elm$ = node;
686
- vnode.$index$ = "0";
687
- parentVNode.$children$ = [vnode];
688
- }
689
- };
690
- var initializeDocumentHydrate = (node, orgLocNodes) => {
691
- if (node.nodeType === 1 /* ElementNode */) {
692
- let i2 = 0;
693
- if (node.shadowRoot) {
694
- for (; i2 < node.shadowRoot.childNodes.length; i2++) {
695
- initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
696
- }
697
- }
698
- for (i2 = 0; i2 < node.childNodes.length; i2++) {
699
- initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
700
- }
701
- } else if (node.nodeType === 8 /* CommentNode */) {
702
- const childIdSplt = node.nodeValue.split(".");
703
- if (childIdSplt[0] === ORG_LOCATION_ID) {
704
- orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
705
- node.nodeValue = "";
706
- node["s-en"] = childIdSplt[3];
707
- }
708
- }
709
- };
710
-
711
- // src/runtime/mode.ts
712
- var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
713
- var setMode = (handler) => modeResolutionChain.push(handler);
714
- var getMode = (ref) => getHostRef(ref).$modeName$;
715
- var parsePropertyValue = (propValue, propType) => {
716
- if (propValue != null && !isComplexType(propValue)) {
717
- if (BUILD.propBoolean && propType & 4 /* Boolean */) {
718
- return propValue === "false" ? false : propValue === "" || !!propValue;
719
- }
720
- if (BUILD.propNumber && propType & 2 /* Number */) {
721
- return parseFloat(propValue);
722
- }
723
- if (BUILD.propString && propType & 1 /* String */) {
724
- return String(propValue);
725
- }
726
- return propValue;
727
- }
728
- return propValue;
729
- };
730
- var getElement = (ref) => BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
731
-
732
- // src/runtime/event-emitter.ts
733
- var createEvent = (ref, name, flags) => {
734
- const elm = getElement(ref);
735
- return {
736
- emit: (detail) => {
737
- if (BUILD.isDev && !elm.isConnected) {
738
- consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
739
- }
740
- return emitEvent(elm, name, {
741
- bubbles: !!(flags & 4 /* Bubbles */),
742
- composed: !!(flags & 2 /* Composed */),
743
- cancelable: !!(flags & 1 /* Cancellable */),
744
- detail
745
- });
746
- }
747
- };
748
- };
749
- var emitEvent = (elm, name, opts) => {
750
- const ev = plt.ce(name, opts);
751
- elm.dispatchEvent(ev);
752
- return ev;
753
- };
754
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
755
- var registerStyle = (scopeId2, cssText, allowCS) => {
756
- let style = styles.get(scopeId2);
757
- if (supportsConstructableStylesheets && allowCS) {
758
- style = style || new CSSStyleSheet();
759
- if (typeof style === "string") {
760
- style = cssText;
761
- } else {
762
- style.replaceSync(cssText);
763
- }
764
- } else {
765
- style = cssText;
766
- }
767
- styles.set(scopeId2, style);
768
- };
769
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
770
- var _a;
771
- const scopeId2 = getScopeId(cmpMeta, mode);
772
- const style = styles.get(scopeId2);
773
- if (!BUILD.attachStyles) {
774
- return scopeId2;
775
- }
776
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
777
- if (style) {
778
- if (typeof style === "string") {
779
- styleContainerNode = styleContainerNode.head || styleContainerNode;
780
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
781
- let styleElm;
782
- if (!appliedStyles) {
783
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
784
- }
785
- if (!appliedStyles.has(scopeId2)) {
786
- if (BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
787
- styleElm.innerHTML = style;
788
- } else {
789
- styleElm = doc.createElement("style");
790
- styleElm.innerHTML = style;
791
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
792
- if (nonce != null) {
793
- styleElm.setAttribute("nonce", nonce);
794
- }
795
- if ((BUILD.hydrateServerSide || BUILD.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
796
- styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
797
- }
798
- const injectStyle = (
799
- /**
800
- * we render a scoped component
801
- */
802
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
803
- * we are using shadow dom and render the style tag within the shadowRoot
804
- */
805
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
806
- );
807
- if (injectStyle) {
808
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
809
- }
810
- }
811
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
812
- styleElm.innerHTML += SLOT_FB_CSS;
813
- }
814
- if (appliedStyles) {
815
- appliedStyles.add(scopeId2);
816
- }
817
- }
818
- } else if (BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
819
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
820
- }
821
- }
822
- return scopeId2;
823
- };
824
- var attachStyles = (hostRef) => {
825
- const cmpMeta = hostRef.$cmpMeta$;
826
- const elm = hostRef.$hostElement$;
827
- const flags = cmpMeta.$flags$;
828
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
829
- const scopeId2 = addStyle(
830
- BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
831
- cmpMeta,
832
- hostRef.$modeName$
833
- );
834
- if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
835
- elm["s-sc"] = scopeId2;
836
- elm.classList.add(scopeId2 + "-h");
837
- if (BUILD.scoped && flags & 2 /* scopedCssEncapsulation */) {
838
- elm.classList.add(scopeId2 + "-s");
839
- }
840
- }
841
- endAttachStyles();
842
- };
843
- var getScopeId = (cmp, mode) => "sc-" + (BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
844
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
845
- if (oldValue !== newValue) {
846
- let isProp = isMemberInElement(elm, memberName);
847
- let ln = memberName.toLowerCase();
848
- if (BUILD.vdomClass && memberName === "class") {
849
- const classList = elm.classList;
850
- const oldClasses = parseClassList(oldValue);
851
- const newClasses = parseClassList(newValue);
852
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
853
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
854
- } else if (BUILD.vdomStyle && memberName === "style") {
855
- if (BUILD.updatable) {
856
- for (const prop in oldValue) {
857
- if (!newValue || newValue[prop] == null) {
858
- if (!BUILD.hydrateServerSide && prop.includes("-")) {
859
- elm.style.removeProperty(prop);
860
- } else {
861
- elm.style[prop] = "";
862
- }
863
- }
864
- }
865
- }
866
- for (const prop in newValue) {
867
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
868
- if (!BUILD.hydrateServerSide && prop.includes("-")) {
869
- elm.style.setProperty(prop, newValue[prop]);
870
- } else {
871
- elm.style[prop] = newValue[prop];
872
- }
873
- }
874
- }
875
- } else if (BUILD.vdomKey && memberName === "key") {
876
- } else if (BUILD.vdomRef && memberName === "ref") {
877
- if (newValue) {
878
- newValue(elm);
879
- }
880
- } else if (BUILD.vdomListener && (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
881
- if (memberName[2] === "-") {
882
- memberName = memberName.slice(3);
883
- } else if (isMemberInElement(win, ln)) {
884
- memberName = ln.slice(2);
885
- } else {
886
- memberName = ln[2] + memberName.slice(3);
887
- }
888
- if (oldValue || newValue) {
889
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
890
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
891
- if (oldValue) {
892
- plt.rel(elm, memberName, oldValue, capture);
893
- }
894
- if (newValue) {
895
- plt.ael(elm, memberName, newValue, capture);
896
- }
897
- }
898
- } else if (BUILD.vdomPropOrAttr) {
899
- const isComplex = isComplexType(newValue);
900
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
901
- try {
902
- if (!elm.tagName.includes("-")) {
903
- const n = newValue == null ? "" : newValue;
904
- if (memberName === "list") {
905
- isProp = false;
906
- } else if (oldValue == null || elm[memberName] != n) {
907
- elm[memberName] = n;
908
- }
909
- } else {
910
- elm[memberName] = newValue;
911
- }
912
- } catch (e) {
913
- }
914
- }
915
- let xlink = false;
916
- if (BUILD.vdomXlink) {
917
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
918
- memberName = ln;
919
- xlink = true;
920
- }
921
- }
922
- if (newValue == null || newValue === false) {
923
- if (newValue !== false || elm.getAttribute(memberName) === "") {
924
- if (BUILD.vdomXlink && xlink) {
925
- elm.removeAttributeNS(XLINK_NS, memberName);
926
- } else {
927
- elm.removeAttribute(memberName);
928
- }
929
- }
930
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
931
- newValue = newValue === true ? "" : newValue;
932
- if (BUILD.vdomXlink && xlink) {
933
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
934
- } else {
935
- elm.setAttribute(memberName, newValue);
936
- }
937
- }
938
- }
939
- }
940
- };
941
- var parseClassListRegex = /\s/;
942
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
943
- var CAPTURE_EVENT_SUFFIX = "Capture";
944
- var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
945
-
946
- // src/runtime/vdom/update-element.ts
947
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
948
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
949
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
950
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
951
- if (BUILD.updatable) {
952
- for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
953
- if (!(memberName in newVnodeAttrs)) {
954
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
955
- }
956
- }
957
- }
958
- for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
959
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
960
- }
961
- };
962
- function sortedAttrNames(attrNames) {
963
- return attrNames.includes("ref") ? (
964
- // we need to sort these to ensure that `'ref'` is the last attr
965
- [...attrNames.filter((attr) => attr !== "ref"), "ref"]
966
- ) : (
967
- // no need to sort, return the original array
968
- attrNames
969
- );
970
- }
971
-
972
- // src/runtime/vdom/vdom-render.ts
973
- var scopeId;
974
- var contentRef;
975
- var hostTagName;
976
- var useNativeShadowDom = false;
977
- var checkSlotFallbackVisibility = false;
978
- var checkSlotRelocate = false;
979
- var isSvgMode = false;
980
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
981
- var _a;
982
- const newVNode2 = newParentVNode.$children$[childIndex];
983
- let i2 = 0;
984
- let elm;
985
- let childNode;
986
- let oldVNode;
987
- if (BUILD.slotRelocation && !useNativeShadowDom) {
988
- checkSlotRelocate = true;
989
- if (newVNode2.$tag$ === "slot") {
990
- if (scopeId) {
991
- parentElm.classList.add(scopeId + "-s");
992
- }
993
- newVNode2.$flags$ |= newVNode2.$children$ ? (
994
- // slot element has fallback content
995
- // still create an element that "mocks" the slot element
996
- 2 /* isSlotFallback */
997
- ) : (
998
- // slot element does not have fallback content
999
- // create an html comment we'll use to always reference
1000
- // where actual slot content should sit next to
1001
- 1 /* isSlotReference */
1002
- );
1003
- }
1004
- }
1005
- if (BUILD.isDev && newVNode2.$elm$) {
1006
- consoleDevError(
1007
- `The JSX ${newVNode2.$text$ !== null ? `"${newVNode2.$text$}" text` : `"${newVNode2.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`
1008
- );
1009
- }
1010
- if (BUILD.vdomText && newVNode2.$text$ !== null) {
1011
- elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
1012
- } else if (BUILD.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
1013
- elm = newVNode2.$elm$ = BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : doc.createTextNode("");
1014
- } else {
1015
- if (BUILD.svg && !isSvgMode) {
1016
- isSvgMode = newVNode2.$tag$ === "svg";
1017
- }
1018
- elm = newVNode2.$elm$ = BUILD.svg ? doc.createElementNS(
1019
- isSvgMode ? SVG_NS : HTML_NS,
1020
- !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
1021
- ) : doc.createElement(
1022
- !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
1023
- );
1024
- if (BUILD.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
1025
- isSvgMode = false;
1026
- }
1027
- if (BUILD.vdomAttribute) {
1028
- updateElement(null, newVNode2, isSvgMode);
1029
- }
1030
- const rootNode = elm.getRootNode();
1031
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
1032
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
1033
- elm.classList.add(elm["s-si"] = scopeId);
1034
- }
1035
- if (BUILD.scoped) {
1036
- updateElementScopeIds(elm, parentElm);
1037
- }
1038
- if (newVNode2.$children$) {
1039
- for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
1040
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
1041
- if (childNode) {
1042
- elm.appendChild(childNode);
1043
- }
1044
- }
1045
- }
1046
- if (BUILD.svg) {
1047
- if (newVNode2.$tag$ === "svg") {
1048
- isSvgMode = false;
1049
- } else if (elm.tagName === "foreignObject") {
1050
- isSvgMode = true;
1051
- }
1052
- }
1053
- }
1054
- elm["s-hn"] = hostTagName;
1055
- if (BUILD.slotRelocation) {
1056
- if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
1057
- elm["s-sr"] = true;
1058
- elm["s-cr"] = contentRef;
1059
- elm["s-sn"] = newVNode2.$name$ || "";
1060
- elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
1061
- oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
1062
- if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
1063
- if (BUILD.experimentalSlotFixes) {
1064
- relocateToHostRoot(oldParentVNode.$elm$);
1065
- } else {
1066
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
1067
- }
1068
- }
1069
- }
1070
- }
1071
- return elm;
1072
- };
1073
- var relocateToHostRoot = (parentElm) => {
1074
- plt.$flags$ |= 1 /* isTmpDisconnected */;
1075
- const host = parentElm.closest(hostTagName.toLowerCase());
1076
- if (host != null) {
1077
- const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
1078
- const childNodeArray = Array.from(parentElm.childNodes);
1079
- for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
1080
- if (childNode["s-sh"] != null) {
1081
- insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
1082
- childNode["s-sh"] = void 0;
1083
- checkSlotRelocate = true;
1084
- }
1085
- }
1086
- }
1087
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1088
- };
1089
- var putBackInOriginalLocation = (parentElm, recursive) => {
1090
- plt.$flags$ |= 1 /* isTmpDisconnected */;
1091
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
1092
- if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
1093
- let node = parentElm;
1094
- while (node = node.nextSibling) {
1095
- if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
1096
- oldSlotChildNodes.push(node);
1097
- }
1098
- }
1099
- }
1100
- for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
1101
- const childNode = oldSlotChildNodes[i2];
1102
- if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
1103
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
1104
- childNode["s-ol"].remove();
1105
- childNode["s-ol"] = void 0;
1106
- childNode["s-sh"] = void 0;
1107
- checkSlotRelocate = true;
1108
- }
1109
- if (recursive) {
1110
- putBackInOriginalLocation(childNode, recursive);
1111
- }
1112
- }
1113
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1114
- };
1115
- var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
1116
- let containerElm = BUILD.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
1117
- let childNode;
1118
- if (BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
1119
- containerElm = containerElm.shadowRoot;
1120
- }
1121
- for (; startIdx <= endIdx; ++startIdx) {
1122
- if (vnodes[startIdx]) {
1123
- childNode = createElm(null, parentVNode, startIdx, parentElm);
1124
- if (childNode) {
1125
- vnodes[startIdx].$elm$ = childNode;
1126
- insertBefore(containerElm, childNode, BUILD.slotRelocation ? referenceNode(before) : before);
1127
- }
1128
- }
1129
- }
1130
- };
1131
- var removeVnodes = (vnodes, startIdx, endIdx) => {
1132
- for (let index = startIdx; index <= endIdx; ++index) {
1133
- const vnode = vnodes[index];
1134
- if (vnode) {
1135
- const elm = vnode.$elm$;
1136
- nullifyVNodeRefs(vnode);
1137
- if (elm) {
1138
- if (BUILD.slotRelocation) {
1139
- checkSlotFallbackVisibility = true;
1140
- if (elm["s-ol"]) {
1141
- elm["s-ol"].remove();
1142
- } else {
1143
- putBackInOriginalLocation(elm, true);
1144
- }
1145
- }
1146
- elm.remove();
1147
- }
1148
- }
1149
- }
1150
- };
1151
- var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
1152
- let oldStartIdx = 0;
1153
- let newStartIdx = 0;
1154
- let idxInOld = 0;
1155
- let i2 = 0;
1156
- let oldEndIdx = oldCh.length - 1;
1157
- let oldStartVnode = oldCh[0];
1158
- let oldEndVnode = oldCh[oldEndIdx];
1159
- let newEndIdx = newCh.length - 1;
1160
- let newStartVnode = newCh[0];
1161
- let newEndVnode = newCh[newEndIdx];
1162
- let node;
1163
- let elmToMove;
1164
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
1165
- if (oldStartVnode == null) {
1166
- oldStartVnode = oldCh[++oldStartIdx];
1167
- } else if (oldEndVnode == null) {
1168
- oldEndVnode = oldCh[--oldEndIdx];
1169
- } else if (newStartVnode == null) {
1170
- newStartVnode = newCh[++newStartIdx];
1171
- } else if (newEndVnode == null) {
1172
- newEndVnode = newCh[--newEndIdx];
1173
- } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
1174
- patch(oldStartVnode, newStartVnode, isInitialRender);
1175
- oldStartVnode = oldCh[++oldStartIdx];
1176
- newStartVnode = newCh[++newStartIdx];
1177
- } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
1178
- patch(oldEndVnode, newEndVnode, isInitialRender);
1179
- oldEndVnode = oldCh[--oldEndIdx];
1180
- newEndVnode = newCh[--newEndIdx];
1181
- } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
1182
- if (BUILD.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
1183
- putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
1184
- }
1185
- patch(oldStartVnode, newEndVnode, isInitialRender);
1186
- insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
1187
- oldStartVnode = oldCh[++oldStartIdx];
1188
- newEndVnode = newCh[--newEndIdx];
1189
- } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
1190
- if (BUILD.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
1191
- putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
1192
- }
1193
- patch(oldEndVnode, newStartVnode, isInitialRender);
1194
- insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
1195
- oldEndVnode = oldCh[--oldEndIdx];
1196
- newStartVnode = newCh[++newStartIdx];
1197
- } else {
1198
- idxInOld = -1;
1199
- if (BUILD.vdomKey) {
1200
- for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
1201
- if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
1202
- idxInOld = i2;
1203
- break;
1204
- }
1205
- }
1206
- }
1207
- if (BUILD.vdomKey && idxInOld >= 0) {
1208
- elmToMove = oldCh[idxInOld];
1209
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1210
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
1211
- } else {
1212
- patch(elmToMove, newStartVnode, isInitialRender);
1213
- oldCh[idxInOld] = void 0;
1214
- node = elmToMove.$elm$;
1215
- }
1216
- newStartVnode = newCh[++newStartIdx];
1217
- } else {
1218
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
1219
- newStartVnode = newCh[++newStartIdx];
1220
- }
1221
- if (node) {
1222
- if (BUILD.slotRelocation) {
1223
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
1224
- } else {
1225
- insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
1226
- }
1227
- }
1228
- }
1229
- }
1230
- if (oldStartIdx > oldEndIdx) {
1231
- addVnodes(
1232
- parentElm,
1233
- newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
1234
- newVNode2,
1235
- newCh,
1236
- newStartIdx,
1237
- newEndIdx
1238
- );
1239
- } else if (BUILD.updatable && newStartIdx > newEndIdx) {
1240
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
1241
- }
1242
- };
1243
- var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1244
- if (leftVNode.$tag$ === rightVNode.$tag$) {
1245
- if (BUILD.slotRelocation && leftVNode.$tag$ === "slot") {
1246
- if (
1247
- // The component gets hydrated and no VDOM has been initialized.
1248
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
1249
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
1250
- // hydration comments to be removed
1251
- leftVNode.$elm$.nodeType !== 8
1252
- ) {
1253
- return false;
1254
- }
1255
- return leftVNode.$name$ === rightVNode.$name$;
1256
- }
1257
- if (BUILD.vdomKey && !isInitialRender) {
1258
- return leftVNode.$key$ === rightVNode.$key$;
1259
- }
1260
- return true;
1261
- }
1262
- return false;
1263
- };
1264
- var referenceNode = (node) => {
1265
- return node && node["s-ol"] || node;
1266
- };
1267
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
1268
- var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1269
- const elm = newVNode2.$elm$ = oldVNode.$elm$;
1270
- const oldChildren = oldVNode.$children$;
1271
- const newChildren = newVNode2.$children$;
1272
- const tag = newVNode2.$tag$;
1273
- const text = newVNode2.$text$;
1274
- let defaultHolder;
1275
- if (!BUILD.vdomText || text === null) {
1276
- if (BUILD.svg) {
1277
- isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
1278
- }
1279
- if (BUILD.vdomAttribute || BUILD.reflect) {
1280
- if (BUILD.slot && tag === "slot" && !useNativeShadowDom) {
1281
- if (BUILD.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
1282
- newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
1283
- relocateToHostRoot(newVNode2.$elm$.parentElement);
1284
- }
1285
- } else {
1286
- updateElement(oldVNode, newVNode2, isSvgMode);
1287
- }
1288
- }
1289
- if (BUILD.updatable && oldChildren !== null && newChildren !== null) {
1290
- updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
1291
- } else if (newChildren !== null) {
1292
- if (BUILD.updatable && BUILD.vdomText && oldVNode.$text$ !== null) {
1293
- elm.textContent = "";
1294
- }
1295
- addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
1296
- } else if (
1297
- // don't do this on initial render as it can cause non-hydrated content to be removed
1298
- !isInitialRender && BUILD.updatable && oldChildren !== null
1299
- ) {
1300
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
1301
- }
1302
- if (BUILD.svg && isSvgMode && tag === "svg") {
1303
- isSvgMode = false;
1304
- }
1305
- } else if (BUILD.vdomText && BUILD.slotRelocation && (defaultHolder = elm["s-cr"])) {
1306
- defaultHolder.parentNode.textContent = text;
1307
- } else if (BUILD.vdomText && oldVNode.$text$ !== text) {
1308
- elm.data = text;
1309
- }
1310
- };
1311
- var updateFallbackSlotVisibility = (elm) => {
1312
- const childNodes = elm.childNodes;
1313
- for (const childNode of childNodes) {
1314
- if (childNode.nodeType === 1 /* ElementNode */) {
1315
- if (childNode["s-sr"]) {
1316
- const slotName = childNode["s-sn"];
1317
- childNode.hidden = false;
1318
- for (const siblingNode of childNodes) {
1319
- if (siblingNode !== childNode) {
1320
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
1321
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
1322
- childNode.hidden = true;
1323
- break;
1324
- }
1325
- } else {
1326
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1327
- childNode.hidden = true;
1328
- break;
1329
- }
1330
- }
1331
- }
1332
- }
1333
- }
1334
- updateFallbackSlotVisibility(childNode);
1335
- }
1336
- }
1337
- };
1338
- var relocateNodes = [];
1339
- var markSlotContentForRelocation = (elm) => {
1340
- let node;
1341
- let hostContentNodes;
1342
- let j;
1343
- for (const childNode of elm.childNodes) {
1344
- if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1345
- hostContentNodes = node.parentNode.childNodes;
1346
- const slotName = childNode["s-sn"];
1347
- for (j = hostContentNodes.length - 1; j >= 0; j--) {
1348
- node = hostContentNodes[j];
1349
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
1350
- if (isNodeLocatedInSlot(node, slotName)) {
1351
- let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1352
- checkSlotFallbackVisibility = true;
1353
- node["s-sn"] = node["s-sn"] || slotName;
1354
- if (relocateNodeData) {
1355
- relocateNodeData.$nodeToRelocate$["s-sh"] = childNode["s-hn"];
1356
- relocateNodeData.$slotRefNode$ = childNode;
1357
- } else {
1358
- node["s-sh"] = childNode["s-hn"];
1359
- relocateNodes.push({
1360
- $slotRefNode$: childNode,
1361
- $nodeToRelocate$: node
1362
- });
1363
- }
1364
- if (node["s-sr"]) {
1365
- relocateNodes.map((relocateNode) => {
1366
- if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
1367
- relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1368
- if (relocateNodeData && !relocateNode.$slotRefNode$) {
1369
- relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
1370
- }
1371
- }
1372
- });
1373
- }
1374
- } else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1375
- relocateNodes.push({
1376
- $nodeToRelocate$: node
1377
- });
1378
- }
1379
- }
1380
- }
1381
- }
1382
- if (childNode.nodeType === 1 /* ElementNode */) {
1383
- markSlotContentForRelocation(childNode);
1384
- }
1385
- }
1386
- };
1387
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1388
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1389
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1390
- return true;
1391
- }
1392
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1393
- return true;
1394
- }
1395
- return false;
1396
- }
1397
- if (nodeToRelocate["s-sn"] === slotName) {
1398
- return true;
1399
- }
1400
- return slotName === "";
1401
- };
1402
- var nullifyVNodeRefs = (vNode) => {
1403
- if (BUILD.vdomRef) {
1404
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1405
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1406
- }
1407
- };
1408
- var insertBefore = (parent, newNode, reference) => {
1409
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1410
- if (BUILD.scoped) {
1411
- updateElementScopeIds(newNode, parent);
1412
- }
1413
- return inserted;
1414
- };
1415
- var findScopeIds = (element) => {
1416
- const scopeIds = [];
1417
- if (element) {
1418
- scopeIds.push(
1419
- ...element["s-scs"] || [],
1420
- element["s-si"],
1421
- element["s-sc"],
1422
- ...findScopeIds(element.parentElement)
1423
- );
1424
- }
1425
- return scopeIds;
1426
- };
1427
- var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1428
- var _a;
1429
- if (element && parent && element.nodeType === 1 /* ElementNode */) {
1430
- const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1431
- if (scopeIds.size) {
1432
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
1433
- if (element["s-ol"] || iterateChildNodes) {
1434
- for (const childNode of Array.from(element.childNodes)) {
1435
- updateElementScopeIds(childNode, element, true);
1436
- }
1437
- }
1438
- }
1439
- }
1440
- };
1441
- var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1442
- var _a, _b, _c, _d, _e;
1443
- const hostElm = hostRef.$hostElement$;
1444
- const cmpMeta = hostRef.$cmpMeta$;
1445
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1446
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1447
- hostTagName = hostElm.tagName;
1448
- if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
1449
- throw new Error(`The <Host> must be the single root component.
1450
- Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
1451
-
1452
- The render() function should look like this instead:
1453
-
1454
- render() {
1455
- // Do not return an array
1456
- return (
1457
- <Host>{content}</Host>
1458
- );
1459
- }
1460
- `);
1461
- }
1462
- if (BUILD.reflect && cmpMeta.$attrsToReflect$) {
1463
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1464
- cmpMeta.$attrsToReflect$.map(
1465
- ([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
1466
- );
1467
- }
1468
- if (isInitialLoad && rootVnode.$attrs$) {
1469
- for (const key of Object.keys(rootVnode.$attrs$)) {
1470
- if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
1471
- rootVnode.$attrs$[key] = hostElm[key];
1472
- }
1473
- }
1474
- }
1475
- rootVnode.$tag$ = null;
1476
- rootVnode.$flags$ |= 4 /* isHost */;
1477
- hostRef.$vnode$ = rootVnode;
1478
- rootVnode.$elm$ = oldVNode.$elm$ = BUILD.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
1479
- if (BUILD.scoped || BUILD.shadowDom) {
1480
- scopeId = hostElm["s-sc"];
1481
- }
1482
- useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
1483
- if (BUILD.slotRelocation) {
1484
- contentRef = hostElm["s-cr"];
1485
- checkSlotFallbackVisibility = false;
1486
- }
1487
- patch(oldVNode, rootVnode, isInitialLoad);
1488
- if (BUILD.slotRelocation) {
1489
- plt.$flags$ |= 1 /* isTmpDisconnected */;
1490
- if (checkSlotRelocate) {
1491
- markSlotContentForRelocation(rootVnode.$elm$);
1492
- for (const relocateData of relocateNodes) {
1493
- const nodeToRelocate = relocateData.$nodeToRelocate$;
1494
- if (!nodeToRelocate["s-ol"]) {
1495
- const orgLocationNode = BUILD.isDebug || BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode("");
1496
- orgLocationNode["s-nr"] = nodeToRelocate;
1497
- insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1498
- }
1499
- }
1500
- for (const relocateData of relocateNodes) {
1501
- const nodeToRelocate = relocateData.$nodeToRelocate$;
1502
- const slotRefNode = relocateData.$slotRefNode$;
1503
- if (slotRefNode) {
1504
- const parentNodeRef = slotRefNode.parentNode;
1505
- let insertBeforeNode = slotRefNode.nextSibling;
1506
- if (!BUILD.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
1507
- let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1508
- while (orgLocationNode) {
1509
- let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1510
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
1511
- refNode = refNode.nextSibling;
1512
- while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1513
- refNode = refNode == null ? void 0 : refNode.nextSibling;
1514
- }
1515
- if (!refNode || !refNode["s-nr"]) {
1516
- insertBeforeNode = refNode;
1517
- break;
1518
- }
1519
- }
1520
- orgLocationNode = orgLocationNode.previousSibling;
1521
- }
1522
- }
1523
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1524
- if (nodeToRelocate !== insertBeforeNode) {
1525
- if (!BUILD.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1526
- nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1527
- }
1528
- insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1529
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1530
- nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1531
- }
1532
- }
1533
- }
1534
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
1535
- } else {
1536
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1537
- if (isInitialLoad) {
1538
- nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1539
- }
1540
- nodeToRelocate.hidden = true;
1541
- }
1542
- }
1543
- }
1544
- }
1545
- if (checkSlotFallbackVisibility) {
1546
- updateFallbackSlotVisibility(rootVnode.$elm$);
1547
- }
1548
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1549
- relocateNodes.length = 0;
1550
- }
1551
- if (BUILD.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1552
- for (const childNode of rootVnode.$elm$.childNodes) {
1553
- if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1554
- if (isInitialLoad && childNode["s-ih"] == null) {
1555
- childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1556
- }
1557
- childNode.hidden = true;
1558
- }
1559
- }
1560
- }
1561
- contentRef = void 0;
1562
- };
1563
- var slotReferenceDebugNode = (slotVNode) => doc.createComment(
1564
- `<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`
1565
- );
1566
- var originalLocationDebugNode = (nodeToRelocate) => doc.createComment(
1567
- `org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
1568
- );
1569
-
1570
- // src/runtime/update-component.ts
1571
- var attachToAncestor = (hostRef, ancestorComponent) => {
1572
- if (BUILD.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1573
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
1574
- }
1575
- };
1576
- var scheduleUpdate = (hostRef, isInitialLoad) => {
1577
- if (BUILD.taskQueue && BUILD.updatable) {
1578
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1579
- }
1580
- if (BUILD.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1581
- hostRef.$flags$ |= 512 /* needsRerender */;
1582
- return;
1583
- }
1584
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1585
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1586
- return BUILD.taskQueue ? writeTask(dispatch) : dispatch();
1587
- };
1588
- var dispatchHooks = (hostRef, isInitialLoad) => {
1589
- const elm = hostRef.$hostElement$;
1590
- const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
1591
- const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
1592
- if (!instance) {
1593
- throw new Error(
1594
- `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
1595
- );
1596
- }
1597
- let maybePromise;
1598
- if (isInitialLoad) {
1599
- if (BUILD.lazyLoad && BUILD.hostListener) {
1600
- hostRef.$flags$ |= 256 /* isListenReady */;
1601
- if (hostRef.$queuedListeners$) {
1602
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
1603
- hostRef.$queuedListeners$ = void 0;
1604
- }
1605
- }
1606
- emitLifecycleEvent(elm, "componentWillLoad");
1607
- if (BUILD.cmpWillLoad) {
1608
- maybePromise = safeCall(instance, "componentWillLoad");
1609
- }
1610
- } else {
1611
- emitLifecycleEvent(elm, "componentWillUpdate");
1612
- if (BUILD.cmpWillUpdate) {
1613
- maybePromise = safeCall(instance, "componentWillUpdate");
1614
- }
1615
- }
1616
- emitLifecycleEvent(elm, "componentWillRender");
1617
- if (BUILD.cmpWillRender) {
1618
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
1619
- }
1620
- endSchedule();
1621
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1622
- };
1623
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
1624
- console.error(err2);
1625
- fn();
1626
- }) : fn();
1627
- var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
1628
- var updateComponent = async (hostRef, instance, isInitialLoad) => {
1629
- var _a;
1630
- const elm = hostRef.$hostElement$;
1631
- const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
1632
- const rc = elm["s-rc"];
1633
- if (BUILD.style && isInitialLoad) {
1634
- attachStyles(hostRef);
1635
- }
1636
- const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
1637
- if (BUILD.isDev) {
1638
- hostRef.$flags$ |= 1024 /* devOnRender */;
1639
- }
1640
- if (BUILD.hydrateServerSide) {
1641
- await callRender(hostRef, instance, elm, isInitialLoad);
1642
- } else {
1643
- callRender(hostRef, instance, elm, isInitialLoad);
1644
- }
1645
- if (BUILD.isDev) {
1646
- hostRef.$renderCount$ = hostRef.$renderCount$ === void 0 ? 1 : hostRef.$renderCount$ + 1;
1647
- hostRef.$flags$ &= ~1024 /* devOnRender */;
1648
- }
1649
- if (BUILD.hydrateServerSide) {
1650
- try {
1651
- serverSideConnected(elm);
1652
- if (isInitialLoad) {
1653
- if (hostRef.$cmpMeta$.$flags$ & 1 /* shadowDomEncapsulation */) {
1654
- elm["s-en"] = "";
1655
- } else if (hostRef.$cmpMeta$.$flags$ & 2 /* scopedCssEncapsulation */) {
1656
- elm["s-en"] = "c";
1657
- }
1658
- }
1659
- } catch (e) {
1660
- consoleError(e, elm);
1661
- }
1662
- }
1663
- if (BUILD.asyncLoading && rc) {
1664
- rc.map((cb) => cb());
1665
- elm["s-rc"] = void 0;
1666
- }
1667
- endRender();
1668
- endUpdate();
1669
- if (BUILD.asyncLoading) {
1670
- const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
1671
- const postUpdate = () => postUpdateComponent(hostRef);
1672
- if (childrenPromises.length === 0) {
1673
- postUpdate();
1674
- } else {
1675
- Promise.all(childrenPromises).then(postUpdate);
1676
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1677
- childrenPromises.length = 0;
1678
- }
1679
- } else {
1680
- postUpdateComponent(hostRef);
1681
- }
1682
- };
1683
- var renderingRef = null;
1684
- var callRender = (hostRef, instance, elm, isInitialLoad) => {
1685
- const allRenderFn = BUILD.allRenderFn ? true : false;
1686
- const lazyLoad = BUILD.lazyLoad ? true : false;
1687
- const taskQueue = BUILD.taskQueue ? true : false;
1688
- const updatable = BUILD.updatable ? true : false;
1689
- try {
1690
- renderingRef = instance;
1691
- instance = allRenderFn ? instance.render() : instance.render && instance.render();
1692
- if (updatable && taskQueue) {
1693
- hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
1694
- }
1695
- if (updatable || lazyLoad) {
1696
- hostRef.$flags$ |= 2 /* hasRendered */;
1697
- }
1698
- if (BUILD.hasRenderFn || BUILD.reflect) {
1699
- if (BUILD.vdomRender || BUILD.reflect) {
1700
- if (BUILD.hydrateServerSide) {
1701
- return Promise.resolve(instance).then((value) => renderVdom(hostRef, value, isInitialLoad));
1702
- } else {
1703
- renderVdom(hostRef, instance, isInitialLoad);
1704
- }
1705
- } else {
1706
- const shadowRoot = elm.shadowRoot;
1707
- if (hostRef.$cmpMeta$.$flags$ & 1 /* shadowDomEncapsulation */) {
1708
- shadowRoot.textContent = instance;
1709
- } else {
1710
- elm.textContent = instance;
1711
- }
1712
- }
1713
- }
1714
- } catch (e) {
1715
- consoleError(e, hostRef.$hostElement$);
1716
- }
1717
- renderingRef = null;
1718
- return null;
1719
- };
1720
- var getRenderingRef = () => renderingRef;
1721
- var postUpdateComponent = (hostRef) => {
1722
- const tagName = hostRef.$cmpMeta$.$tagName$;
1723
- const elm = hostRef.$hostElement$;
1724
- const endPostUpdate = createTime("postUpdate", tagName);
1725
- const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
1726
- const ancestorComponent = hostRef.$ancestorComponent$;
1727
- if (BUILD.cmpDidRender) {
1728
- if (BUILD.isDev) {
1729
- hostRef.$flags$ |= 1024 /* devOnRender */;
1730
- }
1731
- safeCall(instance, "componentDidRender");
1732
- if (BUILD.isDev) {
1733
- hostRef.$flags$ &= ~1024 /* devOnRender */;
1734
- }
1735
- }
1736
- emitLifecycleEvent(elm, "componentDidRender");
1737
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1738
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1739
- if (BUILD.asyncLoading && BUILD.cssAnnotations) {
1740
- addHydratedFlag(elm);
1741
- }
1742
- if (BUILD.cmpDidLoad) {
1743
- if (BUILD.isDev) {
1744
- hostRef.$flags$ |= 2048 /* devOnDidLoad */;
1745
- }
1746
- safeCall(instance, "componentDidLoad");
1747
- if (BUILD.isDev) {
1748
- hostRef.$flags$ &= ~2048 /* devOnDidLoad */;
1749
- }
1750
- }
1751
- emitLifecycleEvent(elm, "componentDidLoad");
1752
- endPostUpdate();
1753
- if (BUILD.asyncLoading) {
1754
- hostRef.$onReadyResolve$(elm);
1755
- if (!ancestorComponent) {
1756
- appDidLoad(tagName);
1757
- }
1758
- }
1759
- } else {
1760
- if (BUILD.cmpDidUpdate) {
1761
- if (BUILD.isDev) {
1762
- hostRef.$flags$ |= 1024 /* devOnRender */;
1763
- }
1764
- safeCall(instance, "componentDidUpdate");
1765
- if (BUILD.isDev) {
1766
- hostRef.$flags$ &= ~1024 /* devOnRender */;
1767
- }
1768
- }
1769
- emitLifecycleEvent(elm, "componentDidUpdate");
1770
- endPostUpdate();
1771
- }
1772
- if (BUILD.method && BUILD.lazyLoad) {
1773
- hostRef.$onInstanceResolve$(elm);
1774
- }
1775
- if (BUILD.asyncLoading) {
1776
- if (hostRef.$onRenderResolve$) {
1777
- hostRef.$onRenderResolve$();
1778
- hostRef.$onRenderResolve$ = void 0;
1779
- }
1780
- if (hostRef.$flags$ & 512 /* needsRerender */) {
1781
- nextTick(() => scheduleUpdate(hostRef, false));
1782
- }
1783
- hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
1784
- }
1785
- };
1786
- var forceUpdate = (ref) => {
1787
- if (BUILD.updatable && (Build.isBrowser || Build.isTesting)) {
1788
- const hostRef = getHostRef(ref);
1789
- const isConnected = hostRef.$hostElement$.isConnected;
1790
- if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1791
- scheduleUpdate(hostRef, false);
1792
- }
1793
- return isConnected;
1794
- }
1795
- return false;
1796
- };
1797
- var appDidLoad = (who) => {
1798
- if (BUILD.cssAnnotations) {
1799
- addHydratedFlag(doc.documentElement);
1800
- }
1801
- if (BUILD.asyncQueue) {
1802
- plt.$flags$ |= 2 /* appLoaded */;
1803
- }
1804
- nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1805
- if (BUILD.profile && performance.measure) {
1806
- performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${who})`, "st:app:start");
1807
- }
1808
- };
1809
- var safeCall = (instance, method, arg) => {
1810
- if (instance && instance[method]) {
1811
- try {
1812
- return instance[method](arg);
1813
- } catch (e) {
1814
- consoleError(e);
1815
- }
1816
- }
1817
- return void 0;
1818
- };
1819
- var emitLifecycleEvent = (elm, lifecycleName) => {
1820
- if (BUILD.lifecycleDOMEvents) {
1821
- emitEvent(elm, "stencil_" + lifecycleName, {
1822
- bubbles: true,
1823
- composed: true,
1824
- detail: {
1825
- namespace: NAMESPACE
1826
- }
1827
- });
1828
- }
1829
- };
1830
- var addHydratedFlag = (elm) => {
1831
- var _a, _b;
1832
- return BUILD.hydratedClass ? elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") : BUILD.hydratedAttribute ? elm.setAttribute((_b = BUILD.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
1833
- };
1834
- var serverSideConnected = (elm) => {
1835
- const children = elm.children;
1836
- if (children != null) {
1837
- for (let i2 = 0, ii = children.length; i2 < ii; i2++) {
1838
- const childElm = children[i2];
1839
- if (typeof childElm.connectedCallback === "function") {
1840
- childElm.connectedCallback();
1841
- }
1842
- serverSideConnected(childElm);
1843
- }
1844
- }
1845
- };
1846
-
1847
- // src/runtime/set-value.ts
1848
- var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1849
- var setValue = (ref, propName, newVal, cmpMeta) => {
1850
- const hostRef = getHostRef(ref);
1851
- if (BUILD.lazyLoad && !hostRef) {
1852
- throw new Error(
1853
- `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
1854
- );
1855
- }
1856
- const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : ref;
1857
- const oldVal = hostRef.$instanceValues$.get(propName);
1858
- const flags = hostRef.$flags$;
1859
- const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
1860
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1861
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1862
- const didValueChange = newVal !== oldVal && !areBothNaN;
1863
- if ((!BUILD.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1864
- hostRef.$instanceValues$.set(propName, newVal);
1865
- if (BUILD.isDev) {
1866
- if (hostRef.$flags$ & 1024 /* devOnRender */) {
1867
- consoleDevWarn(
1868
- `The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,
1869
- "\nElement",
1870
- elm,
1871
- "\nNew value",
1872
- newVal,
1873
- "\nOld value",
1874
- oldVal
1875
- );
1876
- } else if (hostRef.$flags$ & 2048 /* devOnDidLoad */) {
1877
- consoleDevWarn(
1878
- `The state/prop "${propName}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`,
1879
- "\nElement",
1880
- elm,
1881
- "\nNew value",
1882
- newVal,
1883
- "\nOld value",
1884
- oldVal
1885
- );
1886
- }
1887
- }
1888
- if (!BUILD.lazyLoad || instance) {
1889
- if (BUILD.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1890
- const watchMethods = cmpMeta.$watchers$[propName];
1891
- if (watchMethods) {
1892
- watchMethods.map((watchMethodName) => {
1893
- try {
1894
- instance[watchMethodName](newVal, oldVal, propName);
1895
- } catch (e) {
1896
- consoleError(e, elm);
1897
- }
1898
- });
1899
- }
1900
- }
1901
- if (BUILD.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1902
- if (BUILD.cmpShouldUpdate && instance.componentShouldUpdate) {
1903
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
1904
- return;
1905
- }
1906
- }
1907
- scheduleUpdate(hostRef, false);
1908
- }
1909
- }
1910
- }
1911
- };
1912
-
1913
- // src/runtime/proxy-component.ts
1914
- var proxyComponent = (Cstr, cmpMeta, flags) => {
1915
- var _a, _b;
1916
- const prototype = Cstr.prototype;
1917
- if (BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
1918
- FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach(
1919
- (cbName) => Object.defineProperty(prototype, cbName, {
1920
- value(...args) {
1921
- const hostRef = getHostRef(this);
1922
- const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : this;
1923
- const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
1924
- if (!instance) {
1925
- hostRef.$onReadyPromise$.then((instance2) => {
1926
- const cb = instance2[cbName];
1927
- typeof cb === "function" && cb.call(instance2, ...args);
1928
- });
1929
- } else {
1930
- const cb = instance[cbName];
1931
- typeof cb === "function" && cb.call(instance, ...args);
1932
- }
1933
- }
1934
- })
1935
- );
1936
- }
1937
- if (BUILD.member && cmpMeta.$members$ || BUILD.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
1938
- if (BUILD.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
1939
- cmpMeta.$watchers$ = Cstr.watchers;
1940
- }
1941
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1942
- members.map(([memberName, [memberFlags]]) => {
1943
- if ((BUILD.prop || BUILD.state) && (memberFlags & 31 /* Prop */ || (!BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1944
- Object.defineProperty(prototype, memberName, {
1945
- get() {
1946
- return getValue(this, memberName);
1947
- },
1948
- set(newValue) {
1949
- if (BUILD.isDev) {
1950
- const ref = getHostRef(this);
1951
- if (
1952
- // we are proxying the instance (not element)
1953
- (flags & 1 /* isElementConstructor */) === 0 && // the element is not constructing
1954
- (ref && ref.$flags$ & 8 /* isConstructingInstance */) === 0 && // the member is a prop
1955
- (memberFlags & 31 /* Prop */) !== 0 && // the member is not mutable
1956
- (memberFlags & 1024 /* Mutable */) === 0
1957
- ) {
1958
- consoleDevWarn(
1959
- `@Prop() "${memberName}" on <${cmpMeta.$tagName$}> is immutable but was modified from within the component.
1960
- More information: https://stenciljs.com/docs/properties#prop-mutability`
1961
- );
1962
- }
1963
- }
1964
- setValue(this, memberName, newValue, cmpMeta);
1965
- },
1966
- configurable: true,
1967
- enumerable: true
1968
- });
1969
- } else if (BUILD.lazyLoad && BUILD.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1970
- Object.defineProperty(prototype, memberName, {
1971
- value(...args) {
1972
- var _a2;
1973
- const ref = getHostRef(this);
1974
- return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
1975
- var _a3;
1976
- return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
1977
- });
1978
- }
1979
- });
1980
- }
1981
- });
1982
- if (BUILD.observeAttribute && (!BUILD.lazyLoad || flags & 1 /* isElementConstructor */)) {
1983
- const attrNameToPropName = /* @__PURE__ */ new Map();
1984
- prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
1985
- plt.jmp(() => {
1986
- var _a2;
1987
- const propName = attrNameToPropName.get(attrName);
1988
- if (this.hasOwnProperty(propName)) {
1989
- newValue = this[propName];
1990
- delete this[propName];
1991
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1992
- this[propName] == newValue) {
1993
- return;
1994
- } else if (propName == null) {
1995
- const hostRef = getHostRef(this);
1996
- const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1997
- if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
1998
- const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : this;
1999
- const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
2000
- const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
2001
- entry == null ? void 0 : entry.forEach((callbackName) => {
2002
- if (instance[callbackName] != null) {
2003
- instance[callbackName].call(instance, newValue, oldValue, attrName);
2004
- }
2005
- });
2006
- }
2007
- return;
2008
- }
2009
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2010
- });
2011
- };
2012
- Cstr.observedAttributes = Array.from(
2013
- /* @__PURE__ */ new Set([
2014
- ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
2015
- ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
2016
- var _a2;
2017
- const attrName = m[1] || propName;
2018
- attrNameToPropName.set(attrName, propName);
2019
- if (BUILD.reflect && m[0] & 512 /* ReflectAttr */) {
2020
- (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
2021
- }
2022
- return attrName;
2023
- })
2024
- ])
2025
- );
2026
- }
2027
- }
2028
- return Cstr;
2029
- };
2030
-
2031
- // src/runtime/initialize-component.ts
2032
- var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2033
- let Cstr;
2034
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
2035
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
2036
- const bundleId = cmpMeta.$lazyBundleId$;
2037
- if ((BUILD.lazyLoad || BUILD.hydrateClientSide) && bundleId) {
2038
- const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
2039
- if (CstrImport && "then" in CstrImport) {
2040
- const endLoad = uniqueTime(
2041
- `st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`,
2042
- `[Stencil] Load module for <${cmpMeta.$tagName$}>`
2043
- );
2044
- Cstr = await CstrImport;
2045
- endLoad();
2046
- } else {
2047
- Cstr = CstrImport;
2048
- }
2049
- if (!Cstr) {
2050
- throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
2051
- }
2052
- if (BUILD.member && !Cstr.isProxied) {
2053
- if (BUILD.watchCallback) {
2054
- cmpMeta.$watchers$ = Cstr.watchers;
2055
- }
2056
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
2057
- Cstr.isProxied = true;
2058
- }
2059
- const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
2060
- if (BUILD.member) {
2061
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
2062
- }
2063
- try {
2064
- new Cstr(hostRef);
2065
- } catch (e) {
2066
- consoleError(e);
2067
- }
2068
- if (BUILD.member) {
2069
- hostRef.$flags$ &= ~8 /* isConstructingInstance */;
2070
- }
2071
- if (BUILD.watchCallback) {
2072
- hostRef.$flags$ |= 128 /* isWatchReady */;
2073
- }
2074
- endNewInstance();
2075
- fireConnectedCallback(hostRef.$lazyInstance$);
2076
- } else {
2077
- Cstr = elm.constructor;
2078
- const cmpTag = elm.localName;
2079
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
2080
- }
2081
- if (BUILD.style && Cstr && Cstr.style) {
2082
- let style;
2083
- if (typeof Cstr.style === "string") {
2084
- style = Cstr.style;
2085
- } else if (BUILD.mode && typeof Cstr.style !== "string") {
2086
- hostRef.$modeName$ = computeMode(elm);
2087
- if (hostRef.$modeName$) {
2088
- style = Cstr.style[hostRef.$modeName$];
2089
- }
2090
- if (BUILD.hydrateServerSide && hostRef.$modeName$) {
2091
- elm.setAttribute("s-mode", hostRef.$modeName$);
2092
- }
2093
- }
2094
- const scopeId2 = getScopeId(cmpMeta, hostRef.$modeName$);
2095
- if (!styles.has(scopeId2)) {
2096
- const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
2097
- if (!BUILD.hydrateServerSide && BUILD.shadowDom && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2098
- BUILD.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2099
- style = await import('./shadow-css-7ad5caf8.js').then((m) => m.scopeCss(style, scopeId2));
2100
- }
2101
- registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
2102
- endRegisterStyles();
2103
- }
2104
- }
2105
- }
2106
- const ancestorComponent = hostRef.$ancestorComponent$;
2107
- const schedule = () => scheduleUpdate(hostRef, true);
2108
- if (BUILD.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
2109
- ancestorComponent["s-rc"].push(schedule);
2110
- } else {
2111
- schedule();
2112
- }
2113
- };
2114
- var fireConnectedCallback = (instance) => {
2115
- if (BUILD.lazyLoad && BUILD.connectedCallback) {
2116
- safeCall(instance, "connectedCallback");
2117
- }
2118
- };
2119
-
2120
- // src/runtime/connected-callback.ts
2121
- var connectedCallback = (elm) => {
2122
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
2123
- const hostRef = getHostRef(elm);
2124
- const cmpMeta = hostRef.$cmpMeta$;
2125
- const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
2126
- if (BUILD.hostListenerTargetParent) {
2127
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);
2128
- }
2129
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
2130
- hostRef.$flags$ |= 1 /* hasConnected */;
2131
- let hostId;
2132
- if (BUILD.hydrateClientSide) {
2133
- hostId = elm.getAttribute(HYDRATE_ID);
2134
- if (hostId) {
2135
- if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2136
- const scopeId2 = BUILD.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
2137
- elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2138
- }
2139
- initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2140
- }
2141
- }
2142
- if (BUILD.slotRelocation && !hostId) {
2143
- if (BUILD.hydrateServerSide || (BUILD.slot || BUILD.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
2144
- cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
2145
- setContentReference(elm);
2146
- }
2147
- }
2148
- if (BUILD.asyncLoading) {
2149
- let ancestorComponent = elm;
2150
- while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
2151
- if (BUILD.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
2152
- attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
2153
- break;
2154
- }
2155
- }
2156
- }
2157
- if (BUILD.prop && !BUILD.hydrateServerSide && cmpMeta.$members$) {
2158
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
2159
- if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
2160
- const value = elm[memberName];
2161
- delete elm[memberName];
2162
- elm[memberName] = value;
2163
- }
2164
- });
2165
- }
2166
- if (BUILD.initializeNextTick) {
2167
- nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
2168
- } else {
2169
- initializeComponent(elm, hostRef, cmpMeta);
2170
- }
2171
- } else {
2172
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false);
2173
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
2174
- fireConnectedCallback(hostRef.$lazyInstance$);
2175
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
2176
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
2177
- }
2178
- }
2179
- endConnected();
2180
- }
2181
- };
2182
- var setContentReference = (elm) => {
2183
- const contentRefElm = elm["s-cr"] = doc.createComment(
2184
- BUILD.isDebug ? `content-ref (host=${elm.localName})` : ""
2185
- );
2186
- contentRefElm["s-cn"] = true;
2187
- insertBefore(elm, contentRefElm, elm.firstChild);
2188
- };
2189
- var disconnectInstance = (instance) => {
2190
- if (BUILD.lazyLoad && BUILD.disconnectedCallback) {
2191
- safeCall(instance, "disconnectedCallback");
2192
- }
2193
- if (BUILD.cmpDidUnload) {
2194
- safeCall(instance, "componentDidUnload");
2195
- }
2196
- };
2197
- var disconnectedCallback = async (elm) => {
2198
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
2199
- const hostRef = getHostRef(elm);
2200
- if (BUILD.hostListener) {
2201
- if (hostRef.$rmListeners$) {
2202
- hostRef.$rmListeners$.map((rmListener) => rmListener());
2203
- hostRef.$rmListeners$ = void 0;
2204
- }
2205
- }
2206
- if (!BUILD.lazyLoad) {
2207
- disconnectInstance(elm);
2208
- } else if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
2209
- disconnectInstance(hostRef.$lazyInstance$);
2210
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
2211
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
2212
- }
2213
- }
2214
- };
2215
- var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
2216
- patchCloneNode(hostElementPrototype);
2217
- patchSlotAppendChild(hostElementPrototype);
2218
- patchSlotAppend(hostElementPrototype);
2219
- patchSlotPrepend(hostElementPrototype);
2220
- patchSlotInsertAdjacentElement(hostElementPrototype);
2221
- patchSlotInsertAdjacentHTML(hostElementPrototype);
2222
- patchSlotInsertAdjacentText(hostElementPrototype);
2223
- patchTextContent(hostElementPrototype);
2224
- patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
2225
- patchSlotRemoveChild(hostElementPrototype);
2226
- };
2227
- var patchCloneNode = (HostElementPrototype) => {
2228
- const orgCloneNode = HostElementPrototype.cloneNode;
2229
- HostElementPrototype.cloneNode = function(deep) {
2230
- const srcNode = this;
2231
- const isShadowDom = BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
2232
- const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
2233
- if (BUILD.slot && !isShadowDom && deep) {
2234
- let i2 = 0;
2235
- let slotted, nonStencilNode;
2236
- const stencilPrivates = [
2237
- "s-id",
2238
- "s-cr",
2239
- "s-lr",
2240
- "s-rc",
2241
- "s-sc",
2242
- "s-p",
2243
- "s-cn",
2244
- "s-sr",
2245
- "s-sn",
2246
- "s-hn",
2247
- "s-ol",
2248
- "s-nr",
2249
- "s-si",
2250
- "s-rf",
2251
- "s-scs"
2252
- ];
2253
- for (; i2 < srcNode.childNodes.length; i2++) {
2254
- slotted = srcNode.childNodes[i2]["s-nr"];
2255
- nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
2256
- if (slotted) {
2257
- if (BUILD.appendChildSlotFix && clonedNode.__appendChild) {
2258
- clonedNode.__appendChild(slotted.cloneNode(true));
2259
- } else {
2260
- clonedNode.appendChild(slotted.cloneNode(true));
2261
- }
2262
- }
2263
- if (nonStencilNode) {
2264
- clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
2265
- }
2266
- }
2267
- }
2268
- return clonedNode;
2269
- };
2270
- };
2271
- var patchSlotAppendChild = (HostElementPrototype) => {
2272
- HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
2273
- HostElementPrototype.appendChild = function(newChild) {
2274
- const slotName = newChild["s-sn"] = getSlotName(newChild);
2275
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
2276
- if (slotNode) {
2277
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
2278
- const appendAfter = slotChildNodes[slotChildNodes.length - 1];
2279
- const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
2280
- updateFallbackSlotVisibility(this);
2281
- return insertedNode;
2282
- }
2283
- return this.__appendChild(newChild);
2284
- };
2285
- };
2286
- var patchSlotRemoveChild = (ElementPrototype) => {
2287
- ElementPrototype.__removeChild = ElementPrototype.removeChild;
2288
- ElementPrototype.removeChild = function(toRemove) {
2289
- if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
2290
- const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
2291
- if (slotNode) {
2292
- const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
2293
- const existingNode = slotChildNodes.find((n) => n === toRemove);
2294
- if (existingNode) {
2295
- existingNode.remove();
2296
- updateFallbackSlotVisibility(this);
2297
- return;
2298
- }
2299
- }
2300
- }
2301
- return this.__removeChild(toRemove);
2302
- };
2303
- };
2304
- var patchSlotPrepend = (HostElementPrototype) => {
2305
- const originalPrepend = HostElementPrototype.prepend;
2306
- HostElementPrototype.prepend = function(...newChildren) {
2307
- newChildren.forEach((newChild) => {
2308
- if (typeof newChild === "string") {
2309
- newChild = this.ownerDocument.createTextNode(newChild);
2310
- }
2311
- const slotName = newChild["s-sn"] = getSlotName(newChild);
2312
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
2313
- if (slotNode) {
2314
- const slotPlaceholder = document.createTextNode("");
2315
- slotPlaceholder["s-nr"] = newChild;
2316
- slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
2317
- newChild["s-ol"] = slotPlaceholder;
2318
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
2319
- const appendAfter = slotChildNodes[0];
2320
- return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
2321
- }
2322
- if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
2323
- newChild.hidden = true;
2324
- }
2325
- return originalPrepend.call(this, newChild);
2326
- });
2327
- };
2328
- };
2329
- var patchSlotAppend = (HostElementPrototype) => {
2330
- HostElementPrototype.append = function(...newChildren) {
2331
- newChildren.forEach((newChild) => {
2332
- if (typeof newChild === "string") {
2333
- newChild = this.ownerDocument.createTextNode(newChild);
2334
- }
2335
- this.appendChild(newChild);
2336
- });
2337
- };
2338
- };
2339
- var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
2340
- const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
2341
- HostElementPrototype.insertAdjacentHTML = function(position, text) {
2342
- if (position !== "afterbegin" && position !== "beforeend") {
2343
- return originalInsertAdjacentHtml.call(this, position, text);
2344
- }
2345
- const container = this.ownerDocument.createElement("_");
2346
- let node;
2347
- container.innerHTML = text;
2348
- if (position === "afterbegin") {
2349
- while (node = container.firstChild) {
2350
- this.prepend(node);
2351
- }
2352
- } else if (position === "beforeend") {
2353
- while (node = container.firstChild) {
2354
- this.append(node);
2355
- }
2356
- }
2357
- };
2358
- };
2359
- var patchSlotInsertAdjacentText = (HostElementPrototype) => {
2360
- HostElementPrototype.insertAdjacentText = function(position, text) {
2361
- this.insertAdjacentHTML(position, text);
2362
- };
2363
- };
2364
- var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
2365
- const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
2366
- HostElementPrototype.insertAdjacentElement = function(position, element) {
2367
- if (position !== "afterbegin" && position !== "beforeend") {
2368
- return originalInsertAdjacentElement.call(this, position, element);
2369
- }
2370
- if (position === "afterbegin") {
2371
- this.prepend(element);
2372
- return element;
2373
- } else if (position === "beforeend") {
2374
- this.append(element);
2375
- return element;
2376
- }
2377
- return element;
2378
- };
2379
- };
2380
- var patchTextContent = (hostElementPrototype) => {
2381
- const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
2382
- Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
2383
- if (BUILD.experimentalScopedSlotChanges) {
2384
- Object.defineProperty(hostElementPrototype, "textContent", {
2385
- // To mimic shadow root behavior, we need to return the text content of all
2386
- // nodes in a slot reference node
2387
- get() {
2388
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2389
- const textContent = slotRefNodes.map((node) => {
2390
- var _a, _b;
2391
- const text = [];
2392
- let slotContent = node.nextSibling;
2393
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2394
- if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
2395
- text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
2396
- }
2397
- slotContent = slotContent.nextSibling;
2398
- }
2399
- return text.filter((ref) => ref !== "").join(" ");
2400
- }).filter((text) => text !== "").join(" ");
2401
- return " " + textContent + " ";
2402
- },
2403
- // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2404
- // reference node. If a default slot reference node exists, the text content will be
2405
- // placed there. Otherwise, the new text node will be hidden
2406
- set(value) {
2407
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2408
- slotRefNodes.forEach((node) => {
2409
- let slotContent = node.nextSibling;
2410
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2411
- const tmp = slotContent;
2412
- slotContent = slotContent.nextSibling;
2413
- tmp.remove();
2414
- }
2415
- if (node["s-sn"] === "") {
2416
- const textNode = this.ownerDocument.createTextNode(value);
2417
- textNode["s-sn"] = "";
2418
- insertBefore(node.parentElement, textNode, node.nextSibling);
2419
- } else {
2420
- node.remove();
2421
- }
2422
- });
2423
- }
2424
- });
2425
- } else {
2426
- Object.defineProperty(hostElementPrototype, "textContent", {
2427
- get() {
2428
- var _a;
2429
- const slotNode = getHostSlotNode(this.childNodes, "", this.tagName);
2430
- if (((_a = slotNode == null ? void 0 : slotNode.nextSibling) == null ? void 0 : _a.nodeType) === 3 /* TEXT_NODE */) {
2431
- return slotNode.nextSibling.textContent;
2432
- } else if (slotNode) {
2433
- return slotNode.textContent;
2434
- } else {
2435
- return this.__textContent;
2436
- }
2437
- },
2438
- set(value) {
2439
- var _a;
2440
- const slotNode = getHostSlotNode(this.childNodes, "", this.tagName);
2441
- if (((_a = slotNode == null ? void 0 : slotNode.nextSibling) == null ? void 0 : _a.nodeType) === 3 /* TEXT_NODE */) {
2442
- slotNode.nextSibling.textContent = value;
2443
- } else if (slotNode) {
2444
- slotNode.textContent = value;
2445
- } else {
2446
- this.__textContent = value;
2447
- const contentRefElm = this["s-cr"];
2448
- if (contentRefElm) {
2449
- insertBefore(this, contentRefElm, this.firstChild);
2450
- }
2451
- }
2452
- }
2453
- });
2454
- }
2455
- };
2456
- var patchChildSlotNodes = (elm, cmpMeta) => {
2457
- class FakeNodeList extends Array {
2458
- item(n) {
2459
- return this[n];
2460
- }
2461
- }
2462
- if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2463
- const childNodesFn = elm.__lookupGetter__("childNodes");
2464
- Object.defineProperty(elm, "children", {
2465
- get() {
2466
- return this.childNodes.map((n) => n.nodeType === 1);
2467
- }
2468
- });
2469
- Object.defineProperty(elm, "childElementCount", {
2470
- get() {
2471
- return elm.children.length;
2472
- }
2473
- });
2474
- Object.defineProperty(elm, "childNodes", {
2475
- get() {
2476
- const childNodes = childNodesFn.call(this);
2477
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2478
- const result = new FakeNodeList();
2479
- for (let i2 = 0; i2 < childNodes.length; i2++) {
2480
- const slot = childNodes[i2]["s-nr"];
2481
- if (slot) {
2482
- result.push(slot);
2483
- }
2484
- }
2485
- return result;
2486
- }
2487
- return FakeNodeList.from(childNodes);
2488
- }
2489
- });
2490
- }
2491
- };
2492
- var getAllChildSlotNodes = (childNodes) => {
2493
- const slotRefNodes = [];
2494
- for (const childNode of Array.from(childNodes)) {
2495
- if (childNode["s-sr"]) {
2496
- slotRefNodes.push(childNode);
2497
- }
2498
- slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2499
- }
2500
- return slotRefNodes;
2501
- };
2502
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
2503
- var getHostSlotNode = (childNodes, slotName, hostName) => {
2504
- let i2 = 0;
2505
- let childNode;
2506
- for (; i2 < childNodes.length; i2++) {
2507
- childNode = childNodes[i2];
2508
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
2509
- return childNode;
2510
- }
2511
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
2512
- if (childNode) {
2513
- return childNode;
2514
- }
2515
- }
2516
- return null;
2517
- };
2518
- var getHostSlotChildNodes = (n, slotName) => {
2519
- const childNodes = [n];
2520
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
2521
- childNodes.push(n);
2522
- }
2523
- return childNodes;
2524
- };
2525
-
2526
- // src/runtime/bootstrap-custom-element.ts
2527
- var defineCustomElement = (Cstr, compactMeta) => {
2528
- customElements.define(compactMeta[1], proxyCustomElement(Cstr, compactMeta));
2529
- };
2530
- var proxyCustomElement = (Cstr, compactMeta) => {
2531
- const cmpMeta = {
2532
- $flags$: compactMeta[0],
2533
- $tagName$: compactMeta[1]
2534
- };
2535
- if (BUILD.member) {
2536
- cmpMeta.$members$ = compactMeta[2];
2537
- }
2538
- if (BUILD.hostListener) {
2539
- cmpMeta.$listeners$ = compactMeta[3];
2540
- }
2541
- if (BUILD.watchCallback) {
2542
- cmpMeta.$watchers$ = Cstr.$watchers$;
2543
- }
2544
- if (BUILD.reflect) {
2545
- cmpMeta.$attrsToReflect$ = [];
2546
- }
2547
- if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2548
- cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2549
- }
2550
- if (BUILD.experimentalSlotFixes) {
2551
- if (BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2552
- patchPseudoShadowDom(Cstr.prototype, cmpMeta);
2553
- }
2554
- } else {
2555
- if (BUILD.slotChildNodesFix) {
2556
- patchChildSlotNodes(Cstr.prototype, cmpMeta);
2557
- }
2558
- if (BUILD.cloneNodeFix) {
2559
- patchCloneNode(Cstr.prototype);
2560
- }
2561
- if (BUILD.appendChildSlotFix) {
2562
- patchSlotAppendChild(Cstr.prototype);
2563
- }
2564
- if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2565
- patchTextContent(Cstr.prototype);
2566
- }
2567
- }
2568
- const originalConnectedCallback = Cstr.prototype.connectedCallback;
2569
- const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
2570
- Object.assign(Cstr.prototype, {
2571
- __registerHost() {
2572
- registerHost(this, cmpMeta);
2573
- },
2574
- connectedCallback() {
2575
- const hostRef = getHostRef(this);
2576
- addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
2577
- connectedCallback(this);
2578
- if (BUILD.connectedCallback && originalConnectedCallback) {
2579
- originalConnectedCallback.call(this);
2580
- }
2581
- },
2582
- disconnectedCallback() {
2583
- disconnectedCallback(this);
2584
- if (BUILD.disconnectedCallback && originalDisconnectedCallback) {
2585
- originalDisconnectedCallback.call(this);
2586
- }
2587
- },
2588
- __attachShadow() {
2589
- if (supportsShadow) {
2590
- if (!this.shadowRoot) {
2591
- if (BUILD.shadowDelegatesFocus) {
2592
- this.attachShadow({
2593
- mode: "open",
2594
- delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
2595
- });
2596
- } else {
2597
- this.attachShadow({ mode: "open" });
2598
- }
2599
- } else {
2600
- if (this.shadowRoot.mode !== "open") {
2601
- throw new Error(
2602
- `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
2603
- );
2604
- }
2605
- }
2606
- } else {
2607
- this.shadowRoot = this;
2608
- }
2609
- }
2610
- });
2611
- Cstr.is = cmpMeta.$tagName$;
2612
- return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
2613
- };
2614
- var forceModeUpdate = (elm) => {
2615
- if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {
2616
- const mode = computeMode(elm);
2617
- const hostRef = getHostRef(elm);
2618
- if (hostRef.$modeName$ !== mode) {
2619
- const cmpMeta = hostRef.$cmpMeta$;
2620
- const oldScopeId = elm["s-sc"];
2621
- const scopeId2 = getScopeId(cmpMeta, mode);
2622
- const style = elm.constructor.style[mode];
2623
- const flags = cmpMeta.$flags$;
2624
- if (style) {
2625
- if (!styles.has(scopeId2)) {
2626
- registerStyle(scopeId2, style, !!(flags & 1 /* shadowDomEncapsulation */));
2627
- }
2628
- hostRef.$modeName$ = mode;
2629
- elm.classList.remove(oldScopeId + "-h", oldScopeId + "-s");
2630
- attachStyles(hostRef);
2631
- forceUpdate(elm);
2632
- }
2633
- }
2634
- }
2635
- };
2636
-
2637
- // src/runtime/hmr-component.ts
2638
- var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
2639
- const hostRef = getHostRef(hostElement);
2640
- hostRef.$flags$ = 1 /* hasConnected */;
2641
- initializeComponent(hostElement, hostRef, cmpMeta, hmrVersionId);
2642
- };
2643
-
2644
- // src/runtime/bootstrap-lazy.ts
2645
- var bootstrapLazy = (lazyBundles, options = {}) => {
2646
- var _a;
2647
- if (BUILD.profile && performance.mark) {
2648
- performance.mark("st:app:start");
2649
- }
2650
- installDevTools();
2651
- const endBootstrap = createTime("bootstrapLazy");
2652
- const cmpTags = [];
2653
- const exclude = options.exclude || [];
2654
- const customElements2 = win.customElements;
2655
- const head = doc.head;
2656
- const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
2657
- const dataStyles = /* @__PURE__ */ doc.createElement("style");
2658
- const deferredConnectedCallbacks = [];
2659
- let appLoadFallback;
2660
- let isBootstrapping = true;
2661
- Object.assign(plt, options);
2662
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
2663
- if (BUILD.asyncQueue) {
2664
- if (options.syncQueue) {
2665
- plt.$flags$ |= 4 /* queueSync */;
2666
- }
2667
- }
2668
- if (BUILD.hydrateClientSide) {
2669
- plt.$flags$ |= 2 /* appLoaded */;
2670
- }
2671
- let hasSlotRelocation = false;
2672
- lazyBundles.map((lazyBundle) => {
2673
- lazyBundle[1].map((compactMeta) => {
2674
- var _a2;
2675
- const cmpMeta = {
2676
- $flags$: compactMeta[0],
2677
- $tagName$: compactMeta[1],
2678
- $members$: compactMeta[2],
2679
- $listeners$: compactMeta[3]
2680
- };
2681
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
2682
- hasSlotRelocation = true;
2683
- }
2684
- if (BUILD.member) {
2685
- cmpMeta.$members$ = compactMeta[2];
2686
- }
2687
- if (BUILD.hostListener) {
2688
- cmpMeta.$listeners$ = compactMeta[3];
2689
- }
2690
- if (BUILD.reflect) {
2691
- cmpMeta.$attrsToReflect$ = [];
2692
- }
2693
- if (BUILD.watchCallback) {
2694
- cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
2695
- }
2696
- if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2697
- cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
2698
- }
2699
- const tagName = BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
2700
- const HostElement = class extends HTMLElement {
2701
- // StencilLazyHost
2702
- constructor(self) {
2703
- super(self);
2704
- this.hasRegisteredEventListeners = false;
2705
- self = this;
2706
- registerHost(self, cmpMeta);
2707
- if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2708
- if (supportsShadow) {
2709
- if (!self.shadowRoot) {
2710
- if (BUILD.shadowDelegatesFocus) {
2711
- self.attachShadow({
2712
- mode: "open",
2713
- delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
2714
- });
2715
- } else {
2716
- self.attachShadow({ mode: "open" });
2717
- }
2718
- } else {
2719
- if (self.shadowRoot.mode !== "open") {
2720
- throw new Error(
2721
- `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
2722
- );
2723
- }
2724
- }
2725
- } else if (!BUILD.hydrateServerSide && !("shadowRoot" in self)) {
2726
- self.shadowRoot = self;
2727
- }
2728
- }
2729
- }
2730
- connectedCallback() {
2731
- const hostRef = getHostRef(this);
2732
- if (!this.hasRegisteredEventListeners) {
2733
- this.hasRegisteredEventListeners = true;
2734
- addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
2735
- }
2736
- if (appLoadFallback) {
2737
- clearTimeout(appLoadFallback);
2738
- appLoadFallback = null;
2739
- }
2740
- if (isBootstrapping) {
2741
- deferredConnectedCallbacks.push(this);
2742
- } else {
2743
- plt.jmp(() => connectedCallback(this));
2744
- }
2745
- }
2746
- disconnectedCallback() {
2747
- plt.jmp(() => disconnectedCallback(this));
2748
- }
2749
- componentOnReady() {
2750
- return getHostRef(this).$onReadyPromise$;
2751
- }
2752
- };
2753
- if (BUILD.experimentalSlotFixes) {
2754
- if (BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2755
- patchPseudoShadowDom(HostElement.prototype, cmpMeta);
2756
- }
2757
- } else {
2758
- if (BUILD.slotChildNodesFix) {
2759
- patchChildSlotNodes(HostElement.prototype, cmpMeta);
2760
- }
2761
- if (BUILD.cloneNodeFix) {
2762
- patchCloneNode(HostElement.prototype);
2763
- }
2764
- if (BUILD.appendChildSlotFix) {
2765
- patchSlotAppendChild(HostElement.prototype);
2766
- }
2767
- if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2768
- patchTextContent(HostElement.prototype);
2769
- }
2770
- }
2771
- if (BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
2772
- HostElement.formAssociated = true;
2773
- }
2774
- if (BUILD.hotModuleReplacement) {
2775
- HostElement.prototype["s-hmr"] = function(hmrVersionId) {
2776
- hmrStart(this, cmpMeta, hmrVersionId);
2777
- };
2778
- }
2779
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
2780
- if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
2781
- cmpTags.push(tagName);
2782
- customElements2.define(
2783
- tagName,
2784
- proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
2785
- );
2786
- }
2787
- });
2788
- });
2789
- if (cmpTags.length > 0) {
2790
- if (hasSlotRelocation) {
2791
- dataStyles.textContent += SLOT_FB_CSS;
2792
- }
2793
- if (BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)) {
2794
- dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
2795
- }
2796
- if (dataStyles.innerHTML.length) {
2797
- dataStyles.setAttribute("data-styles", "");
2798
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
2799
- if (nonce != null) {
2800
- dataStyles.setAttribute("nonce", nonce);
2801
- }
2802
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
2803
- }
2804
- }
2805
- isBootstrapping = false;
2806
- if (deferredConnectedCallbacks.length) {
2807
- deferredConnectedCallbacks.map((host) => host.connectedCallback());
2808
- } else {
2809
- if (BUILD.profile) {
2810
- plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30, "timeout"));
2811
- } else {
2812
- plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
2813
- }
2814
- }
2815
- endBootstrap();
2816
- };
2817
-
2818
- // src/runtime/fragment.ts
2819
- var Fragment = (_, children) => children;
2820
- var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
2821
- if (BUILD.hostListener && listeners) {
2822
- if (BUILD.hostListenerTargetParent) {
2823
- if (attachParentListeners) {
2824
- listeners = listeners.filter(([flags]) => flags & 32 /* TargetParent */);
2825
- } else {
2826
- listeners = listeners.filter(([flags]) => !(flags & 32 /* TargetParent */));
2827
- }
2828
- }
2829
- listeners.map(([flags, name, method]) => {
2830
- const target = BUILD.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
2831
- const handler = hostListenerProxy(hostRef, method);
2832
- const opts = hostListenerOpts(flags);
2833
- plt.ael(target, name, handler, opts);
2834
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
2835
- });
2836
- }
2837
- };
2838
- var hostListenerProxy = (hostRef, methodName) => (ev) => {
2839
- var _a;
2840
- try {
2841
- if (BUILD.lazyLoad) {
2842
- if (hostRef.$flags$ & 256 /* isListenReady */) {
2843
- (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
2844
- } else {
2845
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
2846
- }
2847
- } else {
2848
- hostRef.$hostElement$[methodName](ev);
2849
- }
2850
- } catch (e) {
2851
- consoleError(e);
2852
- }
2853
- };
2854
- var getHostListenerTarget = (elm, flags) => {
2855
- if (BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
2856
- if (BUILD.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
2857
- if (BUILD.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
2858
- if (BUILD.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement)
2859
- return elm.parentElement;
2860
- return elm;
2861
- };
2862
- var hostListenerOpts = (flags) => supportsListenerOptions ? {
2863
- passive: (flags & 1 /* Passive */) !== 0,
2864
- capture: (flags & 2 /* Capture */) !== 0
2865
- } : (flags & 2 /* Capture */) !== 0;
2866
-
2867
- // src/runtime/nonce.ts
2868
- var setNonce = (nonce) => plt.$nonce$ = nonce;
2869
-
2870
- // src/runtime/platform-options.ts
2871
- var setPlatformOptions = (opts) => Object.assign(plt, opts);
2872
-
2873
- // src/runtime/vdom/vdom-annotations.ts
2874
- var insertVdomAnnotations = (doc2, staticComponents) => {
2875
- if (doc2 != null) {
2876
- const docData = {
2877
- hostIds: 0,
2878
- rootLevelIds: 0,
2879
- staticComponents: new Set(staticComponents)
2880
- };
2881
- const orgLocationNodes = [];
2882
- parseVNodeAnnotations(doc2, doc2.body, docData, orgLocationNodes);
2883
- orgLocationNodes.forEach((orgLocationNode) => {
2884
- var _a;
2885
- if (orgLocationNode != null && orgLocationNode["s-nr"]) {
2886
- const nodeRef = orgLocationNode["s-nr"];
2887
- let hostId = nodeRef["s-host-id"];
2888
- let nodeId = nodeRef["s-node-id"];
2889
- let childId = `${hostId}.${nodeId}`;
2890
- if (hostId == null) {
2891
- hostId = 0;
2892
- docData.rootLevelIds++;
2893
- nodeId = docData.rootLevelIds;
2894
- childId = `${hostId}.${nodeId}`;
2895
- if (nodeRef.nodeType === 1 /* ElementNode */) {
2896
- nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);
2897
- } else if (nodeRef.nodeType === 3 /* TextNode */) {
2898
- if (hostId === 0) {
2899
- const textContent = (_a = nodeRef.nodeValue) == null ? void 0 : _a.trim();
2900
- if (textContent === "") {
2901
- orgLocationNode.remove();
2902
- return;
2903
- }
2904
- }
2905
- const commentBeforeTextNode = doc2.createComment(childId);
2906
- commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
2907
- insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
2908
- }
2909
- }
2910
- let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
2911
- const orgLocationParentNode = orgLocationNode.parentElement;
2912
- if (orgLocationParentNode) {
2913
- if (orgLocationParentNode["s-en"] === "") {
2914
- orgLocationNodeId += `.`;
2915
- } else if (orgLocationParentNode["s-en"] === "c") {
2916
- orgLocationNodeId += `.c`;
2917
- }
2918
- }
2919
- orgLocationNode.nodeValue = orgLocationNodeId;
2920
- }
2921
- });
2922
- }
2923
- };
2924
- var parseVNodeAnnotations = (doc2, node, docData, orgLocationNodes) => {
2925
- var _a;
2926
- if (node == null) {
2927
- return;
2928
- }
2929
- if (node["s-nr"] != null) {
2930
- orgLocationNodes.push(node);
2931
- }
2932
- if (node.nodeType === 1 /* ElementNode */) {
2933
- const childNodes = [...Array.from(node.childNodes), ...Array.from(((_a = node.shadowRoot) == null ? void 0 : _a.childNodes) || [])];
2934
- childNodes.forEach((childNode) => {
2935
- const hostRef = getHostRef(childNode);
2936
- if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {
2937
- const cmpData = {
2938
- nodeIds: 0
2939
- };
2940
- insertVNodeAnnotations(doc2, childNode, hostRef.$vnode$, docData, cmpData);
2941
- }
2942
- parseVNodeAnnotations(doc2, childNode, docData, orgLocationNodes);
2943
- });
2944
- }
2945
- };
2946
- var insertVNodeAnnotations = (doc2, hostElm, vnode, docData, cmpData) => {
2947
- if (vnode != null) {
2948
- const hostId = ++docData.hostIds;
2949
- hostElm.setAttribute(HYDRATE_ID, hostId);
2950
- if (hostElm["s-cr"] != null) {
2951
- hostElm["s-cr"].nodeValue = `${CONTENT_REF_ID}.${hostId}`;
2952
- }
2953
- if (vnode.$children$ != null) {
2954
- const depth = 0;
2955
- vnode.$children$.forEach((vnodeChild, index) => {
2956
- insertChildVNodeAnnotations(doc2, vnodeChild, cmpData, hostId, depth, index);
2957
- });
2958
- }
2959
- if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute(HYDRATE_CHILD_ID)) {
2960
- const parent = hostElm.parentElement;
2961
- if (parent && parent.childNodes) {
2962
- const parentChildNodes = Array.from(parent.childNodes);
2963
- const comment = parentChildNodes.find(
2964
- (node) => node.nodeType === 8 /* CommentNode */ && node["s-sr"]
2965
- );
2966
- if (comment) {
2967
- const index = parentChildNodes.indexOf(hostElm) - 1;
2968
- vnode.$elm$.setAttribute(
2969
- HYDRATE_CHILD_ID,
2970
- `${comment["s-host-id"]}.${comment["s-node-id"]}.0.${index}`
2971
- );
2972
- }
2973
- }
2974
- }
2975
- }
2976
- };
2977
- var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, index) => {
2978
- const childElm = vnodeChild.$elm$;
2979
- if (childElm == null) {
2980
- return;
2981
- }
2982
- const nodeId = cmpData.nodeIds++;
2983
- const childId = `${hostId}.${nodeId}.${depth}.${index}`;
2984
- childElm["s-host-id"] = hostId;
2985
- childElm["s-node-id"] = nodeId;
2986
- if (childElm.nodeType === 1 /* ElementNode */) {
2987
- childElm.setAttribute(HYDRATE_CHILD_ID, childId);
2988
- } else if (childElm.nodeType === 3 /* TextNode */) {
2989
- const parentNode = childElm.parentNode;
2990
- const nodeName = parentNode == null ? void 0 : parentNode.nodeName;
2991
- if (nodeName !== "STYLE" && nodeName !== "SCRIPT") {
2992
- const textNodeId = `${TEXT_NODE_ID}.${childId}`;
2993
- const commentBeforeTextNode = doc2.createComment(textNodeId);
2994
- insertBefore(parentNode, commentBeforeTextNode, childElm);
2995
- }
2996
- } else if (childElm.nodeType === 8 /* CommentNode */) {
2997
- if (childElm["s-sr"]) {
2998
- const slotName = childElm["s-sn"] || "";
2999
- const slotNodeId = `${SLOT_NODE_ID}.${childId}.${slotName}`;
3000
- childElm.nodeValue = slotNodeId;
3001
- }
3002
- }
3003
- if (vnodeChild.$children$ != null) {
3004
- const childDepth = depth + 1;
3005
- vnodeChild.$children$.forEach((vnode, index2) => {
3006
- insertChildVNodeAnnotations(doc2, vnode, cmpData, hostId, childDepth, index2);
3007
- });
3008
- }
3009
- };
3010
-
3011
- export { BUILD as B, Fragment as F, H, NAMESPACE as N, createEvent as a, bootstrapLazy as b, consoleDevInfo as c, doc as d, getAssetPath as e, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
3012
-
3013
- //# sourceMappingURL=index-7559531b.js.map