@amiceli/papierjs 0.9.0 → 0.11.0

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 (530) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
  3. package/dist/cjs/feather-hhpdTUdS.js +2413 -0
  4. package/dist/cjs/feather-hhpdTUdS.js.map +1 -0
  5. package/dist/cjs/{index-e53c626b.js → index-BLkeAjdP.js} +378 -269
  6. package/dist/cjs/index-BLkeAjdP.js.map +1 -0
  7. package/dist/cjs/index.cjs.js +1 -0
  8. package/dist/cjs/index.cjs.js.map +1 -1
  9. package/dist/cjs/loader.cjs.js +4 -5
  10. package/dist/cjs/loader.cjs.js.map +1 -1
  11. package/dist/cjs/p-accordion.cjs.entry.js +8 -10
  12. package/dist/cjs/p-accordion.cjs.entry.js.map +1 -1
  13. package/dist/cjs/p-accordion.entry.cjs.js.map +1 -0
  14. package/dist/cjs/p-alert.cjs.entry.js +15 -11
  15. package/dist/cjs/p-alert.cjs.entry.js.map +1 -1
  16. package/dist/cjs/p-alert.entry.cjs.js.map +1 -0
  17. package/dist/cjs/p-badge.cjs.entry.js +7 -9
  18. package/dist/cjs/p-badge.cjs.entry.js.map +1 -1
  19. package/dist/cjs/p-badge.entry.cjs.js.map +1 -0
  20. package/dist/cjs/p-breadcrumb-item.cjs.entry.js +7 -9
  21. package/dist/cjs/p-breadcrumb-item.cjs.entry.js.map +1 -1
  22. package/dist/cjs/p-breadcrumb-item.entry.cjs.js.map +1 -0
  23. package/dist/cjs/p-breadcrumb.cjs.entry.js +7 -9
  24. package/dist/cjs/p-breadcrumb.cjs.entry.js.map +1 -1
  25. package/dist/cjs/p-breadcrumb.entry.cjs.js.map +1 -0
  26. package/dist/cjs/p-button.p-dropdown.p-dropdown-item.p-notification-handler.entry.cjs.js.map +1 -0
  27. package/dist/cjs/p-button_4.cjs.entry.js +214 -0
  28. package/dist/cjs/p-button_4.cjs.entry.js.map +1 -0
  29. package/dist/cjs/p-card.cjs.entry.js +36 -0
  30. package/dist/cjs/p-card.cjs.entry.js.map +1 -0
  31. package/dist/cjs/p-card.entry.cjs.js.map +1 -0
  32. package/dist/cjs/p-icon.cjs.entry.js +7 -6
  33. package/dist/cjs/p-icon.cjs.entry.js.map +1 -1
  34. package/dist/cjs/p-icon.entry.cjs.js.map +1 -0
  35. package/dist/cjs/p-input-text.cjs.entry.js +9 -11
  36. package/dist/cjs/p-input-text.cjs.entry.js.map +1 -1
  37. package/dist/cjs/p-input-text.entry.cjs.js.map +1 -0
  38. package/dist/cjs/p-leaf.cjs.entry.js +7 -9
  39. package/dist/cjs/p-leaf.cjs.entry.js.map +1 -1
  40. package/dist/cjs/p-leaf.entry.cjs.js.map +1 -0
  41. package/dist/cjs/p-modal.cjs.entry.js +6 -8
  42. package/dist/cjs/p-modal.cjs.entry.js.map +1 -1
  43. package/dist/cjs/p-modal.entry.cjs.js.map +1 -0
  44. package/dist/cjs/p-notification-preview.cjs.entry.js +20 -11
  45. package/dist/cjs/p-notification-preview.cjs.entry.js.map +1 -1
  46. package/dist/cjs/p-notification-preview.entry.cjs.js.map +1 -0
  47. package/dist/cjs/p-notification.cjs.entry.js +6 -8
  48. package/dist/cjs/p-notification.cjs.entry.js.map +1 -1
  49. package/dist/cjs/p-notification.entry.cjs.js.map +1 -0
  50. package/dist/cjs/p-progress-bar.cjs.entry.js +7 -9
  51. package/dist/cjs/p-progress-bar.cjs.entry.js.map +1 -1
  52. package/dist/cjs/p-progress-bar.entry.cjs.js.map +1 -0
  53. package/dist/cjs/p-slider.cjs.entry.js +8 -10
  54. package/dist/cjs/p-slider.cjs.entry.js.map +1 -1
  55. package/dist/cjs/p-slider.entry.cjs.js.map +1 -0
  56. package/dist/cjs/p-spinner.cjs.entry.js +5 -7
  57. package/dist/cjs/p-spinner.cjs.entry.js.map +1 -1
  58. package/dist/cjs/p-spinner.entry.cjs.js.map +1 -0
  59. package/dist/cjs/p-switch-tile.cjs.entry.js +8 -10
  60. package/dist/cjs/p-switch-tile.cjs.entry.js.map +1 -1
  61. package/dist/cjs/p-switch-tile.entry.cjs.js.map +1 -0
  62. package/dist/cjs/p-switch.cjs.entry.js +7 -9
  63. package/dist/cjs/p-switch.cjs.entry.js.map +1 -1
  64. package/dist/cjs/p-switch.entry.cjs.js.map +1 -0
  65. package/dist/cjs/p-tab.cjs.entry.js +6 -8
  66. package/dist/cjs/p-tab.cjs.entry.js.map +1 -1
  67. package/dist/cjs/p-tab.entry.cjs.js.map +1 -0
  68. package/dist/cjs/p-tabs.cjs.entry.js +7 -9
  69. package/dist/cjs/p-tabs.cjs.entry.js.map +1 -1
  70. package/dist/cjs/p-tabs.entry.cjs.js.map +1 -0
  71. package/dist/cjs/p-tooltip.cjs.entry.js +5 -7
  72. package/dist/cjs/p-tooltip.cjs.entry.js.map +1 -1
  73. package/dist/cjs/p-tooltip.entry.cjs.js.map +1 -0
  74. package/dist/cjs/papierjs.cjs.js +8 -7
  75. package/dist/cjs/papierjs.cjs.js.map +1 -1
  76. package/dist/collection/collection-manifest.json +20 -21
  77. package/dist/collection/components/breadcrumb/{breadcrumb/breadcrumb.css → p-breadcrumb/p-breadcrumb.css} +59 -59
  78. package/dist/collection/components/breadcrumb/{breadcrumb/breadcrumb.js → p-breadcrumb/p-breadcrumb.js} +6 -6
  79. package/dist/collection/components/breadcrumb/p-breadcrumb/p-breadcrumb.js.map +1 -0
  80. package/dist/collection/components/breadcrumb/{breadcrumb-item/breadcrumb-item.js → p-breadcrumb-item/p-breadcrumb-item.js} +8 -8
  81. package/dist/collection/components/breadcrumb/p-breadcrumb-item/p-breadcrumb-item.js.map +1 -0
  82. package/dist/collection/components/dropdown/{dropdown/dropdown.js → p-dropdown/p-dropdown.js} +11 -11
  83. package/dist/collection/components/dropdown/p-dropdown/p-dropdown.js.map +1 -0
  84. package/dist/collection/components/dropdown/{dropdown-item/dropdown-item.js → p-dropdown-item/p-dropdown-item.js} +9 -9
  85. package/dist/collection/components/dropdown/p-dropdown-item/p-dropdown-item.js.map +1 -0
  86. package/dist/collection/components/form/{input-text → p-input-text}/input-text.js +11 -11
  87. package/dist/collection/components/form/p-input-text/input-text.js.map +1 -0
  88. package/dist/collection/components/form/{slider → p-slider}/sliders.js +9 -9
  89. package/dist/collection/components/form/p-slider/sliders.js.map +1 -0
  90. package/dist/collection/components/form/p-slider/sliders.preview.js.map +1 -0
  91. package/dist/collection/components/form/{switch → p-switch}/switch.js +8 -8
  92. package/dist/collection/components/form/p-switch/switch.js.map +1 -0
  93. package/dist/collection/components/form/{switch-tile → p-switch-tile}/switch-tile.js +8 -8
  94. package/dist/collection/components/form/p-switch-tile/switch-tile.js.map +1 -0
  95. package/dist/collection/components/notification/p-notification/p-notification.js +6 -6
  96. package/dist/collection/components/notification/p-notification/p-notification.js.map +1 -1
  97. package/dist/collection/components/notification/p-notification-handler/p-notification-handler.js +1 -1
  98. package/dist/collection/components/notification/p-notification-handler/p-notification-handler.js.map +1 -1
  99. package/dist/collection/components/notification/p-notification-handler/stories/p-notification-preview.js +17 -7
  100. package/dist/collection/components/notification/p-notification-handler/stories/p-notification-preview.js.map +1 -1
  101. package/dist/collection/components/{accordion/accordion.js → p-accordion/p-accordion.js} +8 -8
  102. package/dist/collection/components/p-accordion/p-accordion.js.map +1 -0
  103. package/dist/collection/components/{alert/alert.js → p-alert/p-alert.js} +18 -9
  104. package/dist/collection/components/p-alert/p-alert.js.map +1 -0
  105. package/dist/collection/components/{badge/badge.js → p-badge/p-badge.js} +7 -7
  106. package/dist/collection/components/p-badge/p-badge.js.map +1 -0
  107. package/dist/collection/components/{button/button.js → p-button/p-button.js} +20 -14
  108. package/dist/collection/components/p-button/p-button.js.map +1 -0
  109. package/dist/collection/components/p-card/p-card.css +3234 -0
  110. package/dist/collection/components/p-card/p-card.js +113 -0
  111. package/dist/collection/components/p-card/p-card.js.map +1 -0
  112. package/dist/collection/components/p-icon/p-icon.js +7 -4
  113. package/dist/collection/components/p-icon/p-icon.js.map +1 -1
  114. package/dist/collection/components/{leaf/leaf.js → p-leaf/p-leaf.js} +9 -6
  115. package/dist/collection/components/p-leaf/p-leaf.js.map +1 -0
  116. package/dist/collection/components/{modal/modal.js → p-modal/p-modal.js} +5 -5
  117. package/dist/collection/components/p-modal/p-modal.js.map +1 -0
  118. package/dist/collection/components/p-modal/stories/modal.preview.js +19 -0
  119. package/dist/collection/components/{progress-bar/progress-bar.js → p-progress-bar/p-progress-bar.js} +10 -10
  120. package/dist/collection/components/p-progress-bar/p-progress-bar.js.map +1 -0
  121. package/dist/collection/components/p-progress-bar/stories/progress-bar.preview.js.map +1 -0
  122. package/dist/collection/components/p-spinner/p-spinner.js +5 -5
  123. package/dist/collection/components/p-spinner/p-spinner.js.map +1 -1
  124. package/dist/collection/components/{tooltip/tooltip.js → p-tooltip/p-tooltip.js} +10 -10
  125. package/dist/collection/components/p-tooltip/p-tooltip.js.map +1 -0
  126. package/dist/collection/components/tabs/{tab/tab.css → p-tab/p-tab.css} +59 -59
  127. package/dist/collection/components/tabs/{tab/tab.js → p-tab/p-tab.js} +8 -8
  128. package/dist/collection/components/tabs/p-tab/p-tab.js.map +1 -0
  129. package/dist/collection/components/tabs/{tabs/tabs.js → p-tabs/p-tabs.js} +7 -7
  130. package/dist/collection/components/tabs/p-tabs/p-tabs.js.map +1 -0
  131. package/dist/components/index.js +1596 -1
  132. package/dist/components/index.js.map +1 -1
  133. package/dist/components/p-BYP4ix9x.js +102 -0
  134. package/dist/components/p-BYP4ix9x.js.map +1 -0
  135. package/dist/components/p-BoXBUJUF.js +53 -0
  136. package/dist/components/p-BoXBUJUF.js.map +1 -0
  137. package/dist/components/p-C8J5Uj6B.js +53 -0
  138. package/dist/components/p-C8J5Uj6B.js.map +1 -0
  139. package/dist/components/{p-34faf3f1.js → p-CW84oe-z.js} +6 -6
  140. package/dist/components/p-CW84oe-z.js.map +1 -0
  141. package/dist/components/p-CWVEkY9o.js +93 -0
  142. package/dist/components/p-CWVEkY9o.js.map +1 -0
  143. package/dist/components/{p-a900d6a8.js → p-CtG_9OPT.js} +6 -6
  144. package/dist/components/p-CtG_9OPT.js.map +1 -0
  145. package/dist/{esm/p-notification-handler.entry.js → components/p-Cz0c9sEd.js} +35 -10
  146. package/dist/components/p-Cz0c9sEd.js.map +1 -0
  147. package/dist/components/{p-ef0c3ae9.js → p-DrpbJ3p6.js} +7 -7
  148. package/dist/components/p-DrpbJ3p6.js.map +1 -0
  149. package/dist/components/p-IX2EXA6o.js +81 -0
  150. package/dist/components/p-IX2EXA6o.js.map +1 -0
  151. package/dist/components/p-Ixyl16zU.js +102 -0
  152. package/dist/components/p-Ixyl16zU.js.map +1 -0
  153. package/dist/components/p-OrVnZ617.js +49 -0
  154. package/dist/components/p-OrVnZ617.js.map +1 -0
  155. package/dist/components/p-TTB8YZY7.js +93 -0
  156. package/dist/components/p-TTB8YZY7.js.map +1 -0
  157. package/dist/components/p-accordion.js +8 -8
  158. package/dist/components/p-accordion.js.map +1 -1
  159. package/dist/components/p-alert.js +16 -10
  160. package/dist/components/p-alert.js.map +1 -1
  161. package/dist/components/p-badge.js +8 -8
  162. package/dist/components/p-badge.js.map +1 -1
  163. package/dist/components/p-breadcrumb-item.js +8 -8
  164. package/dist/components/p-breadcrumb-item.js.map +1 -1
  165. package/dist/components/p-breadcrumb.js +8 -8
  166. package/dist/components/p-breadcrumb.js.map +1 -1
  167. package/dist/components/p-button.js +3 -2
  168. package/dist/components/{p-modal-preview.d.ts → p-card.d.ts} +4 -4
  169. package/dist/components/p-card.js +59 -0
  170. package/dist/components/p-card.js.map +1 -0
  171. package/dist/components/p-dropdown-item.js +3 -2
  172. package/dist/components/p-dropdown.js +3 -2
  173. package/dist/components/p-fjnyWEDB.js +2411 -0
  174. package/dist/components/p-fjnyWEDB.js.map +1 -0
  175. package/dist/components/p-icon.js +7 -4
  176. package/dist/components/p-icon.js.map +1 -1
  177. package/dist/components/p-input-text.js +10 -10
  178. package/dist/components/p-input-text.js.map +1 -1
  179. package/dist/components/p-leaf.js +8 -8
  180. package/dist/components/p-leaf.js.map +1 -1
  181. package/dist/components/p-modal.js +43 -1
  182. package/dist/components/p-modal.js.map +1 -1
  183. package/dist/components/p-notification-handler.js +2 -1
  184. package/dist/components/p-notification-preview.js +27 -16
  185. package/dist/components/p-notification-preview.js.map +1 -1
  186. package/dist/components/p-notification.js +2 -1
  187. package/dist/components/p-progress-bar.js +8 -8
  188. package/dist/components/p-progress-bar.js.map +1 -1
  189. package/dist/components/p-slider.js +9 -9
  190. package/dist/components/p-slider.js.map +1 -1
  191. package/dist/components/p-spinner.js +2 -1
  192. package/dist/components/p-switch-tile.js +9 -9
  193. package/dist/components/p-switch-tile.js.map +1 -1
  194. package/dist/components/p-switch.js +7 -7
  195. package/dist/components/p-switch.js.map +1 -1
  196. package/dist/components/p-tab.js +6 -6
  197. package/dist/components/p-tab.js.map +1 -1
  198. package/dist/components/p-tabs.js +7 -7
  199. package/dist/components/p-tabs.js.map +1 -1
  200. package/dist/components/p-tooltip.js +5 -5
  201. package/dist/components/p-tooltip.js.map +1 -1
  202. package/dist/esm/app-globals-DQuL1Twl.js +6 -0
  203. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
  204. package/dist/esm/feather-fjnyWEDB.js +2411 -0
  205. package/dist/esm/feather-fjnyWEDB.js.map +1 -0
  206. package/dist/esm/{index-aee2eada.js → index-D_9dM54j.js} +374 -263
  207. package/dist/esm/index-D_9dM54j.js.map +1 -0
  208. package/dist/esm/index.js +1 -0
  209. package/dist/esm/index.js.map +1 -1
  210. package/dist/esm/loader.js +5 -4
  211. package/dist/esm/loader.js.map +1 -1
  212. package/dist/esm/p-accordion.entry.js +8 -8
  213. package/dist/esm/p-accordion.entry.js.map +1 -1
  214. package/dist/esm/p-alert.entry.js +15 -9
  215. package/dist/esm/p-alert.entry.js.map +1 -1
  216. package/dist/esm/p-badge.entry.js +7 -7
  217. package/dist/esm/p-badge.entry.js.map +1 -1
  218. package/dist/esm/p-breadcrumb-item.entry.js +7 -7
  219. package/dist/esm/p-breadcrumb-item.entry.js.map +1 -1
  220. package/dist/esm/p-breadcrumb.entry.js +7 -7
  221. package/dist/esm/p-breadcrumb.entry.js.map +1 -1
  222. package/dist/esm/p-button.p-dropdown.p-dropdown-item.p-notification-handler.entry.js.map +1 -0
  223. package/dist/esm/p-button_4.entry.js +209 -0
  224. package/dist/esm/p-button_4.entry.js.map +1 -0
  225. package/dist/{components/p-642f2cf7.js → esm/p-card.entry.js} +26 -39
  226. package/dist/esm/p-card.entry.js.map +1 -0
  227. package/dist/esm/p-icon.entry.js +7 -4
  228. package/dist/esm/p-icon.entry.js.map +1 -1
  229. package/dist/esm/p-input-text.entry.js +9 -9
  230. package/dist/esm/p-input-text.entry.js.map +1 -1
  231. package/dist/esm/p-leaf.entry.js +7 -7
  232. package/dist/esm/p-leaf.entry.js.map +1 -1
  233. package/dist/esm/p-modal.entry.js +6 -6
  234. package/dist/esm/p-modal.entry.js.map +1 -1
  235. package/dist/esm/p-notification-preview.entry.js +20 -9
  236. package/dist/esm/p-notification-preview.entry.js.map +1 -1
  237. package/dist/esm/p-notification.entry.js +6 -6
  238. package/dist/esm/p-notification.entry.js.map +1 -1
  239. package/dist/esm/p-progress-bar.entry.js +7 -7
  240. package/dist/esm/p-progress-bar.entry.js.map +1 -1
  241. package/dist/esm/p-slider.entry.js +8 -8
  242. package/dist/esm/p-slider.entry.js.map +1 -1
  243. package/dist/esm/p-spinner.entry.js +5 -5
  244. package/dist/esm/p-spinner.entry.js.map +1 -1
  245. package/dist/esm/p-switch-tile.entry.js +8 -8
  246. package/dist/esm/p-switch-tile.entry.js.map +1 -1
  247. package/dist/esm/p-switch.entry.js +7 -7
  248. package/dist/esm/p-switch.entry.js.map +1 -1
  249. package/dist/esm/p-tab.entry.js +6 -6
  250. package/dist/esm/p-tab.entry.js.map +1 -1
  251. package/dist/esm/p-tabs.entry.js +7 -7
  252. package/dist/esm/p-tabs.entry.js.map +1 -1
  253. package/dist/esm/p-tooltip.entry.js +5 -5
  254. package/dist/esm/p-tooltip.entry.js.map +1 -1
  255. package/dist/esm/papierjs.js +7 -5
  256. package/dist/esm/papierjs.js.map +1 -1
  257. package/dist/papierjs/index.esm.js.map +1 -1
  258. package/dist/papierjs/loader.esm.js.map +1 -0
  259. package/dist/papierjs/{p-0c87229d.entry.js → p-0124c50f.entry.js} +2 -2
  260. package/dist/papierjs/p-0124c50f.entry.js.map +1 -0
  261. package/dist/papierjs/{p-83c4843a.entry.js → p-03eb7be1.entry.js} +2 -2
  262. package/dist/papierjs/p-03eb7be1.entry.js.map +1 -0
  263. package/dist/papierjs/{p-cce903e9.entry.js → p-0abbbdba.entry.js} +2 -2
  264. package/dist/papierjs/p-0abbbdba.entry.js.map +1 -0
  265. package/dist/papierjs/{p-b292b138.entry.js → p-0ff9d763.entry.js} +2 -2
  266. package/dist/papierjs/p-0ff9d763.entry.js.map +1 -0
  267. package/dist/papierjs/{p-907ecded.entry.js → p-19f51abf.entry.js} +2 -2
  268. package/dist/papierjs/p-19f51abf.entry.js.map +1 -0
  269. package/dist/papierjs/{p-03a16f60.entry.js → p-1b03da90.entry.js} +2 -2
  270. package/dist/papierjs/p-1b03da90.entry.js.map +1 -0
  271. package/dist/papierjs/{p-3efab78f.entry.js → p-1d47b62e.entry.js} +2 -2
  272. package/dist/papierjs/p-1d47b62e.entry.js.map +1 -0
  273. package/dist/papierjs/{p-860525ed.entry.js → p-1dec350d.entry.js} +2 -2
  274. package/dist/papierjs/p-1dec350d.entry.js.map +1 -0
  275. package/dist/papierjs/p-1e6504ed.entry.js +2 -0
  276. package/dist/papierjs/p-1e6504ed.entry.js.map +1 -0
  277. package/dist/papierjs/{p-06d54935.entry.js → p-2644d8b6.entry.js} +2 -2
  278. package/dist/papierjs/p-2644d8b6.entry.js.map +1 -0
  279. package/dist/papierjs/{p-c2d59e17.entry.js → p-2695e679.entry.js} +2 -2
  280. package/dist/papierjs/p-2695e679.entry.js.map +1 -0
  281. package/dist/papierjs/{p-3c06fffc.entry.js → p-289c322f.entry.js} +2 -2
  282. package/dist/papierjs/p-289c322f.entry.js.map +1 -0
  283. package/dist/papierjs/p-2accdea5.entry.js +2 -0
  284. package/dist/papierjs/p-2accdea5.entry.js.map +1 -0
  285. package/dist/papierjs/p-2d091165.entry.js +2 -0
  286. package/dist/papierjs/p-2d091165.entry.js.map +1 -0
  287. package/dist/papierjs/{p-d9e2e92c.entry.js → p-3274b6c9.entry.js} +2 -2
  288. package/dist/papierjs/p-3274b6c9.entry.js.map +1 -0
  289. package/dist/papierjs/{p-7d32bcf0.entry.js → p-33d11cc9.entry.js} +2 -2
  290. package/dist/papierjs/p-33d11cc9.entry.js.map +1 -0
  291. package/dist/papierjs/p-3579cca1.entry.js +2 -0
  292. package/dist/papierjs/p-3579cca1.entry.js.map +1 -0
  293. package/dist/papierjs/p-3aaa32f1.entry.js +2 -0
  294. package/dist/papierjs/p-3aaa32f1.entry.js.map +1 -0
  295. package/dist/papierjs/p-45a3871c.entry.js +2 -0
  296. package/dist/papierjs/p-45a3871c.entry.js.map +1 -0
  297. package/dist/papierjs/{p-5a6898e8.entry.js → p-471e5dd1.entry.js} +2 -2
  298. package/dist/papierjs/p-471e5dd1.entry.js.map +1 -0
  299. package/dist/papierjs/{p-9b8dfa28.entry.js → p-5210fbeb.entry.js} +2 -2
  300. package/dist/papierjs/p-5210fbeb.entry.js.map +1 -0
  301. package/dist/papierjs/p-56886e34.entry.js +2 -0
  302. package/dist/papierjs/p-56886e34.entry.js.map +1 -0
  303. package/dist/papierjs/p-584a8668.entry.js +2 -0
  304. package/dist/papierjs/p-584a8668.entry.js.map +1 -0
  305. package/dist/papierjs/p-5e315f2f.entry.js +2 -0
  306. package/dist/papierjs/p-5e315f2f.entry.js.map +1 -0
  307. package/dist/papierjs/{p-5c511196.entry.js → p-5fa85cd8.entry.js} +2 -2
  308. package/dist/papierjs/p-5fa85cd8.entry.js.map +1 -0
  309. package/dist/papierjs/{p-462779ed.entry.js → p-60647bc6.entry.js} +2 -2
  310. package/dist/papierjs/p-60647bc6.entry.js.map +1 -0
  311. package/dist/papierjs/p-62356d11.entry.js +2 -0
  312. package/dist/papierjs/p-62356d11.entry.js.map +1 -0
  313. package/dist/papierjs/p-633379ad.entry.js +2 -0
  314. package/dist/papierjs/p-633379ad.entry.js.map +1 -0
  315. package/dist/papierjs/p-76da6759.entry.js +2 -0
  316. package/dist/papierjs/p-76da6759.entry.js.map +1 -0
  317. package/dist/papierjs/p-815a0e54.entry.js +2 -0
  318. package/dist/papierjs/p-815a0e54.entry.js.map +1 -0
  319. package/dist/papierjs/p-DQuL1Twl.js +2 -0
  320. package/dist/papierjs/p-DQuL1Twl.js.map +1 -0
  321. package/dist/papierjs/p-D_9dM54j.js +3 -0
  322. package/dist/papierjs/p-D_9dM54j.js.map +1 -0
  323. package/dist/papierjs/p-a20a405c.entry.js +2 -0
  324. package/dist/papierjs/p-a20a405c.entry.js.map +1 -0
  325. package/dist/papierjs/p-aa3cc1d4.entry.js +2 -0
  326. package/dist/papierjs/p-aa3cc1d4.entry.js.map +1 -0
  327. package/dist/papierjs/p-accordion.entry.esm.js.map +1 -0
  328. package/dist/papierjs/p-alert.entry.esm.js.map +1 -0
  329. package/dist/papierjs/{p-b3f595fd.entry.js → p-b853fa48.entry.js} +2 -2
  330. package/dist/papierjs/p-b853fa48.entry.js.map +1 -0
  331. package/dist/papierjs/p-badge.entry.esm.js.map +1 -0
  332. package/dist/papierjs/p-bb811980.entry.js +2 -0
  333. package/dist/papierjs/p-bb811980.entry.js.map +1 -0
  334. package/dist/papierjs/p-be83abf1.entry.js +2 -0
  335. package/dist/papierjs/p-be83abf1.entry.js.map +1 -0
  336. package/dist/papierjs/p-breadcrumb-item.entry.esm.js.map +1 -0
  337. package/dist/papierjs/p-breadcrumb.entry.esm.js.map +1 -0
  338. package/dist/papierjs/p-button.p-dropdown.p-dropdown-item.p-notification-handler.entry.esm.js.map +1 -0
  339. package/dist/papierjs/p-card.entry.esm.js.map +1 -0
  340. package/dist/papierjs/p-d8bb3cb8.entry.js +2 -0
  341. package/dist/papierjs/p-d8bb3cb8.entry.js.map +1 -0
  342. package/dist/papierjs/{p-23b08b62.entry.js → p-e34b583b.entry.js} +2 -2
  343. package/dist/papierjs/p-e34b583b.entry.js.map +1 -0
  344. package/dist/papierjs/p-e95c84a8.entry.js +2 -0
  345. package/dist/papierjs/p-e95c84a8.entry.js.map +1 -0
  346. package/dist/papierjs/p-ea70ba16.entry.js +2 -0
  347. package/dist/papierjs/p-ea70ba16.entry.js.map +1 -0
  348. package/dist/papierjs/p-f190f711.entry.js +2 -0
  349. package/dist/papierjs/p-f190f711.entry.js.map +1 -0
  350. package/dist/papierjs/p-f3289814.entry.js +2 -0
  351. package/dist/papierjs/p-f3289814.entry.js.map +1 -0
  352. package/dist/papierjs/p-fe89ec34.entry.js +2 -0
  353. package/dist/papierjs/p-fe89ec34.entry.js.map +1 -0
  354. package/dist/papierjs/{p-af95fe7c.js → p-fjnyWEDB.js} +236 -236
  355. package/dist/papierjs/p-fjnyWEDB.js.map +1 -0
  356. package/dist/papierjs/p-icon.entry.esm.js.map +1 -0
  357. package/dist/papierjs/p-input-text.entry.esm.js.map +1 -0
  358. package/dist/papierjs/p-leaf.entry.esm.js.map +1 -0
  359. package/dist/papierjs/p-modal.entry.esm.js.map +1 -0
  360. package/dist/papierjs/p-notification-preview.entry.esm.js.map +1 -0
  361. package/dist/papierjs/p-notification.entry.esm.js.map +1 -0
  362. package/dist/papierjs/p-progress-bar.entry.esm.js.map +1 -0
  363. package/dist/papierjs/p-slider.entry.esm.js.map +1 -0
  364. package/dist/papierjs/p-spinner.entry.esm.js.map +1 -0
  365. package/dist/papierjs/p-switch-tile.entry.esm.js.map +1 -0
  366. package/dist/papierjs/p-switch.entry.esm.js.map +1 -0
  367. package/dist/papierjs/p-tab.entry.esm.js.map +1 -0
  368. package/dist/papierjs/p-tabs.entry.esm.js.map +1 -0
  369. package/dist/papierjs/p-tooltip.entry.esm.js.map +1 -0
  370. package/dist/papierjs/papierjs.esm.js +1 -1
  371. package/dist/papierjs/papierjs.esm.js.map +1 -1
  372. package/dist/types/components/breadcrumb/{breadcrumb/breadcrumb.d.ts → p-breadcrumb/p-breadcrumb.d.ts} +1 -1
  373. package/dist/types/components/breadcrumb/{breadcrumb-item/breadcrumb-item.d.ts → p-breadcrumb-item/p-breadcrumb-item.d.ts} +1 -1
  374. package/dist/types/components/dropdown/{dropdown/dropdown.d.ts → p-dropdown/p-dropdown.d.ts} +1 -1
  375. package/dist/types/components/dropdown/{dropdown-item/dropdown-item.d.ts → p-dropdown-item/p-dropdown-item.d.ts} +1 -1
  376. package/dist/types/components/form/{input-text → p-input-text}/input-text.d.ts +1 -1
  377. package/dist/types/components/form/{slider → p-slider}/sliders.d.ts +1 -1
  378. package/dist/types/components/form/{switch-tile → p-switch-tile}/switch-tile.d.ts +1 -1
  379. package/dist/types/components/notification/p-notification-handler/stories/p-notification-preview.d.ts +1 -1
  380. package/dist/types/components/{alert/alert.d.ts → p-alert/p-alert.d.ts} +4 -1
  381. package/dist/types/components/{badge/badge.d.ts → p-badge/p-badge.d.ts} +1 -1
  382. package/dist/types/components/{button/button.d.ts → p-button/p-button.d.ts} +1 -1
  383. package/dist/types/components/p-card/p-card.d.ts +20 -0
  384. package/dist/types/components/{leaf/leaf.d.ts → p-leaf/p-leaf.d.ts} +4 -1
  385. package/dist/types/components/{progress-bar/progress-bar.d.ts → p-progress-bar/p-progress-bar.d.ts} +1 -1
  386. package/dist/types/components/tabs/{tabs/tabs.d.ts → p-tabs/p-tabs.d.ts} +1 -1
  387. package/dist/types/components.d.ts +381 -28
  388. package/dist/types/stencil-public-runtime.d.ts +35 -6
  389. package/package.json +13 -16
  390. package/readme.md +3 -4
  391. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  392. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  393. package/dist/cjs/feather-327577a0.js +0 -2404
  394. package/dist/cjs/feather-327577a0.js.map +0 -1
  395. package/dist/cjs/index-e53c626b.js.map +0 -1
  396. package/dist/cjs/p-button_3.cjs.entry.js +0 -164
  397. package/dist/cjs/p-button_3.cjs.entry.js.map +0 -1
  398. package/dist/cjs/p-dropdown-preview.cjs.entry.js +0 -34
  399. package/dist/cjs/p-dropdown-preview.cjs.entry.js.map +0 -1
  400. package/dist/cjs/p-modal-preview.cjs.entry.js +0 -30
  401. package/dist/cjs/p-modal-preview.cjs.entry.js.map +0 -1
  402. package/dist/cjs/p-notification-handler.cjs.entry.js +0 -57
  403. package/dist/cjs/p-notification-handler.cjs.entry.js.map +0 -1
  404. package/dist/collection/components/accordion/accordion.js.map +0 -1
  405. package/dist/collection/components/alert/alert.js.map +0 -1
  406. package/dist/collection/components/alert/stories/alert.stories.js +0 -46
  407. package/dist/collection/components/badge/badge.js.map +0 -1
  408. package/dist/collection/components/badge/stories/badge.stories.js +0 -45
  409. package/dist/collection/components/breadcrumb/breadcrumb/breadcrumb.js.map +0 -1
  410. package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js.map +0 -1
  411. package/dist/collection/components/button/button.js.map +0 -1
  412. package/dist/collection/components/button/stories/button.stories.js +0 -53
  413. package/dist/collection/components/dropdown/dropdown/dropdown.js.map +0 -1
  414. package/dist/collection/components/dropdown/dropdown/stories/dropdown-playground.stories.js +0 -73
  415. package/dist/collection/components/dropdown/dropdown/stories/dropdown.preview.js +0 -32
  416. package/dist/collection/components/dropdown/dropdown/stories/dropdown.preview.js.map +0 -1
  417. package/dist/collection/components/dropdown/dropdown-item/dropdown-item.js.map +0 -1
  418. package/dist/collection/components/form/input-text/input-text.js.map +0 -1
  419. package/dist/collection/components/form/slider/sliders.js.map +0 -1
  420. package/dist/collection/components/form/slider/sliders.preview.js.map +0 -1
  421. package/dist/collection/components/form/slider/stories/switch.stories.js +0 -33
  422. package/dist/collection/components/form/switch/stories/switch.stories.js +0 -50
  423. package/dist/collection/components/form/switch/switch.js.map +0 -1
  424. package/dist/collection/components/form/switch-tile/stories/switch-tile.stories.js +0 -57
  425. package/dist/collection/components/form/switch-tile/switch-tile.js.map +0 -1
  426. package/dist/collection/components/leaf/leaf.js.map +0 -1
  427. package/dist/collection/components/modal/modal.js.map +0 -1
  428. package/dist/collection/components/modal/modal.preview.js +0 -26
  429. package/dist/collection/components/modal/modal.preview.js.map +0 -1
  430. package/dist/collection/components/modal/stories/modal.preview.js +0 -46
  431. package/dist/collection/components/modal/stories/modal.preview.js.map +0 -1
  432. package/dist/collection/components/p-icon/stories/p-icon-playground.stories.js +0 -34
  433. package/dist/collection/components/p-spinner/stories/p-spinner-playground.stories.js +0 -27
  434. package/dist/collection/components/progress-bar/progress-bar.js.map +0 -1
  435. package/dist/collection/components/progress-bar/stories/progress-bar.preview.js.map +0 -1
  436. package/dist/collection/components/progress-bar/stories/progress-bar.stories.js +0 -78
  437. package/dist/collection/components/tabs/tab/tab.js.map +0 -1
  438. package/dist/collection/components/tabs/tabs/tabs.js.map +0 -1
  439. package/dist/collection/components/tooltip/stories/tooltip.stories.js +0 -31
  440. package/dist/collection/components/tooltip/tooltip.js.map +0 -1
  441. package/dist/components/p-34faf3f1.js.map +0 -1
  442. package/dist/components/p-642f2cf7.js.map +0 -1
  443. package/dist/components/p-a714a956.js +0 -53
  444. package/dist/components/p-a714a956.js.map +0 -1
  445. package/dist/components/p-a900d6a8.js.map +0 -1
  446. package/dist/components/p-af95fe7c.js +0 -2402
  447. package/dist/components/p-af95fe7c.js.map +0 -1
  448. package/dist/components/p-c65086ec.js +0 -1485
  449. package/dist/components/p-c65086ec.js.map +0 -1
  450. package/dist/components/p-dropdown-preview.d.ts +0 -11
  451. package/dist/components/p-dropdown-preview.js +0 -81
  452. package/dist/components/p-dropdown-preview.js.map +0 -1
  453. package/dist/components/p-ef0c3ae9.js.map +0 -1
  454. package/dist/components/p-f4386040.js +0 -87
  455. package/dist/components/p-f4386040.js.map +0 -1
  456. package/dist/components/p-fe923a22.js +0 -102
  457. package/dist/components/p-fe923a22.js.map +0 -1
  458. package/dist/components/p-modal-preview.js +0 -64
  459. package/dist/components/p-modal-preview.js.map +0 -1
  460. package/dist/esm/app-globals-0f993ce5.js +0 -5
  461. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  462. package/dist/esm/feather-7e88a94b.js +0 -2402
  463. package/dist/esm/feather-7e88a94b.js.map +0 -1
  464. package/dist/esm/index-aee2eada.js.map +0 -1
  465. package/dist/esm/p-button_3.entry.js +0 -158
  466. package/dist/esm/p-button_3.entry.js.map +0 -1
  467. package/dist/esm/p-dropdown-preview.entry.js +0 -30
  468. package/dist/esm/p-dropdown-preview.entry.js.map +0 -1
  469. package/dist/esm/p-modal-preview.entry.js +0 -26
  470. package/dist/esm/p-modal-preview.entry.js.map +0 -1
  471. package/dist/esm/p-notification-handler.entry.js.map +0 -1
  472. package/dist/papierjs/p-03a16f60.entry.js.map +0 -1
  473. package/dist/papierjs/p-06d54935.entry.js.map +0 -1
  474. package/dist/papierjs/p-08aac893.entry.js +0 -2
  475. package/dist/papierjs/p-08aac893.entry.js.map +0 -1
  476. package/dist/papierjs/p-0c87229d.entry.js.map +0 -1
  477. package/dist/papierjs/p-1ebff2d7.entry.js +0 -2
  478. package/dist/papierjs/p-1ebff2d7.entry.js.map +0 -1
  479. package/dist/papierjs/p-23b08b62.entry.js.map +0 -1
  480. package/dist/papierjs/p-2cb3923f.entry.js +0 -2
  481. package/dist/papierjs/p-2cb3923f.entry.js.map +0 -1
  482. package/dist/papierjs/p-3c06fffc.entry.js.map +0 -1
  483. package/dist/papierjs/p-3efab78f.entry.js.map +0 -1
  484. package/dist/papierjs/p-462779ed.entry.js.map +0 -1
  485. package/dist/papierjs/p-4cb8bb30.js +0 -3
  486. package/dist/papierjs/p-4cb8bb30.js.map +0 -1
  487. package/dist/papierjs/p-5a6898e8.entry.js.map +0 -1
  488. package/dist/papierjs/p-5c511196.entry.js.map +0 -1
  489. package/dist/papierjs/p-7d32bcf0.entry.js.map +0 -1
  490. package/dist/papierjs/p-83c4843a.entry.js.map +0 -1
  491. package/dist/papierjs/p-860525ed.entry.js.map +0 -1
  492. package/dist/papierjs/p-907ecded.entry.js.map +0 -1
  493. package/dist/papierjs/p-9b8dfa28.entry.js.map +0 -1
  494. package/dist/papierjs/p-af95fe7c.js.map +0 -1
  495. package/dist/papierjs/p-b292b138.entry.js.map +0 -1
  496. package/dist/papierjs/p-b3f595fd.entry.js.map +0 -1
  497. package/dist/papierjs/p-b8b2a5c8.entry.js +0 -2
  498. package/dist/papierjs/p-b8b2a5c8.entry.js.map +0 -1
  499. package/dist/papierjs/p-c2d59e17.entry.js.map +0 -1
  500. package/dist/papierjs/p-cce903e9.entry.js.map +0 -1
  501. package/dist/papierjs/p-d9e2e92c.entry.js.map +0 -1
  502. package/dist/papierjs/p-e1255160.js +0 -2
  503. package/dist/papierjs/p-e1255160.js.map +0 -1
  504. package/dist/types/components/dropdown/dropdown/stories/dropdown.preview.d.ts +0 -9
  505. package/dist/types/components/modal/modal.preview.d.ts +0 -1
  506. package/dist/types/components/modal/stories/modal.preview.d.ts +0 -7
  507. package/loader/package.json +0 -11
  508. /package/dist/collection/components/dropdown/{dropdown/dropdown.css → p-dropdown/p-dropdown.css} +0 -0
  509. /package/dist/collection/components/form/{input-text → p-input-text}/input-text.css +0 -0
  510. /package/dist/collection/components/form/{slider → p-slider}/slider.css +0 -0
  511. /package/dist/collection/components/form/{slider → p-slider}/sliders.preview.js +0 -0
  512. /package/dist/collection/components/form/{switch → p-switch}/switch.css +0 -0
  513. /package/dist/collection/components/form/{switch-tile → p-switch-tile}/switch-tile.css +0 -0
  514. /package/dist/collection/components/{accordion/accordion.css → p-accordion/p-accordion.css} +0 -0
  515. /package/dist/collection/components/{alert/alert.css → p-alert/p-alert.css} +0 -0
  516. /package/dist/collection/components/{badge/badge.css → p-badge/p-badge.css} +0 -0
  517. /package/dist/collection/components/{button/button.css → p-button/p-button.css} +0 -0
  518. /package/dist/collection/components/{leaf/leaf.css → p-leaf/p-leaf.css} +0 -0
  519. /package/dist/collection/components/{modal/modal.css → p-modal/p-modal.css} +0 -0
  520. /package/dist/collection/components/{progress-bar/progress-bar.css → p-progress-bar/p-progress-bar.css} +0 -0
  521. /package/dist/collection/components/{progress-bar → p-progress-bar}/stories/progress-bar.preview.js +0 -0
  522. /package/dist/collection/components/{tooltip/tooltip.css → p-tooltip/p-tooltip.css} +0 -0
  523. /package/dist/collection/components/tabs/{tabs/tabs.css → p-tabs/p-tabs.css} +0 -0
  524. /package/dist/types/components/form/{slider → p-slider}/sliders.preview.d.ts +0 -0
  525. /package/dist/types/components/form/{switch → p-switch}/switch.d.ts +0 -0
  526. /package/dist/types/components/{accordion/accordion.d.ts → p-accordion/p-accordion.d.ts} +0 -0
  527. /package/dist/types/components/{modal/modal.d.ts → p-modal/p-modal.d.ts} +0 -0
  528. /package/dist/types/components/{progress-bar → p-progress-bar}/stories/progress-bar.preview.d.ts +0 -0
  529. /package/dist/types/components/{tooltip/tooltip.d.ts → p-tooltip/p-tooltip.d.ts} +0 -0
  530. /package/dist/types/components/tabs/{tab/tab.d.ts → p-tab/p-tab.d.ts} +0 -0
@@ -1,3 +1,1598 @@
1
- export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-c65086ec.js';
1
+ const NAMESPACE = 'papierjs';
2
+ const BUILD = /* papierjs */ { hydratedSelectorName: "hydrated", lazyLoad: false, slotRelocation: true, updatable: true, watchCallback: false };
3
+
4
+ /*
5
+ Stencil Client Platform v4.35.3 | MIT Licensed | https://stenciljs.com
6
+ */
7
+ var __defProp = Object.defineProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+
13
+ // src/utils/constants.ts
14
+ var SVG_NS = "http://www.w3.org/2000/svg";
15
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
16
+
17
+ // src/client/client-host-ref.ts
18
+ var getHostRef = (ref) => {
19
+ if (ref.__stencil__getHostRef) {
20
+ return ref.__stencil__getHostRef();
21
+ }
22
+ return void 0;
23
+ };
24
+ var registerHost = (hostElement, cmpMeta) => {
25
+ const hostRef = {
26
+ $flags$: 0,
27
+ $hostElement$: hostElement,
28
+ $cmpMeta$: cmpMeta,
29
+ $instanceValues$: /* @__PURE__ */ new Map()
30
+ };
31
+ {
32
+ hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
33
+ hostElement["s-p"] = [];
34
+ hostElement["s-rc"] = [];
35
+ }
36
+ const ref = hostRef;
37
+ hostElement.__stencil__getHostRef = () => ref;
38
+ return ref;
39
+ };
40
+ var isMemberInElement = (elm, memberName) => memberName in elm;
41
+ var consoleError = (e, el) => (0, console.error)(e, el);
42
+
43
+ // src/client/client-style.ts
44
+ var styles = /* @__PURE__ */ new Map();
45
+ var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
46
+ var win = typeof window !== "undefined" ? window : {};
47
+ var H = win.HTMLElement || class {
48
+ };
49
+ var plt = {
50
+ $flags$: 0,
51
+ $resourcesUrl$: "",
52
+ jmp: (h2) => h2(),
53
+ raf: (h2) => requestAnimationFrame(h2),
54
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
55
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
56
+ ce: (eventName, opts) => new CustomEvent(eventName, opts)
57
+ };
58
+ var supportsListenerOptions = /* @__PURE__ */ (() => {
59
+ var _a;
60
+ let supportsListenerOptions2 = false;
61
+ try {
62
+ (_a = win.document) == null ? void 0 : _a.addEventListener(
63
+ "e",
64
+ null,
65
+ Object.defineProperty({}, "passive", {
66
+ get() {
67
+ supportsListenerOptions2 = true;
68
+ }
69
+ })
70
+ );
71
+ } catch (e) {
72
+ }
73
+ return supportsListenerOptions2;
74
+ })();
75
+ var promiseResolve = (v) => Promise.resolve(v);
76
+ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
77
+ try {
78
+ new CSSStyleSheet();
79
+ return typeof new CSSStyleSheet().replaceSync === "function";
80
+ } catch (e) {
81
+ }
82
+ return false;
83
+ })() ;
84
+ var queuePending = false;
85
+ var queueDomReads = [];
86
+ var queueDomWrites = [];
87
+ var queueTask = (queue, write) => (cb) => {
88
+ queue.push(cb);
89
+ if (!queuePending) {
90
+ queuePending = true;
91
+ if (write && plt.$flags$ & 4 /* queueSync */) {
92
+ nextTick(flush);
93
+ } else {
94
+ plt.raf(flush);
95
+ }
96
+ }
97
+ };
98
+ var consume = (queue) => {
99
+ for (let i2 = 0; i2 < queue.length; i2++) {
100
+ try {
101
+ queue[i2](performance.now());
102
+ } catch (e) {
103
+ consoleError(e);
104
+ }
105
+ }
106
+ queue.length = 0;
107
+ };
108
+ var flush = () => {
109
+ consume(queueDomReads);
110
+ {
111
+ consume(queueDomWrites);
112
+ if (queuePending = queueDomReads.length > 0) {
113
+ plt.raf(flush);
114
+ }
115
+ }
116
+ };
117
+ var nextTick = (cb) => promiseResolve().then(cb);
118
+ var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
119
+
120
+ // src/runtime/asset-path.ts
121
+ var getAssetPath = (path) => {
122
+ const assetUrl = new URL(path, plt.$resourcesUrl$);
123
+ return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
124
+ };
125
+ var setAssetPath = (path) => plt.$resourcesUrl$ = path;
126
+ var isComplexType = (o) => {
127
+ o = typeof o;
128
+ return o === "object" || o === "function";
129
+ };
130
+
131
+ // src/utils/query-nonce-meta-tag-content.ts
132
+ function queryNonceMetaTagContent(doc) {
133
+ var _a, _b, _c;
134
+ return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
135
+ }
136
+
137
+ // src/utils/regular-expression.ts
138
+ var escapeRegExpSpecialCharacters = (text) => {
139
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
140
+ };
141
+
142
+ // src/utils/result.ts
143
+ var result_exports = {};
144
+ __export(result_exports, {
145
+ err: () => err,
146
+ map: () => map,
147
+ ok: () => ok,
148
+ unwrap: () => unwrap,
149
+ unwrapErr: () => unwrapErr
150
+ });
151
+ var ok = (value) => ({
152
+ isOk: true,
153
+ isErr: false,
154
+ value
155
+ });
156
+ var err = (value) => ({
157
+ isOk: false,
158
+ isErr: true,
159
+ value
160
+ });
161
+ function map(result, fn) {
162
+ if (result.isOk) {
163
+ const val = fn(result.value);
164
+ if (val instanceof Promise) {
165
+ return val.then((newVal) => ok(newVal));
166
+ } else {
167
+ return ok(val);
168
+ }
169
+ }
170
+ if (result.isErr) {
171
+ const value = result.value;
172
+ return err(value);
173
+ }
174
+ throw "should never get here";
175
+ }
176
+ var unwrap = (result) => {
177
+ if (result.isOk) {
178
+ return result.value;
179
+ } else {
180
+ throw result.value;
181
+ }
182
+ };
183
+ var unwrapErr = (result) => {
184
+ if (result.isErr) {
185
+ return result.value;
186
+ } else {
187
+ throw result.value;
188
+ }
189
+ };
190
+
191
+ // src/utils/style.ts
192
+ function createStyleSheetIfNeededAndSupported(styles2) {
193
+ return void 0;
194
+ }
195
+
196
+ // src/utils/shadow-root.ts
197
+ var globalStyleSheet;
198
+ function createShadowRoot(cmpMeta) {
199
+ var _a;
200
+ const shadowRoot = this.attachShadow({ mode: "open" });
201
+ if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
202
+ if (globalStyleSheet) shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
203
+ }
204
+ var updateFallbackSlotVisibility = (elm) => {
205
+ const childNodes = internalCall(elm, "childNodes");
206
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
207
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
208
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
209
+ if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
210
+ slotNode.hidden = true;
211
+ } else {
212
+ slotNode.hidden = false;
213
+ }
214
+ }
215
+ });
216
+ }
217
+ let i2 = 0;
218
+ for (i2 = 0; i2 < childNodes.length; i2++) {
219
+ const childNode = childNodes[i2];
220
+ if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
221
+ updateFallbackSlotVisibility(childNode);
222
+ }
223
+ }
224
+ };
225
+ var getSlottedChildNodes = (childNodes) => {
226
+ const result = [];
227
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
228
+ const slottedNode = childNodes[i2]["s-nr"] || void 0;
229
+ if (slottedNode && slottedNode.isConnected) {
230
+ result.push(slottedNode);
231
+ }
232
+ }
233
+ return result;
234
+ };
235
+ function getHostSlotNodes(childNodes, hostName, slotName) {
236
+ let i2 = 0;
237
+ let slottedNodes = [];
238
+ let childNode;
239
+ for (; i2 < childNodes.length; i2++) {
240
+ childNode = childNodes[i2];
241
+ if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
242
+ slottedNodes.push(childNode);
243
+ }
244
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
245
+ }
246
+ return slottedNodes;
247
+ }
248
+ var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
249
+ const childNodes = [];
250
+ if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
251
+ let node = slot;
252
+ while (node = node.nextSibling) {
253
+ if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
254
+ }
255
+ return childNodes;
256
+ };
257
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
258
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
259
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
260
+ return true;
261
+ }
262
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
263
+ return true;
264
+ }
265
+ return false;
266
+ }
267
+ if (nodeToRelocate["s-sn"] === slotName) {
268
+ return true;
269
+ }
270
+ return slotName === "";
271
+ };
272
+ var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
273
+ function patchSlotNode(node) {
274
+ if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
275
+ const assignedFactory = (elementsOnly) => (function(opts) {
276
+ const toReturn = [];
277
+ const slotName = this["s-sn"];
278
+ if (opts == null ? void 0 : opts.flatten) {
279
+ console.error(`
280
+ Flattening is not supported for Stencil non-shadow slots.
281
+ You can use \`.childNodes\` to nested slot fallback content.
282
+ If you have a particular use case, please open an issue on the Stencil repo.
283
+ `);
284
+ }
285
+ const parent = this["s-cr"].parentElement;
286
+ const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
287
+ slottedNodes.forEach((n) => {
288
+ if (slotName === getSlotName(n)) {
289
+ toReturn.push(n);
290
+ }
291
+ });
292
+ if (elementsOnly) {
293
+ return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
294
+ }
295
+ return toReturn;
296
+ }).bind(node);
297
+ node.assignedElements = assignedFactory(true);
298
+ node.assignedNodes = assignedFactory(false);
299
+ }
300
+ function internalCall(node, method) {
301
+ if ("__" + method in node) {
302
+ const toReturn = node["__" + method];
303
+ if (typeof toReturn !== "function") return toReturn;
304
+ return toReturn.bind(node);
305
+ } else {
306
+ if (typeof node[method] !== "function") return node[method];
307
+ return node[method].bind(node);
308
+ }
309
+ }
310
+ var createTime = (fnName, tagName = "") => {
311
+ {
312
+ return () => {
313
+ return;
314
+ };
315
+ }
316
+ };
317
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
318
+ var registerStyle = (scopeId2, cssText, allowCS) => {
319
+ let style = styles.get(scopeId2);
320
+ if (supportsConstructableStylesheets && allowCS) {
321
+ style = style || new CSSStyleSheet();
322
+ if (typeof style === "string") {
323
+ style = cssText;
324
+ } else {
325
+ style.replaceSync(cssText);
326
+ }
327
+ } else {
328
+ style = cssText;
329
+ }
330
+ styles.set(scopeId2, style);
331
+ };
332
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
333
+ var _a;
334
+ const scopeId2 = getScopeId(cmpMeta);
335
+ const style = styles.get(scopeId2);
336
+ if (!win.document) {
337
+ return scopeId2;
338
+ }
339
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
340
+ if (style) {
341
+ if (typeof style === "string") {
342
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
343
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
344
+ let styleElm;
345
+ if (!appliedStyles) {
346
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
347
+ }
348
+ if (!appliedStyles.has(scopeId2)) {
349
+ {
350
+ styleElm = win.document.createElement("style");
351
+ styleElm.innerHTML = style;
352
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
353
+ if (nonce != null) {
354
+ styleElm.setAttribute("nonce", nonce);
355
+ }
356
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
357
+ if (styleContainerNode.nodeName === "HEAD") {
358
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
359
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
360
+ styleContainerNode.insertBefore(
361
+ styleElm,
362
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
363
+ );
364
+ } else if ("host" in styleContainerNode) {
365
+ if (supportsConstructableStylesheets) {
366
+ const stylesheet = new CSSStyleSheet();
367
+ stylesheet.replaceSync(style);
368
+ styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
369
+ } else {
370
+ const existingStyleContainer = styleContainerNode.querySelector("style");
371
+ if (existingStyleContainer) {
372
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
373
+ } else {
374
+ styleContainerNode.prepend(styleElm);
375
+ }
376
+ }
377
+ } else {
378
+ styleContainerNode.append(styleElm);
379
+ }
380
+ }
381
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
382
+ styleContainerNode.insertBefore(styleElm, null);
383
+ }
384
+ }
385
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
386
+ styleElm.innerHTML += SLOT_FB_CSS;
387
+ }
388
+ if (appliedStyles) {
389
+ appliedStyles.add(scopeId2);
390
+ }
391
+ }
392
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
393
+ styleContainerNode.adoptedStyleSheets.push(style);
394
+ }
395
+ }
396
+ return scopeId2;
397
+ };
398
+ var attachStyles = (hostRef) => {
399
+ const cmpMeta = hostRef.$cmpMeta$;
400
+ const elm = hostRef.$hostElement$;
401
+ const flags = cmpMeta.$flags$;
402
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
403
+ const scopeId2 = addStyle(
404
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
405
+ cmpMeta);
406
+ if (flags & 10 /* needsScopedEncapsulation */) {
407
+ elm["s-sc"] = scopeId2;
408
+ elm.classList.add(scopeId2 + "-h");
409
+ }
410
+ endAttachStyles();
411
+ };
412
+ var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
413
+ var h = (nodeName, vnodeData, ...children) => {
414
+ let child = null;
415
+ let key = null;
416
+ let slotName = null;
417
+ let simple = false;
418
+ let lastSimple = false;
419
+ const vNodeChildren = [];
420
+ const walk = (c) => {
421
+ for (let i2 = 0; i2 < c.length; i2++) {
422
+ child = c[i2];
423
+ if (Array.isArray(child)) {
424
+ walk(child);
425
+ } else if (child != null && typeof child !== "boolean") {
426
+ if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
427
+ child = String(child);
428
+ }
429
+ if (simple && lastSimple) {
430
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
431
+ } else {
432
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
433
+ }
434
+ lastSimple = simple;
435
+ }
436
+ }
437
+ };
438
+ walk(children);
439
+ if (vnodeData) {
440
+ if (vnodeData.key) {
441
+ key = vnodeData.key;
442
+ }
443
+ if (vnodeData.name) {
444
+ slotName = vnodeData.name;
445
+ }
446
+ {
447
+ const classData = vnodeData.className || vnodeData.class;
448
+ if (classData) {
449
+ vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
450
+ }
451
+ }
452
+ }
453
+ const vnode = newVNode(nodeName, null);
454
+ vnode.$attrs$ = vnodeData;
455
+ if (vNodeChildren.length > 0) {
456
+ vnode.$children$ = vNodeChildren;
457
+ }
458
+ {
459
+ vnode.$key$ = key;
460
+ }
461
+ {
462
+ vnode.$name$ = slotName;
463
+ }
464
+ return vnode;
465
+ };
466
+ var newVNode = (tag, text) => {
467
+ const vnode = {
468
+ $flags$: 0,
469
+ $tag$: tag,
470
+ $text$: text,
471
+ $elm$: null,
472
+ $children$: null
473
+ };
474
+ {
475
+ vnode.$attrs$ = null;
476
+ }
477
+ {
478
+ vnode.$key$ = null;
479
+ }
480
+ {
481
+ vnode.$name$ = null;
482
+ }
483
+ return vnode;
484
+ };
485
+ var Host = {};
486
+ var isHost = (node) => node && node.$tag$ === Host;
487
+ var createSupportsRuleRe = (selector) => {
488
+ const safeSelector2 = escapeRegExpSpecialCharacters(selector);
489
+ return new RegExp(
490
+ // First capture group: match any context before the selector that's not inside @supports selector()
491
+ // Using negative lookahead to avoid matching inside @supports selector(...) condition
492
+ `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
493
+ "g"
494
+ );
495
+ };
496
+ createSupportsRuleRe("::slotted");
497
+ createSupportsRuleRe(":host");
498
+ createSupportsRuleRe(":host-context");
499
+ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
500
+ if (propValue != null && !isComplexType(propValue)) {
501
+ if (propType & 4 /* Boolean */) {
502
+ {
503
+ return propValue === "false" ? false : propValue === "" || !!propValue;
504
+ }
505
+ }
506
+ if (propType & 2 /* Number */) {
507
+ return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
508
+ }
509
+ if (propType & 1 /* String */) {
510
+ return String(propValue);
511
+ }
512
+ return propValue;
513
+ }
514
+ return propValue;
515
+ };
516
+ var getElement = (ref) => ref;
517
+
518
+ // src/runtime/event-emitter.ts
519
+ var createEvent = (ref, name, flags) => {
520
+ const elm = getElement(ref);
521
+ return {
522
+ emit: (detail) => {
523
+ return emitEvent(elm, name, {
524
+ bubbles: true,
525
+ composed: true,
526
+ cancelable: true,
527
+ detail
528
+ });
529
+ }
530
+ };
531
+ };
532
+ var emitEvent = (elm, name, opts) => {
533
+ const ev = plt.ce(name, opts);
534
+ elm.dispatchEvent(ev);
535
+ return ev;
536
+ };
537
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
538
+ if (oldValue === newValue) {
539
+ return;
540
+ }
541
+ let isProp = isMemberInElement(elm, memberName);
542
+ let ln = memberName.toLowerCase();
543
+ if (memberName === "class") {
544
+ const classList = elm.classList;
545
+ const oldClasses = parseClassList(oldValue);
546
+ let newClasses = parseClassList(newValue);
547
+ {
548
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
549
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
550
+ }
551
+ } else if (memberName === "style") {
552
+ {
553
+ for (const prop in oldValue) {
554
+ if (!newValue || newValue[prop] == null) {
555
+ if (prop.includes("-")) {
556
+ elm.style.removeProperty(prop);
557
+ } else {
558
+ elm.style[prop] = "";
559
+ }
560
+ }
561
+ }
562
+ }
563
+ for (const prop in newValue) {
564
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
565
+ if (prop.includes("-")) {
566
+ elm.style.setProperty(prop, newValue[prop]);
567
+ } else {
568
+ elm.style[prop] = newValue[prop];
569
+ }
570
+ }
571
+ }
572
+ } else if (memberName === "key") ; else if ((!elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
573
+ if (memberName[2] === "-") {
574
+ memberName = memberName.slice(3);
575
+ } else if (isMemberInElement(win, ln)) {
576
+ memberName = ln.slice(2);
577
+ } else {
578
+ memberName = ln[2] + memberName.slice(3);
579
+ }
580
+ if (oldValue || newValue) {
581
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
582
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
583
+ if (oldValue) {
584
+ plt.rel(elm, memberName, oldValue, capture);
585
+ }
586
+ if (newValue) {
587
+ plt.ael(elm, memberName, newValue, capture);
588
+ }
589
+ }
590
+ } else {
591
+ const isComplex = isComplexType(newValue);
592
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
593
+ try {
594
+ if (!elm.tagName.includes("-")) {
595
+ const n = newValue == null ? "" : newValue;
596
+ if (memberName === "list") {
597
+ isProp = false;
598
+ } else if (oldValue == null || elm[memberName] != n) {
599
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
600
+ elm[memberName] = n;
601
+ } else {
602
+ elm.setAttribute(memberName, n);
603
+ }
604
+ }
605
+ } else if (elm[memberName] !== newValue) {
606
+ elm[memberName] = newValue;
607
+ }
608
+ } catch (e) {
609
+ }
610
+ }
611
+ if (newValue == null || newValue === false) {
612
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
613
+ {
614
+ elm.removeAttribute(memberName);
615
+ }
616
+ }
617
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
618
+ newValue = newValue === true ? "" : newValue;
619
+ {
620
+ elm.setAttribute(memberName, newValue);
621
+ }
622
+ }
623
+ }
624
+ };
625
+ var parseClassListRegex = /\s/;
626
+ var parseClassList = (value) => {
627
+ if (typeof value === "object" && value && "baseVal" in value) {
628
+ value = value.baseVal;
629
+ }
630
+ if (!value || typeof value !== "string") {
631
+ return [];
632
+ }
633
+ return value.split(parseClassListRegex);
634
+ };
635
+ var CAPTURE_EVENT_SUFFIX = "Capture";
636
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
637
+
638
+ // src/runtime/vdom/update-element.ts
639
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
640
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
641
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
642
+ const newVnodeAttrs = newVnode.$attrs$ || {};
643
+ {
644
+ for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
645
+ if (!(memberName in newVnodeAttrs)) {
646
+ setAccessor(
647
+ elm,
648
+ memberName,
649
+ oldVnodeAttrs[memberName],
650
+ void 0,
651
+ isSvgMode2,
652
+ newVnode.$flags$);
653
+ }
654
+ }
655
+ }
656
+ for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
657
+ setAccessor(
658
+ elm,
659
+ memberName,
660
+ oldVnodeAttrs[memberName],
661
+ newVnodeAttrs[memberName],
662
+ isSvgMode2,
663
+ newVnode.$flags$);
664
+ }
665
+ };
666
+ function sortedAttrNames(attrNames) {
667
+ return attrNames.includes("ref") ? (
668
+ // we need to sort these to ensure that `'ref'` is the last attr
669
+ [...attrNames.filter((attr) => attr !== "ref"), "ref"]
670
+ ) : (
671
+ // no need to sort, return the original array
672
+ attrNames
673
+ );
674
+ }
675
+ var contentRef;
676
+ var hostTagName;
677
+ var useNativeShadowDom = false;
678
+ var checkSlotFallbackVisibility = false;
679
+ var checkSlotRelocate = false;
680
+ var isSvgMode = false;
681
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
682
+ var _a;
683
+ const newVNode2 = newParentVNode.$children$[childIndex];
684
+ let i2 = 0;
685
+ let elm;
686
+ let childNode;
687
+ let oldVNode;
688
+ if (!useNativeShadowDom) {
689
+ checkSlotRelocate = true;
690
+ if (newVNode2.$tag$ === "slot") {
691
+ newVNode2.$flags$ |= newVNode2.$children$ ? (
692
+ // slot element has fallback content
693
+ // still create an element that "mocks" the slot element
694
+ 2 /* isSlotFallback */
695
+ ) : (
696
+ // slot element does not have fallback content
697
+ // create an html comment we'll use to always reference
698
+ // where actual slot content should sit next to
699
+ 1 /* isSlotReference */
700
+ );
701
+ }
702
+ }
703
+ if (newVNode2.$text$ !== null) {
704
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
705
+ } else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
706
+ elm = newVNode2.$elm$ = win.document.createTextNode("");
707
+ {
708
+ updateElement(null, newVNode2, isSvgMode);
709
+ }
710
+ } else {
711
+ if (!isSvgMode) {
712
+ isSvgMode = newVNode2.$tag$ === "svg";
713
+ }
714
+ if (!win.document) {
715
+ throw new Error(
716
+ "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
717
+ );
718
+ }
719
+ elm = newVNode2.$elm$ = win.document.createElementNS(
720
+ isSvgMode ? SVG_NS : HTML_NS,
721
+ !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
722
+ ) ;
723
+ if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
724
+ isSvgMode = false;
725
+ }
726
+ {
727
+ updateElement(null, newVNode2, isSvgMode);
728
+ }
729
+ if (newVNode2.$children$) {
730
+ for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
731
+ childNode = createElm(oldParentVNode, newVNode2, i2);
732
+ if (childNode) {
733
+ elm.appendChild(childNode);
734
+ }
735
+ }
736
+ }
737
+ {
738
+ if (newVNode2.$tag$ === "svg") {
739
+ isSvgMode = false;
740
+ } else if (elm.tagName === "foreignObject") {
741
+ isSvgMode = true;
742
+ }
743
+ }
744
+ }
745
+ elm["s-hn"] = hostTagName;
746
+ {
747
+ if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
748
+ elm["s-sr"] = true;
749
+ elm["s-cr"] = contentRef;
750
+ elm["s-sn"] = newVNode2.$name$ || "";
751
+ elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
752
+ patchSlotNode(elm);
753
+ oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
754
+ if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
755
+ {
756
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
757
+ }
758
+ }
759
+ }
760
+ }
761
+ return elm;
762
+ };
763
+ var putBackInOriginalLocation = (parentElm, recursive) => {
764
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
765
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
766
+ for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
767
+ const childNode = oldSlotChildNodes[i2];
768
+ if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
769
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
770
+ childNode["s-ol"].remove();
771
+ childNode["s-ol"] = void 0;
772
+ childNode["s-sh"] = void 0;
773
+ checkSlotRelocate = true;
774
+ }
775
+ if (recursive) {
776
+ putBackInOriginalLocation(childNode, recursive);
777
+ }
778
+ }
779
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
780
+ };
781
+ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
782
+ let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
783
+ let childNode;
784
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
785
+ containerElm = containerElm.shadowRoot;
786
+ }
787
+ for (; startIdx <= endIdx; ++startIdx) {
788
+ if (vnodes[startIdx]) {
789
+ childNode = createElm(null, parentVNode, startIdx);
790
+ if (childNode) {
791
+ vnodes[startIdx].$elm$ = childNode;
792
+ insertBefore(containerElm, childNode, referenceNode(before) );
793
+ }
794
+ }
795
+ }
796
+ };
797
+ var removeVnodes = (vnodes, startIdx, endIdx) => {
798
+ for (let index = startIdx; index <= endIdx; ++index) {
799
+ const vnode = vnodes[index];
800
+ if (vnode) {
801
+ const elm = vnode.$elm$;
802
+ if (elm) {
803
+ {
804
+ checkSlotFallbackVisibility = true;
805
+ if (elm["s-ol"]) {
806
+ elm["s-ol"].remove();
807
+ } else {
808
+ putBackInOriginalLocation(elm, true);
809
+ }
810
+ }
811
+ elm.remove();
812
+ }
813
+ }
814
+ }
815
+ };
816
+ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
817
+ let oldStartIdx = 0;
818
+ let newStartIdx = 0;
819
+ let idxInOld = 0;
820
+ let i2 = 0;
821
+ let oldEndIdx = oldCh.length - 1;
822
+ let oldStartVnode = oldCh[0];
823
+ let oldEndVnode = oldCh[oldEndIdx];
824
+ let newEndIdx = newCh.length - 1;
825
+ let newStartVnode = newCh[0];
826
+ let newEndVnode = newCh[newEndIdx];
827
+ let node;
828
+ let elmToMove;
829
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
830
+ if (oldStartVnode == null) {
831
+ oldStartVnode = oldCh[++oldStartIdx];
832
+ } else if (oldEndVnode == null) {
833
+ oldEndVnode = oldCh[--oldEndIdx];
834
+ } else if (newStartVnode == null) {
835
+ newStartVnode = newCh[++newStartIdx];
836
+ } else if (newEndVnode == null) {
837
+ newEndVnode = newCh[--newEndIdx];
838
+ } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
839
+ patch(oldStartVnode, newStartVnode, isInitialRender);
840
+ oldStartVnode = oldCh[++oldStartIdx];
841
+ newStartVnode = newCh[++newStartIdx];
842
+ } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
843
+ patch(oldEndVnode, newEndVnode, isInitialRender);
844
+ oldEndVnode = oldCh[--oldEndIdx];
845
+ newEndVnode = newCh[--newEndIdx];
846
+ } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
847
+ if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
848
+ putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
849
+ }
850
+ patch(oldStartVnode, newEndVnode, isInitialRender);
851
+ insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
852
+ oldStartVnode = oldCh[++oldStartIdx];
853
+ newEndVnode = newCh[--newEndIdx];
854
+ } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
855
+ if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
856
+ putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
857
+ }
858
+ patch(oldEndVnode, newStartVnode, isInitialRender);
859
+ insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
860
+ oldEndVnode = oldCh[--oldEndIdx];
861
+ newStartVnode = newCh[++newStartIdx];
862
+ } else {
863
+ idxInOld = -1;
864
+ {
865
+ for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
866
+ if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
867
+ idxInOld = i2;
868
+ break;
869
+ }
870
+ }
871
+ }
872
+ if (idxInOld >= 0) {
873
+ elmToMove = oldCh[idxInOld];
874
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
875
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
876
+ } else {
877
+ patch(elmToMove, newStartVnode, isInitialRender);
878
+ oldCh[idxInOld] = void 0;
879
+ node = elmToMove.$elm$;
880
+ }
881
+ newStartVnode = newCh[++newStartIdx];
882
+ } else {
883
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
884
+ newStartVnode = newCh[++newStartIdx];
885
+ }
886
+ if (node) {
887
+ {
888
+ insertBefore(
889
+ referenceNode(oldStartVnode.$elm$).parentNode,
890
+ node,
891
+ referenceNode(oldStartVnode.$elm$)
892
+ );
893
+ }
894
+ }
895
+ }
896
+ }
897
+ if (oldStartIdx > oldEndIdx) {
898
+ addVnodes(
899
+ parentElm,
900
+ newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
901
+ newVNode2,
902
+ newCh,
903
+ newStartIdx,
904
+ newEndIdx
905
+ );
906
+ } else if (newStartIdx > newEndIdx) {
907
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
908
+ }
909
+ };
910
+ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
911
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
912
+ if (leftVNode.$tag$ === "slot") {
913
+ return leftVNode.$name$ === rightVNode.$name$;
914
+ }
915
+ if (!isInitialRender) {
916
+ return leftVNode.$key$ === rightVNode.$key$;
917
+ }
918
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
919
+ leftVNode.$key$ = rightVNode.$key$;
920
+ }
921
+ return true;
922
+ }
923
+ return false;
924
+ };
925
+ var referenceNode = (node) => node && node["s-ol"] || node;
926
+ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
927
+ const elm = newVNode2.$elm$ = oldVNode.$elm$;
928
+ const oldChildren = oldVNode.$children$;
929
+ const newChildren = newVNode2.$children$;
930
+ const tag = newVNode2.$tag$;
931
+ const text = newVNode2.$text$;
932
+ let defaultHolder;
933
+ if (text === null) {
934
+ {
935
+ isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
936
+ }
937
+ {
938
+ updateElement(oldVNode, newVNode2, isSvgMode);
939
+ }
940
+ if (oldChildren !== null && newChildren !== null) {
941
+ updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
942
+ } else if (newChildren !== null) {
943
+ if (oldVNode.$text$ !== null) {
944
+ elm.textContent = "";
945
+ }
946
+ addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
947
+ } else if (
948
+ // don't do this on initial render as it can cause non-hydrated content to be removed
949
+ !isInitialRender && BUILD.updatable && oldChildren !== null
950
+ ) {
951
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
952
+ } else ;
953
+ if (isSvgMode && tag === "svg") {
954
+ isSvgMode = false;
955
+ }
956
+ } else if ((defaultHolder = elm["s-cr"])) {
957
+ defaultHolder.parentNode.textContent = text;
958
+ } else if (oldVNode.$text$ !== text) {
959
+ elm.data = text;
960
+ }
961
+ };
962
+ var relocateNodes = [];
963
+ var markSlotContentForRelocation = (elm) => {
964
+ let node;
965
+ let hostContentNodes;
966
+ let j;
967
+ const children = elm.__childNodes || elm.childNodes;
968
+ for (const childNode of children) {
969
+ if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
970
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
971
+ const slotName = childNode["s-sn"];
972
+ for (j = hostContentNodes.length - 1; j >= 0; j--) {
973
+ node = hostContentNodes[j];
974
+ if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (true)) {
975
+ if (isNodeLocatedInSlot(node, slotName)) {
976
+ let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
977
+ checkSlotFallbackVisibility = true;
978
+ node["s-sn"] = node["s-sn"] || slotName;
979
+ if (relocateNodeData) {
980
+ relocateNodeData.$nodeToRelocate$["s-sh"] = childNode["s-hn"];
981
+ relocateNodeData.$slotRefNode$ = childNode;
982
+ } else {
983
+ node["s-sh"] = childNode["s-hn"];
984
+ relocateNodes.push({
985
+ $slotRefNode$: childNode,
986
+ $nodeToRelocate$: node
987
+ });
988
+ }
989
+ if (node["s-sr"]) {
990
+ relocateNodes.map((relocateNode) => {
991
+ if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
992
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
993
+ if (relocateNodeData && !relocateNode.$slotRefNode$) {
994
+ relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
995
+ }
996
+ }
997
+ });
998
+ }
999
+ } else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1000
+ relocateNodes.push({
1001
+ $nodeToRelocate$: node
1002
+ });
1003
+ }
1004
+ }
1005
+ }
1006
+ }
1007
+ if (childNode.nodeType === 1 /* ElementNode */) {
1008
+ markSlotContentForRelocation(childNode);
1009
+ }
1010
+ }
1011
+ };
1012
+ var insertBefore = (parent, newNode, reference) => {
1013
+ {
1014
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1015
+ }
1016
+ };
1017
+ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1018
+ var _a, _b, _c, _d;
1019
+ const hostElm = hostRef.$hostElement$;
1020
+ const cmpMeta = hostRef.$cmpMeta$;
1021
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1022
+ const isHostElement = isHost(renderFnResults);
1023
+ const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
1024
+ hostTagName = hostElm.tagName;
1025
+ if (isInitialLoad && rootVnode.$attrs$) {
1026
+ for (const key of Object.keys(rootVnode.$attrs$)) {
1027
+ if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
1028
+ rootVnode.$attrs$[key] = hostElm[key];
1029
+ }
1030
+ }
1031
+ }
1032
+ rootVnode.$tag$ = null;
1033
+ rootVnode.$flags$ |= 4 /* isHost */;
1034
+ hostRef.$vnode$ = rootVnode;
1035
+ rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
1036
+ useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
1037
+ {
1038
+ contentRef = hostElm["s-cr"];
1039
+ checkSlotFallbackVisibility = false;
1040
+ }
1041
+ patch(oldVNode, rootVnode, isInitialLoad);
1042
+ {
1043
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
1044
+ if (checkSlotRelocate) {
1045
+ markSlotContentForRelocation(rootVnode.$elm$);
1046
+ for (const relocateData of relocateNodes) {
1047
+ const nodeToRelocate = relocateData.$nodeToRelocate$;
1048
+ if (!nodeToRelocate["s-ol"] && win.document) {
1049
+ const orgLocationNode = win.document.createTextNode("");
1050
+ orgLocationNode["s-nr"] = nodeToRelocate;
1051
+ insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1052
+ }
1053
+ }
1054
+ for (const relocateData of relocateNodes) {
1055
+ const nodeToRelocate = relocateData.$nodeToRelocate$;
1056
+ const slotRefNode = relocateData.$slotRefNode$;
1057
+ if (slotRefNode) {
1058
+ const parentNodeRef = slotRefNode.parentNode;
1059
+ let insertBeforeNode = slotRefNode.nextSibling;
1060
+ {
1061
+ let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1062
+ while (orgLocationNode) {
1063
+ let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1064
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1065
+ refNode = refNode.nextSibling;
1066
+ while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1067
+ refNode = refNode == null ? void 0 : refNode.nextSibling;
1068
+ }
1069
+ if (!refNode || !refNode["s-nr"]) {
1070
+ insertBeforeNode = refNode;
1071
+ break;
1072
+ }
1073
+ }
1074
+ orgLocationNode = orgLocationNode.previousSibling;
1075
+ }
1076
+ }
1077
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
1078
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
1079
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1080
+ if (nodeToRelocate !== insertBeforeNode) {
1081
+ if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1082
+ nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
1083
+ }
1084
+ insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1085
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1086
+ nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1087
+ }
1088
+ }
1089
+ }
1090
+ nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
1091
+ } else {
1092
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1093
+ if (isInitialLoad) {
1094
+ nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1095
+ }
1096
+ nodeToRelocate.hidden = true;
1097
+ }
1098
+ }
1099
+ }
1100
+ }
1101
+ if (checkSlotFallbackVisibility) {
1102
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1103
+ }
1104
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
1105
+ relocateNodes.length = 0;
1106
+ }
1107
+ contentRef = void 0;
1108
+ };
1109
+
1110
+ // src/runtime/update-component.ts
1111
+ var attachToAncestor = (hostRef, ancestorComponent) => {
1112
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1113
+ const index = ancestorComponent["s-p"].push(
1114
+ new Promise(
1115
+ (r) => hostRef.$onRenderResolve$ = () => {
1116
+ ancestorComponent["s-p"].splice(index - 1, 1);
1117
+ r();
1118
+ }
1119
+ )
1120
+ );
1121
+ }
1122
+ };
1123
+ var scheduleUpdate = (hostRef, isInitialLoad) => {
1124
+ {
1125
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1126
+ }
1127
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1128
+ hostRef.$flags$ |= 512 /* needsRerender */;
1129
+ return;
1130
+ }
1131
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1132
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1133
+ return writeTask(dispatch) ;
1134
+ };
1135
+ var dispatchHooks = (hostRef, isInitialLoad) => {
1136
+ const elm = hostRef.$hostElement$;
1137
+ const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
1138
+ const instance = elm;
1139
+ if (!instance) {
1140
+ throw new Error(
1141
+ `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`
1142
+ );
1143
+ }
1144
+ let maybePromise;
1145
+ if (isInitialLoad) {
1146
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1147
+ } else {
1148
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1149
+ }
1150
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1151
+ endSchedule();
1152
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1153
+ };
1154
+ var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
1155
+ console.error(err2);
1156
+ fn();
1157
+ }) : fn();
1158
+ var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
1159
+ var updateComponent = async (hostRef, instance, isInitialLoad) => {
1160
+ var _a;
1161
+ const elm = hostRef.$hostElement$;
1162
+ const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
1163
+ const rc = elm["s-rc"];
1164
+ if (isInitialLoad) {
1165
+ attachStyles(hostRef);
1166
+ }
1167
+ const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
1168
+ {
1169
+ callRender(hostRef, instance, elm, isInitialLoad);
1170
+ }
1171
+ if (rc) {
1172
+ rc.map((cb) => cb());
1173
+ elm["s-rc"] = void 0;
1174
+ }
1175
+ endRender();
1176
+ endUpdate();
1177
+ {
1178
+ const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
1179
+ const postUpdate = () => postUpdateComponent(hostRef);
1180
+ if (childrenPromises.length === 0) {
1181
+ postUpdate();
1182
+ } else {
1183
+ Promise.all(childrenPromises).then(postUpdate);
1184
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1185
+ childrenPromises.length = 0;
1186
+ }
1187
+ }
1188
+ };
1189
+ var callRender = (hostRef, instance, elm, isInitialLoad) => {
1190
+ try {
1191
+ instance = instance.render() ;
1192
+ {
1193
+ hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1194
+ }
1195
+ {
1196
+ hostRef.$flags$ |= 2 /* hasRendered */;
1197
+ }
1198
+ {
1199
+ {
1200
+ {
1201
+ renderVdom(hostRef, instance, isInitialLoad);
1202
+ }
1203
+ }
1204
+ }
1205
+ } catch (e) {
1206
+ consoleError(e, hostRef.$hostElement$);
1207
+ }
1208
+ return null;
1209
+ };
1210
+ var postUpdateComponent = (hostRef) => {
1211
+ const tagName = hostRef.$cmpMeta$.$tagName$;
1212
+ const elm = hostRef.$hostElement$;
1213
+ const endPostUpdate = createTime("postUpdate", tagName);
1214
+ const instance = elm;
1215
+ const ancestorComponent = hostRef.$ancestorComponent$;
1216
+ safeCall(instance, "componentDidRender", void 0, elm);
1217
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1218
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1219
+ {
1220
+ addHydratedFlag(elm);
1221
+ }
1222
+ safeCall(instance, "componentDidLoad", void 0, elm);
1223
+ endPostUpdate();
1224
+ {
1225
+ hostRef.$onReadyResolve$(elm);
1226
+ if (!ancestorComponent) {
1227
+ appDidLoad();
1228
+ }
1229
+ }
1230
+ } else {
1231
+ safeCall(instance, "componentDidUpdate", void 0, elm);
1232
+ endPostUpdate();
1233
+ }
1234
+ {
1235
+ if (hostRef.$onRenderResolve$) {
1236
+ hostRef.$onRenderResolve$();
1237
+ hostRef.$onRenderResolve$ = void 0;
1238
+ }
1239
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
1240
+ nextTick(() => scheduleUpdate(hostRef, false));
1241
+ }
1242
+ hostRef.$flags$ &= -517;
1243
+ }
1244
+ };
1245
+ var appDidLoad = (who) => {
1246
+ nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1247
+ };
1248
+ var safeCall = (instance, method, arg, elm) => {
1249
+ if (instance && instance[method]) {
1250
+ try {
1251
+ return instance[method](arg);
1252
+ } catch (e) {
1253
+ consoleError(e, elm);
1254
+ }
1255
+ }
1256
+ return void 0;
1257
+ };
1258
+ var addHydratedFlag = (elm) => {
1259
+ var _a;
1260
+ return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
1261
+ };
1262
+
1263
+ // src/runtime/set-value.ts
1264
+ var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1265
+ var setValue = (ref, propName, newVal, cmpMeta) => {
1266
+ const hostRef = getHostRef(ref);
1267
+ const elm = ref;
1268
+ const oldVal = hostRef.$instanceValues$.get(propName);
1269
+ const flags = hostRef.$flags$;
1270
+ const instance = elm;
1271
+ newVal = parsePropertyValue(
1272
+ newVal,
1273
+ cmpMeta.$members$[propName][0]);
1274
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1275
+ const didValueChange = newVal !== oldVal && !areBothNaN;
1276
+ if (didValueChange) {
1277
+ hostRef.$instanceValues$.set(propName, newVal);
1278
+ {
1279
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1280
+ if (instance.componentShouldUpdate) {
1281
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
1282
+ return;
1283
+ }
1284
+ }
1285
+ scheduleUpdate(hostRef, false);
1286
+ }
1287
+ }
1288
+ }
1289
+ };
1290
+
1291
+ // src/runtime/proxy-component.ts
1292
+ var proxyComponent = (Cstr, cmpMeta, flags) => {
1293
+ var _a, _b;
1294
+ const prototype = Cstr.prototype;
1295
+ if (cmpMeta.$members$ || BUILD.watchCallback) {
1296
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1297
+ members.map(([memberName, [memberFlags]]) => {
1298
+ if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
1299
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1300
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1301
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1302
+ {
1303
+ Object.defineProperty(prototype, memberName, {
1304
+ get() {
1305
+ {
1306
+ return origGetter ? origGetter.apply(this) : getValue(this, memberName);
1307
+ }
1308
+ },
1309
+ configurable: true,
1310
+ enumerable: true
1311
+ });
1312
+ }
1313
+ Object.defineProperty(prototype, memberName, {
1314
+ set(newValue) {
1315
+ const ref = getHostRef(this);
1316
+ if (origSetter) {
1317
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1318
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1319
+ newValue = ref.$instanceValues$.get(memberName);
1320
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1321
+ ref.$instanceValues$.set(memberName, currentValue);
1322
+ }
1323
+ origSetter.apply(this, [
1324
+ parsePropertyValue(
1325
+ newValue,
1326
+ memberFlags)
1327
+ ]);
1328
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1329
+ setValue(this, memberName, newValue, cmpMeta);
1330
+ return;
1331
+ }
1332
+ {
1333
+ setValue(this, memberName, newValue, cmpMeta);
1334
+ return;
1335
+ }
1336
+ }
1337
+ });
1338
+ }
1339
+ });
1340
+ {
1341
+ const attrNameToPropName = /* @__PURE__ */ new Map();
1342
+ prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
1343
+ plt.jmp(() => {
1344
+ var _a2;
1345
+ const propName = attrNameToPropName.get(attrName);
1346
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) ; else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1347
+ this[propName] == newValue) {
1348
+ return;
1349
+ } else if (propName == null) {
1350
+ const hostRef = getHostRef(this);
1351
+ const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1352
+ if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
1353
+ const elm = this;
1354
+ const instance = elm;
1355
+ const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
1356
+ entry == null ? void 0 : entry.forEach((callbackName) => {
1357
+ if (instance[callbackName] != null) {
1358
+ instance[callbackName].call(instance, newValue, oldValue, attrName);
1359
+ }
1360
+ });
1361
+ }
1362
+ return;
1363
+ }
1364
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1365
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1366
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1367
+ this[propName] = newValue;
1368
+ }
1369
+ });
1370
+ };
1371
+ Cstr.observedAttributes = Array.from(
1372
+ /* @__PURE__ */ new Set([
1373
+ ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
1374
+ ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
1375
+ const attrName = m[1] || propName;
1376
+ attrNameToPropName.set(attrName, propName);
1377
+ return attrName;
1378
+ })
1379
+ ])
1380
+ );
1381
+ }
1382
+ }
1383
+ return Cstr;
1384
+ };
1385
+
1386
+ // src/runtime/initialize-component.ts
1387
+ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1388
+ let Cstr;
1389
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1390
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1391
+ {
1392
+ Cstr = elm.constructor;
1393
+ const cmpTag = elm.localName;
1394
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1395
+ }
1396
+ if (Cstr && Cstr.style) {
1397
+ let style;
1398
+ if (typeof Cstr.style === "string") {
1399
+ style = Cstr.style;
1400
+ }
1401
+ const scopeId2 = getScopeId(cmpMeta);
1402
+ if (!styles.has(scopeId2)) {
1403
+ const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1404
+ registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1405
+ endRegisterStyles();
1406
+ }
1407
+ }
1408
+ }
1409
+ const ancestorComponent = hostRef.$ancestorComponent$;
1410
+ const schedule = () => scheduleUpdate(hostRef, true);
1411
+ if (ancestorComponent && ancestorComponent["s-rc"]) {
1412
+ ancestorComponent["s-rc"].push(schedule);
1413
+ } else {
1414
+ schedule();
1415
+ }
1416
+ };
1417
+ var fireConnectedCallback = (instance, elm) => {
1418
+ };
1419
+
1420
+ // src/runtime/connected-callback.ts
1421
+ var connectedCallback = (elm) => {
1422
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1423
+ const hostRef = getHostRef(elm);
1424
+ const cmpMeta = hostRef.$cmpMeta$;
1425
+ const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1426
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1427
+ hostRef.$flags$ |= 1 /* hasConnected */;
1428
+ {
1429
+ if (// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
1430
+ cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
1431
+ setContentReference(elm);
1432
+ }
1433
+ }
1434
+ {
1435
+ let ancestorComponent = elm;
1436
+ while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1437
+ if (ancestorComponent["s-p"]) {
1438
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1439
+ break;
1440
+ }
1441
+ }
1442
+ }
1443
+ if (cmpMeta.$members$) {
1444
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1445
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1446
+ const value = elm[memberName];
1447
+ delete elm[memberName];
1448
+ elm[memberName] = value;
1449
+ }
1450
+ });
1451
+ }
1452
+ if (BUILD.initializeNextTick) {
1453
+ nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
1454
+ } else {
1455
+ initializeComponent(elm, hostRef, cmpMeta);
1456
+ }
1457
+ } else {
1458
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1459
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1460
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1461
+ }
1462
+ }
1463
+ endConnected();
1464
+ }
1465
+ };
1466
+ var setContentReference = (elm) => {
1467
+ if (!win.document) {
1468
+ return;
1469
+ }
1470
+ const contentRefElm = elm["s-cr"] = win.document.createComment(
1471
+ ""
1472
+ );
1473
+ contentRefElm["s-cn"] = true;
1474
+ insertBefore(elm, contentRefElm, elm.firstChild);
1475
+ };
1476
+ var disconnectedCallback = async (elm) => {
1477
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1478
+ const hostRef = getHostRef(elm);
1479
+ {
1480
+ if (hostRef.$rmListeners$) {
1481
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1482
+ hostRef.$rmListeners$ = void 0;
1483
+ }
1484
+ }
1485
+ }
1486
+ if (rootAppliedStyles.has(elm)) {
1487
+ rootAppliedStyles.delete(elm);
1488
+ }
1489
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1490
+ rootAppliedStyles.delete(elm.shadowRoot);
1491
+ }
1492
+ };
1493
+ var proxyCustomElement = (Cstr, compactMeta) => {
1494
+ const cmpMeta = {
1495
+ $flags$: compactMeta[0],
1496
+ $tagName$: compactMeta[1]
1497
+ };
1498
+ {
1499
+ cmpMeta.$members$ = compactMeta[2];
1500
+ }
1501
+ {
1502
+ cmpMeta.$listeners$ = compactMeta[3];
1503
+ }
1504
+ const originalConnectedCallback = Cstr.prototype.connectedCallback;
1505
+ const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
1506
+ Object.assign(Cstr.prototype, {
1507
+ __hasHostListenerAttached: false,
1508
+ __registerHost() {
1509
+ registerHost(this, cmpMeta);
1510
+ },
1511
+ connectedCallback() {
1512
+ if (!this.__hasHostListenerAttached) {
1513
+ const hostRef = getHostRef(this);
1514
+ addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1515
+ this.__hasHostListenerAttached = true;
1516
+ }
1517
+ connectedCallback(this);
1518
+ if (originalConnectedCallback) {
1519
+ originalConnectedCallback.call(this);
1520
+ }
1521
+ },
1522
+ disconnectedCallback() {
1523
+ disconnectedCallback(this);
1524
+ if (originalDisconnectedCallback) {
1525
+ originalDisconnectedCallback.call(this);
1526
+ }
1527
+ },
1528
+ __attachShadow() {
1529
+ {
1530
+ if (!this.shadowRoot) {
1531
+ createShadowRoot.call(this, cmpMeta);
1532
+ } else {
1533
+ if (this.shadowRoot.mode !== "open") {
1534
+ throw new Error(
1535
+ `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
1536
+ );
1537
+ }
1538
+ }
1539
+ }
1540
+ }
1541
+ });
1542
+ Cstr.is = cmpMeta.$tagName$;
1543
+ return proxyComponent(Cstr, cmpMeta);
1544
+ };
1545
+ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1546
+ if (listeners && win.document) {
1547
+ listeners.map(([flags, name, method]) => {
1548
+ const target = getHostListenerTarget(win.document, elm, flags) ;
1549
+ const handler = hostListenerProxy(hostRef, method);
1550
+ const opts = hostListenerOpts(flags);
1551
+ plt.ael(target, name, handler, opts);
1552
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1553
+ });
1554
+ }
1555
+ };
1556
+ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1557
+ try {
1558
+ {
1559
+ hostRef.$hostElement$[methodName](ev);
1560
+ }
1561
+ } catch (e) {
1562
+ consoleError(e, hostRef.$hostElement$);
1563
+ }
1564
+ };
1565
+ var getHostListenerTarget = (doc, elm, flags) => {
1566
+ if (flags & 8 /* TargetWindow */) {
1567
+ return win;
1568
+ }
1569
+ return elm;
1570
+ };
1571
+ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1572
+ passive: (flags & 1 /* Passive */) !== 0,
1573
+ capture: (flags & 2 /* Capture */) !== 0
1574
+ } : (flags & 2 /* Capture */) !== 0;
1575
+
1576
+ // src/runtime/nonce.ts
1577
+ var setNonce = (nonce) => plt.$nonce$ = nonce;
1578
+
1579
+ // src/runtime/platform-options.ts
1580
+ var setPlatformOptions = (opts) => Object.assign(plt, opts);
1581
+
1582
+ // src/runtime/render.ts
1583
+ function render(vnode, container) {
1584
+ const cmpMeta = {
1585
+ $flags$: 0,
1586
+ $tagName$: container.tagName
1587
+ };
1588
+ const ref = {
1589
+ $cmpMeta$: cmpMeta,
1590
+ $hostElement$: container
1591
+ };
1592
+ renderVdom(ref, vnode);
1593
+ }
1594
+
1595
+ export { H, Host as a, createEvent as c, getAssetPath, h, proxyCustomElement as p, render, setAssetPath, setNonce, setPlatformOptions };
1596
+ //# sourceMappingURL=index.js.map
2
1597
 
3
1598
  //# sourceMappingURL=index.js.map