@amiceli/papierjs 0.13.0 → 0.14.1

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 (388) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -3
  2. package/dist/cjs/feather-hhpdTUdS.js +0 -3
  3. package/dist/cjs/{index-BLkeAjdP.js → index-BPI196cE.js} +428 -238
  4. package/dist/cjs/index.cjs.js +0 -3
  5. package/dist/cjs/loader.cjs.js +2 -5
  6. package/dist/cjs/p-accordion.cjs.entry.js +3 -6
  7. package/dist/cjs/p-alert.cjs.entry.js +3 -6
  8. package/dist/cjs/p-badge.cjs.entry.js +3 -6
  9. package/dist/cjs/p-breadcrumb-item.cjs.entry.js +3 -6
  10. package/dist/cjs/p-breadcrumb.cjs.entry.js +3 -6
  11. package/dist/cjs/p-button_4.cjs.entry.js +9 -12
  12. package/dist/cjs/p-card.cjs.entry.js +3 -6
  13. package/dist/cjs/p-icon.cjs.entry.js +803 -492
  14. package/dist/cjs/p-input-text.cjs.entry.js +3 -6
  15. package/dist/cjs/p-leaf.cjs.entry.js +3 -6
  16. package/dist/cjs/p-modal.cjs.entry.js +3 -6
  17. package/dist/cjs/p-navbar-item.cjs.entry.js +3 -6
  18. package/dist/cjs/p-navbar.cjs.entry.js +3 -6
  19. package/dist/cjs/p-notification-preview.cjs.entry.js +1 -4
  20. package/dist/cjs/p-notification.cjs.entry.js +3 -6
  21. package/dist/cjs/p-progress-bar.cjs.entry.js +3 -6
  22. package/dist/cjs/p-slider.cjs.entry.js +3 -6
  23. package/dist/cjs/p-spinner.cjs.entry.js +3 -6
  24. package/dist/cjs/p-switch-tile.cjs.entry.js +3 -6
  25. package/dist/cjs/p-switch.cjs.entry.js +3 -6
  26. package/dist/cjs/p-tab.cjs.entry.js +3 -6
  27. package/dist/cjs/p-tabs.cjs.entry.js +3 -6
  28. package/dist/cjs/p-tooltip.cjs.entry.js +3 -6
  29. package/dist/cjs/papierjs.cjs.js +3 -6
  30. package/dist/collection/collection-manifest.json +2 -2
  31. package/dist/collection/components/breadcrumb/p-breadcrumb/p-breadcrumb.js +1 -2
  32. package/dist/collection/components/breadcrumb/p-breadcrumb-item/p-breadcrumb-item.js +4 -5
  33. package/dist/collection/components/dropdown/p-dropdown/p-dropdown.css +2 -1
  34. package/dist/collection/components/dropdown/p-dropdown/p-dropdown.js +5 -6
  35. package/dist/collection/components/dropdown/p-dropdown-item/p-dropdown-item.js +4 -5
  36. package/dist/collection/components/form/p-input-text/input-text.js +13 -14
  37. package/dist/collection/components/form/p-slider/sliders.js +6 -7
  38. package/dist/collection/components/form/p-slider/sliders.preview.js +0 -1
  39. package/dist/collection/components/form/p-switch/switch.js +4 -5
  40. package/dist/collection/components/form/p-switch-tile/switch-tile.js +5 -6
  41. package/dist/collection/components/navigation/p-navbar/p-navbar.js +5 -6
  42. package/dist/collection/components/navigation/p-navbar-item/p-navbar-item.js +6 -7
  43. package/dist/collection/components/notification/p-notification/p-notification.js +4 -5
  44. package/dist/collection/components/notification/p-notification-handler/p-notification-handler.js +0 -1
  45. package/dist/collection/components/notification/p-notification-handler/stories/p-notification-preview.js +0 -1
  46. package/dist/collection/components/p-accordion/p-accordion.js +4 -5
  47. package/dist/collection/components/p-alert/p-alert.css +2 -1
  48. package/dist/collection/components/p-alert/p-alert.js +3 -4
  49. package/dist/collection/components/p-badge/p-badge.js +2 -3
  50. package/dist/collection/components/p-button/p-button.js +8 -9
  51. package/dist/collection/components/p-card/p-card.css +4 -2
  52. package/dist/collection/components/p-card/p-card.js +4 -5
  53. package/dist/collection/components/p-icon/icons.js +800 -487
  54. package/dist/collection/components/p-icon/p-icon.js +4 -5
  55. package/dist/collection/components/p-leaf/p-leaf.js +1 -2
  56. package/dist/collection/components/p-modal/p-modal.js +0 -1
  57. package/dist/collection/components/p-progress-bar/p-progress-bar.js +6 -7
  58. package/dist/collection/components/p-spinner/p-spinner.js +5 -6
  59. package/dist/collection/components/p-tooltip/p-tooltip.js +7 -8
  60. package/dist/collection/components/tabs/p-tab/p-tab.js +4 -5
  61. package/dist/collection/components/tabs/p-tabs/p-tabs.css +2 -1
  62. package/dist/collection/components/tabs/p-tabs/p-tabs.js +1 -2
  63. package/dist/collection/index.js +0 -1
  64. package/dist/components/index.d.ts +2 -0
  65. package/dist/components/index.js +1 -1598
  66. package/dist/components/p-5-w_S81x.js +1 -0
  67. package/dist/components/p-BGN4QYf2.js +1 -0
  68. package/dist/components/p-C5tpu5nv.js +1 -0
  69. package/dist/components/p-CUWorjH5.js +1 -0
  70. package/dist/components/p-DQalURmG.js +1 -0
  71. package/dist/components/p-DYFuR0tp.js +1 -0
  72. package/dist/components/p-accordion.js +1 -54
  73. package/dist/components/p-alert.js +1 -76
  74. package/dist/components/p-badge.js +1 -52
  75. package/dist/components/p-breadcrumb-item.js +1 -54
  76. package/dist/components/p-breadcrumb.js +1 -58
  77. package/dist/components/p-button.js +1 -9
  78. package/dist/components/p-card.js +1 -59
  79. package/dist/components/p-dropdown-item.js +1 -9
  80. package/dist/components/p-dropdown.js +1 -9
  81. package/dist/components/p-fjnyWEDB.js +165 -2246
  82. package/dist/components/p-icon.js +1 -9
  83. package/dist/components/p-input-text.js +1 -85
  84. package/dist/components/p-leaf.js +1 -42
  85. package/dist/components/p-modal.js +1 -50
  86. package/dist/components/p-navbar-item.js +1 -57
  87. package/dist/components/p-navbar.js +1 -70
  88. package/dist/components/p-notification-handler.js +1 -9
  89. package/dist/components/p-notification-preview.js +1 -104
  90. package/dist/components/p-notification.js +1 -9
  91. package/dist/components/p-progress-bar.js +1 -87
  92. package/dist/components/p-slider.js +1 -57
  93. package/dist/components/p-spinner.js +1 -9
  94. package/dist/components/p-switch-tile.js +1 -69
  95. package/dist/components/p-switch.js +1 -61
  96. package/dist/components/p-tab.js +1 -47
  97. package/dist/components/p-tabs.js +1 -85
  98. package/dist/components/p-tooltip.js +1 -49
  99. package/dist/components/p-wCnrlyQl.js +1 -0
  100. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  101. package/dist/esm/feather-fjnyWEDB.js +0 -3
  102. package/dist/esm/{index-D_9dM54j.js → index-B4NZTtB_.js} +429 -239
  103. package/dist/esm/index.js +0 -3
  104. package/dist/esm/loader.js +3 -6
  105. package/dist/esm/p-accordion.entry.js +3 -6
  106. package/dist/esm/p-alert.entry.js +3 -6
  107. package/dist/esm/p-badge.entry.js +3 -6
  108. package/dist/esm/p-breadcrumb-item.entry.js +3 -6
  109. package/dist/esm/p-breadcrumb.entry.js +3 -6
  110. package/dist/esm/p-button_4.entry.js +9 -12
  111. package/dist/esm/p-card.entry.js +3 -6
  112. package/dist/esm/p-icon.entry.js +803 -492
  113. package/dist/esm/p-input-text.entry.js +3 -6
  114. package/dist/esm/p-leaf.entry.js +3 -6
  115. package/dist/esm/p-modal.entry.js +3 -6
  116. package/dist/esm/p-navbar-item.entry.js +3 -6
  117. package/dist/esm/p-navbar.entry.js +3 -6
  118. package/dist/esm/p-notification-preview.entry.js +1 -4
  119. package/dist/esm/p-notification.entry.js +3 -6
  120. package/dist/esm/p-progress-bar.entry.js +3 -6
  121. package/dist/esm/p-slider.entry.js +3 -6
  122. package/dist/esm/p-spinner.entry.js +3 -6
  123. package/dist/esm/p-switch-tile.entry.js +3 -6
  124. package/dist/esm/p-switch.entry.js +3 -6
  125. package/dist/esm/p-tab.entry.js +3 -6
  126. package/dist/esm/p-tabs.entry.js +3 -6
  127. package/dist/esm/p-tooltip.entry.js +3 -6
  128. package/dist/esm/papierjs.js +4 -7
  129. package/dist/papierjs/index.esm.js +0 -2
  130. package/dist/papierjs/p-0d6ba9a4.entry.js +1 -0
  131. package/dist/papierjs/p-1071b445.entry.js +1 -0
  132. package/dist/papierjs/p-18e2b807.entry.js +1 -0
  133. package/dist/papierjs/p-1e0a94d9.entry.js +1 -0
  134. package/dist/papierjs/p-3654bad6.entry.js +1 -0
  135. package/dist/papierjs/p-3be660f1.entry.js +1 -0
  136. package/dist/papierjs/p-57dc9248.entry.js +1 -0
  137. package/dist/papierjs/p-59d1a95c.entry.js +1 -0
  138. package/dist/papierjs/p-6178a41a.entry.js +1 -0
  139. package/dist/papierjs/p-67ec8731.entry.js +1 -0
  140. package/dist/papierjs/p-6b73ff84.entry.js +1 -0
  141. package/dist/papierjs/p-72477120.entry.js +1 -0
  142. package/dist/papierjs/p-8d4911ee.entry.js +1 -0
  143. package/dist/papierjs/p-8dfc72ce.entry.js +1 -0
  144. package/dist/papierjs/p-8e8a85f2.entry.js +1 -0
  145. package/dist/papierjs/p-B4NZTtB_.js +2 -0
  146. package/dist/papierjs/p-DQuL1Twl.js +1 -2
  147. package/dist/papierjs/p-a0a5a5f8.entry.js +1 -0
  148. package/dist/papierjs/p-a2a46625.entry.js +1 -0
  149. package/dist/papierjs/p-b3ff9364.entry.js +1 -0
  150. package/dist/papierjs/p-c7d6c23a.entry.js +1 -0
  151. package/dist/papierjs/p-d6e3f78d.entry.js +1 -0
  152. package/dist/papierjs/p-d6fa2cc2.entry.js +1 -0
  153. package/dist/papierjs/p-d8f96a15.entry.js +1 -0
  154. package/dist/papierjs/p-d9520b51.entry.js +1 -0
  155. package/dist/papierjs/p-fjnyWEDB.js +79 -80
  156. package/dist/papierjs/papierjs.esm.js +1 -2
  157. package/dist/types/components.d.ts +186 -49
  158. package/dist/types/stencil-public-runtime.d.ts +155 -6
  159. package/package.json +22 -21
  160. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
  161. package/dist/cjs/feather-hhpdTUdS.js.map +0 -1
  162. package/dist/cjs/index-BLkeAjdP.js.map +0 -1
  163. package/dist/cjs/index.cjs.js.map +0 -1
  164. package/dist/cjs/loader.cjs.js.map +0 -1
  165. package/dist/cjs/p-accordion.cjs.entry.js.map +0 -1
  166. package/dist/cjs/p-accordion.entry.cjs.js.map +0 -1
  167. package/dist/cjs/p-alert.cjs.entry.js.map +0 -1
  168. package/dist/cjs/p-alert.entry.cjs.js.map +0 -1
  169. package/dist/cjs/p-badge.cjs.entry.js.map +0 -1
  170. package/dist/cjs/p-badge.entry.cjs.js.map +0 -1
  171. package/dist/cjs/p-breadcrumb-item.cjs.entry.js.map +0 -1
  172. package/dist/cjs/p-breadcrumb-item.entry.cjs.js.map +0 -1
  173. package/dist/cjs/p-breadcrumb.cjs.entry.js.map +0 -1
  174. package/dist/cjs/p-breadcrumb.entry.cjs.js.map +0 -1
  175. package/dist/cjs/p-button.p-dropdown.p-dropdown-item.p-notification-handler.entry.cjs.js.map +0 -1
  176. package/dist/cjs/p-button_4.cjs.entry.js.map +0 -1
  177. package/dist/cjs/p-card.cjs.entry.js.map +0 -1
  178. package/dist/cjs/p-card.entry.cjs.js.map +0 -1
  179. package/dist/cjs/p-icon.cjs.entry.js.map +0 -1
  180. package/dist/cjs/p-icon.entry.cjs.js.map +0 -1
  181. package/dist/cjs/p-input-text.cjs.entry.js.map +0 -1
  182. package/dist/cjs/p-input-text.entry.cjs.js.map +0 -1
  183. package/dist/cjs/p-leaf.cjs.entry.js.map +0 -1
  184. package/dist/cjs/p-leaf.entry.cjs.js.map +0 -1
  185. package/dist/cjs/p-modal.cjs.entry.js.map +0 -1
  186. package/dist/cjs/p-modal.entry.cjs.js.map +0 -1
  187. package/dist/cjs/p-navbar-item.cjs.entry.js.map +0 -1
  188. package/dist/cjs/p-navbar-item.entry.cjs.js.map +0 -1
  189. package/dist/cjs/p-navbar.cjs.entry.js.map +0 -1
  190. package/dist/cjs/p-navbar.entry.cjs.js.map +0 -1
  191. package/dist/cjs/p-notification-preview.cjs.entry.js.map +0 -1
  192. package/dist/cjs/p-notification-preview.entry.cjs.js.map +0 -1
  193. package/dist/cjs/p-notification.cjs.entry.js.map +0 -1
  194. package/dist/cjs/p-notification.entry.cjs.js.map +0 -1
  195. package/dist/cjs/p-progress-bar.cjs.entry.js.map +0 -1
  196. package/dist/cjs/p-progress-bar.entry.cjs.js.map +0 -1
  197. package/dist/cjs/p-slider.cjs.entry.js.map +0 -1
  198. package/dist/cjs/p-slider.entry.cjs.js.map +0 -1
  199. package/dist/cjs/p-spinner.cjs.entry.js.map +0 -1
  200. package/dist/cjs/p-spinner.entry.cjs.js.map +0 -1
  201. package/dist/cjs/p-switch-tile.cjs.entry.js.map +0 -1
  202. package/dist/cjs/p-switch-tile.entry.cjs.js.map +0 -1
  203. package/dist/cjs/p-switch.cjs.entry.js.map +0 -1
  204. package/dist/cjs/p-switch.entry.cjs.js.map +0 -1
  205. package/dist/cjs/p-tab.cjs.entry.js.map +0 -1
  206. package/dist/cjs/p-tab.entry.cjs.js.map +0 -1
  207. package/dist/cjs/p-tabs.cjs.entry.js.map +0 -1
  208. package/dist/cjs/p-tabs.entry.cjs.js.map +0 -1
  209. package/dist/cjs/p-tooltip.cjs.entry.js.map +0 -1
  210. package/dist/cjs/p-tooltip.entry.cjs.js.map +0 -1
  211. package/dist/cjs/papierjs.cjs.js.map +0 -1
  212. package/dist/collection/components/breadcrumb/p-breadcrumb/p-breadcrumb.js.map +0 -1
  213. package/dist/collection/components/breadcrumb/p-breadcrumb-item/p-breadcrumb-item.js.map +0 -1
  214. package/dist/collection/components/dropdown/p-dropdown/p-dropdown.js.map +0 -1
  215. package/dist/collection/components/dropdown/p-dropdown-item/p-dropdown-item.js.map +0 -1
  216. package/dist/collection/components/form/p-input-text/input-text.js.map +0 -1
  217. package/dist/collection/components/form/p-slider/sliders.js.map +0 -1
  218. package/dist/collection/components/form/p-slider/sliders.preview.js.map +0 -1
  219. package/dist/collection/components/form/p-switch/switch.js.map +0 -1
  220. package/dist/collection/components/form/p-switch-tile/switch-tile.js.map +0 -1
  221. package/dist/collection/components/navigation/p-navbar/p-navbar.js.map +0 -1
  222. package/dist/collection/components/navigation/p-navbar-item/p-navbar-item.js.map +0 -1
  223. package/dist/collection/components/notification/p-notification/p-notification.js.map +0 -1
  224. package/dist/collection/components/notification/p-notification-handler/p-notification-handler.js.map +0 -1
  225. package/dist/collection/components/notification/p-notification-handler/stories/p-notification-preview.js.map +0 -1
  226. package/dist/collection/components/p-accordion/p-accordion.js.map +0 -1
  227. package/dist/collection/components/p-alert/p-alert.js.map +0 -1
  228. package/dist/collection/components/p-badge/p-badge.js.map +0 -1
  229. package/dist/collection/components/p-button/p-button.js.map +0 -1
  230. package/dist/collection/components/p-card/p-card.js.map +0 -1
  231. package/dist/collection/components/p-icon/icons.js.map +0 -1
  232. package/dist/collection/components/p-icon/p-icon.js.map +0 -1
  233. package/dist/collection/components/p-leaf/p-leaf.js.map +0 -1
  234. package/dist/collection/components/p-modal/p-modal.js.map +0 -1
  235. package/dist/collection/components/p-progress-bar/p-progress-bar.js.map +0 -1
  236. package/dist/collection/components/p-spinner/p-spinner.js.map +0 -1
  237. package/dist/collection/components/p-tooltip/p-tooltip.js.map +0 -1
  238. package/dist/collection/components/tabs/p-tab/p-tab.js.map +0 -1
  239. package/dist/collection/components/tabs/p-tabs/p-tabs.js.map +0 -1
  240. package/dist/collection/index.js.map +0 -1
  241. package/dist/components/index.js.map +0 -1
  242. package/dist/components/p-BoXBUJUF.js +0 -53
  243. package/dist/components/p-BoXBUJUF.js.map +0 -1
  244. package/dist/components/p-C4fWM-W2.js +0 -93
  245. package/dist/components/p-C4fWM-W2.js.map +0 -1
  246. package/dist/components/p-DJ_d_AJY.js +0 -533
  247. package/dist/components/p-DJ_d_AJY.js.map +0 -1
  248. package/dist/components/p-DKlrOj-0.js +0 -78
  249. package/dist/components/p-DKlrOj-0.js.map +0 -1
  250. package/dist/components/p-DZbntG23.js +0 -49
  251. package/dist/components/p-DZbntG23.js.map +0 -1
  252. package/dist/components/p-Ixyl16zU.js +0 -102
  253. package/dist/components/p-Ixyl16zU.js.map +0 -1
  254. package/dist/components/p-accordion.js.map +0 -1
  255. package/dist/components/p-alert.js.map +0 -1
  256. package/dist/components/p-badge.js.map +0 -1
  257. package/dist/components/p-breadcrumb-item.js.map +0 -1
  258. package/dist/components/p-breadcrumb.js.map +0 -1
  259. package/dist/components/p-button.js.map +0 -1
  260. package/dist/components/p-card.js.map +0 -1
  261. package/dist/components/p-dropdown-item.js.map +0 -1
  262. package/dist/components/p-dropdown.js.map +0 -1
  263. package/dist/components/p-fjnyWEDB.js.map +0 -1
  264. package/dist/components/p-icon.js.map +0 -1
  265. package/dist/components/p-input-text.js.map +0 -1
  266. package/dist/components/p-k0dKInmh.js +0 -81
  267. package/dist/components/p-k0dKInmh.js.map +0 -1
  268. package/dist/components/p-leaf.js.map +0 -1
  269. package/dist/components/p-modal.js.map +0 -1
  270. package/dist/components/p-navbar-item.js.map +0 -1
  271. package/dist/components/p-navbar.js.map +0 -1
  272. package/dist/components/p-notification-handler.js.map +0 -1
  273. package/dist/components/p-notification-preview.js.map +0 -1
  274. package/dist/components/p-notification.js.map +0 -1
  275. package/dist/components/p-progress-bar.js.map +0 -1
  276. package/dist/components/p-slider.js.map +0 -1
  277. package/dist/components/p-spinner.js.map +0 -1
  278. package/dist/components/p-switch-tile.js.map +0 -1
  279. package/dist/components/p-switch.js.map +0 -1
  280. package/dist/components/p-tab.js.map +0 -1
  281. package/dist/components/p-tabs.js.map +0 -1
  282. package/dist/components/p-tooltip.js.map +0 -1
  283. package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
  284. package/dist/esm/feather-fjnyWEDB.js.map +0 -1
  285. package/dist/esm/index-D_9dM54j.js.map +0 -1
  286. package/dist/esm/index.js.map +0 -1
  287. package/dist/esm/loader.js.map +0 -1
  288. package/dist/esm/p-accordion.entry.js.map +0 -1
  289. package/dist/esm/p-alert.entry.js.map +0 -1
  290. package/dist/esm/p-badge.entry.js.map +0 -1
  291. package/dist/esm/p-breadcrumb-item.entry.js.map +0 -1
  292. package/dist/esm/p-breadcrumb.entry.js.map +0 -1
  293. package/dist/esm/p-button.p-dropdown.p-dropdown-item.p-notification-handler.entry.js.map +0 -1
  294. package/dist/esm/p-button_4.entry.js.map +0 -1
  295. package/dist/esm/p-card.entry.js.map +0 -1
  296. package/dist/esm/p-icon.entry.js.map +0 -1
  297. package/dist/esm/p-input-text.entry.js.map +0 -1
  298. package/dist/esm/p-leaf.entry.js.map +0 -1
  299. package/dist/esm/p-modal.entry.js.map +0 -1
  300. package/dist/esm/p-navbar-item.entry.js.map +0 -1
  301. package/dist/esm/p-navbar.entry.js.map +0 -1
  302. package/dist/esm/p-notification-preview.entry.js.map +0 -1
  303. package/dist/esm/p-notification.entry.js.map +0 -1
  304. package/dist/esm/p-progress-bar.entry.js.map +0 -1
  305. package/dist/esm/p-slider.entry.js.map +0 -1
  306. package/dist/esm/p-spinner.entry.js.map +0 -1
  307. package/dist/esm/p-switch-tile.entry.js.map +0 -1
  308. package/dist/esm/p-switch.entry.js.map +0 -1
  309. package/dist/esm/p-tab.entry.js.map +0 -1
  310. package/dist/esm/p-tabs.entry.js.map +0 -1
  311. package/dist/esm/p-tooltip.entry.js.map +0 -1
  312. package/dist/esm/papierjs.js.map +0 -1
  313. package/dist/papierjs/index.esm.js.map +0 -1
  314. package/dist/papierjs/loader.esm.js.map +0 -1
  315. package/dist/papierjs/p-06665233.entry.js +0 -2
  316. package/dist/papierjs/p-06665233.entry.js.map +0 -1
  317. package/dist/papierjs/p-0669cc21.entry.js +0 -2
  318. package/dist/papierjs/p-0669cc21.entry.js.map +0 -1
  319. package/dist/papierjs/p-32a83d75.entry.js +0 -2
  320. package/dist/papierjs/p-32a83d75.entry.js.map +0 -1
  321. package/dist/papierjs/p-3521cd61.entry.js +0 -2
  322. package/dist/papierjs/p-3521cd61.entry.js.map +0 -1
  323. package/dist/papierjs/p-36b16c41.entry.js +0 -2
  324. package/dist/papierjs/p-36b16c41.entry.js.map +0 -1
  325. package/dist/papierjs/p-5123b85c.entry.js +0 -2
  326. package/dist/papierjs/p-5123b85c.entry.js.map +0 -1
  327. package/dist/papierjs/p-584a8668.entry.js +0 -2
  328. package/dist/papierjs/p-584a8668.entry.js.map +0 -1
  329. package/dist/papierjs/p-5b2a221d.entry.js +0 -2
  330. package/dist/papierjs/p-5b2a221d.entry.js.map +0 -1
  331. package/dist/papierjs/p-67844159.entry.js +0 -2
  332. package/dist/papierjs/p-67844159.entry.js.map +0 -1
  333. package/dist/papierjs/p-746d71e0.entry.js +0 -2
  334. package/dist/papierjs/p-746d71e0.entry.js.map +0 -1
  335. package/dist/papierjs/p-7568d1fc.entry.js +0 -2
  336. package/dist/papierjs/p-7568d1fc.entry.js.map +0 -1
  337. package/dist/papierjs/p-7b5bdb17.entry.js +0 -2
  338. package/dist/papierjs/p-7b5bdb17.entry.js.map +0 -1
  339. package/dist/papierjs/p-84f025d2.entry.js +0 -2
  340. package/dist/papierjs/p-84f025d2.entry.js.map +0 -1
  341. package/dist/papierjs/p-88d842c1.entry.js +0 -2
  342. package/dist/papierjs/p-88d842c1.entry.js.map +0 -1
  343. package/dist/papierjs/p-DQuL1Twl.js.map +0 -1
  344. package/dist/papierjs/p-D_9dM54j.js +0 -3
  345. package/dist/papierjs/p-D_9dM54j.js.map +0 -1
  346. package/dist/papierjs/p-a78f900c.entry.js +0 -2
  347. package/dist/papierjs/p-a78f900c.entry.js.map +0 -1
  348. package/dist/papierjs/p-accordion.entry.esm.js.map +0 -1
  349. package/dist/papierjs/p-alert.entry.esm.js.map +0 -1
  350. package/dist/papierjs/p-badge.entry.esm.js.map +0 -1
  351. package/dist/papierjs/p-breadcrumb-item.entry.esm.js.map +0 -1
  352. package/dist/papierjs/p-breadcrumb.entry.esm.js.map +0 -1
  353. package/dist/papierjs/p-button.p-dropdown.p-dropdown-item.p-notification-handler.entry.esm.js.map +0 -1
  354. package/dist/papierjs/p-c0b0d2e5.entry.js +0 -2
  355. package/dist/papierjs/p-c0b0d2e5.entry.js.map +0 -1
  356. package/dist/papierjs/p-c40d688c.entry.js +0 -2
  357. package/dist/papierjs/p-c40d688c.entry.js.map +0 -1
  358. package/dist/papierjs/p-card.entry.esm.js.map +0 -1
  359. package/dist/papierjs/p-e66223a0.entry.js +0 -2
  360. package/dist/papierjs/p-e66223a0.entry.js.map +0 -1
  361. package/dist/papierjs/p-ee13e3f6.entry.js +0 -2
  362. package/dist/papierjs/p-ee13e3f6.entry.js.map +0 -1
  363. package/dist/papierjs/p-f24c4b34.entry.js +0 -2
  364. package/dist/papierjs/p-f24c4b34.entry.js.map +0 -1
  365. package/dist/papierjs/p-fb89dd1a.entry.js +0 -2
  366. package/dist/papierjs/p-fb89dd1a.entry.js.map +0 -1
  367. package/dist/papierjs/p-fbafe809.entry.js +0 -2
  368. package/dist/papierjs/p-fbafe809.entry.js.map +0 -1
  369. package/dist/papierjs/p-fe48422b.entry.js +0 -2
  370. package/dist/papierjs/p-fe48422b.entry.js.map +0 -1
  371. package/dist/papierjs/p-fjnyWEDB.js.map +0 -1
  372. package/dist/papierjs/p-icon.entry.esm.js.map +0 -1
  373. package/dist/papierjs/p-input-text.entry.esm.js.map +0 -1
  374. package/dist/papierjs/p-leaf.entry.esm.js.map +0 -1
  375. package/dist/papierjs/p-modal.entry.esm.js.map +0 -1
  376. package/dist/papierjs/p-navbar-item.entry.esm.js.map +0 -1
  377. package/dist/papierjs/p-navbar.entry.esm.js.map +0 -1
  378. package/dist/papierjs/p-notification-preview.entry.esm.js.map +0 -1
  379. package/dist/papierjs/p-notification.entry.esm.js.map +0 -1
  380. package/dist/papierjs/p-progress-bar.entry.esm.js.map +0 -1
  381. package/dist/papierjs/p-slider.entry.esm.js.map +0 -1
  382. package/dist/papierjs/p-spinner.entry.esm.js.map +0 -1
  383. package/dist/papierjs/p-switch-tile.entry.esm.js.map +0 -1
  384. package/dist/papierjs/p-switch.entry.esm.js.map +0 -1
  385. package/dist/papierjs/p-tab.entry.esm.js.map +0 -1
  386. package/dist/papierjs/p-tabs.entry.esm.js.map +0 -1
  387. package/dist/papierjs/p-tooltip.entry.esm.js.map +0 -1
  388. package/dist/papierjs/papierjs.esm.js.map +0 -1
@@ -1,1598 +1 @@
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
1597
-
1598
- //# sourceMappingURL=index.js.map
1
+ var t,n=(t,n)=>{var e;Object.entries(null!=(e=n.o.t)?e:{}).map((([e,[o]])=>{if(31&o||32&o){const o=t[e],l=function(t,n){for(;t;){const e=Object.getOwnPropertyDescriptor(t,n);if(null==e?void 0:e.get)return e;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);l&&Object.defineProperty(t,e,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[e]=n.l.has(e)?n.l.get(e):o}}))},e=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,n)=>n in t,l=(t,n)=>(0,console.error)(t,n),s=new Map,i="undefined"!=typeof window?window:{},r=i.HTMLElement||class{},c={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},f=(()=>{try{return!!i.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),u=!!f&&(()=>!!i.document&&Object.getOwnPropertyDescriptor(i.document.adoptedStyleSheets,"length").writable)(),a=!1,d=[],p=[],h=(t,n)=>e=>{t.push(e),a||(a=!0,n&&4&c.i?b(m):c.raf(m))},v=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){l(t)}t.length=0},m=()=>{v(d),v(p),(a=d.length>0)&&c.raf(m)},b=t=>Promise.resolve(void 0).then(t),y=h(p,!0),$=t=>{const n=new URL(t,c.u);return n.origin!==i.location.origin?n.href:n.pathname},g=t=>c.u=t;function w(){const n=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(u?n.adoptedStyleSheets.push(t):n.adoptedStyleSheets=[...n.adoptedStyleSheets,t])}var j=t=>{const n=M(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&O(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!S(t,k(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&M(t,"childNodes").length&&j(t)}};function O(t,n,e){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!n||o["s-hn"]===n)&&(void 0===e||k(o)===e)&&(s.push(o),void 0!==e))return s;s=[...s,...O(o.childNodes,n,e)]}return s}var S=(t,n,e=!0)=>{const o=[];(e&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)k(l)!==n||!e&&l["s-sr"]||o.push(l);return o},N=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,k=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function M(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}var E,_,A=new WeakMap,C=t=>"sc-"+t.p,R=t=>"object"==(t=typeof t)||"function"===t,x=(t,n,...e)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],f=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!R(o))&&(o+=""),i&&r?c[c.length-1].h+=o:c.push(i?F(null,o):o),r=i)};if(f(e),n){n.key&&(l=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}const u=F(t,null);return u.v=n,c.length>0&&(u.m=c),u.$=l,u.j=s,u},F=(t,n)=>({i:0,O:t,h:null!=n?n:null,S:null,m:null,v:null,$:null,j:null}),L={},D=(t,n)=>null==t||R(t)?t:4&n?"false"!==t&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?t+"":t,P=(t,n)=>{const e=t;return{emit:t=>T(e,n,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},T=(t,n,e)=>{const o=c.ce(n,e);return t.dispatchEvent(o),o},U=(t,n,l,s,r,f)=>{if(l===s)return;let u=o(t,n),a=n.toLowerCase();if("class"===n){const n=t.classList,e=B(l);let o=B(s);n.remove(...e.filter((t=>t&&!o.includes(t)))),n.add(...o.filter((t=>t&&!e.includes(t))))}else if("style"===n){for(const n in l)s&&null!=s[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in s)l&&s[n]===l[n]||(n.includes("-")?t.style.setProperty(n,s[n]):t.style[n]=s[n])}else if("key"===n);else if(t.__lookupSetter__(n)||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const o=n.slice(5);let l;{const n=e(t);if(n&&n.o&&n.o.t){const t=n.o.t[o];t&&t[1]&&(l=t[1])}}return l||(l=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===s?"":s))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=s}catch(t){}return}{const e=R(s);if((u||e&&null!==s)&&!r)try{if(t.tagName.includes("-"))t[n]!==s&&(t[n]=s);else{const e=null==s?"":s;"list"===n?u=!1:null!=l&&t[n]===e||("function"==typeof t.__lookupSetter__(n)?t[n]=e:t.setAttribute(n,e))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(n)||t.removeAttribute(n):(!u||4&f||r)&&!e&&1===t.nodeType&&t.setAttribute(n,s=!0===s?"":s)}}else if(n="-"===n[2]?n.slice(3):o(i,a)?a.slice(2):a[2]+n.slice(3),l||s){const e=n.endsWith(H);n=n.replace(V,""),l&&c.rel(t,n,l,e),s&&c.ael(t,n,s,e)}},W=/\s/,B=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(W):[]),H="Capture",V=RegExp(H+"$"),q=(t,n,e)=>{const o=11===n.S.nodeType&&n.S.host?n.S.host:n.S,l=t&&t.v||{},s=n.v||{};for(const t of z(Object.keys(l)))t in s||U(o,t,l[t],void 0,e,n.i);for(const t of z(Object.keys(s)))U(o,t,l[t],s[t],e,n.i)};function z(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Y=!1,I=!1,Z=!1,G=!1,J=(t,n,e)=>{var o;const l=n.m[e];let s,r,c,f=0;if(Y||(Z=!0,"slot"===l.O&&(l.i|=l.m?2:1)),null!=l.h)s=l.S=i.document.createTextNode(l.h);else if(1&l.i)s=l.S=i.document.createTextNode(""),q(null,l,G);else{if(G||(G="svg"===l.O),!i.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.S=i.document.createElementNS(G?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!Y&&2&l.i?"slot-fb":l.O),G&&"foreignObject"===l.O&&(G=!1),q(null,l,G),l.m){const n="template"===l.O?s.content:s;for(f=0;f<l.m.length;++f)r=J(t,l,f),r&&n.appendChild(r)}"svg"===l.O?G=!1:"foreignObject"===s.tagName&&(G=!0)}return s["s-hn"]=_,3&l.i&&(s["s-sr"]=!0,s["s-cr"]=E,s["s-sn"]=l.j||"",s["s-rf"]=null==(o=l.v)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===k(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(s),c=t&&t.m&&t.m[e],c&&c.O===l.O&&t.S&&K(t.S)),s},K=t=>{c.i|=1;const n=t.closest(_.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of e?o.reverse():o)null!=t["s-sh"]&&(it(n,t,null!=e?e:null),t["s-sh"]=void 0,Z=!0)}c.i&=-2},Q=(t,n)=>{c.i|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===_&&e.push(n)}for(let t=e.length-1;t>=0;t--){const o=e[t];o["s-hn"]!==_&&o["s-ol"]&&(it(et(o).parentNode,o,et(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,Z=!0),n&&Q(o,n)}c.i&=-2},X=(t,n,e,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(r.shadowRoot&&r.tagName===_&&(r=r.shadowRoot),"template"===e.O&&(r=r.content);l<=s;++l)o[l]&&(i=J(null,e,l),i&&(o[l].S=i,it(r,i,et(n))))},tt=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.S;t&&(I=!0,t["s-ol"]?t["s-ol"].remove():Q(t,!0),t.remove())}}},nt=(t,n,e=!1)=>t.O===n.O&&("slot"===t.O?t.j===n.j:e?(e&&!t.$&&n.$&&(t.$=n.$),!0):t.$===n.$),et=t=>t&&t["s-ol"]||t,ot=(t,n,e=!1)=>{const o=n.S=t.S,l=t.m,s=n.m,i=n.O,r=n.h;let c;null==r?(G="svg"===i||"foreignObject"!==i&&G,"slot"!==i||Y||t.j!==n.j&&(n.S["s-sn"]=n.j||"",K(n.S.parentElement)),q(t,n,G),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=n.length-1,d=n[0],p=n[a],h=o.length-1,v=o[0],m=o[h];const b="template"===e.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=n[++r];else if(null==p)p=n[--a];else if(null==v)v=o[++c];else if(null==m)m=o[--h];else if(nt(d,v,l))ot(d,v,l),d=n[++r],v=o[++c];else if(nt(p,m,l))ot(p,m,l),p=n[--a],m=o[--h];else if(nt(d,m,l))"slot"!==d.O&&"slot"!==m.O||Q(d.S.parentNode,!1),ot(d,m,l),it(b,d.S,p.S.nextSibling),d=n[++r],m=o[--h];else if(nt(p,v,l))"slot"!==d.O&&"slot"!==m.O||Q(p.S.parentNode,!1),ot(p,v,l),it(b,p.S,d.S),p=n[--a],v=o[++c];else{for(f=-1,u=r;u<=a;++u)if(n[u]&&null!==n[u].$&&n[u].$===v.$){f=u;break}f>=0?(i=n[f],i.O!==v.O?s=J(n&&n[c],e,f):(ot(i,v,l),n[f]=void 0,s=i.S),v=o[++c]):(s=J(n&&n[c],e,c),v=o[++c]),s&&it(et(d.S).parentNode,s,et(d.S))}r>a?X(t,null==o[h+1]?null:o[h+1].S,e,o,c,h):c>h&&tt(n,r,a)})(o,l,n,s,e):null!==s?(null!==t.h&&(o.textContent=""),X(o,null,n,s,0,s.length-1)):!e&&null!==l&&tt(l,0,l.length-1),G&&"svg"===i&&(G=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:t.h!==r&&(o.data=r)},lt=[],st=t=>{let n,e,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const l=t["s-sn"];for(o=e.length-1;o>=0;o--)if(n=e[o],!(n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||n["s-sh"]&&n["s-sh"]===t["s-hn"]))if(N(n,l)){let e=lt.find((t=>t.N===n));I=!0,n["s-sn"]=n["s-sn"]||l,e?(e.N["s-sh"]=t["s-hn"],e.k=t):(n["s-sh"]=t["s-hn"],lt.push({k:t,N:n})),n["s-sr"]&&lt.map((t=>{N(t.N,n["s-sn"])&&(e=lt.find((t=>t.N===n)),e&&!t.k&&(t.k=e.k))}))}else lt.some((t=>t.N===n))||lt.push({N:n})}1===t.nodeType&&st(t)}},it=(t,n,e,o)=>{if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:l}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=k(t)||"";return{slotNode:O(M(n,"childNodes"),n.tagName,o)[0],slotName:o}}(n);return l&&!o&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(l),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)},rt=(t,n,e=!1)=>{var o,l,s,r,f;const u=t.$hostElement$,a=t.o,d=t.M||F(null,null),p=(t=>t&&t.O===L)(n)?n:x(null,null,n);if(_=u.tagName,e&&p.v)for(const t of Object.keys(p.v))u.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(p.v[t]=u[t]);if(p.O=null,p.i|=4,t.M=p,p.S=d.S=u.shadowRoot||u,Y=!(!(1&a.i)||128&a.i),E=u["s-cr"],I=!1,ot(d,p,e),c.i|=1,Z){st(p.S);for(const t of lt){const n=t.N;if(!n["s-ol"]&&i.document){const t=i.document.createTextNode("");t["s-nr"]=n,it(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of lt){const n=t.N,c=t.k;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(o=n.hidden)&&o),c){const t=c.parentNode;let o=c.nextSibling;if(o&&1===o.nodeType){let e=null==(l=n["s-ol"])?void 0:l.previousSibling;for(;e;){let l=null!=(s=e["s-nr"])?s:null;if(l&&l["s-sn"]===n["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===n||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}e=e.previousSibling}}if((!o&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==o)&&n!==o){if(it(t,n,o,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=i.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,it(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(r=n["s-ih"])&&r)}n&&"function"==typeof c["s-rf"]&&c["s-rf"](c)}else 1===n.nodeType&&(n.hidden=!0)}}if(I&&j(p.S),c.i&=-2,lt.length=0,!Y&&!(1&a.i)&&u["s-cr"]){const t=p.S.__childNodes||p.S.childNodes;for(const n of t)if(n["s-hn"]!==_&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(f=n.hidden)&&f),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=i.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],it(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}E=void 0},ct=(t,n)=>{if(n&&!t._&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t._=()=>{n["s-p"].splice(e-1,1),o()})))}},ft=(t,n)=>{if(t.i|=16,4&t.i)return void(t.i|=512);ct(t,t.A);const e=()=>ut(t,n);if(!n)return y(e);queueMicrotask((()=>{e()}))},ut=(t,n)=>{const e=t.$hostElement$,o=e;if(!o)throw Error(`Can't render component <${e.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`);let l;return l=bt(o,n?"componentWillLoad":"componentWillUpdate",void 0,e),l=at(l,(()=>bt(o,"componentWillRender",void 0,e))),at(l,(()=>pt(t,o,n)))},at=(t,n)=>dt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),dt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,pt=async(t,n,e)=>{var o;const l=t.$hostElement$,r=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.i,l=((t,n)=>{var e,o,l;const r=C(n),a=s.get(r);if(!i.document)return r;if(t=11===t.nodeType?t:i.document,a)if("string"==typeof a){let l,s=A.get(t=t.head||t);if(s||A.set(t,s=new Set),!s.has(r)){l=i.document.createElement("style"),l.textContent=a;const d=null!=(e=c.C)?e:function(){var t,n,e;return null!=(e=null==(n=null==(t=i.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?e:void 0}();if(null!=d&&l.setAttribute("nonce",d),!(1&n.i))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(f){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(a),u?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=a+n.textContent:t.prepend(l)}else t.append(l);1&n.i&&t.insertBefore(l,null),4&n.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(r)}}else{let n=A.get(t);if(n||A.set(t,n=new Set),!n.has(r)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(a.constructor===e.CSSStyleSheet)o=a;else{o=new e.CSSStyleSheet;for(let t=0;t<a.cssRules.length;t++)o.insertRule(a.cssRules[t].cssText,t)}u?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(r)}}return r})(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);ht(t,n,l,e),r&&(r.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>vt(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.i|=4,n.length=0)}},ht=(t,n,e,o)=>{try{n=n.render(),t.i&=-17,t.i|=2,rt(t,n,o)}catch(n){l(n,t.$hostElement$)}return null},vt=t=>{const n=t.$hostElement$,e=n,o=t.A;bt(e,"componentDidRender",void 0,n),64&t.i?bt(e,"componentDidUpdate",void 0,n):(t.i|=64,yt(n),bt(e,"componentDidLoad",void 0,n),t.R(n),o||mt()),t._&&(t._(),t._=void 0),512&t.i&&b((()=>ft(t,!1))),t.i&=-517},mt=()=>{b((()=>T(i,"appload",{detail:{namespace:"papierjs"}})))},bt=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){l(t,o)}},yt=t=>t.classList.add("hydrated"),$t=(t,n,o,l)=>{const s=e(t);if(!s)return;const i=t,r=s.l.get(n),c=s.i,f=i;if((o=D(o,l.t[n][0]))!==r&&(!Number.isNaN(r)||!Number.isNaN(o))&&(s.l.set(n,o),2&c)){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(o,r,n)&&!(16&c))return;16&c||ft(s,!1)}},gt=(t,n)=>{var o,l;const s=t.prototype;if(n.t){const i=Object.entries(null!=(o=n.t)?o:{});i.map((([t,[o]])=>{if(31&o||32&o){const{get:l,set:i}=Object.getOwnPropertyDescriptor(s,t)||{};l&&(n.t[t][0]|=2048),i&&(n.t[t][0]|=4096),Object.defineProperty(s,t,{get(){return l?l.apply(this):((t,n)=>e(this).l.get(n))(0,t)},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(l){const s=e(this);if(s){if(i)return void 0===(32&o?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(l=s.l.get(t)),i.call(this,D(l,o)),void $t(this,t,l=32&o?this[t]:s.$hostElement$[t],n);$t(this,t,l,n)}}})}}));{const o=new Map;s.attributeChangedCallback=function(t,l,r){c.jmp((()=>{var c;const f=o.get(t),u=e(this);if(this.hasOwnProperty(f),s.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==r)return;if(null==f){const e=null==u?void 0:u.i;if(u&&e&&!(8&e)&&r!==l){const o=this,s=null==(c=n.F)?void 0:c[t];null==s||s.forEach((n=>{const[[s,i]]=Object.entries(n);null!=o[s]&&(128&e||1&i)&&o[s].call(o,r,l,t)}))}return}const a=i.find((([t])=>t===f));a&&4&a[1][0]&&(r=null!==r&&"false"!==r);const d=Object.getOwnPropertyDescriptor(s,f);r==this[f]||d.get&&!d.set||(this[f]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n.F)?l:{}),...i.filter((([t,n])=>31&n[0])).map((([t,n])=>{const e=n[1]||t;return o.set(e,t),e}))]))}}return t},wt=(t,o)=>{const r={i:o[0],p:o[1]};try{r.t=o[2],r.L=o[3];const u=t.prototype.connectedCallback,a=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const o={i:0,$hostElement$:t,o:e,l:new Map,D:new Map};o.P=new Promise((t=>o.R=t)),t["s-p"]=[],t["s-rc"]=[];const l=o;t.__stencil__getHostRef=()=>l,512&e.i&&n(t,o)})(this,r)},connectedCallback(){if(!this.__hasHostListenerAttached){const t=e(this);if(!t)return;jt(this,t,r.L),this.__hasHostListenerAttached=!0}(t=>{if(!(1&c.i)){const n=e(t);if(!n)return;const o=n.o,r=()=>{};if(1&n.i)jt(t,n,o.L),(null==n?void 0:n.T)||(null==n?void 0:n.P)&&n.P.then((()=>{}));else{n.i|=1,12&o.i&&(t=>{if(!i.document)return;const n=t["s-cr"]=i.document.createComment("");n["s-cn"]=!0,it(t,n,t.firstChild)})(t);{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){ct(n,n.A=e);break}}o.t&&Object.entries(o.t).map((([n,[e]])=>{if(31&e&&n in t&&t[n]!==Object.prototype[n]){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;try{if(!(32&n.i)&&(n.i|=32,o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.i|=128)),o&&o.style)){let t;"string"==typeof o.style&&(t=o.style);const n=C(e);if(!s.has(n)){const o=()=>{};((t,n,e)=>{let o=s.get(t);f&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,s.set(t,o)})(n,t,!!(1&e.i)),o()}}const l=n.A,i=()=>ft(n,!0);l&&l["s-rc"]?l["s-rc"].push(i):i()}catch(e){l(e,t),n._&&(n._(),n._=void 0),n.R&&n.R(t)}})(t,n,o)}r()}})(this),u&&u.call(this)},disconnectedCallback(){(async t=>{if(!(1&c.i)){const n=e(t);(null==n?void 0:n.U)&&(n.U.map((t=>t())),n.U=void 0)}A.has(t)&&A.delete(t),t.shadowRoot&&A.has(t.shadowRoot)&&A.delete(t.shadowRoot)})(this),a&&a.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${r.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else w.call(this,r)}}),Object.defineProperty(t,"is",{value:r.p,configurable:!0}),gt(t,r)}catch(n){return l(n),t}},jt=(t,n,e)=>{e&&i.document&&e.map((([e,o,l])=>{const s=St(i.document,t,e),r=Ot(n,l),f=Nt(e);c.ael(s,o,r,f),(n.U=n.U||[]).push((()=>c.rel(s,o,r,f)))}))},Ot=(t,n)=>e=>{try{t.$hostElement$[n](e)}catch(n){l(n,t.$hostElement$)}},St=(t,n,e)=>8&e?i:n,Nt=t=>({passive:!!(1&t),capture:!!(2&t)}),kt=t=>c.C=t,Mt=t=>Object.assign(c,t);function Et(t,n){rt({o:{i:0,p:n.tagName},$hostElement$:n},t)}function _t(t){return t}export{r as H,L as a,P as c,$ as getAssetPath,x as h,wt as p,Et as render,g as setAssetPath,kt as setNonce,Mt as setPlatformOptions,_t as t}