@threadlabs/looma 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -0
  3. package/dist/chunk-G53JEAQK.js +94 -0
  4. package/dist/chunk-OF57X5AR.js +10 -0
  5. package/dist/chunk-UL7UIUJZ.js +20 -0
  6. package/dist/chunk-YK4MTZGJ.js +1580 -0
  7. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  8. package/dist/cjs/events-TcQIzpNv.js +19 -0
  9. package/dist/cjs/id-CYbKpaYr.js +9 -0
  10. package/dist/cjs/index-D07f6BOw.js +1569 -0
  11. package/dist/cjs/index.cjs.js +2 -0
  12. package/dist/cjs/loader.cjs.js +13 -0
  13. package/dist/cjs/looma.cjs.js +25 -0
  14. package/dist/cjs/manager-BOpVXb92.js +93 -0
  15. package/dist/cjs/ui-avatar-group.cjs.entry.js +51 -0
  16. package/dist/cjs/ui-avatar.cjs.entry.js +50 -0
  17. package/dist/cjs/ui-badge.cjs.entry.js +19 -0
  18. package/dist/cjs/ui-button.cjs.entry.js +62 -0
  19. package/dist/cjs/ui-checkbox.cjs.entry.js +91 -0
  20. package/dist/cjs/ui-context-menu.cjs.entry.js +201 -0
  21. package/dist/cjs/ui-dialog.cjs.entry.js +93 -0
  22. package/dist/cjs/ui-disclosure.cjs.entry.js +109 -0
  23. package/dist/cjs/ui-floating-action-button.cjs.entry.js +20 -0
  24. package/dist/cjs/ui-form-field.cjs.entry.js +59 -0
  25. package/dist/cjs/ui-icon-button.cjs.entry.js +21 -0
  26. package/dist/cjs/ui-input.cjs.entry.js +101 -0
  27. package/dist/cjs/ui-menu-item.cjs.entry.js +19 -0
  28. package/dist/cjs/ui-menu.cjs.entry.js +96 -0
  29. package/dist/cjs/ui-popover.cjs.entry.js +92 -0
  30. package/dist/cjs/ui-radio-group.cjs.entry.js +134 -0
  31. package/dist/cjs/ui-radio.cjs.entry.js +85 -0
  32. package/dist/cjs/ui-search-result-row.cjs.entry.js +47 -0
  33. package/dist/cjs/ui-search-shell.cjs.entry.js +39 -0
  34. package/dist/cjs/ui-select.cjs.entry.js +100 -0
  35. package/dist/cjs/ui-switch.cjs.entry.js +65 -0
  36. package/dist/cjs/ui-tabs.cjs.entry.js +117 -0
  37. package/dist/cjs/ui-textarea.cjs.entry.js +106 -0
  38. package/dist/cjs/ui-toast-region.cjs.entry.js +67 -0
  39. package/dist/cjs/ui-tooltip.cjs.entry.js +133 -0
  40. package/dist/cjs/ui-top-bar.cjs.entry.js +43 -0
  41. package/dist/collection/collection-manifest.json +38 -0
  42. package/dist/collection/components/ui-avatar/ui-avatar.css +35 -0
  43. package/dist/collection/components/ui-avatar/ui-avatar.js +130 -0
  44. package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +32 -0
  45. package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +103 -0
  46. package/dist/collection/components/ui-badge/ui-badge.css +74 -0
  47. package/dist/collection/components/ui-badge/ui-badge.js +62 -0
  48. package/dist/collection/components/ui-button/ui-button.css +101 -0
  49. package/dist/collection/components/ui-button/ui-button.js +127 -0
  50. package/dist/collection/components/ui-checkbox/ui-checkbox.css +24 -0
  51. package/dist/collection/components/ui-checkbox/ui-checkbox.js +223 -0
  52. package/dist/collection/components/ui-context-menu/ui-context-menu.css +17 -0
  53. package/dist/collection/components/ui-context-menu/ui-context-menu.js +272 -0
  54. package/dist/collection/components/ui-dialog/ui-dialog.css +65 -0
  55. package/dist/collection/components/ui-dialog/ui-dialog.js +185 -0
  56. package/dist/collection/components/ui-disclosure/ui-disclosure.css +7 -0
  57. package/dist/collection/components/ui-disclosure/ui-disclosure.js +182 -0
  58. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.css +70 -0
  59. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +85 -0
  60. package/dist/collection/components/ui-form-field/ui-form-field.css +21 -0
  61. package/dist/collection/components/ui-form-field/ui-form-field.js +125 -0
  62. package/dist/collection/components/ui-icon-button/ui-icon-button.css +92 -0
  63. package/dist/collection/components/ui-icon-button/ui-icon-button.js +106 -0
  64. package/dist/collection/components/ui-input/ui-input.css +46 -0
  65. package/dist/collection/components/ui-input/ui-input.js +213 -0
  66. package/dist/collection/components/ui-menu/ui-menu.css +37 -0
  67. package/dist/collection/components/ui-menu/ui-menu.js +149 -0
  68. package/dist/collection/components/ui-menu-item/ui-menu-item.css +26 -0
  69. package/dist/collection/components/ui-menu-item/ui-menu-item.js +64 -0
  70. package/dist/collection/components/ui-popover/ui-popover.css +8 -0
  71. package/dist/collection/components/ui-popover/ui-popover.js +144 -0
  72. package/dist/collection/components/ui-radio/ui-radio.css +22 -0
  73. package/dist/collection/components/ui-radio/ui-radio.js +213 -0
  74. package/dist/collection/components/ui-radio-group/ui-radio-group.css +10 -0
  75. package/dist/collection/components/ui-radio-group/ui-radio-group.js +247 -0
  76. package/dist/collection/components/ui-search-result-row/ui-search-result-row.css +80 -0
  77. package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +100 -0
  78. package/dist/collection/components/ui-search-shell/ui-search-shell.css +61 -0
  79. package/dist/collection/components/ui-search-shell/ui-search-shell.js +46 -0
  80. package/dist/collection/components/ui-select/ui-select.css +62 -0
  81. package/dist/collection/components/ui-select/ui-select.js +212 -0
  82. package/dist/collection/components/ui-switch/ui-switch.css +63 -0
  83. package/dist/collection/components/ui-switch/ui-switch.js +177 -0
  84. package/dist/collection/components/ui-tabs/ui-tabs.css +65 -0
  85. package/dist/collection/components/ui-tabs/ui-tabs.js +190 -0
  86. package/dist/collection/components/ui-textarea/ui-textarea.css +48 -0
  87. package/dist/collection/components/ui-textarea/ui-textarea.js +238 -0
  88. package/dist/collection/components/ui-toast-region/ui-toast-region.css +52 -0
  89. package/dist/collection/components/ui-toast-region/ui-toast-region.js +100 -0
  90. package/dist/collection/components/ui-tooltip/ui-tooltip.css +14 -0
  91. package/dist/collection/components/ui-tooltip/ui-tooltip.js +205 -0
  92. package/dist/collection/components/ui-top-bar/ui-top-bar.css +43 -0
  93. package/dist/collection/components/ui-top-bar/ui-top-bar.js +52 -0
  94. package/dist/collection/overlay/manager.js +90 -0
  95. package/dist/collection/utils/events.js +13 -0
  96. package/dist/collection/utils/id.js +5 -0
  97. package/dist/collection/utils/initials.js +11 -0
  98. package/dist/components/index.d.ts +88 -0
  99. package/dist/components/index.js +1 -0
  100. package/dist/components/p-CIA4RyEp.js +1 -0
  101. package/dist/components/p-CR7f2MQC.js +1 -0
  102. package/dist/components/p-JwSoedEO.js +1 -0
  103. package/dist/components/p-WvL4iAhX.js +1 -0
  104. package/dist/components/p-hgBUJRDa.js +1 -0
  105. package/dist/components/ui-avatar-group.d.ts +11 -0
  106. package/dist/components/ui-avatar-group.js +1 -0
  107. package/dist/components/ui-avatar.d.ts +11 -0
  108. package/dist/components/ui-avatar.js +1 -0
  109. package/dist/components/ui-badge.d.ts +11 -0
  110. package/dist/components/ui-badge.js +1 -0
  111. package/dist/components/ui-button.d.ts +11 -0
  112. package/dist/components/ui-button.js +1 -0
  113. package/dist/components/ui-checkbox.d.ts +11 -0
  114. package/dist/components/ui-checkbox.js +1 -0
  115. package/dist/components/ui-context-menu.d.ts +11 -0
  116. package/dist/components/ui-context-menu.js +1 -0
  117. package/dist/components/ui-dialog.d.ts +11 -0
  118. package/dist/components/ui-dialog.js +1 -0
  119. package/dist/components/ui-disclosure.d.ts +11 -0
  120. package/dist/components/ui-disclosure.js +1 -0
  121. package/dist/components/ui-floating-action-button.d.ts +11 -0
  122. package/dist/components/ui-floating-action-button.js +1 -0
  123. package/dist/components/ui-form-field.d.ts +11 -0
  124. package/dist/components/ui-form-field.js +1 -0
  125. package/dist/components/ui-icon-button.d.ts +11 -0
  126. package/dist/components/ui-icon-button.js +1 -0
  127. package/dist/components/ui-input.d.ts +11 -0
  128. package/dist/components/ui-input.js +1 -0
  129. package/dist/components/ui-menu-item.d.ts +11 -0
  130. package/dist/components/ui-menu-item.js +1 -0
  131. package/dist/components/ui-menu.d.ts +11 -0
  132. package/dist/components/ui-menu.js +1 -0
  133. package/dist/components/ui-popover.d.ts +11 -0
  134. package/dist/components/ui-popover.js +1 -0
  135. package/dist/components/ui-radio-group.d.ts +11 -0
  136. package/dist/components/ui-radio-group.js +1 -0
  137. package/dist/components/ui-radio.d.ts +11 -0
  138. package/dist/components/ui-radio.js +1 -0
  139. package/dist/components/ui-search-result-row.d.ts +11 -0
  140. package/dist/components/ui-search-result-row.js +1 -0
  141. package/dist/components/ui-search-shell.d.ts +11 -0
  142. package/dist/components/ui-search-shell.js +1 -0
  143. package/dist/components/ui-select.d.ts +11 -0
  144. package/dist/components/ui-select.js +1 -0
  145. package/dist/components/ui-switch.d.ts +11 -0
  146. package/dist/components/ui-switch.js +1 -0
  147. package/dist/components/ui-tabs.d.ts +11 -0
  148. package/dist/components/ui-tabs.js +1 -0
  149. package/dist/components/ui-textarea.d.ts +11 -0
  150. package/dist/components/ui-textarea.js +1 -0
  151. package/dist/components/ui-toast-region.d.ts +11 -0
  152. package/dist/components/ui-toast-region.js +1 -0
  153. package/dist/components/ui-tooltip.d.ts +11 -0
  154. package/dist/components/ui-tooltip.js +1 -0
  155. package/dist/components/ui-top-bar.d.ts +11 -0
  156. package/dist/components/ui-top-bar.js +1 -0
  157. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  158. package/dist/esm/events-JwSoedEO.js +15 -0
  159. package/dist/esm/id-hgBUJRDa.js +7 -0
  160. package/dist/esm/index-CEeiinfk.js +1561 -0
  161. package/dist/esm/index.js +1 -0
  162. package/dist/esm/loader.js +11 -0
  163. package/dist/esm/looma.js +21 -0
  164. package/dist/esm/manager-CR7f2MQC.js +89 -0
  165. package/dist/esm/ui-avatar-group.entry.js +49 -0
  166. package/dist/esm/ui-avatar.entry.js +48 -0
  167. package/dist/esm/ui-badge.entry.js +17 -0
  168. package/dist/esm/ui-button.entry.js +60 -0
  169. package/dist/esm/ui-checkbox.entry.js +89 -0
  170. package/dist/esm/ui-context-menu.entry.js +199 -0
  171. package/dist/esm/ui-dialog.entry.js +91 -0
  172. package/dist/esm/ui-disclosure.entry.js +107 -0
  173. package/dist/esm/ui-floating-action-button.entry.js +18 -0
  174. package/dist/esm/ui-form-field.entry.js +57 -0
  175. package/dist/esm/ui-icon-button.entry.js +19 -0
  176. package/dist/esm/ui-input.entry.js +99 -0
  177. package/dist/esm/ui-menu-item.entry.js +17 -0
  178. package/dist/esm/ui-menu.entry.js +94 -0
  179. package/dist/esm/ui-popover.entry.js +90 -0
  180. package/dist/esm/ui-radio-group.entry.js +132 -0
  181. package/dist/esm/ui-radio.entry.js +83 -0
  182. package/dist/esm/ui-search-result-row.entry.js +45 -0
  183. package/dist/esm/ui-search-shell.entry.js +37 -0
  184. package/dist/esm/ui-select.entry.js +98 -0
  185. package/dist/esm/ui-switch.entry.js +63 -0
  186. package/dist/esm/ui-tabs.entry.js +115 -0
  187. package/dist/esm/ui-textarea.entry.js +104 -0
  188. package/dist/esm/ui-toast-region.entry.js +65 -0
  189. package/dist/esm/ui-tooltip.entry.js +131 -0
  190. package/dist/esm/ui-top-bar.entry.js +41 -0
  191. package/dist/index.cjs +4062 -0
  192. package/dist/index.cjs.js +1 -0
  193. package/dist/index.d.cts +16 -0
  194. package/dist/index.d.ts +16 -0
  195. package/dist/index.js +129 -0
  196. package/dist/looma/index.esm.js +0 -0
  197. package/dist/looma/looma.esm.js +1 -0
  198. package/dist/looma/p-03f0594b.entry.js +1 -0
  199. package/dist/looma/p-15e619fd.entry.js +1 -0
  200. package/dist/looma/p-201243dc.entry.js +1 -0
  201. package/dist/looma/p-24d7aa5b.entry.js +1 -0
  202. package/dist/looma/p-341ba64a.entry.js +1 -0
  203. package/dist/looma/p-41d62a83.entry.js +1 -0
  204. package/dist/looma/p-4742e6b4.entry.js +1 -0
  205. package/dist/looma/p-4c54d489.entry.js +1 -0
  206. package/dist/looma/p-52c537fa.entry.js +1 -0
  207. package/dist/looma/p-5a645647.entry.js +1 -0
  208. package/dist/looma/p-610b2eca.entry.js +1 -0
  209. package/dist/looma/p-649dad92.entry.js +1 -0
  210. package/dist/looma/p-66a203a1.entry.js +1 -0
  211. package/dist/looma/p-754cfff3.entry.js +1 -0
  212. package/dist/looma/p-93ce1c62.entry.js +1 -0
  213. package/dist/looma/p-955fb814.entry.js +1 -0
  214. package/dist/looma/p-96de71ad.entry.js +1 -0
  215. package/dist/looma/p-CEeiinfk.js +2 -0
  216. package/dist/looma/p-CR7f2MQC.js +1 -0
  217. package/dist/looma/p-DQuL1Twl.js +1 -0
  218. package/dist/looma/p-JwSoedEO.js +1 -0
  219. package/dist/looma/p-ab4151d5.entry.js +1 -0
  220. package/dist/looma/p-c14233bc.entry.js +1 -0
  221. package/dist/looma/p-dc857ed4.entry.js +1 -0
  222. package/dist/looma/p-dfcb2cca.entry.js +1 -0
  223. package/dist/looma/p-dff144bd.entry.js +1 -0
  224. package/dist/looma/p-ebb74106.entry.js +1 -0
  225. package/dist/looma/p-ecb5739b.entry.js +1 -0
  226. package/dist/looma/p-ee31c7b4.entry.js +1 -0
  227. package/dist/looma/p-fa4659c4.entry.js +1 -0
  228. package/dist/looma/p-hgBUJRDa.js +1 -0
  229. package/dist/types/components/ui-avatar/ui-avatar.d.ts +11 -0
  230. package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +12 -0
  231. package/dist/types/components/ui-badge/ui-badge.d.ts +5 -0
  232. package/dist/types/components/ui-button/ui-button.d.ts +13 -0
  233. package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +19 -0
  234. package/dist/types/components/ui-context-menu/ui-context-menu.d.ts +37 -0
  235. package/dist/types/components/ui-dialog/ui-dialog.d.ts +19 -0
  236. package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +20 -0
  237. package/dist/types/components/ui-floating-action-button/ui-floating-action-button.d.ts +6 -0
  238. package/dist/types/components/ui-form-field/ui-form-field.d.ts +10 -0
  239. package/dist/types/components/ui-icon-button/ui-icon-button.d.ts +7 -0
  240. package/dist/types/components/ui-input/ui-input.d.ts +19 -0
  241. package/dist/types/components/ui-menu/ui-menu.d.ts +14 -0
  242. package/dist/types/components/ui-menu-item/ui-menu-item.d.ts +5 -0
  243. package/dist/types/components/ui-popover/ui-popover.d.ts +16 -0
  244. package/dist/types/components/ui-radio/ui-radio.d.ts +17 -0
  245. package/dist/types/components/ui-radio-group/ui-radio-group.d.ts +21 -0
  246. package/dist/types/components/ui-search-result-row/ui-search-result-row.d.ts +15 -0
  247. package/dist/types/components/ui-search-shell/ui-search-shell.d.ts +9 -0
  248. package/dist/types/components/ui-select/ui-select.d.ts +19 -0
  249. package/dist/types/components/ui-switch/ui-switch.d.ts +15 -0
  250. package/dist/types/components/ui-tabs/ui-tabs.d.ts +17 -0
  251. package/dist/types/components/ui-textarea/ui-textarea.d.ts +20 -0
  252. package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +12 -0
  253. package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +24 -0
  254. package/dist/types/components/ui-top-bar/ui-top-bar.d.ts +12 -0
  255. package/dist/types/components.d.ts +1148 -0
  256. package/dist/types/overlay/manager.d.ts +14 -0
  257. package/dist/types/stencil-public-runtime.d.ts +1860 -0
  258. package/dist/types/utils/events.d.ts +4 -0
  259. package/dist/types/utils/id.d.ts +1 -0
  260. package/dist/types/utils/initials.d.ts +1 -0
  261. package/dist/ui-avatar-group.entry-BZGXBOSE.js +59 -0
  262. package/dist/ui-avatar.entry-S2O2W5SA.js +51 -0
  263. package/dist/ui-badge.entry-CVJDISCR.js +22 -0
  264. package/dist/ui-button.entry-LNJBEJFE.js +72 -0
  265. package/dist/ui-checkbox.entry-5RA2CB43.js +102 -0
  266. package/dist/ui-context-menu.entry-UUOCT75F.js +211 -0
  267. package/dist/ui-dialog.entry-OEPJTEES.js +106 -0
  268. package/dist/ui-disclosure.entry-LRRISGUD.js +120 -0
  269. package/dist/ui-floating-action-button.entry-7TSAZRXP.js +23 -0
  270. package/dist/ui-form-field.entry-73YOVICF.js +67 -0
  271. package/dist/ui-icon-button.entry-MNXGPG36.js +24 -0
  272. package/dist/ui-input.entry-UWRVAOSW.js +112 -0
  273. package/dist/ui-menu-item.entry-5AOJO5MP.js +22 -0
  274. package/dist/ui-menu.entry-YDS6UMB5.js +98 -0
  275. package/dist/ui-popover.entry-PGWDCQIX.js +104 -0
  276. package/dist/ui-radio-group.entry-RHP5GNWU.js +142 -0
  277. package/dist/ui-radio.entry-5WRWPSTK.js +96 -0
  278. package/dist/ui-search-result-row.entry-IKJB2SJJ.js +50 -0
  279. package/dist/ui-search-shell.entry-ZIWF4ZHH.js +41 -0
  280. package/dist/ui-select.entry-N5TIKHR7.js +111 -0
  281. package/dist/ui-switch.entry-WUSZTXIR.js +75 -0
  282. package/dist/ui-tabs.entry-UFAVAQIF.js +124 -0
  283. package/dist/ui-textarea.entry-BYT47RAQ.js +117 -0
  284. package/dist/ui-toast-region.entry-6UYR3ZU2.js +78 -0
  285. package/dist/ui-tooltip.entry-YS7UX4FS.js +145 -0
  286. package/dist/ui-top-bar.entry-V27H6NFO.js +49 -0
  287. package/editor/chunk-JKRA4D4W.js +435 -0
  288. package/editor/chunk-NOOV344H.js +783 -0
  289. package/editor/extensions/index.d.ts +78 -0
  290. package/editor/extensions/index.js +28 -0
  291. package/editor/index.d.ts +7 -0
  292. package/editor/index.js +29 -0
  293. package/editor/table-overlay-DTr3KC9e.d.ts +12 -0
  294. package/editor/ui.d.ts +48 -0
  295. package/editor/ui.js +1 -0
  296. package/editor.css +662 -0
  297. package/layout/index.cjs +207 -0
  298. package/layout/index.css +166 -0
  299. package/layout/index.d.cts +3 -0
  300. package/layout/index.d.ts +3 -0
  301. package/layout/index.js +182 -0
  302. package/layout.css +124 -0
  303. package/loader/cdn.js +1 -0
  304. package/loader/index.cjs.js +1 -0
  305. package/loader/index.d.ts +24 -0
  306. package/loader/index.es2017.js +1 -0
  307. package/loader/index.js +2 -0
  308. package/package.json +244 -0
  309. package/styles.css +899 -0
  310. package/theme-dark.css +59 -0
  311. package/theme-high-contrast.css +21 -0
  312. package/theme-light.css +30 -0
  313. package/tokens.css +148 -0
  314. package/vue/chunk-J4UBEIIL.js +83 -0
  315. package/vue/editor/index.d.ts +89 -0
  316. package/vue/editor/index.js +125 -0
  317. package/vue/index.d.ts +167 -0
  318. package/vue/index.js +113 -0
package/dist/index.cjs ADDED
@@ -0,0 +1,4062 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __glob = (map) => (path) => {
6
+ var fn = map[path];
7
+ if (fn) return fn();
8
+ throw new Error("Module not found in bundle: " + path);
9
+ };
10
+ var __esm = (fn, res) => function __init() {
11
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
+ };
13
+ var __export = (target, all) => {
14
+ for (var name in all)
15
+ __defProp(target, name, { get: all[name], enumerable: true });
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") {
19
+ for (let key of __getOwnPropNames(from))
20
+ if (!__hasOwnProp.call(to, key) && key !== except)
21
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
+ }
23
+ return to;
24
+ };
25
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
26
+
27
+ // dist/esm/ui-avatar-group.entry.js
28
+ var ui_avatar_group_entry_exports = {};
29
+ __export(ui_avatar_group_entry_exports, {
30
+ ui_avatar_group: () => UIAvatarGroup
31
+ });
32
+ var uiAvatarGroupCss, OVERFLOW_ATTR, UIAvatarGroup;
33
+ var init_ui_avatar_group_entry = __esm({
34
+ "dist/esm/ui-avatar-group.entry.js"() {
35
+ init_index_CEeiinfk();
36
+ uiAvatarGroupCss = () => `:host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*:not([data-ui-avatar-group-overflow])){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type:not([data-ui-avatar-group-overflow])){margin-inline-end:0}.overflow{margin-inline-end:-0.5rem;display:inline-flex;align-items:center;justify-content:center;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;font-weight:600;flex-shrink:0}`;
37
+ OVERFLOW_ATTR = "data-ui-avatar-group-overflow";
38
+ UIAvatarGroup = class {
39
+ constructor(hostRef) {
40
+ registerInstance(this, hostRef);
41
+ }
42
+ get host() {
43
+ return getElement(this);
44
+ }
45
+ max = 5;
46
+ label = "People";
47
+ overflowCount = 0;
48
+ slotRef;
49
+ syncOverflow() {
50
+ this.updateOverflow();
51
+ }
52
+ componentDidLoad() {
53
+ this.slotRef?.addEventListener("slotchange", () => this.updateOverflow());
54
+ this.updateOverflow();
55
+ }
56
+ componentDidUpdate() {
57
+ this.updateOverflow();
58
+ }
59
+ updateOverflow() {
60
+ const slot = this.host.shadowRoot?.querySelector("slot");
61
+ const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
62
+ const children = nodes.filter((el) => !el.hasAttribute(OVERFLOW_ATTR));
63
+ const total = children.length;
64
+ const visibleCount = Math.min(this.max, total);
65
+ const overflowCount = total > this.max ? total - this.max : 0;
66
+ children.forEach((el, i) => {
67
+ el.hidden = i >= visibleCount;
68
+ el.setAttribute("aria-hidden", String(i >= visibleCount));
69
+ });
70
+ this.overflowCount = overflowCount;
71
+ }
72
+ render() {
73
+ return h(Host, { key: "9c8fbeb6e8c87ef4d86778a70a52f48b62717728", role: "list", "aria-label": this.label || void 0 }, h("slot", { key: "432877b335f2a75f6b17a14b4be768c68ba04bfa" }), this.overflowCount > 0 && h("span", { key: "ccf8007947e5d97edcdf42b7f4740db33560956b", class: "overflow", role: "listitem", "aria-label": `${this.overflowCount} more`, "data-ui-avatar-group-overflow": true }, "+", this.overflowCount));
74
+ }
75
+ static get watchers() {
76
+ return {
77
+ "max": [{
78
+ "syncOverflow": 0
79
+ }]
80
+ };
81
+ }
82
+ };
83
+ UIAvatarGroup.style = uiAvatarGroupCss();
84
+ }
85
+ });
86
+
87
+ // dist/esm/ui-avatar.entry.js
88
+ var ui_avatar_entry_exports = {};
89
+ __export(ui_avatar_entry_exports, {
90
+ ui_avatar: () => UIAvatar
91
+ });
92
+ function toInitials(value) {
93
+ const tokens = value.trim().split(/\s+/).filter((token) => token.length > 0);
94
+ if (tokens.length === 0)
95
+ return "?";
96
+ if (tokens.length === 1)
97
+ return tokens[0].slice(0, 2).toUpperCase();
98
+ return `${tokens[0][0] ?? ""}${tokens[1][0] ?? ""}`.toUpperCase();
99
+ }
100
+ var uiAvatarCss, UIAvatar;
101
+ var init_ui_avatar_entry = __esm({
102
+ "dist/esm/ui-avatar.entry.js"() {
103
+ init_index_CEeiinfk();
104
+ uiAvatarCss = () => `:host{display:inline-grid;place-items:center;overflow:hidden;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.875rem;font-weight:600;text-transform:uppercase}.avatar{display:contents}.avatar img{grid-area:1 / 1;inline-size:100%;block-size:100%;object-fit:cover}.avatar .fallback{grid-area:1 / 1;display:inline-flex;align-items:center;justify-content:center;inline-size:100%;block-size:100%}`;
105
+ UIAvatar = class {
106
+ constructor(hostRef) {
107
+ registerInstance(this, hostRef);
108
+ }
109
+ src = "";
110
+ alt = "";
111
+ name = "";
112
+ fallback = "";
113
+ hasImage = false;
114
+ watchSrc() {
115
+ this.hasImage = false;
116
+ }
117
+ onImageLoad = () => {
118
+ this.hasImage = true;
119
+ };
120
+ onImageError = () => {
121
+ this.hasImage = false;
122
+ };
123
+ render() {
124
+ const fallbackText = this.fallback || toInitials(this.name || this.alt);
125
+ const label = this.alt || this.name || "Avatar";
126
+ return h(Host, { key: "f61c3a4e5556be947b9f573591d4db0687fd01fd", role: "img", "aria-label": label, "data-has-image": this.hasImage ? "" : void 0 }, h("div", { key: "03d4a3d1c86bb1d1779ad007ba12407230478dac", class: "avatar" }, h("img", { key: "512015d68f9118bf8b8181b5b5118c133e783baf", src: this.src, alt: label, onLoad: this.onImageLoad, onError: this.onImageError, hidden: !this.hasImage, "aria-hidden": this.hasImage ? "false" : "true" }), h("span", { key: "48b0f1f81a6465c6021d4c867af67a559b9b8a67", class: "fallback", hidden: this.hasImage, "aria-hidden": this.hasImage ? "true" : "false" }, fallbackText)));
127
+ }
128
+ static get watchers() {
129
+ return {
130
+ "src": [{
131
+ "watchSrc": 0
132
+ }]
133
+ };
134
+ }
135
+ };
136
+ UIAvatar.style = uiAvatarCss();
137
+ }
138
+ });
139
+
140
+ // dist/esm/ui-badge.entry.js
141
+ var ui_badge_entry_exports = {};
142
+ __export(ui_badge_entry_exports, {
143
+ ui_badge: () => UIBadge
144
+ });
145
+ var uiBadgeCss, UIBadge;
146
+ var init_ui_badge_entry = __esm({
147
+ "dist/esm/ui-badge.entry.js"() {
148
+ init_index_CEeiinfk();
149
+ uiBadgeCss = () => `:host{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;line-height:1;padding:0.25em 0.6em;white-space:nowrap}:host([data-tone='accent']){background:var(--ui-accent-solid);border-color:var(--ui-accent-solid);color:var(--ui-text-on-accent)}:host([data-tone='danger']){background:var(--ui-danger-solid);border-color:var(--ui-danger-solid);color:var(--ui-text-on-accent)}:host([data-tone='success']){background:var(--ui-success-solid);border-color:var(--ui-success-solid);color:var(--ui-text-on-accent)}:host([data-tone='warning']){background:var(--ui-warning-solid);border-color:var(--ui-warning-solid);color:var(--ui-text-primary)}:host([data-tone='info']){background:var(--ui-info-solid);border-color:var(--ui-info-solid);color:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']){background:var(--ui-accent-soft);border-color:var(--ui-accent-soft);color:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']){background:var(--ui-danger-soft);border-color:var(--ui-danger-soft);color:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']){background:var(--ui-success-soft);border-color:var(--ui-success-soft);color:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']){background:var(--ui-warning-soft);border-color:var(--ui-warning-soft);color:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']){background:var(--ui-info-soft);border-color:var(--ui-info-soft);color:var(--ui-info-solid)}`;
150
+ UIBadge = class {
151
+ constructor(hostRef) {
152
+ registerInstance(this, hostRef);
153
+ }
154
+ variant;
155
+ tone;
156
+ render() {
157
+ return h(Host, { key: "53eba0640816bc09ae198de29f9a1ac97c1d5f1d", "data-variant": this.variant || void 0, "data-tone": this.tone || void 0 }, h("slot", { key: "abc8a9e09c2001f222f9aa8f164da76ff8343e01" }));
158
+ }
159
+ };
160
+ UIBadge.style = uiBadgeCss();
161
+ }
162
+ });
163
+
164
+ // dist/esm/events-JwSoedEO.js
165
+ function eventToTrigger(event) {
166
+ if (event instanceof KeyboardEvent)
167
+ return "keyboard";
168
+ if (event instanceof PointerEvent || event instanceof MouseEvent)
169
+ return "pointer";
170
+ return "programmatic";
171
+ }
172
+ function isActivationKey(event) {
173
+ return event.key === "Enter" || event.key === " ";
174
+ }
175
+ function dispatchDetail(el, name, detail) {
176
+ el.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));
177
+ }
178
+ var init_events_JwSoedEO = __esm({
179
+ "dist/esm/events-JwSoedEO.js"() {
180
+ }
181
+ });
182
+
183
+ // dist/esm/ui-button.entry.js
184
+ var ui_button_entry_exports = {};
185
+ __export(ui_button_entry_exports, {
186
+ ui_button: () => UIButton
187
+ });
188
+ var uiButtonCss, UIButton;
189
+ var init_ui_button_entry = __esm({
190
+ "dist/esm/ui-button.entry.js"() {
191
+ init_index_CEeiinfk();
192
+ init_events_JwSoedEO();
193
+ uiButtonCss = () => `:host{display:inline-flex;vertical-align:middle;color:var(--ui-text-primary)}::slotted(button){appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm'])::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg'])::slotted(button){padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:var(--ui-border-strong)}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([data-variant='solid'])::slotted(button){border-color:var(--ui-accent-solid);background:var(--ui-accent-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-shadow-xs)}:host([data-variant='solid'])::slotted(button:hover:enabled){background:var(--ui-accent-hover);border-color:var(--ui-accent-hover);box-shadow:var(--ui-shadow-sm)}:host([data-variant='solid'])::slotted(button:active:enabled){background:var(--ui-accent-active);border-color:var(--ui-accent-active);box-shadow:none}:host([data-variant='destructive'])::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-shadow-xs)}:host([data-variant='destructive'])::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm)}:host([data-variant='ghost'])::slotted(button){border-color:transparent;background:transparent}:host([data-variant='ghost'])::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([data-variant='ghost'])::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(button:disabled),:host([data-disabled]){opacity:0.6;cursor:not-allowed}`;
194
+ UIButton = class {
195
+ constructor(hostRef) {
196
+ registerInstance(this, hostRef);
197
+ }
198
+ get host() {
199
+ return getElement(this);
200
+ }
201
+ variant;
202
+ size;
203
+ disabled = false;
204
+ slotRef;
205
+ syncToButton() {
206
+ const btn = this.getButton();
207
+ if (!btn)
208
+ return;
209
+ this.host.dataset.variant = this.variant || "";
210
+ this.host.dataset.size = this.size || "";
211
+ this.host.dataset.disabled = this.disabled ? "true" : "";
212
+ btn.disabled = this.disabled;
213
+ }
214
+ componentDidLoad() {
215
+ this.slotRef?.addEventListener("slotchange", () => this.syncToButton());
216
+ this.syncToButton();
217
+ }
218
+ componentDidUpdate() {
219
+ this.syncToButton();
220
+ }
221
+ getButton() {
222
+ const slot = this.host.shadowRoot?.querySelector("slot");
223
+ const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
224
+ return nodes.find((el) => el.tagName === "BUTTON") ?? null;
225
+ }
226
+ onKeydown = (e) => {
227
+ const btn = this.getButton();
228
+ if (btn || this.disabled || !isActivationKey(e))
229
+ return;
230
+ e.preventDefault();
231
+ this.host.click();
232
+ };
233
+ render() {
234
+ return h(Host, { key: "01011aa13228b9e8d10ed11b99c95ef1df91326d", "data-variant": this.variant || void 0, "data-size": this.size || void 0, "data-disabled": this.disabled ? "" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "2bf0274d2732ea46fdf016a46d85bbe6e0d96bba", ref: (el) => this.slotRef = el }));
235
+ }
236
+ static get watchers() {
237
+ return {
238
+ "variant": [{
239
+ "syncToButton": 0
240
+ }],
241
+ "size": [{
242
+ "syncToButton": 0
243
+ }],
244
+ "disabled": [{
245
+ "syncToButton": 0
246
+ }]
247
+ };
248
+ }
249
+ };
250
+ UIButton.style = uiButtonCss();
251
+ }
252
+ });
253
+
254
+ // dist/esm/ui-checkbox.entry.js
255
+ var ui_checkbox_entry_exports = {};
256
+ __export(ui_checkbox_entry_exports, {
257
+ ui_checkbox: () => UICheckbox
258
+ });
259
+ var uiCheckboxCss, UICheckbox;
260
+ var init_ui_checkbox_entry = __esm({
261
+ "dist/esm/ui-checkbox.entry.js"() {
262
+ init_index_CEeiinfk();
263
+ init_events_JwSoedEO();
264
+ uiCheckboxCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='checkbox']){accent-color:var(--ui-accent-solid);width:1.125em;height:1.125em;cursor:pointer}::slotted(input[type='checkbox']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
265
+ UICheckbox = class {
266
+ constructor(hostRef) {
267
+ registerInstance(this, hostRef);
268
+ }
269
+ get host() {
270
+ return getElement(this);
271
+ }
272
+ checked = false;
273
+ defaultChecked = false;
274
+ disabled = false;
275
+ indeterminate = false;
276
+ required = false;
277
+ value = "on";
278
+ internalChecked = false;
279
+ slotRef;
280
+ syncFromProp() {
281
+ this.internalChecked = this.checked;
282
+ }
283
+ syncToInput() {
284
+ const input = this.getInput();
285
+ if (!input)
286
+ return;
287
+ this.host.dataset.disabled = this.disabled ? "true" : "";
288
+ this.host.setAttribute("aria-disabled", String(this.disabled));
289
+ input.checked = this.internalChecked;
290
+ input.indeterminate = this.indeterminate;
291
+ input.disabled = this.disabled;
292
+ input.required = this.required;
293
+ input.value = this.value;
294
+ }
295
+ componentDidLoad() {
296
+ this.syncFromProp();
297
+ this.internalChecked = this.internalChecked || this.defaultChecked;
298
+ this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
299
+ this.syncToInput();
300
+ const input = this.getInput();
301
+ input?.addEventListener("change", this.onInputChange);
302
+ }
303
+ disconnectedCallback() {
304
+ const input = this.getInput();
305
+ input?.removeEventListener("change", this.onInputChange);
306
+ }
307
+ componentDidUpdate() {
308
+ this.syncToInput();
309
+ }
310
+ getInput() {
311
+ const slot = this.host.shadowRoot?.querySelector("slot");
312
+ const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
313
+ return nodes.find((el) => el instanceof HTMLInputElement && el.type === "checkbox") ?? null;
314
+ }
315
+ onInputChange = (e) => {
316
+ const input = e.target;
317
+ if (!input)
318
+ return;
319
+ this.internalChecked = input.checked;
320
+ this.indeterminate = input.indeterminate;
321
+ dispatchDetail(this.host, "change", {
322
+ checked: this.internalChecked,
323
+ value: this.value,
324
+ trigger: eventToTrigger(e)
325
+ });
326
+ };
327
+ render() {
328
+ return h(Host, { key: "c125eb000960f63f48ae8a96e8f001c843f8baa7", role: "checkbox", "aria-checked": this.indeterminate ? "mixed" : String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "8eade76069c56e00d160488c5d91dae7b46ccc99", ref: (el) => this.slotRef = el }));
329
+ }
330
+ static get watchers() {
331
+ return {
332
+ "checked": [{
333
+ "syncFromProp": 0
334
+ }],
335
+ "internalChecked": [{
336
+ "syncToInput": 0
337
+ }],
338
+ "indeterminate": [{
339
+ "syncToInput": 0
340
+ }],
341
+ "disabled": [{
342
+ "syncToInput": 0
343
+ }],
344
+ "required": [{
345
+ "syncToInput": 0
346
+ }]
347
+ };
348
+ }
349
+ };
350
+ UICheckbox.style = uiCheckboxCss();
351
+ }
352
+ });
353
+
354
+ // dist/esm/manager-CR7f2MQC.js
355
+ function syncScrollLock() {
356
+ if (typeof document === "undefined") {
357
+ return;
358
+ }
359
+ const root = document.documentElement;
360
+ if (modalCount > 0) {
361
+ root.setAttribute(scrollLockAttribute, "true");
362
+ root.style.overflow = "hidden";
363
+ return;
364
+ }
365
+ root.removeAttribute(scrollLockAttribute);
366
+ root.style.removeProperty("overflow");
367
+ }
368
+ function getOverlayDismissible(record) {
369
+ return record.dismissible ?? true;
370
+ }
371
+ function handleEscape(event) {
372
+ if (event.key !== "Escape") {
373
+ return;
374
+ }
375
+ requestTopOverlayClose("escape", "keyboard");
376
+ }
377
+ function handleLightDismiss(event) {
378
+ const top = getTopOverlay();
379
+ if (!top || !getOverlayDismissible(top)) {
380
+ return;
381
+ }
382
+ const target = event.target;
383
+ if (target instanceof Node && top.element.contains(target)) {
384
+ return;
385
+ }
386
+ requestTopOverlayClose("light-dismiss", "pointer");
387
+ }
388
+ function ensureListeners() {
389
+ if (listenersAttached || typeof document === "undefined") {
390
+ return;
391
+ }
392
+ document.addEventListener("keydown", handleEscape);
393
+ document.addEventListener("pointerdown", handleLightDismiss, { capture: true });
394
+ listenersAttached = true;
395
+ }
396
+ function removeListenersIfIdle() {
397
+ if (!listenersAttached || stack.length > 0 || typeof document === "undefined") {
398
+ return;
399
+ }
400
+ document.removeEventListener("keydown", handleEscape);
401
+ document.removeEventListener("pointerdown", handleLightDismiss, { capture: true });
402
+ listenersAttached = false;
403
+ }
404
+ function openOverlay(record) {
405
+ closeOverlay(record.id);
406
+ stack.push(record);
407
+ if (record.modal) {
408
+ modalCount += 1;
409
+ syncScrollLock();
410
+ }
411
+ ensureListeners();
412
+ }
413
+ function closeOverlay(id) {
414
+ const index = stack.findIndex((record) => record.id === id);
415
+ if (index >= 0) {
416
+ const [record] = stack.splice(index, 1);
417
+ if (record?.modal) {
418
+ modalCount = Math.max(0, modalCount - 1);
419
+ syncScrollLock();
420
+ }
421
+ }
422
+ removeListenersIfIdle();
423
+ }
424
+ function getTopOverlay() {
425
+ return stack.at(-1);
426
+ }
427
+ function requestTopOverlayClose(reason, trigger) {
428
+ const top = getTopOverlay();
429
+ if (!top) {
430
+ return false;
431
+ }
432
+ if (!getOverlayDismissible(top) && (reason === "escape" || reason === "light-dismiss")) {
433
+ return false;
434
+ }
435
+ top.requestClose(reason, trigger);
436
+ return true;
437
+ }
438
+ var stack, scrollLockAttribute, modalCount, listenersAttached;
439
+ var init_manager_CR7f2MQC = __esm({
440
+ "dist/esm/manager-CR7f2MQC.js"() {
441
+ stack = [];
442
+ scrollLockAttribute = "data-ui-scroll-lock";
443
+ modalCount = 0;
444
+ listenersAttached = false;
445
+ }
446
+ });
447
+
448
+ // dist/esm/ui-context-menu.entry.js
449
+ var ui_context_menu_entry_exports = {};
450
+ __export(ui_context_menu_entry_exports, {
451
+ ui_context_menu: () => UIContextMenu
452
+ });
453
+ var uiContextMenuCss, UIContextMenu;
454
+ var init_ui_context_menu_entry = __esm({
455
+ "dist/esm/ui-context-menu.entry.js"() {
456
+ init_index_CEeiinfk();
457
+ init_manager_CR7f2MQC();
458
+ init_events_JwSoedEO();
459
+ uiContextMenuCss = () => `:host{display:contents}.menu{position:fixed;z-index:var(--ui-z-overlay, 1000);min-width:12rem}.menu[data-open]{display:block}.menu:not([data-open]){display:none !important}`;
460
+ UIContextMenu = class {
461
+ constructor(hostRef) {
462
+ registerInstance(this, hostRef);
463
+ }
464
+ get host() {
465
+ return getElement(this);
466
+ }
467
+ /** Controls the menu when the consumer owns open state. */
468
+ open = false;
469
+ /** Opens the menu on first client render. */
470
+ defaultOpen = false;
471
+ /** Optional id of the region that should also respond to a context-menu gesture. */
472
+ for;
473
+ internalOpen = false;
474
+ overlayId = `ui-context-menu-${Math.random().toString(36).slice(2, 11)}`;
475
+ trigger = null;
476
+ contextTarget = null;
477
+ pointerX = 0;
478
+ pointerY = 0;
479
+ syncFromProp() {
480
+ this.internalOpen = this.open;
481
+ }
482
+ syncTarget() {
483
+ this.resolveTargets();
484
+ this.attachTargetListeners();
485
+ }
486
+ syncOverlay() {
487
+ this.syncTriggerState();
488
+ if (this.internalOpen) {
489
+ openOverlay({
490
+ id: this.overlayId,
491
+ modal: false,
492
+ element: this.host,
493
+ dismissible: true,
494
+ requestClose: (reason, trigger) => this.closeMenu(reason, trigger)
495
+ });
496
+ } else {
497
+ closeOverlay(this.overlayId);
498
+ }
499
+ }
500
+ componentDidLoad() {
501
+ this.syncFromProp();
502
+ this.internalOpen = this.internalOpen || this.defaultOpen;
503
+ this.resolveTargets();
504
+ this.attachTargetListeners();
505
+ this.syncTriggerState();
506
+ this.syncOverlay();
507
+ }
508
+ componentDidUpdate() {
509
+ this.resolveTargets();
510
+ this.attachTargetListeners();
511
+ this.syncTriggerState();
512
+ }
513
+ disconnectedCallback() {
514
+ this.detachTargetListeners();
515
+ closeOverlay(this.overlayId);
516
+ }
517
+ resolveTargets() {
518
+ const previousTrigger = this.trigger;
519
+ const previousContextTarget = this.contextTarget;
520
+ const explicitTrigger = this.host.querySelector('[slot="trigger"]');
521
+ const referencedTarget = this.for ? document.getElementById(this.for) : null;
522
+ this.trigger = explicitTrigger;
523
+ this.contextTarget = referencedTarget ?? explicitTrigger ?? this.host.parentElement;
524
+ if (previousTrigger !== this.trigger || previousContextTarget !== this.contextTarget) {
525
+ previousTrigger?.removeEventListener("click", this.onTriggerClick);
526
+ previousTrigger?.removeEventListener("keydown", this.onTriggerKeydown);
527
+ previousContextTarget?.removeEventListener("contextmenu", this.onContextMenu);
528
+ }
529
+ }
530
+ attachTargetListeners() {
531
+ this.detachTargetListeners();
532
+ this.trigger?.addEventListener("click", this.onTriggerClick);
533
+ this.trigger?.addEventListener("keydown", this.onTriggerKeydown);
534
+ this.contextTarget?.addEventListener("contextmenu", this.onContextMenu);
535
+ }
536
+ detachTargetListeners() {
537
+ this.trigger?.removeEventListener("click", this.onTriggerClick);
538
+ this.trigger?.removeEventListener("keydown", this.onTriggerKeydown);
539
+ this.contextTarget?.removeEventListener("contextmenu", this.onContextMenu);
540
+ }
541
+ syncTriggerState() {
542
+ if (!this.trigger)
543
+ return;
544
+ this.trigger.setAttribute("aria-haspopup", "menu");
545
+ this.trigger.setAttribute("aria-expanded", this.internalOpen ? "true" : "false");
546
+ }
547
+ getItems() {
548
+ return Array.from(this.host.querySelectorAll("ui-menu-item")).filter((item) => !this.isItemDisabled(item));
549
+ }
550
+ focusFirstItem() {
551
+ requestAnimationFrame(() => this.getItems()[0]?.focus());
552
+ }
553
+ openMenu(x, y, trigger) {
554
+ this.pointerX = x;
555
+ this.pointerY = y;
556
+ this.internalOpen = true;
557
+ dispatchDetail(this.host, "open", {
558
+ open: true,
559
+ reason: "action",
560
+ trigger
561
+ });
562
+ this.focusFirstItem();
563
+ }
564
+ openFromTrigger(trigger) {
565
+ if (!this.trigger)
566
+ return;
567
+ const rect = this.trigger.getBoundingClientRect();
568
+ this.openMenu(rect.left, rect.bottom, trigger);
569
+ }
570
+ closeMenu(reason, trigger, returnFocus = true) {
571
+ if (!this.internalOpen)
572
+ return;
573
+ this.internalOpen = false;
574
+ dispatchDetail(this.host, "close", {
575
+ open: false,
576
+ reason,
577
+ trigger
578
+ });
579
+ if (returnFocus) {
580
+ this.trigger?.focus();
581
+ }
582
+ }
583
+ onTriggerClick = (event) => {
584
+ if (this.internalOpen) {
585
+ this.closeMenu("action", event.detail === 0 ? "keyboard" : "pointer");
586
+ return;
587
+ }
588
+ this.openFromTrigger(event.detail === 0 ? "keyboard" : "pointer");
589
+ };
590
+ onTriggerKeydown = (event) => {
591
+ if (event.key !== "Enter" && event.key !== " " && event.key !== "ArrowDown")
592
+ return;
593
+ event.preventDefault();
594
+ if (!this.internalOpen) {
595
+ this.openFromTrigger("keyboard");
596
+ return;
597
+ }
598
+ this.focusFirstItem();
599
+ };
600
+ onContextMenu = (event) => {
601
+ event.preventDefault();
602
+ this.openMenu(event.clientX, event.clientY, "pointer");
603
+ };
604
+ isItemDisabled(item) {
605
+ return item.getAttribute("aria-disabled") === "true" || item.hasAttribute("disabled") || item.getAttribute("disabled") === "true" || item.disabled === true;
606
+ }
607
+ onKeydown = (event) => {
608
+ if (!this.internalOpen)
609
+ return;
610
+ if (event.key === "Escape") {
611
+ event.preventDefault();
612
+ requestTopOverlayClose("escape", "keyboard");
613
+ return;
614
+ }
615
+ if (event.key === "Enter" || event.key === " ") {
616
+ const target = event.target.closest?.("ui-menu-item");
617
+ if (!target || this.isItemDisabled(target))
618
+ return;
619
+ event.preventDefault();
620
+ const value = target.getAttribute("value") ?? target.getAttribute("data-value") ?? "";
621
+ dispatchDetail(this.host, "select", { value, trigger: "keyboard" });
622
+ this.closeMenu("action", "keyboard");
623
+ }
624
+ };
625
+ onItemClick = (event) => {
626
+ const item = event.target.closest?.("ui-menu-item");
627
+ if (!item || this.isItemDisabled(item))
628
+ return;
629
+ const value = item.getAttribute("value") ?? item.getAttribute("data-value") ?? "";
630
+ dispatchDetail(this.host, "select", { value, trigger: "pointer" });
631
+ this.closeMenu("action", "pointer");
632
+ };
633
+ render() {
634
+ return h(Host, { key: "c57c08724714d1de8c22a4a1e86e3a790f45fa20", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "4048abb040de1125b8eb02358480914c97ea6b06", name: "trigger" }), h("div", { key: "6ce80f67142319260093903d289456070d49bfcc", class: "menu", "data-open": this.internalOpen ? "" : void 0, style: { left: `${this.pointerX}px`, top: `${this.pointerY}px` } }, h("ui-menu", { key: "2a2c22f0a797ca3a70a1399de41de2b18257abf8", open: this.internalOpen }, h("slot", { key: "252cc6e973704cd561301b5bf96f98481c6c74ff" }))));
635
+ }
636
+ static get watchers() {
637
+ return {
638
+ "open": [{
639
+ "syncFromProp": 0
640
+ }],
641
+ "for": [{
642
+ "syncTarget": 0
643
+ }],
644
+ "internalOpen": [{
645
+ "syncOverlay": 0
646
+ }]
647
+ };
648
+ }
649
+ };
650
+ UIContextMenu.style = uiContextMenuCss();
651
+ }
652
+ });
653
+
654
+ // dist/esm/ui-dialog.entry.js
655
+ var ui_dialog_entry_exports = {};
656
+ __export(ui_dialog_entry_exports, {
657
+ ui_dialog: () => UIDialog
658
+ });
659
+ var uiDialogCss, UIDialog;
660
+ var init_ui_dialog_entry = __esm({
661
+ "dist/esm/ui-dialog.entry.js"() {
662
+ init_index_CEeiinfk();
663
+ init_manager_CR7f2MQC();
664
+ init_events_JwSoedEO();
665
+ uiDialogCss = () => `:host{display:block}:host:not([open]){display:none}:host dialog{--ui-dialog-duration:var(--ui-motion-base);position:fixed;inset:var(--ui-space-4);width:min(100%, 440px);max-width:min(100%, 440px);margin:auto;padding:var(--ui-space-4);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-dialog);box-shadow:var(--ui-shadow-dialog);visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-dialog-duration) var(--ui-motion-ease), transform var(--ui-dialog-duration) var(--ui-motion-ease), visibility var(--ui-dialog-duration), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1);animation:ui-dialog-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-enter{from{opacity:0;transform:scale(0.96)}}:host dialog::backdrop{background-color:transparent;transition:background-color var(--ui-dialog-duration) var(--ui-motion-ease), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]::backdrop{background-color:var(--ui-overlay-backdrop);animation:ui-dialog-backdrop-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-backdrop-enter{from{background-color:transparent}}`;
666
+ UIDialog = class {
667
+ constructor(hostRef) {
668
+ registerInstance(this, hostRef);
669
+ }
670
+ get host() {
671
+ return getElement(this);
672
+ }
673
+ open = false;
674
+ defaultOpen = false;
675
+ modal = true;
676
+ dismissible = true;
677
+ internalOpen = false;
678
+ overlayId = `ui-dialog-${Math.random().toString(36).slice(2, 11)}`;
679
+ dialogRef;
680
+ syncFromProp() {
681
+ this.internalOpen = this.open;
682
+ }
683
+ syncOpen() {
684
+ if (this.dialogRef) {
685
+ if (this.internalOpen) {
686
+ this.dialogRef.showModal();
687
+ openOverlay({
688
+ id: this.overlayId,
689
+ modal: this.modal,
690
+ element: this.host,
691
+ dismissible: this.dismissible,
692
+ requestClose: (reason, trigger) => this.handleRequestClose(reason, trigger)
693
+ });
694
+ } else {
695
+ this.dialogRef.close();
696
+ closeOverlay(this.overlayId);
697
+ }
698
+ }
699
+ }
700
+ componentDidLoad() {
701
+ this.syncFromProp();
702
+ this.internalOpen = this.internalOpen || this.defaultOpen;
703
+ this.dialogRef?.addEventListener("close", this.onDialogClose);
704
+ this.syncOpen();
705
+ }
706
+ disconnectedCallback() {
707
+ this.dialogRef?.removeEventListener("close", this.onDialogClose);
708
+ closeOverlay(this.overlayId);
709
+ }
710
+ componentDidUpdate() {
711
+ this.syncOpen();
712
+ }
713
+ handleRequestClose(reason, trigger) {
714
+ this.internalOpen = false;
715
+ dispatchDetail(this.host, "close", {
716
+ open: false,
717
+ reason,
718
+ trigger
719
+ });
720
+ }
721
+ onDialogClose = () => {
722
+ if (this.internalOpen) {
723
+ this.internalOpen = false;
724
+ closeOverlay(this.overlayId);
725
+ dispatchDetail(this.host, "close", {
726
+ open: false,
727
+ reason: "programmatic",
728
+ trigger: "programmatic"
729
+ });
730
+ }
731
+ };
732
+ onKeydown = (e) => {
733
+ if (e.key === "Escape") {
734
+ requestTopOverlayClose("escape", "keyboard");
735
+ }
736
+ };
737
+ render() {
738
+ return h(Host, { key: "2a2fcdfa1e3fac5eb3c0e3d6748cebdf388c216d", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("dialog", { key: "c3eef2bb3bec77fa518269fce38c19c2ededda49", ref: (el) => this.dialogRef = el, open: this.internalOpen }, h("slot", { key: "9ae5c30d57096184ec287fd9dd134ff566b9fd39" })));
739
+ }
740
+ static get watchers() {
741
+ return {
742
+ "open": [{
743
+ "syncFromProp": 0
744
+ }],
745
+ "internalOpen": [{
746
+ "syncOpen": 0
747
+ }]
748
+ };
749
+ }
750
+ };
751
+ UIDialog.style = uiDialogCss();
752
+ }
753
+ });
754
+
755
+ // dist/esm/id-hgBUJRDa.js
756
+ function createId(prefix) {
757
+ nextId += 1;
758
+ return `ui-core-${prefix}-${nextId}`;
759
+ }
760
+ var nextId;
761
+ var init_id_hgBUJRDa = __esm({
762
+ "dist/esm/id-hgBUJRDa.js"() {
763
+ nextId = 0;
764
+ }
765
+ });
766
+
767
+ // dist/esm/ui-disclosure.entry.js
768
+ var ui_disclosure_entry_exports = {};
769
+ __export(ui_disclosure_entry_exports, {
770
+ ui_disclosure: () => UIDisclosure
771
+ });
772
+ var uiDisclosureCss, UIDisclosure;
773
+ var init_ui_disclosure_entry = __esm({
774
+ "dist/esm/ui-disclosure.entry.js"() {
775
+ init_index_CEeiinfk();
776
+ init_id_hgBUJRDa();
777
+ init_events_JwSoedEO();
778
+ uiDisclosureCss = () => `:host{display:block}::slotted([hidden]){display:none !important}`;
779
+ UIDisclosure = class {
780
+ constructor(hostRef) {
781
+ registerInstance(this, hostRef);
782
+ }
783
+ get host() {
784
+ return getElement(this);
785
+ }
786
+ open = false;
787
+ defaultOpen = false;
788
+ disabled = false;
789
+ internalOpen = false;
790
+ contentId = "";
791
+ trigger = null;
792
+ content = null;
793
+ syncFromProp() {
794
+ this.internalOpen = this.open;
795
+ }
796
+ syncState() {
797
+ if (this.trigger) {
798
+ this.trigger.setAttribute("aria-expanded", String(this.internalOpen));
799
+ }
800
+ if (this.content) {
801
+ this.content.hidden = !this.internalOpen;
802
+ }
803
+ }
804
+ componentDidLoad() {
805
+ this.resolveParts();
806
+ this.syncFromProp();
807
+ this.internalOpen = this.internalOpen || this.defaultOpen;
808
+ this.syncState();
809
+ this.trigger?.addEventListener("click", this.onTriggerClick);
810
+ this.trigger?.addEventListener("keydown", this.onTriggerKeydown);
811
+ }
812
+ disconnectedCallback() {
813
+ this.trigger?.removeEventListener("click", this.onTriggerClick);
814
+ this.trigger?.removeEventListener("keydown", this.onTriggerKeydown);
815
+ }
816
+ componentDidUpdate() {
817
+ this.syncState();
818
+ }
819
+ resolveParts() {
820
+ this.trigger = this.host.querySelector("[data-ui-disclosure-trigger], button, [aria-controls]");
821
+ const controlsId = this.trigger?.getAttribute("aria-controls") ?? "";
822
+ if (controlsId) {
823
+ this.content = document.getElementById(controlsId);
824
+ } else {
825
+ const children = Array.from(this.host.children);
826
+ this.content = children.find((c) => c !== this.trigger) ?? null;
827
+ }
828
+ if (this.trigger && this.content) {
829
+ if (!this.content.id) {
830
+ this.content.id = createId("disclosure-content");
831
+ }
832
+ this.trigger.setAttribute("aria-controls", this.content.id);
833
+ this.contentId = this.content.id;
834
+ }
835
+ if (this.trigger instanceof HTMLButtonElement) {
836
+ this.trigger.disabled = this.disabled;
837
+ } else if (this.trigger) {
838
+ this.trigger.setAttribute("aria-disabled", String(this.disabled));
839
+ }
840
+ }
841
+ setOpen(next, action) {
842
+ if (this.internalOpen === next)
843
+ return;
844
+ this.internalOpen = next;
845
+ dispatchDetail(this.host, next ? "open" : "close", {
846
+ open: next,
847
+ reason: action.reason,
848
+ trigger: action.trigger
849
+ });
850
+ }
851
+ onTriggerClick = (e) => {
852
+ if (this.disabled) {
853
+ e.preventDefault();
854
+ return;
855
+ }
856
+ this.setOpen(!this.internalOpen, { reason: "action", trigger: eventToTrigger(e) });
857
+ };
858
+ onTriggerKeydown = (e) => {
859
+ if (this.disabled || !isActivationKey(e))
860
+ return;
861
+ e.preventDefault();
862
+ this.setOpen(!this.internalOpen, { reason: "action", trigger: "keyboard" });
863
+ };
864
+ render() {
865
+ return h(Host, { key: "433d2a0f6efe939e1a1ae60e27464139571004db" }, h("slot", { key: "7533ae794a7ce8be044c2ff0b5d3d1b72c01575c" }));
866
+ }
867
+ static get watchers() {
868
+ return {
869
+ "open": [{
870
+ "syncFromProp": 0
871
+ }],
872
+ "internalOpen": [{
873
+ "syncState": 0
874
+ }]
875
+ };
876
+ }
877
+ };
878
+ UIDisclosure.style = uiDisclosureCss();
879
+ }
880
+ });
881
+
882
+ // dist/esm/ui-floating-action-button.entry.js
883
+ var ui_floating_action_button_entry_exports = {};
884
+ __export(ui_floating_action_button_entry_exports, {
885
+ ui_floating_action_button: () => UIFloatingActionButton
886
+ });
887
+ var uiFloatingActionButtonCss, UIFloatingActionButton;
888
+ var init_ui_floating_action_button_entry = __esm({
889
+ "dist/esm/ui-floating-action-button.entry.js"() {
890
+ init_index_CEeiinfk();
891
+ uiFloatingActionButtonCss = () => `:host{position:fixed;inset-block-end:calc( var(--ui-floating-action-button-bottom, var(--ui-space-6, 1.5rem)) + env(safe-area-inset-bottom) );inset-inline-end:var(--ui-floating-action-button-inline-end, var(--ui-space-5, 1.25rem));inline-size:var(--ui-floating-action-button-size, 56px);block-size:var(--ui-floating-action-button-size, 56px);display:inline-flex;z-index:var(--ui-floating-action-button-z-index, 100)}button{appearance:none;inline-size:100%;block-size:100%;border:none;border-radius:999px;margin:0;padding:0;display:inline-flex;align-items:center;justify-content:center;background:var(--ui-floating-action-button-bg, var(--ui-accent-solid));color:var(--ui-floating-action-button-color, var(--ui-text-on-accent));box-shadow:var( --ui-floating-action-button-shadow, 0 4px 12px color-mix(in srgb, var(--ui-accent-solid) 40%, transparent) );cursor:pointer;transition:background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease), transform var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease), box-shadow var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease)}button:hover:enabled{background:var(--ui-floating-action-button-hover-bg, var(--ui-accent-hover));box-shadow:var( --ui-floating-action-button-hover-shadow, 0 6px 16px color-mix(in srgb, var(--ui-accent-solid) 50%, transparent) )}button:active:enabled{transform:scale(var(--ui-floating-action-button-active-scale, 0.94))}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:2px}button:disabled,:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(svg){inline-size:var(--ui-floating-action-button-icon-size, 24px);block-size:var(--ui-floating-action-button-icon-size, 24px);flex-shrink:0}@media (min-width: 768px){:host([mobile-only]){display:none}}`;
892
+ UIFloatingActionButton = class {
893
+ constructor(hostRef) {
894
+ registerInstance(this, hostRef);
895
+ }
896
+ disabled = false;
897
+ mobileOnly = false;
898
+ label = "";
899
+ render() {
900
+ return h(Host, { key: "4b5b5eb530e4ab424e1189cff83d697f28432d84", "data-disabled": this.disabled ? "" : void 0 }, h("button", { key: "f8a4b8ac90bf306434b2b905030b46c1fcbcb000", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "500d0606ea7166669f104e42813591395fc81c3f" })));
901
+ }
902
+ };
903
+ UIFloatingActionButton.style = uiFloatingActionButtonCss();
904
+ }
905
+ });
906
+
907
+ // dist/esm/ui-form-field.entry.js
908
+ var ui_form_field_entry_exports = {};
909
+ __export(ui_form_field_entry_exports, {
910
+ ui_form_field: () => UIFormField
911
+ });
912
+ var uiFormFieldCss, UIFormField;
913
+ var init_ui_form_field_entry = __esm({
914
+ "dist/esm/ui-form-field.entry.js"() {
915
+ init_index_CEeiinfk();
916
+ init_id_hgBUJRDa();
917
+ uiFormFieldCss = () => `:host{display:grid;gap:var(--ui-space-2);color:var(--ui-text-primary)}::slotted(label){color:var(--ui-text-secondary);font-size:0.95rem}::slotted([data-slot='help']){color:var(--ui-text-muted);font-size:0.875rem}::slotted([data-slot='error']),::slotted([role='alert']){color:var(--ui-accent-active);font-size:0.875rem}`;
918
+ UIFormField = class {
919
+ constructor(hostRef) {
920
+ registerInstance(this, hostRef);
921
+ }
922
+ get host() {
923
+ return getElement(this);
924
+ }
925
+ invalid = false;
926
+ disabled = false;
927
+ required = false;
928
+ componentDidLoad() {
929
+ this.wire();
930
+ }
931
+ componentDidUpdate() {
932
+ this.wire();
933
+ }
934
+ wire() {
935
+ const label = this.host.querySelector("label");
936
+ const input = this.host.querySelector("input, textarea, select");
937
+ const help = this.host.querySelector('[data-slot="help"]');
938
+ const error = this.host.querySelector('[data-slot="error"], [role="alert"]');
939
+ if (!input)
940
+ return;
941
+ if (!input.id) {
942
+ input.id = createId("form-field-input");
943
+ }
944
+ if (label && !label.getAttribute("for")) {
945
+ label.setAttribute("for", input.id);
946
+ }
947
+ const describedIds = [];
948
+ if (help) {
949
+ if (!help.id)
950
+ help.id = createId("form-field-help");
951
+ describedIds.push(help.id);
952
+ }
953
+ if (error) {
954
+ if (!error.id)
955
+ error.id = createId("form-field-error");
956
+ describedIds.push(error.id);
957
+ }
958
+ if (describedIds.length) {
959
+ input.setAttribute("aria-describedby", describedIds.join(" "));
960
+ }
961
+ input.disabled = this.disabled;
962
+ input.required = this.required;
963
+ input.setAttribute("aria-invalid", this.invalid ? "true" : "false");
964
+ }
965
+ render() {
966
+ return h(Host, { key: "f2eb3a7bf493c0630ef27ee21fca1ffee94be536", "data-invalid": this.invalid ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-required": this.required ? "" : void 0 }, h("slot", { key: "f5f30e388ed9473ee50103f12527a1dd9cfb0b0b" }));
967
+ }
968
+ };
969
+ UIFormField.style = uiFormFieldCss();
970
+ }
971
+ });
972
+
973
+ // dist/esm/ui-icon-button.entry.js
974
+ var ui_icon_button_entry_exports = {};
975
+ __export(ui_icon_button_entry_exports, {
976
+ ui_icon_button: () => UIIconButton
977
+ });
978
+ var uiIconButtonCss, UIIconButton;
979
+ var init_ui_icon_button_entry = __esm({
980
+ "dist/esm/ui-icon-button.entry.js"() {
981
+ init_index_CEeiinfk();
982
+ uiIconButtonCss = () => `:host{display:inline-flex;color:var(--ui-text-secondary)}button{appearance:none;inline-size:var(--ui-icon-button-size, 2.5rem);block-size:var(--ui-icon-button-size, 2.5rem);min-inline-size:var(--ui-icon-button-size, 2.5rem);min-block-size:var(--ui-icon-button-size, 2.5rem);padding:0;margin:0;border:1px solid transparent;border-radius:var(--ui-icon-button-radius, var(--ui-radius-2));background:var(--ui-icon-button-bg, transparent);color:inherit;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease)}:host([size='sm']) button{inline-size:var(--ui-icon-button-size-sm, 2rem);block-size:var(--ui-icon-button-size-sm, 2rem);min-inline-size:var(--ui-icon-button-size-sm, 2rem);min-block-size:var(--ui-icon-button-size-sm, 2rem)}:host([size='lg']) button{inline-size:var(--ui-icon-button-size-lg, 2.75rem);block-size:var(--ui-icon-button-size-lg, 2.75rem);min-inline-size:var(--ui-icon-button-size-lg, 2.75rem);min-block-size:var(--ui-icon-button-size-lg, 2.75rem)}:host([variant='outline']) button{border-color:var(--ui-icon-button-border, var(--ui-border-default));background:var(--ui-icon-button-outline-bg, var(--ui-surface-default));color:var(--ui-icon-button-outline-color, var(--ui-text-primary))}:host([variant='solid']) button{background:var(--ui-icon-button-solid-bg, var(--ui-accent-solid));color:var(--ui-icon-button-solid-color, var(--ui-text-on-accent));box-shadow:var( --ui-icon-button-solid-shadow, 0 1px 2px color-mix(in srgb, var(--ui-accent-solid) 18%, transparent) )}button:hover:enabled{background:var(--ui-icon-button-hover-bg, var(--ui-surface-muted));color:var(--ui-icon-button-hover-color, var(--ui-text-primary))}:host([variant='outline']) button:hover:enabled{border-color:var(--ui-icon-button-hover-border, var(--ui-border-strong))}:host([variant='solid']) button:hover:enabled{background:var(--ui-icon-button-solid-hover-bg, var(--ui-accent-hover))}button:active:enabled{transform:scale(var(--ui-icon-button-active-scale, 0.96))}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:2px}button:disabled,:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(svg){inline-size:var(--ui-icon-button-icon-size, 1.125rem);block-size:var(--ui-icon-button-icon-size, 1.125rem);flex-shrink:0;stroke-width:var(--ui-icon-button-icon-stroke-width, 1.75)}`;
983
+ UIIconButton = class {
984
+ constructor(hostRef) {
985
+ registerInstance(this, hostRef);
986
+ }
987
+ disabled = false;
988
+ label = "";
989
+ size = "md";
990
+ variant = "ghost";
991
+ render() {
992
+ return h(Host, { key: "8f4c7271505fa061da954f1e989fc526dc980407", "data-disabled": this.disabled ? "" : void 0 }, h("button", { key: "c56009d4028a557cd6f7f19833b0af6412b90c1c", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "ac2f201b0fbedb23106f72135ff8c3b6f25fca60" })));
993
+ }
994
+ };
995
+ UIIconButton.style = uiIconButtonCss();
996
+ }
997
+ });
998
+
999
+ // dist/esm/ui-input.entry.js
1000
+ var ui_input_entry_exports = {};
1001
+ __export(ui_input_entry_exports, {
1002
+ ui_input: () => UIInput
1003
+ });
1004
+ var uiInputCss, UIInput;
1005
+ var init_ui_input_entry = __esm({
1006
+ "dist/esm/ui-input.entry.js"() {
1007
+ init_index_CEeiinfk();
1008
+ init_events_JwSoedEO();
1009
+ uiInputCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(input){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding:var(--ui-space-2) var(--ui-space-3);margin:0;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(input:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(input:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(input),::slotted(input[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(input:disabled){background:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(input:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
1010
+ UIInput = class {
1011
+ constructor(hostRef) {
1012
+ registerInstance(this, hostRef);
1013
+ }
1014
+ get host() {
1015
+ return getElement(this);
1016
+ }
1017
+ value = "";
1018
+ defaultValue = "";
1019
+ disabled = false;
1020
+ invalid = false;
1021
+ readOnly = false;
1022
+ internalValue = "";
1023
+ slotRef;
1024
+ syncFromProp() {
1025
+ this.internalValue = this.value;
1026
+ }
1027
+ syncToInput() {
1028
+ const input = this.getInput();
1029
+ if (!input)
1030
+ return;
1031
+ this.host.dataset.invalid = this.invalid ? "true" : "";
1032
+ input.value = this.internalValue;
1033
+ input.defaultValue = this.defaultValue;
1034
+ input.disabled = this.disabled;
1035
+ input.readOnly = this.readOnly;
1036
+ input.setAttribute("aria-invalid", this.invalid ? "true" : "false");
1037
+ }
1038
+ componentDidLoad() {
1039
+ this.syncFromProp();
1040
+ this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
1041
+ this.syncToInput();
1042
+ const input = this.getInput();
1043
+ input?.addEventListener("input", this.onInput);
1044
+ input?.addEventListener("change", this.onChange);
1045
+ }
1046
+ disconnectedCallback() {
1047
+ const input = this.getInput();
1048
+ input?.removeEventListener("input", this.onInput);
1049
+ input?.removeEventListener("change", this.onChange);
1050
+ }
1051
+ componentDidUpdate() {
1052
+ this.syncToInput();
1053
+ }
1054
+ getInput() {
1055
+ const slot = this.host.shadowRoot?.querySelector("slot");
1056
+ const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
1057
+ return nodes.find((el) => el.tagName === "INPUT") ?? null;
1058
+ }
1059
+ onInput = (e) => {
1060
+ const input = e.target;
1061
+ if (!input)
1062
+ return;
1063
+ this.internalValue = input.value;
1064
+ dispatchDetail(this.host, "input", {
1065
+ value: this.internalValue,
1066
+ trigger: eventToTrigger(e)
1067
+ });
1068
+ };
1069
+ onChange = (e) => {
1070
+ const input = this.getInput();
1071
+ if (!input)
1072
+ return;
1073
+ this.internalValue = input.value;
1074
+ dispatchDetail(this.host, "change", {
1075
+ value: this.internalValue,
1076
+ trigger: eventToTrigger(e)
1077
+ });
1078
+ };
1079
+ render() {
1080
+ return h(Host, { key: "73f518c7f12fa483d592041d185498bd91f9bb8b", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "7ef93ef7c5d36ccdfa66cfb4d14f08707e9ea790", ref: (el) => this.slotRef = el }));
1081
+ }
1082
+ static get watchers() {
1083
+ return {
1084
+ "value": [{
1085
+ "syncFromProp": 0
1086
+ }],
1087
+ "internalValue": [{
1088
+ "syncToInput": 0
1089
+ }],
1090
+ "defaultValue": [{
1091
+ "syncToInput": 0
1092
+ }],
1093
+ "disabled": [{
1094
+ "syncToInput": 0
1095
+ }],
1096
+ "invalid": [{
1097
+ "syncToInput": 0
1098
+ }],
1099
+ "readOnly": [{
1100
+ "syncToInput": 0
1101
+ }]
1102
+ };
1103
+ }
1104
+ };
1105
+ UIInput.style = uiInputCss();
1106
+ }
1107
+ });
1108
+
1109
+ // dist/esm/ui-menu-item.entry.js
1110
+ var ui_menu_item_entry_exports = {};
1111
+ __export(ui_menu_item_entry_exports, {
1112
+ ui_menu_item: () => UIMenuItem
1113
+ });
1114
+ var uiMenuItemCss, UIMenuItem;
1115
+ var init_ui_menu_item_entry = __esm({
1116
+ "dist/esm/ui-menu-item.entry.js"() {
1117
+ init_index_CEeiinfk();
1118
+ uiMenuItemCss = () => `:host{display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}:host(:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}:host([aria-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}`;
1119
+ UIMenuItem = class {
1120
+ constructor(hostRef) {
1121
+ registerInstance(this, hostRef);
1122
+ }
1123
+ disabled = false;
1124
+ value = "";
1125
+ render() {
1126
+ return h(Host, { key: "485ac24af80b72a751f6fc13a084847ba0f7605e", role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? "true" : void 0, "data-value": this.value || void 0 }, h("slot", { key: "b2bde48d9b819b0e55fbe00c2939ccd44f63bc15" }));
1127
+ }
1128
+ };
1129
+ UIMenuItem.style = uiMenuItemCss();
1130
+ }
1131
+ });
1132
+
1133
+ // dist/esm/ui-menu.entry.js
1134
+ var ui_menu_entry_exports = {};
1135
+ __export(ui_menu_entry_exports, {
1136
+ ui_menu: () => UIMenu
1137
+ });
1138
+ var uiMenuCss, UIMenu;
1139
+ var init_ui_menu_entry = __esm({
1140
+ "dist/esm/ui-menu.entry.js"() {
1141
+ init_index_CEeiinfk();
1142
+ init_events_JwSoedEO();
1143
+ uiMenuCss = () => `:host{display:flex;flex-direction:column;min-width:12rem;padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}::slotted(ui-menu-item){display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(ui-menu-item:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}::slotted(ui-menu-item[aria-disabled='true']),::slotted(ui-menu-item[disabled]){opacity:0.6;cursor:not-allowed}`;
1144
+ UIMenu = class {
1145
+ constructor(hostRef) {
1146
+ registerInstance(this, hostRef);
1147
+ }
1148
+ get host() {
1149
+ return getElement(this);
1150
+ }
1151
+ open = false;
1152
+ defaultOpen = false;
1153
+ internalOpen = false;
1154
+ syncFromProp() {
1155
+ this.internalOpen = this.open;
1156
+ }
1157
+ componentDidLoad() {
1158
+ this.syncFromProp();
1159
+ this.internalOpen = this.internalOpen || this.defaultOpen;
1160
+ this.host.addEventListener("click", this.onItemClick);
1161
+ this.host.addEventListener("keydown", this.onKeydown);
1162
+ }
1163
+ disconnectedCallback() {
1164
+ this.host.removeEventListener("click", this.onItemClick);
1165
+ this.host.removeEventListener("keydown", this.onKeydown);
1166
+ }
1167
+ getItems() {
1168
+ return Array.from(this.host.querySelectorAll("ui-menu-item"));
1169
+ }
1170
+ isItemDisabled(item) {
1171
+ return item.getAttribute("aria-disabled") === "true" || item.hasAttribute("disabled") || item.getAttribute("disabled") === "true" || item.disabled === true;
1172
+ }
1173
+ onItemClick = (e) => {
1174
+ const item = e.target.closest?.("ui-menu-item");
1175
+ if (!item || item.getRootNode() !== this.host.getRootNode())
1176
+ return;
1177
+ if (this.isItemDisabled(item))
1178
+ return;
1179
+ const value = item.getAttribute("value") ?? item.getAttribute("data-value") ?? "";
1180
+ dispatchDetail(this.host, "select", { value, trigger: eventToTrigger(e) });
1181
+ dispatchDetail(this.host, "close", {
1182
+ open: false,
1183
+ reason: "action",
1184
+ trigger: eventToTrigger(e)
1185
+ });
1186
+ this.internalOpen = false;
1187
+ };
1188
+ onKeydown = (e) => {
1189
+ const items = this.getItems().filter((i) => !this.isItemDisabled(i));
1190
+ if (items.length === 0)
1191
+ return;
1192
+ const target = e.target.closest?.("ui-menu-item");
1193
+ const currentIndex = target && target instanceof HTMLElement ? items.indexOf(target) : -1;
1194
+ if (e.key === "Enter" || e.key === " ") {
1195
+ e.preventDefault();
1196
+ if (target && currentIndex >= 0) {
1197
+ const value = target.getAttribute("value") ?? target.getAttribute("data-value") ?? "";
1198
+ dispatchDetail(this.host, "select", { value, trigger: "keyboard" });
1199
+ dispatchDetail(this.host, "close", {
1200
+ open: false,
1201
+ reason: "action",
1202
+ trigger: "keyboard"
1203
+ });
1204
+ this.internalOpen = false;
1205
+ }
1206
+ return;
1207
+ }
1208
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
1209
+ e.preventDefault();
1210
+ const nextIndex = e.key === "ArrowDown" ? currentIndex < 0 ? 0 : Math.min(currentIndex + 1, items.length - 1) : currentIndex <= 0 ? items.length - 1 : currentIndex - 1;
1211
+ items[nextIndex].focus();
1212
+ }
1213
+ };
1214
+ render() {
1215
+ return h(Host, { key: "f06ad0f8c09060495757ced2da095817409720b7", role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "d504fd3c33894d0e464b957ce67c75fe8a24899c" }));
1216
+ }
1217
+ static get watchers() {
1218
+ return {
1219
+ "open": [{
1220
+ "syncFromProp": 0
1221
+ }]
1222
+ };
1223
+ }
1224
+ };
1225
+ UIMenu.style = uiMenuCss();
1226
+ }
1227
+ });
1228
+
1229
+ // dist/esm/ui-popover.entry.js
1230
+ var ui_popover_entry_exports = {};
1231
+ __export(ui_popover_entry_exports, {
1232
+ ui_popover: () => UIPopover
1233
+ });
1234
+ var uiPopoverCss, UIPopover;
1235
+ var init_ui_popover_entry = __esm({
1236
+ "dist/esm/ui-popover.entry.js"() {
1237
+ init_index_CEeiinfk();
1238
+ init_manager_CR7f2MQC();
1239
+ init_events_JwSoedEO();
1240
+ uiPopoverCss = () => `:host{padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg);max-width:min(20rem, 90vw)}`;
1241
+ UIPopover = class {
1242
+ constructor(hostRef) {
1243
+ registerInstance(this, hostRef);
1244
+ }
1245
+ get host() {
1246
+ return getElement(this);
1247
+ }
1248
+ open = false;
1249
+ defaultOpen = false;
1250
+ internalOpen = false;
1251
+ overlayId = `ui-popover-${Math.random().toString(36).slice(2, 11)}`;
1252
+ syncFromProp() {
1253
+ this.internalOpen = this.open;
1254
+ }
1255
+ onOpenChange() {
1256
+ this.syncOverlay();
1257
+ if (this.internalOpen) {
1258
+ dispatchDetail(this.host, "open", {
1259
+ open: true,
1260
+ reason: "programmatic",
1261
+ trigger: "programmatic"
1262
+ });
1263
+ } else {
1264
+ dispatchDetail(this.host, "close", {
1265
+ open: false,
1266
+ reason: "programmatic",
1267
+ trigger: "programmatic"
1268
+ });
1269
+ }
1270
+ }
1271
+ syncOverlay() {
1272
+ if (this.internalOpen) {
1273
+ openOverlay({
1274
+ id: this.overlayId,
1275
+ modal: false,
1276
+ element: this.host,
1277
+ dismissible: true,
1278
+ requestClose: (reason, trigger) => this.handleRequestClose(reason, trigger)
1279
+ });
1280
+ } else {
1281
+ closeOverlay(this.overlayId);
1282
+ }
1283
+ }
1284
+ componentDidLoad() {
1285
+ this.syncFromProp();
1286
+ this.internalOpen = this.internalOpen || this.defaultOpen;
1287
+ this.host.addEventListener("keydown", this.onKeydown);
1288
+ this.syncOverlay();
1289
+ }
1290
+ disconnectedCallback() {
1291
+ this.host.removeEventListener("keydown", this.onKeydown);
1292
+ closeOverlay(this.overlayId);
1293
+ }
1294
+ componentDidUpdate() {
1295
+ this.syncOverlay();
1296
+ }
1297
+ handleRequestClose(reason, trigger) {
1298
+ this.internalOpen = false;
1299
+ dispatchDetail(this.host, "close", {
1300
+ open: false,
1301
+ reason,
1302
+ trigger
1303
+ });
1304
+ }
1305
+ onKeydown = (e) => {
1306
+ if (e.key === "Escape") {
1307
+ requestTopOverlayClose("escape", "keyboard");
1308
+ }
1309
+ };
1310
+ render() {
1311
+ return h(Host, { key: "121482cf2fe9ba972ae6b902568389790b9accaa", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "095ce0c147ed8c8411114563c9efcb5fe775fcae" }));
1312
+ }
1313
+ static get watchers() {
1314
+ return {
1315
+ "open": [{
1316
+ "syncFromProp": 0
1317
+ }],
1318
+ "internalOpen": [{
1319
+ "onOpenChange": 0
1320
+ }]
1321
+ };
1322
+ }
1323
+ };
1324
+ UIPopover.style = uiPopoverCss();
1325
+ }
1326
+ });
1327
+
1328
+ // dist/esm/ui-radio-group.entry.js
1329
+ var ui_radio_group_entry_exports = {};
1330
+ __export(ui_radio_group_entry_exports, {
1331
+ ui_radio_group: () => UIRadioGroup
1332
+ });
1333
+ var uiRadioGroupCss, UIRadioGroup;
1334
+ var init_ui_radio_group_entry = __esm({
1335
+ "dist/esm/ui-radio-group.entry.js"() {
1336
+ init_index_CEeiinfk();
1337
+ init_events_JwSoedEO();
1338
+ uiRadioGroupCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2)}:host([data-orientation='vertical']){display:inline-grid;justify-items:start}`;
1339
+ UIRadioGroup = class {
1340
+ constructor(hostRef) {
1341
+ registerInstance(this, hostRef);
1342
+ }
1343
+ get host() {
1344
+ return getElement(this);
1345
+ }
1346
+ value = "";
1347
+ name = "";
1348
+ orientation = "horizontal";
1349
+ disabled = false;
1350
+ required = false;
1351
+ internalValue = "";
1352
+ syncFromProp() {
1353
+ this.internalValue = this.value;
1354
+ }
1355
+ syncToRadios() {
1356
+ const radios = this.getRadios();
1357
+ radios.forEach((radio) => {
1358
+ radio.checked = (radio.getAttribute("value") ?? "") === this.internalValue;
1359
+ radio.name = this.name || this.groupId;
1360
+ if (this.disabled) {
1361
+ radio.setAttribute("aria-disabled", "true");
1362
+ radio.setAttribute("data-disabled", "true");
1363
+ } else {
1364
+ radio.removeAttribute("aria-disabled");
1365
+ radio.removeAttribute("data-disabled");
1366
+ }
1367
+ });
1368
+ this.updateRovingTabindex();
1369
+ }
1370
+ groupId = `ui-radio-group-${Math.random().toString(36).slice(2, 9)}`;
1371
+ componentDidLoad() {
1372
+ this.syncFromProp();
1373
+ this.syncToRadios();
1374
+ this.host.addEventListener("change", this.onRadioChange);
1375
+ this.host.addEventListener("keydown", this.onKeydown);
1376
+ }
1377
+ disconnectedCallback() {
1378
+ this.host.removeEventListener("change", this.onRadioChange);
1379
+ this.host.removeEventListener("keydown", this.onKeydown);
1380
+ }
1381
+ componentDidUpdate() {
1382
+ this.syncToRadios();
1383
+ }
1384
+ getRadios() {
1385
+ return Array.from(this.host.querySelectorAll("ui-radio"));
1386
+ }
1387
+ updateRovingTabindex() {
1388
+ const radios = this.getRadios();
1389
+ const currentIndex = radios.findIndex((r) => (r.getAttribute("value") ?? "") === this.internalValue);
1390
+ radios.forEach((r, i) => {
1391
+ const input = r.querySelector('input[type="radio"]');
1392
+ if (input) {
1393
+ input.tabIndex = i === (currentIndex >= 0 ? currentIndex : 0) ? 0 : -1;
1394
+ }
1395
+ });
1396
+ }
1397
+ setValue(newValue, trigger) {
1398
+ const prev = this.internalValue;
1399
+ this.internalValue = newValue;
1400
+ this.syncToRadios();
1401
+ dispatchDetail(this.host, "select", { value: newValue, previousValue: prev, trigger });
1402
+ dispatchDetail(this.host, "change", {
1403
+ checked: true,
1404
+ value: newValue,
1405
+ trigger
1406
+ });
1407
+ }
1408
+ onRadioChange = (e) => {
1409
+ const target = e.target.closest?.("ui-radio");
1410
+ if (!target || target.getRootNode() !== this.host.getRootNode())
1411
+ return;
1412
+ const value = target.getAttribute("value") ?? "";
1413
+ if (value && value !== this.internalValue) {
1414
+ this.setValue(value, eventToTrigger(e));
1415
+ }
1416
+ };
1417
+ onKeydown = (e) => {
1418
+ const radios = this.getRadios();
1419
+ if (radios.length === 0)
1420
+ return;
1421
+ const currentIndex = radios.findIndex((r) => (r.getAttribute("value") ?? "") === this.internalValue);
1422
+ const axis = this.orientation === "vertical" ? "vertical" : "horizontal";
1423
+ const isPrev = axis === "horizontal" ? e.key === "ArrowLeft" : e.key === "ArrowUp";
1424
+ const isNext = axis === "horizontal" ? e.key === "ArrowRight" : e.key === "ArrowDown";
1425
+ if (!isPrev && !isNext)
1426
+ return;
1427
+ e.preventDefault();
1428
+ let nextIndex;
1429
+ if (isNext) {
1430
+ nextIndex = currentIndex < 0 ? 0 : Math.min(currentIndex + 1, radios.length - 1);
1431
+ } else {
1432
+ nextIndex = currentIndex <= 0 ? radios.length - 1 : currentIndex - 1;
1433
+ }
1434
+ const nextRadio = radios[nextIndex];
1435
+ const nextValue = nextRadio?.getAttribute("value") ?? "";
1436
+ if (nextValue) {
1437
+ this.setValue(nextValue, "keyboard");
1438
+ nextRadio?.querySelector('input[type="radio"]')?.focus();
1439
+ }
1440
+ };
1441
+ render() {
1442
+ return h(Host, { key: "5182efff607bcf9add3f0981ce2af3a42bd356b8", role: "radiogroup", "aria-orientation": this.orientation, "data-orientation": this.orientation, "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "2889bc2abecddf3e7cf81cd54053bdd608559dfc" }));
1443
+ }
1444
+ static get watchers() {
1445
+ return {
1446
+ "value": [{
1447
+ "syncFromProp": 0
1448
+ }],
1449
+ "internalValue": [{
1450
+ "syncToRadios": 0
1451
+ }],
1452
+ "name": [{
1453
+ "syncToRadios": 0
1454
+ }],
1455
+ "orientation": [{
1456
+ "syncToRadios": 0
1457
+ }],
1458
+ "disabled": [{
1459
+ "syncToRadios": 0
1460
+ }]
1461
+ };
1462
+ }
1463
+ };
1464
+ UIRadioGroup.style = uiRadioGroupCss();
1465
+ }
1466
+ });
1467
+
1468
+ // dist/esm/ui-radio.entry.js
1469
+ var ui_radio_entry_exports = {};
1470
+ __export(ui_radio_entry_exports, {
1471
+ ui_radio: () => UIRadio
1472
+ });
1473
+ var uiRadioCss, UIRadio;
1474
+ var init_ui_radio_entry = __esm({
1475
+ "dist/esm/ui-radio.entry.js"() {
1476
+ init_index_CEeiinfk();
1477
+ init_events_JwSoedEO();
1478
+ uiRadioCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([data-disabled='true']),:host([aria-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='radio']){accent-color:var(--ui-accent-solid);cursor:pointer}::slotted(input[type='radio']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
1479
+ UIRadio = class {
1480
+ constructor(hostRef) {
1481
+ registerInstance(this, hostRef);
1482
+ }
1483
+ get host() {
1484
+ return getElement(this);
1485
+ }
1486
+ checked = false;
1487
+ defaultChecked = false;
1488
+ disabled = false;
1489
+ name = "";
1490
+ required = false;
1491
+ value = "on";
1492
+ slotRef;
1493
+ syncToInput() {
1494
+ const input = this.getInput();
1495
+ if (!input)
1496
+ return;
1497
+ this.host.dataset.disabled = this.disabled ? "true" : "";
1498
+ input.checked = this.checked;
1499
+ input.disabled = this.disabled;
1500
+ input.name = this.name;
1501
+ input.required = this.required;
1502
+ input.value = this.value;
1503
+ }
1504
+ componentDidLoad() {
1505
+ if (!this.checked && this.defaultChecked) {
1506
+ this.checked = true;
1507
+ }
1508
+ this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
1509
+ this.syncToInput();
1510
+ const input = this.getInput();
1511
+ input?.addEventListener("change", this.onInputChange);
1512
+ }
1513
+ disconnectedCallback() {
1514
+ const input = this.getInput();
1515
+ input?.removeEventListener("change", this.onInputChange);
1516
+ }
1517
+ componentDidUpdate() {
1518
+ this.syncToInput();
1519
+ }
1520
+ getInput() {
1521
+ const slot = this.host.shadowRoot?.querySelector("slot");
1522
+ const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
1523
+ return nodes.find((el) => el instanceof HTMLInputElement && el.type === "radio") ?? null;
1524
+ }
1525
+ onInputChange = (e) => {
1526
+ const input = e.target;
1527
+ if (!input || !input.checked)
1528
+ return;
1529
+ dispatchDetail(this.host, "change", {
1530
+ checked: true,
1531
+ value: this.value,
1532
+ trigger: eventToTrigger(e)
1533
+ });
1534
+ };
1535
+ render() {
1536
+ return h(Host, { key: "85a3e7f7903c910f6ccbc324ab38bf94ebaf93e0", role: "radio", "aria-checked": String(this.checked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "9117391004b9ed10cb4e819a629f66d32661d7d3", ref: (el) => this.slotRef = el }));
1537
+ }
1538
+ static get watchers() {
1539
+ return {
1540
+ "checked": [{
1541
+ "syncToInput": 0
1542
+ }],
1543
+ "disabled": [{
1544
+ "syncToInput": 0
1545
+ }],
1546
+ "name": [{
1547
+ "syncToInput": 0
1548
+ }],
1549
+ "required": [{
1550
+ "syncToInput": 0
1551
+ }],
1552
+ "value": [{
1553
+ "syncToInput": 0
1554
+ }]
1555
+ };
1556
+ }
1557
+ };
1558
+ UIRadio.style = uiRadioCss();
1559
+ }
1560
+ });
1561
+
1562
+ // dist/esm/ui-search-result-row.entry.js
1563
+ var ui_search_result_row_entry_exports = {};
1564
+ __export(ui_search_result_row_entry_exports, {
1565
+ ui_search_result_row: () => UISearchResultRow
1566
+ });
1567
+ function slotHasContent(slot) {
1568
+ if (!slot) {
1569
+ return false;
1570
+ }
1571
+ return slot.assignedNodes({ flatten: true }).some((node) => {
1572
+ if (node.nodeType === Node.TEXT_NODE) {
1573
+ return Boolean(node.textContent?.trim());
1574
+ }
1575
+ return true;
1576
+ });
1577
+ }
1578
+ var uiSearchResultRowCss, UISearchResultRow;
1579
+ var init_ui_search_result_row_entry = __esm({
1580
+ "dist/esm/ui-search-result-row.entry.js"() {
1581
+ init_index_CEeiinfk();
1582
+ uiSearchResultRowCss = () => `:host{display:block}.search-result-row{appearance:none;inline-size:100%;min-block-size:var(--ui-search-result-row-min-height, 56px);margin:0;padding-block:var(--ui-search-result-row-padding-block, var(--ui-space-3, 0.75rem));padding-inline:var(--ui-search-result-row-padding-inline, var(--ui-space-4, 1rem));display:flex;align-items:flex-start;gap:var(--ui-search-result-row-gap, var(--ui-space-3, 0.75rem));background:var(--ui-search-result-row-bg, transparent);border:none;border-block-end:1px solid var(--ui-search-result-row-border, var(--ui-border, #e5e7eb));color:inherit;cursor:pointer;text-align:left;transition:background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease)}:host(:last-child) .search-result-row{border-block-end:none}.search-result-row:hover:enabled{background:var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%))}:host([selected]) .search-result-row{background:var( --ui-search-result-row-selected-bg, var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%)) )}.search-result-row:focus-visible{outline:2px solid var(--ui-focus-ring, #2563eb);outline-offset:-2px}.search-result-row:disabled,:host([disabled]) .search-result-row{opacity:0.6;cursor:not-allowed}.search-result-row__leading,.search-result-row__trailing{display:inline-flex;align-items:flex-start;flex-shrink:0}.search-result-row__content{min-inline-size:0;flex:1;display:flex;flex-direction:column}.search-result-row__title,.search-result-row__meta,.search-result-row__excerpt{display:block;min-inline-size:0}[hidden]{display:none}::slotted([slot='title']),::slotted([slot='meta']),::slotted([slot='excerpt']){display:block;margin:0}`;
1583
+ UISearchResultRow = class {
1584
+ constructor(hostRef) {
1585
+ registerInstance(this, hostRef);
1586
+ }
1587
+ disabled = false;
1588
+ selected = false;
1589
+ hasLeading = false;
1590
+ hasMeta = false;
1591
+ hasExcerpt = false;
1592
+ hasTrailing = false;
1593
+ leadingSlot;
1594
+ metaSlot;
1595
+ excerptSlot;
1596
+ trailingSlot;
1597
+ componentDidLoad() {
1598
+ this.syncSlots();
1599
+ }
1600
+ syncSlots = () => {
1601
+ this.hasLeading = slotHasContent(this.leadingSlot);
1602
+ this.hasMeta = slotHasContent(this.metaSlot);
1603
+ this.hasExcerpt = slotHasContent(this.excerptSlot);
1604
+ this.hasTrailing = slotHasContent(this.trailingSlot);
1605
+ };
1606
+ render() {
1607
+ return h(Host, { key: "abd055ed3b7a9140f024181377fd6c0e9b270578" }, h("button", { key: "af6758ec890a63d11e11180f3cccfd94112b9804", class: "search-result-row", type: "button", disabled: this.disabled, part: "button" }, h("span", { key: "e7321d522ac45566e836382d525463825c855afc", class: "search-result-row__leading", part: "leading", hidden: !this.hasLeading }, h("slot", { key: "90f578306f8b9c321128f705369531b64d54cca2", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "37a8ab0b4b19215d1a4c79d92646b18e010be8a0", class: "search-result-row__content", part: "content" }, h("span", { key: "1728598d9e9578cf6f04f13c1691e333b7d5ca25", class: "search-result-row__title", part: "title" }, h("slot", { key: "556b9da285b7e64298527870a970ef8c02e71988", name: "title" })), h("span", { key: "ed47e52ad83968ca763e01ae7d9d3d66d444145a", class: "search-result-row__meta", part: "meta", hidden: !this.hasMeta }, h("slot", { key: "c374d6328951530227892eec688edd60514e7e04", name: "meta", ref: (el) => this.metaSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "17965c7934d9256ce243a1d3a3e880716fcd42e1", class: "search-result-row__excerpt", part: "excerpt", hidden: !this.hasExcerpt }, h("slot", { key: "67cad2d2ea2310944cdf5a7685a1f4e3f537e683", name: "excerpt", ref: (el) => this.excerptSlot = el, onSlotchange: this.syncSlots }))), h("span", { key: "43cb13c90187851fc30cc0c29847658f9f4cb069", class: "search-result-row__trailing", part: "trailing", hidden: !this.hasTrailing }, h("slot", { key: "2b262ad21cb605daea5e4ade8c377a60820a1f11", name: "trailing", ref: (el) => this.trailingSlot = el, onSlotchange: this.syncSlots }))));
1608
+ }
1609
+ };
1610
+ UISearchResultRow.style = uiSearchResultRowCss();
1611
+ }
1612
+ });
1613
+
1614
+ // dist/esm/ui-search-shell.entry.js
1615
+ var ui_search_shell_entry_exports = {};
1616
+ __export(ui_search_shell_entry_exports, {
1617
+ ui_search_shell: () => UISearchShell
1618
+ });
1619
+ function slotHasContent2(slot) {
1620
+ if (!slot) {
1621
+ return false;
1622
+ }
1623
+ return slot.assignedNodes({ flatten: true }).some((node) => {
1624
+ if (node.nodeType === Node.TEXT_NODE) {
1625
+ return Boolean(node.textContent?.trim());
1626
+ }
1627
+ return true;
1628
+ });
1629
+ }
1630
+ var uiSearchShellCss, UISearchShell;
1631
+ var init_ui_search_shell_entry = __esm({
1632
+ "dist/esm/ui-search-shell.entry.js"() {
1633
+ init_index_CEeiinfk();
1634
+ uiSearchShellCss = () => `:host{position:fixed;inset:0;z-index:var(--ui-search-shell-z-index, 400);display:block}.search-shell{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;padding-block-start:var(--ui-search-shell-padding-top, 10vh)}.search-shell__panel{position:relative;inline-size:min( calc(100% - (var(--ui-search-shell-margin-inline, var(--ui-space-4, 1rem)) * 2)), var(--ui-search-shell-max-width, 640px) );max-block-size:var(--ui-search-shell-max-height, 80vh);display:flex;flex-direction:column;overflow:hidden;background:var(--ui-search-shell-bg, var(--ui-surface, #ffffff));border:1px solid var(--ui-search-shell-border, var(--ui-border, #e5e7eb));border-radius:var(--ui-search-shell-radius, var(--ui-radius-xl, 1rem));box-shadow:var(--ui-search-shell-shadow, var(--ui-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12)))}.search-shell__search,.search-shell__status,.search-shell__footer{flex-shrink:0}.search-shell__body{flex:1;min-block-size:0}[hidden]{display:none}@media (max-width: 767px){.search-shell{padding-block-start:0;align-items:stretch}.search-shell__panel{inline-size:100%;max-block-size:100dvh;border-radius:0;border-inline:none;border-block-start:none}}`;
1635
+ UISearchShell = class {
1636
+ constructor(hostRef) {
1637
+ registerInstance(this, hostRef);
1638
+ }
1639
+ hasStatus = false;
1640
+ hasFooter = false;
1641
+ statusSlot;
1642
+ footerSlot;
1643
+ componentDidLoad() {
1644
+ this.syncSlots();
1645
+ }
1646
+ syncSlots = () => {
1647
+ this.hasStatus = slotHasContent2(this.statusSlot);
1648
+ this.hasFooter = slotHasContent2(this.footerSlot);
1649
+ };
1650
+ render() {
1651
+ return h("div", { key: "3e8fb4f419a588c441abd5bd137093ba2f730b76", class: "search-shell", part: "base" }, h("slot", { key: "4772932f9e077b0e4f68c50657945f3ea30afb8d", name: "backdrop" }), h("div", { key: "c7877bb3ade588797d8419b3c7efc0680ac32b78", class: "search-shell__panel", part: "panel" }, h("div", { key: "d1e7c16a031896187550181be63a1ca14a04b127", class: "search-shell__search", part: "search" }, h("slot", { key: "b61475159d7e18a623246a2872d4897e1ff8388a", name: "search" })), h("div", { key: "877a9847bb453d026b5e6c117ffa8ad44562195a", class: "search-shell__status", part: "status", hidden: !this.hasStatus }, h("slot", { key: "6b46e668586fa97a30e2d02fc7d46d53483ecdb5", name: "status", ref: (el) => this.statusSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "41622e5fe3b02d8c842a6d07b66119ac68f22bc0", class: "search-shell__body", part: "body" }, h("slot", { key: "f36dc433657d95bb7afa1191351bbbbeaed4f6ed", name: "body" })), h("div", { key: "bcbf35d5e37c0fe48b29dde935745ea792722646", class: "search-shell__footer", part: "footer", hidden: !this.hasFooter }, h("slot", { key: "02f99e3442476dbefc57b3a38dc5a4ad0f3e9f00", name: "footer", ref: (el) => this.footerSlot = el, onSlotchange: this.syncSlots }))));
1652
+ }
1653
+ };
1654
+ UISearchShell.style = uiSearchShellCss();
1655
+ }
1656
+ });
1657
+
1658
+ // dist/esm/ui-select.entry.js
1659
+ var ui_select_entry_exports = {};
1660
+ __export(ui_select_entry_exports, {
1661
+ ui_select: () => UISelect
1662
+ });
1663
+ var uiSelectCss, UISelect;
1664
+ var init_ui_select_entry = __esm({
1665
+ "dist/esm/ui-select.entry.js"() {
1666
+ init_index_CEeiinfk();
1667
+ init_events_JwSoedEO();
1668
+ uiSelectCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(select){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background-color:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding-block:var(--ui-select-padding-block, var(--ui-space-2));padding-inline-start:var(--ui-select-padding-inline-start, var(--ui-space-3));padding-inline-end:var(--ui-select-padding-inline-end, calc(var(--ui-space-6) + var(--ui-space-3)));margin:0;background-image:linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);background-position:calc(100% - 1rem) calc(50% - 2px), calc(100% - 0.7rem) calc(50% - 2px);background-size:0.35rem 0.35rem, 0.35rem 0.35rem;background-repeat:no-repeat;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(select:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(select:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(select),::slotted(select[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(select:disabled){background-color:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(select:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(select[multiple]),::slotted(select[size]:not([size='1'])){background-image:none;padding-inline-end:var(--ui-select-padding-inline-start, var(--ui-space-3))}`;
1669
+ UISelect = class {
1670
+ constructor(hostRef) {
1671
+ registerInstance(this, hostRef);
1672
+ }
1673
+ get host() {
1674
+ return getElement(this);
1675
+ }
1676
+ value = "";
1677
+ defaultValue = "";
1678
+ disabled = false;
1679
+ invalid = false;
1680
+ required = false;
1681
+ internalValue = "";
1682
+ slotRef;
1683
+ syncFromProp() {
1684
+ this.internalValue = this.value;
1685
+ }
1686
+ syncToSelect() {
1687
+ const select = this.getSelect();
1688
+ if (!select)
1689
+ return;
1690
+ this.host.dataset.invalid = this.invalid ? "true" : "";
1691
+ select.value = this.internalValue || this.defaultValue;
1692
+ select.disabled = this.disabled;
1693
+ select.required = this.required;
1694
+ select.setAttribute("aria-invalid", this.invalid ? "true" : "false");
1695
+ }
1696
+ componentDidLoad() {
1697
+ this.syncFromProp();
1698
+ this.slotRef?.addEventListener("slotchange", () => this.syncToSelect());
1699
+ this.syncToSelect();
1700
+ const select = this.getSelect();
1701
+ select?.addEventListener("input", this.onInput);
1702
+ select?.addEventListener("change", this.onChange);
1703
+ }
1704
+ disconnectedCallback() {
1705
+ const select = this.getSelect();
1706
+ select?.removeEventListener("input", this.onInput);
1707
+ select?.removeEventListener("change", this.onChange);
1708
+ }
1709
+ componentDidUpdate() {
1710
+ this.syncToSelect();
1711
+ }
1712
+ getSelect() {
1713
+ const slot = this.host.shadowRoot?.querySelector("slot");
1714
+ const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
1715
+ return nodes.find((el) => el.tagName === "SELECT") ?? null;
1716
+ }
1717
+ onInput = (e) => {
1718
+ const select = e.target;
1719
+ if (!select)
1720
+ return;
1721
+ this.internalValue = select.value;
1722
+ dispatchDetail(this.host, "input", {
1723
+ value: this.internalValue,
1724
+ trigger: eventToTrigger(e)
1725
+ });
1726
+ };
1727
+ onChange = (e) => {
1728
+ const select = this.getSelect();
1729
+ if (!select)
1730
+ return;
1731
+ this.internalValue = select.value;
1732
+ dispatchDetail(this.host, "change", {
1733
+ value: this.internalValue,
1734
+ trigger: eventToTrigger(e)
1735
+ });
1736
+ };
1737
+ render() {
1738
+ return h(Host, { key: "eebea3f7fafafba901e5bd33cbd711565feb251e", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "bbb49202d8298fac0912accb3848c8450cab00c9", ref: (el) => this.slotRef = el }));
1739
+ }
1740
+ static get watchers() {
1741
+ return {
1742
+ "value": [{
1743
+ "syncFromProp": 0
1744
+ }],
1745
+ "internalValue": [{
1746
+ "syncToSelect": 0
1747
+ }],
1748
+ "defaultValue": [{
1749
+ "syncToSelect": 0
1750
+ }],
1751
+ "disabled": [{
1752
+ "syncToSelect": 0
1753
+ }],
1754
+ "invalid": [{
1755
+ "syncToSelect": 0
1756
+ }],
1757
+ "required": [{
1758
+ "syncToSelect": 0
1759
+ }]
1760
+ };
1761
+ }
1762
+ };
1763
+ UISelect.style = uiSelectCss();
1764
+ }
1765
+ });
1766
+
1767
+ // dist/esm/ui-switch.entry.js
1768
+ var ui_switch_entry_exports = {};
1769
+ __export(ui_switch_entry_exports, {
1770
+ ui_switch: () => UISwitch
1771
+ });
1772
+ var uiSwitchCss, UISwitch;
1773
+ var init_ui_switch_entry = __esm({
1774
+ "dist/esm/ui-switch.entry.js"() {
1775
+ init_index_CEeiinfk();
1776
+ init_events_JwSoedEO();
1777
+ uiSwitchCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}:host([role='switch']){cursor:pointer}:host input[type='checkbox']{appearance:none;-webkit-appearance:none;display:block;position:relative;width:2.25rem;height:1.25rem;padding:0;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host input[type='checkbox']::after{content:'';position:absolute;top:2px;left:2px;width:0.875rem;height:0.875rem;border-radius:999px;background:var(--ui-surface-default);border:1px solid var(--ui-border-default);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}:host input[type='checkbox']:checked{background:var(--ui-accent-solid);border-color:var(--ui-accent-solid)}:host input[type='checkbox']:checked::after{transform:translateX(calc(2.25rem - 0.875rem - 4px));background:var(--ui-text-on-accent);border-color:var(--ui-text-on-accent)}:host input[type='checkbox']:focus-visible{outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
1778
+ UISwitch = class {
1779
+ constructor(hostRef) {
1780
+ registerInstance(this, hostRef);
1781
+ }
1782
+ get host() {
1783
+ return getElement(this);
1784
+ }
1785
+ checked = false;
1786
+ defaultChecked = false;
1787
+ disabled = false;
1788
+ required = false;
1789
+ value = "on";
1790
+ internalChecked = false;
1791
+ syncFromProp() {
1792
+ this.internalChecked = this.checked;
1793
+ }
1794
+ componentDidLoad() {
1795
+ this.syncFromProp();
1796
+ this.internalChecked = this.internalChecked || this.defaultChecked;
1797
+ }
1798
+ toggle = (trigger) => {
1799
+ if (this.disabled)
1800
+ return;
1801
+ this.internalChecked = !this.internalChecked;
1802
+ dispatchDetail(this.host, "change", {
1803
+ checked: this.internalChecked,
1804
+ value: this.value,
1805
+ trigger
1806
+ });
1807
+ };
1808
+ onKeydown = (e) => {
1809
+ if (e.key !== " " || this.disabled)
1810
+ return;
1811
+ e.preventDefault();
1812
+ this.toggle("keyboard");
1813
+ };
1814
+ onClick = (e) => {
1815
+ if (e.target === this.host?.shadowRoot?.querySelector("input"))
1816
+ return;
1817
+ this.toggle("pointer");
1818
+ };
1819
+ render() {
1820
+ return h(Host, { key: "d4e39c8865afa98414dbedcbbff5bdeeef7f4478", role: "switch", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.onKeydown, onClick: this.onClick }, h("input", { key: "498774428224b9d09a8657924d4d8b6a2196fddf", type: "checkbox", checked: this.internalChecked, disabled: this.disabled, required: this.required, value: this.value, "aria-hidden": "true", tabIndex: -1, onChange: (e) => {
1821
+ this.internalChecked = e.target.checked;
1822
+ dispatchDetail(this.host, "change", {
1823
+ checked: this.internalChecked,
1824
+ value: this.value,
1825
+ trigger: "pointer"
1826
+ });
1827
+ } }), h("slot", { key: "b8f8c3947a9dd058e12270b9afdfe2a654164987" }));
1828
+ }
1829
+ static get watchers() {
1830
+ return {
1831
+ "checked": [{
1832
+ "syncFromProp": 0
1833
+ }]
1834
+ };
1835
+ }
1836
+ };
1837
+ UISwitch.style = uiSwitchCss();
1838
+ }
1839
+ });
1840
+
1841
+ // dist/esm/ui-tabs.entry.js
1842
+ var ui_tabs_entry_exports = {};
1843
+ __export(ui_tabs_entry_exports, {
1844
+ ui_tabs: () => UITabs
1845
+ });
1846
+ var uiTabsCss, UITabs;
1847
+ var init_ui_tabs_entry = __esm({
1848
+ "dist/esm/ui-tabs.entry.js"() {
1849
+ init_index_CEeiinfk();
1850
+ init_events_JwSoedEO();
1851
+ uiTabsCss = () => `:host{display:flex;flex-direction:column;gap:0}:host([data-orientation='vertical']){flex-direction:row}::slotted([role='tablist']){display:flex;gap:0;border-bottom:1px solid var(--ui-border-default)}:host([data-orientation='vertical']) ::slotted([role='tablist']){flex-direction:column;border-bottom:none;border-inline-end:1px solid var(--ui-border-default)}::slotted(button[role='tab']),::slotted([role='tab']),::slotted(ui-button) button[role='tab']{padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);font-weight:var(--ui-font-medium, 500);color:var(--ui-text-secondary);background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;transition:color var(--ui-motion-fast) var(--ui-motion-ease);box-shadow:none}::slotted(button[role='tab']:hover),::slotted([role='tab']:hover){color:var(--ui-text-primary)}::slotted(button[role='tab'][aria-selected='true']),::slotted([role='tab'][aria-selected='true']){color:var(--ui-accent-solid);border-bottom-color:var(--ui-accent-solid)}:host([data-orientation='vertical']) ::slotted(button[role='tab']),:host([data-orientation='vertical']) ::slotted([role='tab']){border-bottom:none;border-inline-end:2px solid transparent;margin-bottom:0;margin-inline-end:-1px}:host([data-orientation='vertical']) ::slotted(button[role='tab'][aria-selected='true']),:host([data-orientation='vertical']) ::slotted([role='tab'][aria-selected='true']){border-inline-end-color:var(--ui-accent-solid)}::slotted([role='tabpanel']){padding:var(--ui-space-4)}`;
1852
+ UITabs = class {
1853
+ constructor(hostRef) {
1854
+ registerInstance(this, hostRef);
1855
+ }
1856
+ get host() {
1857
+ return getElement(this);
1858
+ }
1859
+ value = "";
1860
+ defaultValue = "";
1861
+ orientation = "horizontal";
1862
+ internalValue = "";
1863
+ syncFromProp() {
1864
+ this.internalValue = this.value;
1865
+ }
1866
+ syncState() {
1867
+ const tabs = this.getTabs();
1868
+ if (tabs.length === 0)
1869
+ return;
1870
+ tabs.forEach((tab) => {
1871
+ const tabId = tab.id ?? tab.getAttribute("aria-controls") ?? "";
1872
+ const isSelected = tabId === this.internalValue;
1873
+ tab.setAttribute("aria-selected", String(isSelected));
1874
+ tab.tabIndex = isSelected ? 0 : -1;
1875
+ const controlsId = tab.getAttribute("aria-controls");
1876
+ if (controlsId) {
1877
+ const panel = this.host.querySelector(`#${CSS.escape(controlsId)}`) ?? document.getElementById(controlsId);
1878
+ if (panel) {
1879
+ panel.hidden = !isSelected;
1880
+ }
1881
+ }
1882
+ });
1883
+ }
1884
+ componentDidLoad() {
1885
+ this.syncFromProp();
1886
+ if (!this.internalValue && this.defaultValue) {
1887
+ this.internalValue = this.defaultValue;
1888
+ }
1889
+ if (!this.internalValue) {
1890
+ const tabs = this.getTabs();
1891
+ if (tabs.length > 0) {
1892
+ this.internalValue = tabs[0]?.id ?? tabs[0]?.getAttribute("aria-controls") ?? "";
1893
+ }
1894
+ }
1895
+ this.syncState();
1896
+ this.host.addEventListener("keydown", this.onKeydown);
1897
+ this.host.addEventListener("click", this.onClick);
1898
+ }
1899
+ disconnectedCallback() {
1900
+ this.host.removeEventListener("keydown", this.onKeydown);
1901
+ this.host.removeEventListener("click", this.onClick);
1902
+ }
1903
+ componentDidUpdate() {
1904
+ this.syncState();
1905
+ }
1906
+ getTabs() {
1907
+ return Array.from(this.host.querySelectorAll('[role="tab"]'));
1908
+ }
1909
+ setValueFromTab(tab, trigger) {
1910
+ const newValue = tab.id ?? tab.getAttribute("aria-controls") ?? "";
1911
+ if (!newValue)
1912
+ return;
1913
+ const prev = this.internalValue;
1914
+ this.internalValue = newValue;
1915
+ this.syncState();
1916
+ dispatchDetail(this.host, "select", { value: newValue, previousValue: prev || void 0, trigger });
1917
+ }
1918
+ onClick = (e) => {
1919
+ const tab = e.target.closest?.('[role="tab"]');
1920
+ if (!tab || !this.host.contains(tab))
1921
+ return;
1922
+ this.setValueFromTab(tab, eventToTrigger(e));
1923
+ };
1924
+ onKeydown = (e) => {
1925
+ const tab = e.target.closest?.('[role="tab"]');
1926
+ if (!tab || !this.host.contains(tab))
1927
+ return;
1928
+ const tabs = this.getTabs();
1929
+ if (tabs.length === 0)
1930
+ return;
1931
+ const currentIndex = tabs.indexOf(tab);
1932
+ const isVertical = this.orientation === "vertical";
1933
+ const prevKey = isVertical ? "ArrowUp" : "ArrowLeft";
1934
+ const nextKey = isVertical ? "ArrowDown" : "ArrowRight";
1935
+ if (e.key === nextKey || e.key === prevKey) {
1936
+ e.preventDefault();
1937
+ const nextIndex = e.key === nextKey ? Math.min(currentIndex + 1, tabs.length - 1) : currentIndex <= 0 ? tabs.length - 1 : currentIndex - 1;
1938
+ this.setValueFromTab(tabs[nextIndex], "keyboard");
1939
+ tabs[nextIndex].focus();
1940
+ }
1941
+ };
1942
+ render() {
1943
+ return h(Host, { key: "d73e97facf3ffa020f349642bc6c0136f39fc463", orientation: this.orientation, "data-orientation": this.orientation }, h("slot", { key: "a7bd47a4b48780ddf1f21a917fd1cb747376640b" }));
1944
+ }
1945
+ static get watchers() {
1946
+ return {
1947
+ "value": [{
1948
+ "syncFromProp": 0
1949
+ }],
1950
+ "internalValue": [{
1951
+ "syncState": 0
1952
+ }],
1953
+ "orientation": [{
1954
+ "syncState": 0
1955
+ }]
1956
+ };
1957
+ }
1958
+ };
1959
+ UITabs.style = uiTabsCss();
1960
+ }
1961
+ });
1962
+
1963
+ // dist/esm/ui-textarea.entry.js
1964
+ var ui_textarea_entry_exports = {};
1965
+ __export(ui_textarea_entry_exports, {
1966
+ ui_textarea: () => UITextarea
1967
+ });
1968
+ var uiTextareaCss, UITextarea;
1969
+ var init_ui_textarea_entry = __esm({
1970
+ "dist/esm/ui-textarea.entry.js"() {
1971
+ init_index_CEeiinfk();
1972
+ init_events_JwSoedEO();
1973
+ uiTextareaCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(textarea){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);min-block-size:calc(var(--ui-space-12, 3rem) * 2);padding:var(--ui-space-2) var(--ui-space-3);margin:0;resize:vertical;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(textarea:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(textarea:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(textarea),::slotted(textarea[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(textarea:disabled){background:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(textarea:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
1974
+ UITextarea = class {
1975
+ constructor(hostRef) {
1976
+ registerInstance(this, hostRef);
1977
+ }
1978
+ get host() {
1979
+ return getElement(this);
1980
+ }
1981
+ value = "";
1982
+ defaultValue = "";
1983
+ disabled = false;
1984
+ invalid = false;
1985
+ readOnly = false;
1986
+ rows = 4;
1987
+ internalValue = "";
1988
+ slotRef;
1989
+ syncFromProp() {
1990
+ this.internalValue = this.value;
1991
+ }
1992
+ syncToTextarea() {
1993
+ const textarea = this.getTextarea();
1994
+ if (!textarea)
1995
+ return;
1996
+ this.host.dataset.invalid = this.invalid ? "true" : "";
1997
+ textarea.value = this.internalValue;
1998
+ textarea.defaultValue = this.defaultValue;
1999
+ textarea.disabled = this.disabled;
2000
+ textarea.readOnly = this.readOnly;
2001
+ textarea.rows = this.rows;
2002
+ textarea.setAttribute("aria-invalid", this.invalid ? "true" : "false");
2003
+ }
2004
+ componentDidLoad() {
2005
+ this.syncFromProp();
2006
+ this.slotRef?.addEventListener("slotchange", () => this.syncToTextarea());
2007
+ this.syncToTextarea();
2008
+ const textarea = this.getTextarea();
2009
+ textarea?.addEventListener("input", this.onInput);
2010
+ textarea?.addEventListener("change", this.onChange);
2011
+ }
2012
+ disconnectedCallback() {
2013
+ const textarea = this.getTextarea();
2014
+ textarea?.removeEventListener("input", this.onInput);
2015
+ textarea?.removeEventListener("change", this.onChange);
2016
+ }
2017
+ componentDidUpdate() {
2018
+ this.syncToTextarea();
2019
+ }
2020
+ getTextarea() {
2021
+ const slot = this.host.shadowRoot?.querySelector("slot");
2022
+ const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
2023
+ return nodes.find((el) => el.tagName === "TEXTAREA") ?? null;
2024
+ }
2025
+ onInput = (e) => {
2026
+ const textarea = e.target;
2027
+ if (!textarea)
2028
+ return;
2029
+ this.internalValue = textarea.value;
2030
+ dispatchDetail(this.host, "input", {
2031
+ value: this.internalValue,
2032
+ trigger: eventToTrigger(e)
2033
+ });
2034
+ };
2035
+ onChange = (e) => {
2036
+ const textarea = this.getTextarea();
2037
+ if (!textarea)
2038
+ return;
2039
+ this.internalValue = textarea.value;
2040
+ dispatchDetail(this.host, "change", {
2041
+ value: this.internalValue,
2042
+ trigger: eventToTrigger(e)
2043
+ });
2044
+ };
2045
+ render() {
2046
+ return h(Host, { key: "d52719875939fa9b2f757a35fb4cd1aa31a194c5", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "e40ba71b60cae07437219d6ab4b5879b26af1ac2", ref: (el) => this.slotRef = el }));
2047
+ }
2048
+ static get watchers() {
2049
+ return {
2050
+ "value": [{
2051
+ "syncFromProp": 0
2052
+ }],
2053
+ "internalValue": [{
2054
+ "syncToTextarea": 0
2055
+ }],
2056
+ "defaultValue": [{
2057
+ "syncToTextarea": 0
2058
+ }],
2059
+ "disabled": [{
2060
+ "syncToTextarea": 0
2061
+ }],
2062
+ "invalid": [{
2063
+ "syncToTextarea": 0
2064
+ }],
2065
+ "readOnly": [{
2066
+ "syncToTextarea": 0
2067
+ }],
2068
+ "rows": [{
2069
+ "syncToTextarea": 0
2070
+ }]
2071
+ };
2072
+ }
2073
+ };
2074
+ UITextarea.style = uiTextareaCss();
2075
+ }
2076
+ });
2077
+
2078
+ // dist/esm/ui-toast-region.entry.js
2079
+ var ui_toast_region_entry_exports = {};
2080
+ __export(ui_toast_region_entry_exports, {
2081
+ ui_toast_region: () => UIToastRegion
2082
+ });
2083
+ var uiToastRegionCss, UIToastRegion;
2084
+ var init_ui_toast_region_entry = __esm({
2085
+ "dist/esm/ui-toast-region.entry.js"() {
2086
+ init_index_CEeiinfk();
2087
+ init_events_JwSoedEO();
2088
+ uiToastRegionCss = () => `:host{position:fixed;top:var(--ui-space-4);left:50%;transform:translateX(-50%);z-index:9999;display:grid;gap:var(--ui-space-2);max-width:min(24rem, 90vw);pointer-events:none}:host>*{pointer-events:auto}::slotted([data-ui-toast]){display:grid;grid-template-columns:1fr auto;gap:var(--ui-space-2);align-items:start;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);padding:var(--ui-space-3) var(--ui-space-4);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-lg);animation:ui-toast-enter 0.25s var(--ui-motion-ease) forwards}@keyframes ui-toast-enter{from{opacity:0;transform:translateY(-0.5rem)}to{opacity:1;transform:translateY(0)}}::slotted([data-ui-toast][aria-hidden='true']){display:none}::slotted([data-ui-toast-dismiss]){border:0;background:transparent;color:var(--ui-text-secondary);cursor:pointer;font:inherit}`;
2089
+ UIToastRegion = class {
2090
+ constructor(hostRef) {
2091
+ registerInstance(this, hostRef);
2092
+ }
2093
+ get host() {
2094
+ return getElement(this);
2095
+ }
2096
+ open = true;
2097
+ internalOpen = true;
2098
+ syncFromProp() {
2099
+ this.internalOpen = this.open;
2100
+ }
2101
+ componentDidLoad() {
2102
+ this.syncFromProp();
2103
+ this.host.addEventListener("click", this.onClick);
2104
+ }
2105
+ disconnectedCallback() {
2106
+ this.host.removeEventListener("click", this.onClick);
2107
+ }
2108
+ getToasts() {
2109
+ return Array.from(this.host.querySelectorAll("[data-ui-toast]"));
2110
+ }
2111
+ updateOpenState() {
2112
+ const toasts = this.getToasts();
2113
+ this.internalOpen = toasts.length > 0;
2114
+ }
2115
+ onClick = (e) => {
2116
+ const dismissBtn = e.target.closest?.("[data-ui-toast-dismiss]");
2117
+ if (!dismissBtn)
2118
+ return;
2119
+ const toast = dismissBtn.closest?.("[data-ui-toast]");
2120
+ if (!toast)
2121
+ return;
2122
+ const id = toast.id ?? "";
2123
+ toast.setAttribute("aria-hidden", "true");
2124
+ toast.remove();
2125
+ dispatchDetail(this.host, "dismiss", {
2126
+ id,
2127
+ reason: "action",
2128
+ trigger: eventToTrigger(e)
2129
+ });
2130
+ this.updateOpenState();
2131
+ if (this.getToasts().length === 0) {
2132
+ dispatchDetail(this.host, "close", {
2133
+ open: false,
2134
+ reason: "action",
2135
+ trigger: eventToTrigger(e)
2136
+ });
2137
+ }
2138
+ };
2139
+ render() {
2140
+ return h(Host, { key: "8e99577d8770984b8d6d29e442931570c1f1bc4d", role: "region", "aria-label": "Notifications", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "06f2c6cf39c4795afc0937669aa2104821aef3d6" }));
2141
+ }
2142
+ static get watchers() {
2143
+ return {
2144
+ "open": [{
2145
+ "syncFromProp": 0
2146
+ }]
2147
+ };
2148
+ }
2149
+ };
2150
+ UIToastRegion.style = uiToastRegionCss();
2151
+ }
2152
+ });
2153
+
2154
+ // dist/esm/ui-tooltip.entry.js
2155
+ var ui_tooltip_entry_exports = {};
2156
+ __export(ui_tooltip_entry_exports, {
2157
+ ui_tooltip: () => UITooltip
2158
+ });
2159
+ var uiTooltipCss, UITooltip;
2160
+ var init_ui_tooltip_entry = __esm({
2161
+ "dist/esm/ui-tooltip.entry.js"() {
2162
+ init_index_CEeiinfk();
2163
+ init_manager_CR7f2MQC();
2164
+ init_events_JwSoedEO();
2165
+ uiTooltipCss = () => `:host{display:inline-block;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md)}:host([hidden]){display:none !important}`;
2166
+ UITooltip = class {
2167
+ constructor(hostRef) {
2168
+ registerInstance(this, hostRef);
2169
+ }
2170
+ get host() {
2171
+ return getElement(this);
2172
+ }
2173
+ for = "";
2174
+ open = false;
2175
+ defaultOpen = false;
2176
+ internalOpen = false;
2177
+ overlayId = `ui-tooltip-${Math.random().toString(36).slice(2, 11)}`;
2178
+ trigger = null;
2179
+ syncFromProp() {
2180
+ this.internalOpen = this.open;
2181
+ }
2182
+ syncOverlay() {
2183
+ if (this.internalOpen) {
2184
+ openOverlay({
2185
+ id: this.overlayId,
2186
+ modal: false,
2187
+ element: this.host,
2188
+ dismissible: true,
2189
+ requestClose: (reason, trigger) => this.handleRequestClose(reason, trigger)
2190
+ });
2191
+ } else {
2192
+ closeOverlay(this.overlayId);
2193
+ }
2194
+ }
2195
+ componentDidLoad() {
2196
+ this.syncFromProp();
2197
+ this.internalOpen = this.internalOpen || this.defaultOpen;
2198
+ this.resolveTrigger();
2199
+ this.attachTriggerListeners();
2200
+ this.host.addEventListener("keydown", this.onKeydown);
2201
+ this.syncOverlay();
2202
+ }
2203
+ componentDidUpdate() {
2204
+ this.resolveTrigger();
2205
+ this.attachTriggerListeners();
2206
+ this.syncOverlay();
2207
+ }
2208
+ disconnectedCallback() {
2209
+ this.detachTriggerListeners();
2210
+ this.host.removeEventListener("keydown", this.onKeydown);
2211
+ closeOverlay(this.overlayId);
2212
+ }
2213
+ resolveTrigger() {
2214
+ if (this.for) {
2215
+ this.trigger = document.getElementById(this.for);
2216
+ } else {
2217
+ this.trigger = this.host.previousElementSibling;
2218
+ }
2219
+ }
2220
+ attachTriggerListeners() {
2221
+ this.detachTriggerListeners();
2222
+ if (!this.trigger)
2223
+ return;
2224
+ this.trigger.addEventListener("pointerenter", this.onTriggerEnter);
2225
+ this.trigger.addEventListener("pointerleave", this.onTriggerLeave);
2226
+ this.trigger.addEventListener("focusin", this.onTriggerFocusIn);
2227
+ this.trigger.addEventListener("focusout", this.onTriggerFocusOut);
2228
+ }
2229
+ detachTriggerListeners() {
2230
+ if (!this.trigger)
2231
+ return;
2232
+ this.trigger.removeEventListener("pointerenter", this.onTriggerEnter);
2233
+ this.trigger.removeEventListener("pointerleave", this.onTriggerLeave);
2234
+ this.trigger.removeEventListener("focusin", this.onTriggerFocusIn);
2235
+ this.trigger.removeEventListener("focusout", this.onTriggerFocusOut);
2236
+ }
2237
+ onTriggerEnter = () => {
2238
+ this.internalOpen = true;
2239
+ dispatchDetail(this.host, "open", { open: true, reason: "action", trigger: "pointer" });
2240
+ this.syncOverlay();
2241
+ };
2242
+ onTriggerLeave = () => {
2243
+ this.internalOpen = false;
2244
+ dispatchDetail(this.host, "close", { open: false, reason: "action", trigger: "pointer" });
2245
+ this.syncOverlay();
2246
+ };
2247
+ onTriggerFocusIn = () => {
2248
+ this.internalOpen = true;
2249
+ dispatchDetail(this.host, "open", { open: true, reason: "action", trigger: "keyboard" });
2250
+ this.syncOverlay();
2251
+ };
2252
+ onTriggerFocusOut = (e) => {
2253
+ const related = e.relatedTarget;
2254
+ if (related && this.host.contains(related))
2255
+ return;
2256
+ this.internalOpen = false;
2257
+ dispatchDetail(this.host, "close", { open: false, reason: "action", trigger: "keyboard" });
2258
+ this.syncOverlay();
2259
+ };
2260
+ handleRequestClose(reason, trigger) {
2261
+ if (reason === "escape") {
2262
+ this.internalOpen = false;
2263
+ dispatchDetail(this.host, "close", {
2264
+ open: false,
2265
+ reason: "escape",
2266
+ trigger
2267
+ });
2268
+ this.trigger?.focus();
2269
+ }
2270
+ }
2271
+ onKeydown = (e) => {
2272
+ if (e.key === "Escape") {
2273
+ requestTopOverlayClose("escape", "keyboard");
2274
+ }
2275
+ };
2276
+ render() {
2277
+ return h(Host, { key: "900ec6fc08ea7a7965195e8203fd779e70cfa6e6", role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "b384f779fa9a229cf635be5adb3476ca93270c24" }));
2278
+ }
2279
+ static get watchers() {
2280
+ return {
2281
+ "open": [{
2282
+ "syncFromProp": 0
2283
+ }],
2284
+ "internalOpen": [{
2285
+ "syncOverlay": 0
2286
+ }]
2287
+ };
2288
+ }
2289
+ };
2290
+ UITooltip.style = uiTooltipCss();
2291
+ }
2292
+ });
2293
+
2294
+ // dist/esm/ui-top-bar.entry.js
2295
+ var ui_top_bar_entry_exports = {};
2296
+ __export(ui_top_bar_entry_exports, {
2297
+ ui_top_bar: () => UITopBar
2298
+ });
2299
+ function slotHasContent3(slot) {
2300
+ if (!slot) {
2301
+ return false;
2302
+ }
2303
+ return slot.assignedNodes({ flatten: true }).some((node) => {
2304
+ if (node.nodeType === Node.TEXT_NODE) {
2305
+ return Boolean(node.textContent?.trim());
2306
+ }
2307
+ return true;
2308
+ });
2309
+ }
2310
+ var uiTopBarCss, UITopBar;
2311
+ var init_ui_top_bar_entry = __esm({
2312
+ "dist/esm/ui-top-bar.entry.js"() {
2313
+ init_index_CEeiinfk();
2314
+ uiTopBarCss = () => `:host{position:sticky;inset-block-start:0;z-index:var(--ui-top-bar-z-index, 100);display:block}.top-bar{min-block-size:var(--ui-top-bar-height, 56px);display:flex;align-items:center;gap:var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));padding-inline:var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem));background:var(--ui-top-bar-bg, var(--ui-surface, #ffffff));border-block-end:1px solid var(--ui-top-bar-border, var(--ui-border, #e5e7eb))}.top-bar__leading,.top-bar__search,.top-bar__actions{display:flex;align-items:center;flex-shrink:0}.top-bar__actions{gap:var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem))}.top-bar__title{min-inline-size:0;flex:1}[hidden]{display:none}@media (min-width: 768px){:host{display:none}}`;
2315
+ UITopBar = class {
2316
+ constructor(hostRef) {
2317
+ registerInstance(this, hostRef);
2318
+ }
2319
+ get host() {
2320
+ return getElement(this);
2321
+ }
2322
+ hasLeading = false;
2323
+ hasSearch = false;
2324
+ hasActions = false;
2325
+ leadingSlot;
2326
+ searchSlot;
2327
+ actionsSlot;
2328
+ componentDidLoad() {
2329
+ this.syncSlots();
2330
+ }
2331
+ syncSlots = () => {
2332
+ this.hasLeading = slotHasContent3(this.leadingSlot);
2333
+ this.hasSearch = slotHasContent3(this.searchSlot);
2334
+ this.hasActions = slotHasContent3(this.actionsSlot);
2335
+ };
2336
+ render() {
2337
+ return h(Host, { key: "23cbff2fdb06a40f0380dbf217d064cb1b9f7a9c" }, h("header", { key: "9472960f4445f8ed7d0800d71db3cbac020fca3f", class: "top-bar", part: "base" }, h("div", { key: "d408be025d90fdcf1416213b9e76f3b780f47d97", class: "top-bar__leading", hidden: !this.hasLeading }, h("slot", { key: "3dc4db316a040ff10a8b8b218b42799d3e1a7b97", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "1b362f19f9a738600afb266e9641c0ee5c8870c9", class: "top-bar__title" }, h("slot", { key: "bb93d34a3dea15c697dcd19dc0ecc3488ee390c8" })), h("div", { key: "3d61d781b654ee1d91a6ce5ba64db9732ee1f8ee", class: "top-bar__search", hidden: !this.hasSearch }, h("slot", { key: "5731817be644f10ed745fdc0868b85b66a9c06d4", name: "search", ref: (el) => this.searchSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "2ee868b93f5195832830900382545b2131e78bb8", class: "top-bar__actions", hidden: !this.hasActions }, h("slot", { key: "1d410fa60f112904cfb866cff5a3f2fb18021c93", name: "actions", ref: (el) => this.actionsSlot = el, onSlotchange: this.syncSlots }))));
2338
+ }
2339
+ };
2340
+ UITopBar.style = uiTopBarCss();
2341
+ }
2342
+ });
2343
+
2344
+ // import("./**/*.entry.js") in dist/esm/index-CEeiinfk.js
2345
+ var globImport_entry_js;
2346
+ var init_ = __esm({
2347
+ 'import("./**/*.entry.js") in dist/esm/index-CEeiinfk.js'() {
2348
+ globImport_entry_js = __glob({
2349
+ "./ui-avatar-group.entry.js": () => Promise.resolve().then(() => (init_ui_avatar_group_entry(), ui_avatar_group_entry_exports)),
2350
+ "./ui-avatar.entry.js": () => Promise.resolve().then(() => (init_ui_avatar_entry(), ui_avatar_entry_exports)),
2351
+ "./ui-badge.entry.js": () => Promise.resolve().then(() => (init_ui_badge_entry(), ui_badge_entry_exports)),
2352
+ "./ui-button.entry.js": () => Promise.resolve().then(() => (init_ui_button_entry(), ui_button_entry_exports)),
2353
+ "./ui-checkbox.entry.js": () => Promise.resolve().then(() => (init_ui_checkbox_entry(), ui_checkbox_entry_exports)),
2354
+ "./ui-context-menu.entry.js": () => Promise.resolve().then(() => (init_ui_context_menu_entry(), ui_context_menu_entry_exports)),
2355
+ "./ui-dialog.entry.js": () => Promise.resolve().then(() => (init_ui_dialog_entry(), ui_dialog_entry_exports)),
2356
+ "./ui-disclosure.entry.js": () => Promise.resolve().then(() => (init_ui_disclosure_entry(), ui_disclosure_entry_exports)),
2357
+ "./ui-floating-action-button.entry.js": () => Promise.resolve().then(() => (init_ui_floating_action_button_entry(), ui_floating_action_button_entry_exports)),
2358
+ "./ui-form-field.entry.js": () => Promise.resolve().then(() => (init_ui_form_field_entry(), ui_form_field_entry_exports)),
2359
+ "./ui-icon-button.entry.js": () => Promise.resolve().then(() => (init_ui_icon_button_entry(), ui_icon_button_entry_exports)),
2360
+ "./ui-input.entry.js": () => Promise.resolve().then(() => (init_ui_input_entry(), ui_input_entry_exports)),
2361
+ "./ui-menu-item.entry.js": () => Promise.resolve().then(() => (init_ui_menu_item_entry(), ui_menu_item_entry_exports)),
2362
+ "./ui-menu.entry.js": () => Promise.resolve().then(() => (init_ui_menu_entry(), ui_menu_entry_exports)),
2363
+ "./ui-popover.entry.js": () => Promise.resolve().then(() => (init_ui_popover_entry(), ui_popover_entry_exports)),
2364
+ "./ui-radio-group.entry.js": () => Promise.resolve().then(() => (init_ui_radio_group_entry(), ui_radio_group_entry_exports)),
2365
+ "./ui-radio.entry.js": () => Promise.resolve().then(() => (init_ui_radio_entry(), ui_radio_entry_exports)),
2366
+ "./ui-search-result-row.entry.js": () => Promise.resolve().then(() => (init_ui_search_result_row_entry(), ui_search_result_row_entry_exports)),
2367
+ "./ui-search-shell.entry.js": () => Promise.resolve().then(() => (init_ui_search_shell_entry(), ui_search_shell_entry_exports)),
2368
+ "./ui-select.entry.js": () => Promise.resolve().then(() => (init_ui_select_entry(), ui_select_entry_exports)),
2369
+ "./ui-switch.entry.js": () => Promise.resolve().then(() => (init_ui_switch_entry(), ui_switch_entry_exports)),
2370
+ "./ui-tabs.entry.js": () => Promise.resolve().then(() => (init_ui_tabs_entry(), ui_tabs_entry_exports)),
2371
+ "./ui-textarea.entry.js": () => Promise.resolve().then(() => (init_ui_textarea_entry(), ui_textarea_entry_exports)),
2372
+ "./ui-toast-region.entry.js": () => Promise.resolve().then(() => (init_ui_toast_region_entry(), ui_toast_region_entry_exports)),
2373
+ "./ui-tooltip.entry.js": () => Promise.resolve().then(() => (init_ui_tooltip_entry(), ui_tooltip_entry_exports)),
2374
+ "./ui-top-bar.entry.js": () => Promise.resolve().then(() => (init_ui_top_bar_entry(), ui_top_bar_entry_exports))
2375
+ });
2376
+ }
2377
+ });
2378
+
2379
+ // dist/esm/index-CEeiinfk.js
2380
+ function getPropertyDescriptor(obj, memberName, getOnly) {
2381
+ const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
2382
+ while (obj && obj !== stopAt) {
2383
+ const desc = Object.getOwnPropertyDescriptor(obj, memberName);
2384
+ if (desc && (!getOnly || desc.get)) return desc;
2385
+ obj = Object.getPrototypeOf(obj);
2386
+ }
2387
+ return void 0;
2388
+ }
2389
+ function createStyleSheetIfNeededAndSupported(styles2) {
2390
+ return void 0;
2391
+ }
2392
+ function createShadowRoot(cmpMeta) {
2393
+ var _a;
2394
+ const opts = { mode: "open" };
2395
+ const shadowRoot = this.attachShadow(opts);
2396
+ if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
2397
+ if (globalStyleSheet) {
2398
+ if (supportsMutableAdoptedStyleSheets) {
2399
+ shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
2400
+ } else {
2401
+ shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
2402
+ }
2403
+ }
2404
+ }
2405
+ function queryNonceMetaTagContent(doc) {
2406
+ var _a, _b, _c;
2407
+ 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;
2408
+ }
2409
+ function sortedAttrNames(attrNames) {
2410
+ return attrNames.includes("ref") ? (
2411
+ // we need to sort these to ensure that `'ref'` is the last attr
2412
+ [...attrNames.filter((attr) => attr !== "ref"), "ref"]
2413
+ ) : (
2414
+ // no need to sort, return the original array
2415
+ attrNames
2416
+ );
2417
+ }
2418
+ function transformTag(tag) {
2419
+ return tag;
2420
+ }
2421
+ var NAMESPACE, BUILD, reWireGetterSetter, getHostRef, registerInstance, registerHost, isMemberInElement, consoleError, cmpModules, loadModule, styles, HYDRATED_CSS, SLOT_FB_CSS, win, plt, promiseResolve, supportsConstructableStylesheets, supportsMutableAdoptedStyleSheets, queuePending, queueDomReads, queueDomWrites, queueTask, consume, flush, nextTick, writeTask, globalStyleSheet, createTime, uniqueTime, rootAppliedStyles, registerStyle, addStyle, attachStyles, getScopeId, isComplexType, h, newVNode, Host, isHost, parsePropertyValue, getElement, emitEvent, setAccessor, parseClassListRegex, parseClassList, CAPTURE_EVENT_SUFFIX, CAPTURE_EVENT_REGEX, updateElement, hostTagName, useNativeShadowDom, isSvgMode, refCallbacksToRemove, refCallbacksToAttach, createElm, relocateToHostRoot, addVnodes, removeVnodes, updateChildren, isSameVnode, patch, nullifyVNodeRefs, queueRefAttachment, flushQueuedRefCallbacks, insertBefore, renderVdom, attachToAncestor, scheduleUpdate, dispatchHooks, enqueue, isPromisey, updateComponent, callRender, postUpdateComponent, appDidLoad, safeCall, addHydratedFlag, getValue, setValue, proxyComponent, initializeComponent, fireConnectedCallback, connectedCallback, disconnectInstance, disconnectedCallback, bootstrapLazy;
2422
+ var init_index_CEeiinfk = __esm({
2423
+ "dist/esm/index-CEeiinfk.js"() {
2424
+ /* @vite-ignore */
2425
+ /* webpackInclude: /\.entry\.js$/ */
2426
+ /* webpackExclude: /\.system\.entry\.js$/ */
2427
+ /* webpackMode: "lazy" */
2428
+ init_();
2429
+ NAMESPACE = "looma";
2430
+ BUILD = /* looma */
2431
+ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true };
2432
+ reWireGetterSetter = (instance, hostRef) => {
2433
+ var _a;
2434
+ const cmpMeta = hostRef.$cmpMeta$;
2435
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
2436
+ members.map(([memberName, [memberFlags]]) => {
2437
+ if (memberFlags & 31 || memberFlags & 32) {
2438
+ const ogValue = instance[memberName];
2439
+ const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
2440
+ if (ogDescriptor) {
2441
+ Object.defineProperty(instance, memberName, {
2442
+ get() {
2443
+ return ogDescriptor.get.call(this);
2444
+ },
2445
+ set(newValue) {
2446
+ ogDescriptor.set.call(this, newValue);
2447
+ },
2448
+ configurable: true,
2449
+ enumerable: true
2450
+ });
2451
+ }
2452
+ if (hostRef.$instanceValues$.has(memberName)) {
2453
+ instance[memberName] = hostRef.$instanceValues$.get(memberName);
2454
+ } else if (ogValue !== void 0) {
2455
+ instance[memberName] = ogValue;
2456
+ }
2457
+ }
2458
+ });
2459
+ };
2460
+ getHostRef = (ref) => {
2461
+ if (ref.__stencil__getHostRef) {
2462
+ return ref.__stencil__getHostRef();
2463
+ }
2464
+ return void 0;
2465
+ };
2466
+ registerInstance = (lazyInstance, hostRef) => {
2467
+ if (!hostRef) return;
2468
+ lazyInstance.__stencil__getHostRef = () => hostRef;
2469
+ hostRef.$lazyInstance$ = lazyInstance;
2470
+ if (hostRef.$cmpMeta$.$flags$ & 512 && BUILD.state) {
2471
+ reWireGetterSetter(lazyInstance, hostRef);
2472
+ }
2473
+ };
2474
+ registerHost = (hostElement, cmpMeta) => {
2475
+ const hostRef = {
2476
+ $flags$: 0,
2477
+ $hostElement$: hostElement,
2478
+ $cmpMeta$: cmpMeta,
2479
+ $instanceValues$: /* @__PURE__ */ new Map(),
2480
+ $serializerValues$: /* @__PURE__ */ new Map()
2481
+ };
2482
+ {
2483
+ hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
2484
+ hostElement["s-p"] = [];
2485
+ hostElement["s-rc"] = [];
2486
+ }
2487
+ {
2488
+ hostRef.$fetchedCbList$ = [];
2489
+ }
2490
+ const ref = hostRef;
2491
+ hostElement.__stencil__getHostRef = () => ref;
2492
+ return ref;
2493
+ };
2494
+ isMemberInElement = (elm, memberName) => memberName in elm;
2495
+ consoleError = (e, el) => (0, console.error)(e, el);
2496
+ cmpModules = /* @__PURE__ */ new Map();
2497
+ loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2498
+ const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
2499
+ const bundleId = cmpMeta.$lazyBundleId$;
2500
+ if (!bundleId) {
2501
+ return void 0;
2502
+ }
2503
+ const module2 = cmpModules.get(bundleId);
2504
+ if (module2) {
2505
+ return module2[exportName];
2506
+ }
2507
+ return globImport_entry_js(`./${bundleId}.entry.js${""}`).then(
2508
+ (importedModule) => {
2509
+ {
2510
+ cmpModules.set(bundleId, importedModule);
2511
+ }
2512
+ return importedModule[exportName];
2513
+ },
2514
+ (e) => {
2515
+ consoleError(e, hostRef.$hostElement$);
2516
+ }
2517
+ );
2518
+ };
2519
+ styles = /* @__PURE__ */ new Map();
2520
+ HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
2521
+ SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
2522
+ win = typeof window !== "undefined" ? window : {};
2523
+ plt = {
2524
+ $flags$: 0,
2525
+ $resourcesUrl$: "",
2526
+ jmp: (h2) => h2(),
2527
+ raf: (h2) => requestAnimationFrame(h2),
2528
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
2529
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
2530
+ ce: (eventName, opts) => new CustomEvent(eventName, opts)
2531
+ };
2532
+ promiseResolve = (v) => Promise.resolve(v);
2533
+ supportsConstructableStylesheets = /* @__PURE__ */ (() => {
2534
+ try {
2535
+ if (!win.document.adoptedStyleSheets) {
2536
+ return false;
2537
+ }
2538
+ new CSSStyleSheet();
2539
+ return typeof new CSSStyleSheet().replaceSync === "function";
2540
+ } catch (e) {
2541
+ }
2542
+ return false;
2543
+ })();
2544
+ supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
2545
+ queuePending = false;
2546
+ queueDomReads = [];
2547
+ queueDomWrites = [];
2548
+ queueTask = (queue, write) => (cb) => {
2549
+ queue.push(cb);
2550
+ if (!queuePending) {
2551
+ queuePending = true;
2552
+ if (write && plt.$flags$ & 4) {
2553
+ nextTick(flush);
2554
+ } else {
2555
+ plt.raf(flush);
2556
+ }
2557
+ }
2558
+ };
2559
+ consume = (queue) => {
2560
+ for (let i2 = 0; i2 < queue.length; i2++) {
2561
+ try {
2562
+ queue[i2](performance.now());
2563
+ } catch (e) {
2564
+ consoleError(e);
2565
+ }
2566
+ }
2567
+ queue.length = 0;
2568
+ };
2569
+ flush = () => {
2570
+ consume(queueDomReads);
2571
+ {
2572
+ consume(queueDomWrites);
2573
+ if (queuePending = queueDomReads.length > 0) {
2574
+ plt.raf(flush);
2575
+ }
2576
+ }
2577
+ };
2578
+ nextTick = (cb) => promiseResolve().then(cb);
2579
+ writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
2580
+ createTime = (fnName, tagName = "") => {
2581
+ {
2582
+ return () => {
2583
+ return;
2584
+ };
2585
+ }
2586
+ };
2587
+ uniqueTime = (key, measureText) => {
2588
+ {
2589
+ return () => {
2590
+ return;
2591
+ };
2592
+ }
2593
+ };
2594
+ rootAppliedStyles = /* @__PURE__ */ new WeakMap();
2595
+ registerStyle = (scopeId2, cssText, allowCS) => {
2596
+ let style = styles.get(scopeId2);
2597
+ if (supportsConstructableStylesheets && allowCS) {
2598
+ style = style || new CSSStyleSheet();
2599
+ if (typeof style === "string") {
2600
+ style = cssText;
2601
+ } else {
2602
+ style.replaceSync(cssText);
2603
+ }
2604
+ } else {
2605
+ style = cssText;
2606
+ }
2607
+ styles.set(scopeId2, style);
2608
+ };
2609
+ addStyle = (styleContainerNode, cmpMeta, mode) => {
2610
+ var _a, _b, _c;
2611
+ const scopeId2 = getScopeId(cmpMeta);
2612
+ const style = styles.get(scopeId2);
2613
+ if (!win.document) {
2614
+ return scopeId2;
2615
+ }
2616
+ styleContainerNode = styleContainerNode.nodeType === 11 ? styleContainerNode : win.document;
2617
+ if (style) {
2618
+ if (typeof style === "string") {
2619
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
2620
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
2621
+ let styleElm;
2622
+ if (!appliedStyles) {
2623
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2624
+ }
2625
+ if (!appliedStyles.has(scopeId2)) {
2626
+ styleElm = win.document.createElement("style");
2627
+ styleElm.textContent = style;
2628
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2629
+ if (nonce != null) {
2630
+ styleElm.setAttribute("nonce", nonce);
2631
+ }
2632
+ if (!(cmpMeta.$flags$ & 1)) {
2633
+ if (styleContainerNode.nodeName === "HEAD") {
2634
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
2635
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
2636
+ styleContainerNode.insertBefore(
2637
+ styleElm,
2638
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
2639
+ );
2640
+ } else if ("host" in styleContainerNode) {
2641
+ if (supportsConstructableStylesheets) {
2642
+ const currentWindow = (_b = styleContainerNode.defaultView) != null ? _b : styleContainerNode.ownerDocument.defaultView;
2643
+ const stylesheet = new currentWindow.CSSStyleSheet();
2644
+ stylesheet.replaceSync(style);
2645
+ if (supportsMutableAdoptedStyleSheets) {
2646
+ styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
2647
+ } else {
2648
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
2649
+ }
2650
+ } else {
2651
+ const existingStyleContainer = styleContainerNode.querySelector("style");
2652
+ if (existingStyleContainer && true) {
2653
+ existingStyleContainer.textContent = style + existingStyleContainer.textContent;
2654
+ } else {
2655
+ styleContainerNode.prepend(styleElm);
2656
+ }
2657
+ }
2658
+ } else {
2659
+ styleContainerNode.append(styleElm);
2660
+ }
2661
+ }
2662
+ if (cmpMeta.$flags$ & 1) {
2663
+ styleContainerNode.insertBefore(styleElm, null);
2664
+ }
2665
+ if (cmpMeta.$flags$ & 4) {
2666
+ styleElm.textContent += SLOT_FB_CSS;
2667
+ }
2668
+ if (appliedStyles) {
2669
+ appliedStyles.add(scopeId2);
2670
+ }
2671
+ }
2672
+ } else {
2673
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
2674
+ if (!appliedStyles) {
2675
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2676
+ }
2677
+ if (!appliedStyles.has(scopeId2)) {
2678
+ const currentWindow = (_c = styleContainerNode.defaultView) != null ? _c : styleContainerNode.ownerDocument.defaultView;
2679
+ let stylesheet;
2680
+ if (style.constructor === currentWindow.CSSStyleSheet) {
2681
+ stylesheet = style;
2682
+ } else {
2683
+ stylesheet = new currentWindow.CSSStyleSheet();
2684
+ for (let i2 = 0; i2 < style.cssRules.length; i2++) {
2685
+ stylesheet.insertRule(style.cssRules[i2].cssText, i2);
2686
+ }
2687
+ }
2688
+ if (supportsMutableAdoptedStyleSheets) {
2689
+ styleContainerNode.adoptedStyleSheets.push(stylesheet);
2690
+ } else {
2691
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
2692
+ }
2693
+ appliedStyles.add(scopeId2);
2694
+ }
2695
+ }
2696
+ }
2697
+ return scopeId2;
2698
+ };
2699
+ attachStyles = (hostRef) => {
2700
+ const cmpMeta = hostRef.$cmpMeta$;
2701
+ const elm = hostRef.$hostElement$;
2702
+ const flags = cmpMeta.$flags$;
2703
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
2704
+ const scopeId2 = addStyle(
2705
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2706
+ cmpMeta
2707
+ );
2708
+ if (flags & 10) {
2709
+ elm["s-sc"] = scopeId2;
2710
+ elm.classList.add(scopeId2 + "-h");
2711
+ }
2712
+ endAttachStyles();
2713
+ };
2714
+ getScopeId = (cmp, mode) => "sc-" + cmp.$tagName$;
2715
+ isComplexType = (o) => {
2716
+ o = typeof o;
2717
+ return o === "object" || o === "function";
2718
+ };
2719
+ h = (nodeName, vnodeData, ...children) => {
2720
+ if (typeof nodeName === "string") {
2721
+ nodeName = transformTag(nodeName);
2722
+ }
2723
+ let child = null;
2724
+ let key = null;
2725
+ let simple = false;
2726
+ let lastSimple = false;
2727
+ const vNodeChildren = [];
2728
+ const walk = (c) => {
2729
+ for (let i2 = 0; i2 < c.length; i2++) {
2730
+ child = c[i2];
2731
+ if (Array.isArray(child)) {
2732
+ walk(child);
2733
+ } else if (child != null && typeof child !== "boolean") {
2734
+ if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
2735
+ child = String(child);
2736
+ }
2737
+ if (simple && lastSimple) {
2738
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
2739
+ } else {
2740
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
2741
+ }
2742
+ lastSimple = simple;
2743
+ }
2744
+ }
2745
+ };
2746
+ walk(children);
2747
+ if (vnodeData) {
2748
+ if (vnodeData.key) {
2749
+ key = vnodeData.key;
2750
+ }
2751
+ {
2752
+ const classData = vnodeData.className || vnodeData.class;
2753
+ if (classData) {
2754
+ vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
2755
+ }
2756
+ }
2757
+ }
2758
+ const vnode = newVNode(nodeName, null);
2759
+ vnode.$attrs$ = vnodeData;
2760
+ if (vNodeChildren.length > 0) {
2761
+ vnode.$children$ = vNodeChildren;
2762
+ }
2763
+ {
2764
+ vnode.$key$ = key;
2765
+ }
2766
+ return vnode;
2767
+ };
2768
+ newVNode = (tag, text) => {
2769
+ const vnode = {
2770
+ $flags$: 0,
2771
+ $tag$: tag,
2772
+ // Normalize undefined to null to prevent rendering "undefined" as text
2773
+ $text$: text != null ? text : null,
2774
+ $elm$: null,
2775
+ $children$: null
2776
+ };
2777
+ {
2778
+ vnode.$attrs$ = null;
2779
+ }
2780
+ {
2781
+ vnode.$key$ = null;
2782
+ }
2783
+ return vnode;
2784
+ };
2785
+ Host = {};
2786
+ isHost = (node) => node && node.$tag$ === Host;
2787
+ parsePropertyValue = (propValue, propType, isFormAssociated) => {
2788
+ if (propValue != null && !isComplexType(propValue)) {
2789
+ if (propType & 4) {
2790
+ {
2791
+ return propValue === "false" ? false : propValue === "" || !!propValue;
2792
+ }
2793
+ }
2794
+ if (propType & 2) {
2795
+ return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
2796
+ }
2797
+ if (propType & 1) {
2798
+ return String(propValue);
2799
+ }
2800
+ return propValue;
2801
+ }
2802
+ return propValue;
2803
+ };
2804
+ getElement = (ref) => {
2805
+ var _a;
2806
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$;
2807
+ };
2808
+ emitEvent = (elm, name, opts) => {
2809
+ const ev = plt.ce(name, opts);
2810
+ elm.dispatchEvent(ev);
2811
+ return ev;
2812
+ };
2813
+ setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
2814
+ if (oldValue === newValue) {
2815
+ return;
2816
+ }
2817
+ let isProp = isMemberInElement(elm, memberName);
2818
+ let ln = memberName.toLowerCase();
2819
+ if (memberName === "class") {
2820
+ const classList = elm.classList;
2821
+ const oldClasses = parseClassList(oldValue);
2822
+ let newClasses = parseClassList(newValue);
2823
+ {
2824
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
2825
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
2826
+ }
2827
+ } else if (memberName === "style") {
2828
+ {
2829
+ for (const prop in oldValue) {
2830
+ if (!newValue || newValue[prop] == null) {
2831
+ if (prop.includes("-")) {
2832
+ elm.style.removeProperty(prop);
2833
+ } else {
2834
+ elm.style[prop] = "";
2835
+ }
2836
+ }
2837
+ }
2838
+ }
2839
+ for (const prop in newValue) {
2840
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
2841
+ if (prop.includes("-")) {
2842
+ elm.style.setProperty(prop, newValue[prop]);
2843
+ } else {
2844
+ elm.style[prop] = newValue[prop];
2845
+ }
2846
+ }
2847
+ }
2848
+ } else if (memberName === "key") ;
2849
+ else if (memberName === "ref") {
2850
+ if (newValue) {
2851
+ queueRefAttachment(newValue, elm);
2852
+ }
2853
+ } else if (!isProp && memberName[0] === "o" && memberName[1] === "n") {
2854
+ if (memberName[2] === "-") {
2855
+ memberName = memberName.slice(3);
2856
+ } else if (isMemberInElement(win, ln)) {
2857
+ memberName = ln.slice(2);
2858
+ } else {
2859
+ memberName = ln[2] + memberName.slice(3);
2860
+ }
2861
+ if (oldValue || newValue) {
2862
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
2863
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
2864
+ if (oldValue) {
2865
+ plt.rel(elm, memberName, oldValue, capture);
2866
+ }
2867
+ if (newValue) {
2868
+ plt.ael(elm, memberName, newValue, capture);
2869
+ }
2870
+ }
2871
+ } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
2872
+ const propName = memberName.slice(5);
2873
+ let attrName;
2874
+ {
2875
+ const hostRef = getHostRef(elm);
2876
+ if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
2877
+ const memberMeta = hostRef.$cmpMeta$.$members$[propName];
2878
+ if (memberMeta && memberMeta[1]) {
2879
+ attrName = memberMeta[1];
2880
+ }
2881
+ }
2882
+ }
2883
+ if (!attrName) {
2884
+ attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2885
+ }
2886
+ if (newValue == null || newValue === false) {
2887
+ if (newValue !== false || elm.getAttribute(attrName) === "") {
2888
+ elm.removeAttribute(attrName);
2889
+ }
2890
+ } else {
2891
+ elm.setAttribute(attrName, newValue === true ? "" : newValue);
2892
+ }
2893
+ return;
2894
+ } else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
2895
+ const propName = memberName.slice(5);
2896
+ try {
2897
+ elm[propName] = newValue;
2898
+ } catch (e) {
2899
+ }
2900
+ return;
2901
+ } else {
2902
+ const isComplex = isComplexType(newValue);
2903
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
2904
+ try {
2905
+ if (!elm.tagName.includes("-")) {
2906
+ const n = newValue == null ? "" : newValue;
2907
+ if (memberName === "list") {
2908
+ isProp = false;
2909
+ } else if (oldValue == null || elm[memberName] !== n) {
2910
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
2911
+ elm[memberName] = n;
2912
+ } else {
2913
+ elm.setAttribute(memberName, n);
2914
+ }
2915
+ }
2916
+ } else if (elm[memberName] !== newValue) {
2917
+ elm[memberName] = newValue;
2918
+ }
2919
+ } catch (e) {
2920
+ }
2921
+ }
2922
+ if (newValue == null || newValue === false) {
2923
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
2924
+ {
2925
+ elm.removeAttribute(memberName);
2926
+ }
2927
+ }
2928
+ } else if ((!isProp || flags & 4 || isSvg) && !isComplex && elm.nodeType === 1) {
2929
+ newValue = newValue === true ? "" : newValue;
2930
+ {
2931
+ elm.setAttribute(memberName, newValue);
2932
+ }
2933
+ }
2934
+ }
2935
+ };
2936
+ parseClassListRegex = /\s/;
2937
+ parseClassList = (value) => {
2938
+ if (typeof value === "object" && value && "baseVal" in value) {
2939
+ value = value.baseVal;
2940
+ }
2941
+ if (!value || typeof value !== "string") {
2942
+ return [];
2943
+ }
2944
+ return value.split(parseClassListRegex);
2945
+ };
2946
+ CAPTURE_EVENT_SUFFIX = "Capture";
2947
+ CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
2948
+ updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
2949
+ const elm = newVnode.$elm$.nodeType === 11 && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
2950
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
2951
+ const newVnodeAttrs = newVnode.$attrs$ || {};
2952
+ {
2953
+ for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
2954
+ if (!(memberName in newVnodeAttrs)) {
2955
+ setAccessor(
2956
+ elm,
2957
+ memberName,
2958
+ oldVnodeAttrs[memberName],
2959
+ void 0,
2960
+ isSvgMode2,
2961
+ newVnode.$flags$
2962
+ );
2963
+ }
2964
+ }
2965
+ }
2966
+ for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
2967
+ setAccessor(
2968
+ elm,
2969
+ memberName,
2970
+ oldVnodeAttrs[memberName],
2971
+ newVnodeAttrs[memberName],
2972
+ isSvgMode2,
2973
+ newVnode.$flags$
2974
+ );
2975
+ }
2976
+ };
2977
+ useNativeShadowDom = false;
2978
+ isSvgMode = false;
2979
+ refCallbacksToRemove = [];
2980
+ refCallbacksToAttach = [];
2981
+ createElm = (oldParentVNode, newParentVNode, childIndex) => {
2982
+ const newVNode2 = newParentVNode.$children$[childIndex];
2983
+ let i2 = 0;
2984
+ let elm;
2985
+ let childNode;
2986
+ if (newVNode2.$text$ != null) {
2987
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
2988
+ } else {
2989
+ if (!win.document) {
2990
+ throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
2991
+ }
2992
+ elm = newVNode2.$elm$ = win.document.createElement(
2993
+ newVNode2.$tag$
2994
+ );
2995
+ {
2996
+ updateElement(null, newVNode2, isSvgMode);
2997
+ }
2998
+ if (newVNode2.$children$) {
2999
+ const appendTarget = newVNode2.$tag$ === "template" ? elm.content : elm;
3000
+ for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
3001
+ childNode = createElm(oldParentVNode, newVNode2, i2);
3002
+ if (childNode) {
3003
+ appendTarget.appendChild(childNode);
3004
+ }
3005
+ }
3006
+ }
3007
+ }
3008
+ elm["s-hn"] = hostTagName;
3009
+ return elm;
3010
+ };
3011
+ relocateToHostRoot = (parentElm) => {
3012
+ plt.$flags$ |= 1;
3013
+ const host = parentElm.closest(hostTagName.toLowerCase());
3014
+ if (host != null) {
3015
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
3016
+ (ref) => ref["s-cr"]
3017
+ );
3018
+ const childNodeArray = Array.from(
3019
+ parentElm.__childNodes || parentElm.childNodes
3020
+ );
3021
+ for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
3022
+ if (childNode["s-sh"] != null) {
3023
+ insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
3024
+ childNode["s-sh"] = void 0;
3025
+ }
3026
+ }
3027
+ }
3028
+ plt.$flags$ &= -2;
3029
+ };
3030
+ addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
3031
+ let containerElm = parentElm;
3032
+ let childNode;
3033
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
3034
+ containerElm = containerElm.shadowRoot;
3035
+ }
3036
+ if (parentVNode.$tag$ === "template") {
3037
+ containerElm = containerElm.content;
3038
+ }
3039
+ for (; startIdx <= endIdx; ++startIdx) {
3040
+ if (vnodes[startIdx]) {
3041
+ childNode = createElm(null, parentVNode, startIdx);
3042
+ if (childNode) {
3043
+ vnodes[startIdx].$elm$ = childNode;
3044
+ insertBefore(containerElm, childNode, before);
3045
+ }
3046
+ }
3047
+ }
3048
+ };
3049
+ removeVnodes = (vnodes, startIdx, endIdx) => {
3050
+ for (let index = startIdx; index <= endIdx; ++index) {
3051
+ const vnode = vnodes[index];
3052
+ if (vnode) {
3053
+ const elm = vnode.$elm$;
3054
+ nullifyVNodeRefs(vnode);
3055
+ if (elm) {
3056
+ elm.remove();
3057
+ }
3058
+ }
3059
+ }
3060
+ };
3061
+ updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
3062
+ let oldStartIdx = 0;
3063
+ let newStartIdx = 0;
3064
+ let idxInOld = 0;
3065
+ let i2 = 0;
3066
+ let oldEndIdx = oldCh.length - 1;
3067
+ let oldStartVnode = oldCh[0];
3068
+ let oldEndVnode = oldCh[oldEndIdx];
3069
+ let newEndIdx = newCh.length - 1;
3070
+ let newStartVnode = newCh[0];
3071
+ let newEndVnode = newCh[newEndIdx];
3072
+ let node;
3073
+ let elmToMove;
3074
+ const containerElm = newVNode2.$tag$ === "template" ? parentElm.content : parentElm;
3075
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
3076
+ if (oldStartVnode == null) {
3077
+ oldStartVnode = oldCh[++oldStartIdx];
3078
+ } else if (oldEndVnode == null) {
3079
+ oldEndVnode = oldCh[--oldEndIdx];
3080
+ } else if (newStartVnode == null) {
3081
+ newStartVnode = newCh[++newStartIdx];
3082
+ } else if (newEndVnode == null) {
3083
+ newEndVnode = newCh[--newEndIdx];
3084
+ } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
3085
+ patch(oldStartVnode, newStartVnode, isInitialRender);
3086
+ oldStartVnode = oldCh[++oldStartIdx];
3087
+ newStartVnode = newCh[++newStartIdx];
3088
+ } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
3089
+ patch(oldEndVnode, newEndVnode, isInitialRender);
3090
+ oldEndVnode = oldCh[--oldEndIdx];
3091
+ newEndVnode = newCh[--newEndIdx];
3092
+ } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
3093
+ patch(oldStartVnode, newEndVnode, isInitialRender);
3094
+ insertBefore(containerElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
3095
+ oldStartVnode = oldCh[++oldStartIdx];
3096
+ newEndVnode = newCh[--newEndIdx];
3097
+ } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
3098
+ patch(oldEndVnode, newStartVnode, isInitialRender);
3099
+ insertBefore(containerElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
3100
+ oldEndVnode = oldCh[--oldEndIdx];
3101
+ newStartVnode = newCh[++newStartIdx];
3102
+ } else {
3103
+ idxInOld = -1;
3104
+ {
3105
+ for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
3106
+ if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
3107
+ idxInOld = i2;
3108
+ break;
3109
+ }
3110
+ }
3111
+ }
3112
+ if (idxInOld >= 0) {
3113
+ elmToMove = oldCh[idxInOld];
3114
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
3115
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
3116
+ } else {
3117
+ patch(elmToMove, newStartVnode, isInitialRender);
3118
+ oldCh[idxInOld] = void 0;
3119
+ node = elmToMove.$elm$;
3120
+ }
3121
+ newStartVnode = newCh[++newStartIdx];
3122
+ } else {
3123
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
3124
+ newStartVnode = newCh[++newStartIdx];
3125
+ }
3126
+ if (node) {
3127
+ {
3128
+ insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
3129
+ }
3130
+ }
3131
+ }
3132
+ }
3133
+ if (oldStartIdx > oldEndIdx) {
3134
+ addVnodes(
3135
+ parentElm,
3136
+ newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
3137
+ newVNode2,
3138
+ newCh,
3139
+ newStartIdx,
3140
+ newEndIdx
3141
+ );
3142
+ } else if (newStartIdx > newEndIdx) {
3143
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
3144
+ }
3145
+ };
3146
+ isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
3147
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
3148
+ if (!isInitialRender) {
3149
+ return leftVNode.$key$ === rightVNode.$key$;
3150
+ }
3151
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
3152
+ leftVNode.$key$ = rightVNode.$key$;
3153
+ }
3154
+ return true;
3155
+ }
3156
+ return false;
3157
+ };
3158
+ patch = (oldVNode, newVNode2, isInitialRender = false) => {
3159
+ const elm = newVNode2.$elm$ = oldVNode.$elm$;
3160
+ const oldChildren = oldVNode.$children$;
3161
+ const newChildren = newVNode2.$children$;
3162
+ const tag = newVNode2.$tag$;
3163
+ const text = newVNode2.$text$;
3164
+ if (text == null) {
3165
+ {
3166
+ if (tag === "slot" && !useNativeShadowDom) {
3167
+ if (oldVNode.$name$ !== newVNode2.$name$) {
3168
+ newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
3169
+ relocateToHostRoot(newVNode2.$elm$.parentElement);
3170
+ }
3171
+ }
3172
+ updateElement(oldVNode, newVNode2, isSvgMode);
3173
+ }
3174
+ if (oldChildren !== null && newChildren !== null) {
3175
+ updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
3176
+ } else if (newChildren !== null) {
3177
+ if (oldVNode.$text$ !== null) {
3178
+ elm.textContent = "";
3179
+ }
3180
+ addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
3181
+ } else if (
3182
+ // don't do this on initial render as it can cause non-hydrated content to be removed
3183
+ !isInitialRender && BUILD.updatable && oldChildren !== null
3184
+ ) {
3185
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
3186
+ } else ;
3187
+ } else if (oldVNode.$text$ !== text) {
3188
+ elm.data = text;
3189
+ }
3190
+ };
3191
+ nullifyVNodeRefs = (vNode) => {
3192
+ {
3193
+ if (vNode.$attrs$ && vNode.$attrs$.ref) {
3194
+ refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
3195
+ }
3196
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
3197
+ }
3198
+ };
3199
+ queueRefAttachment = (refCallback, elm) => {
3200
+ {
3201
+ refCallbacksToAttach.push(() => refCallback(elm));
3202
+ }
3203
+ };
3204
+ flushQueuedRefCallbacks = () => {
3205
+ {
3206
+ refCallbacksToRemove.forEach((cb) => cb());
3207
+ refCallbacksToRemove.length = 0;
3208
+ refCallbacksToAttach.forEach((cb) => cb());
3209
+ refCallbacksToAttach.length = 0;
3210
+ }
3211
+ };
3212
+ insertBefore = (parent, newNode, reference, isInitialLoad) => {
3213
+ if (parent.__insertBefore) {
3214
+ return parent.__insertBefore(newNode, reference);
3215
+ } else {
3216
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
3217
+ }
3218
+ };
3219
+ renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
3220
+ const hostElm = hostRef.$hostElement$;
3221
+ const cmpMeta = hostRef.$cmpMeta$;
3222
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
3223
+ const isHostElement = isHost(renderFnResults);
3224
+ const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
3225
+ hostTagName = hostElm.tagName;
3226
+ if (cmpMeta.$attrsToReflect$) {
3227
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
3228
+ cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
3229
+ {
3230
+ rootVnode.$attrs$[attribute] = hostElm[propName];
3231
+ }
3232
+ });
3233
+ }
3234
+ if (isInitialLoad && rootVnode.$attrs$) {
3235
+ for (const key of Object.keys(rootVnode.$attrs$)) {
3236
+ if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
3237
+ rootVnode.$attrs$[key] = hostElm[key];
3238
+ }
3239
+ }
3240
+ }
3241
+ rootVnode.$tag$ = null;
3242
+ rootVnode.$flags$ |= 4;
3243
+ hostRef.$vnode$ = rootVnode;
3244
+ rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm;
3245
+ useNativeShadowDom = !!(cmpMeta.$flags$ & 1) && !(cmpMeta.$flags$ & 128);
3246
+ patch(oldVNode, rootVnode, isInitialLoad);
3247
+ flushQueuedRefCallbacks();
3248
+ };
3249
+ attachToAncestor = (hostRef, ancestorComponent) => {
3250
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
3251
+ const index = ancestorComponent["s-p"].push(
3252
+ new Promise(
3253
+ (r) => hostRef.$onRenderResolve$ = () => {
3254
+ ancestorComponent["s-p"].splice(index - 1, 1);
3255
+ r();
3256
+ }
3257
+ )
3258
+ );
3259
+ }
3260
+ };
3261
+ scheduleUpdate = (hostRef, isInitialLoad) => {
3262
+ {
3263
+ hostRef.$flags$ |= 16;
3264
+ }
3265
+ if (hostRef.$flags$ & 4) {
3266
+ hostRef.$flags$ |= 512;
3267
+ return;
3268
+ }
3269
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
3270
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
3271
+ if (isInitialLoad) {
3272
+ queueMicrotask(() => {
3273
+ dispatch();
3274
+ });
3275
+ return;
3276
+ }
3277
+ return writeTask(dispatch);
3278
+ };
3279
+ dispatchHooks = (hostRef, isInitialLoad) => {
3280
+ const elm = hostRef.$hostElement$;
3281
+ const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
3282
+ const instance = hostRef.$lazyInstance$;
3283
+ if (!instance) {
3284
+ throw new Error(
3285
+ `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`
3286
+ );
3287
+ }
3288
+ let maybePromise;
3289
+ if (isInitialLoad) {
3290
+ {
3291
+ if (hostRef.$fetchedCbList$.length) {
3292
+ hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
3293
+ }
3294
+ }
3295
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
3296
+ } else {
3297
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
3298
+ }
3299
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
3300
+ endSchedule();
3301
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
3302
+ };
3303
+ enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
3304
+ console.error(err);
3305
+ fn();
3306
+ }) : fn();
3307
+ isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
3308
+ updateComponent = async (hostRef, instance, isInitialLoad) => {
3309
+ var _a;
3310
+ const elm = hostRef.$hostElement$;
3311
+ const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
3312
+ const rc = elm["s-rc"];
3313
+ if (isInitialLoad) {
3314
+ attachStyles(hostRef);
3315
+ }
3316
+ const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
3317
+ {
3318
+ callRender(hostRef, instance, elm, isInitialLoad);
3319
+ }
3320
+ if (rc) {
3321
+ rc.map((cb) => cb());
3322
+ elm["s-rc"] = void 0;
3323
+ }
3324
+ endRender();
3325
+ endUpdate();
3326
+ {
3327
+ const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
3328
+ const postUpdate = () => postUpdateComponent(hostRef);
3329
+ if (childrenPromises.length === 0) {
3330
+ postUpdate();
3331
+ } else {
3332
+ Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
3333
+ hostRef.$flags$ |= 4;
3334
+ childrenPromises.length = 0;
3335
+ }
3336
+ }
3337
+ };
3338
+ callRender = (hostRef, instance, elm, isInitialLoad) => {
3339
+ try {
3340
+ instance = instance.render();
3341
+ {
3342
+ hostRef.$flags$ &= -17;
3343
+ }
3344
+ {
3345
+ hostRef.$flags$ |= 2;
3346
+ }
3347
+ {
3348
+ {
3349
+ {
3350
+ renderVdom(hostRef, instance, isInitialLoad);
3351
+ }
3352
+ }
3353
+ }
3354
+ } catch (e) {
3355
+ consoleError(e, hostRef.$hostElement$);
3356
+ }
3357
+ return null;
3358
+ };
3359
+ postUpdateComponent = (hostRef) => {
3360
+ const tagName = hostRef.$cmpMeta$.$tagName$;
3361
+ const elm = hostRef.$hostElement$;
3362
+ const endPostUpdate = createTime("postUpdate", tagName);
3363
+ const instance = hostRef.$lazyInstance$;
3364
+ const ancestorComponent = hostRef.$ancestorComponent$;
3365
+ safeCall(instance, "componentDidRender", void 0, elm);
3366
+ if (!(hostRef.$flags$ & 64)) {
3367
+ hostRef.$flags$ |= 64;
3368
+ {
3369
+ addHydratedFlag(elm);
3370
+ }
3371
+ safeCall(instance, "componentDidLoad", void 0, elm);
3372
+ endPostUpdate();
3373
+ {
3374
+ hostRef.$onReadyResolve$(elm);
3375
+ if (!ancestorComponent) {
3376
+ appDidLoad();
3377
+ }
3378
+ }
3379
+ } else {
3380
+ safeCall(instance, "componentDidUpdate", void 0, elm);
3381
+ endPostUpdate();
3382
+ }
3383
+ {
3384
+ if (hostRef.$onRenderResolve$) {
3385
+ hostRef.$onRenderResolve$();
3386
+ hostRef.$onRenderResolve$ = void 0;
3387
+ }
3388
+ if (hostRef.$flags$ & 512) {
3389
+ nextTick(() => scheduleUpdate(hostRef, false));
3390
+ }
3391
+ hostRef.$flags$ &= -517;
3392
+ }
3393
+ };
3394
+ appDidLoad = (who) => {
3395
+ nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
3396
+ };
3397
+ safeCall = (instance, method, arg, elm) => {
3398
+ if (instance && instance[method]) {
3399
+ try {
3400
+ return instance[method](arg);
3401
+ } catch (e) {
3402
+ consoleError(e, elm);
3403
+ }
3404
+ }
3405
+ return void 0;
3406
+ };
3407
+ addHydratedFlag = (elm) => {
3408
+ var _a;
3409
+ return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated");
3410
+ };
3411
+ getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
3412
+ setValue = (ref, propName, newVal, cmpMeta) => {
3413
+ const hostRef = getHostRef(ref);
3414
+ if (!hostRef) {
3415
+ return;
3416
+ }
3417
+ if (!hostRef) {
3418
+ throw new Error(
3419
+ `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).`
3420
+ );
3421
+ }
3422
+ const elm = hostRef.$hostElement$;
3423
+ const oldVal = hostRef.$instanceValues$.get(propName);
3424
+ const flags = hostRef.$flags$;
3425
+ const instance = hostRef.$lazyInstance$;
3426
+ newVal = parsePropertyValue(
3427
+ newVal,
3428
+ cmpMeta.$members$[propName][0]
3429
+ );
3430
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
3431
+ const didValueChange = newVal !== oldVal && !areBothNaN;
3432
+ if ((!(flags & 8) || oldVal === void 0) && didValueChange) {
3433
+ hostRef.$instanceValues$.set(propName, newVal);
3434
+ if (cmpMeta.$watchers$) {
3435
+ const watchMethods = cmpMeta.$watchers$[propName];
3436
+ if (watchMethods) {
3437
+ watchMethods.map((watcher) => {
3438
+ try {
3439
+ const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
3440
+ if (flags & 128 || watcherFlags & 1) {
3441
+ if (!instance) {
3442
+ hostRef.$fetchedCbList$.push(() => {
3443
+ hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
3444
+ });
3445
+ } else {
3446
+ instance[watchMethodName](newVal, oldVal, propName);
3447
+ }
3448
+ }
3449
+ } catch (e) {
3450
+ consoleError(e, elm);
3451
+ }
3452
+ });
3453
+ }
3454
+ }
3455
+ if (flags & 2) {
3456
+ if (instance.componentShouldUpdate) {
3457
+ const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
3458
+ if (shouldUpdate === false && !(flags & 16)) {
3459
+ return;
3460
+ }
3461
+ }
3462
+ if (!(flags & 16)) {
3463
+ scheduleUpdate(hostRef, false);
3464
+ }
3465
+ }
3466
+ }
3467
+ };
3468
+ proxyComponent = (Cstr, cmpMeta, flags) => {
3469
+ var _a, _b;
3470
+ const prototype = Cstr.prototype;
3471
+ if (cmpMeta.$members$ || BUILD.propChangeCallback) {
3472
+ {
3473
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
3474
+ cmpMeta.$watchers$ = Cstr.watchers;
3475
+ }
3476
+ if (Cstr.deserializers && !cmpMeta.$deserializers$) {
3477
+ cmpMeta.$deserializers$ = Cstr.deserializers;
3478
+ }
3479
+ if (Cstr.serializers && !cmpMeta.$serializers$) {
3480
+ cmpMeta.$serializers$ = Cstr.serializers;
3481
+ }
3482
+ }
3483
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
3484
+ members.map(([memberName, [memberFlags]]) => {
3485
+ if (memberFlags & 31 || flags & 2 && memberFlags & 32) {
3486
+ const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
3487
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048;
3488
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096;
3489
+ if (flags & 1 || !origGetter) {
3490
+ Object.defineProperty(prototype, memberName, {
3491
+ get() {
3492
+ {
3493
+ if ((cmpMeta.$members$[memberName][0] & 2048) === 0) {
3494
+ return getValue(this, memberName);
3495
+ }
3496
+ const ref = getHostRef(this);
3497
+ const instance = ref ? ref.$lazyInstance$ : prototype;
3498
+ if (!instance) return;
3499
+ return instance[memberName];
3500
+ }
3501
+ },
3502
+ configurable: true,
3503
+ enumerable: true
3504
+ });
3505
+ }
3506
+ Object.defineProperty(prototype, memberName, {
3507
+ set(newValue) {
3508
+ const ref = getHostRef(this);
3509
+ if (!ref) {
3510
+ return;
3511
+ }
3512
+ if (origSetter) {
3513
+ const currentValue = memberFlags & 32 ? this[memberName] : ref.$hostElement$[memberName];
3514
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
3515
+ newValue = ref.$instanceValues$.get(memberName);
3516
+ }
3517
+ origSetter.apply(this, [
3518
+ parsePropertyValue(
3519
+ newValue,
3520
+ memberFlags
3521
+ )
3522
+ ]);
3523
+ newValue = memberFlags & 32 ? this[memberName] : ref.$hostElement$[memberName];
3524
+ setValue(this, memberName, newValue, cmpMeta);
3525
+ return;
3526
+ }
3527
+ {
3528
+ if ((flags & 1) === 0 || (cmpMeta.$members$[memberName][0] & 4096) === 0) {
3529
+ setValue(this, memberName, newValue, cmpMeta);
3530
+ if (flags & 1 && !ref.$lazyInstance$) {
3531
+ ref.$fetchedCbList$.push(() => {
3532
+ if (cmpMeta.$members$[memberName][0] & 4096 && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
3533
+ ref.$lazyInstance$[memberName] = newValue;
3534
+ }
3535
+ });
3536
+ }
3537
+ return;
3538
+ }
3539
+ const setterSetVal = () => {
3540
+ const currentValue = ref.$lazyInstance$[memberName];
3541
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
3542
+ ref.$instanceValues$.set(memberName, currentValue);
3543
+ }
3544
+ ref.$lazyInstance$[memberName] = parsePropertyValue(
3545
+ newValue,
3546
+ memberFlags
3547
+ );
3548
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
3549
+ };
3550
+ if (ref.$lazyInstance$) {
3551
+ setterSetVal();
3552
+ } else {
3553
+ ref.$fetchedCbList$.push(() => {
3554
+ setterSetVal();
3555
+ });
3556
+ }
3557
+ }
3558
+ }
3559
+ });
3560
+ }
3561
+ });
3562
+ if (flags & 1) {
3563
+ const attrNameToPropName = /* @__PURE__ */ new Map();
3564
+ prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
3565
+ plt.jmp(() => {
3566
+ var _a2;
3567
+ const propName = attrNameToPropName.get(attrName);
3568
+ const hostRef = getHostRef(this);
3569
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
3570
+ newValue = this[propName];
3571
+ delete this[propName];
3572
+ }
3573
+ if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
3574
+ this[propName] == newValue) {
3575
+ return;
3576
+ } else if (propName == null) {
3577
+ const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
3578
+ if (hostRef && flags2 && !(flags2 & 8) && newValue !== oldValue) {
3579
+ const instance = hostRef.$lazyInstance$;
3580
+ const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
3581
+ entry == null ? void 0 : entry.forEach((watcher) => {
3582
+ const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
3583
+ if (instance[watchMethodName] != null && (flags2 & 128 || watcherFlags & 1)) {
3584
+ instance[watchMethodName].call(instance, newValue, oldValue, attrName);
3585
+ }
3586
+ });
3587
+ }
3588
+ return;
3589
+ }
3590
+ const propFlags = members.find(([m]) => m === propName);
3591
+ if (propFlags && propFlags[1][0] & 4) {
3592
+ newValue = newValue === null || newValue === "false" ? false : true;
3593
+ }
3594
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
3595
+ if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
3596
+ this[propName] = newValue;
3597
+ }
3598
+ });
3599
+ };
3600
+ Cstr.observedAttributes = Array.from(
3601
+ /* @__PURE__ */ new Set([
3602
+ ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
3603
+ ...members.filter(
3604
+ ([_, m]) => m[0] & 31
3605
+ /* HasAttribute */
3606
+ ).map(([propName, m]) => {
3607
+ var _a2;
3608
+ const attrName = m[1] || propName;
3609
+ attrNameToPropName.set(attrName, propName);
3610
+ if (m[0] & 512) {
3611
+ (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
3612
+ }
3613
+ return attrName;
3614
+ })
3615
+ ])
3616
+ );
3617
+ }
3618
+ }
3619
+ return Cstr;
3620
+ };
3621
+ initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
3622
+ let Cstr;
3623
+ try {
3624
+ if ((hostRef.$flags$ & 32) === 0) {
3625
+ hostRef.$flags$ |= 32;
3626
+ const bundleId = cmpMeta.$lazyBundleId$;
3627
+ if (bundleId) {
3628
+ const CstrImport = loadModule(cmpMeta, hostRef);
3629
+ if (CstrImport && "then" in CstrImport) {
3630
+ const endLoad = uniqueTime();
3631
+ Cstr = await CstrImport;
3632
+ endLoad();
3633
+ } else {
3634
+ Cstr = CstrImport;
3635
+ }
3636
+ if (!Cstr) {
3637
+ throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
3638
+ }
3639
+ if (!Cstr.isProxied) {
3640
+ {
3641
+ cmpMeta.$watchers$ = Cstr.watchers;
3642
+ cmpMeta.$serializers$ = Cstr.serializers;
3643
+ cmpMeta.$deserializers$ = Cstr.deserializers;
3644
+ }
3645
+ proxyComponent(
3646
+ Cstr,
3647
+ cmpMeta,
3648
+ 2
3649
+ /* proxyState */
3650
+ );
3651
+ Cstr.isProxied = true;
3652
+ }
3653
+ const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
3654
+ {
3655
+ hostRef.$flags$ |= 8;
3656
+ }
3657
+ try {
3658
+ new Cstr(hostRef);
3659
+ } catch (e) {
3660
+ consoleError(e, elm);
3661
+ }
3662
+ {
3663
+ hostRef.$flags$ &= -9;
3664
+ }
3665
+ {
3666
+ hostRef.$flags$ |= 128;
3667
+ }
3668
+ endNewInstance();
3669
+ {
3670
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
3671
+ }
3672
+ } else {
3673
+ Cstr = elm.constructor;
3674
+ const cmpTag = elm.localName;
3675
+ customElements.whenDefined(cmpTag).then(
3676
+ () => hostRef.$flags$ |= 128
3677
+ /* isWatchReady */
3678
+ );
3679
+ }
3680
+ if (Cstr && Cstr.style) {
3681
+ let style;
3682
+ if (typeof Cstr.style === "string") {
3683
+ style = Cstr.style;
3684
+ }
3685
+ const scopeId2 = getScopeId(cmpMeta);
3686
+ if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
3687
+ const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
3688
+ registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1));
3689
+ endRegisterStyles();
3690
+ }
3691
+ }
3692
+ }
3693
+ const ancestorComponent = hostRef.$ancestorComponent$;
3694
+ const schedule = () => scheduleUpdate(hostRef, true);
3695
+ if (ancestorComponent && ancestorComponent["s-rc"]) {
3696
+ ancestorComponent["s-rc"].push(schedule);
3697
+ } else {
3698
+ schedule();
3699
+ }
3700
+ } catch (e) {
3701
+ consoleError(e, elm);
3702
+ if (hostRef.$onRenderResolve$) {
3703
+ hostRef.$onRenderResolve$();
3704
+ hostRef.$onRenderResolve$ = void 0;
3705
+ }
3706
+ if (hostRef.$onReadyResolve$) {
3707
+ hostRef.$onReadyResolve$(elm);
3708
+ }
3709
+ }
3710
+ };
3711
+ fireConnectedCallback = (instance, elm) => {
3712
+ {
3713
+ safeCall(instance, "connectedCallback", void 0, elm);
3714
+ }
3715
+ };
3716
+ connectedCallback = (elm) => {
3717
+ if ((plt.$flags$ & 1) === 0) {
3718
+ const hostRef = getHostRef(elm);
3719
+ if (!hostRef) {
3720
+ return;
3721
+ }
3722
+ const cmpMeta = hostRef.$cmpMeta$;
3723
+ const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
3724
+ if (!(hostRef.$flags$ & 1)) {
3725
+ hostRef.$flags$ |= 1;
3726
+ {
3727
+ let ancestorComponent = elm;
3728
+ while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
3729
+ if (ancestorComponent["s-p"]) {
3730
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
3731
+ break;
3732
+ }
3733
+ }
3734
+ }
3735
+ if (cmpMeta.$members$) {
3736
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
3737
+ if (memberFlags & 31 && Object.prototype.hasOwnProperty.call(elm, memberName)) {
3738
+ const value = elm[memberName];
3739
+ delete elm[memberName];
3740
+ elm[memberName] = value;
3741
+ }
3742
+ });
3743
+ }
3744
+ {
3745
+ initializeComponent(elm, hostRef, cmpMeta);
3746
+ }
3747
+ } else {
3748
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
3749
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
3750
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
3751
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
3752
+ }
3753
+ }
3754
+ endConnected();
3755
+ }
3756
+ };
3757
+ disconnectInstance = (instance, elm) => {
3758
+ {
3759
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
3760
+ }
3761
+ };
3762
+ disconnectedCallback = async (elm) => {
3763
+ if ((plt.$flags$ & 1) === 0) {
3764
+ const hostRef = getHostRef(elm);
3765
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
3766
+ disconnectInstance(hostRef.$lazyInstance$, elm);
3767
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
3768
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
3769
+ }
3770
+ }
3771
+ if (rootAppliedStyles.has(elm)) {
3772
+ rootAppliedStyles.delete(elm);
3773
+ }
3774
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
3775
+ rootAppliedStyles.delete(elm.shadowRoot);
3776
+ }
3777
+ };
3778
+ bootstrapLazy = (lazyBundles, options = {}) => {
3779
+ var _a;
3780
+ if (!win.document) {
3781
+ console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
3782
+ return;
3783
+ }
3784
+ const endBootstrap = createTime();
3785
+ const cmpTags = [];
3786
+ const exclude = options.exclude || [];
3787
+ const customElements2 = win.customElements;
3788
+ const head = win.document.head;
3789
+ const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
3790
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
3791
+ const deferredConnectedCallbacks = [];
3792
+ let appLoadFallback;
3793
+ let isBootstrapping = true;
3794
+ Object.assign(plt, options);
3795
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
3796
+ lazyBundles.map((lazyBundle) => {
3797
+ lazyBundle[1].map((compactMeta) => {
3798
+ var _a2, _b, _c;
3799
+ const cmpMeta = {
3800
+ $flags$: compactMeta[0],
3801
+ $tagName$: compactMeta[1],
3802
+ $members$: compactMeta[2],
3803
+ $listeners$: compactMeta[3]
3804
+ };
3805
+ {
3806
+ cmpMeta.$members$ = compactMeta[2];
3807
+ }
3808
+ {
3809
+ cmpMeta.$attrsToReflect$ = [];
3810
+ }
3811
+ {
3812
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
3813
+ cmpMeta.$serializers$ = (_b = compactMeta[5]) != null ? _b : {};
3814
+ cmpMeta.$deserializers$ = (_c = compactMeta[6]) != null ? _c : {};
3815
+ }
3816
+ const tagName = transformTag(cmpMeta.$tagName$);
3817
+ const HostElement = class extends HTMLElement {
3818
+ ["s-p"];
3819
+ ["s-rc"];
3820
+ hasRegisteredEventListeners = false;
3821
+ // StencilLazyHost
3822
+ constructor(self) {
3823
+ super(self);
3824
+ self = this;
3825
+ registerHost(self, cmpMeta);
3826
+ if (cmpMeta.$flags$ & 1) {
3827
+ {
3828
+ if (!self.shadowRoot) {
3829
+ createShadowRoot.call(self, cmpMeta);
3830
+ } else {
3831
+ if (self.shadowRoot.mode !== "open") {
3832
+ throw new Error(
3833
+ `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
3834
+ );
3835
+ }
3836
+ }
3837
+ }
3838
+ }
3839
+ }
3840
+ connectedCallback() {
3841
+ const hostRef = getHostRef(this);
3842
+ if (!hostRef) {
3843
+ return;
3844
+ }
3845
+ if (!this.hasRegisteredEventListeners) {
3846
+ this.hasRegisteredEventListeners = true;
3847
+ }
3848
+ if (appLoadFallback) {
3849
+ clearTimeout(appLoadFallback);
3850
+ appLoadFallback = null;
3851
+ }
3852
+ if (isBootstrapping) {
3853
+ deferredConnectedCallbacks.push(this);
3854
+ } else {
3855
+ plt.jmp(() => connectedCallback(this));
3856
+ }
3857
+ }
3858
+ disconnectedCallback() {
3859
+ plt.jmp(() => disconnectedCallback(this));
3860
+ plt.raf(() => {
3861
+ var _a3;
3862
+ const hostRef = getHostRef(this);
3863
+ if (!hostRef) {
3864
+ return;
3865
+ }
3866
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
3867
+ if (i2 > -1) {
3868
+ deferredConnectedCallbacks.splice(i2, 1);
3869
+ }
3870
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
3871
+ delete hostRef.$vnode$.$elm$;
3872
+ }
3873
+ });
3874
+ }
3875
+ componentOnReady() {
3876
+ var _a3;
3877
+ return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
3878
+ }
3879
+ };
3880
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
3881
+ if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
3882
+ cmpTags.push(tagName);
3883
+ customElements2.define(
3884
+ tagName,
3885
+ proxyComponent(
3886
+ HostElement,
3887
+ cmpMeta,
3888
+ 1
3889
+ /* isElementConstructor */
3890
+ )
3891
+ );
3892
+ }
3893
+ });
3894
+ });
3895
+ if (cmpTags.length > 0) {
3896
+ {
3897
+ dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
3898
+ }
3899
+ if (dataStyles.innerHTML.length) {
3900
+ dataStyles.setAttribute("data-styles", "");
3901
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
3902
+ if (nonce != null) {
3903
+ dataStyles.setAttribute("nonce", nonce);
3904
+ }
3905
+ head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
3906
+ }
3907
+ }
3908
+ isBootstrapping = false;
3909
+ if (deferredConnectedCallbacks.length) {
3910
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
3911
+ } else {
3912
+ {
3913
+ plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
3914
+ }
3915
+ }
3916
+ endBootstrap();
3917
+ };
3918
+ }
3919
+ });
3920
+
3921
+ // index.ts
3922
+ var index_exports = {};
3923
+ __export(index_exports, {
3924
+ closeOverlay: () => closeOverlay2,
3925
+ getTopOverlay: () => getTopOverlay2,
3926
+ isTopOverlay: () => isTopOverlay,
3927
+ openOverlay: () => openOverlay2,
3928
+ requestTopOverlayClose: () => requestTopOverlayClose2
3929
+ });
3930
+ module.exports = __toCommonJS(index_exports);
3931
+
3932
+ // dist/esm/loader.js
3933
+ init_index_CEeiinfk();
3934
+ init_index_CEeiinfk();
3935
+
3936
+ // dist/esm/app-globals-DQuL1Twl.js
3937
+ var globalScripts = () => {
3938
+ };
3939
+
3940
+ // dist/esm/loader.js
3941
+ var defineCustomElements = async (win2, options) => {
3942
+ if (typeof window === "undefined") return void 0;
3943
+ await globalScripts();
3944
+ return bootstrapLazy([["ui-context-menu", [[769, "ui-context-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "syncTarget": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-avatar", [[513, "ui-avatar", { "src": [1], "alt": [1], "name": [1], "fallback": [1], "hasImage": [32] }, null, { "src": [{ "watchSrc": 0 }] }]]], ["ui-avatar-group", [[769, "ui-avatar-group", { "max": [2], "label": [1], "overflowCount": [32] }, null, { "max": [{ "syncOverflow": 0 }] }]]], ["ui-badge", [[769, "ui-badge", { "variant": [1], "tone": [1] }]]], ["ui-button", [[769, "ui-button", { "variant": [1], "size": [1], "disabled": [4] }, null, { "variant": [{ "syncToButton": 0 }], "size": [{ "syncToButton": 0 }], "disabled": [{ "syncToButton": 0 }] }]]], ["ui-checkbox", [[769, "ui-checkbox", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "indeterminate": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "internalChecked": [{ "syncToInput": 0 }], "indeterminate": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }] }]]], ["ui-dialog", [[769, "ui-dialog", { "open": [4], "defaultOpen": [4, "default-open"], "modal": [4], "dismissible": [4], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOpen": 0 }] }]]], ["ui-disclosure", [[769, "ui-disclosure", { "open": [4], "defaultOpen": [4, "default-open"], "disabled": [4], "internalOpen": [32], "contentId": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncState": 0 }] }]]], ["ui-floating-action-button", [[769, "ui-floating-action-button", { "disabled": [516], "mobileOnly": [516, "mobile-only"], "label": [1] }]]], ["ui-form-field", [[769, "ui-form-field", { "invalid": [4], "disabled": [4], "required": [4] }]]], ["ui-icon-button", [[769, "ui-icon-button", { "disabled": [516], "label": [1], "size": [513], "variant": [513] }]]], ["ui-input", [[769, "ui-input", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToInput": 0 }], "defaultValue": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "invalid": [{ "syncToInput": 0 }], "readOnly": [{ "syncToInput": 0 }] }]]], ["ui-menu-item", [[769, "ui-menu-item", { "disabled": [516], "value": [1] }]]], ["ui-popover", [[769, "ui-popover", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "onOpenChange": 0 }] }]]], ["ui-radio", [[769, "ui-radio", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "name": [1], "required": [4], "value": [1] }, null, { "checked": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "name": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }], "value": [{ "syncToInput": 0 }] }]]], ["ui-radio-group", [[769, "ui-radio-group", { "value": [1], "name": [1], "orientation": [1], "disabled": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToRadios": 0 }], "name": [{ "syncToRadios": 0 }], "orientation": [{ "syncToRadios": 0 }], "disabled": [{ "syncToRadios": 0 }] }]]], ["ui-search-result-row", [[769, "ui-search-result-row", { "disabled": [516], "selected": [516], "hasLeading": [32], "hasMeta": [32], "hasExcerpt": [32], "hasTrailing": [32] }]]], ["ui-search-shell", [[769, "ui-search-shell", { "hasStatus": [32], "hasFooter": [32] }]]], ["ui-select", [[769, "ui-select", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToSelect": 0 }], "defaultValue": [{ "syncToSelect": 0 }], "disabled": [{ "syncToSelect": 0 }], "invalid": [{ "syncToSelect": 0 }], "required": [{ "syncToSelect": 0 }] }]]], ["ui-switch", [[769, "ui-switch", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }] }]]], ["ui-tabs", [[769, "ui-tabs", { "value": [1], "defaultValue": [1, "default-value"], "orientation": [1], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncState": 0 }], "orientation": [{ "syncState": 0 }] }]]], ["ui-textarea", [[769, "ui-textarea", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "rows": [2], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToTextarea": 0 }], "defaultValue": [{ "syncToTextarea": 0 }], "disabled": [{ "syncToTextarea": 0 }], "invalid": [{ "syncToTextarea": 0 }], "readOnly": [{ "syncToTextarea": 0 }], "rows": [{ "syncToTextarea": 0 }] }]]], ["ui-toast-region", [[769, "ui-toast-region", { "open": [4], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]], ["ui-tooltip", [[769, "ui-tooltip", { "for": [1], "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-top-bar", [[769, "ui-top-bar", { "hasLeading": [32], "hasSearch": [32], "hasActions": [32] }]]], ["ui-menu", [[769, "ui-menu", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]]], options);
3945
+ };
3946
+
3947
+ // loader/index.js
3948
+ (function() {
3949
+ if ("undefined" !== typeof window && void 0 !== window.Reflect && void 0 !== window.customElements) {
3950
+ var a = HTMLElement;
3951
+ window.HTMLElement = function() {
3952
+ return Reflect.construct(a, [], this.constructor);
3953
+ };
3954
+ HTMLElement.prototype = a.prototype;
3955
+ HTMLElement.prototype.constructor = HTMLElement;
3956
+ Object.setPrototypeOf(HTMLElement, a);
3957
+ }
3958
+ })();
3959
+
3960
+ // src/overlay/manager.ts
3961
+ var stack2 = [];
3962
+ var scrollLockAttribute2 = "data-ui-scroll-lock";
3963
+ var modalCount2 = 0;
3964
+ var listenersAttached2 = false;
3965
+ function syncScrollLock2() {
3966
+ if (typeof document === "undefined") {
3967
+ return;
3968
+ }
3969
+ const root = document.documentElement;
3970
+ if (modalCount2 > 0) {
3971
+ root.setAttribute(scrollLockAttribute2, "true");
3972
+ root.style.overflow = "hidden";
3973
+ return;
3974
+ }
3975
+ root.removeAttribute(scrollLockAttribute2);
3976
+ root.style.removeProperty("overflow");
3977
+ }
3978
+ function getOverlayDismissible2(record) {
3979
+ return record.dismissible ?? true;
3980
+ }
3981
+ function handleEscape2(event) {
3982
+ if (event.key !== "Escape") {
3983
+ return;
3984
+ }
3985
+ requestTopOverlayClose2("escape", "keyboard");
3986
+ }
3987
+ function handleLightDismiss2(event) {
3988
+ const top = getTopOverlay2();
3989
+ if (!top || !getOverlayDismissible2(top)) {
3990
+ return;
3991
+ }
3992
+ const target = event.target;
3993
+ if (target instanceof Node && top.element.contains(target)) {
3994
+ return;
3995
+ }
3996
+ requestTopOverlayClose2("light-dismiss", "pointer");
3997
+ }
3998
+ function ensureListeners2() {
3999
+ if (listenersAttached2 || typeof document === "undefined") {
4000
+ return;
4001
+ }
4002
+ document.addEventListener("keydown", handleEscape2);
4003
+ document.addEventListener("pointerdown", handleLightDismiss2, { capture: true });
4004
+ listenersAttached2 = true;
4005
+ }
4006
+ function removeListenersIfIdle2() {
4007
+ if (!listenersAttached2 || stack2.length > 0 || typeof document === "undefined") {
4008
+ return;
4009
+ }
4010
+ document.removeEventListener("keydown", handleEscape2);
4011
+ document.removeEventListener("pointerdown", handleLightDismiss2, { capture: true });
4012
+ listenersAttached2 = false;
4013
+ }
4014
+ function openOverlay2(record) {
4015
+ closeOverlay2(record.id);
4016
+ stack2.push(record);
4017
+ if (record.modal) {
4018
+ modalCount2 += 1;
4019
+ syncScrollLock2();
4020
+ }
4021
+ ensureListeners2();
4022
+ }
4023
+ function closeOverlay2(id) {
4024
+ const index = stack2.findIndex((record) => record.id === id);
4025
+ if (index >= 0) {
4026
+ const [record] = stack2.splice(index, 1);
4027
+ if (record?.modal) {
4028
+ modalCount2 = Math.max(0, modalCount2 - 1);
4029
+ syncScrollLock2();
4030
+ }
4031
+ }
4032
+ removeListenersIfIdle2();
4033
+ }
4034
+ function getTopOverlay2() {
4035
+ return stack2.at(-1);
4036
+ }
4037
+ function isTopOverlay(id) {
4038
+ return getTopOverlay2()?.id === id;
4039
+ }
4040
+ function requestTopOverlayClose2(reason, trigger) {
4041
+ const top = getTopOverlay2();
4042
+ if (!top) {
4043
+ return false;
4044
+ }
4045
+ if (!getOverlayDismissible2(top) && (reason === "escape" || reason === "light-dismiss")) {
4046
+ return false;
4047
+ }
4048
+ top.requestClose(reason, trigger);
4049
+ return true;
4050
+ }
4051
+
4052
+ // index.ts
4053
+ defineCustomElements();
4054
+ // Annotate the CommonJS export names for ESM import in node:
4055
+ 0 && (module.exports = {
4056
+ closeOverlay,
4057
+ getTopOverlay,
4058
+ isTopOverlay,
4059
+ openOverlay,
4060
+ requestTopOverlayClose
4061
+ });
4062
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/