@webquark/core 1.0.2 → 1.1.0-dev.10

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 (519) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +17 -98
  3. package/dist/browser/components/index.d.ts +1 -0
  4. package/dist/browser/components/index.js +1 -0
  5. package/dist/browser/components/q-accordion.d.ts +1 -0
  6. package/dist/browser/components/q-accordion.js +1 -0
  7. package/dist/browser/components/q-alert.d.ts +1 -0
  8. package/dist/browser/components/q-alert.js +1 -0
  9. package/dist/browser/components/q-avatar.d.ts +1 -0
  10. package/dist/browser/components/q-avatar.js +1 -0
  11. package/dist/browser/components/q-banner.d.ts +1 -0
  12. package/dist/browser/components/q-banner.js +1 -0
  13. package/dist/browser/components/q-button.d.ts +1 -0
  14. package/dist/browser/components/q-button.js +1 -0
  15. package/dist/browser/components/q-card.d.ts +1 -0
  16. package/dist/browser/components/q-card.js +1 -0
  17. package/dist/browser/components/q-carousel.d.ts +1 -0
  18. package/dist/browser/components/q-carousel.js +1 -0
  19. package/dist/browser/components/q-chip.d.ts +1 -0
  20. package/dist/browser/components/q-chip.js +1 -0
  21. package/dist/browser/components/q-conversation-bubble.d.ts +1 -0
  22. package/dist/browser/components/q-conversation-bubble.js +1 -0
  23. package/dist/browser/components/q-data-table.d.ts +1 -0
  24. package/dist/browser/components/q-data-table.js +1 -0
  25. package/dist/browser/components/q-dialog.d.ts +1 -0
  26. package/dist/browser/components/q-dialog.js +1 -0
  27. package/dist/browser/components/q-dropdown.d.ts +1 -0
  28. package/dist/browser/components/q-dropdown.js +1 -0
  29. package/dist/browser/components/q-form.d.ts +1 -0
  30. package/dist/browser/components/q-form.js +1 -0
  31. package/dist/browser/components/q-grid.d.ts +1 -0
  32. package/dist/browser/components/q-grid.js +1 -0
  33. package/dist/browser/components/q-icon.d.ts +1 -0
  34. package/dist/browser/components/q-icon.js +1 -0
  35. package/dist/browser/components/q-image-comparison.d.ts +1 -0
  36. package/dist/browser/components/q-image-comparison.js +1 -0
  37. package/dist/browser/components/q-inline.d.ts +1 -0
  38. package/dist/browser/components/q-inline.js +1 -0
  39. package/dist/browser/components/q-input.d.ts +1 -0
  40. package/dist/browser/components/q-input.js +1 -0
  41. package/dist/browser/components/q-link.d.ts +1 -0
  42. package/dist/browser/components/q-link.js +1 -0
  43. package/dist/browser/components/q-map.d.ts +1 -0
  44. package/dist/browser/components/q-map.js +1 -0
  45. package/dist/browser/components/q-media.d.ts +1 -0
  46. package/dist/browser/components/q-media.js +1 -0
  47. package/dist/browser/components/q-navbar.d.ts +1 -0
  48. package/dist/browser/components/q-navbar.js +1 -0
  49. package/dist/browser/components/q-pagination.d.ts +1 -0
  50. package/dist/browser/components/q-pagination.js +1 -0
  51. package/dist/browser/components/q-panel.d.ts +1 -0
  52. package/dist/browser/components/q-panel.js +1 -0
  53. package/dist/browser/components/q-progress.d.ts +1 -0
  54. package/dist/browser/components/q-progress.js +1 -0
  55. package/dist/browser/components/q-quantity-selector.d.ts +1 -0
  56. package/dist/browser/components/q-quantity-selector.js +1 -0
  57. package/dist/browser/components/q-radio-group.d.ts +1 -0
  58. package/dist/browser/components/q-radio-group.js +1 -0
  59. package/dist/browser/components/q-reel.d.ts +1 -0
  60. package/dist/browser/components/q-reel.js +1 -0
  61. package/dist/browser/components/q-scrollable.d.ts +1 -0
  62. package/dist/browser/components/q-scrollable.js +1 -0
  63. package/dist/browser/components/q-section.d.ts +1 -0
  64. package/dist/browser/components/q-section.js +1 -0
  65. package/dist/browser/components/q-sidepanel.d.ts +1 -0
  66. package/dist/browser/components/q-sidepanel.js +1 -0
  67. package/dist/browser/components/q-stack.d.ts +1 -0
  68. package/dist/browser/components/q-stack.js +1 -0
  69. package/dist/browser/components/q-step-diagram-item.d.ts +1 -0
  70. package/dist/browser/components/q-step-diagram-item.js +1 -0
  71. package/dist/browser/components/q-step-diagram.d.ts +1 -0
  72. package/dist/browser/components/q-step-diagram.js +1 -0
  73. package/dist/browser/components/q-syntax-box.d.ts +1 -0
  74. package/dist/browser/components/q-syntax-box.js +1 -0
  75. package/dist/browser/components/q-tabs.d.ts +1 -0
  76. package/dist/browser/components/q-tabs.js +1 -0
  77. package/dist/browser/components/q-textarea.d.ts +1 -0
  78. package/dist/browser/components/q-textarea.js +1 -0
  79. package/dist/browser/components/q-thumbnail.d.ts +1 -0
  80. package/dist/browser/components/q-thumbnail.js +1 -0
  81. package/dist/browser/components/q-toast.d.ts +1 -0
  82. package/dist/browser/components/q-toast.js +1 -0
  83. package/dist/browser/components/q-toggle.d.ts +1 -0
  84. package/dist/browser/components/q-toggle.js +1 -0
  85. package/dist/browser/components/q-toolbar.d.ts +1 -0
  86. package/dist/browser/components/q-toolbar.js +1 -0
  87. package/dist/browser/components/q-tooltip.d.ts +1 -0
  88. package/dist/browser/components/q-tooltip.js +1 -0
  89. package/dist/browser/index.cjs +1 -0
  90. package/dist/browser/index.d.ts +1 -0
  91. package/dist/browser/index.js +1 -0
  92. package/dist/browser/loader/index.cjs +1 -0
  93. package/dist/browser/loader/index.d.ts +1 -0
  94. package/dist/browser/loader/index.js +1 -0
  95. package/dist/browser/native-content.css +24 -0
  96. package/dist/browser/webquark.css +1 -0
  97. package/dist/playground/assets/comparison-after.svg +1 -0
  98. package/dist/playground/assets/comparison-before.svg +1 -0
  99. package/dist/playground/assets/icons/braces.svg +14 -14
  100. package/dist/playground/assets/icons/check-preview.png +0 -0
  101. package/dist/playground/assets/icons/check.svg +1 -1
  102. package/dist/playground/assets/icons/chevron-down.svg +1 -1
  103. package/dist/playground/assets/icons/chevron-left.svg +1 -1
  104. package/dist/playground/assets/icons/chevron-right.svg +1 -1
  105. package/dist/playground/assets/icons/chevron-up.svg +1 -1
  106. package/dist/playground/assets/icons/copy.svg +4 -4
  107. package/dist/playground/assets/icons/eye-off.svg +1 -1
  108. package/dist/playground/assets/icons/eye.svg +1 -1
  109. package/dist/playground/assets/icons/minus.svg +1 -1
  110. package/dist/playground/assets/icons/play.svg +1 -1
  111. package/dist/playground/assets/icons/plus.svg +1 -1
  112. package/dist/playground/assets/icons/search.svg +1 -1
  113. package/dist/playground/assets/icons/spinner.svg +1 -1
  114. package/dist/playground/assets/icons/trash-2.svg +1 -1
  115. package/dist/playground/assets/icons/x.svg +1 -1
  116. package/dist/playground/build/index.esm.js +1 -1
  117. package/dist/playground/build/p-023f8437.entry.js +1 -0
  118. package/dist/playground/build/p-030ecde3.entry.js +1 -0
  119. package/dist/playground/build/p-04c8cb9e.entry.js +1 -0
  120. package/dist/playground/build/p-059daa8a.entry.js +1 -0
  121. package/dist/playground/build/p-09cca7b9.entry.js +1 -0
  122. package/dist/playground/build/p-0aa74ad6.entry.js +1 -0
  123. package/dist/playground/build/p-0ae43d6c.entry.js +1 -0
  124. package/dist/playground/build/p-0c3aac3f.entry.js +1 -0
  125. package/dist/playground/build/p-144ef339.entry.js +1 -0
  126. package/dist/playground/build/p-296fbdb1.entry.js +1 -0
  127. package/dist/playground/build/p-36118d90.entry.js +1 -0
  128. package/dist/playground/build/p-3bc4629c.entry.js +1 -0
  129. package/dist/playground/build/p-48fb5228.entry.js +1 -0
  130. package/dist/playground/build/p-4d61b70d.entry.js +1 -0
  131. package/dist/playground/build/p-5f232b44.entry.js +13 -0
  132. package/dist/playground/build/p-64096386.entry.js +1 -0
  133. package/dist/playground/build/p-6bfffa79.entry.js +1 -0
  134. package/dist/playground/build/p-6e28cfe2.entry.js +1 -0
  135. package/dist/playground/build/p-70d9ffde.entry.js +1 -0
  136. package/dist/playground/build/p-888e46a8.entry.js +1 -0
  137. package/dist/playground/build/p-8ece2c62.entry.js +1 -0
  138. package/dist/playground/build/p-90b0858c.entry.js +1 -0
  139. package/dist/playground/build/p-91fff6b6.entry.js +1 -0
  140. package/dist/playground/build/p-923dac41.entry.js +1 -0
  141. package/dist/playground/build/p-97a89cae.entry.js +1 -0
  142. package/dist/playground/build/p-99d785ca.entry.js +1 -0
  143. package/dist/playground/build/p-9e78b796.entry.js +1 -0
  144. package/dist/playground/build/p-9ff7e5a4.entry.js +1 -0
  145. package/dist/playground/build/p-B4Mg1xEw.js +1 -0
  146. package/dist/playground/build/p-B5ElFlHv.js +3 -0
  147. package/dist/playground/build/p-BIIQL66b.js +1 -0
  148. package/dist/playground/build/p-BOdNg0jc.js +1 -0
  149. package/dist/playground/build/p-BcL0NVv0.js +1 -0
  150. package/dist/playground/build/p-Bj2RJb2E.js +1 -0
  151. package/dist/playground/build/p-ByfrUWx1.js +1 -0
  152. package/dist/playground/build/p-CGZPmEUB.js +1 -0
  153. package/dist/playground/build/p-CGml_DQ8.js +1 -0
  154. package/dist/playground/build/p-C_RztzNv.js +5 -0
  155. package/dist/playground/build/p-CoIMrUb3.js +1 -0
  156. package/dist/playground/build/p-CpI3m4_T.js +1 -0
  157. package/dist/playground/build/p-DKrPmn2y.js +13 -0
  158. package/dist/playground/build/p-DWO-pleQ.js +1 -0
  159. package/dist/playground/build/p-DYMWBqU1.js +5 -0
  160. package/dist/playground/build/p-Dhsn99q4.js +1 -0
  161. package/dist/playground/build/p-DstNl_WY.js +1 -0
  162. package/dist/playground/build/p-DuX-9GOi.js +1 -0
  163. package/dist/playground/build/p-SzKf4WZF.js +1 -0
  164. package/dist/playground/build/p-c523ec6f.entry.js +1 -0
  165. package/dist/playground/build/p-c923c9c0.js +1 -0
  166. package/dist/playground/build/p-d0253d64.entry.js +1 -0
  167. package/dist/playground/build/p-d0fbd2b1.entry.js +1 -0
  168. package/dist/playground/build/p-dd115868.entry.js +1 -0
  169. package/dist/playground/build/p-e0bb74ae.css +1 -0
  170. package/dist/playground/build/p-f1bac94c.entry.js +1 -0
  171. package/dist/playground/build/p-f4f97e74.entry.js +1 -0
  172. package/dist/playground/build/p-f63b7214.entry.js +1 -0
  173. package/dist/playground/build/p-f98f9439.entry.js +1 -0
  174. package/dist/playground/build/p-f9ad63ff.entry.js +1 -0
  175. package/dist/playground/build/p-fe200f68.entry.js +1 -0
  176. package/dist/playground/build/p-fe8c634a.entry.js +13 -0
  177. package/dist/playground/build/p-fec6fe0a.entry.js +1 -0
  178. package/dist/playground/build/webquark.css +1 -1
  179. package/dist/playground/build/webquark.esm.js +1 -1
  180. package/dist/playground/css/base.css +122 -145
  181. package/dist/playground/index.html +1 -29
  182. package/dist/playground/logo.svg +8 -8
  183. package/dist/playground/native-content.css +24 -0
  184. package/dist/playground/playground/components.manifest.json +43 -20
  185. package/dist/playground/playground/specs/q-avatar.sandbox.json +24 -0
  186. package/dist/playground/playground/specs/q-button.sandbox.json +210 -198
  187. package/dist/playground/playground/specs/q-card.sandbox.json +178 -144
  188. package/dist/playground/playground/specs/q-carousel.sandbox.json +135 -120
  189. package/dist/playground/playground/specs/q-chip.sandbox.json +105 -0
  190. package/dist/playground/playground/specs/q-conversation-bubble.sandbox.json +26 -0
  191. package/dist/playground/playground/specs/q-data-table.sandbox.json +185 -108
  192. package/dist/playground/playground/specs/q-dialog.sandbox.json +118 -108
  193. package/dist/playground/playground/specs/q-dropdown.sandbox.json +131 -116
  194. package/dist/playground/playground/specs/q-form.sandbox.json +98 -0
  195. package/dist/playground/playground/specs/q-grid.sandbox.json +56 -0
  196. package/dist/playground/playground/specs/q-icon.sandbox.json +154 -138
  197. package/dist/playground/playground/specs/q-image-comparison.sandbox.json +24 -0
  198. package/dist/playground/playground/specs/q-inline.sandbox.json +60 -0
  199. package/dist/playground/playground/specs/q-input.sandbox.json +202 -192
  200. package/dist/playground/playground/specs/q-link.sandbox.json +27 -0
  201. package/dist/playground/playground/specs/q-map.sandbox.json +203 -0
  202. package/dist/playground/playground/specs/q-navbar.sandbox.json +40 -0
  203. package/dist/playground/playground/specs/q-panel.sandbox.json +149 -0
  204. package/dist/playground/playground/specs/q-progress.sandbox.json +117 -0
  205. package/dist/playground/playground/specs/q-quantity-selector.sandbox.json +110 -99
  206. package/dist/playground/playground/specs/q-radio-group.sandbox.json +94 -0
  207. package/dist/playground/playground/specs/q-reel.sandbox.json +70 -70
  208. package/dist/playground/playground/specs/q-scrollable.sandbox.json +102 -102
  209. package/dist/playground/playground/specs/q-sidepanel.sandbox.json +152 -147
  210. package/dist/playground/playground/specs/q-stack.sandbox.json +56 -0
  211. package/dist/playground/playground/specs/q-step-diagram.sandbox.json +56 -56
  212. package/dist/playground/playground/specs/q-syntax-box.sandbox.json +204 -160
  213. package/dist/playground/playground/specs/q-textarea.sandbox.json +153 -133
  214. package/dist/playground/playground/specs/q-toast.sandbox.json +32 -0
  215. package/dist/playground/playground/specs/q-toggle.sandbox.json +206 -196
  216. package/dist/playground/playground/specs/q-toolbar.sandbox.json +111 -0
  217. package/dist/playground/playground/specs/q-tooltip.sandbox.json +65 -65
  218. package/dist/playground/playground.js +1989 -947
  219. package/dist/playground/presets.html +47 -0
  220. package/dist/playground/views/tooling/sample-feed.json +13 -0
  221. package/dist/playground/views/tooling/sample-notes.md +14 -0
  222. package/dist/playground/views/tooling/tooling.html +69 -0
  223. package/dist/tooling/changelog/index.d.ts +1 -0
  224. package/dist/tooling/changelog/index.js +1 -0
  225. package/package.json +68 -84
  226. package/scripts/package.json +1 -0
  227. package/scripts/webquark-serve.js +3 -78
  228. package/scripts/wq-changelog.js +4 -0
  229. package/scripts/wq-switch/README.md +208 -0
  230. package/scripts/wq-switch/dist/index.js +2 -0
  231. package/scripts/wq-switch/dist/setup.js +2 -0
  232. package/dist/cjs/dom-CTqgGpWA.js +0 -238
  233. package/dist/cjs/index-CLlvFbDw.js +0 -1774
  234. package/dist/cjs/index-DGQOjEwT.js +0 -33
  235. package/dist/cjs/index.cjs.js +0 -7
  236. package/dist/cjs/loader.cjs.js +0 -12
  237. package/dist/cjs/q-button_3.cjs.entry.js +0 -603
  238. package/dist/cjs/q-card.cjs.entry.js +0 -55
  239. package/dist/cjs/q-carousel.cjs.entry.js +0 -288
  240. package/dist/cjs/q-circular-progress_2.cjs.entry.js +0 -255
  241. package/dist/cjs/q-data-table.cjs.entry.js +0 -197
  242. package/dist/cjs/q-dialog.cjs.entry.js +0 -143
  243. package/dist/cjs/q-dropdown.cjs.entry.js +0 -348
  244. package/dist/cjs/q-icon.cjs.entry.js +0 -184
  245. package/dist/cjs/q-quantity-selector.cjs.entry.js +0 -178
  246. package/dist/cjs/q-reel.cjs.entry.js +0 -117
  247. package/dist/cjs/q-sidepanel.cjs.entry.js +0 -215
  248. package/dist/cjs/q-step-diagram-item.cjs.entry.js +0 -48
  249. package/dist/cjs/q-step-diagram.cjs.entry.js +0 -47
  250. package/dist/cjs/q-syntax-box.cjs.entry.js +0 -457
  251. package/dist/cjs/q-textarea.cjs.entry.js +0 -136
  252. package/dist/cjs/q-thumbnail.cjs.entry.js +0 -44
  253. package/dist/cjs/q-toggle.cjs.entry.js +0 -148
  254. package/dist/cjs/webquark.cjs.js +0 -24
  255. package/dist/collection/assets/icons/braces.svg +0 -14
  256. package/dist/collection/assets/icons/check.svg +0 -1
  257. package/dist/collection/assets/icons/chevron-down.svg +0 -1
  258. package/dist/collection/assets/icons/chevron-left.svg +0 -1
  259. package/dist/collection/assets/icons/chevron-right.svg +0 -1
  260. package/dist/collection/assets/icons/chevron-up.svg +0 -1
  261. package/dist/collection/assets/icons/copy.svg +0 -4
  262. package/dist/collection/assets/icons/eye-off.svg +0 -1
  263. package/dist/collection/assets/icons/eye.svg +0 -1
  264. package/dist/collection/assets/icons/minus.svg +0 -1
  265. package/dist/collection/assets/icons/play.svg +0 -1
  266. package/dist/collection/assets/icons/plus.svg +0 -1
  267. package/dist/collection/assets/icons/search.svg +0 -1
  268. package/dist/collection/assets/icons/spinner.svg +0 -1
  269. package/dist/collection/assets/icons/trash-2.svg +0 -1
  270. package/dist/collection/assets/icons/x.svg +0 -1
  271. package/dist/collection/collection-manifest.json +0 -32
  272. package/dist/collection/components/button/button.css +0 -174
  273. package/dist/collection/components/button/button.js +0 -358
  274. package/dist/collection/components/card/card.css +0 -96
  275. package/dist/collection/components/card/card.js +0 -147
  276. package/dist/collection/components/carousel/carousel.css +0 -177
  277. package/dist/collection/components/carousel/carousel.js +0 -467
  278. package/dist/collection/components/circular-progress/circular-progress.css +0 -85
  279. package/dist/collection/components/circular-progress/circular-progress.js +0 -122
  280. package/dist/collection/components/data-table/data-table.css +0 -219
  281. package/dist/collection/components/data-table/data-table.js +0 -481
  282. package/dist/collection/components/dialog/dialog.css +0 -240
  283. package/dist/collection/components/dialog/dialog.js +0 -481
  284. package/dist/collection/components/dropdown/dropdown.css +0 -292
  285. package/dist/collection/components/dropdown/dropdown.js +0 -606
  286. package/dist/collection/components/icon/icon.css +0 -39
  287. package/dist/collection/components/icon/icon.js +0 -297
  288. package/dist/collection/components/input/input.css +0 -276
  289. package/dist/collection/components/input/input.js +0 -609
  290. package/dist/collection/components/quantity-selector/quantity-selector.css +0 -131
  291. package/dist/collection/components/quantity-selector/quantity-selector.js +0 -361
  292. package/dist/collection/components/reel/reel.css +0 -185
  293. package/dist/collection/components/reel/reel.js +0 -214
  294. package/dist/collection/components/scrollable/scrollable.css +0 -122
  295. package/dist/collection/components/scrollable/scrollable.js +0 -536
  296. package/dist/collection/components/sidepanel/sidepanel.css +0 -371
  297. package/dist/collection/components/sidepanel/sidepanel.js +0 -460
  298. package/dist/collection/components/step-diagram/step-diagram.css +0 -21
  299. package/dist/collection/components/step-diagram/step-diagram.js +0 -74
  300. package/dist/collection/components/step-diagram-item/step-diagram-item.css +0 -253
  301. package/dist/collection/components/step-diagram-item/step-diagram-item.js +0 -131
  302. package/dist/collection/components/syntax-box/syntax-box.css +0 -206
  303. package/dist/collection/components/syntax-box/syntax-box.js +0 -534
  304. package/dist/collection/components/textarea/textarea.css +0 -83
  305. package/dist/collection/components/textarea/textarea.js +0 -461
  306. package/dist/collection/components/thumbnail/thumbnail.css +0 -109
  307. package/dist/collection/components/thumbnail/thumbnail.js +0 -171
  308. package/dist/collection/components/toggle/toggle.css +0 -212
  309. package/dist/collection/components/toggle/toggle.js +0 -390
  310. package/dist/collection/components/tooltip/tooltip.css +0 -65
  311. package/dist/collection/components/tooltip/tooltip.js +0 -249
  312. package/dist/collection/index.js +0 -10
  313. package/dist/collection/playground/components/playground-code-preview/playground-code-preview.js +0 -48
  314. package/dist/collection/playground/components/playground-event-log/playground-event-log.js +0 -63
  315. package/dist/collection/playground/components/playground-header/playground-header.js +0 -65
  316. package/dist/collection/playground/components/playground-sidebar/playground-sidebar.js +0 -74
  317. package/dist/collection/playground/components/properties-panel/properties-panel.js +0 -146
  318. package/dist/collection/playground/components/properties-panel/property-row.js +0 -31
  319. package/dist/collection/playground/components/properties-panel/slot-row.js +0 -27
  320. package/dist/collection/playground/components/sandbox-viewport/sandbox-panel.js +0 -334
  321. package/dist/collection/playground/components/sandbox-viewport/sandbox-viewport.js +0 -155
  322. package/dist/collection/playground/components/sandbox-viewport/variant-card.js +0 -86
  323. package/dist/collection/playground/components/sandbox-viewport/viewport-tabs.js +0 -39
  324. package/dist/collection/playground/components/theme-designer/theme-designer.js +0 -89
  325. package/dist/collection/playground/components/theme-designer/token-row.js +0 -70
  326. package/dist/collection/playground/components/theme-designer/token-section.js +0 -19
  327. package/dist/collection/playground/dom-factory.js +0 -76
  328. package/dist/collection/playground/events.js +0 -37
  329. package/dist/collection/playground/logo.svg +0 -8
  330. package/dist/collection/playground/playground.bundled.js +0 -2831
  331. package/dist/collection/playground/playground.js +0 -10
  332. package/dist/collection/playground/state.js +0 -158
  333. package/dist/collection/playground/utils/color.js +0 -26
  334. package/dist/collection/playground/utils/dom.js +0 -38
  335. package/dist/collection/playground/utils/index.js +0 -2
  336. package/dist/collection/playground/views/q-button-view/q-button-view.js +0 -6
  337. package/dist/collection/playground/views/q-input-view/q-input-view.js +0 -6
  338. package/dist/collection/utils/dom.js +0 -228
  339. package/dist/collection/utils/formatter.js +0 -177
  340. package/dist/collection/utils/formatter.unit.test.js +0 -53
  341. package/dist/collection/utils/math.js +0 -19
  342. package/dist/collection/utils/syntax.js +0 -110
  343. package/dist/collection/utils/utils.js +0 -28
  344. package/dist/collection/utils/utils.unit.test.js +0 -16
  345. package/dist/components/index.d.ts +0 -35
  346. package/dist/components/index.js +0 -1
  347. package/dist/components/p-91lJS0-v.js +0 -1
  348. package/dist/components/p-B4IF9WVv.js +0 -1
  349. package/dist/components/p-BCSpNDGG.js +0 -1
  350. package/dist/components/p-DScvq41R.js +0 -1
  351. package/dist/components/p-DfTW9B7V.js +0 -1
  352. package/dist/components/p-DgaKWrjd.js +0 -1
  353. package/dist/components/p-Do2ppeKL.js +0 -1
  354. package/dist/components/p-DoQvrOHk.js +0 -1
  355. package/dist/components/q-button.d.ts +0 -11
  356. package/dist/components/q-button.js +0 -1
  357. package/dist/components/q-card.d.ts +0 -11
  358. package/dist/components/q-card.js +0 -1
  359. package/dist/components/q-carousel.d.ts +0 -11
  360. package/dist/components/q-carousel.js +0 -1
  361. package/dist/components/q-circular-progress.d.ts +0 -11
  362. package/dist/components/q-circular-progress.js +0 -1
  363. package/dist/components/q-data-table.d.ts +0 -11
  364. package/dist/components/q-data-table.js +0 -1
  365. package/dist/components/q-dialog.d.ts +0 -11
  366. package/dist/components/q-dialog.js +0 -1
  367. package/dist/components/q-dropdown.d.ts +0 -11
  368. package/dist/components/q-dropdown.js +0 -1
  369. package/dist/components/q-icon.d.ts +0 -11
  370. package/dist/components/q-icon.js +0 -1
  371. package/dist/components/q-input.d.ts +0 -11
  372. package/dist/components/q-input.js +0 -1
  373. package/dist/components/q-quantity-selector.d.ts +0 -11
  374. package/dist/components/q-quantity-selector.js +0 -1
  375. package/dist/components/q-reel.d.ts +0 -11
  376. package/dist/components/q-reel.js +0 -1
  377. package/dist/components/q-scrollable.d.ts +0 -11
  378. package/dist/components/q-scrollable.js +0 -1
  379. package/dist/components/q-sidepanel.d.ts +0 -11
  380. package/dist/components/q-sidepanel.js +0 -1
  381. package/dist/components/q-step-diagram-item.d.ts +0 -11
  382. package/dist/components/q-step-diagram-item.js +0 -1
  383. package/dist/components/q-step-diagram.d.ts +0 -11
  384. package/dist/components/q-step-diagram.js +0 -1
  385. package/dist/components/q-syntax-box.d.ts +0 -11
  386. package/dist/components/q-syntax-box.js +0 -1
  387. package/dist/components/q-textarea.d.ts +0 -11
  388. package/dist/components/q-textarea.js +0 -1
  389. package/dist/components/q-thumbnail.d.ts +0 -11
  390. package/dist/components/q-thumbnail.js +0 -1
  391. package/dist/components/q-toggle.d.ts +0 -11
  392. package/dist/components/q-toggle.js +0 -1
  393. package/dist/components/q-tooltip.d.ts +0 -11
  394. package/dist/components/q-tooltip.js +0 -1
  395. package/dist/esm/dom-DoQvrOHk.js +0 -230
  396. package/dist/esm/index-BJiYCN3i.js +0 -30
  397. package/dist/esm/index-CYoQ4Zv3.js +0 -1764
  398. package/dist/esm/index.js +0 -1
  399. package/dist/esm/loader.js +0 -10
  400. package/dist/esm/q-button_3.entry.js +0 -599
  401. package/dist/esm/q-card.entry.js +0 -53
  402. package/dist/esm/q-carousel.entry.js +0 -286
  403. package/dist/esm/q-circular-progress_2.entry.js +0 -252
  404. package/dist/esm/q-data-table.entry.js +0 -195
  405. package/dist/esm/q-dialog.entry.js +0 -141
  406. package/dist/esm/q-dropdown.entry.js +0 -346
  407. package/dist/esm/q-icon.entry.js +0 -182
  408. package/dist/esm/q-quantity-selector.entry.js +0 -176
  409. package/dist/esm/q-reel.entry.js +0 -115
  410. package/dist/esm/q-sidepanel.entry.js +0 -213
  411. package/dist/esm/q-step-diagram-item.entry.js +0 -46
  412. package/dist/esm/q-step-diagram.entry.js +0 -45
  413. package/dist/esm/q-syntax-box.entry.js +0 -455
  414. package/dist/esm/q-textarea.entry.js +0 -134
  415. package/dist/esm/q-thumbnail.entry.js +0 -42
  416. package/dist/esm/q-toggle.entry.js +0 -146
  417. package/dist/esm/webquark.js +0 -20
  418. package/dist/index.cjs.js +0 -1
  419. package/dist/index.js +0 -1
  420. package/dist/loader/cdn.js +0 -1
  421. package/dist/loader/index.cjs.js +0 -1
  422. package/dist/loader/index.d.ts +0 -24
  423. package/dist/loader/index.es2017.js +0 -1
  424. package/dist/loader/index.js +0 -2
  425. package/dist/playground/build/p-095635d3.entry.js +0 -1
  426. package/dist/playground/build/p-1187e439.entry.js +0 -1
  427. package/dist/playground/build/p-389e2cd3.entry.js +0 -1
  428. package/dist/playground/build/p-38d9e75b.entry.js +0 -1
  429. package/dist/playground/build/p-4ce667f1.entry.js +0 -1
  430. package/dist/playground/build/p-66b0eb0f.entry.js +0 -1
  431. package/dist/playground/build/p-69d33f9d.entry.js +0 -1
  432. package/dist/playground/build/p-6dc7b987.entry.js +0 -1
  433. package/dist/playground/build/p-76e04a7f.entry.js +0 -1
  434. package/dist/playground/build/p-776a0eb6.entry.js +0 -1
  435. package/dist/playground/build/p-7c4532f3.entry.js +0 -1
  436. package/dist/playground/build/p-7d2144cf.entry.js +0 -1
  437. package/dist/playground/build/p-84185204.entry.js +0 -1
  438. package/dist/playground/build/p-938cd8a6.entry.js +0 -1
  439. package/dist/playground/build/p-CYoQ4Zv3.js +0 -2
  440. package/dist/playground/build/p-DoQvrOHk.js +0 -1
  441. package/dist/playground/build/p-a182b818.entry.js +0 -1
  442. package/dist/playground/build/p-aa017815.entry.js +0 -1
  443. package/dist/playground/build/p-d7607e11.entry.js +0 -1
  444. package/dist/playground/playground/specs/q-circular-progress.sandbox.json +0 -91
  445. package/dist/types/components/button/button.d.ts +0 -26
  446. package/dist/types/components/card/card.d.ts +0 -12
  447. package/dist/types/components/carousel/carousel.d.ts +0 -44
  448. package/dist/types/components/circular-progress/circular-progress.d.ts +0 -7
  449. package/dist/types/components/data-table/data-table.d.ts +0 -45
  450. package/dist/types/components/dialog/dialog.d.ts +0 -35
  451. package/dist/types/components/dropdown/dropdown.d.ts +0 -49
  452. package/dist/types/components/icon/icon.d.ts +0 -33
  453. package/dist/types/components/input/input.d.ts +0 -43
  454. package/dist/types/components/quantity-selector/quantity-selector.d.ts +0 -31
  455. package/dist/types/components/reel/reel.d.ts +0 -23
  456. package/dist/types/components/scrollable/scrollable.d.ts +0 -47
  457. package/dist/types/components/sidepanel/sidepanel.d.ts +0 -58
  458. package/dist/types/components/step-diagram/step-diagram.d.ts +0 -10
  459. package/dist/types/components/step-diagram-item/step-diagram-item.d.ts +0 -12
  460. package/dist/types/components/syntax-box/syntax-box.d.ts +0 -37
  461. package/dist/types/components/textarea/textarea.d.ts +0 -36
  462. package/dist/types/components/thumbnail/thumbnail.d.ts +0 -18
  463. package/dist/types/components/toggle/toggle.d.ts +0 -36
  464. package/dist/types/components/tooltip/tooltip.d.ts +0 -29
  465. package/dist/types/components.d.ts +0 -1752
  466. package/dist/types/declarations.d.ts +0 -9
  467. package/dist/types/index.d.ts +0 -11
  468. package/dist/types/playground/components/playground-code-preview/playground-code-preview.d.ts +0 -9
  469. package/dist/types/playground/components/playground-event-log/playground-event-log.d.ts +0 -11
  470. package/dist/types/playground/components/playground-header/playground-header.d.ts +0 -10
  471. package/dist/types/playground/components/playground-sidebar/playground-sidebar.d.ts +0 -11
  472. package/dist/types/playground/components/properties-panel/properties-panel.d.ts +0 -15
  473. package/dist/types/playground/components/properties-panel/property-row.d.ts +0 -6
  474. package/dist/types/playground/components/properties-panel/slot-row.d.ts +0 -7
  475. package/dist/types/playground/components/sandbox-viewport/sandbox-panel.d.ts +0 -15
  476. package/dist/types/playground/components/sandbox-viewport/sandbox-viewport.d.ts +0 -14
  477. package/dist/types/playground/components/sandbox-viewport/variant-card.d.ts +0 -7
  478. package/dist/types/playground/components/sandbox-viewport/viewport-tabs.d.ts +0 -5
  479. package/dist/types/playground/components/theme-designer/theme-designer.d.ts +0 -15
  480. package/dist/types/playground/components/theme-designer/token-row.d.ts +0 -13
  481. package/dist/types/playground/components/theme-designer/token-section.d.ts +0 -7
  482. package/dist/types/playground/dom-factory.d.ts +0 -12
  483. package/dist/types/playground/events.d.ts +0 -24
  484. package/dist/types/playground/playground.d.ts +0 -7
  485. package/dist/types/playground/state.d.ts +0 -44
  486. package/dist/types/playground/utils/color.d.ts +0 -8
  487. package/dist/types/playground/utils/dom.d.ts +0 -15
  488. package/dist/types/playground/utils/index.d.ts +0 -2
  489. package/dist/types/stencil-public-runtime.d.ts +0 -1861
  490. package/dist/types/utils/dom.d.ts +0 -68
  491. package/dist/types/utils/formatter.d.ts +0 -24
  492. package/dist/types/utils/formatter.unit.test.d.ts +0 -1
  493. package/dist/types/utils/math.d.ts +0 -10
  494. package/dist/types/utils/syntax.d.ts +0 -9
  495. package/dist/types/utils/utils.d.ts +0 -11
  496. package/dist/types/utils/utils.unit.test.d.ts +0 -1
  497. package/dist/webquark/index.esm.js +0 -1
  498. package/dist/webquark/p-095635d3.entry.js +0 -1
  499. package/dist/webquark/p-1187e439.entry.js +0 -1
  500. package/dist/webquark/p-389e2cd3.entry.js +0 -1
  501. package/dist/webquark/p-38d9e75b.entry.js +0 -1
  502. package/dist/webquark/p-4ce667f1.entry.js +0 -1
  503. package/dist/webquark/p-66b0eb0f.entry.js +0 -1
  504. package/dist/webquark/p-69d33f9d.entry.js +0 -1
  505. package/dist/webquark/p-6dc7b987.entry.js +0 -1
  506. package/dist/webquark/p-76e04a7f.entry.js +0 -1
  507. package/dist/webquark/p-776a0eb6.entry.js +0 -1
  508. package/dist/webquark/p-7c4532f3.entry.js +0 -1
  509. package/dist/webquark/p-7d2144cf.entry.js +0 -1
  510. package/dist/webquark/p-84185204.entry.js +0 -1
  511. package/dist/webquark/p-938cd8a6.entry.js +0 -1
  512. package/dist/webquark/p-BJiYCN3i.js +0 -1
  513. package/dist/webquark/p-CYoQ4Zv3.js +0 -2
  514. package/dist/webquark/p-DoQvrOHk.js +0 -1
  515. package/dist/webquark/p-a182b818.entry.js +0 -1
  516. package/dist/webquark/p-aa017815.entry.js +0 -1
  517. package/dist/webquark/p-d7607e11.entry.js +0 -1
  518. package/dist/webquark/webquark.css +0 -1
  519. package/dist/webquark/webquark.esm.js +0 -1
@@ -1,1764 +0,0 @@
1
- const NAMESPACE = 'webquark';
2
- const BUILD = /* webquark */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
3
-
4
- const globalScripts = () => {};
5
- const globalStyles = ":root{--q-color-primary:#60a5fa;--q-color-primary-hover:#93c5fd;--q-color-secondary:#9777ea;--q-color-success:#34d399;--q-color-warning:#fbbf24;--q-color-danger:#f87171;--q-bg-base:#111827;--q-bg-surface-1:#1f2937;--q-bg-surface-2:#374151;--q-bg-surface-3:#4b5563;--q-bg-card:var(--q-bg-surface-1);--q-bg-glass:rgba(31, 41, 55, 0.85);--q-bg-overlay:rgba(0, 0, 0, 0.85);--q-fg-base:#f9fafb;--q-fg-muted:#9ca3af;--q-border-color:#374151;--q-glass-blur:12px;--q-shadow-low:0 2px 4px rgba(0, 0, 0, 0.2);--q-shadow-medium:0 8px 16px rgba(0, 0, 0, 0.3);--q-shadow-high:0 16px 32px rgba(0, 0, 0, 0.45);--q-glow-interactive:0 0 20px rgba(96, 165, 250, 0.3);--q-border-width:1px;--q-border:var(--q-border-width) solid var(--q-border-color);--q-focus-ring:2px solid var(--q-color-primary);--q-font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;--q-font-size-sm:0.7rem;--q-font-size-base:0.9rem;--q-font-size-lg:1rem;--q-font-weight-normal:400;--q-font-weight-bold:600;--q-radius-sm:4px;--q-radius-md:7px;--q-radius-lg:11px;--q-padding-sm:4px;--q-padding-md:9px;--q-padding-lg:16px;--q-transition-fast:150ms ease;--q-transition-normal:250ms cubic-bezier(0.4, 0, 0.2, 1);--q-transition-slow:400ms cubic-bezier(0.4, 0, 0.2, 1);--q-hover-transform:translateY(-4px) scale(1.02);--q-btn-hover-overlay:color-mix(in srgb, var(--q-fg-base) 8%, transparent);--q-card-min-width:280px;--q-card-border:var(--q-border);--q-card-hover-transform:var(--q-hover-transform);--q-card-transition-duration:var(--q-transition-normal);--q-step-diag-line:2px solid var(--q-border-color);--q-step-diag-border:var(--q-border);--q-step-diag-icon-size:32px;--q-step-diag-item-gap:24px;--q-thumb-aspect-ratio:16 / 9;--q-thumb-border:var(--q-border);--q-thumb-hover-transform:var(--q-hover-transform);--q-thumb-overlay-bg:rgba(0, 0, 0, 0.4);--q-thumb-radius:var(--q-radius-md);--q-thumb-border-color:transparent;--q-thumb-glow:var(--q-glow-interactive);--q-reel-gap:12px;--q-reel-columns-desktop:repeat(auto-fill, minmax(200px, 1fr));--q-reel-columns-mobile:1fr;--q-lightbox-max-size:90vh;--q-carousel-gap:16px;--q-carousel-padding:24px 20px;--q-carousel-arrow-bg:var(--q-bg-overlay);--q-carousel-arrow-border:var(--q-border);--q-carousel-arrow-color:#ffffff;--q-carousel-arrow-size:40px;--q-carousel-indicator-gap:8px;--q-carousel-indicator-size:6px;--q-progress-size:120px;--q-progress-stroke-width:8px;--q-progress-linecap:round;--q-progress-track-color:var(--q-border-color);--q-progress-fill-color:var(--q-color-primary);--q-progress-font-size:var(--q-font-size-lg);--q-progress-font-weight:var(--q-font-weight-bold);--q-progress-animation-duration:1s;--q-btn-radius:var(--q-radius-md);--q-btn-font-size:var(--q-font-size-base);--q-btn-font-weight:var(--q-font-weight-bold);--q-btn-active-transform:scale(0.97);--q-btn-transition:all 150ms cubic-bezier(0.4, 0, 0.2, 1);--q-btn-padding-sm:6px 10px;--q-btn-padding-md:5px 8px;--q-btn-padding-lg:9px 16px;--q-field-bg:var(--q-bg-surface-2);--q-field-border:var(--q-border);--q-field-radius:var(--q-radius-md);--q-field-padding:10px 14px;--q-field-border-color-focus:var(--q-color-primary);--q-input-bg:var(--q-field-bg);--q-input-border:var(--q-field-border);--q-input-radius:var(--q-field-radius);--q-input-padding:var(--q-field-padding);--q-dropdown-bg:var(--q-field-bg);--q-dropdown-menu-bg:var(--q-bg-surface-3);--q-dropdown-border:var(--q-field-border);--q-dropdown-radius:var(--q-field-radius);--q-panel-bg:var(--q-bg-surface-1);--q-panel-border:var(--q-border);--q-panel-shadow:var(--q-shadow-high);--q-scrollbar-width:6px;--q-scrollbar-width-thin:thin;--q-scrollbar-track-color:transparent;--q-scrollbar-thumb-color:var(--q-border-color, #374151);--q-scrollbar-thumb-color-hover:var(--q-color-primary, #60a5fa);--q-scrollbar-radius:var(--q-radius-sm, 4px)}@media (prefers-color-scheme: light){:root{--q-color-primary:#3b82f6;--q-color-primary-hover:#2563eb;--q-color-secondary:#7c3aed;--q-color-success:#10b981;--q-color-warning:#f59e0b;--q-color-danger:#ef4444;--q-bg-base:#ffffff;--q-bg-surface-1:#f3f4f6;--q-bg-surface-2:#e5e7eb;--q-bg-surface-3:#d1d5db;--q-bg-card:var(--q-bg-surface-1);--q-bg-glass:rgba(255, 255, 255, 0.85);--q-bg-overlay:rgba(0, 0, 0, 0.6);--q-fg-base:#1f2937;--q-fg-muted:#4b5563;--q-border-color:#e5e7eb;--q-shadow-low:0 2px 4px rgba(0, 0, 0, 0.05);--q-shadow-medium:0 8px 16px rgba(0, 0, 0, 0.08);--q-shadow-high:0 16px 32px rgba(0, 0, 0, 0.12);--q-glow-interactive:0 0 20px rgba(59, 130, 246, 0.3)}}[data-theme='light']{--q-color-primary:#3b82f6;--q-color-primary-hover:#2563eb;--q-color-secondary:#7c3aed;--q-color-success:#10b981;--q-color-warning:#f59e0b;--q-color-danger:#ef4444;--q-bg-base:#ffffff;--q-bg-surface-1:#f3f4f6;--q-bg-surface-2:#e5e7eb;--q-bg-surface-3:#d1d5db;--q-bg-card:var(--q-bg-surface-1);--q-bg-glass:rgba(255, 255, 255, 0.85);--q-bg-overlay:rgba(0, 0, 0, 0.6);--q-fg-base:#1f2937;--q-fg-muted:#4b5563;--q-border-color:#e5e7eb;--q-shadow-low:0 2px 4px rgba(0, 0, 0, 0.05);--q-shadow-medium:0 8px 16px rgba(0, 0, 0, 0.08);--q-shadow-high:0 16px 32px rgba(0, 0, 0, 0.12);--q-glow-interactive:0 0 20px rgba(59, 130, 246, 0.3)}[data-theme='dark']{--q-color-primary:#60a5fa;--q-color-primary-hover:#93c5fd;--q-color-secondary:#9777ea;--q-color-success:#34d399;--q-color-warning:#fbbf24;--q-color-danger:#f87171;--q-bg-base:#111827;--q-bg-surface-1:#1f2937;--q-bg-surface-2:#374151;--q-bg-surface-3:#4b5563;--q-bg-card:var(--q-bg-surface-1);--q-bg-glass:rgba(31, 41, 55, 0.85);--q-bg-overlay:rgba(0, 0, 0, 0.85);--q-fg-base:#f9fafb;--q-fg-muted:#9ca3af;--q-border-color:#374151;--q-shadow-low:0 2px 4px rgba(0, 0, 0, 0.2);--q-shadow-medium:0 8px 16px rgba(0, 0, 0, 0.3);--q-shadow-high:0 16px 32px rgba(0, 0, 0, 0.45);--q-glow-interactive:0 0 20px rgba(96, 165, 250, 0.3)}";
6
-
7
- /*
8
- Stencil Client Platform v4.43.5 | MIT Licensed | https://stenciljs.com
9
- */
10
-
11
-
12
- // src/utils/constants.ts
13
- var SVG_NS = "http://www.w3.org/2000/svg";
14
- var HTML_NS = "http://www.w3.org/1999/xhtml";
15
-
16
- // src/utils/get-prop-descriptor.ts
17
- function getPropertyDescriptor(obj, memberName, getOnly) {
18
- const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
19
- while (obj && obj !== stopAt) {
20
- const desc = Object.getOwnPropertyDescriptor(obj, memberName);
21
- if (desc && (!getOnly || desc.get)) return desc;
22
- obj = Object.getPrototypeOf(obj);
23
- }
24
- return void 0;
25
- }
26
-
27
- // src/utils/es2022-rewire-class-members.ts
28
- var reWireGetterSetter = (instance, hostRef) => {
29
- var _a;
30
- const cmpMeta = hostRef.$cmpMeta$;
31
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
32
- members.map(([memberName, [memberFlags]]) => {
33
- if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
34
- const ogValue = instance[memberName];
35
- const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
36
- if (ogDescriptor) {
37
- Object.defineProperty(instance, memberName, {
38
- get() {
39
- return ogDescriptor.get.call(this);
40
- },
41
- set(newValue) {
42
- ogDescriptor.set.call(this, newValue);
43
- },
44
- configurable: true,
45
- enumerable: true
46
- });
47
- }
48
- if (hostRef.$instanceValues$.has(memberName)) {
49
- instance[memberName] = hostRef.$instanceValues$.get(memberName);
50
- } else if (ogValue !== void 0) {
51
- instance[memberName] = ogValue;
52
- }
53
- }
54
- });
55
- };
56
-
57
- // src/client/client-host-ref.ts
58
- var getHostRef = (ref) => {
59
- if (ref.__stencil__getHostRef) {
60
- return ref.__stencil__getHostRef();
61
- }
62
- return void 0;
63
- };
64
- var registerInstance = (lazyInstance, hostRef) => {
65
- if (!hostRef) return;
66
- lazyInstance.__stencil__getHostRef = () => hostRef;
67
- hostRef.$lazyInstance$ = lazyInstance;
68
- if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
69
- reWireGetterSetter(lazyInstance, hostRef);
70
- }
71
- };
72
- var registerHost = (hostElement, cmpMeta) => {
73
- const hostRef = {
74
- $flags$: 0,
75
- $hostElement$: hostElement,
76
- $cmpMeta$: cmpMeta,
77
- $instanceValues$: /* @__PURE__ */ new Map(),
78
- $serializerValues$: /* @__PURE__ */ new Map()
79
- };
80
- {
81
- hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
82
- }
83
- {
84
- hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
85
- hostElement["s-p"] = [];
86
- hostElement["s-rc"] = [];
87
- }
88
- {
89
- hostRef.$fetchedCbList$ = [];
90
- }
91
- const ref = hostRef;
92
- hostElement.__stencil__getHostRef = () => ref;
93
- return ref;
94
- };
95
- var isMemberInElement = (elm, memberName) => memberName in elm;
96
- var consoleError = (e, el) => (0, console.error)(e, el);
97
-
98
- // src/client/client-load-module.ts
99
- var cmpModules = /* @__PURE__ */ new Map();
100
- var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
101
- const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
102
- const bundleId = cmpMeta.$lazyBundleId$;
103
- if (!bundleId) {
104
- return void 0;
105
- }
106
- const module = cmpModules.get(bundleId) ;
107
- if (module) {
108
- return module[exportName];
109
- }
110
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
111
- return import(
112
- /* @vite-ignore */
113
- /* webpackInclude: /\.entry\.js$/ */
114
- /* webpackExclude: /\.system\.entry\.js$/ */
115
- /* webpackMode: "lazy" */
116
- `./${bundleId}.entry.js${""}`
117
- ).then(
118
- (importedModule) => {
119
- {
120
- cmpModules.set(bundleId, importedModule);
121
- }
122
- return importedModule[exportName];
123
- },
124
- (e) => {
125
- consoleError(e, hostRef.$hostElement$);
126
- }
127
- );
128
- };
129
-
130
- // src/client/client-style.ts
131
- var styles = /* @__PURE__ */ new Map();
132
- var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
133
- var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
134
- var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
135
- "formAssociatedCallback",
136
- "formResetCallback",
137
- "formDisabledCallback",
138
- "formStateRestoreCallback"
139
- ];
140
- var win = typeof window !== "undefined" ? window : {};
141
- var plt = {
142
- $flags$: 0,
143
- $resourcesUrl$: "",
144
- jmp: (h2) => h2(),
145
- raf: (h2) => requestAnimationFrame(h2),
146
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
147
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
148
- ce: (eventName, opts) => new CustomEvent(eventName, opts)
149
- };
150
- var supportsListenerOptions = /* @__PURE__ */ (() => {
151
- var _a;
152
- let supportsListenerOptions2 = false;
153
- try {
154
- (_a = win.document) == null ? void 0 : _a.addEventListener(
155
- "e",
156
- null,
157
- Object.defineProperty({}, "passive", {
158
- get() {
159
- supportsListenerOptions2 = true;
160
- }
161
- })
162
- );
163
- } catch (e) {
164
- }
165
- return supportsListenerOptions2;
166
- })();
167
- var promiseResolve = (v) => Promise.resolve(v);
168
- var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
169
- try {
170
- if (!win.document.adoptedStyleSheets) {
171
- return false;
172
- }
173
- new CSSStyleSheet();
174
- return typeof new CSSStyleSheet().replaceSync === "function";
175
- } catch (e) {
176
- }
177
- return false;
178
- })() ;
179
- var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
180
- var queuePending = false;
181
- var queueDomReads = [];
182
- var queueDomWrites = [];
183
- var queueTask = (queue, write) => (cb) => {
184
- queue.push(cb);
185
- if (!queuePending) {
186
- queuePending = true;
187
- if (write && plt.$flags$ & 4 /* queueSync */) {
188
- nextTick(flush);
189
- } else {
190
- plt.raf(flush);
191
- }
192
- }
193
- };
194
- var consume = (queue) => {
195
- for (let i2 = 0; i2 < queue.length; i2++) {
196
- try {
197
- queue[i2](performance.now());
198
- } catch (e) {
199
- consoleError(e);
200
- }
201
- }
202
- queue.length = 0;
203
- };
204
- var flush = () => {
205
- consume(queueDomReads);
206
- {
207
- consume(queueDomWrites);
208
- if (queuePending = queueDomReads.length > 0) {
209
- plt.raf(flush);
210
- }
211
- }
212
- };
213
- var nextTick = (cb) => promiseResolve().then(cb);
214
- var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
215
-
216
- // src/utils/style.ts
217
- function createStyleSheetIfNeededAndSupported(styles2) {
218
- if (!supportsConstructableStylesheets) return void 0;
219
- const sheet = new CSSStyleSheet();
220
- sheet.replaceSync(styles2);
221
- return sheet;
222
- }
223
-
224
- // src/utils/shadow-root.ts
225
- var globalStyleSheet;
226
- function createShadowRoot(cmpMeta) {
227
- var _a;
228
- const opts = { mode: "open" };
229
- {
230
- opts.delegatesFocus = !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */);
231
- }
232
- const shadowRoot = this.attachShadow(opts);
233
- if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
234
- if (globalStyleSheet) {
235
- if (supportsMutableAdoptedStyleSheets) {
236
- shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
237
- } else {
238
- shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
239
- }
240
- } else if (!supportsConstructableStylesheets) {
241
- const styleElm = document.createElement("style");
242
- styleElm.innerHTML = globalStyles;
243
- shadowRoot.prepend(styleElm);
244
- }
245
- }
246
- var createTime = (fnName, tagName = "") => {
247
- {
248
- return () => {
249
- return;
250
- };
251
- }
252
- };
253
- var uniqueTime = (key, measureText) => {
254
- {
255
- return () => {
256
- return;
257
- };
258
- }
259
- };
260
-
261
- // src/utils/query-nonce-meta-tag-content.ts
262
- function queryNonceMetaTagContent(doc) {
263
- var _a, _b, _c;
264
- 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;
265
- }
266
-
267
- // src/runtime/styles.ts
268
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
269
- var registerStyle = (scopeId2, cssText, allowCS) => {
270
- let style = styles.get(scopeId2);
271
- if (supportsConstructableStylesheets && allowCS) {
272
- style = style || new CSSStyleSheet();
273
- if (typeof style === "string") {
274
- style = cssText;
275
- } else {
276
- style.replaceSync(cssText);
277
- }
278
- } else {
279
- style = cssText;
280
- }
281
- styles.set(scopeId2, style);
282
- };
283
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
284
- var _a, _b, _c;
285
- const scopeId2 = getScopeId(cmpMeta);
286
- const style = styles.get(scopeId2);
287
- if (!win.document) {
288
- return scopeId2;
289
- }
290
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
291
- if (style) {
292
- if (typeof style === "string") {
293
- styleContainerNode = styleContainerNode.head || styleContainerNode;
294
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
295
- let styleElm;
296
- if (!appliedStyles) {
297
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
298
- }
299
- if (!appliedStyles.has(scopeId2)) {
300
- styleElm = win.document.createElement("style");
301
- styleElm.textContent = style;
302
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
303
- if (nonce != null) {
304
- styleElm.setAttribute("nonce", nonce);
305
- }
306
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
307
- if (styleContainerNode.nodeName === "HEAD") {
308
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
309
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
310
- styleContainerNode.insertBefore(
311
- styleElm,
312
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
313
- );
314
- } else if ("host" in styleContainerNode) {
315
- if (supportsConstructableStylesheets) {
316
- const currentWindow = (_b = styleContainerNode.defaultView) != null ? _b : styleContainerNode.ownerDocument.defaultView;
317
- const stylesheet = new currentWindow.CSSStyleSheet();
318
- stylesheet.replaceSync(style);
319
- if (supportsMutableAdoptedStyleSheets) {
320
- styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
321
- } else {
322
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
323
- }
324
- } else {
325
- const existingStyleContainer = styleContainerNode.querySelector("style");
326
- if (existingStyleContainer && true) {
327
- existingStyleContainer.textContent = style + existingStyleContainer.textContent;
328
- } else {
329
- styleContainerNode.prepend(styleElm);
330
- }
331
- }
332
- } else {
333
- styleContainerNode.append(styleElm);
334
- }
335
- }
336
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
337
- styleContainerNode.insertBefore(styleElm, null);
338
- }
339
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
340
- styleElm.textContent += SLOT_FB_CSS;
341
- }
342
- if (appliedStyles) {
343
- appliedStyles.add(scopeId2);
344
- }
345
- }
346
- } else {
347
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
348
- if (!appliedStyles) {
349
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
350
- }
351
- if (!appliedStyles.has(scopeId2)) {
352
- const currentWindow = (_c = styleContainerNode.defaultView) != null ? _c : styleContainerNode.ownerDocument.defaultView;
353
- let stylesheet;
354
- if (style.constructor === currentWindow.CSSStyleSheet) {
355
- stylesheet = style;
356
- } else {
357
- stylesheet = new currentWindow.CSSStyleSheet();
358
- for (let i2 = 0; i2 < style.cssRules.length; i2++) {
359
- stylesheet.insertRule(style.cssRules[i2].cssText, i2);
360
- }
361
- }
362
- if (supportsMutableAdoptedStyleSheets) {
363
- styleContainerNode.adoptedStyleSheets.push(stylesheet);
364
- } else {
365
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
366
- }
367
- appliedStyles.add(scopeId2);
368
- }
369
- }
370
- }
371
- return scopeId2;
372
- };
373
- var attachStyles = (hostRef) => {
374
- const cmpMeta = hostRef.$cmpMeta$;
375
- const elm = hostRef.$hostElement$;
376
- const flags = cmpMeta.$flags$;
377
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
378
- const scopeId2 = addStyle(
379
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
380
- cmpMeta);
381
- if (flags & 10 /* needsScopedEncapsulation */) {
382
- elm["s-sc"] = scopeId2;
383
- elm.classList.add(scopeId2 + "-h");
384
- }
385
- endAttachStyles();
386
- };
387
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
388
- var isComplexType = (o) => {
389
- o = typeof o;
390
- return o === "object" || o === "function";
391
- };
392
-
393
- // src/runtime/vdom/h.ts
394
- var h = (nodeName, vnodeData, ...children) => {
395
- if (typeof nodeName === "string") {
396
- nodeName = transformTag(nodeName);
397
- }
398
- let child = null;
399
- let key = null;
400
- let simple = false;
401
- let lastSimple = false;
402
- const vNodeChildren = [];
403
- const walk = (c) => {
404
- for (let i2 = 0; i2 < c.length; i2++) {
405
- child = c[i2];
406
- if (Array.isArray(child)) {
407
- walk(child);
408
- } else if (child != null && typeof child !== "boolean") {
409
- if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
410
- child = String(child);
411
- }
412
- if (simple && lastSimple) {
413
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
414
- } else {
415
- vNodeChildren.push(simple ? newVNode(null, child) : child);
416
- }
417
- lastSimple = simple;
418
- }
419
- }
420
- };
421
- walk(children);
422
- if (vnodeData) {
423
- if (vnodeData.key) {
424
- key = vnodeData.key;
425
- }
426
- {
427
- const classData = vnodeData.className || vnodeData.class;
428
- if (classData) {
429
- vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
430
- }
431
- }
432
- }
433
- const vnode = newVNode(nodeName, null);
434
- vnode.$attrs$ = vnodeData;
435
- if (vNodeChildren.length > 0) {
436
- vnode.$children$ = vNodeChildren;
437
- }
438
- {
439
- vnode.$key$ = key;
440
- }
441
- return vnode;
442
- };
443
- var newVNode = (tag, text) => {
444
- const vnode = {
445
- $flags$: 0,
446
- $tag$: tag,
447
- // Normalize undefined to null to prevent rendering "undefined" as text
448
- $text$: text != null ? text : null,
449
- $elm$: null,
450
- $children$: null
451
- };
452
- {
453
- vnode.$attrs$ = null;
454
- }
455
- {
456
- vnode.$key$ = null;
457
- }
458
- return vnode;
459
- };
460
- var Host = {};
461
- var isHost = (node) => node && node.$tag$ === Host;
462
-
463
- // src/runtime/normalize-watchers.ts
464
- var normalizeWatchers = (raw) => {
465
- if (!raw) return void 0;
466
- const keys = Object.keys(raw);
467
- if (keys.length === 0) return void 0;
468
- let hasLegacy = false;
469
- for (const propName of keys) {
470
- if (hasLegacy) break;
471
- for (const h2 of raw[propName]) {
472
- if (typeof h2 === "string") {
473
- hasLegacy = true;
474
- break;
475
- }
476
- }
477
- }
478
- if (!hasLegacy) return raw;
479
- const out = {};
480
- for (const propName of keys) {
481
- out[propName] = raw[propName].map(
482
- (h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
483
- );
484
- }
485
- return out;
486
- };
487
-
488
- // src/runtime/parse-property-value.ts
489
- var parsePropertyValue = (propValue, propType, isFormAssociated) => {
490
- if (propValue != null && !isComplexType(propValue)) {
491
- if (propType & 4 /* Boolean */) {
492
- if (isFormAssociated && typeof propValue === "string") {
493
- return propValue === "" || !!propValue;
494
- } else {
495
- return propValue === "false" ? false : propValue === "" || !!propValue;
496
- }
497
- }
498
- if (propType & 2 /* Number */) {
499
- return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
500
- }
501
- if (propType & 1 /* String */) {
502
- return String(propValue);
503
- }
504
- return propValue;
505
- }
506
- return propValue;
507
- };
508
- var getElement = (ref) => {
509
- var _a;
510
- return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
511
- };
512
-
513
- // src/runtime/event-emitter.ts
514
- var createEvent = (ref, name, flags) => {
515
- const elm = getElement(ref);
516
- return {
517
- emit: (detail) => {
518
- return emitEvent(elm, name, {
519
- bubbles: true,
520
- composed: true,
521
- cancelable: true,
522
- detail
523
- });
524
- }
525
- };
526
- };
527
- var emitEvent = (elm, name, opts) => {
528
- const ev = plt.ce(name, opts);
529
- elm.dispatchEvent(ev);
530
- return ev;
531
- };
532
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
533
- if (oldValue === newValue) {
534
- return;
535
- }
536
- let isProp = isMemberInElement(elm, memberName);
537
- let ln = memberName.toLowerCase();
538
- if (memberName === "class") {
539
- const classList = elm.classList;
540
- const oldClasses = parseClassList(oldValue);
541
- let newClasses = parseClassList(newValue);
542
- {
543
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
544
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
545
- }
546
- } else if (memberName === "style") {
547
- {
548
- for (const prop in oldValue) {
549
- if (!newValue || newValue[prop] == null) {
550
- if (prop.includes("-")) {
551
- elm.style.removeProperty(prop);
552
- } else {
553
- elm.style[prop] = "";
554
- }
555
- }
556
- }
557
- }
558
- for (const prop in newValue) {
559
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
560
- if (prop.includes("-")) {
561
- elm.style.setProperty(prop, newValue[prop]);
562
- } else {
563
- elm.style[prop] = newValue[prop];
564
- }
565
- }
566
- }
567
- } else if (memberName === "key") ; else if (memberName === "ref") {
568
- if (newValue) {
569
- queueRefAttachment(newValue, elm);
570
- }
571
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
572
- if (memberName[2] === "-") {
573
- memberName = memberName.slice(3);
574
- } else if (isMemberInElement(win, ln)) {
575
- memberName = ln.slice(2);
576
- } else {
577
- memberName = ln[2] + memberName.slice(3);
578
- }
579
- if (oldValue || newValue) {
580
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
581
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
582
- if (oldValue) {
583
- plt.rel(elm, memberName, oldValue, capture);
584
- }
585
- if (newValue) {
586
- plt.ael(elm, memberName, newValue, capture);
587
- }
588
- }
589
- } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
590
- const propName = memberName.slice(5);
591
- let attrName;
592
- {
593
- const hostRef = getHostRef(elm);
594
- if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
595
- const memberMeta = hostRef.$cmpMeta$.$members$[propName];
596
- if (memberMeta && memberMeta[1]) {
597
- attrName = memberMeta[1];
598
- }
599
- }
600
- }
601
- if (!attrName) {
602
- attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
603
- }
604
- if (newValue == null || newValue === false) {
605
- if (newValue !== false || elm.getAttribute(attrName) === "") {
606
- elm.removeAttribute(attrName);
607
- }
608
- } else {
609
- elm.setAttribute(attrName, newValue === true ? "" : newValue);
610
- }
611
- return;
612
- } else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
613
- const propName = memberName.slice(5);
614
- try {
615
- elm[propName] = newValue;
616
- } catch (e) {
617
- }
618
- return;
619
- } else {
620
- const isComplex = isComplexType(newValue);
621
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
622
- try {
623
- if (!elm.tagName.includes("-")) {
624
- const n = newValue == null ? "" : newValue;
625
- if (memberName === "list") {
626
- isProp = false;
627
- } else if (oldValue == null || elm[memberName] !== n) {
628
- if (typeof elm.__lookupSetter__(memberName) === "function") {
629
- elm[memberName] = n;
630
- } else {
631
- elm.setAttribute(memberName, n);
632
- }
633
- }
634
- } else if (elm[memberName] !== newValue) {
635
- elm[memberName] = newValue;
636
- }
637
- } catch (e) {
638
- }
639
- }
640
- if (newValue == null || newValue === false) {
641
- if (newValue !== false || elm.getAttribute(memberName) === "") {
642
- {
643
- elm.removeAttribute(memberName);
644
- }
645
- }
646
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
647
- newValue = newValue === true ? "" : newValue;
648
- {
649
- elm.setAttribute(memberName, newValue);
650
- }
651
- }
652
- }
653
- };
654
- var parseClassListRegex = /\s/;
655
- var parseClassList = (value) => {
656
- if (typeof value === "object" && value && "baseVal" in value) {
657
- value = value.baseVal;
658
- }
659
- if (!value || typeof value !== "string") {
660
- return [];
661
- }
662
- return value.split(parseClassListRegex);
663
- };
664
- var CAPTURE_EVENT_SUFFIX = "Capture";
665
- var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
666
-
667
- // src/runtime/vdom/update-element.ts
668
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
669
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
670
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
671
- const newVnodeAttrs = newVnode.$attrs$ || {};
672
- {
673
- for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
674
- if (!(memberName in newVnodeAttrs)) {
675
- setAccessor(
676
- elm,
677
- memberName,
678
- oldVnodeAttrs[memberName],
679
- void 0,
680
- isSvgMode2,
681
- newVnode.$flags$);
682
- }
683
- }
684
- }
685
- for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
686
- setAccessor(
687
- elm,
688
- memberName,
689
- oldVnodeAttrs[memberName],
690
- newVnodeAttrs[memberName],
691
- isSvgMode2,
692
- newVnode.$flags$);
693
- }
694
- };
695
- function sortedAttrNames(attrNames) {
696
- return attrNames.includes("ref") ? (
697
- // we need to sort these to ensure that `'ref'` is the last attr
698
- [...attrNames.filter((attr) => attr !== "ref"), "ref"]
699
- ) : (
700
- // no need to sort, return the original array
701
- attrNames
702
- );
703
- }
704
- var hostTagName;
705
- var useNativeShadowDom = false;
706
- var isSvgMode = false;
707
- var refCallbacksToRemove = [];
708
- var refCallbacksToAttach = [];
709
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
710
- const newVNode2 = newParentVNode.$children$[childIndex];
711
- let i2 = 0;
712
- let elm;
713
- let childNode;
714
- if (newVNode2.$text$ != null) {
715
- elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
716
- } else {
717
- if (!isSvgMode) {
718
- isSvgMode = newVNode2.$tag$ === "svg";
719
- }
720
- if (!win.document) {
721
- throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
722
- }
723
- elm = newVNode2.$elm$ = win.document.createElementNS(
724
- isSvgMode ? SVG_NS : HTML_NS,
725
- newVNode2.$tag$
726
- ) ;
727
- if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
728
- isSvgMode = false;
729
- }
730
- {
731
- updateElement(null, newVNode2, isSvgMode);
732
- }
733
- if (newVNode2.$children$) {
734
- const appendTarget = newVNode2.$tag$ === "template" ? elm.content : elm;
735
- for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
736
- childNode = createElm(oldParentVNode, newVNode2, i2);
737
- if (childNode) {
738
- appendTarget.appendChild(childNode);
739
- }
740
- }
741
- }
742
- {
743
- if (newVNode2.$tag$ === "svg") {
744
- isSvgMode = false;
745
- } else if (elm.tagName === "foreignObject") {
746
- isSvgMode = true;
747
- }
748
- }
749
- }
750
- elm["s-hn"] = hostTagName;
751
- return elm;
752
- };
753
- var relocateToHostRoot = (parentElm) => {
754
- plt.$flags$ |= 1 /* isTmpDisconnected */;
755
- const host = parentElm.closest(hostTagName.toLowerCase());
756
- if (host != null) {
757
- const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
758
- (ref) => ref["s-cr"]
759
- );
760
- const childNodeArray = Array.from(
761
- parentElm.__childNodes || parentElm.childNodes
762
- );
763
- for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
764
- if (childNode["s-sh"] != null) {
765
- insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
766
- childNode["s-sh"] = void 0;
767
- }
768
- }
769
- }
770
- plt.$flags$ &= -2 /* isTmpDisconnected */;
771
- };
772
- var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
773
- let containerElm = parentElm;
774
- let childNode;
775
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
776
- containerElm = containerElm.shadowRoot;
777
- }
778
- if (parentVNode.$tag$ === "template") {
779
- containerElm = containerElm.content;
780
- }
781
- for (; startIdx <= endIdx; ++startIdx) {
782
- if (vnodes[startIdx]) {
783
- childNode = createElm(null, parentVNode, startIdx);
784
- if (childNode) {
785
- vnodes[startIdx].$elm$ = childNode;
786
- insertBefore(containerElm, childNode, before);
787
- }
788
- }
789
- }
790
- };
791
- var removeVnodes = (vnodes, startIdx, endIdx) => {
792
- for (let index = startIdx; index <= endIdx; ++index) {
793
- const vnode = vnodes[index];
794
- if (vnode) {
795
- const elm = vnode.$elm$;
796
- nullifyVNodeRefs(vnode);
797
- if (elm) {
798
- elm.remove();
799
- }
800
- }
801
- }
802
- };
803
- var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
804
- let oldStartIdx = 0;
805
- let newStartIdx = 0;
806
- let idxInOld = 0;
807
- let i2 = 0;
808
- let oldEndIdx = oldCh.length - 1;
809
- let oldStartVnode = oldCh[0];
810
- let oldEndVnode = oldCh[oldEndIdx];
811
- let newEndIdx = newCh.length - 1;
812
- let newStartVnode = newCh[0];
813
- let newEndVnode = newCh[newEndIdx];
814
- let node;
815
- let elmToMove;
816
- const containerElm = newVNode2.$tag$ === "template" ? parentElm.content : parentElm;
817
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
818
- if (oldStartVnode == null) {
819
- oldStartVnode = oldCh[++oldStartIdx];
820
- } else if (oldEndVnode == null) {
821
- oldEndVnode = oldCh[--oldEndIdx];
822
- } else if (newStartVnode == null) {
823
- newStartVnode = newCh[++newStartIdx];
824
- } else if (newEndVnode == null) {
825
- newEndVnode = newCh[--newEndIdx];
826
- } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
827
- patch(oldStartVnode, newStartVnode, isInitialRender);
828
- oldStartVnode = oldCh[++oldStartIdx];
829
- newStartVnode = newCh[++newStartIdx];
830
- } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
831
- patch(oldEndVnode, newEndVnode, isInitialRender);
832
- oldEndVnode = oldCh[--oldEndIdx];
833
- newEndVnode = newCh[--newEndIdx];
834
- } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
835
- patch(oldStartVnode, newEndVnode, isInitialRender);
836
- insertBefore(containerElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
837
- oldStartVnode = oldCh[++oldStartIdx];
838
- newEndVnode = newCh[--newEndIdx];
839
- } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
840
- patch(oldEndVnode, newStartVnode, isInitialRender);
841
- insertBefore(containerElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
842
- oldEndVnode = oldCh[--oldEndIdx];
843
- newStartVnode = newCh[++newStartIdx];
844
- } else {
845
- idxInOld = -1;
846
- {
847
- for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
848
- if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
849
- idxInOld = i2;
850
- break;
851
- }
852
- }
853
- }
854
- if (idxInOld >= 0) {
855
- elmToMove = oldCh[idxInOld];
856
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
857
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
858
- } else {
859
- patch(elmToMove, newStartVnode, isInitialRender);
860
- oldCh[idxInOld] = void 0;
861
- node = elmToMove.$elm$;
862
- }
863
- newStartVnode = newCh[++newStartIdx];
864
- } else {
865
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
866
- newStartVnode = newCh[++newStartIdx];
867
- }
868
- if (node) {
869
- {
870
- insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
871
- }
872
- }
873
- }
874
- }
875
- if (oldStartIdx > oldEndIdx) {
876
- addVnodes(
877
- parentElm,
878
- newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
879
- newVNode2,
880
- newCh,
881
- newStartIdx,
882
- newEndIdx
883
- );
884
- } else if (newStartIdx > newEndIdx) {
885
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
886
- }
887
- };
888
- var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
889
- if (leftVNode.$tag$ === rightVNode.$tag$) {
890
- if (!isInitialRender) {
891
- return leftVNode.$key$ === rightVNode.$key$;
892
- }
893
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
894
- leftVNode.$key$ = rightVNode.$key$;
895
- }
896
- return true;
897
- }
898
- return false;
899
- };
900
- var patch = (oldVNode, newVNode2, isInitialRender = false) => {
901
- const elm = newVNode2.$elm$ = oldVNode.$elm$;
902
- const oldChildren = oldVNode.$children$;
903
- const newChildren = newVNode2.$children$;
904
- const tag = newVNode2.$tag$;
905
- const text = newVNode2.$text$;
906
- if (text == null) {
907
- {
908
- isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
909
- }
910
- {
911
- if (tag === "slot" && !useNativeShadowDom) {
912
- if (oldVNode.$name$ !== newVNode2.$name$) {
913
- newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
914
- relocateToHostRoot(newVNode2.$elm$.parentElement);
915
- }
916
- }
917
- updateElement(oldVNode, newVNode2, isSvgMode);
918
- }
919
- if (oldChildren !== null && newChildren !== null) {
920
- updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
921
- } else if (newChildren !== null) {
922
- if (oldVNode.$text$ !== null) {
923
- elm.textContent = "";
924
- }
925
- addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
926
- } else if (
927
- // don't do this on initial render as it can cause non-hydrated content to be removed
928
- !isInitialRender && BUILD.updatable && oldChildren !== null
929
- ) {
930
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
931
- } else ;
932
- if (isSvgMode && tag === "svg") {
933
- isSvgMode = false;
934
- }
935
- } else if (oldVNode.$text$ !== text) {
936
- elm.data = text;
937
- }
938
- };
939
- var nullifyVNodeRefs = (vNode) => {
940
- {
941
- if (vNode.$attrs$ && vNode.$attrs$.ref) {
942
- refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
943
- }
944
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
945
- }
946
- };
947
- var queueRefAttachment = (refCallback, elm) => {
948
- {
949
- refCallbacksToAttach.push(() => refCallback(elm));
950
- }
951
- };
952
- var flushQueuedRefCallbacks = () => {
953
- {
954
- refCallbacksToRemove.forEach((cb) => cb());
955
- refCallbacksToRemove.length = 0;
956
- refCallbacksToAttach.forEach((cb) => cb());
957
- refCallbacksToAttach.length = 0;
958
- }
959
- };
960
- var insertBefore = (parent, newNode, reference, isInitialLoad) => {
961
- if (parent.__insertBefore) {
962
- return parent.__insertBefore(newNode, reference);
963
- } else {
964
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
965
- }
966
- };
967
- var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
968
- const hostElm = hostRef.$hostElement$;
969
- const cmpMeta = hostRef.$cmpMeta$;
970
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
971
- const isHostElement = isHost(renderFnResults);
972
- const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
973
- hostTagName = hostElm.tagName;
974
- if (cmpMeta.$attrsToReflect$) {
975
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
976
- cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
977
- {
978
- rootVnode.$attrs$[attribute] = hostElm[propName];
979
- }
980
- });
981
- }
982
- if (isInitialLoad && rootVnode.$attrs$) {
983
- for (const key of Object.keys(rootVnode.$attrs$)) {
984
- if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
985
- rootVnode.$attrs$[key] = hostElm[key];
986
- }
987
- }
988
- }
989
- rootVnode.$tag$ = null;
990
- rootVnode.$flags$ |= 4 /* isHost */;
991
- hostRef.$vnode$ = rootVnode;
992
- rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
993
- useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
994
- patch(oldVNode, rootVnode, isInitialLoad);
995
- flushQueuedRefCallbacks();
996
- };
997
-
998
- // src/runtime/update-component.ts
999
- var attachToAncestor = (hostRef, ancestorComponent) => {
1000
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1001
- const index = ancestorComponent["s-p"].push(
1002
- new Promise(
1003
- (r) => hostRef.$onRenderResolve$ = () => {
1004
- ancestorComponent["s-p"].splice(index - 1, 1);
1005
- r();
1006
- }
1007
- )
1008
- );
1009
- }
1010
- };
1011
- var scheduleUpdate = (hostRef, isInitialLoad) => {
1012
- {
1013
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
1014
- }
1015
- if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
1016
- hostRef.$flags$ |= 512 /* needsRerender */;
1017
- return;
1018
- }
1019
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1020
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
1021
- if (isInitialLoad) {
1022
- queueMicrotask(() => {
1023
- dispatch();
1024
- });
1025
- return;
1026
- }
1027
- return writeTask(dispatch) ;
1028
- };
1029
- var dispatchHooks = (hostRef, isInitialLoad) => {
1030
- const elm = hostRef.$hostElement$;
1031
- const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
1032
- const instance = hostRef.$lazyInstance$ ;
1033
- if (!instance) {
1034
- throw new Error(
1035
- `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`
1036
- );
1037
- }
1038
- let maybePromise;
1039
- if (isInitialLoad) {
1040
- {
1041
- {
1042
- hostRef.$flags$ |= 256 /* isListenReady */;
1043
- if (hostRef.$queuedListeners$) {
1044
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1045
- hostRef.$queuedListeners$ = void 0;
1046
- }
1047
- }
1048
- if (hostRef.$fetchedCbList$.length) {
1049
- hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
1050
- }
1051
- }
1052
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
1053
- } else {
1054
- maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1055
- }
1056
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1057
- endSchedule();
1058
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1059
- };
1060
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
1061
- console.error(err);
1062
- fn();
1063
- }) : fn();
1064
- var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
1065
- var updateComponent = async (hostRef, instance, isInitialLoad) => {
1066
- var _a;
1067
- const elm = hostRef.$hostElement$;
1068
- const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
1069
- const rc = elm["s-rc"];
1070
- if (isInitialLoad) {
1071
- attachStyles(hostRef);
1072
- }
1073
- const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
1074
- {
1075
- callRender(hostRef, instance, elm, isInitialLoad);
1076
- }
1077
- if (rc) {
1078
- rc.map((cb) => cb());
1079
- elm["s-rc"] = void 0;
1080
- }
1081
- endRender();
1082
- endUpdate();
1083
- {
1084
- const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
1085
- const postUpdate = () => postUpdateComponent(hostRef);
1086
- if (childrenPromises.length === 0) {
1087
- postUpdate();
1088
- } else {
1089
- Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
1090
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
1091
- childrenPromises.length = 0;
1092
- }
1093
- }
1094
- };
1095
- var callRender = (hostRef, instance, elm, isInitialLoad) => {
1096
- try {
1097
- instance = instance.render() ;
1098
- {
1099
- hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1100
- }
1101
- {
1102
- hostRef.$flags$ |= 2 /* hasRendered */;
1103
- }
1104
- {
1105
- {
1106
- {
1107
- renderVdom(hostRef, instance, isInitialLoad);
1108
- }
1109
- }
1110
- }
1111
- } catch (e) {
1112
- consoleError(e, hostRef.$hostElement$);
1113
- }
1114
- return null;
1115
- };
1116
- var postUpdateComponent = (hostRef) => {
1117
- const tagName = hostRef.$cmpMeta$.$tagName$;
1118
- const elm = hostRef.$hostElement$;
1119
- const endPostUpdate = createTime("postUpdate", tagName);
1120
- const instance = hostRef.$lazyInstance$ ;
1121
- const ancestorComponent = hostRef.$ancestorComponent$;
1122
- safeCall(instance, "componentDidRender", void 0, elm);
1123
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1124
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1125
- {
1126
- addHydratedFlag(elm);
1127
- }
1128
- safeCall(instance, "componentDidLoad", void 0, elm);
1129
- endPostUpdate();
1130
- {
1131
- hostRef.$onReadyResolve$(elm);
1132
- if (!ancestorComponent) {
1133
- appDidLoad();
1134
- }
1135
- }
1136
- } else {
1137
- safeCall(instance, "componentDidUpdate", void 0, elm);
1138
- endPostUpdate();
1139
- }
1140
- {
1141
- hostRef.$onInstanceResolve$(elm);
1142
- }
1143
- {
1144
- if (hostRef.$onRenderResolve$) {
1145
- hostRef.$onRenderResolve$();
1146
- hostRef.$onRenderResolve$ = void 0;
1147
- }
1148
- if (hostRef.$flags$ & 512 /* needsRerender */) {
1149
- nextTick(() => scheduleUpdate(hostRef, false));
1150
- }
1151
- hostRef.$flags$ &= -517;
1152
- }
1153
- };
1154
- var appDidLoad = (who) => {
1155
- nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1156
- };
1157
- var safeCall = (instance, method, arg, elm) => {
1158
- if (instance && instance[method]) {
1159
- try {
1160
- return instance[method](arg);
1161
- } catch (e) {
1162
- consoleError(e, elm);
1163
- }
1164
- }
1165
- return void 0;
1166
- };
1167
- var addHydratedFlag = (elm) => {
1168
- var _a;
1169
- return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
1170
- };
1171
-
1172
- // src/runtime/set-value.ts
1173
- var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1174
- var setValue = (ref, propName, newVal, cmpMeta) => {
1175
- const hostRef = getHostRef(ref);
1176
- if (!hostRef) {
1177
- return;
1178
- }
1179
- if (!hostRef) {
1180
- throw new Error(
1181
- `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
1182
- );
1183
- }
1184
- const elm = hostRef.$hostElement$ ;
1185
- const oldVal = hostRef.$instanceValues$.get(propName);
1186
- const flags = hostRef.$flags$;
1187
- const instance = hostRef.$lazyInstance$ ;
1188
- newVal = parsePropertyValue(
1189
- newVal,
1190
- cmpMeta.$members$[propName][0],
1191
- !!(cmpMeta.$flags$ & 64 /* formAssociated */)
1192
- );
1193
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1194
- const didValueChange = newVal !== oldVal && !areBothNaN;
1195
- if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1196
- hostRef.$instanceValues$.set(propName, newVal);
1197
- if (cmpMeta.$watchers$) {
1198
- const watchMethods = cmpMeta.$watchers$[propName];
1199
- if (watchMethods) {
1200
- watchMethods.map((watcher) => {
1201
- try {
1202
- const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
1203
- if (flags & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */) {
1204
- if (!instance) {
1205
- hostRef.$fetchedCbList$.push(() => {
1206
- hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
1207
- });
1208
- } else {
1209
- instance[watchMethodName](newVal, oldVal, propName);
1210
- }
1211
- }
1212
- } catch (e) {
1213
- consoleError(e, elm);
1214
- }
1215
- });
1216
- }
1217
- }
1218
- if (flags & 2 /* hasRendered */) {
1219
- if (instance.componentShouldUpdate) {
1220
- const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
1221
- if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
1222
- return;
1223
- }
1224
- }
1225
- if (!(flags & 16 /* isQueuedForUpdate */)) {
1226
- scheduleUpdate(hostRef, false);
1227
- }
1228
- }
1229
- }
1230
- };
1231
-
1232
- // src/runtime/proxy-component.ts
1233
- var proxyComponent = (Cstr, cmpMeta, flags) => {
1234
- var _a, _b;
1235
- const prototype = Cstr.prototype;
1236
- if (cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
1237
- FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
1238
- Object.defineProperty(prototype, cbName, {
1239
- value(...args) {
1240
- var _a2;
1241
- const hostRef = getHostRef(this);
1242
- const instance = hostRef == null ? void 0 : hostRef.$lazyInstance$ ;
1243
- if (!instance) {
1244
- (_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
1245
- const cb = asyncInstance[cbName];
1246
- typeof cb === "function" && cb.call(asyncInstance, ...args);
1247
- });
1248
- } else {
1249
- const cb = instance[cbName] ;
1250
- typeof cb === "function" && cb.call(instance, ...args);
1251
- }
1252
- }
1253
- });
1254
- });
1255
- }
1256
- if (cmpMeta.$members$ || BUILD.propChangeCallback) {
1257
- {
1258
- if (Cstr.watchers && !cmpMeta.$watchers$) {
1259
- cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
1260
- }
1261
- if (Cstr.deserializers && !cmpMeta.$deserializers$) {
1262
- cmpMeta.$deserializers$ = Cstr.deserializers;
1263
- }
1264
- if (Cstr.serializers && !cmpMeta.$serializers$) {
1265
- cmpMeta.$serializers$ = Cstr.serializers;
1266
- }
1267
- }
1268
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1269
- members.map(([memberName, [memberFlags]]) => {
1270
- if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1271
- const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
1272
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1273
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1274
- if (flags & 1 /* isElementConstructor */ || !origGetter) {
1275
- Object.defineProperty(prototype, memberName, {
1276
- get() {
1277
- {
1278
- if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1279
- return getValue(this, memberName);
1280
- }
1281
- const ref = getHostRef(this);
1282
- const instance = ref ? ref.$lazyInstance$ : prototype;
1283
- if (!instance) return;
1284
- return instance[memberName];
1285
- }
1286
- },
1287
- configurable: true,
1288
- enumerable: true
1289
- });
1290
- }
1291
- Object.defineProperty(prototype, memberName, {
1292
- set(newValue) {
1293
- const ref = getHostRef(this);
1294
- if (!ref) {
1295
- return;
1296
- }
1297
- if (origSetter) {
1298
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1299
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1300
- newValue = ref.$instanceValues$.get(memberName);
1301
- }
1302
- origSetter.apply(this, [
1303
- parsePropertyValue(
1304
- newValue,
1305
- memberFlags,
1306
- !!(cmpMeta.$flags$ & 64 /* formAssociated */)
1307
- )
1308
- ]);
1309
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1310
- setValue(this, memberName, newValue, cmpMeta);
1311
- return;
1312
- }
1313
- {
1314
- if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1315
- setValue(this, memberName, newValue, cmpMeta);
1316
- if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1317
- ref.$fetchedCbList$.push(() => {
1318
- if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1319
- ref.$lazyInstance$[memberName] = newValue;
1320
- }
1321
- });
1322
- }
1323
- return;
1324
- }
1325
- const setterSetVal = () => {
1326
- const currentValue = ref.$lazyInstance$[memberName];
1327
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
1328
- ref.$instanceValues$.set(memberName, currentValue);
1329
- }
1330
- ref.$lazyInstance$[memberName] = parsePropertyValue(
1331
- newValue,
1332
- memberFlags,
1333
- !!(cmpMeta.$flags$ & 64 /* formAssociated */)
1334
- );
1335
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1336
- };
1337
- if (ref.$lazyInstance$) {
1338
- setterSetVal();
1339
- } else {
1340
- ref.$fetchedCbList$.push(() => {
1341
- setterSetVal();
1342
- });
1343
- }
1344
- }
1345
- }
1346
- });
1347
- } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1348
- Object.defineProperty(prototype, memberName, {
1349
- value(...args) {
1350
- var _a2;
1351
- const ref = getHostRef(this);
1352
- return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
1353
- var _a3;
1354
- return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
1355
- });
1356
- }
1357
- });
1358
- }
1359
- });
1360
- if ((flags & 1 /* isElementConstructor */)) {
1361
- const attrNameToPropName = /* @__PURE__ */ new Map();
1362
- prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
1363
- plt.jmp(() => {
1364
- var _a2;
1365
- const propName = attrNameToPropName.get(attrName);
1366
- const hostRef = getHostRef(this);
1367
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1368
- newValue = this[propName];
1369
- delete this[propName];
1370
- }
1371
- if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1372
- this[propName] == newValue) {
1373
- return;
1374
- } else if (propName == null) {
1375
- const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1376
- if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && newValue !== oldValue) {
1377
- const instance = hostRef.$lazyInstance$ ;
1378
- const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
1379
- entry == null ? void 0 : entry.forEach((watcher) => {
1380
- const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
1381
- if (instance[watchMethodName] != null && (flags2 & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */)) {
1382
- instance[watchMethodName].call(instance, newValue, oldValue, attrName);
1383
- }
1384
- });
1385
- }
1386
- return;
1387
- }
1388
- const propFlags = members.find(([m]) => m === propName);
1389
- const isBooleanTarget = propFlags && propFlags[1][0] & 4 /* Boolean */;
1390
- const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
1391
- if (isBooleanTarget) {
1392
- newValue = newValue === null || newValue === "false" ? false : true;
1393
- }
1394
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1395
- if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
1396
- this[propName] = newValue;
1397
- }
1398
- });
1399
- };
1400
- Cstr.observedAttributes = Array.from(
1401
- /* @__PURE__ */ new Set([
1402
- ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
1403
- ...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
1404
- var _a2;
1405
- const attrName = m[1] || propName;
1406
- attrNameToPropName.set(attrName, propName);
1407
- if (m[0] & 512 /* ReflectAttr */) {
1408
- (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
1409
- }
1410
- return attrName;
1411
- })
1412
- ])
1413
- );
1414
- }
1415
- }
1416
- return Cstr;
1417
- };
1418
-
1419
- // src/runtime/initialize-component.ts
1420
- var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1421
- let Cstr;
1422
- try {
1423
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1424
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1425
- const bundleId = cmpMeta.$lazyBundleId$;
1426
- if (bundleId) {
1427
- const CstrImport = loadModule(cmpMeta, hostRef);
1428
- if (CstrImport && "then" in CstrImport) {
1429
- const endLoad = uniqueTime();
1430
- Cstr = await CstrImport;
1431
- endLoad();
1432
- } else {
1433
- Cstr = CstrImport;
1434
- }
1435
- if (!Cstr) {
1436
- throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1437
- }
1438
- if (!Cstr.isProxied) {
1439
- {
1440
- cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
1441
- cmpMeta.$serializers$ = Cstr.serializers;
1442
- cmpMeta.$deserializers$ = Cstr.deserializers;
1443
- }
1444
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1445
- Cstr.isProxied = true;
1446
- }
1447
- const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
1448
- {
1449
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
1450
- }
1451
- try {
1452
- new Cstr(hostRef);
1453
- } catch (e) {
1454
- consoleError(e, elm);
1455
- }
1456
- {
1457
- hostRef.$flags$ &= -9 /* isConstructingInstance */;
1458
- }
1459
- {
1460
- hostRef.$flags$ |= 128 /* isWatchReady */;
1461
- }
1462
- endNewInstance();
1463
- {
1464
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1465
- }
1466
- } else {
1467
- Cstr = elm.constructor;
1468
- const cmpTag = elm.localName;
1469
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1470
- }
1471
- if (Cstr && Cstr.style) {
1472
- let style;
1473
- if (typeof Cstr.style === "string") {
1474
- style = Cstr.style;
1475
- }
1476
- const scopeId2 = getScopeId(cmpMeta);
1477
- if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
1478
- const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1479
- registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1480
- endRegisterStyles();
1481
- }
1482
- }
1483
- }
1484
- const ancestorComponent = hostRef.$ancestorComponent$;
1485
- const schedule = () => scheduleUpdate(hostRef, true);
1486
- if (ancestorComponent && ancestorComponent["s-rc"]) {
1487
- ancestorComponent["s-rc"].push(schedule);
1488
- } else {
1489
- schedule();
1490
- }
1491
- } catch (e) {
1492
- consoleError(e, elm);
1493
- if (hostRef.$onRenderResolve$) {
1494
- hostRef.$onRenderResolve$();
1495
- hostRef.$onRenderResolve$ = void 0;
1496
- }
1497
- if (hostRef.$onReadyResolve$) {
1498
- hostRef.$onReadyResolve$(elm);
1499
- }
1500
- }
1501
- };
1502
- var fireConnectedCallback = (instance, elm) => {
1503
- {
1504
- safeCall(instance, "connectedCallback", void 0, elm);
1505
- }
1506
- };
1507
-
1508
- // src/runtime/connected-callback.ts
1509
- var connectedCallback = (elm) => {
1510
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1511
- const hostRef = getHostRef(elm);
1512
- if (!hostRef) {
1513
- return;
1514
- }
1515
- const cmpMeta = hostRef.$cmpMeta$;
1516
- const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1517
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1518
- hostRef.$flags$ |= 1 /* hasConnected */;
1519
- {
1520
- let ancestorComponent = elm;
1521
- while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1522
- if (ancestorComponent["s-p"]) {
1523
- attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1524
- break;
1525
- }
1526
- }
1527
- }
1528
- if (cmpMeta.$members$) {
1529
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1530
- if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
1531
- const value = elm[memberName];
1532
- delete elm[memberName];
1533
- elm[memberName] = value;
1534
- }
1535
- });
1536
- }
1537
- {
1538
- initializeComponent(elm, hostRef, cmpMeta);
1539
- }
1540
- } else {
1541
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1542
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1543
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1544
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1545
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1546
- }
1547
- }
1548
- endConnected();
1549
- }
1550
- };
1551
- var disconnectInstance = (instance, elm) => {
1552
- {
1553
- safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1554
- }
1555
- };
1556
- var disconnectedCallback = async (elm) => {
1557
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1558
- const hostRef = getHostRef(elm);
1559
- {
1560
- if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
1561
- hostRef.$rmListeners$.map((rmListener) => rmListener());
1562
- hostRef.$rmListeners$ = void 0;
1563
- }
1564
- }
1565
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1566
- disconnectInstance(hostRef.$lazyInstance$, elm);
1567
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1568
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1569
- }
1570
- }
1571
- if (rootAppliedStyles.has(elm)) {
1572
- rootAppliedStyles.delete(elm);
1573
- }
1574
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1575
- rootAppliedStyles.delete(elm.shadowRoot);
1576
- }
1577
- };
1578
-
1579
- // src/runtime/bootstrap-lazy.ts
1580
- var bootstrapLazy = (lazyBundles, options = {}) => {
1581
- var _a;
1582
- if (!win.document) {
1583
- console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
1584
- return;
1585
- }
1586
- const endBootstrap = createTime();
1587
- const cmpTags = [];
1588
- const exclude = options.exclude || [];
1589
- const customElements2 = win.customElements;
1590
- const head = win.document.head;
1591
- const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1592
- const dataStyles = /* @__PURE__ */ win.document.createElement("style");
1593
- const deferredConnectedCallbacks = [];
1594
- let appLoadFallback;
1595
- let isBootstrapping = true;
1596
- Object.assign(plt, options);
1597
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1598
- lazyBundles.map((lazyBundle) => {
1599
- lazyBundle[1].map((compactMeta) => {
1600
- var _a2, _b;
1601
- const cmpMeta = {
1602
- $flags$: compactMeta[0],
1603
- $tagName$: compactMeta[1],
1604
- $members$: compactMeta[2],
1605
- $listeners$: compactMeta[3]
1606
- };
1607
- {
1608
- cmpMeta.$members$ = compactMeta[2];
1609
- }
1610
- {
1611
- cmpMeta.$listeners$ = compactMeta[3];
1612
- }
1613
- {
1614
- cmpMeta.$attrsToReflect$ = [];
1615
- }
1616
- {
1617
- cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
1618
- cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
1619
- cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
1620
- }
1621
- const tagName = transformTag(cmpMeta.$tagName$);
1622
- const HostElement = class extends HTMLElement {
1623
- ["s-p"];
1624
- ["s-rc"];
1625
- hasRegisteredEventListeners = false;
1626
- // StencilLazyHost
1627
- constructor(self) {
1628
- super(self);
1629
- self = this;
1630
- registerHost(self, cmpMeta);
1631
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1632
- {
1633
- if (!self.shadowRoot) {
1634
- createShadowRoot.call(self, cmpMeta);
1635
- } else {
1636
- if (self.shadowRoot.mode !== "open") {
1637
- throw new Error(
1638
- `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
1639
- );
1640
- }
1641
- }
1642
- }
1643
- }
1644
- }
1645
- connectedCallback() {
1646
- const hostRef = getHostRef(this);
1647
- if (!hostRef) {
1648
- return;
1649
- }
1650
- if (!this.hasRegisteredEventListeners) {
1651
- this.hasRegisteredEventListeners = true;
1652
- addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1653
- }
1654
- if (appLoadFallback) {
1655
- clearTimeout(appLoadFallback);
1656
- appLoadFallback = null;
1657
- }
1658
- if (isBootstrapping) {
1659
- deferredConnectedCallbacks.push(this);
1660
- } else {
1661
- plt.jmp(() => connectedCallback(this));
1662
- }
1663
- }
1664
- disconnectedCallback() {
1665
- plt.jmp(() => disconnectedCallback(this));
1666
- plt.raf(() => {
1667
- var _a3;
1668
- const hostRef = getHostRef(this);
1669
- if (!hostRef) {
1670
- return;
1671
- }
1672
- const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1673
- if (i2 > -1) {
1674
- deferredConnectedCallbacks.splice(i2, 1);
1675
- }
1676
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1677
- delete hostRef.$vnode$.$elm$;
1678
- }
1679
- });
1680
- }
1681
- componentOnReady() {
1682
- var _a3;
1683
- return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
1684
- }
1685
- };
1686
- if (cmpMeta.$flags$ & 64 /* formAssociated */) {
1687
- HostElement.formAssociated = true;
1688
- }
1689
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1690
- if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
1691
- cmpTags.push(tagName);
1692
- customElements2.define(
1693
- tagName,
1694
- proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
1695
- );
1696
- }
1697
- });
1698
- });
1699
- if (cmpTags.length > 0) {
1700
- {
1701
- dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
1702
- }
1703
- if (dataStyles.innerHTML.length) {
1704
- dataStyles.setAttribute("data-styles", "");
1705
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1706
- if (nonce != null) {
1707
- dataStyles.setAttribute("nonce", nonce);
1708
- }
1709
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1710
- }
1711
- }
1712
- isBootstrapping = false;
1713
- if (deferredConnectedCallbacks.length) {
1714
- deferredConnectedCallbacks.map((host) => host.connectedCallback());
1715
- } else {
1716
- {
1717
- plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
1718
- }
1719
- }
1720
- endBootstrap();
1721
- };
1722
- var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1723
- if (listeners && win.document) {
1724
- listeners.map(([flags, name, method]) => {
1725
- const target = getHostListenerTarget(win.document, elm, flags) ;
1726
- const handler = hostListenerProxy(hostRef, method);
1727
- const opts = hostListenerOpts(flags);
1728
- plt.ael(target, name, handler, opts);
1729
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1730
- });
1731
- }
1732
- };
1733
- var hostListenerProxy = (hostRef, methodName) => (ev) => {
1734
- var _a;
1735
- try {
1736
- {
1737
- if (hostRef.$flags$ & 256 /* isListenReady */) {
1738
- (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
1739
- } else {
1740
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1741
- }
1742
- }
1743
- } catch (e) {
1744
- consoleError(e, hostRef.$hostElement$);
1745
- }
1746
- };
1747
- var getHostListenerTarget = (doc, elm, flags) => {
1748
- if (flags & 8 /* TargetWindow */) {
1749
- return win;
1750
- }
1751
- return elm;
1752
- };
1753
- var hostListenerOpts = (flags) => supportsListenerOptions ? {
1754
- passive: (flags & 1 /* Passive */) !== 0,
1755
- capture: (flags & 2 /* Capture */) !== 0
1756
- } : (flags & 2 /* Capture */) !== 0;
1757
-
1758
- // src/runtime/nonce.ts
1759
- var setNonce = (nonce) => plt.$nonce$ = nonce;
1760
- function transformTag(tag) {
1761
- return tag;
1762
- }
1763
-
1764
- export { Host as H, getElement as a, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };