@expressivecss/expressive 0.15.0 → 0.16.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 (602) hide show
  1. package/CHANGELOG.md +1502 -1
  2. package/README.md +9 -8
  3. package/dist/css/expressive.css +19247 -11923
  4. package/dist/css/expressive.css.map +1 -1
  5. package/dist/css/expressive.min.css +1 -1
  6. package/dist/css/expressive.min.css.map +1 -1
  7. package/dist/fonts/LICENSE-noto-sans-arabic +93 -0
  8. package/dist/fonts/LICENSE-noto-sans-hebrew +93 -0
  9. package/dist/fonts/LICENSE-noto-sans-thai +93 -0
  10. package/dist/fonts/material-symbols-outlined.woff2 +0 -0
  11. package/dist/fonts/material-symbols-rounded.woff2 +0 -0
  12. package/dist/fonts/material-symbols-sharp.woff2 +0 -0
  13. package/dist/fonts/noto-sans-arabic-arabic-400.woff2 +0 -0
  14. package/dist/fonts/noto-sans-arabic-arabic-500.woff2 +0 -0
  15. package/dist/fonts/noto-sans-arabic-arabic-700.woff2 +0 -0
  16. package/dist/fonts/noto-sans-cyrillic-400.woff2 +0 -0
  17. package/dist/fonts/noto-sans-cyrillic-500.woff2 +0 -0
  18. package/dist/fonts/noto-sans-cyrillic-700.woff2 +0 -0
  19. package/dist/fonts/noto-sans-cyrillic-ext-400.woff2 +0 -0
  20. package/dist/fonts/noto-sans-cyrillic-ext-500.woff2 +0 -0
  21. package/dist/fonts/noto-sans-cyrillic-ext-700.woff2 +0 -0
  22. package/dist/fonts/noto-sans-devanagari-400.woff2 +0 -0
  23. package/dist/fonts/noto-sans-devanagari-500.woff2 +0 -0
  24. package/dist/fonts/noto-sans-devanagari-700.woff2 +0 -0
  25. package/dist/fonts/noto-sans-greek-400.woff2 +0 -0
  26. package/dist/fonts/noto-sans-greek-500.woff2 +0 -0
  27. package/dist/fonts/noto-sans-greek-700.woff2 +0 -0
  28. package/dist/fonts/noto-sans-greek-ext-400.woff2 +0 -0
  29. package/dist/fonts/noto-sans-greek-ext-500.woff2 +0 -0
  30. package/dist/fonts/noto-sans-greek-ext-700.woff2 +0 -0
  31. package/dist/fonts/noto-sans-hebrew-hebrew-400.woff2 +0 -0
  32. package/dist/fonts/noto-sans-hebrew-hebrew-500.woff2 +0 -0
  33. package/dist/fonts/noto-sans-hebrew-hebrew-700.woff2 +0 -0
  34. package/dist/fonts/noto-sans-latin-700.woff2 +0 -0
  35. package/dist/fonts/noto-sans-latin-ext-400.woff2 +0 -0
  36. package/dist/fonts/noto-sans-latin-ext-500.woff2 +0 -0
  37. package/dist/fonts/noto-sans-latin-ext-700.woff2 +0 -0
  38. package/dist/fonts/noto-sans-thai-thai-400.woff2 +0 -0
  39. package/dist/fonts/noto-sans-thai-thai-500.woff2 +0 -0
  40. package/dist/fonts/noto-sans-thai-thai-700.woff2 +0 -0
  41. package/dist/fonts/noto-sans-vietnamese-400.woff2 +0 -0
  42. package/dist/fonts/noto-sans-vietnamese-500.woff2 +0 -0
  43. package/dist/fonts/noto-sans-vietnamese-700.woff2 +0 -0
  44. package/dist/fonts/roboto-cyrillic-400.woff2 +0 -0
  45. package/dist/fonts/roboto-cyrillic-500.woff2 +0 -0
  46. package/dist/fonts/roboto-cyrillic-700.woff2 +0 -0
  47. package/dist/fonts/roboto-cyrillic-ext-400.woff2 +0 -0
  48. package/dist/fonts/roboto-cyrillic-ext-500.woff2 +0 -0
  49. package/dist/fonts/roboto-cyrillic-ext-700.woff2 +0 -0
  50. package/dist/fonts/roboto-greek-400.woff2 +0 -0
  51. package/dist/fonts/roboto-greek-500.woff2 +0 -0
  52. package/dist/fonts/roboto-greek-700.woff2 +0 -0
  53. package/dist/fonts/roboto-greek-ext-400.woff2 +0 -0
  54. package/dist/fonts/roboto-greek-ext-500.woff2 +0 -0
  55. package/dist/fonts/roboto-greek-ext-700.woff2 +0 -0
  56. package/dist/fonts/roboto-latin-700.woff2 +0 -0
  57. package/dist/fonts/roboto-latin-ext-400.woff2 +0 -0
  58. package/dist/fonts/roboto-latin-ext-500.woff2 +0 -0
  59. package/dist/fonts/roboto-latin-ext-700.woff2 +0 -0
  60. package/dist/fonts/roboto-vietnamese-400.woff2 +0 -0
  61. package/dist/fonts/roboto-vietnamese-500.woff2 +0 -0
  62. package/dist/fonts/roboto-vietnamese-700.woff2 +0 -0
  63. package/dist/js/chunks/chunk-2CS6TITK.mjs +219 -0
  64. package/dist/js/chunks/chunk-2CS6TITK.mjs.map +7 -0
  65. package/dist/js/chunks/chunk-2RLBDFH4.mjs +108 -0
  66. package/dist/js/chunks/chunk-2RLBDFH4.mjs.map +7 -0
  67. package/dist/js/chunks/chunk-3L3QIYLC.mjs +85 -0
  68. package/dist/js/chunks/chunk-3L3QIYLC.mjs.map +7 -0
  69. package/dist/js/chunks/chunk-4EWGD4V2.mjs +75 -0
  70. package/dist/js/chunks/chunk-4EWGD4V2.mjs.map +7 -0
  71. package/dist/js/chunks/chunk-4IKVPCSU.mjs +7 -0
  72. package/dist/js/chunks/chunk-4IKVPCSU.mjs.map +7 -0
  73. package/dist/js/chunks/chunk-4PIXLDNJ.mjs +127 -0
  74. package/dist/js/chunks/chunk-4PIXLDNJ.mjs.map +7 -0
  75. package/dist/js/chunks/{chunk-KVJAVDBC.mjs → chunk-4QUCNFSD.mjs} +64 -113
  76. package/dist/js/chunks/chunk-4QUCNFSD.mjs.map +7 -0
  77. package/dist/js/chunks/{chunk-UETTGDLI.mjs → chunk-4TRZ2AER.mjs} +35 -41
  78. package/dist/js/chunks/chunk-4TRZ2AER.mjs.map +7 -0
  79. package/dist/js/chunks/{chunk-C6CHEWYP.mjs → chunk-5KIHWJI2.mjs} +40 -26
  80. package/dist/js/chunks/chunk-5KIHWJI2.mjs.map +7 -0
  81. package/dist/js/chunks/{chunk-L27Q6ZMI.mjs → chunk-67ZPPKXS.mjs} +20 -33
  82. package/dist/js/chunks/chunk-67ZPPKXS.mjs.map +7 -0
  83. package/dist/js/chunks/{chunk-XAEAEHIX.mjs → chunk-6FSEUFVW.mjs} +39 -26
  84. package/dist/js/chunks/chunk-6FSEUFVW.mjs.map +7 -0
  85. package/dist/js/chunks/chunk-752ADW4M.mjs +225 -0
  86. package/dist/js/chunks/chunk-752ADW4M.mjs.map +7 -0
  87. package/dist/js/chunks/{chunk-CK2XCICY.mjs → chunk-75E5EDJF.mjs} +3 -11
  88. package/dist/js/chunks/chunk-75E5EDJF.mjs.map +7 -0
  89. package/dist/js/chunks/{chunk-KHXZ2A4K.mjs → chunk-7NLUI3RR.mjs} +139 -66
  90. package/dist/js/chunks/chunk-7NLUI3RR.mjs.map +7 -0
  91. package/dist/js/chunks/chunk-7W7TV6NY.mjs +108 -0
  92. package/dist/js/chunks/chunk-7W7TV6NY.mjs.map +7 -0
  93. package/dist/js/chunks/chunk-7YQBHTK3.mjs +225 -0
  94. package/dist/js/chunks/chunk-7YQBHTK3.mjs.map +7 -0
  95. package/dist/js/chunks/chunk-7YZ5CN3V.mjs +33 -0
  96. package/dist/js/chunks/chunk-7YZ5CN3V.mjs.map +7 -0
  97. package/dist/js/chunks/chunk-AI73GJKG.mjs +28 -0
  98. package/dist/js/chunks/chunk-AI73GJKG.mjs.map +7 -0
  99. package/dist/js/chunks/{chunk-LQWUDNHZ.mjs → chunk-ANKFWNWT.mjs} +21 -45
  100. package/dist/js/chunks/chunk-ANKFWNWT.mjs.map +7 -0
  101. package/dist/js/chunks/{chunk-5CEAOLUA.mjs → chunk-B7DQFHA5.mjs} +30 -47
  102. package/dist/js/chunks/chunk-B7DQFHA5.mjs.map +7 -0
  103. package/dist/js/chunks/chunk-BIGU5RCJ.mjs +153 -0
  104. package/dist/js/chunks/chunk-BIGU5RCJ.mjs.map +7 -0
  105. package/dist/js/chunks/{chunk-VGNYF6FB.mjs → chunk-BPF3I2MN.mjs} +109 -24
  106. package/dist/js/chunks/chunk-BPF3I2MN.mjs.map +7 -0
  107. package/dist/js/chunks/chunk-CMGXGYUC.mjs +74 -0
  108. package/dist/js/chunks/chunk-CMGXGYUC.mjs.map +7 -0
  109. package/dist/js/chunks/{chunk-NUHMOAOY.mjs → chunk-CSYWKEK3.mjs} +310 -196
  110. package/dist/js/chunks/chunk-CSYWKEK3.mjs.map +7 -0
  111. package/dist/js/chunks/chunk-CZSQHXEV.mjs +227 -0
  112. package/dist/js/chunks/chunk-CZSQHXEV.mjs.map +7 -0
  113. package/dist/js/chunks/chunk-DZYVU75J.mjs +121 -0
  114. package/dist/js/chunks/chunk-DZYVU75J.mjs.map +7 -0
  115. package/dist/js/chunks/{chunk-74MXKKLN.mjs → chunk-EC26RU2D.mjs} +11 -29
  116. package/dist/js/chunks/chunk-EC26RU2D.mjs.map +7 -0
  117. package/dist/js/chunks/{chunk-WDK4T63U.mjs → chunk-EVCVFEV3.mjs} +235 -146
  118. package/dist/js/chunks/chunk-EVCVFEV3.mjs.map +7 -0
  119. package/dist/js/chunks/chunk-FCNF4GRJ.mjs +445 -0
  120. package/dist/js/chunks/chunk-FCNF4GRJ.mjs.map +7 -0
  121. package/dist/js/chunks/chunk-GCWWEZKO.mjs +342 -0
  122. package/dist/js/chunks/chunk-GCWWEZKO.mjs.map +7 -0
  123. package/dist/js/chunks/chunk-GNRSYMVH.mjs +1 -0
  124. package/dist/js/chunks/chunk-GVZQH2H5.mjs +54 -0
  125. package/dist/js/chunks/chunk-GVZQH2H5.mjs.map +7 -0
  126. package/dist/js/chunks/chunk-GWZ76SR4.mjs +435 -0
  127. package/dist/js/chunks/chunk-GWZ76SR4.mjs.map +7 -0
  128. package/dist/js/chunks/{chunk-PDG64UHF.mjs → chunk-ILDRRG7T.mjs} +21 -23
  129. package/dist/js/chunks/chunk-ILDRRG7T.mjs.map +7 -0
  130. package/dist/js/chunks/chunk-INLZWHLY.mjs +80 -0
  131. package/dist/js/chunks/chunk-INLZWHLY.mjs.map +7 -0
  132. package/dist/js/chunks/chunk-JUKBBN6P.mjs +175 -0
  133. package/dist/js/chunks/chunk-JUKBBN6P.mjs.map +7 -0
  134. package/dist/js/chunks/chunk-KYIEG4U3.mjs +730 -0
  135. package/dist/js/chunks/chunk-KYIEG4U3.mjs.map +7 -0
  136. package/dist/js/chunks/{chunk-BGZLF6JZ.mjs → chunk-KZPSAXIU.mjs} +142 -32
  137. package/dist/js/chunks/chunk-KZPSAXIU.mjs.map +7 -0
  138. package/dist/js/chunks/chunk-LDXCC2L3.mjs +438 -0
  139. package/dist/js/chunks/chunk-LDXCC2L3.mjs.map +7 -0
  140. package/dist/js/chunks/chunk-NAC72P7R.mjs +137 -0
  141. package/dist/js/chunks/chunk-NAC72P7R.mjs.map +7 -0
  142. package/dist/js/chunks/chunk-NBJAUGPP.mjs +244 -0
  143. package/dist/js/chunks/chunk-NBJAUGPP.mjs.map +7 -0
  144. package/dist/js/chunks/chunk-NNHVANQA.mjs +113 -0
  145. package/dist/js/chunks/chunk-NNHVANQA.mjs.map +7 -0
  146. package/dist/js/chunks/chunk-NVQ5EHCU.mjs +376 -0
  147. package/dist/js/chunks/chunk-NVQ5EHCU.mjs.map +7 -0
  148. package/dist/js/chunks/{chunk-DXGRXYYL.mjs → chunk-OP43LLIC.mjs} +28 -45
  149. package/dist/js/chunks/chunk-OP43LLIC.mjs.map +7 -0
  150. package/dist/js/chunks/chunk-OUCHKSAW.mjs +63 -0
  151. package/dist/js/chunks/chunk-OUCHKSAW.mjs.map +7 -0
  152. package/dist/js/chunks/{chunk-TSZYSW7F.mjs → chunk-OYNUDOHR.mjs} +19 -47
  153. package/dist/js/chunks/chunk-OYNUDOHR.mjs.map +7 -0
  154. package/dist/js/chunks/{chunk-UAZSDUVP.mjs → chunk-P6DRQ6KS.mjs} +36 -30
  155. package/dist/js/chunks/chunk-P6DRQ6KS.mjs.map +7 -0
  156. package/dist/js/chunks/chunk-PA7NU5AK.mjs +99 -0
  157. package/dist/js/chunks/chunk-PA7NU5AK.mjs.map +7 -0
  158. package/dist/js/chunks/chunk-QACZ6TUP.mjs +224 -0
  159. package/dist/js/chunks/chunk-QACZ6TUP.mjs.map +7 -0
  160. package/dist/js/chunks/{chunk-GJL6GCIU.mjs → chunk-QXKWVHBD.mjs} +265 -161
  161. package/dist/js/chunks/chunk-QXKWVHBD.mjs.map +7 -0
  162. package/dist/js/chunks/{chunk-X4ISMKE2.mjs → chunk-ROH2HDB4.mjs} +7 -6
  163. package/dist/js/chunks/chunk-ROH2HDB4.mjs.map +7 -0
  164. package/dist/js/chunks/chunk-S23RJ3XY.mjs +86 -0
  165. package/dist/js/chunks/chunk-S23RJ3XY.mjs.map +7 -0
  166. package/dist/js/chunks/{chunk-SMY7GJSS.mjs → chunk-SPPHF7YZ.mjs} +36 -29
  167. package/dist/js/chunks/chunk-SPPHF7YZ.mjs.map +7 -0
  168. package/dist/js/chunks/chunk-T3BNSRP3.mjs +152 -0
  169. package/dist/js/chunks/chunk-T3BNSRP3.mjs.map +7 -0
  170. package/dist/js/chunks/chunk-TFABTUAZ.mjs +108 -0
  171. package/dist/js/chunks/chunk-TFABTUAZ.mjs.map +7 -0
  172. package/dist/js/chunks/chunk-U4B3VHFS.mjs +507 -0
  173. package/dist/js/chunks/chunk-U4B3VHFS.mjs.map +7 -0
  174. package/dist/js/chunks/chunk-UGJHCHXG.mjs +341 -0
  175. package/dist/js/chunks/chunk-UGJHCHXG.mjs.map +7 -0
  176. package/dist/js/chunks/chunk-VFV75DHF.mjs +70 -0
  177. package/dist/js/chunks/chunk-VFV75DHF.mjs.map +7 -0
  178. package/dist/js/chunks/{chunk-ZX6M7SWO.mjs → chunk-VGY4M57S.mjs} +266 -120
  179. package/dist/js/chunks/chunk-VGY4M57S.mjs.map +7 -0
  180. package/dist/js/chunks/chunk-VH4BMAZS.mjs +167 -0
  181. package/dist/js/chunks/chunk-VH4BMAZS.mjs.map +7 -0
  182. package/dist/js/chunks/chunk-VJVQIXHC.mjs +123 -0
  183. package/dist/js/chunks/chunk-VJVQIXHC.mjs.map +7 -0
  184. package/dist/js/chunks/{chunk-SFI2U4YW.mjs → chunk-VMY55K2X.mjs} +76 -109
  185. package/dist/js/chunks/chunk-VMY55K2X.mjs.map +7 -0
  186. package/dist/js/chunks/{chunk-KUFHW3DS.mjs → chunk-VR3L2WN5.mjs} +11 -17
  187. package/dist/js/chunks/chunk-VR3L2WN5.mjs.map +7 -0
  188. package/dist/js/chunks/chunk-W6FAL3TI.mjs +38 -0
  189. package/dist/js/chunks/chunk-W6FAL3TI.mjs.map +7 -0
  190. package/dist/js/chunks/chunk-WU7XJ4RR.mjs +450 -0
  191. package/dist/js/chunks/chunk-WU7XJ4RR.mjs.map +7 -0
  192. package/dist/js/chunks/chunk-X7SDA2J5.mjs +116 -0
  193. package/dist/js/chunks/chunk-X7SDA2J5.mjs.map +7 -0
  194. package/dist/js/chunks/chunk-Y6H2X7ZC.mjs +209 -0
  195. package/dist/js/chunks/chunk-Y6H2X7ZC.mjs.map +7 -0
  196. package/dist/js/chunks/chunk-Y6TLRA3U.mjs +129 -0
  197. package/dist/js/chunks/chunk-Y6TLRA3U.mjs.map +7 -0
  198. package/dist/js/chunks/chunk-Z4GICXR2.mjs +190 -0
  199. package/dist/js/chunks/chunk-Z4GICXR2.mjs.map +7 -0
  200. package/dist/js/chunks/chunk-Z4OARDZ7.mjs +442 -0
  201. package/dist/js/chunks/chunk-Z4OARDZ7.mjs.map +7 -0
  202. package/dist/js/chunks/{chunk-FM5CZOUB.mjs → chunk-ZJNLAGY5.mjs} +19 -30
  203. package/dist/js/chunks/chunk-ZJNLAGY5.mjs.map +7 -0
  204. package/dist/js/chunks/chunk-ZKWUWBUB.mjs +81 -0
  205. package/dist/js/chunks/chunk-ZKWUWBUB.mjs.map +7 -0
  206. package/dist/js/chunks/chunk-ZM3XBHWV.mjs +746 -0
  207. package/dist/js/chunks/chunk-ZM3XBHWV.mjs.map +7 -0
  208. package/dist/js/chunks/chunk-ZO6ZLHFF.mjs +48 -0
  209. package/dist/js/chunks/chunk-ZO6ZLHFF.mjs.map +7 -0
  210. package/dist/js/chunks/chunk-ZVLOUDIJ.mjs +251 -0
  211. package/dist/js/chunks/chunk-ZVLOUDIJ.mjs.map +7 -0
  212. package/dist/js/expressive.cjs +10613 -4327
  213. package/dist/js/expressive.cjs.map +4 -4
  214. package/dist/js/expressive.js +10613 -4327
  215. package/dist/js/expressive.js.map +4 -4
  216. package/dist/js/expressive.min.js +23 -22
  217. package/dist/js/expressive.min.js.map +4 -4
  218. package/dist/js/expressive.mjs +182 -71
  219. package/dist/js/expressive.mjs.map +2 -2
  220. package/dist/js/internal/behaviors/bottomSheets.mjs +4 -3
  221. package/dist/js/internal/behaviors/copy.mjs +9 -0
  222. package/dist/js/internal/behaviors/copy.mjs.map +7 -0
  223. package/dist/js/internal/behaviors/dataTables.mjs +10 -0
  224. package/dist/js/internal/behaviors/dataTables.mjs.map +7 -0
  225. package/dist/js/internal/behaviors/dialogs.mjs +2 -2
  226. package/dist/js/internal/behaviors/forms.mjs +2 -2
  227. package/dist/js/internal/behaviors/imageCompare.mjs +8 -0
  228. package/dist/js/internal/behaviors/imageCompare.mjs.map +7 -0
  229. package/dist/js/internal/behaviors/lists.mjs +8 -0
  230. package/dist/js/internal/behaviors/lists.mjs.map +7 -0
  231. package/dist/js/internal/behaviors/paneResize.mjs +8 -0
  232. package/dist/js/internal/behaviors/paneResize.mjs.map +7 -0
  233. package/dist/js/internal/behaviors/sheetDrag.mjs +7 -2
  234. package/dist/js/internal/behaviors/sideSheets.mjs +4 -3
  235. package/dist/js/internal/behaviors/sortable.mjs +8 -0
  236. package/dist/js/internal/behaviors/sortable.mjs.map +7 -0
  237. package/dist/js/internal/behaviors/theme.mjs +8 -0
  238. package/dist/js/internal/behaviors/theme.mjs.map +7 -0
  239. package/dist/js/internal/behaviors/tour.mjs +8 -0
  240. package/dist/js/internal/behaviors/tour.mjs.map +7 -0
  241. package/dist/js/internal/behaviors/transferList.mjs +8 -0
  242. package/dist/js/internal/behaviors/transferList.mjs.map +7 -0
  243. package/dist/js/internal/components/appBar.mjs +3 -2
  244. package/dist/js/internal/components/autocomplete.mjs +4 -4
  245. package/dist/js/internal/components/backToTop.mjs +9 -0
  246. package/dist/js/internal/components/backToTop.mjs.map +7 -0
  247. package/dist/js/internal/components/barChart.mjs +5 -4
  248. package/dist/js/internal/components/buttonGroup.mjs +3 -2
  249. package/dist/js/internal/components/buttons.mjs +3 -3
  250. package/dist/js/internal/components/cards.mjs +3 -3
  251. package/dist/js/internal/components/carousel.mjs +3 -3
  252. package/dist/js/internal/components/cascader.mjs +10 -0
  253. package/dist/js/internal/components/cascader.mjs.map +7 -0
  254. package/dist/js/internal/components/characterCounter.mjs +3 -2
  255. package/dist/js/internal/components/chips.mjs +6 -5
  256. package/dist/js/internal/components/colorPicker.mjs +9 -0
  257. package/dist/js/internal/components/colorPicker.mjs.map +7 -0
  258. package/dist/js/internal/components/columnChart.mjs +4 -3
  259. package/dist/js/internal/components/commandPalette.mjs +3 -3
  260. package/dist/js/internal/components/confetti.mjs +3 -2
  261. package/dist/js/internal/components/currencyInput.mjs +9 -0
  262. package/dist/js/internal/components/currencyInput.mjs.map +7 -0
  263. package/dist/js/internal/components/datepicker.mjs +11 -8
  264. package/dist/js/internal/components/expandingCard.mjs +3 -3
  265. package/dist/js/internal/components/funnelChart.mjs +10 -0
  266. package/dist/js/internal/components/funnelChart.mjs.map +7 -0
  267. package/dist/js/internal/components/heatmapChart.mjs +4 -3
  268. package/dist/js/internal/components/hoverCard.mjs +9 -0
  269. package/dist/js/internal/components/hoverCard.mjs.map +7 -0
  270. package/dist/js/internal/components/index.mjs +131 -66
  271. package/dist/js/internal/components/inputMask.mjs +9 -0
  272. package/dist/js/internal/components/inputMask.mjs.map +7 -0
  273. package/dist/js/internal/components/keypad.mjs +3 -3
  274. package/dist/js/internal/components/lightbox.mjs +3 -3
  275. package/dist/js/internal/components/lineChart.mjs +25 -4
  276. package/dist/js/internal/components/loadingOverlay.mjs +9 -0
  277. package/dist/js/internal/components/loadingOverlay.mjs.map +7 -0
  278. package/dist/js/internal/components/mapView.mjs +3 -3
  279. package/dist/js/internal/components/menu.mjs +3 -3
  280. package/dist/js/internal/components/menubar.mjs +10 -0
  281. package/dist/js/internal/components/menubar.mjs.map +7 -0
  282. package/dist/js/internal/components/messageScroller.mjs +3 -3
  283. package/dist/js/internal/components/mixedChart.mjs +5 -4
  284. package/dist/js/internal/components/navigationRail.mjs +3 -2
  285. package/dist/js/internal/components/particles.mjs +3 -2
  286. package/dist/js/internal/components/pieChart.mjs +4 -3
  287. package/dist/js/internal/components/pullToRefresh.mjs +9 -0
  288. package/dist/js/internal/components/pullToRefresh.mjs.map +7 -0
  289. package/dist/js/internal/components/questionnaire.mjs +3 -3
  290. package/dist/js/internal/components/radarChart.mjs +4 -3
  291. package/dist/js/internal/components/radialChart.mjs +4 -3
  292. package/dist/js/internal/components/registry.mjs +59 -41
  293. package/dist/js/internal/components/richTextEditor.mjs +3 -3
  294. package/dist/js/internal/components/sankeyChart.mjs +10 -0
  295. package/dist/js/internal/components/sankeyChart.mjs.map +7 -0
  296. package/dist/js/internal/components/scatterChart.mjs +10 -0
  297. package/dist/js/internal/components/scatterChart.mjs.map +7 -0
  298. package/dist/js/internal/components/scrollspy.mjs +3 -2
  299. package/dist/js/internal/components/select.mjs +4 -4
  300. package/dist/js/internal/components/showMore.mjs +9 -0
  301. package/dist/js/internal/components/showMore.mjs.map +7 -0
  302. package/dist/js/internal/components/slider.mjs +3 -3
  303. package/dist/js/internal/components/snackbar.mjs +2 -2
  304. package/dist/js/internal/components/swipeActions.mjs +9 -0
  305. package/dist/js/internal/components/swipeActions.mjs.map +7 -0
  306. package/dist/js/internal/components/tabs.mjs +3 -4
  307. package/dist/js/internal/components/timepicker.mjs +5 -4
  308. package/dist/js/internal/components/tooltip.mjs +3 -3
  309. package/dist/js/internal/components/treeSelect.mjs +13 -0
  310. package/dist/js/internal/components/treeSelect.mjs.map +7 -0
  311. package/dist/js/internal/components/treemapChart.mjs +10 -0
  312. package/dist/js/internal/components/treemapChart.mjs.map +7 -0
  313. package/dist/js/internal/core/component.mjs +2 -1
  314. package/dist/js/internal/core/formControl.mjs +12 -0
  315. package/dist/js/internal/core/formControl.mjs.map +7 -0
  316. package/dist/js/internal/core/spring.mjs +11 -0
  317. package/dist/js/internal/core/spring.mjs.map +7 -0
  318. package/dist/js/internal/core/utils.mjs +11 -3
  319. package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
  320. package/dist/js/internal/plugins/modalDisplayPlugin.mjs +13 -0
  321. package/dist/js/internal/plugins/modalDisplayPlugin.mjs.map +7 -0
  322. package/dist/js/modular.mjs +173 -71
  323. package/dist/types/behaviors/bottomSheets.d.ts +19 -3
  324. package/dist/types/behaviors/copy.d.ts +18 -0
  325. package/dist/types/behaviors/dataTables.d.ts +129 -0
  326. package/dist/types/behaviors/dialogs.d.ts +27 -1
  327. package/dist/types/behaviors/forms.d.ts +68 -2
  328. package/dist/types/behaviors/imageCompare.d.ts +12 -0
  329. package/dist/types/behaviors/lists.d.ts +12 -0
  330. package/dist/types/behaviors/paneResize.d.ts +29 -0
  331. package/dist/types/behaviors/sheetDrag.d.ts +18 -0
  332. package/dist/types/behaviors/sideSheets.d.ts +1 -1
  333. package/dist/types/behaviors/sortable.d.ts +28 -0
  334. package/dist/types/behaviors/theme.d.ts +22 -0
  335. package/dist/types/behaviors/tour.d.ts +36 -0
  336. package/dist/types/behaviors/transferList.d.ts +51 -0
  337. package/dist/types/components/appBar.d.ts +5 -6
  338. package/dist/types/components/autocomplete.d.ts +91 -17
  339. package/dist/types/components/backToTop.d.ts +36 -0
  340. package/dist/types/components/barChart.d.ts +3 -6
  341. package/dist/types/components/buttonGroup.d.ts +2 -4
  342. package/dist/types/components/buttons.d.ts +5 -5
  343. package/dist/types/components/cards.d.ts +3 -16
  344. package/dist/types/components/carousel.d.ts +9 -15
  345. package/dist/types/components/cascader.d.ts +130 -0
  346. package/dist/types/components/characterCounter.d.ts +2 -15
  347. package/dist/types/components/chips.d.ts +65 -19
  348. package/dist/types/components/colorPicker.d.ts +42 -0
  349. package/dist/types/components/columnChart.d.ts +23 -10
  350. package/dist/types/components/commandPalette.d.ts +11 -16
  351. package/dist/types/components/confetti.d.ts +2 -4
  352. package/dist/types/components/currencyInput.d.ts +59 -0
  353. package/dist/types/components/datepicker.d.ts +56 -32
  354. package/dist/types/components/expandingCard.d.ts +4 -6
  355. package/dist/types/components/funnelChart.d.ts +38 -0
  356. package/dist/types/components/heatmapChart.d.ts +39 -8
  357. package/dist/types/components/hoverCard.d.ts +58 -0
  358. package/dist/types/components/index.d.ts +16 -1
  359. package/dist/types/components/inputMask.d.ts +30 -0
  360. package/dist/types/components/keypad.d.ts +38 -6
  361. package/dist/types/components/lightbox.d.ts +14 -20
  362. package/dist/types/components/lineChart.d.ts +172 -10
  363. package/dist/types/components/loadingOverlay.d.ts +42 -0
  364. package/dist/types/components/mapView.d.ts +26 -17
  365. package/dist/types/components/menu.d.ts +60 -22
  366. package/dist/types/components/menubar.d.ts +37 -0
  367. package/dist/types/components/messageScroller.d.ts +2 -14
  368. package/dist/types/components/mixedChart.d.ts +15 -6
  369. package/dist/types/components/navigationRail.d.ts +16 -5
  370. package/dist/types/components/particles.d.ts +8 -4
  371. package/dist/types/components/pieChart.d.ts +32 -7
  372. package/dist/types/components/pullToRefresh.d.ts +80 -0
  373. package/dist/types/components/questionnaire.d.ts +58 -16
  374. package/dist/types/components/radarChart.d.ts +10 -6
  375. package/dist/types/components/radialChart.d.ts +58 -7
  376. package/dist/types/components/registry.d.ts +73 -3
  377. package/dist/types/components/richTextEditor.d.ts +6 -14
  378. package/dist/types/components/sankeyChart.d.ts +72 -0
  379. package/dist/types/components/scatterChart.d.ts +102 -0
  380. package/dist/types/components/scrollspy.d.ts +3 -5
  381. package/dist/types/components/select.d.ts +43 -30
  382. package/dist/types/components/showMore.d.ts +51 -0
  383. package/dist/types/components/slider.d.ts +3 -15
  384. package/dist/types/components/snackbar.d.ts +61 -0
  385. package/dist/types/components/swipeActions.d.ts +81 -0
  386. package/dist/types/components/tabs.d.ts +89 -27
  387. package/dist/types/components/timepicker.d.ts +113 -21
  388. package/dist/types/components/tooltip.d.ts +56 -20
  389. package/dist/types/components/treeSelect.d.ts +106 -0
  390. package/dist/types/components/treemapChart.d.ts +56 -0
  391. package/dist/types/core/component.d.ts +43 -25
  392. package/dist/types/core/formControl.d.ts +21 -0
  393. package/dist/types/core/spring.d.ts +20 -0
  394. package/dist/types/core/utils.d.ts +85 -72
  395. package/dist/types/modular.d.ts +33 -1
  396. package/dist/types/plugins/dockedDisplayPlugin.d.ts +10 -8
  397. package/dist/types/plugins/modalDisplayPlugin.d.ts +32 -0
  398. package/package.json +10 -8
  399. package/src/sass/README.md +27 -18
  400. package/src/sass/abstracts/_elevation.scss +13 -7
  401. package/src/sass/abstracts/_index.scss +1 -0
  402. package/src/sass/abstracts/_mixins.scss +422 -36
  403. package/src/sass/abstracts/_spring.scss +63 -0
  404. package/src/sass/abstracts/_variables.scss +39 -21
  405. package/src/sass/base/_fonts.scss +61 -48
  406. package/src/sass/base/_global.scss +104 -24
  407. package/src/sass/base/_index.scss +2 -0
  408. package/src/sass/base/_normalize.scss +59 -114
  409. package/src/sass/base/_print.scss +21 -0
  410. package/src/sass/base/_prose.scss +68 -0
  411. package/src/sass/base/_typography.scss +9 -5
  412. package/src/sass/components/_accordion.scss +9 -16
  413. package/src/sass/components/_alert.scss +102 -0
  414. package/src/sass/components/_aura.scss +8 -3
  415. package/src/sass/components/_avatar.scss +3 -3
  416. package/src/sass/components/_back-to-top.scss +38 -0
  417. package/src/sass/components/_badges.scss +6 -5
  418. package/src/sass/components/_bar-chart.scss +41 -19
  419. package/src/sass/components/_bottom-sheet.scss +44 -16
  420. package/src/sass/components/_breadcrumb.scss +8 -1
  421. package/src/sass/components/_button-groups.scss +15 -25
  422. package/src/sass/components/_buttons.scss +156 -63
  423. package/src/sass/components/_calendar.scss +246 -0
  424. package/src/sass/components/_cards.scss +36 -44
  425. package/src/sass/components/_carousel.scss +27 -103
  426. package/src/sass/components/_cascader.scss +142 -0
  427. package/src/sass/components/_chips.scss +36 -46
  428. package/src/sass/components/_column-chart.scss +19 -12
  429. package/src/sass/components/_command-palette.scss +4 -7
  430. package/src/sass/components/_confetti.scss +0 -2
  431. package/src/sass/components/_countdown.scss +1 -1
  432. package/src/sass/components/_data-table.scss +162 -25
  433. package/src/sass/components/_datepicker.scss +54 -40
  434. package/src/sass/components/_description-list.scss +85 -0
  435. package/src/sass/components/_dialog.scss +42 -41
  436. package/src/sass/components/_docked-display.scss +1 -3
  437. package/src/sass/components/_drag-handle.scss +16 -20
  438. package/src/sass/components/_expanding-card.scss +20 -9
  439. package/src/sass/components/_fab-menu.scss +44 -32
  440. package/src/sass/components/_funnel-chart.scss +124 -0
  441. package/src/sass/components/_heatmap-chart.scss +111 -22
  442. package/src/sass/components/_icon-buttons.scss +7 -7
  443. package/src/sass/components/_icons-material-design.scss +2 -2
  444. package/src/sass/components/_image-compare.scss +108 -0
  445. package/src/sass/components/_index.scss +20 -0
  446. package/src/sass/components/_keypad.scss +39 -19
  447. package/src/sass/components/_kpi.scss +6 -11
  448. package/src/sass/components/_lightbox.scss +24 -13
  449. package/src/sass/components/_line-chart.scss +16 -2
  450. package/src/sass/components/_list.scss +59 -14
  451. package/src/sass/components/_loading-indicator.scss +1 -0
  452. package/src/sass/components/_loading-overlay.scss +105 -0
  453. package/src/sass/components/_map.scss +33 -11
  454. package/src/sass/components/_marquee.scss +3 -2
  455. package/src/sass/components/_mega-menu.scss +137 -0
  456. package/src/sass/components/_menu.scss +143 -123
  457. package/src/sass/components/_menubar.scss +59 -0
  458. package/src/sass/components/_message-scroller.scss +2 -2
  459. package/src/sass/components/_message.scss +3 -3
  460. package/src/sass/components/_mixed-chart.scss +37 -9
  461. package/src/sass/components/_modal-display.scss +21 -0
  462. package/src/sass/components/_navbar.scss +34 -20
  463. package/src/sass/components/_navigation-bar.scss +15 -77
  464. package/src/sass/components/_navigation-rail.scss +151 -92
  465. package/src/sass/components/_org-chart.scss +192 -0
  466. package/src/sass/components/_page-footer.scss +1 -1
  467. package/src/sass/components/_pagination.scss +6 -13
  468. package/src/sass/components/_panes.scss +32 -26
  469. package/src/sass/components/_particles.scss +0 -2
  470. package/src/sass/components/_pie-chart.scss +91 -11
  471. package/src/sass/components/_popover.scss +18 -5
  472. package/src/sass/components/_progress.scss +152 -31
  473. package/src/sass/components/_pull-to-refresh.scss +90 -0
  474. package/src/sass/components/_questionnaire.scss +74 -3
  475. package/src/sass/components/_radar-chart.scss +38 -10
  476. package/src/sass/components/_radial-chart.scss +113 -5
  477. package/src/sass/components/_rich-text-editor.scss +2 -2
  478. package/src/sass/components/_sankey-chart.scss +114 -0
  479. package/src/sass/components/_scatter-chart.scss +153 -0
  480. package/src/sass/components/_scrim.scss +0 -2
  481. package/src/sass/components/_scrollspy.scss +0 -2
  482. package/src/sass/components/_search.scss +26 -22
  483. package/src/sass/components/_show-more.scss +8 -0
  484. package/src/sass/components/_side-sheet.scss +23 -37
  485. package/src/sass/components/_skeleton.scss +2 -4
  486. package/src/sass/components/_snackbar.scss +27 -21
  487. package/src/sass/components/_split-button.scss +5 -5
  488. package/src/sass/components/_stat.scss +3 -8
  489. package/src/sass/components/_stepper.scss +1 -1
  490. package/src/sass/components/_swipe-actions.scss +71 -0
  491. package/src/sass/components/_tabs.scss +51 -32
  492. package/src/sass/components/_timeline.scss +12 -12
  493. package/src/sass/components/_timepicker.scss +109 -78
  494. package/src/sass/components/_toolbar.scss +35 -43
  495. package/src/sass/components/_tooltip.scss +21 -12
  496. package/src/sass/components/_tour.scss +89 -0
  497. package/src/sass/components/_transfer-list.scss +73 -0
  498. package/src/sass/components/_transitions.scss +4 -4
  499. package/src/sass/components/_tree.scss +3 -16
  500. package/src/sass/components/_treemap-chart.scss +122 -0
  501. package/src/sass/components/forms/_checkboxes.scss +106 -24
  502. package/src/sass/components/forms/_color-picker.scss +135 -0
  503. package/src/sass/components/forms/_color-swatches.scss +85 -0
  504. package/src/sass/components/forms/_drop-zone.scss +15 -9
  505. package/src/sass/components/forms/_fieldset.scss +7 -7
  506. package/src/sass/components/forms/_file-input.scss +6 -8
  507. package/src/sass/components/forms/_index.scss +3 -1
  508. package/src/sass/components/forms/_input-fields.scss +254 -90
  509. package/src/sass/components/forms/_radio-buttons.scss +33 -94
  510. package/src/sass/components/forms/_rating.scss +2 -32
  511. package/src/sass/components/forms/_select.scss +199 -20
  512. package/src/sass/components/forms/_slider.scss +91 -94
  513. package/src/sass/components/forms/_switches.scss +53 -164
  514. package/src/sass/custom.scss +10 -1
  515. package/src/sass/expressive.scss +3 -63
  516. package/src/sass/tokens/_contrast.scss +94 -0
  517. package/src/sass/tokens/_elevation.scss +16 -0
  518. package/src/sass/tokens/_index.scss +5 -0
  519. package/src/sass/tokens/_motion.scss +109 -0
  520. package/src/sass/tokens/_reference.scss +72 -141
  521. package/src/sass/tokens/_shape.scss +38 -0
  522. package/src/sass/tokens/_stacking.scss +27 -0
  523. package/src/sass/tokens/_state.scss +0 -2
  524. package/src/sass/tokens/_theme.scss +10 -1
  525. package/src/sass/tokens/_vibrant.scss +2 -5
  526. package/src/sass/utilities/_defer-render.scss +17 -0
  527. package/src/sass/utilities/_helpers.scss +183 -26
  528. package/src/sass/utilities/_index.scss +1 -0
  529. package/src/sass/utilities/_scroll-area.scss +0 -2
  530. package/src/sass/utilities/_spacing.scss +52 -34
  531. package/src/sass/utilities/_typescale.scss +8 -1
  532. package/src/sass/utilities/_visibility.scss +47 -76
  533. package/src/sass/utilities/_z-depth.scss +7 -4
  534. package/dist/js/chunks/chunk-33QVDDGR.mjs +0 -270
  535. package/dist/js/chunks/chunk-33QVDDGR.mjs.map +0 -7
  536. package/dist/js/chunks/chunk-45FER6RI.mjs +0 -59
  537. package/dist/js/chunks/chunk-45FER6RI.mjs.map +0 -7
  538. package/dist/js/chunks/chunk-5CEAOLUA.mjs.map +0 -7
  539. package/dist/js/chunks/chunk-6VATUZC6.mjs +0 -295
  540. package/dist/js/chunks/chunk-6VATUZC6.mjs.map +0 -7
  541. package/dist/js/chunks/chunk-74MXKKLN.mjs.map +0 -7
  542. package/dist/js/chunks/chunk-AIURVCG6.mjs +0 -55
  543. package/dist/js/chunks/chunk-AIURVCG6.mjs.map +0 -7
  544. package/dist/js/chunks/chunk-BGZLF6JZ.mjs.map +0 -7
  545. package/dist/js/chunks/chunk-C6CHEWYP.mjs.map +0 -7
  546. package/dist/js/chunks/chunk-CK2XCICY.mjs.map +0 -7
  547. package/dist/js/chunks/chunk-CXXM2L4F.mjs +0 -344
  548. package/dist/js/chunks/chunk-CXXM2L4F.mjs.map +0 -7
  549. package/dist/js/chunks/chunk-DXGRXYYL.mjs.map +0 -7
  550. package/dist/js/chunks/chunk-FM5CZOUB.mjs.map +0 -7
  551. package/dist/js/chunks/chunk-GJL6GCIU.mjs.map +0 -7
  552. package/dist/js/chunks/chunk-K3HZMFMD.mjs +0 -135
  553. package/dist/js/chunks/chunk-K3HZMFMD.mjs.map +0 -7
  554. package/dist/js/chunks/chunk-KHXZ2A4K.mjs.map +0 -7
  555. package/dist/js/chunks/chunk-KQACNQ22.mjs +0 -7
  556. package/dist/js/chunks/chunk-KQACNQ22.mjs.map +0 -7
  557. package/dist/js/chunks/chunk-KUFHW3DS.mjs.map +0 -7
  558. package/dist/js/chunks/chunk-KVJAVDBC.mjs.map +0 -7
  559. package/dist/js/chunks/chunk-L27Q6ZMI.mjs.map +0 -7
  560. package/dist/js/chunks/chunk-LQWUDNHZ.mjs.map +0 -7
  561. package/dist/js/chunks/chunk-M372EDXD.mjs +0 -322
  562. package/dist/js/chunks/chunk-M372EDXD.mjs.map +0 -7
  563. package/dist/js/chunks/chunk-M3MURWMB.mjs +0 -82
  564. package/dist/js/chunks/chunk-M3MURWMB.mjs.map +0 -7
  565. package/dist/js/chunks/chunk-NUHMOAOY.mjs.map +0 -7
  566. package/dist/js/chunks/chunk-OWG3LMUL.mjs +0 -169
  567. package/dist/js/chunks/chunk-OWG3LMUL.mjs.map +0 -7
  568. package/dist/js/chunks/chunk-PD6HYHAE.mjs +0 -48
  569. package/dist/js/chunks/chunk-PD6HYHAE.mjs.map +0 -7
  570. package/dist/js/chunks/chunk-PDG64UHF.mjs.map +0 -7
  571. package/dist/js/chunks/chunk-PO3AXVR3.mjs +0 -546
  572. package/dist/js/chunks/chunk-PO3AXVR3.mjs.map +0 -7
  573. package/dist/js/chunks/chunk-QYGK36OG.mjs +0 -181
  574. package/dist/js/chunks/chunk-QYGK36OG.mjs.map +0 -7
  575. package/dist/js/chunks/chunk-SFI2U4YW.mjs.map +0 -7
  576. package/dist/js/chunks/chunk-SMY7GJSS.mjs.map +0 -7
  577. package/dist/js/chunks/chunk-TCCA2HDG.mjs +0 -414
  578. package/dist/js/chunks/chunk-TCCA2HDG.mjs.map +0 -7
  579. package/dist/js/chunks/chunk-TSZYSW7F.mjs.map +0 -7
  580. package/dist/js/chunks/chunk-UAZSDUVP.mjs.map +0 -7
  581. package/dist/js/chunks/chunk-UBRZZWRA.mjs +0 -127
  582. package/dist/js/chunks/chunk-UBRZZWRA.mjs.map +0 -7
  583. package/dist/js/chunks/chunk-UCOE7ZDL.mjs +0 -287
  584. package/dist/js/chunks/chunk-UCOE7ZDL.mjs.map +0 -7
  585. package/dist/js/chunks/chunk-UETTGDLI.mjs.map +0 -7
  586. package/dist/js/chunks/chunk-UNCRDLP6.mjs +0 -136
  587. package/dist/js/chunks/chunk-UNCRDLP6.mjs.map +0 -7
  588. package/dist/js/chunks/chunk-VGNYF6FB.mjs.map +0 -7
  589. package/dist/js/chunks/chunk-VGPGBNGL.mjs +0 -68
  590. package/dist/js/chunks/chunk-VGPGBNGL.mjs.map +0 -7
  591. package/dist/js/chunks/chunk-VKAUVTQY.mjs +0 -1
  592. package/dist/js/chunks/chunk-VM4FTS7L.mjs +0 -48
  593. package/dist/js/chunks/chunk-VM4FTS7L.mjs.map +0 -7
  594. package/dist/js/chunks/chunk-WDK4T63U.mjs.map +0 -7
  595. package/dist/js/chunks/chunk-WOCCTVUF.mjs +0 -185
  596. package/dist/js/chunks/chunk-WOCCTVUF.mjs.map +0 -7
  597. package/dist/js/chunks/chunk-WQYN5L4E.mjs +0 -107
  598. package/dist/js/chunks/chunk-WQYN5L4E.mjs.map +0 -7
  599. package/dist/js/chunks/chunk-X4ISMKE2.mjs.map +0 -7
  600. package/dist/js/chunks/chunk-XAEAEHIX.mjs.map +0 -7
  601. package/dist/js/chunks/chunk-ZX6M7SWO.mjs.map +0 -7
  602. /package/dist/js/chunks/{chunk-VKAUVTQY.mjs.map → chunk-GNRSYMVH.mjs.map} +0 -0
@@ -1,36 +1,34 @@
1
- var Expressive=(()=>{var qt=Object.defineProperty;var He=Object.getOwnPropertyDescriptor;var De=Object.getOwnPropertyNames;var Pe=Object.prototype.hasOwnProperty;var Re=(d,n)=>{for(var t in n)qt(d,t,{get:n[t],enumerable:!0})},Be=(d,n,t,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of De(n))!Pe.call(d,i)&&i!==t&&qt(d,i,{get:()=>n[i],enumerable:!(e=He(n,i))||e.enumerable});return d};var Ne=d=>Be(qt({},"__esModule",{value:!0}),d);var $i={};Re($i,{AppBar:()=>et,AutoInit:()=>xe,Autocomplete:()=>V,BarChart:()=>ht,BottomSheets:()=>Q,ButtonGroup:()=>st,Cards:()=>q,Carousel:()=>U,CharacterCounter:()=>At,Chips:()=>K,ColumnChart:()=>W,CommandPalette:()=>at,Confetti:()=>nt,Datepicker:()=>gt,Dialogs:()=>Z,ExpandingCard:()=>z,FloatingActionButton:()=>it,FormSelect:()=>D,Forms:()=>tt,HeatmapChart:()=>ut,Keypad:()=>rt,Lightbox:()=>Et,LineChart:()=>k,MapView:()=>Nt,Menu:()=>F,MessageScroller:()=>_t,MixedChart:()=>ft,NavigationRail:()=>yt,Particles:()=>ot,PieChart:()=>dt,Questionnaire:()=>lt,RadarChart:()=>pt,RadialChart:()=>mt,Range:()=>j,RichTextEditor:()=>Bt,ScrollSpy:()=>bt,SideSheets:()=>J,Slider:()=>j,Snackbar:()=>Ft,Tabs:()=>Lt,Timepicker:()=>Tt,Tooltip:()=>Mt,version:()=>Wi});var P=class P{static onDocumentReady(n){typeof document>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n,{once:!0}):n())}static guid(){return globalThis.crypto?.randomUUID?.()??`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}static portalRoot(n){let t=n.getRootNode();return t.host?t:document.body}static getElementById(n,t){let e=n.getRootNode();return e.getElementById?e.getElementById(t):document.getElementById(t)}static checkWithinContainer(n,t,e){let i={top:!1,right:!1,bottom:!1,left:!1},s=n.getBoundingClientRect(),o=n===document.body?Math.max(s.bottom,window.innerHeight):s.bottom,a=n.scrollLeft,r=n.scrollTop,h=t.left-a,c=t.top-r;return(h<s.left+e||h<e)&&(i.left=!0),(h+t.width>s.right-e||h+t.width>window.innerWidth-e)&&(i.right=!0),(c<s.top+e||c<e)&&(i.top=!0),(c+t.height>o-e||c+t.height>window.innerHeight-e)&&(i.bottom=!0),i}static checkPossibleAlignments(n,t,e,i){let s={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},o=getComputedStyle(t).overflow==="visible",a=t.getBoundingClientRect(),r=Math.min(a.height,window.innerHeight),h=Math.min(a.width,window.innerWidth),c=n.getBoundingClientRect(),l=t.scrollLeft,u=t.scrollTop,f=e.left-l,p=e.top-u,v=e.top+c.height-u;return s.spaceOnRight=o?window.innerWidth-(c.left+e.width):h-(f+e.width),s.spaceOnRight<0&&(s.left=!1),s.spaceOnLeft=o?c.right-e.width:f-e.width+c.width,s.spaceOnLeft<0&&(s.right=!1),s.spaceOnBottom=o?window.innerHeight-(c.top+e.height+i):r-(p+e.height+i),s.spaceOnBottom<0&&(s.top=!1),s.spaceOnTop=o?c.bottom-(e.height+i):v-(e.height-i),s.spaceOnTop<0&&(s.bottom=!1),s}static getIdFromTrigger(n){return n.dataset.target||(n.getAttribute("href")?.slice(1)??"")}static getDocumentScrollTop(){return window.scrollY}static getDocumentScrollLeft(){return window.scrollX}static throttle(n,t){let e=null,i=null,s=-1/0;return(...o)=>{let a=performance.now(),r=t-(a-s);r<=0?(clearTimeout(e),e=null,s=a,i=null,n(...o)):e?i=o:(i=o,e=setTimeout(()=>{s=performance.now(),e=null,n(...i??[]),i=null},r))}}static createConfirmationContainer(n,t,e,i,s){let o=document.createElement("div");o.classList.add("confirmation-btns"),n.append(o),this.createButton(o,e,["btn-cancel"],!0,s),this.createButton(o,t,["btn-confirm"],!0,i)}static createButton(n,t,e=[],i=!0,s=null){let o=document.createElement("button");o.className=e.concat(["text"]).join(" "),o.style.visibility=i?"visible":"hidden",o.type="button",o.tabIndex=i?0:-1,o.innerText=t,typeof s=="function"&&o.addEventListener("click",s),n.append(o)}static _setAbsolutePosition(n,t,e,i,s,o="center"){let a=n.offsetHeight,r=n.offsetWidth,h=t.offsetHeight,c=t.offsetWidth,l=n.getBoundingClientRect(),u=0,f=0,p=l.top+P.getDocumentScrollTop(),v=l.left+P.getDocumentScrollLeft();e==="top"?(p+=-h-i,o==="center"&&(v+=r/2-c/2),f=-s):e==="right"?(p+=a/2-h/2,v=r+i,u=s):e==="left"?(p+=a/2-h/2,v=-c-i,u=-s):(p+=a+i,o==="center"&&(v+=r/2-c/2),f=s),o==="right"&&(v+=r-c-i);let g=P._repositionWithinScreen(v,p,c,h,i,s,o),L=t.offsetParent;if(L&&(L!==document.body||getComputedStyle(L).position!=="static")){let y=L.getBoundingClientRect(),S=L===document.scrollingElement;g.x-=y.left+P.getDocumentScrollLeft()+L.clientLeft-(S?0:L.scrollLeft),g.y-=y.top+P.getDocumentScrollTop()+L.clientTop-(S?0:L.scrollTop)}return t.style.top=g.y+"px",t.style.left=g.x+"px",{x:u,y:f}}static _repositionWithinScreen(n,t,e,i,s,o,a){let r=P.getDocumentScrollLeft(),h=P.getDocumentScrollTop(),c=n-r,l=t-h,u={left:c,top:l,width:e,height:i},f;a==="left"||a=="center"?f=s+o:a==="right"&&(f=s-o);let p=P.checkWithinContainer(document.body,u,f);return p.left?c=f:p.right&&(c-=c+e-window.innerWidth),p.top?l=f:p.bottom&&(l-=l+i-window.innerHeight),{x:c+r,y:l+h}}};P.keys={TAB:"Tab",ENTER:"Enter",ESC:"Escape",BACKSPACE:"Backspace",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",DELETE:"Delete"};var m=P;var E=class{constructor(n,t,e){n instanceof HTMLElement||console.error(Error(n+" is not an HTML Element")),e.getInstance(n)?.destroy(),this.el=n}static init(n,t,e){return n instanceof Element?new e(n,t):n?Array.from(n,i=>new e(i,t)):null}static get defaults(){return{}}static getInstance(n){throw new Error("This method must be implemented.")}destroy(){throw new Error("This method must be implemented.")}};var Fe={onOpen:null,onClose:null},Kt='article:has(> aside[id]:not([id=""])):not(:has(> aside ~ aside)):has(> button.card-reveal-trigger[type="button"], > :not(aside) button.card-reveal-trigger[type="button"])',zt="card-reveal-initialized";function We(d){if(d.getAttribute("aria-label")?.trim())return!0;let t=d.getAttribute("aria-labelledby");if(t&&t.trim().split(/\s+/).map(s=>d.ownerDocument.getElementById(s)?.textContent??"").join(" ").trim())return!0;let e=d.cloneNode(!0);return e.querySelectorAll('[aria-hidden="true"]').forEach(i=>i.remove()),!!e.textContent?.trim()}function Zt(d,n,t){return d.closest("article")===n&&!t.contains(d)&&!d.disabled&&d.getAttribute("aria-disabled")!=="true"&&We(d)}function Ut(d){if(d.tagName!=="ARTICLE")return!1;let n=d.querySelectorAll(":scope > aside");return n.length!==1||!n[0].id?!1:Array.from(d.querySelectorAll('button.card-reveal-trigger[type="button"]')).some(t=>Zt(t,d,n[0]))}var q=class d extends E{constructor(t,e={}){super(t,e,d);this.isOpen=!1;this._ownsRevealInitializedClass=!1;this._initialAriaControls=new Map;this._lastActivator=null;this._setupEventHandlers=()=>{this._activators.forEach(t=>{t.addEventListener("click",this._handleClickInteraction)}),this.el.addEventListener("keydown",this._handleKeydownEvent)};this._removeEventHandlers=()=>{this._activators.forEach(t=>{t.removeEventListener("click",this._handleClickInteraction)}),this.el.removeEventListener("keydown",this._handleKeydownEvent)};this._handleClickInteraction=t=>{this._lastActivator=t.currentTarget,this._handleRevealEvent()};this._handleKeydownEvent=t=>{(t.target instanceof Element?t.target.closest("article"):null)!==this.el||t.key!=="Escape"||!this.isOpen||(t.preventDefault(),this.close())};this._handleRevealEvent=()=>{this.isOpen?this.close():this.open()};this.open=()=>{this.isOpen||!this.cardReveal||(this.isOpen=!0,this.cardReveal.classList.add("open"),this.cardReveal.inert=!1,this._activators.forEach(t=>t.ariaExpanded="true"),typeof this.options.onOpen=="function"&&this.options.onOpen.call(this,this.el))};this.close=()=>{if(!this.isOpen||!this.cardReveal)return;let t=this.cardReveal.contains(document.activeElement);this.isOpen=!1,this.cardReveal.classList.remove("open"),this.cardReveal.inert=!0,this._activators.forEach(e=>e.ariaExpanded="false"),typeof this.options.onClose=="function"&&this.options.onClose.call(this,this.el),t&&(this._lastActivator??this._activators[0])?.focus()};this.el.Expressive_Cards=this,this.options={...d.defaults,...e};let i=this.el.querySelectorAll(":scope > aside"),s=i.length===1?i[0]:null,o=s?Array.from(this.el.querySelectorAll('button.card-reveal-trigger[type="button"]')).filter(a=>Zt(a,this.el,s)):[];this.cardReveal=s?.id&&o.length>0?s:null,this._activators=this.cardReveal?o:[],this.cardReveal&&(this._ownsRevealInitializedClass=!this.el.classList.contains(zt),this.el.classList.add(zt),this._activators.forEach(a=>{this._initialAriaControls.set(a,a.getAttribute("aria-controls")),a.ariaExpanded="false",a.setAttribute("aria-controls",this.cardReveal.id)}),this.cardReveal.classList.remove("open"),this.cardReveal.inert=!0,this._setupEventHandlers())}static get defaults(){return Fe}static init(t,e){return super.init(t,e,d)}static getInstance(t){return t.Expressive_Cards}destroy(){this._removeEventHandlers(),this.cardReveal&&(this.cardReveal.classList.remove("open"),this.cardReveal.inert=!1,this._ownsRevealInitializedClass&&this.el.classList.remove(zt)),this._activators.forEach(t=>{t.removeAttribute("aria-expanded");let e=this._initialAriaControls.get(t);e===null?t.removeAttribute("aria-controls"):e!==void 0&&t.setAttribute("aria-controls",e)}),this.isOpen=!1,this._activators=[],this._initialAriaControls.clear(),this._lastActivator=null,this.el.Expressive_Cards=void 0}static Init(){m.onDocumentReady(()=>{Array.from(document.querySelectorAll(Kt)).filter(Ut).forEach(e=>{e.Expressive_Cards==null&&this.init(e)})})}};var $e={onOpen:null,onClose:null},Yt="article.expanding-card:has(> dialog.expanding-card-dialog)",z=class d extends E{constructor(t,e){super(t,e,d);this.isOpen=!1;this.closeGeneration=0;this._setupEventHandlers=()=>{this.trigger?.addEventListener("click",this.open),this.trigger?.addEventListener("keypress",this._handleTriggerKeypress),this.closeButton?.addEventListener("click",this.close),this.dialog?.addEventListener("cancel",this._handleCancel),this.dialog?.addEventListener("close",this._handleNativeClose)};this._removeEventHandlers=()=>{this.trigger?.removeEventListener("click",this.open),this.trigger?.removeEventListener("keypress",this._handleTriggerKeypress),this.closeButton?.removeEventListener("click",this.close),this.dialog?.removeEventListener("cancel",this._handleCancel),this.dialog?.removeEventListener("close",this._handleNativeClose)};this._handleTriggerKeypress=t=>{(t.key===m.keys.ENTER||t.key===" ")&&(t.preventDefault(),this.open())};this._handleCancel=t=>{t.preventDefault(),this.close()};this._handleNativeClose=()=>{this.dialog.open||this._collapse()};this._setTransitionOrigin=()=>{if(!this.dialog)return;let t=this.el.getBoundingClientRect(),i=this.el.querySelector(":scope > figure, :scope > img")?.getBoundingClientRect(),s=(o,a)=>this.dialog.style.setProperty(`--md-comp-expanding-card-from-${o}`,`${Math.max(0,a)}px`);s("top",t.top),s("right",window.innerWidth-t.right),s("bottom",window.innerHeight-t.bottom),s("left",t.left),s("media-height",i?.height??0)};this.open=()=>{this.isOpen||!this.dialog||!this.trigger||(this.closeGeneration++,this._setTransitionOrigin(),this.isOpen=!0,this.trigger.ariaExpanded="true",this.dialog.ariaExpanded="true",this.dialog.showModal(),this.dialog.offsetWidth,this.dialog.classList.add("expanded"),this.closeButton?.focus(),typeof this.options.onOpen=="function"&&this.options.onOpen.call(this,this.el))};this.close=()=>{if(!this.isOpen||!this.dialog||!this.trigger)return;this._setTransitionOrigin(),this._collapse();let t=this.closeGeneration;typeof this.options.onClose=="function"&&this.options.onClose.call(this,this.el);let e=()=>{t!==this.closeGeneration||this.isOpen||!this.dialog.open||(this.dialog.close(),this.dialog.isConnected&&this.trigger.isConnected&&this.trigger.focus())},s=window.matchMedia("(prefers-reduced-motion: reduce)").matches?[]:(this.dialog.getAnimations?.()??[]).filter(o=>o.transitionProperty==="clip-path");s.length===0?e():Promise.allSettled(s.map(o=>o.finished)).then(e)};this.el.Expressive_ExpandingCard=this,this.options={...d.defaults,...e},this.dialog=this.el.querySelector(":scope > dialog.expanding-card-dialog"),this.trigger=this.el.querySelector(":scope > .expanding-card-trigger, :scope > figure > .expanding-card-trigger"),this.closeButton=this.dialog?.querySelector(".expanding-card-close")??null,this.trigger&&this.dialog&&(this.trigger.ariaExpanded="false",this.dialog.id&&this.trigger.setAttribute("aria-controls",this.dialog.id),this.trigger.matches("a[href], button, input, select, textarea")||(this.trigger.tabIndex=0,this.trigger.setAttribute("role","button")),this.dialog.ariaExpanded="false",this._setupEventHandlers())}static get defaults(){return $e}static init(t,e){return super.init(t,e,d)}static getInstance(t){return t.Expressive_ExpandingCard}destroy(){this._removeEventHandlers(),this._collapse(),this.dialog?.open&&this.dialog.close(),this.el.Expressive_ExpandingCard=void 0}_collapse(){this.closeGeneration++,this.isOpen=!1,this.trigger&&(this.trigger.ariaExpanded="false"),this.dialog&&(this.dialog.ariaExpanded="false",this.dialog.classList.remove("expanded"))}static Init(){m.onDocumentReady(()=>{document.querySelectorAll(Yt).forEach(t=>{t.Expressive_ExpandingCard==null&&this.init(t)})})}};var Qt=112,Ve=280,qe={alignment:"left",autoFocus:!0,constrainWidth:!0,container:null,coverTrigger:!1,closeOnClick:!0,hover:!1,contextMenu:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onItemClick:null},jt=" ",N=class N extends E{constructor(t,e){super(t,e,N);this._pendingTimers=new Set;this._transition=0;this._menuClickTargets=new WeakMap;this._contextPoint=null;this._contextReturn=null;this._handleContextMenu=t=>{if(t.defaultPrevented){this.close();return}let e=t.composedPath();if(N._menus.some(o=>o!==this&&o.isOpen&&e.includes(o.menuEl)))return;if(t.preventDefault(),!this.isOpen){let o=this.el.getRootNode();this._contextReturn=o.activeElement instanceof HTMLElement?o.activeElement:null}let i=this.el.getBoundingClientRect(),s=(t.clientX!==0||t.clientY!==0)&&t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom;this._contextPoint=s?{x:t.clientX,y:t.clientY}:null,this.isOpen?this.recalculateDimensions():this.open()};this._handleDocumentContextMenu=t=>{let e=t.composedPath();if(e.includes(this.menuEl)){t.preventDefault();return}e.includes(this.el)||this.close()};this._handleClick=t=>{t.preventDefault(),this.isOpen?this.close():this.open()};this._handleMouseEnter=()=>{this.open()};this._handleMouseLeave=t=>{let e=t.relatedTarget;if(!e){this.close();return}!e.closest(".menu-trigger")?.Expressive_Menu?.isOpen&&!this.menuEl?.contains(e)&&this.close()};this._handleDocumentClick=t=>{let e=t.composedPath(),i=this._menuClickTargets.get(t);this._menuClickTargets.delete(t);let s=i??(e[0]||t.target),o=!!i||e.includes(this.menuEl)||this.menuEl?.contains(s);this._isSubmenuTriggerClick(s)||(this.options.closeOnClick&&o&&!this.isTouchMoving?this.close():o||this._schedule(()=>this.close(),0),this.isTouchMoving=!1)};this._handleTriggerKeydown=t=>{if(this.options.contextMenu)return;(t.key===jt||t.key===m.keys.ENTER||t.key===m.keys.ARROW_DOWN||t.key===m.keys.ARROW_UP)&&!this.isOpen&&(t.preventDefault(),this.open())};this._handleDocumentTouchmove=t=>{let e=t.target;(t.composedPath().includes(this.menuEl)||this.menuEl?.contains(e))&&(this.isTouchMoving=!0)};this._handleMenuClick=t=>{let e=t.target;this._menuClickTargets.set(t,e);let i=e.closest("li");if(i?.matches('.disabled, [aria-disabled="true"]')){t.preventDefault(),t.stopPropagation();return}if(i&&this._isSubmenuTriggerClick(e)){t.preventDefault(),t.stopPropagation(),this._toggleSubmenu(i);return}i&&typeof this.options.onItemClick=="function"&&this.options.onItemClick.call(this,i)};this._handleSubmenuAlign=t=>{let e=t.target;if(!(e instanceof Element))return;let i=e.closest("li");i?.querySelector(":scope > menu")&&this.menuEl?.contains(i)&&this._alignSubmenu(i)};this._handleMenuKeydown=t=>{if(!this.isOpen||t.ctrlKey||t.metaKey||t.altKey||t.isComposing)return;let e=this._containingSubmenu(t)??this.menuEl,i=getComputedStyle(e).direction==="rtl",s=i?m.keys.ARROW_LEFT:m.keys.ARROW_RIGHT,o=i?m.keys.ARROW_RIGHT:m.keys.ARROW_LEFT;[s,o,m.keys.ARROW_UP,m.keys.ARROW_DOWN,m.keys.ESC,m.keys.TAB].includes(t.key)&&(clearTimeout(this.filterTimeout),this._resetFilterQuery());let a=t.key===m.keys.ARROW_DOWN||t.key===m.keys.ARROW_UP;if(t.key===m.keys.TAB)t.preventDefault(),this.close();else if(t.key===s){let h=this._focusedRow(t);if(h?.querySelector(":scope > menu")&&!h.matches('.disabled, [aria-disabled="true"]')){t.preventDefault(),h.classList.add("open"),this._alignSubmenu(h),this._syncSubmenuAria(h,!0);let c=Array.from(h.querySelector(":scope > menu").children).find(l=>l instanceof HTMLElement&&l.tabIndex!==-1);c&&this._focusRow(c)}}else if(t.key===o){let h=this._containingSubmenu(t);if(h){t.preventDefault();let c=h.parentElement;this._closeSubmenu(c),this._focusRow(c)}}else if(a){t.preventDefault();let h=t.key===m.keys.ARROW_DOWN?1:-1,c=this._focusedRow(t),l=c?Array.from(e.children).indexOf(c):this.focusedIndex,u=!1;do if(l=l+h,e.children[l]&&e.children[l].tabIndex!==-1){u=!0;break}while(l<e.children.length&&l>=0);if(u){this.focusedIndex>=0&&e.children[this.focusedIndex]?.classList.remove("active");let f=e.children[l];f.classList.add("active"),this._focusRow(f)}}else if(t.key===m.keys.ENTER||t.key===jt){let h=this._focusedRow(t);if(t.preventDefault(),h?.matches('.disabled, [aria-disabled="true"]'))return;if(h?.querySelector(":scope > menu")){this._toggleSubmenu(h);return}let c=h??this.menuEl.children[this.focusedIndex],l=c?.querySelector(":scope > a, :scope > button");l?l.click():c instanceof HTMLElement&&c.click()}else if(t.key===m.keys.ESC){t.preventDefault();let h=this._containingSubmenu(t)?.parentElement??Array.from(this.menuEl.querySelectorAll("li.open")).reverse()[0];h?(this._closeSubmenu(h),this._focusRow(h)):this.close()}let r=t.key.toLowerCase();if(t.key.length===1&&t.key!==jt){this.filterQuery.push(r);let h=this.filterQuery.join(""),c=Array.from(e.querySelectorAll(":scope > li")).find(l=>l.tabIndex!==-1&&!l.matches('.disabled, [aria-disabled="true"]')&&Array.from(l.childNodes).filter(u=>!(u instanceof Element&&u.matches("menu"))).map(u=>u.textContent).join("").trim().toLowerCase().startsWith(h));c&&this._focusRow(c),clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(this._resetFilterQuery,1e3)}};this._handleWindowResize=()=>{this.el.offsetParent&&this.recalculateDimensions()};this._resetFilterQuery=()=>{this.filterQuery=[]};this.open=()=>{if(this.isOpen||this.el.Expressive_Menu!==this)return;let t=this._clearPendingTimers();this.isOpen=!0,typeof this.options.onOpenStart=="function"&&this.options.onOpenStart.call(this,this.el),t===this._transition&&(this._resetMenuStyles(),this.menuEl.style.display="block",this._restoreInert(),this._placeMenu(),this._schedule(()=>this._setupTemporaryEventHandlers(),0),this._animateIn(),this._setExpanded(!0))};this.close=()=>{if(!this.isOpen)return;let t=this._clearPendingTimers(),e=this.menuEl.getRootNode(),i=e.activeElement;if(this.isOpen=!1,this.menuEl.setAttribute("inert",""),clearTimeout(this.filterTimeout),this._resetFilterQuery(),this.focusedIndex=-1,this._closeSubmenus(),typeof this.options.onCloseStart=="function"&&this.options.onCloseStart.call(this,this.el),t===this._transition){if(this._animateOut(),this._removeTemporaryEventHandlers(),this._setExpanded(!1),this.options.autoFocus&&this.menuEl.contains(i)&&(e.activeElement===i||this.el.ownerDocument.activeElement===this.el.ownerDocument.body)){let s=this._contextReturn;(s?.isConnected&&s!==this.el.ownerDocument.body?s:this.el).focus()}this._contextReturn=null,this._contextPoint=null}};this.recalculateDimensions=()=>{this.isOpen&&(this._resetMenuPositioningStyles(),this._placeMenu())};this.el.Expressive_Menu=this,N._menus.push(this),this.id=m.getIdFromTrigger(t),this.menuEl=m.getElementById(t,this.id),this._originalInert=this.menuEl?.getAttribute("inert")??null,this.options={...N.defaults,contextMenu:t.hasAttribute("data-context-menu"),...e},this.isOpen=!1,this.isScrollable=!1,this.isTouchMoving=!1,this.focusedIndex=-1,this.filterQuery=[],this.options.contextMenu||(this.el.ariaExpanded="false",this.el.hasAttribute("aria-haspopup")||this.el.setAttribute("aria-haspopup","menu"),this.id&&!this.el.hasAttribute("aria-controls")&&this.el.setAttribute("aria-controls",this.id)),this._moveMenuToElement(),this._setupAccessibility(),this._makeMenuFocusable(),this._setupSubmenus(),this._setupEventHandlers()}static get defaults(){return qe}static init(t,e={}){return super.init(t,e,N)}static getInstance(t){return t.Expressive_Menu}destroy(){this._clearPendingTimers(),this.isOpen=!1,this._setExpanded(!1),clearTimeout(this.filterTimeout),this._resetMenuStyles(),this._restoreInert(),this._removeEventHandlers(),this._removeTemporaryEventHandlers();let t=N._menus.indexOf(this);t>=0&&N._menus.splice(t,1),this.el.Expressive_Menu=void 0}_setupEventHandlers(){this.el.addEventListener("keydown",this._handleTriggerKeydown),this.menuEl?.addEventListener("click",this._handleMenuClick),this.menuEl?.querySelector(":scope > li > menu")&&this.menuEl.addEventListener("mouseover",this._handleSubmenuAlign),this.options.contextMenu?this.el.addEventListener("contextmenu",this._handleContextMenu):this.options.hover?(this.el.addEventListener("mouseenter",this._handleMouseEnter),this.el.addEventListener("mouseleave",this._handleMouseLeave),this.menuEl.addEventListener("mouseleave",this._handleMouseLeave)):this.el.addEventListener("click",this._handleClick)}_removeEventHandlers(){this.el.removeEventListener("keydown",this._handleTriggerKeydown),this.menuEl?.removeEventListener("click",this._handleMenuClick),this.menuEl?.removeEventListener("mouseover",this._handleSubmenuAlign),this.options.contextMenu?this.el.removeEventListener("contextmenu",this._handleContextMenu):this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnter),this.el.removeEventListener("mouseleave",this._handleMouseLeave),this.menuEl?.removeEventListener("mouseleave",this._handleMouseLeave)):this.el.removeEventListener("click",this._handleClick)}_setupTemporaryEventHandlers(){document.body.addEventListener("click",this._handleDocumentClick),this.menuEl?.addEventListener("touchmove",this._handleDocumentTouchmove,{passive:!0}),document.body.addEventListener("touchmove",this._handleDocumentTouchmove,{passive:!0}),this.menuEl?.addEventListener("keydown",this._handleMenuKeydown),window.addEventListener("resize",this._handleWindowResize),this.options.contextMenu&&document.addEventListener("contextmenu",this._handleDocumentContextMenu)}_removeTemporaryEventHandlers(){document.body.removeEventListener("click",this._handleDocumentClick),this.menuEl?.removeEventListener("touchmove",this._handleDocumentTouchmove),document.body.removeEventListener("touchmove",this._handleDocumentTouchmove),this.menuEl?.removeEventListener("keydown",this._handleMenuKeydown),window.removeEventListener("resize",this._handleWindowResize),document.removeEventListener("contextmenu",this._handleDocumentContextMenu)}_setupAccessibility(){if(!this.menuEl)return;this.menuEl.hasAttribute("role")||this.menuEl.setAttribute("role","menu"),[this.menuEl,...this.menuEl.querySelectorAll("menu")].forEach(e=>{e.hasAttribute("role")||e.setAttribute("role","menu"),e.getAttribute("role")==="menu"&&e.querySelectorAll(":scope > li").forEach(i=>{if(i.classList.contains("divider")){i.hasAttribute("role")||i.setAttribute("role","separator");return}if(i.classList.contains("gap")){i.setAttribute("aria-hidden","true");return}if(i.classList.contains("label")||i.classList.contains("optgroup")){i.hasAttribute("role")||i.setAttribute("role","presentation");return}i.hasAttribute("role")||i.setAttribute("role","menuitem"),i.classList.contains("disabled")&&!i.hasAttribute("aria-disabled")&&i.setAttribute("aria-disabled","true")})})}_isSubmenuTriggerClick(t){if(!this.menuEl)return!1;let e=t.closest("li");if(!e||!this.menuEl.contains(e))return!1;let i=e.querySelector(":scope > menu");return i?!i.contains(t):!1}_setupSubmenus(){this.menuEl?.querySelectorAll("li").forEach(t=>{if(!t.querySelector(":scope > menu"))return;let e=t.querySelector(":scope > a, :scope > button, :scope > span")??t;e.setAttribute("aria-haspopup","menu"),e.setAttribute("aria-expanded","false")})}_toggleSubmenu(t){let e=!t.classList.contains("open");t.parentElement?.querySelectorAll(":scope > li.open").forEach(i=>{i!==t&&this._closeSubmenu(i)}),t.classList.toggle("open",e),e&&this._alignSubmenu(t),this._syncSubmenuAria(t,e)}_syncSubmenuAria(t,e){(t.querySelector(":scope > a, :scope > button, :scope > span")??t).setAttribute("aria-expanded",e?"true":"false")}_alignSubmenu(t){let e=t.querySelector(":scope > menu");if(!e)return;t.classList.remove("submenu-start");let i=e.getBoundingClientRect();(i.left<8||i.right>window.innerWidth-8)&&t.classList.add("submenu-start")}_closeSubmenu(t){t.classList.remove("open","submenu-start"),this._syncSubmenuAria(t,!1)}_closeSubmenus(){this.menuEl?.querySelectorAll("li.open").forEach(t=>this._closeSubmenu(t))}_containingSubmenu(t){let e=t.target;if(!(e instanceof Element))return null;let i=e.closest("li > menu");return i instanceof HTMLElement&&this.menuEl?.contains(i)?i:null}_focusedRow(t){let e=t.target;if(!(e instanceof Element))return null;let i=e.closest("li");return i instanceof HTMLElement&&this.menuEl?.contains(i)?i:null}_restoreInert(){this._originalInert===null?this.menuEl?.removeAttribute("inert"):this.menuEl?.setAttribute("inert",this._originalInert)}_focusRow(t){this.focusedIndex=Array.from(t.parentElement.children).indexOf(t),t.focus({preventScroll:!0}),t.scrollIntoView({block:"nearest",inline:"nearest"})}_resetMenuStyles(){this.menuEl&&(this.menuEl.style.display="",this._resetMenuPositioningStyles(),this.menuEl.style.transform="",this.menuEl.style.opacity="")}_resetMenuPositioningStyles(){this.menuEl.style.width="",this.menuEl.style.height="",this.menuEl.style.left="",this.menuEl.style.top="",this.menuEl.style.transformOrigin=""}_moveMenuToElement(t=null){if(this.options.container){this.options.container.append(this.menuEl);return}if(t){t.contains(this.menuEl)||t.append(this.menuEl);return}this.el.after(this.menuEl)}_makeMenuFocusable(){this.menuEl&&(this.menuEl.popover="",this.menuEl.tabIndex=-1,this.menuEl.querySelectorAll(":scope li, :scope > hr").forEach(t=>{if(t instanceof HTMLHRElement||t.classList.contains("divider")||t.classList.contains("gap")||t.classList.contains("label")||t.classList.contains("optgroup")){t.setAttribute("tabindex","-1");return}t.getAttribute("tabindex")||t.setAttribute("tabindex","0")}))}_focusInitialItem(){if(!this.menuEl||!this.options.autoFocus)return;let t=Array.from(this.menuEl.children).find(e=>e instanceof HTMLElement&&e.tabIndex!==-1);t&&(this.focusedIndex=Array.from(this.menuEl.children).indexOf(t),t.focus({preventScroll:!0}))}_focusFocusedItem(){this.focusedIndex>=0&&this.focusedIndex<this.menuEl.children.length&&this.options.autoFocus&&(this.menuEl.children[this.focusedIndex].focus({preventScroll:!0}),this.menuEl.children[this.focusedIndex].scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}))}_getMenuPosition(t){let e=this.el.getBoundingClientRect(),i=this.menuEl.getBoundingClientRect(),s=i.height,o=i.width,a=e.left-i.left,r=e.top-i.top,h={left:a,top:r,height:s,width:o},c=m.checkPossibleAlignments(this.el,t,h,this.options.coverTrigger?0:e.height),l="top",u=this.options.alignment;if(r+=this.options.coverTrigger?0:e.height,this.isScrollable=!1,c.top||(c.bottom?(l="bottom",this.options.coverTrigger||(r-=e.height)):(this.isScrollable=!0,s-=20,c.spaceOnTop>c.spaceOnBottom?(l="bottom",s+=c.spaceOnTop,r-=this.options.coverTrigger?c.spaceOnTop-20:c.spaceOnTop-20+e.height):s+=c.spaceOnBottom)),!c[u]){let f=u==="left"?"right":"left";c[f]?u=f:c.spaceOnLeft>c.spaceOnRight?(u="right",o+=c.spaceOnLeft,a-=c.spaceOnLeft):(u="left",o+=c.spaceOnRight)}return l==="bottom"&&(r=r-i.height+(this.options.coverTrigger?e.height:0)),u==="right"&&(a=a-i.width+e.width),{x:a,y:r,verticalAlignment:l,horizontalAlignment:u,height:s,width:o}}_schedule(t,e){let i=setTimeout(()=>{this._pendingTimers.delete(i),t()},e);this._pendingTimers.add(i)}_clearPendingTimers(){for(let t of this._pendingTimers)clearTimeout(t);return this._pendingTimers.clear(),++this._transition}_animateIn(){let t=this._transition,e=this.options.inDuration;this.menuEl.style.transition="none",this.menuEl.style.opacity="0",this.menuEl.style.transform="scale(0.85)",this._schedule(()=>{this.menuEl.style.transition=`opacity ${e}ms ease, transform ${e}ms ease`,this.menuEl.style.opacity="1",this.menuEl.style.transform="scale(1)"},1),this._schedule(()=>{this._focusInitialItem(),t===this._transition&&typeof this.options.onOpenEnd=="function"&&this.options.onOpenEnd.call(this,this.el)},e)}_animateOut(){let t=this.options.outDuration;this.menuEl.style.transition=`opacity ${t}ms ease, transform ${t}ms ease`,this.menuEl.style.opacity="0",this.menuEl.style.transform="scale(0.85)",this._schedule(()=>{this._resetMenuStyles(),typeof this.options.onCloseEnd=="function"&&this.options.onCloseEnd.call(this,this.el)},t)}_getClosestAncestor(t,e){let i=t.parentNode;for(;i!=null&&i!==document;){if(i.nodeType===Node.ELEMENT_NODE&&e(i))return i;i=i.parentNode??i.host}return null}_placeMenu(){let t=this._getClosestAncestor(this.menuEl,a=>!["HTML","BODY"].includes(a.tagName)&&getComputedStyle(a).overflow!=="visible");if(!t){let a=this.menuEl.offsetParent?this.menuEl.offsetParent:this.menuEl.parentNode;t=a.host??a}getComputedStyle(t).position==="static"&&(t.style.position="relative");let e=this.menuEl.getBoundingClientRect().width,i=this.el.getBoundingClientRect().width,s=this.options.constrainWidth&&!this.options.contextMenu&&i>=Qt?i:Math.min(Ve,Math.max(Qt,e));if(this.menuEl.style.width=s+"px",this.options.contextMenu){this._placeMenuAtPoint(this._contextPoint??this._regionCorner(),t);return}let o=this._getMenuPosition(t);this.menuEl.style.left=o.x+"px",this.menuEl.style.top=o.y+"px",this.menuEl.style.height=o.height+"px",this.menuEl.style.width=o.width+"px",this.menuEl.style.transformOrigin=`${o.horizontalAlignment==="left"?"0":"100%"} ${o.verticalAlignment==="top"?"0":"100%"}`}_regionCorner(){let t=this.el.getBoundingClientRect();return{x:getComputedStyle(this.el).direction==="rtl"?t.right:t.left,y:t.bottom}}_placeMenuAtPoint({x:t,y:e},i){let{transform:s,transition:o}=this.menuEl.style;this.menuEl.style.transition="none",this.menuEl.style.transform="none";let a=this.menuEl.getBoundingClientRect();this.menuEl.style.transform=s,this.menuEl.style.transition=o;let r={left:0,top:0,right:window.innerWidth,bottom:window.innerHeight};if(i&&getComputedStyle(i).overflow!=="visible"){let S=i.getBoundingClientRect();r={left:Math.max(r.left,S.left),top:Math.max(r.top,S.top),right:Math.min(r.right,S.right),bottom:Math.min(r.bottom,S.bottom)}}let h=a.width,c=Math.min(a.height,r.bottom-r.top);this.isScrollable=c<a.height,this.isScrollable&&(this.menuEl.style.height=c+"px");let l=getComputedStyle(this.el).direction==="rtl",u=t+h<=r.right,f=t-h>=r.left,p=l?f||!u:!u&&f,v=e+c>r.bottom&&e-c>=r.top,g=(S,G,Y)=>Math.max(G,Math.min(S,Y)),L=g(p?t-h:t,r.left,r.right-h),y=g(v?e-c:e,r.top,r.bottom-c);this.menuEl.style.left=L-a.left+"px",this.menuEl.style.top=y-a.top+"px",this.menuEl.style.transformOrigin=`${p?"100%":"0"} ${v?"100%":"0"}`}_setExpanded(t){this.options.contextMenu||(this.el.ariaExpanded=String(t))}};N._menus=[];var F=N;var ze={i18n:{loading:"Loading results.",noResults:"No results.",results:d=>`${d} ${d===1?"result":"results"} available.`,selected:d=>`${d} ${d===1?"item":"items"} selected.`},data:[],onAutocomplete:null,menuOptions:{autoFocus:!1,closeOnClick:!1,coverTrigger:!1},minLength:1,isMultiSelect:!1,onSearch:(d,n)=>{let t=d.toLocaleLowerCase();n.setMenuItems(n.options.data.filter(e=>e.id.toString().toLocaleLowerCase().includes(t)||e.text?.toLocaleLowerCase().includes(t)))},maxMenuHeight:"300px",allowUnsafeHTML:!1,selected:[]},O=class O extends E{constructor(t,e){super(t,e,O);this._handleInputBlur=()=>{this._pointerDown||(this.close(),this._resetAutocomplete())};this._handleInputKeyup=()=>{O._keydown=!1};this._handleInput=()=>{this.count=0;let t=this.el.value.toLocaleLowerCase();this.oldVal!==t&&(this._resetCurrentElementPosition(),this.el.matches(":focus-visible")&&(!this.menu.isOpen||t.length<this.options.minLength)&&this.open()),this._inputChangeDetection(t)};this._handleInputFocus=()=>{this.count=0;let t=this.el.value.toLocaleLowerCase();this._inputChangeDetection(t)};this._inputChangeDetection=t=>{let e=!this.options.isMultiSelect&&this.selectedValues.length>0&&this.el.value!==(this.selectedValues[0].text||String(this.selectedValues[0].id));e&&(this.selectedValues=[]),this.oldVal!==t&&(this._setStatusLoading(),this.options.onSearch(this.el.value,this)),e&&this._triggerChanged(),this.oldVal=t};this._handleInputKeydown=t=>{if(O._keydown=!0,t.key===m.keys.ESC||t.key==="Tab"){this.close(),this._resetCurrentElementPosition();return}let e=this.container.querySelectorAll("li").length;if(t.key===m.keys.ENTER&&this.activeIndex>=0){let i=this.container.querySelectorAll("li")[this.activeIndex];i&&(this.selectOption(i.getAttribute("data-id")),t.preventDefault());return}if(t.key===m.keys.ARROW_UP||t.key===m.keys.ARROW_DOWN){if(t.preventDefault(),!this.menu.isOpen&&this._openTimer===void 0){this.open();return}t.key===m.keys.ARROW_UP&&this.activeIndex>0&&this.activeIndex--,t.key===m.keys.ARROW_DOWN&&this.activeIndex<e-1&&this.activeIndex++,this._setActive(null),this.activeIndex>=0&&(this._setActive(this.container.querySelectorAll("li")[this.activeIndex]),this.container.children[this.activeIndex].scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}))}};this._handleInputClick=()=>{this.open()};this._handleContainerPointerDown=t=>{t.isPrimary&&(t.pointerType==="mouse"&&t.button!==0||(this._pointerDown=!0))};this._handleContainerPointerUp=()=>{this._pointerDown=!1};this.open=()=>{let t=this.el.value.toLocaleLowerCase();this._resetAutocomplete(),t.length>=this.options.minLength&&(this._renderMenu(),this._announce(this._resultsMessage(this.menuItems.length))),this.menu.isOpen?this.menu.recalculateDimensions():(this._openTimer!==void 0&&clearTimeout(this._openTimer),this._openTimer=setTimeout(()=>{this._openTimer=void 0,this.menu.open()},0))};this.close=()=>{this._announcer&&(this._announcer.textContent=""),this._openTimer!==void 0&&(clearTimeout(this._openTimer),this._openTimer=void 0),this.isOpen=!1,this.menu.close()};this.el.Expressive_Autocomplete=this,this.options={...O.defaults,...e,i18n:{...O.defaults.i18n,...e?.i18n}},this.isOpen=!1,this.count=0,this.activeIndex=-1,this.oldVal="",this.selectedValues=this.options.selected.map(i=>this.options.data.find(s=>s.id===i)??{id:i}),this.menuItems=this.options.data||[],this.$active=null,this._pointerDown=!1,this._setupMenu(),this._setupEventHandlers()}_setActive(t){this.$active?.classList.remove("active"),this.$active=t,t?(t.classList.add("active"),this.el.setAttribute("aria-activedescendant",t.id)):this.el.removeAttribute("aria-activedescendant")}static get defaults(){return ze}static init(t,e={}){return super.init(t,e,O)}static getInstance(t){return t.Expressive_Autocomplete}static _loadingIndicator(){if(!O._loadingTemplate){let t=document.createElement("template");t.innerHTML=`<div style="height:100%;width:50px;"><svg version="1.1" id="L4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve">
1
+ var Expressive=(()=>{var yi=Object.defineProperty;var jn=Object.getOwnPropertyDescriptor;var Yn=Object.getOwnPropertyNames;var Xn=Object.prototype.hasOwnProperty;var Gn=(r,s)=>{for(var t in s)yi(r,t,{get:s[t],enumerable:!0})},Zn=(r,s,t,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of Yn(s))!Xn.call(r,i)&&i!==t&&yi(r,i,{get:()=>s[i],enumerable:!(e=jn(s,i))||e.enumerable});return r};var Qn=r=>Zn(yi({},"__esModule",{value:!0}),r);var Jl={};Gn(Jl,{AppBar:()=>ut,AutoInit:()=>Vn,Autocomplete:()=>Q,BackToTop:()=>$t,BarChart:()=>wt,BottomSheets:()=>Ut,ButtonGroup:()=>pt,Cards:()=>G,Carousel:()=>mt,Cascader:()=>vt,CharacterCounter:()=>Se,Chips:()=>it,ColorPicker:()=>yt,ColumnChart:()=>W,CommandPalette:()=>Tt,Confetti:()=>ce,Copy:()=>Gt,CurrencyInput:()=>gt,DataTables:()=>oe,Datepicker:()=>pe,Dialogs:()=>Wt,ExpandingCard:()=>Z,FloatingActionButton:()=>dt,FormSelect:()=>z,Forms:()=>Yt,FunnelChart:()=>It,HeatmapChart:()=>Mt,HoverCard:()=>_t,ImageCompare:()=>Jt,InputMask:()=>ft,Keypad:()=>Et,Lightbox:()=>Bt,LineChart:()=>k,Lists:()=>ie,LoadingOverlay:()=>Ft,MapView:()=>Re,Menu:()=>B,Menubar:()=>Pt,MessageScroller:()=>Rt,MixedChart:()=>At,NavigationRail:()=>zt,PaneResize:()=>Qt,Particles:()=>bt,PieChart:()=>xt,PullToRefresh:()=>me,Questionnaire:()=>Lt,RadarChart:()=>Ct,RadialChart:()=>St,RichTextEditor:()=>Pe,SankeyChart:()=>Ot,ScatterChart:()=>Ht,ScrollSpy:()=>fe,ShowMore:()=>le,SideSheets:()=>jt,Slider:()=>Vt,Snackbar:()=>Xt,Sortable:()=>ee,SwipeActions:()=>Nt,Tabs:()=>_e,Theme:()=>Zt,Timepicker:()=>ge,Tooltip:()=>ve,Tour:()=>te,TransferList:()=>ae,TreeSelect:()=>qt,TreemapChart:()=>Dt,version:()=>Ql});var ss=(r,s,t,e)=>r<e?e:r+s>t-e?t-s:r;function x(r,s,t){t===null?r.removeAttribute(s):r.setAttribute(s,t)}function Ti(r,s,t,e,i=!0){let n=document.createElement("button");n.className=`${t} text`,n.style.visibility=i?"visible":"hidden",n.type="button",n.tabIndex=i?0:-1,n.innerText=s,n.addEventListener("click",e),r.append(n)}function Be(r,{i18n:s,showClearBtn:t,autoSubmit:e},i,n,o,a){if(Ti(r,s.clear,i,n,t),e)return;let l=document.createElement("div");l.classList.add("confirmation-btns"),r.append(l),Ti(l,s.cancel,"btn-cancel",a),Ti(l,s.done,"btn-confirm",o)}function R(r){return new(r.ownerDocument?.defaultView??window).AbortController}function M(r,s={}){let t=document.createElementNS("http://www.w3.org/2000/svg",r);for(let e in s)t.setAttribute(e,s[e]);return t}var u=class r{static isComposing(s){return s.isComposing||s.keyCode===229}static ignoringComposition(s){return t=>{r.isComposing(t)||s(t)}}static onDocumentReady(s){typeof document>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",s,{once:!0}):s())}static locale(s){let[t,e]=[s,void 0];for(;t&&e===void 0;)e=t.closest("[lang]")?.lang,t=t.getRootNode().host;try{return e?Intl.getCanonicalLocales(e)[0]:void 0}catch{return}}static guid(){return globalThis.crypto?.randomUUID?.()??`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}static portalRoot(s){let t=s.getRootNode();return t.host?t:document.body}static getElementById(s,t){let e=s.getRootNode();return e.getElementById?e.getElementById(t):document.getElementById(t)}static setAnchorName(s,t,e){let i=s.style.getPropertyValue("anchor-name").split(",").map(n=>n.trim()).filter(n=>n&&n!=="none"&&n!==t);e&&i.push(t),i.length?s.style.setProperty("anchor-name",i.join(", ")):s.style.removeProperty("anchor-name")}static emit(s,t,e,i=!1){return s.dispatchEvent(new CustomEvent(`expressive:${t}`,{bubbles:!0,composed:!0,cancelable:i,detail:e}))}static eventTarget(s){let t=s.composedPath()[0]??s.target;return t instanceof Element?t:null}static plainKey(s){return!(s.altKey||s.ctrlKey||s.metaKey)}static _keyIndex(s,t,e,i){return s==="Home"?0:s==="End"?e-1:t+(i[s]??NaN)}static focusTarget(s,t,e,i=!1){let n=s.filter(l=>!l.matches(':disabled, [aria-disabled="true"], .disabled')),o=n.indexOf(r.eventTarget(t));if(o<0||!r.plainKey(t))return;let a=r._keyIndex(t.key,o,n.length,e);return n[i?(a+n.length)%n.length:a]}static focusIsIn(...s){return s.some(t=>{let e=t&&t.getRootNode().activeElement;return!!e&&t.contains(e)})}static closestInPath(s,t){for(let e of s.composedPath())if(e instanceof Element&&e.matches(t))return e;return null}static getIdFromTrigger(s){return s.dataset.target||(s.getAttribute("href")?.slice(1)??"")}static _placeInOffsetParent(s,t){let{x:e,y:i}=t,n=s.offsetParent;if(n&&(n!==document.body||getComputedStyle(n).position!=="static")){let o=n.getBoundingClientRect(),a=n===document.scrollingElement;e-=o.left+window.scrollX+n.clientLeft-(a?0:n.scrollLeft),i-=o.top+window.scrollY+n.clientTop-(a?0:n.scrollTop)}s.style.top=i+"px",s.style.left=e+"px"}static _repositionWithinScreen(s,t,e,i,n,o,a){let l=n+(a==="right"?-o:o);return{x:window.scrollX+ss(s-window.scrollX,e,window.innerWidth,l),y:window.scrollY+ss(t-window.scrollY,i,window.innerHeight,l)}}};var b=class{constructor(s,t){s instanceof HTMLElement||console.error(Error(s+" is not an HTML Element")),new.target.getInstance(s)?.destroy(),this.el=s;let e=new.target.defaults,i=e.i18n&&{i18n:{...e.i18n,...t?.i18n}};this.options={...e,...t,...i},this._events=R(s),s[new.target.key]=this}static init(s,t={}){let e=i=>new this(i,t);return s instanceof Element?e(s):s?Array.from(s,e):null}static get defaults(){return{}}static getInstance(s){return s[this.key]}_notify(s,t,{args:e=[this.el],detail:i,current:n=()=>!0}={}){let o=()=>this.constructor.getInstance(this.el)===this&&n();return typeof t=="function"&&t.apply(this,e),o()?(u.emit(this.el,s,i),o()):!1}destroy(){this._events.abort(),this.el[this.constructor.key]=void 0}};var Jn={onOpen:null,onClose:null},wi='article:has(> aside[id]:not([id=""])):not(:has(> aside ~ aside)):has(> button.card-reveal-trigger[type="button"], > :not(aside) button.card-reveal-trigger[type="button"])',Li="card-reveal-initialized";function tr(r){if(r.getAttribute("aria-label")?.trim())return!0;let t=r.getAttribute("aria-labelledby");if(t&&t.trim().split(/\s+/).map(n=>u.getElementById(r,n)?.textContent??"").join(" ").trim())return!0;let e=r.cloneNode(!0);return e.querySelectorAll('[aria-hidden="true"]').forEach(i=>i.remove()),!!e.textContent?.trim()}function ns(r,s,t){return r.closest("article")===s&&!t.contains(r)&&!r.disabled&&r.getAttribute("aria-disabled")!=="true"&&tr(r)}function xi(r){if(r.tagName!=="ARTICLE")return!1;let s=r.querySelectorAll(":scope > aside");return s.length!==1||!s[0].id?!1:Array.from(r.querySelectorAll('button.card-reveal-trigger[type="button"]')).some(t=>ns(t,r,s[0]))}var G=class extends b{constructor(t,e={}){super(t,e);this.isOpen=!1;this._ownsRevealInitializedClass=!1;this._initialAriaControls=new Map;this._lastActivator=null;this._setupEventHandlers=()=>{let{signal:t}=this._events;this._activators.forEach(e=>e.addEventListener("click",this._handleClickInteraction,{signal:t})),this.el.addEventListener("keydown",this._handleKeydownEvent,{signal:t})};this._handleClickInteraction=t=>{this._lastActivator=t.currentTarget,this._handleRevealEvent()};this._handleKeydownEvent=t=>{(t.target instanceof Element?t.target.closest("article"):null)!==this.el||t.key!=="Escape"||!this.isOpen||(t.preventDefault(),this.close())};this._handleRevealEvent=()=>{this.isOpen?this.close():this.open()};this.open=()=>{this.isOpen||!this.cardReveal||(this.isOpen=!0,this.cardReveal.classList.add("open"),this.cardReveal.inert=!1,this._activators.forEach(t=>t.ariaExpanded="true"),this._notify("open",this.options.onOpen,{current:()=>this.isOpen}))};this.close=()=>{if(!this.isOpen||!this.cardReveal)return;let t=this.el.getRootNode().activeElement,e=this.cardReveal.contains(t);this.isOpen=!1,this.cardReveal.classList.remove("open"),this.cardReveal.inert=!0,this._activators.forEach(i=>i.ariaExpanded="false"),this._notify("close",this.options.onClose,{current:()=>!this.isOpen}),e&&(this._lastActivator??this._activators[0])?.focus()};let i=this.el.querySelectorAll(":scope > aside"),n=i.length===1?i[0]:null,o=n?Array.from(this.el.querySelectorAll('button.card-reveal-trigger[type="button"]')).filter(a=>ns(a,this.el,n)):[];this.cardReveal=n?.id&&o.length>0?n:null,this._activators=this.cardReveal?o:[],this.cardReveal&&(this._ownsRevealInitializedClass=!this.el.classList.contains(Li),this.el.classList.add(Li),this._activators.forEach(a=>{this._initialAriaControls.set(a,a.getAttribute("aria-controls")),a.ariaExpanded="false",a.setAttribute("aria-controls",this.cardReveal.id)}),this.cardReveal.classList.remove("open"),this.cardReveal.inert=!0,this._setupEventHandlers())}static get defaults(){return Jn}destroy(){this.cardReveal&&(this.cardReveal.classList.remove("open"),this.cardReveal.inert=!1,this._ownsRevealInitializedClass&&this.el.classList.remove(Li)),this._activators.forEach(t=>{t.removeAttribute("aria-expanded");let e=this._initialAriaControls.get(t);e!==void 0&&x(t,"aria-controls",e)}),this.isOpen=!1,this._activators=[],this._initialAriaControls.clear(),this._lastActivator=null,super.destroy()}static Init(){u.onDocumentReady(()=>{Array.from(document.querySelectorAll(wi)).filter(xi).forEach(e=>{e.Expressive_Cards==null&&this.init(e)})})}};G.key="Expressive_Cards";var er={onOpen:null,onClose:null},Mi="article.expanding-card:has(> dialog.expanding-card-dialog)",Z=class extends b{constructor(t,e){super(t,e);this.isOpen=!1;this.closeGeneration=0;this._initialTrigger={};this._setupEventHandlers=()=>{let{signal:t}=this._events;this.trigger?.addEventListener("click",this.open,{signal:t}),this.trigger?.addEventListener("keypress",this._handleTriggerKeypress,{signal:t}),this.closeButton?.addEventListener("click",this.close,{signal:t}),this.dialog?.addEventListener("cancel",this._handleCancel,{signal:t}),this.dialog?.addEventListener("close",this._handleNativeClose,{signal:t})};this._handleTriggerKeypress=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.open())};this._handleCancel=t=>{t.preventDefault(),this.close()};this._handleNativeClose=()=>{if(this.dialog.open)return;let t=this.isOpen;this._collapse(),t&&this._notify("close",this.options.onClose,{current:()=>!this.isOpen})};this._setTransitionOrigin=()=>{if(!this.dialog)return;let t=this.el.getBoundingClientRect(),i=this.el.querySelector(":scope > figure, :scope > img")?.getBoundingClientRect(),n=(o,a)=>this.dialog.style.setProperty(`--md-comp-expanding-card-from-${o}`,`${Math.max(0,a)}px`);n("top",t.top),n("right",window.innerWidth-t.right),n("bottom",window.innerHeight-t.bottom),n("left",t.left),n("media-height",i?.height??0)};this.open=()=>{this.isOpen||!this.dialog||!this.trigger||(this.closeGeneration++,this._setTransitionOrigin(),this.isOpen=!0,this.trigger.ariaExpanded="true",this.dialog.showModal(),this.dialog.offsetWidth,this.dialog.classList.add("expanded"),this.closeButton?.focus(),this._notify("open",this.options.onOpen,{current:()=>this.isOpen}))};this.close=()=>{if(!this.isOpen||!this.dialog||!this.trigger)return;this._setTransitionOrigin(),this._collapse();let t=this.closeGeneration;this._notify("close",this.options.onClose,{current:()=>!this.isOpen});let e=()=>{t!==this.closeGeneration||this.isOpen||!this.dialog.open||(this.dialog.close(),this.dialog.isConnected&&this.trigger.isConnected&&this.trigger.focus())},n=window.matchMedia("(prefers-reduced-motion: reduce)").matches?[]:(this.dialog.getAnimations?.()??[]).filter(o=>o.transitionProperty==="clip-path");n.length===0?e():Promise.allSettled(n.map(o=>o.finished)).then(e)};if(this.dialog=this.el.querySelector(":scope > dialog.expanding-card-dialog"),this.trigger=this.el.querySelector(":scope > .expanding-card-trigger, :scope > figure > .expanding-card-trigger"),this.closeButton=this.dialog?.querySelector(".expanding-card-close")??null,this.trigger&&this.dialog){for(let i of["aria-expanded","aria-controls","tabindex","role"])this._initialTrigger[i]=this.trigger.getAttribute(i);this.trigger.ariaExpanded="false",this.dialog.id&&this.trigger.setAttribute("aria-controls",this.dialog.id),this.trigger.matches("a[href], button, input, select, textarea")||(this.trigger.tabIndex=0,this.trigger.setAttribute("role","button")),this._setupEventHandlers()}}static get defaults(){return er}destroy(){this._events.abort(),this._collapse(),this.dialog?.open&&this.dialog.close();for(let[t,e]of Object.entries(this._initialTrigger))x(this.trigger,t,e);super.destroy()}_collapse(){this.closeGeneration++,this.isOpen=!1,this.trigger&&(this.trigger.ariaExpanded="false"),this.dialog?.classList.remove("expanded")}static Init(){u.onDocumentReady(()=>{document.querySelectorAll(Mi).forEach(t=>{t.Expressive_ExpandingCard==null&&this.init(t)})})}};Z.key="Expressive_ExpandingCard";var rs=r=>r.parentElement??(r.getRootNode().host||null),ir={translate:/^(none|0px( 0px){0,2})$/,rotate:/^(none|(\S+ )*0deg)$/,scale:/^(none|1( 1){0,2})$/};function sr(r){for(let s=rs(r);s;s=rs(s)){let t=getComputedStyle(s);if(!new DOMMatrixReadOnly(t.transform).isIdentity||Object.entries(ir).some(([e,i])=>!i.test(t.getPropertyValue(e))))return!0}return!1}function nr(r){let s=[];for(let t=r.getRootNode();"host"in t;t=t.host.getRootNode())s.push(t);return s}function rr(r,s,t){let e=r.getBoundingClientRect();return{left:window.innerWidth-(e.left+s.width),right:e.right-s.width,top:window.innerHeight-(e.top+s.height+t),bottom:e.bottom-(s.height+t)}}var or={ArrowUp:-1,ArrowDown:1},os=':scope > li, :scope > li > ul[role="group"] > li',ar=typeof CSS<"u"&&!!CSS.supports?.("anchor-name: --a"),lr=["position","inset","max-height","position-anchor","position-area","position-try-fallbacks"],as=112,cr=280,hr={alignment:"left",autoFocus:!0,constrainWidth:!0,container:null,coverTrigger:!1,placement:"bottom",closeOnClick:!0,hover:!1,contextMenu:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onItemClick:null},$e=" ",et=class et extends b{constructor(t,e){super(t,{contextMenu:t.hasAttribute("data-context-menu"),...e});this._pendingTimers=new Set;this._transition=0;this._menuClickTargets=new WeakMap;this._spaceActivation=!1;this._openedByHover=!1;this._contextPoint=null;this._contextReturn=null;this._handleContextMenu=t=>{if(t.defaultPrevented){this.close();return}let e=t.composedPath();if(et._menus.some(o=>o!==this&&o.isOpen&&e.includes(o.menuEl)))return;if(t.preventDefault(),!this.isOpen){let o=this.el.getRootNode();this._contextReturn=o.activeElement instanceof HTMLElement?o.activeElement:null}let i=this.el.getBoundingClientRect(),n=(t.clientX!==0||t.clientY!==0)&&t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom;this._contextPoint=n?{x:t.clientX,y:t.clientY}:null,this.isOpen?this.recalculateDimensions():this.open()};this._handleDocumentContextMenu=t=>{let e=t.composedPath();if(e.includes(this.menuEl)){t.preventDefault();return}e.includes(this.el)||this.close()};this._handleClick=t=>{t.preventDefault(),this.isOpen?this.close():this.open()};this._handleMouseEnter=()=>{this.isOpen||(this._openedByHover=!0,this.open())};this._handleMouseLeave=t=>{let e=t.relatedTarget;if(!e){this.close();return}!e.closest(".menu-trigger")?.Expressive_Menu?.isOpen&&!this.menuEl?.contains(e)&&this.close()};this._handleDocumentClick=t=>{let e=t.composedPath(),i=this._menuClickTargets.get(t);if(this._menuClickTargets.delete(t),!i&&!this.options.contextMenu&&e.includes(this.el)){this.isTouchMoving=!1;return}let n=i??(e[0]||t.target),o=!!i||e.includes(this.menuEl)||this.menuEl?.contains(n);this._isSubmenuTriggerClick(n)||(o&&this._closesOnClick(n)?this.close():o||this._schedule(()=>this.close(),0),this.isTouchMoving=!1)};this._handleDocumentKeydown=t=>{t.key!=="Escape"||!this._openedByHover||(u.focusIsIn(this.el)&&t.preventDefault(),this.close())};this._handleTriggerKeydown=t=>{if(this.options.contextMenu)return;if(t.key==="Escape"&&this.isOpen&&u.plainKey(t)&&!u.isComposing(t)){t.preventDefault(),this.close();return}[$e,"Enter","ArrowDown","ArrowUp"].includes(t.key)&&(this.isOpen?this._openedByHover&&(t.preventDefault(),this._openedByHover=!1,this._focusInitialItem()):(t.preventDefault(),this.open()))};this._handleMenuPointerdown=()=>{this.isTouchMoving=!1};this._handleDocumentTouchmove=t=>{let e=t.target;(t.composedPath().includes(this.menuEl)||this.menuEl?.contains(e))&&(this.isTouchMoving=!0)};this._handleMenuClick=t=>{let e=t.target;this._menuClickTargets.set(t,e);let i=e.closest("li");if(i?.matches('.disabled, [aria-disabled="true"]')){t.preventDefault(),t.stopPropagation();return}if(i&&this._isSubmenuTriggerClick(e)){t.preventDefault(),t.stopPropagation(),this._toggleSubmenu(i);return}i&&this._activateItem(i)};this._handleSubmenuAlign=t=>{let e=t.target;if(!(e instanceof Element))return;let i=e.closest("li");i?.querySelector(":scope > menu")&&this.menuEl?.contains(i)&&this._alignSubmenu(i)};this._handleMenuKeydown=t=>{if(!this.isOpen||!u.plainKey(t)||u.isComposing(t))return;let e=this._containingSubmenu(t)??this.menuEl,i=getComputedStyle(e).direction==="rtl",n=i?"ArrowLeft":"ArrowRight",o=i?"ArrowRight":"ArrowLeft";if([n,o,"ArrowUp","ArrowDown","Escape","Tab"].includes(t.key)&&(clearTimeout(this.filterTimeout),this._resetFilterQuery()),t.key==="Tab")t.preventDefault(),this.close();else if(t.key===n){let l=this._focusedRow(t);if(l?.querySelector(":scope > menu")&&!l.matches('.disabled, [aria-disabled="true"]')){t.preventDefault(),l.classList.add("open"),this._alignSubmenu(l),this._syncSubmenuAria(l,!0);let c=Array.from(l.querySelector(":scope > menu").children).find(h=>h instanceof HTMLElement&&h.tabIndex!==-1);c&&this._focusRow(c)}}else if(t.key===o){let l=this._containingSubmenu(t);if(l){t.preventDefault();let c=l.parentElement;this._closeSubmenu(c),this._focusRow(c)}}else if(this._moveFocus(e,t))t.preventDefault();else if(t.key==="Enter"||t.key===$e){let l=this._focusedRow(t);if(t.preventDefault(),l?.matches('.disabled, [aria-disabled="true"]'))return;if(l?.querySelector(":scope > menu")){this._toggleSubmenu(l);return}let c=l??this.menuEl.children[this.focusedIndex],h=c?.querySelector(":scope > a, :scope > button");this._spaceActivation=t.key===$e,h?h.click():c instanceof HTMLElement&&c.click(),this._spaceActivation=!1,this._closeAfterEnter(t,c)}else if(t.key==="Escape"){t.preventDefault();let l=this._containingSubmenu(t)?.parentElement??Array.from(this.menuEl.querySelectorAll("li.open")).reverse()[0];l?(this._closeSubmenu(l),this._focusRow(l)):this.close()}let a=t.key.toLowerCase();if(t.key.length===1&&t.key!==$e){this.filterQuery.push(a);let l=this.filterQuery.join(""),c=this._rows(e).find(h=>!h.matches('.disabled, [aria-disabled="true"]')&&Array.from(h.childNodes).filter(d=>!(d instanceof Element&&d.matches("menu"))).map(d=>d.textContent).join("").trim().toLowerCase().startsWith(l));c&&this._focusRow(c),clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(this._resetFilterQuery,1e3)}};this._handleWindowResize=()=>{this.el.offsetParent&&this.recalculateDimensions()};this._resetFilterQuery=()=>{this.filterQuery=[]};this._reanchorFrame=0;this._reanchor=t=>{this._reanchorFrame||this.options.contextMenu||this.menuEl.contains(t.target)||(this._reanchorFrame=requestAnimationFrame(()=>{if(this._reanchorFrame=0,!this.isOpen)return;if(this.menuEl.style.getPropertyValue("position-anchor"))return this._placeAnchored();let{scrollTop:e}=this.menuEl;this.recalculateDimensions(),this.menuEl.scrollTop=e}))};this.open=()=>{if(!this._canOpen)return;let t=this._clearPendingTimers();this.isOpen=!0,this._notify("open",this.options.onOpenStart,{current:()=>t===this._transition})&&(this._resetMenuStyles(),this.menuEl.isConnected&&this.menuEl.showPopover(),this._restoreInert(),this._placeMenu(),this._schedule(()=>this._setupTemporaryEventHandlers(),0),this._animateIn(),this._setExpanded(!0))};this.close=()=>{if(!this.isOpen)return;let t=this._clearPendingTimers(),e=this.menuEl.getRootNode(),i=e.activeElement;if(this.isOpen=!1,this._openedByHover=!1,this.menuEl.setAttribute("inert",""),clearTimeout(this.filterTimeout),this._resetFilterQuery(),this.focusedIndex=-1,this._clearActive(),this._closeSubmenus(),!!this._notify("close",this.options.onCloseStart,{current:()=>t===this._transition})){if(this._animateOut(),this._openEvents?.abort(),this._setExpanded(!1),this.options.autoFocus&&this.menuEl.contains(i)&&(e.activeElement===i||this.el.ownerDocument.activeElement===this.el.ownerDocument.body)){let n=this._contextReturn;(n?.isConnected&&n!==this.el.ownerDocument.body?n:this.el).focus()}this._contextReturn=null,this._contextPoint=null}};this.recalculateDimensions=()=>{this.isOpen&&(this._resetMenuPositioningStyles(),this._placeMenu())};if(et._menus.push(this),this.id=u.getIdFromTrigger(t),this.menuEl=u.getElementById(t,this.id),this.isOpen=!1,this.isScrollable=!1,this.isTouchMoving=!1,this.focusedIndex=-1,this.filterQuery=[],this.options.contextMenu||(this.el.ariaExpanded="false",this.el.hasAttribute("aria-haspopup")||this.el.setAttribute("aria-haspopup","menu"),this.id&&!this.el.hasAttribute("aria-controls")&&this.el.setAttribute("aria-controls",this.id)),!this.menuEl){console.warn(`Menu skipped: no element matches target "${this.id}".`,t);return}this._originalInert=this.menuEl.getAttribute("inert"),this._moveMenuToElement(),this._setupAccessibility(),this._makeMenuFocusable(),this._setupSubmenus(),this._setupEventHandlers()}static get defaults(){return hr}destroy(){this._clearPendingTimers(),this.isOpen=!1,this._setExpanded(!1),this.menuEl&&u.setAnchorName(this.el,`--menu-${this.menuEl.id}`,!1),clearTimeout(this.filterTimeout),this._resetMenuStyles(),this._restoreInert(),this._events.abort(),this._openEvents?.abort();let t=et._menus.indexOf(this);t>=0&&et._menus.splice(t,1),super.destroy()}_setupEventHandlers(){let{signal:t}=this._events;this.el.addEventListener("keydown",this._handleTriggerKeydown,{signal:t}),this.menuEl?.addEventListener("click",this._handleMenuClick,{signal:t}),this.menuEl?.querySelector(":scope > li > menu")&&this.menuEl.addEventListener("mouseover",this._handleSubmenuAlign,{signal:t}),this.options.contextMenu?this.el.addEventListener("contextmenu",this._handleContextMenu,{signal:t}):this.options.hover?(this.el.addEventListener("mouseenter",this._handleMouseEnter,{signal:t}),this.el.addEventListener("mouseleave",this._handleMouseLeave,{signal:t}),this.menuEl.addEventListener("mouseleave",this._handleMouseLeave,{signal:t})):this.el.addEventListener("click",this._handleClick,{signal:t})}_setupTemporaryEventHandlers(){this._openEvents?.abort(),this._openEvents=R(this.el);let{signal:t}=this._openEvents,e={passive:!0,signal:t};document.addEventListener("click",this._handleDocumentClick,{signal:t}),this.menuEl?.addEventListener("pointerdown",this._handleMenuPointerdown,e),this.menuEl?.addEventListener("touchmove",this._handleDocumentTouchmove,e),document.addEventListener("touchmove",this._handleDocumentTouchmove,e),this.menuEl?.addEventListener("keydown",this._handleMenuKeydown,{signal:t}),document.addEventListener("keydown",this._handleDocumentKeydown,{signal:t}),window.addEventListener("resize",this._handleWindowResize,{signal:t});for(let i of[window,...nr(this.el)])i.addEventListener("scroll",this._reanchor,{capture:!0,passive:!0,signal:t});this.options.contextMenu&&document.addEventListener("contextmenu",this._handleDocumentContextMenu,{signal:t})}_activateItem(t){let e=this._toggleChecked(t);this._notify("select",this.options.onItemClick,{args:[t],detail:{item:t}})&&e!==null&&this._notify("change",null,{detail:{item:t,checked:e}})}_toggleChecked(t){let e=t.getAttribute("role");if(e==="menuitemradio")return this._checkRadio(t);if(e!=="menuitemcheckbox")return null;let i=t.getAttribute("aria-checked")!=="true";return t.setAttribute("aria-checked",String(i)),i}_checkRadio(t){return t.getAttribute("aria-checked")==="true"?null:(t.parentElement.querySelectorAll(':scope > li[role="menuitemradio"]').forEach(e=>{e.setAttribute("aria-checked",String(e===t))}),!0)}_isCheckboxRow(t){return t?.closest("li")?.getAttribute("role")==="menuitemcheckbox"}_closesOnClick(t){return this.options.closeOnClick&&!this.isTouchMoving&&!this._keepsOpen(t)}_keepsOpen(t){let e=t.closest("li")?.getAttribute("role");return e==="menuitemcheckbox"?!0:this._spaceActivation&&e==="menuitemradio"}_closeAfterEnter(t,e){t.key==="Enter"&&this.options.closeOnClick&&this._isCheckboxRow(e)&&this.close()}_setupAccessibility(){if(!this.menuEl)return;this.menuEl.hasAttribute("role")||this.menuEl.setAttribute("role","menu"),[this.menuEl,...this.menuEl.querySelectorAll("menu")].forEach(e=>{e.hasAttribute("role")||e.setAttribute("role","menu"),e.getAttribute("role")==="menu"&&e.querySelectorAll(os).forEach(i=>{if(i.classList.contains("divider")){i.hasAttribute("role")||i.setAttribute("role","separator");return}if(i.classList.contains("gap")){i.setAttribute("aria-hidden","true");return}if(i.classList.contains("label")||i.classList.contains("optgroup")){i.hasAttribute("role")||i.setAttribute("role","presentation");return}i.hasAttribute("role")||i.setAttribute("role","menuitem"),i.classList.contains("disabled")&&!i.hasAttribute("aria-disabled")&&i.setAttribute("aria-disabled","true")})})}_isSubmenuTriggerClick(t){if(!this.menuEl)return!1;let e=t.closest("li");if(!e||!this.menuEl.contains(e))return!1;let i=e.querySelector(":scope > menu");return i?!i.contains(t):!1}_setupSubmenus(){this.menuEl?.querySelectorAll("li").forEach(t=>{if(!t.querySelector(":scope > menu"))return;let e=t.querySelector(":scope > a, :scope > button, :scope > span")??t;e.setAttribute("aria-haspopup","menu"),e.setAttribute("aria-expanded","false")})}_toggleSubmenu(t){let e=!t.classList.contains("open");t.parentElement?.querySelectorAll(":scope > li.open").forEach(i=>{i!==t&&this._closeSubmenu(i)}),t.classList.toggle("open",e),e&&this._alignSubmenu(t),this._syncSubmenuAria(t,e)}_syncSubmenuAria(t,e){(t.querySelector(":scope > a, :scope > button, :scope > span")??t).setAttribute("aria-expanded",e?"true":"false")}_alignSubmenu(t){let e=t.querySelector(":scope > menu");if(!e)return;t.classList.remove("submenu-start");let i=e.getBoundingClientRect();(i.left<8||i.right>window.innerWidth-8)&&t.classList.add("submenu-start")}_closeSubmenu(t){t.classList.remove("open","submenu-start"),this._syncSubmenuAria(t,!1)}_closeSubmenus(){this.menuEl?.querySelectorAll("li.open").forEach(t=>this._closeSubmenu(t))}_containingSubmenu(t){let e=t.target;if(!(e instanceof Element))return null;let i=e.closest("li > menu");return i instanceof HTMLElement&&this.menuEl?.contains(i)?i:null}_focusedRow(t){let e=t.target;if(!(e instanceof Element))return null;let i=e.closest("li");return i instanceof HTMLElement&&this.menuEl?.contains(i)?i:null}_restoreInert(){this.menuEl&&x(this.menuEl,"inert",this._originalInert)}_clearActive(){this.menuEl?.querySelectorAll("li.active").forEach(t=>t.classList.remove("active"))}_focusRow(t){this._clearActive(),this.focusedIndex=Array.from(t.parentElement.children).indexOf(t),t.focus({preventScroll:!0}),t.scrollIntoView({block:"nearest",inline:"nearest"})}_resetMenuStyles(){this.menuEl&&(this.menuEl.hidePopover(),this._resetMenuPositioningStyles(),this.menuEl.style.transform="",this.menuEl.style.opacity="")}_resetMenuPositioningStyles(){this.menuEl.style.width="",this.menuEl.style.height="",this.menuEl.style.left="",this.menuEl.style.top="",this.menuEl.style.transformOrigin="";for(let t of lr)this.menuEl.style.removeProperty(t);this._stopReanchoring()}_moveMenuToElement(){this.options.container?this.options.container.append(this.menuEl):this.el.after(this.menuEl)}_makeMenuFocusable(){this.menuEl&&(this.menuEl.popover="manual",this.menuEl.tabIndex=-1,this.menuEl.querySelectorAll(":scope li").forEach(t=>{if(t.matches('.divider, .gap, .label, .optgroup, [role="none"]')){t.setAttribute("tabindex","-1");return}t.getAttribute("tabindex")||t.setAttribute("tabindex","0")}))}_moveFocus(t,e){let i=this._rows(t),n=this._focusedRow(e)??t.children[this.focusedIndex],o=u._keyIndex(e.key,i.indexOf(n),i.length,or);if(Number.isNaN(o))return!1;let a=i[o];return a&&(this._focusRow(a),a.classList.add("active")),!0}_rows(t){return Array.from(t.querySelectorAll(os)).filter(e=>e instanceof HTMLElement&&e.tabIndex!==-1)}_focusInitialItem(){if(!this.menuEl||!this.options.autoFocus)return;let t=this._rows(this.menuEl)[0];t&&(this._clearActive(),this.focusedIndex=Array.from(t.parentElement.children).indexOf(t),t.focus({preventScroll:!0}))}_focusFocusedItem(){this.focusedIndex>=0&&this.focusedIndex<this.menuEl.children.length&&this.options.autoFocus&&(this.menuEl.children[this.focusedIndex].focus({preventScroll:!0}),this.menuEl.children[this.focusedIndex].scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}))}_opensUp(t){return t.top<0||this.options.placement==="top"&&t.bottom>=0}_getMenuPosition(){let t=this.el.getBoundingClientRect(),e=this.menuEl.getBoundingClientRect(),i=e.height,n=e.width,o=t.left-e.left,a=t.top-e.top,l=rr(this.el,e,this.options.coverTrigger?0:t.height),c="top",h=this.options.alignment;if(a+=this.options.coverTrigger?0:t.height,this.isScrollable=!1,this._opensUp(l)&&(l.bottom>=0?(c="bottom",this.options.coverTrigger||(a-=t.height)):(this.isScrollable=!0,i-=20,l.bottom>l.top?(c="bottom",i+=l.bottom,a-=this.options.coverTrigger?l.bottom-20:l.bottom-20+t.height):i+=l.top)),l[h]<0){let d=h==="left"?"right":"left";l[d]>=0?h=d:l.right>l.left?(h="right",n+=l.right,o-=l.right):(h="left",n+=l.left)}return c==="bottom"&&(a=a-e.height+(this.options.coverTrigger?t.height:0)),h==="right"&&(o=o-e.width+t.width),{x:o,y:a,verticalAlignment:c,horizontalAlignment:h,height:i,width:n}}_schedule(t,e){let i=setTimeout(()=>{this._pendingTimers.delete(i),t()},e);this._pendingTimers.add(i)}_clearPendingTimers(){for(let t of this._pendingTimers)clearTimeout(t);return this._pendingTimers.clear(),++this._transition}_animateIn(){let t=this._transition,e=!this._openedByHover,i=this.options.inDuration;this.menuEl.style.transition="none",this.menuEl.style.opacity="0",this.menuEl.style.transform="scale(0.85)",this._schedule(()=>{this.menuEl.style.transition=`opacity ${i}ms ease, transform ${i}ms ease`,this.menuEl.style.opacity="1",this.menuEl.style.transform="scale(1)"},1),this._schedule(()=>{e&&this._focusInitialItem(),t===this._transition&&this._notify("opened",this.options.onOpenEnd,{current:()=>t===this._transition})},i)}_animateOut(){let t=this._transition,e=this.options.outDuration;this.menuEl.style.transition=`opacity ${e}ms ease, transform ${e}ms ease`,this.menuEl.style.opacity="0",this.menuEl.style.transform="scale(0.85)",this._schedule(()=>{this._resetMenuStyles(),this._notify("closed",this.options.onCloseEnd,{current:()=>t===this._transition})},e)}_placeMenu(){let t=this.menuEl.getBoundingClientRect().width,e=this.el.getBoundingClientRect().width,i=this.options.constrainWidth&&!this.options.contextMenu&&e>=as?e:Math.min(cr,Math.max(as,t));if(this.menuEl.style.width=i+"px",this.options.contextMenu){this._placeMenuAtPoint(this._contextPoint??this._regionCorner());return}ar&&!this.options.coverTrigger&&!sr(this.el)?this._anchorMenu():this._placeByCoordinates()}_side(){let t=this.el.getBoundingClientRect(),e={top:t.top,bottom:window.innerHeight-t.bottom},[i,n]=this.options.placement==="top"?["top","bottom"]:["bottom","top"];return e[i]>=this.menuEl.scrollHeight||e[i]>=e[n]?i:n}_anchorMenu(){let t=`--menu-${this.menuEl.id}`;u.setAnchorName(this.el,t,!0);let e=this.menuEl.style;e.position="fixed",e.inset="auto",e.maxHeight="100%",e.setProperty("position-anchor",t),this._placeAnchored()}_stopReanchoring(){cancelAnimationFrame(this._reanchorFrame),this._reanchorFrame=0}_placeAnchored(){let t=this.menuEl.style,[e,i]=[this._side(),this.options.alignment==="right"?"left":"right"];t.setProperty("position-area",`${e} span-${i}`),t.setProperty("position-try-fallbacks","flip-block, flip-inline, flip-block flip-inline"),t.transformOrigin=`${i==="left"?"100%":"0"} ${e==="top"?"100%":"0"}`,this.isScrollable=this.menuEl.scrollHeight>this.menuEl.clientHeight}_placeByCoordinates(){let t=this._getMenuPosition();this.menuEl.style.left=t.x+"px",this.menuEl.style.top=t.y+"px",this.menuEl.style.height=t.height+"px",this.menuEl.style.width=t.width+"px",this.menuEl.style.transformOrigin=`${t.horizontalAlignment==="left"?"0":"100%"} ${t.verticalAlignment==="top"?"0":"100%"}`}_regionCorner(){let t=this.el.getBoundingClientRect();return{x:getComputedStyle(this.el).direction==="rtl"?t.right:t.left,y:t.bottom}}_placeMenuAtPoint({x:t,y:e}){let{transform:i,transition:n}=this.menuEl.style;this.menuEl.style.transition="none",this.menuEl.style.transform="none";let o=this.menuEl.getBoundingClientRect();this.menuEl.style.transform=i,this.menuEl.style.transition=n;let a={left:0,top:0,right:window.innerWidth,bottom:window.innerHeight},l=o.width,c=Math.min(o.height,a.bottom-a.top);this.isScrollable=c<o.height,this.isScrollable&&(this.menuEl.style.height=c+"px");let h=getComputedStyle(this.el).direction==="rtl",d=t+l<=a.right,p=t-l>=a.left,g=h?p||!d:!d&&p,m=e+c>a.bottom&&e-c>=a.top,E=(_,L,S)=>Math.max(L,Math.min(_,S)),T=E(g?t-l:t,a.left,a.right-l),C=E(m?e-c:e,a.top,a.bottom-c);this.menuEl.style.left=T-o.left+"px",this.menuEl.style.top=C-o.top+"px",this.menuEl.style.transformOrigin=`${g?"100%":"0"} ${m?"100%":"0"}`}_setExpanded(t){this.options.contextMenu||(this.el.ariaExpanded=String(t))}get _canOpen(){return!this.isOpen&&!!this.menuEl&&this.el.Expressive_Menu===this}};et._menus=[],et.key="Expressive_Menu";var B=et;var ur={i18n:{loading:"Loading results.",noResults:"No results.",results:r=>`${r} ${r===1?"result":"results"} available.`,selected:r=>`${r} ${r===1?"item":"items"} selected.`,create:r=>`Add "${r}"`},data:[],onAutocomplete:null,menuOptions:{autoFocus:!1,closeOnClick:!1,coverTrigger:!1},minLength:1,searchDelay:0,allowCreate:!1,onCreate:null,isMultiSelect:!1,onSearch:(r,s)=>{let t=r.toLocaleLowerCase();s.setMenuItems(s.options.data.filter(e=>e.id.toString().toLocaleLowerCase().includes(t)||e.text?.toLocaleLowerCase().includes(t)))},maxMenuHeight:"300px",allowUnsafeHTML:!1,selected:[]},K=class K extends b{constructor(t,e){super(t,e);this._left=!0;this._selection=0;this._noResults=!1;this._handleInputBlur=()=>{this._pointerDown||(this._left=!0,this._cancelPendingSearch(),this.close(),this._resetAutocomplete())};this._handleInputKeyup=()=>{K._keydown=!1};this._handleInput=()=>{this._left=!1,this.count=0;let t=this.el.value.toLocaleLowerCase();this.oldVal!==t&&(this._resetCurrentElementPosition(),this._noResults=!1,this.el.matches(":focus-visible")&&(!this.menu.isOpen||t.length<this.options.minLength)&&this.open()),this._inputChangeDetection(t,!0)};this._handleInputFocus=()=>{this._left=!1,this.count=0;let t=this.el.value.toLocaleLowerCase();this._inputChangeDetection(t)};this._inputChangeDetection=(t,e)=>{let i=!this.options.isMultiSelect&&this.selectedValues.length>0&&this.el.value!==(this.selectedValues[0].text||String(this.selectedValues[0].id));i&&(this.selectedValues=[]),this.oldVal!==t&&(this._noResults=!1,this._setStatusLoading(),this._queueSearch(e)),i&&this._triggerChanged(),this.oldVal=t};this._handleInputKeydown=u.ignoringComposition(t=>{if(K._keydown=!0,t.key==="Escape"||t.key==="Tab"){this._dismiss(t);return}let e=this._options(),i=e.length;if(t.key==="Enter"&&this.activeIndex>=0){let n=e[this.activeIndex];n&&(this._choose(n),t.preventDefault());return}if(t.key==="ArrowUp"||t.key==="ArrowDown"){if(t.preventDefault(),!this.menu.isOpen&&this._openTimer===void 0){this.open();return}t.key==="ArrowUp"&&this.activeIndex>0&&this.activeIndex--,t.key==="ArrowDown"&&this.activeIndex<i-1&&this.activeIndex++,this._setActive(null),this.activeIndex>=0&&(this._setActive(e[this.activeIndex]),e[this.activeIndex].scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}))}});this._handleInputClick=()=>{this.open()};this._handleContainerPointerDown=t=>{t.isPrimary&&(t.pointerType==="mouse"&&t.button!==0||(this._pointerDown=!0))};this._handleContainerPointerUp=()=>{this._pointerDown=!1};this._handleInertRowPress=t=>{!(t.target instanceof Element)||!t.target.closest('.autocomplete-no-results, .autocomplete-group-label, [aria-disabled="true"]')||(t.preventDefault(),t.stopPropagation())};this.open=()=>{let t=this.el.value.toLocaleLowerCase();this._resetAutocomplete(),t.length>=this.options.minLength&&(this._renderMenu(),this._announce(this._resultsMessage())),this.menu.isOpen?this.menu.recalculateDimensions():(this._openTimer!==void 0&&clearTimeout(this._openTimer),this._openTimer=setTimeout(()=>{this._openTimer=void 0,this.menu.open()},0))};this.close=()=>{this._announcer&&(this._announcer.textContent=""),this._openTimer!==void 0&&(clearTimeout(this._openTimer),this._openTimer=void 0),this.isOpen=!1,this.menu.close()};this.isOpen=!1,this.count=0,this.activeIndex=-1,this.oldVal="",this.selectedValues=this.options.selected.map(i=>this.options.data.find(n=>n.id===i)??{id:i}),this.menuItems=this.options.data||[],this.$active=null,this._pointerDown=!1,this._setupMenu(),this._setupEventHandlers()}_setActive(t){this.$active?.classList.remove("active"),this.$active=t,t?(t.classList.add("active"),this.el.setAttribute("aria-activedescendant",t.id)):this.el.removeAttribute("aria-activedescendant")}static get defaults(){return ur}static _loadingIndicator(){if(!K._loadingTemplate){let t=document.createElement("template");t.innerHTML=`<div style="height:100%;width:50px;"><svg version="1.1" id="L4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve">
2
2
  <circle fill="#888c" stroke="none" cx="6" cy="50" r="6"><animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1"/></circle>
3
3
  <circle fill="#888c" stroke="none" cx="26" cy="50" r="6"><animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.2"/></circle>
4
4
  <circle fill="#888c" stroke="none" cx="46" cy="50" r="6"><animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3"/></circle>
5
- </svg></div>`,O._loadingTemplate=t.content.firstElementChild}return O._loadingTemplate.cloneNode(!0)}destroy(){this._openTimer!==void 0&&(clearTimeout(this._openTimer),this._openTimer=void 0),this._removeEventHandlers(),this.menu.destroy(),this.isOpen=!1,this._removeMenu(),this._statusInfo.remove(),this._announcer.remove(),this.el.Expressive_Autocomplete=void 0}_setupEventHandlers(){this.el.addEventListener("blur",this._handleInputBlur),this.el.addEventListener("input",this._handleInput),this.el.addEventListener("keyup",this._handleInputKeyup),this.el.addEventListener("focus",this._handleInputFocus),this.el.addEventListener("keydown",this._handleInputKeydown),this.el.addEventListener("click",this._handleInputClick),this.container.addEventListener("pointerdown",this._handleContainerPointerDown),this.container.addEventListener("pointerup",this._handleContainerPointerUp),this.container.addEventListener("pointercancel",this._handleContainerPointerUp)}_removeEventHandlers(){this.el.removeEventListener("blur",this._handleInputBlur),this.el.removeEventListener("input",this._handleInput),this.el.removeEventListener("keyup",this._handleInputKeyup),this.el.removeEventListener("focus",this._handleInputFocus),this.el.removeEventListener("keydown",this._handleInputKeydown),this.el.removeEventListener("click",this._handleInputClick),this.container.removeEventListener("pointerdown",this._handleContainerPointerDown),this.container.removeEventListener("pointerup",this._handleContainerPointerUp),this.container.removeEventListener("pointercancel",this._handleContainerPointerUp)}_setupMenu(){this.container=document.createElement("menu"),this.container.style.maxHeight=this.options.maxMenuHeight,this.container.id=`autocomplete-options-${m.guid()}`,this.container.classList.add("autocomplete-content"),this.container.ariaExpanded="true",this.container.setAttribute("role","listbox"),this.el.setAttribute("role","combobox"),this.el.setAttribute("aria-autocomplete","list"),this.el.setAttribute("aria-controls",this.container.id),this.el.setAttribute("data-target",this.container.id),this.menuItems.forEach(r=>{let h=this._createMenuItem(r);this.container.append(h)}),this.el.parentElement.appendChild(this.container);let t={...O.defaults.menuOptions,...this.options.menuOptions},e=t.onOpenStart,i=t.onCloseStart;t.onOpenStart=r=>{this.isOpen=!0,typeof e=="function"&&e.call(this.menu,r)},t.onCloseStart=r=>{this.isOpen=!1,typeof i=="function"&&i.call(this.menu,r)};let s=t.onItemClick;t.onItemClick=r=>{if(!r)return;let h=r.getAttribute("data-id");this.selectOption(h),typeof s=="function"&&s.call(this.menu,r)},this.menu=F.init(this.el,t),this.el.setAttribute("aria-haspopup","listbox");let o=this.el.parentElement.querySelector("label");o&&this.el.after(o),this.el.removeEventListener("click",this.menu._handleClick),this.el.removeEventListener("keydown",this.menu._handleTriggerKeydown),this.options.isMultiSelect||this._refreshInputText(),this.el.value&&this.selectOption(this.el.value);let a=document.createElement("div");a.classList.add("status-info"),a.setAttribute("aria-hidden","true"),a.setAttribute("style","position: absolute;right:0;top:0;"),this.el.parentElement.appendChild(a),this._statusInfo=a,this._announcer=document.createElement("div"),this._announcer.classList.add("autocomplete-status"),this._announcer.setAttribute("role","status"),this._announcer.setAttribute("aria-live","polite"),this._announcer.setAttribute("aria-atomic","true"),this.el.parentElement.appendChild(this._announcer),this._updateSelectedInfo()}_removeMenu(){this.container.ariaExpanded="false",this.container.parentNode.removeChild(this.container)}_resetCurrentElementPosition(){this.activeIndex=-1,this._setActive(null)}_resetAutocomplete(){this.container.replaceChildren(),this._resetCurrentElementPosition(),this.oldVal=null,this._pointerDown=!1}_highlightPartialText(t,e){let i=e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase()),s=i+t.length-1;return i==-1||s==-1?[e,"",""]:[e.slice(0,i),e.slice(i,s+1),e.slice(s+1)]}_createMenuItem(t){let e=document.createElement("li");e.id=`autocomplete-option-${m.guid()}`,e.setAttribute("role","option");let i=this.selectedValues.some(l=>l.id===t.id);if(e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("data-id",t.id),e.setAttribute("style","display:grid; grid-auto-flow: column; user-select: none; align-items: center;"),e.tabIndex=-1,this.options.isMultiSelect){let l=document.createElement("div");l.classList.add("item-selection"),l.style.textAlign="center";let u=document.createElement("input");u.type="checkbox",u.tabIndex=-1,u.checked=i;let f=document.createElement("span");f.style.paddingLeft="21px",l.append(u,f),e.appendChild(l)}if(t.image){let l=document.createElement("img");l.classList.add("circle"),l.src=t.image,e.appendChild(l)}let s=this.el.value.toLocaleLowerCase(),o=(t.text||t.id).toString(),a=this._highlightPartialText(s,o),r=document.createElement("div");if(r.setAttribute("style","line-height:1.2;font-weight:500;"),this.options.allowUnsafeHTML){r.innerHTML=o;let l=document.createTreeWalker(r,NodeFilter.SHOW_TEXT);for(let u=l.nextNode();u;u=l.nextNode()){let[f,p]=this._highlightPartialText(s,u.data);if(!p)continue;let v=u.splitText(f.length);v.splitText(p.length);let g=document.createElement("span");g.classList.add("highlight"),v.replaceWith(g),g.append(v);break}}else if(r.appendChild(document.createTextNode(a[0])),a[1]){let l=document.createElement("span");l.textContent=a[1],l.classList.add("highlight"),r.appendChild(l),r.appendChild(document.createTextNode(a[2]))}let h=document.createElement("div");if(h.classList.add("item-text"),h.setAttribute("style","padding:5px;overflow:hidden;"),e.appendChild(h),h.appendChild(r),typeof t.description=="string"||typeof t.description=="number"&&!isNaN(t.description)){let l=document.createElement("small");l.setAttribute("style","line-height:1.3;color:grey;white-space:nowrap;text-overflow:ellipsis;display:block;width:90%;overflow:hidden;"),l.innerText=t.description,h.appendChild(l)}let c=()=>this.options.isMultiSelect?t.image?"40px min-content auto":"40px auto":t.image?"min-content auto":"auto";return e.style.gridTemplateColumns=c(),e}_renderMenu(){this._resetAutocomplete(),this.menuItems.length===0&&(this.menuItems=this.selectedValues);for(let t=0;t<this.menuItems.length;t++){let e=this._createMenuItem(this.menuItems[t]);this.container.append(e)}}_setStatusLoading(){let t=this._statusInfo;t&&t.replaceChildren(O._loadingIndicator()),this._announce(this.options.i18n.loading)}_announce(t){if(!this._announcer)return;let e=this.el.matches(":focus")&&this.el.value.length>=this.options.minLength?t:"";this._announcer.textContent!==e&&(this._announcer.textContent=e)}_resultsMessage(t){return t?this.options.i18n.results(t):this.options.i18n.noResults}_updateSelectedInfo(){let t=this._statusInfo;t&&(this.options.isMultiSelect?t.textContent=this.selectedValues.length.toString():t.replaceChildren())}_refreshInputText(){if(this.selectedValues.length===1){let t=this.selectedValues[0];this.el.value=t.text||t.id}}_triggerChanged(){this.el.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0,composed:!0})),typeof this.options.onAutocomplete=="function"&&this.options.onAutocomplete.call(this,this.selectedValues)}setMenuItems(t,e=null,i=!0){if(this.el.Expressive_Autocomplete!==this)return;let s=t.length;this.menuItems=t,e&&(this.selectedValues=this.menuItems.filter(o=>e.indexOf(o.id)!==-1)),this.options.isMultiSelect?i||this._renderMenu():this._refreshInputText(),i&&this.open(),this._updateSelectedInfo(),this._announce(i?this._resultsMessage(s):""),e&&this._triggerChanged()}selectOption(t){let e=this.menuItems.find(i=>i.id==t);e&&(this.options.isMultiSelect?(this.selectedValues.some(i=>i.id===e.id)?this.selectedValues=this.selectedValues.filter(i=>i.id!==e.id):this.selectedValues.push(e),this._renderMenu(),this.el.focus()):(this.selectedValues=[e],this._refreshInputText(),this._resetAutocomplete(),this.close()),this._updateSelectedInfo(),this.options.isMultiSelect&&this._announce(this.options.i18n.selected(this.selectedValues.length)),this._triggerChanged())}};O._loadingTemplate=null;var V=O;var Ke={data:[],placeholder:"",secondaryPlaceholder:"",closeIconClass:"material-symbols",autocompleteOptions:{},autocompleteOnly:!1,limit:1/0,allowUserInput:!1,i18n:{remove:"Remove"},onChipAdd:null,onChipSelect:null,onChipDelete:null},w=class w extends E{constructor(t,e){super(t,e,w);this._handleChipClick=t=>{let e=t.target.closest(".chip"),i=!!t.target.closest(".close");if(e){let s=this._chips.indexOf(e);if(s<0)return;i?this._deleteChip(s,"input"):this.selectChip(s)}else this._input.focus()};this._handleInputFocus=()=>{this.el.classList.add("focus")};this._handleInputBlur=()=>{this.el.classList.remove("focus")};this._handleInputKeydown=t=>{if(w._keydown=!0,t.key===m.keys.ENTER){if(this.hasAutocomplete&&this.autocomplete?.isOpen&&this.autocomplete.container.querySelector('[role="option"]'))return;t.preventDefault(),(!this.hasAutocomplete||!this.options.autocompleteOnly)&&this.addChip({id:this._input.value}),this._input.value=""}else(t.key===m.keys.BACKSPACE||t.key===m.keys.ARROW_LEFT)&&this._input.value===""&&this.chipsData.length&&(t.preventDefault(),this.selectChip(this.chipsData.length-1))};this.el.Expressive_Chips=this,this.options={...w.defaults,...e},e?.i18n&&(this.options.i18n={...w.defaults.i18n,...e.i18n}),this.el.classList.add("chips"),this.chipsData=[],this._chips=[],this.options.data.length&&(this.chipsData=this.options.data,this._renderChips()),this.options.allowUserInput&&(this.el.classList.add("field"),this._setupInput(),this._setupEventHandlers(),this.el.append(this._input)),this._setupLabel()}_setSelected(t){this._selectedChip?.classList.remove("selected"),this._selectedChip=t,t?.classList.add("selected")}static get defaults(){return Ke}static init(t,e={}){return super.init(t,e,w)}static getInstance(t){return t.Expressive_Chips}getData(){return this.chipsData}destroy(){this.autocomplete&&V.getInstance(this._input)===this.autocomplete&&this.autocomplete.destroy(),this.options.allowUserInput&&this._removeEventHandlers(),this._chips.forEach(t=>t.remove()),this._chips=[],this.el.Expressive_Chips=void 0}_setupEventHandlers(){this.el.addEventListener("click",this._handleChipClick),this.el.addEventListener("keydown",w._handleChipsKeydown),this.el.addEventListener("keyup",w._handleChipsKeyup),this.el.addEventListener("blur",w._handleChipsBlur,!0),this._input.addEventListener("focus",this._handleInputFocus),this._input.addEventListener("blur",this._handleInputBlur),this._input.addEventListener("keydown",this._handleInputKeydown)}_removeEventHandlers(){this.el.removeEventListener("click",this._handleChipClick),this.el.removeEventListener("keydown",w._handleChipsKeydown),this.el.removeEventListener("keyup",w._handleChipsKeyup),this.el.removeEventListener("blur",w._handleChipsBlur,!0),this._input.removeEventListener("focus",this._handleInputFocus),this._input.removeEventListener("blur",this._handleInputBlur),this._input.removeEventListener("keydown",this._handleInputKeydown)}static _handleChipsKeydown(t){w._keydown=!0;let e=t.target.closest(".chips"),i=t.target.tagName;if(i==="INPUT"||i==="TEXTAREA"||!e)return;let s=e.Expressive_Chips;if(s){if(t.key===m.keys.BACKSPACE||t.key===m.keys.DELETE){let o=s._chips.indexOf(t.target.closest(".chip"));if(o<0)return;t.preventDefault(),s._deleteChip(o,"previous")}else if(t.key===m.keys.ARROW_LEFT){if(s._selectedChip){let o=s._chips.indexOf(s._selectedChip)-1;if(o<0)return;s.selectChip(o)}}else if(t.key===m.keys.ARROW_RIGHT&&s._selectedChip){let o=s._chips.indexOf(s._selectedChip)+1;o>=s.chipsData.length?(s._setSelected(null),s._input.focus()):s.selectChip(o)}}}static _handleChipsKeyup(){w._keydown=!1}static _handleChipsBlur(t){if(!w._keydown&&document.hidden){let i=t.target.closest(".chips")?.Expressive_Chips;i&&i._setSelected(null)}}_renderChip(t){if(!t.id&&t.id!==0)return;let e=t.text||t.id,i=document.createElement("span");if(i.classList.add("chip"),i.innerText=e,t.image){let s=document.createElement("img");s.setAttribute("src",t.image),i.insertBefore(s,i.firstChild)}if(this.options.allowUserInput){let s=document.createElement("button");s.type="button",s.classList.add("close"),s.setAttribute("aria-label",`${this.options.i18n.remove} ${e}`);let o=document.createElement("span");o.classList.add(this.options.closeIconClass),o.setAttribute("aria-hidden","true"),o.innerText="close",s.appendChild(o),i.appendChild(s)}return i}_renderChips(){this._chips=[];for(let t=0;t<this.chipsData.length;t++){let e=this._renderChip(this.chipsData[t]);this.el.appendChild(e),this._chips.push(e)}}_setupAutocomplete(){this.options.autocompleteOptions.onAutocomplete=t=>{w.getInstance(this.el)===this&&t.length>0&&(this.addChip({id:t[0].id,text:t[0].text,image:t[0].image}),this._input.value="",this._input.focus())},this.autocomplete=V.init(this._input,this.options.autocompleteOptions)}_setupInput(){this._input=this.el.querySelector("input"),this._input||(this._input=document.createElement("input"),this.el.append(this._input)),this._input.classList.add("input"),this.hasAutocomplete=Object.keys(this.options.autocompleteOptions).length>0,this.hasAutocomplete&&this._setupAutocomplete(),this._setPlaceholder(),this._input.getAttribute("id")||this._input.setAttribute("id",m.guid())}_setupLabel(){this._label=this.el.querySelector("label"),this._label&&this._input&&this._label.setAttribute("for",this._input.getAttribute("id"))}_setPlaceholder(){this._input&&(!this.chipsData.length&&this.options.placeholder?this._input.placeholder=this.options.placeholder:this.chipsData.length&&this.options.secondaryPlaceholder&&(this._input.placeholder=this.options.secondaryPlaceholder))}_isValidAndNotExist(t){let e=!!t.id||t.id===0,i=!this.chipsData.some(s=>s.id==t.id);return e&&i}addChip(t){if(!this._isValidAndNotExist(t)||this.chipsData.length>=this.options.limit)return;let e=this._renderChip(t);this._chips.push(e),this.chipsData.push(t),this._input?this._input.before(e):this.el.append(e),this._setPlaceholder(),typeof this.options.onChipAdd=="function"&&this.options.onChipAdd(this.el,e)}deleteChip(t){let e=this.el.getRootNode();this._deleteChip(t,this._chips[t]?.contains(e.activeElement)?"input":null)}_deleteChip(t,e){let i=this._chips[t];if(!i)return;this._selectedChip===i&&this._setSelected(null),i.remove(),this._chips.splice(t,1),this.chipsData.splice(t,1),this._setPlaceholder();let s=[],o=this.el.getRootNode();for(;o;)s.push({root:o,element:o.activeElement}),o="host"in o?o.host.getRootNode():null;typeof this.options.onChipDelete=="function"&&this.options.onChipDelete(this.el,i),!(!e||s.some(({root:a,element:r})=>a.activeElement!==r)||this.el.Expressive_Chips!==this)&&(e==="previous"&&this._chips.length?this.selectChip(Math.max(t-1,0)):(this._setSelected(null),this._input?.focus()))}selectChip(t){let e=this._chips[t];e&&(this._setSelected(e),e.querySelector(".close")?.focus(),typeof this.options.onChipSelect=="function"&&this.options.onChipSelect(this.el,e))}static Init(){m.onDocumentReady(()=>{document.querySelectorAll(".chips").forEach(e=>{e.addEventListener("click",i=>{if(!e.Expressive_Chips&&i.target.closest(".close")){let s=i.target.closest(".chip");s&&s.remove()}})})})}};w._keydown=!1;var K=w;var Ue={},It=new WeakMap,j=class d extends E{constructor(t,e){super(t,e,d);this._resizeObserver=null;this._handleRangeChange=()=>{this._clampDual(),this._sync(),this.thumb.classList.add("active")};this._handleRangePointerDown=t=>{t.isPrimary&&(t.pointerType==="mouse"&&t.button!==0||(this._pointerDown=!0,this.el.classList.add("active"),this._clampDual(),this._sync(),this.thumb.classList.add("active")))};this._handleRangeInput=()=>{this._clampDual(),this._sync(),this.thumb.classList.add("active")};this._handleRangePointerUp=t=>{t.isPrimary&&(this._pointerDown=!1,this.el.classList.remove("active"))};this._handleRangeRelease=()=>{this._pointerDown||this.thumb.classList.remove("active")};this.el.Expressive_Slider=this,this.options={...d.defaults,...e},this._pointerDown=!1,this._setupThumb(),this._sync(),this._setupEventHandlers(),typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(()=>this._sync()),this._resizeObserver.observe(this.el))}static get defaults(){return Ue}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_Slider}destroy(){this._resizeObserver?.disconnect(),this._removeEventHandlers(),this._removeThumb(),this.el.Expressive_Slider=void 0;let t=this._host();for(let e of[this.el,t]){for(let i in It.get(e))e.style.setProperty(i,It.get(e)[i]);It.delete(e)}t?.querySelectorAll('input[type="range"]').forEach(e=>e.Expressive_Slider?._sync())}_set(t,e,i){let s=It.get(t)??{};It.set(t,s),s[e]??(s[e]=t.style.getPropertyValue(e)),t.style.setProperty(e,i)}_setupEventHandlers(){this.el.addEventListener("change",this._handleRangeChange),this.el.addEventListener("pointerdown",this._handleRangePointerDown),this.el.addEventListener("input",this._handleRangeInput),this.el.addEventListener("pointerup",this._handleRangePointerUp),this.el.addEventListener("pointercancel",this._handleRangePointerUp),this.el.addEventListener("blur",this._handleRangeRelease),this.el.addEventListener("mouseout",this._handleRangeRelease)}_removeEventHandlers(){this.el.removeEventListener("change",this._handleRangeChange),this.el.removeEventListener("pointerdown",this._handleRangePointerDown),this.el.removeEventListener("input",this._handleRangeInput),this.el.removeEventListener("pointerup",this._handleRangePointerUp),this.el.removeEventListener("pointercancel",this._handleRangePointerUp),this.el.removeEventListener("blur",this._handleRangeRelease),this.el.removeEventListener("mouseout",this._handleRangeRelease)}_setupThumb(){this.thumb=document.createElement("span"),this.value=document.createElement("span"),this.thumb.classList.add("thumb"),this.value.classList.add("value"),this.thumb.append(this.value),this.el.after(this.thumb)}_removeThumb(){this.thumb.remove()}_isVertical(){return!!this.el.closest(".vertical")}_host(){return this.el.closest(".slider, .range, .range-field, label")}_clampDual(){let e=this._host()?.querySelectorAll('input[type="range"]');if(!e||e.length!==2)return;let i=e[0],s=e[1];this.el===i&&+i.value>+s.value&&(i.value=s.value),this.el===s&&+s.value<+i.value&&(s.value=i.value)}_bounds(t){let e=parseFloat(t.max);return{max:Number.isNaN(e)?100:e,min:parseFloat(t.min)||0}}_fraction(t){let{max:e,min:i}=this._bounds(t),s=parseFloat(t.value)||0;return e===i?0:(s-i)/(e-i)}_sync(){let t=this._fraction(this.el),e=`${t*100}%`,i=this.el.offsetLeft,s=this.el.offsetTop,o=this.el.offsetWidth,a=this.el.offsetHeight,r=getComputedStyle(this.el),h=r.direction==="rtl",c=this._isVertical(),l=parseFloat(r.getPropertyValue("--md-comp-slider-handle-width"))||4,u=c?a:o,f=l/2+t*(u-l);this._set(this.el,"--md-comp-slider-active-fraction",e),this._set(this.el,"--md-comp-slider-active-position",`${f}px`);let p=this._host(),v=p?.querySelectorAll('input[type="range"]');if(p&&v&&v.length===2){let g=Array.from(v).map(L=>this._fraction(L));this._set(p,"--md-comp-slider-start-fraction",`${Math.min(...g)*100}%`),this._set(p,"--md-comp-slider-end-fraction",`${Math.max(...g)*100}%`),this._set(p,"--md-comp-slider-start-position",`${l/2+Math.min(...g)*(u-l)}px`),this._set(p,"--md-comp-slider-end-position",`${l/2+Math.max(...g)*(u-l)}px`)}if(p?.classList.contains("stops")){let{max:g,min:L}=this._bounds(this.el),y=parseFloat(this.el.step),S=y>0&&Number.isFinite(y)&&g>L;this._set(p,"--md-comp-slider-stop-count",S?String(Math.floor((g-L)/y+1e-9)+1):""),this._set(p,"--md-comp-slider-stop-spacing",S?`${(u-l)*y/(g-L)}px`:""),v?.length===1&&(this._set(p,"--md-comp-slider-active-position",`${f}px`),this._set(p,"--md-comp-slider-track-center",`${s+a/2}px`))}this.value.textContent=this.el.value,c?(this.thumb.style.left=`${i+o/2}px`,this.thumb.style.top=`${s+a-f}px`):(this.thumb.style.left=`${i+(h?o-f:f)}px`,this.thumb.style.top=`${s}px`)}static Init(){m.onDocumentReady(()=>{d.init(document.querySelectorAll("input[type=range]"))})}};var I=class I{static Init(){m.onDocumentReady(()=>{document.addEventListener("pointerdown",I._onPointerDown,{passive:!0}),document.addEventListener("pointerup",I._onPointerUp,{passive:!0}),document.addEventListener("pointercancel",I._onPointerCancel,{passive:!0})})}static _onPointerDown(n){let t=I._isPrimaryPress(n)?I._backdropDialog(n):null;I._down=t&&I._lightDismissible(t)&&I._outside(n,t)?{dialog:t,pointerId:n.pointerId}:null}static _onPointerUp(n){let t=I._down;I._down=null,!(!t||t.pointerId!==n.pointerId)&&n.isPrimary&&(!t.dialog.isConnected||!t.dialog.open||I._lightDismissible(t.dialog)&&I._backdropDialog(n)===t.dialog&&I._outside(n,t.dialog)&&t.dialog.close())}static _onPointerCancel(){I._down=null}static _backdropDialog(n){let t=n.target;return!(t instanceof HTMLDialogElement)||!t.open?null:t}static _outside(n,t){let e=t.getBoundingClientRect();return n.clientX<e.left||n.clientX>e.right||n.clientY<e.top||n.clientY>e.bottom}static _isPrimaryPress(n){return n.isPrimary?n.pointerType!=="mouse"||n.button===0:!1}static _lightDismissible(n){let t=I._closedBy(n);return!(t==="none"||t==="closerequest"||t==="any"&&"closedBy"in HTMLDialogElement.prototype)}static _closedBy(n){let t=n.getAttribute("closedby");return t==="any"||t==="closerequest"||t==="none"?t:null}};I._down=null;var Z=I;var Jt=96,te=.5,Ye=100,je=4,ee=new Set;function kt(d){if(ee.has(d.selector))return;ee.add(d.selector);let n=c=>d.axis==="x"?c.clientX:c.clientY,t,e=null,i=c=>{if(!(c instanceof Element))return null;let l=c.closest(d.selector);return l instanceof HTMLDialogElement?l:null},s=c=>{c.style.transition="",c.style.setProperty(d.property,"0px")},o=c=>{if(!c.isPrimary||c.pointerType==="mouse"&&c.button!==0)return;h(),d.onPress?.();let l=i(c.target);if(!l?.open||!d.inHandle(c,l))return;l.style.transition="none";let u=n(c);e={dialog:l,pointerId:c.pointerId,direction:d.direction(l),start:u,last:u,lastT:Date.now(),velocity:0,shift:0},t.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["open"],attributeOldValue:!0})},a=c=>{if(!e||e.pointerId!==c.pointerId)return;if(!e.dialog.open||!e.dialog.isConnected){h();return}let l=n(c),u=l-e.start;if(e.shift=e.direction===1?Math.max(0,u):Math.min(0,u),l!==e.last){let f=Date.now();e.velocity=(l-e.last)/Math.max(1,f-e.lastT),e.last=l,e.lastT=f}e.dialog.style.setProperty(d.property,`${e.shift}px`)},r=c=>{let l=e;if(!l||l.pointerId!==c.pointerId)return;if(!l.dialog.open||!l.dialog.isConnected){h();return}a(c),e=null,t.disconnect(),l.dialog.style.transition="";let u=Date.now()-l.lastT<Ye?l.velocity:0,f=Math.abs(l.shift)>je;d.onRelease?.(f),f&&(l.direction===1?l.shift>Jt||u>te:l.shift<-Jt||u<-te)&&l.dialog.open&&l.dialog.close(),l.dialog.style.setProperty(d.property,"0px")},h=c=>{if(c&&e?.pointerId!==c.pointerId)return;t.disconnect(),d.onRelease?.(!1);let l=e;e=null,l&&s(l.dialog)};m.onDocumentReady(()=>{t=new MutationObserver(c=>{let l=e?.dialog;l&&(!l.open||!l.isConnected||c.some(u=>u.type==="attributes"&&u.target===l&&u.oldValue===null||[...u.removedNodes].some(f=>f.contains(l))))&&h()}),document.addEventListener("pointerdown",o,{passive:!0}),document.addEventListener("pointermove",a,{passive:!0}),document.addEventListener("pointerup",r,{passive:!0}),document.addEventListener("pointercancel",h,{passive:!0})})}var ie="dialog.bottom-sheet, dialog.bottom",X=class X{static Init(){kt({selector:ie,axis:"y",property:"--md-comp-bottom-sheet-shift",direction:()=>1,inHandle:(n,t)=>{let e=n.target;if(e instanceof Element&&e.closest(".handle"))return!0;let i=t.getBoundingClientRect();return n.clientY>=i.top&&n.clientY<=i.top+48},onPress:()=>{X._dragged=!1},onRelease:n=>{X._dragged=n}}),m.onDocumentReady(()=>{document.addEventListener("click",X._onClick)})}static _onClick(n){let t=n.target;if(!(t instanceof Element))return;let e=t.closest(".handle, .drag-handle");if(!(e instanceof HTMLButtonElement)||n.detail!==0&&X._dragged)return;let i=e.closest(ie);i instanceof HTMLDialogElement&&i.open&&i.close()}};X._dragged=!1;var Q=X;var Xe=d=>d.classList.contains("left")||d.classList.contains("left-sheet")||d.classList.contains("start"),se=d=>Xe(d)!==(getComputedStyle(d).direction==="rtl"),J=class{static Init(){kt({selector:"dialog.side-sheet, dialog.right, dialog.right-sheet, dialog.left, dialog.left-sheet",axis:"x",property:"--md-comp-side-sheet-shift",direction:n=>se(n)?-1:1,inHandle:(n,t)=>{let e=n.target;if(e instanceof Element&&e.closest("header"))return!0;let i=t.getBoundingClientRect();return se(t)?n.clientX>=i.right-24&&n.clientX<=i.right:n.clientX>=i.left&&n.clientX<=i.left+24}})}};var A=class A{static validateField(n){if(!n){console.error("No text field element found");return}let t=n.getAttribute("data-length")!==null,e=parseInt(n.getAttribute("data-length")),i=n.value.length;i===0&&n.validity.badInput===!1&&!n.required&&n.classList.contains("validate")?n.classList.remove("invalid"):n.classList.contains("validate")&&(n.validity.valid&&(!t||i<=e)?n.classList.remove("invalid"):n.classList.add("invalid"))}static textareaAutoResize(n){let t=n;if(!t)return;t.hasAttribute("original-height")||t.setAttribute("original-height",t.getBoundingClientRect().height.toString());let e=parseInt(t.getAttribute("original-height"));if(isNaN(e))return;t.style.height="auto";let i=t.offsetHeight-t.clientHeight,s=t.scrollHeight+i;t.style.height=Math.max(e,s)+"px"}static Init(){A._initialized||(A._initialized=!0,m.onDocumentReady(()=>{document.addEventListener("change",n=>{let t=n.target;if(t instanceof HTMLInputElement){if(t.type==="file"){let e=t.closest(".drop-zone");e&&A.listDropZoneFiles(e,t)}A.validateField(t)}}),document.addEventListener("keyup",n=>{let t=n.target;t instanceof HTMLInputElement&&["radio","checkbox"].includes(t.type)&&n.key===m.keys.TAB&&(t.classList.add("tabbed"),t.addEventListener("blur",()=>t.classList.remove("tabbed"),{once:!0}))}),document.addEventListener("click",A.togglePassword),document.addEventListener("submit",A.resetFormExtras,!0),document.addEventListener("reset",A.resetFormExtras,!0);for(let n of["dragenter","dragover","dragleave","drop"])document.addEventListener(n,A.markDropZone);document.querySelectorAll(".expressive-textarea").forEach(n=>{A.InitTextarea(n)}),document.querySelectorAll('.file-field input[type="file"]').forEach(n=>{A.InitFileInputPath(n)})}))}static togglePassword(n){let t=n.target.closest?.(".password-toggle"),e=t?.closest(".field")?.querySelector('input[type="password"], input[data-password]');if(!e)return;let i=e.type==="password";e.toggleAttribute("data-password",i),e.type=i?"text":"password",t.setAttribute("aria-pressed",String(i))}static resetFormExtras(n){let t=n.target;t instanceof HTMLFormElement&&(t.querySelectorAll("input[data-password]").forEach(e=>{e.removeAttribute("data-password"),e.type="password",e.closest(".field")?.querySelector(".password-toggle")?.setAttribute("aria-pressed","false")}),n.type==="reset"&&(t.querySelectorAll(".drop-zone-files").forEach(e=>e.replaceChildren()),t.querySelectorAll(".drop-zone.dragover").forEach(e=>e.classList.remove("dragover"))))}static markDropZone(n){let t=n.target;if(!(t instanceof HTMLInputElement)||t.type!=="file")return;let e=t.closest(".drop-zone");if(!e)return;let i=n.type==="dragenter"||n.type==="dragover";e.classList.toggle("dragover",i&&!t.disabled)}static listDropZoneFiles(n,t){let e=n.querySelector(".drop-zone-files");if(!e)return;let i=s=>{let[o,a]=s>=1e6?[s/1e6,"megabyte"]:s>=1e3?[s/1e3,"kilobyte"]:[s,"byte"];return new Intl.NumberFormat(void 0,{style:"unit",unit:a,maximumFractionDigits:1}).format(o)};e.replaceChildren(...Array.from(t.files??[],s=>{let o=document.createElement("li"),a=document.createElement("span"),r=document.createElement("span");return a.textContent=s.name,r.textContent=i(s.size),o.append(a,r),o}))}static InitTextarea(n){n.setAttribute("original-height",n.getBoundingClientRect().height.toString()),A.textareaAutoResize(n),n.addEventListener("input",t=>A.textareaAutoResize(t.target))}static InitFileInputPath(n){n.addEventListener("change",()=>{let e=n.closest(".file-field").querySelector("input.file-path");e.value=Array.from(n.files,i=>i.name).join(", "),e.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0,composed:!0}))})}};A._initialized=!1;var tt=A;var Ge={},et=class d extends E{constructor(t,e){super(t,e,d);this._observer=null;this._sentinel=null;this._input=null;this._view=null;this._searchOpen=!1;this._onIntersect=t=>{let e=t[0];e&&this.el.classList.toggle("collapsed",!e.isIntersecting&&e.boundingClientRect.top<this.el.getBoundingClientRect().top)};this._onSearchViewClose=()=>{this._searchOpen=this._view.open};this._onSearchFocus=()=>{if(!(!this._view||this._searchOpen)){if(this._view instanceof HTMLDialogElement){this._searchOpen=!0,this._view.open||this._view.showModal();return}this._view.hidden=!1,this._input?.setAttribute("aria-expanded","true")}};this.el.Expressive_AppBar=this,this.options={...d.defaults,...e},this._setupCollapse(),this._setupSearch()}static get defaults(){return Ge}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_AppBar}destroy(){this._observer?.disconnect(),this._observer=null,this._sentinel?.remove(),this._sentinel=null,this._input?.removeEventListener("focus",this._onSearchFocus),this._input?.removeEventListener("click",this._onSearchFocus),this._view?.removeEventListener("close",this._onSearchViewClose),this.el.classList.remove("collapsed"),this.el.Expressive_AppBar=void 0}_setupCollapse(){!this.el.classList.contains("medium")&&!this.el.classList.contains("large")||typeof IntersectionObserver>"u"||(this._sentinel=document.createElement("span"),this._sentinel.setAttribute("aria-hidden","true"),this._sentinel.style.cssText="display:block;height:0;position:relative;top:-64px;pointer-events:none;visibility:hidden",this.el.insertAdjacentElement("afterend",this._sentinel),this._observer=new IntersectionObserver(this._onIntersect),this._observer.observe(this._sentinel))}_setupSearch(){if(this._input=this.el.querySelector('input[type="search"]'),!this._input)return;let t=this._input.getAttribute("aria-controls");this._view=t&&document.getElementById(t)||this.el.querySelector(".search-view"),this._view&&(this._input.addEventListener("focus",this._onSearchFocus),this._input.addEventListener("click",this._onSearchFocus),this._view instanceof HTMLDialogElement&&this._view.addEventListener("close",this._onSearchViewClose))}};var Ze={},it=class d extends E{constructor(t,e){super(t,e,d);this.open=()=>{this.isOpen||(this.isOpen=!0,this._list&&(this._list.inert=!1),this.el.classList.add("active"),this._anchor?.setAttribute("aria-expanded","true"),document.addEventListener("click",this._handleDocumentClick),document.addEventListener("keydown",this._handleDocumentKeydown))};this.close=()=>{if(!this.isOpen)return;let t=this.el.getRootNode().activeElement;t&&this._list?.contains(t)&&this._anchor?.focus(),this._list&&(this._list.inert=!0),this.isOpen=!1,this.el.classList.remove("active"),this._anchor?.setAttribute("aria-expanded","false"),document.removeEventListener("click",this._handleDocumentClick),document.removeEventListener("keydown",this._handleDocumentKeydown)};this._handleFABClick=t=>{let e=t.target;if(!(e instanceof Element))return;let i=e.closest("a, button");!i||i.matches(':disabled, [aria-disabled="true"]')||(i===this._anchor?this._toggle():this._list?.contains(i)&&this.close())};this._handleAnchorKeydown=t=>{(t.key===m.keys.ENTER||t.key===" ")&&(t.preventDefault(),this._toggle())};this._handleDocumentKeydown=t=>{t.key===m.keys.ESC&&!t.defaultPrevented&&this.close()};this._handleDocumentClick=t=>{t.composedPath().includes(this.el)||this.close()};this.el.Expressive_FloatingActionButton=this,this.options={...d.defaults,...e},this.isOpen=!1,this._anchor=this.el.querySelector(":scope > a, :scope > button"),this._list=this.el.querySelector(":scope > ul, :scope > menu"),this._listWasInert=this._list?.inert??!1,this.el.classList.remove("active"),this._list&&(this._list.inert=!0),this._anchor?.setAttribute("aria-expanded","false"),this._anchor instanceof HTMLAnchorElement&&!this._anchor.hasAttribute("href")&&(this._anchor.tabIndex<0&&(this._anchor.tabIndex=0),this._anchor.addEventListener("keydown",this._handleAnchorKeydown)),this.el.addEventListener("click",this._handleFABClick)}static get defaults(){return Ze}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_FloatingActionButton}destroy(){this.close(),this._list&&(this._list.inert=this._listWasInert),this.el.removeEventListener("click",this._handleFABClick),this._anchor?.removeEventListener("keydown",this._handleAnchorKeydown),this.el.Expressive_FloatingActionButton=void 0}_toggle(){this.isOpen?this.close():this.open()}};var Qe={},Je=new Set(["single","multiple"]),ne="button-group-pressed",ti=.15,st=class d extends E{constructor(t,e={}){super(t,e,d);this._pressedStyles=new Map;this._releaseStyles=new Map;this._releaseTimer=null;this._originalPressed=new Map;this._activeItem=null;this._handleClick=t=>{if(!this._selectionMode)return;let e=this._itemFromEvent(t);if(!(e instanceof HTMLButtonElement)||this._isDisabled(e))return;this._rememberPressed(e);let i=e.getAttribute("aria-pressed")!=="true",s=this._toggleItems.filter(o=>o.getAttribute("aria-pressed")==="true").length;!i&&this.el.hasAttribute("data-selection-required")&&s===1||(this._selectionMode==="single"&&i&&this._toggleItems.forEach(o=>{this._rememberPressed(o),o.setAttribute("aria-pressed","false")}),e.setAttribute("aria-pressed",i?"true":"false"))};this._handlePointerDown=t=>{if(t.button!==0)return;let e=this._itemFromEvent(t);e&&!this._isDisabled(e)&&this._startPress(e)};this._handleKeyDown=t=>{if(t.repeat||t.key!==" "&&t.key!=="Enter")return;let e=this._itemFromEvent(t);e&&!this._isDisabled(e)&&this._startPress(e)};this._handleKeyUp=t=>{(t.key===" "||t.key==="Enter")&&this._resetPress()};this._handleFocusOut=t=>{t.target===this._activeItem&&this._resetPress()};this._resetPress=()=>{if(this._activeItem?.classList.remove(ne),this._activeItem=null,!!this._pressedStyles.size){this._finishRelease(),this._releaseStyles=new Map(this._pressedStyles);for(let[t,e]of this._releaseStyles)t.style.width=`${e.baseWidth}px`;this._pressedStyles.clear(),this._releaseTimer=window.setTimeout(this._finishRelease,200)}};this._finishRelease=()=>{this._releaseTimer!==null&&window.clearTimeout(this._releaseTimer),this._releaseTimer=null;for(let[t,e]of this._releaseStyles)t.style.width=e.width;this._releaseStyles.clear()};this.el.Expressive_ButtonGroup=this,this.options={...d.defaults,...e},this._selectionMode&&(this._normalizeSelection(),this.el.addEventListener("click",this._handleClick,!0)),this.el.addEventListener("pointerdown",this._handlePointerDown),this.el.addEventListener("keydown",this._handleKeyDown),this.el.addEventListener("focusout",this._handleFocusOut),document.addEventListener("pointerup",this._resetPress),document.addEventListener("pointercancel",this._resetPress),document.addEventListener("keyup",this._handleKeyUp),window.addEventListener("blur",this._resetPress)}static get defaults(){return Qe}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_ButtonGroup}destroy(){this._resetPress(),this._finishRelease(),this.el.removeEventListener("click",this._handleClick,!0),this.el.removeEventListener("pointerdown",this._handlePointerDown),this.el.removeEventListener("keydown",this._handleKeyDown),this.el.removeEventListener("focusout",this._handleFocusOut),document.removeEventListener("pointerup",this._resetPress),document.removeEventListener("pointercancel",this._resetPress),document.removeEventListener("keyup",this._handleKeyUp),window.removeEventListener("blur",this._resetPress);for(let[t,e]of this._originalPressed)e===null?t.removeAttribute("aria-pressed"):t.setAttribute("aria-pressed",e);this._originalPressed.clear(),this.el.Expressive_ButtonGroup=void 0}get _selectionMode(){let t=this.el.dataset.selection;return Je.has(t)?t:null}get _items(){return Array.from(this.el.children).filter(t=>t instanceof HTMLButtonElement||t instanceof HTMLAnchorElement&&t.classList.contains("button"))}get _toggleItems(){return this._items.filter(t=>t instanceof HTMLButtonElement)}_normalizeSelection(){let t=this._toggleItems;t.forEach(e=>{this._rememberPressed(e),["true","false"].includes(e.getAttribute("aria-pressed")||"")||e.setAttribute("aria-pressed","false")}),this._selectionMode==="single"&&t.filter(i=>i.getAttribute("aria-pressed")==="true").slice(1).forEach(i=>i.setAttribute("aria-pressed","false")),this.el.hasAttribute("data-selection-required")&&!t.some(e=>e.getAttribute("aria-pressed")==="true")&&t.find(e=>!this._isDisabled(e))?.setAttribute("aria-pressed","true")}_itemFromEvent(t){if(!(t.target instanceof Element))return null;let e=t.target.closest("button, a.button");return e instanceof HTMLElement&&e.parentElement===this.el?e:null}_isDisabled(t){return t instanceof HTMLButtonElement&&t.disabled||t.getAttribute("aria-disabled")==="true"||t.classList.contains("disabled")}_rememberPressed(t){this._originalPressed.has(t)||this._originalPressed.set(t,t.getAttribute("aria-pressed"))}_startPress(t){if(this._activeItem)return;this._finishRelease();let e=this._items,i=e.indexOf(t);if(i<0||(this._activeItem=t,t.classList.add(ne),this.el.classList.contains("connected")||e.length<2))return;let s=e.map(f=>f.getBoundingClientRect()),o=s[i].width;if(o<=0)return;let a=Number.parseFloat(getComputedStyle(this.el).getPropertyValue("--md-comp-button-group-pressed-item-width-multiplier")),r=Number.isFinite(a)?a:.15,h=o*r,c=[i-1,i+1].filter(f=>f>=0&&f<e.length),l=new Map;if(c.length===1){let f=c[0];l.set(f,Math.min(h,this._compressionCapacity(e[f],s[f])))}else{let f=h/2;for(let v of c)l.set(v,Math.min(f,this._compressionCapacity(e[v],s[v])));let p=h-[...l.values()].reduce((v,g)=>v+g,0);for(let v of c){if(p<=0)break;let g=this._compressionCapacity(e[v],s[v])-l.get(v),L=Math.min(p,g);l.set(v,l.get(v)+L),p-=L}}let u=[...l.values()].reduce((f,p)=>f+p,0);u<=0||(e.forEach((f,p)=>{this._pressedStyles.set(f,{width:f.style.width,baseWidth:s[p].width}),f.style.width=`${s[p].width}px`}),this.el.offsetWidth,e.forEach((f,p)=>{let v=p===i?u:-(l.get(p)||0);f.style.width=`${s[p].width+v}px`}))}_compressionCapacity(t,e){let i=t.classList.contains("icon-button")?e.width*(1-ti):e.height;return Math.max(0,e.width-i)}};var ei={duration:200,fullWidth:!1,indicators:!1,noWrap:!1,interval:0,height:null,onCycleTo:null,i18n:{carousel:"Carousel",item:"Item",of:"of",indicators:"Slides",slide:"Slide"}},St='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',C=class C extends E{constructor(t,e){super(t,e,C);this.center=0;this._ownIndicators=!1;this._trackEl=null;this._ignoreScroll=!1;this._alignAfterResize=!1;this._trackRaf=null;this._started=!1;this._vertical=!1;this._resizeObserver=null;this._resizeTimeout=null;this._usesWindowResize=!1;this._dragPointerId=null;this._dragStartX=0;this._dragStartY=0;this._dragStartScroll=0;this._suppressClick=!1;this._suppressClickTimeout=null;this._generatedContainerRole=!1;this._generatedContainerLabel=!1;this._generatedContainerDescription=!1;this._generatedWideLayout=!1;this._generatedFixedHeight=!1;this._authoredInlineHeight=null;this._autoAdvanceTimer=null;this._autoAdvances=!1;this._autoPaused=!1;this._hovered=!1;this._focused=!1;this._motion=window.matchMedia("(prefers-reduced-motion: reduce)");this._generatedItemTabIndexes=new Set;this._generatedItemLabels=new Set;this._generatedItemDescriptions=new Set;this._generatedItemSizes=new Set;this._authoredItemSizes=new Set;this._itemA11yOriginal=new Map;this._handleThrottledResize=()=>{!this._started||this._resizeTimeout!==null||(this._handleResize(),this._resizeTimeout=setTimeout(()=>{this._resizeTimeout=null,this._handleResize()},200))};this._handleAutoAdvanceState=t=>{t.type==="mouseenter"?this._hovered=!0:t.type==="mouseleave"?this._hovered=!1:t.type==="focusin"?this._focused=!0:t.type==="focusout"&&(this._focused=this.el.contains(t.relatedTarget)),this._syncAutoAdvance()};this._handleMotionChange=()=>{this._syncAutoAdvance(),this._motion.matches&&this._scrollToIndex(this.center,!1),this._updateParallax()};this._tick=()=>{this._autoAdvanceTimer=null,this._advance(),this._syncAutoAdvance()};this._advance=()=>{let t=this.center+1;if(t<this.count){this.set(t);return}if(this.options.noWrap){this._autoAdvances=!1,this._syncAutoAdvance();return}this.set(0)};this._handleNativeScroll=()=>{this._alignAfterResize=!1,this._finishScroll()};this._handleTrackPointerDown=t=>{this._handleNativeScroll(),!(t.pointerType!=="mouse"||t.button!==0)&&(this.pressed=!0,this.dragged=!1,this._suppressClick=!1,this._dragPointerId=t.pointerId,this._dragStartX=t.clientX,this._dragStartY=t.clientY,this._dragStartScroll=this._vertical?this._scroller.scrollTop:this._scroller.scrollLeft,this._setDragListeners(!0))};this._handleTrackPointerMove=t=>{if(!this.pressed||t.pointerId!==this._dragPointerId)return;let e=t.clientX-this._dragStartX,i=t.clientY-this._dragStartY,s=this._vertical?i:e,o=this._vertical?e:i;if(!this.dragged){if(Math.abs(s)<6||Math.abs(s)<=Math.abs(o))return;this.dragged=!0,this.el.classList.add("dragging");try{this._scroller.setPointerCapture(t.pointerId)}catch{}}this._vertical?this._scroller.scrollTop=this._dragStartScroll-i:this._scroller.scrollLeft=this._dragStartScroll-e,t.preventDefault()};this._handleTrackPointerUp=t=>{if(!(!this.pressed||t.pointerId!==this._dragPointerId)){this.pressed=!1,this._dragPointerId=null,this._setDragListeners(!1),this.el.classList.remove("dragging");try{this._scroller.releasePointerCapture(t.pointerId)}catch{}this.dragged&&(this._suppressClick=!0,window.clearTimeout(this._suppressClickTimeout),this._suppressClickTimeout=setTimeout(()=>{this._suppressClick=!1},0),this._syncActive(this._nearestIndex(),!0))}};this._handleTrackClick=t=>{this._suppressClick&&(this._suppressClick=!1,t.preventDefault(),t.stopImmediatePropagation())};this._handleTrackDragStart=t=>{t.target.closest("a, img, picture, video")&&t.preventDefault()};this._handleItemResize=t=>{this._alignAfterResize&&!this.pressed&&t.propertyName==="flex-basis"&&this.images.includes(t.target)&&this._scrollToIndex(this.center,!1)};this._handleIndicatorClick=t=>{t.stopPropagation();let e=t.target.closest(".indicator-item");if(!e||!this._indicators.contains(e))return;let i=[...this._indicators.children].indexOf(e);i<0||this._cycleTo(i)};this._handleKeydown=t=>{let e=t.target;if(e.isContentEditable||e.closest("input, textarea, select"))return;let i=getComputedStyle(this._scroller).direction==="rtl",s=this._vertical?t.key==="ArrowDown":t.key===(i?m.keys.ARROW_LEFT:m.keys.ARROW_RIGHT),o=this._vertical?t.key==="ArrowUp":t.key===(i?m.keys.ARROW_RIGHT:m.keys.ARROW_LEFT);t.key==="Home"?(t.preventDefault(),this.set(0),this._focusItem(0)):t.key==="End"?(t.preventDefault(),this.set(this.count-1),this._focusItem(this.count-1)):s?(t.preventDefault(),this.next(),this._focusItem(this.center)):o&&(t.preventDefault(),this.prev(),this._focusItem(this.center))};this._handleTrackScroll=()=>{this.el.classList.contains("scrolling")||this.el.classList.add("scrolling"),window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=setTimeout(()=>this.el.classList.remove("scrolling"),120),this._trackRaf===null&&(this._trackRaf=requestAnimationFrame(()=>{this._trackRaf=null;let t=this._ignoreScroll?this.center:this._nearestIndex();this._updateParallax(),t!==this.center&&this._syncActive(t,this.dragged)}))};this._handleResize=()=>{!this._started||!this.images.length||(this._syncAdaptiveMode(),this._syncLayoutRoles(this.center),this.pressed||this._scrollToIndex(this.center,!1),this._updateParallax())};this._finishScroll=()=>{this._ignoreScroll=!1,this._scroller.style.scrollSnapType="",clearTimeout(this._scrollEndTimeout),this._scroller.removeEventListener("scrollend",this._handleScrollEnd)};this._handleScrollEnd=()=>{this._nearestIndex()===this.center&&!this.images.some(t=>t.getAnimations().some(e=>e.playState==="running"))&&this._finishScroll()};if(this.el.Expressive_Carousel=this,this.options={...C.defaults,...e},e?.i18n&&(this.options.i18n={...C.defaults.i18n,...e.i18n}),(this.options.fullWidth||this.el.classList.contains("flat"))&&(this.el.classList.add("flat"),this.options.fullWidth=!0),this._vertical=this.el.classList.contains("full-screen"),this.pressed=!1,this.dragged=!1,this.images=this._collectItems(),!this.images.length){console.error("Carousel: no .carousel-item elements to show");return}this.images.forEach(s=>{this._itemA11yOriginal.set(s,{ariaHidden:s.getAttribute("aria-hidden"),tabIndex:s.getAttribute("tabindex")}),s.hasAttribute("data-carousel-size")&&this._authoredItemSizes.add(s)}),this.hasMultipleSlides=this.images.length>1,this.showIndicators=this.options.indicators&&this.hasMultipleSlides,this.count=this.images.length,this._autoAdvances=this.options.interval>0&&this.hasMultipleSlides,this.images.forEach(s=>s.classList.add("carousel-item")),this.options.height!==null&&(this._generatedFixedHeight=!this.el.classList.contains("fixed-height"),this._authoredInlineHeight=this.el.style.getPropertyValue("--carousel-height")||null,this.el.classList.add("fixed-height"),this.el.style.setProperty("--carousel-height",`${this.options.height}px`)),this._wrapTrack(),this._syncAdaptiveMode(),this.showIndicators&&this._setupIndicators(),this._setupAccessibility(),this._setupEventHandlers(),this._started=!0;let i=Math.max(0,this.images.findIndex(s=>s.classList.contains("active")));this.center=i,this._syncActive(i,!1),this._updateParallax(),this._scrollToIndex(i,!1),this._syncAutoAdvance()}get _scroller(){return this._trackEl??this.el}static get defaults(){return ei}static init(t,e={}){return super.init(t,e,C)}static getInstance(t){return t.Expressive_Carousel}destroy(){this._started&&this._teardown(),this.el.Expressive_Carousel=void 0}_collectItems(){let t=Array.from(this.el.children).filter(e=>e instanceof HTMLElement&&e.classList.contains("carousel-item"));return t.length?t:Array.from(this.el.children).filter(e=>!(e instanceof HTMLElement)||e.classList.contains("indicators")||e.classList.contains("carousel-fixed-item")?!1:e.tagName!=="NAV")}_setupAccessibility(){this.el.hasAttribute("role")||(this.el.setAttribute("role","region"),this._generatedContainerRole=!0),!this.el.hasAttribute("aria-label")&&!this.el.hasAttribute("aria-labelledby")&&(this.el.setAttribute("aria-label",this.options.i18n.carousel),this._generatedContainerLabel=!0),this.el.hasAttribute("aria-roledescription")||(this.el.setAttribute("aria-roledescription","carousel"),this._generatedContainerDescription=!0),this.images.forEach((t,e)=>{if(t.hasAttribute("aria-roledescription")||(t.setAttribute("aria-roledescription","slide"),this._generatedItemDescriptions.add(t)),!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")){let i=t.querySelector("img[alt]")?.getAttribute("alt")?.trim(),s=t.textContent?.replace(/\s+/g," ").trim(),o=i||s,a=`${this.options.i18n.item} ${e+1} ${this.options.i18n.of} ${this.count}`;t.setAttribute("aria-label",o?`${o}, ${a}`:a),this._generatedItemLabels.add(t)}!t.matches(St)&&!t.querySelector(St)&&(t.tabIndex=0,this._generatedItemTabIndexes.add(t))})}_setupIndicators(){let t=Array.from(this.el.children).find(e=>e instanceof HTMLElement&&e.classList.contains("indicators"));this._indicators=t??document.createElement("nav"),this._ownIndicators=!t,this._indicators.classList.add("indicators"),this._indicators.setAttribute("aria-label",this.options.i18n.indicators),this._indicators.replaceChildren(),this.images.forEach((e,i)=>{let s=document.createElement("button");s.type="button",s.classList.add("indicator-item"),s.setAttribute("aria-label",`${this.options.i18n.slide} ${i+1}`),this._indicators.appendChild(s)}),this._ownIndicators&&this.el.appendChild(this._indicators),this.el.querySelector(".carousel-fixed-item")?.classList.add("with-indicators")}_setupEventHandlers(){this.el.addEventListener("keydown",this._handleKeydown),this._motion.addEventListener("change",this._handleMotionChange),this._autoAdvances&&(this.el.addEventListener("mouseenter",this._handleAutoAdvanceState),this.el.addEventListener("mouseleave",this._handleAutoAdvanceState),this.el.addEventListener("focusin",this._handleAutoAdvanceState),this.el.addEventListener("focusout",this._handleAutoAdvanceState),document.addEventListener("visibilitychange",this._handleAutoAdvanceState)),this.showIndicators&&this._indicators&&this._indicators.addEventListener("click",this._handleIndicatorClick),typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(()=>this._handleThrottledResize()),this._resizeObserver.observe(this.el)),this._usesWindowResize=!this._resizeObserver||this.el.classList.contains("full-screen"),this._usesWindowResize&&(C._live.add(this),C._resizeListening||(window.addEventListener("resize",C._onResize,{passive:!0}),C._resizeListening=!0)),this._scroller.addEventListener("scroll",this._handleTrackScroll,{passive:!0}),this._scroller.addEventListener("pointerdown",this._handleTrackPointerDown),this._scroller.addEventListener("wheel",this._handleNativeScroll,{passive:!0}),this._scroller.addEventListener("click",this._handleTrackClick,!0),this._scroller.addEventListener("dragstart",this._handleTrackDragStart),this._scroller.addEventListener("transitionend",this._handleItemResize)}_removeEventHandlers(){this.el.removeEventListener("keydown",this._handleKeydown),this._motion.removeEventListener("change",this._handleMotionChange),this.el.removeEventListener("mouseenter",this._handleAutoAdvanceState),this.el.removeEventListener("mouseleave",this._handleAutoAdvanceState),this.el.removeEventListener("focusin",this._handleAutoAdvanceState),this.el.removeEventListener("focusout",this._handleAutoAdvanceState),document.removeEventListener("visibilitychange",this._handleAutoAdvanceState),this._indicators&&this._indicators.removeEventListener("click",this._handleIndicatorClick),this._scroller.removeEventListener("scroll",this._handleTrackScroll),this._scroller.removeEventListener("pointerdown",this._handleTrackPointerDown),this._scroller.removeEventListener("wheel",this._handleNativeScroll),this._setDragListeners(!1),this._scroller.removeEventListener("click",this._handleTrackClick,!0),this._scroller.removeEventListener("dragstart",this._handleTrackDragStart),this._scroller.removeEventListener("transitionend",this._handleItemResize),this._resizeObserver?.disconnect(),this._resizeObserver=null,this._usesWindowResize&&(C._live.delete(this),C._live.size===0&&C._resizeListening&&(window.removeEventListener("resize",C._onResize),C._resizeListening=!1))}_teardown(){this._started=!1,this._removeEventHandlers(),this._finishScroll(),this._autoAdvances=!1,this._syncAutoAdvance(),this._trackRaf!==null&&cancelAnimationFrame(this._trackRaf),window.clearTimeout(this.scrollingTimeout),window.clearTimeout(this._suppressClickTimeout),clearTimeout(this._resizeTimeout),this._ownIndicators&&this._indicators?.remove(),this._unwrapTrack(),this.images.forEach(t=>{t.style.removeProperty("--md-comp-carousel-item-parallax"),this._generatedItemLabels.has(t)&&t.removeAttribute("aria-label"),this._generatedItemDescriptions.has(t)&&t.removeAttribute("aria-roledescription"),this._generatedItemSizes.has(t)&&t.removeAttribute("data-carousel-size");let e=this._itemA11yOriginal.get(t);e?.ariaHidden===null?t.removeAttribute("aria-hidden"):e&&t.setAttribute("aria-hidden",e.ariaHidden),e?.tabIndex===null?t.removeAttribute("tabindex"):e&&t.setAttribute("tabindex",e.tabIndex)}),this._generatedContainerRole&&this.el.removeAttribute("role"),this._generatedContainerLabel&&this.el.removeAttribute("aria-label"),this._generatedContainerDescription&&this.el.removeAttribute("aria-roledescription"),this._generatedFixedHeight&&this.el.classList.remove("fixed-height"),this.options.height!==null&&(this._authoredInlineHeight===null?this.el.style.removeProperty("--carousel-height"):this.el.style.setProperty("--carousel-height",this._authoredInlineHeight)),this._generatedWideLayout&&this.el.classList.remove("multi-wide","multi-large","multi-extra-large","full-screen-horizontal")}_syncAutoAdvance(){let t=this._autoAdvances&&!this._autoPaused&&!this._hovered&&!this._focused&&!this._motion.matches&&!document.hidden;t&&this._autoAdvanceTimer===null?this._autoAdvanceTimer=setTimeout(this._tick,this.options.duration+this.options.interval):!t&&this._autoAdvanceTimer!==null&&(clearTimeout(this._autoAdvanceTimer),this._autoAdvanceTimer=null)}_setDragListeners(t){let e=t?"addEventListener":"removeEventListener";document[e]("pointermove",this._handleTrackPointerMove),document[e]("pointerup",this._handleTrackPointerUp),document[e]("pointercancel",this._handleTrackPointerUp)}_paintIndicators(t){if(!this.showIndicators||!this._indicators)return;let e=(t%this.count+this.count)%this.count;this._indicators.querySelectorAll(".indicator-item").forEach((i,s)=>{let o=s===e;i.classList.toggle("active",o),o?i.setAttribute("aria-current","true"):i.removeAttribute("aria-current")})}_syncActive(t,e){let i=this.center;this.center=t,this.images.forEach((o,a)=>o.classList.toggle("active",a===t)),this._paintIndicators(t),this._syncLayoutRoles(t);let s=this.images[t];i!==t&&typeof this.options.onCycleTo=="function"&&this.options.onCycleTo.call(this,s,e),typeof this.oneTimeCallback=="function"&&(this.oneTimeCallback.call(this,s,e),this.oneTimeCallback=null)}_syncLayoutRoles(t){let e=this.images.map(()=>"large"),i=(s,o)=>{this.images[s]&&(e[s]=o)};if(!(this.el.classList.contains("flat")||this.el.classList.contains("uncontained")||this.el.classList.contains("full-screen")&&this._vertical))if(this.el.classList.contains("hero")||this.el.classList.contains("full-screen-horizontal"))i(t+1,"small"),this.el.classList.contains("center-aligned")&&i(t-1,"small");else{let s=this.el.clientWidth,o=s>=1600?4:s>=1200?3:s>=600?2:1,a=Math.min(o,Math.max(1,this.count-2));this.el.classList.remove("multi-wide","multi-large","multi-extra-large"),a===2?this.el.classList.add("multi-wide"):a===3?this.el.classList.add("multi-large"):a>=4&&this.el.classList.add("multi-extra-large"),this._generatedWideLayout=this._generatedWideLayout||a>1,i(t+a,"medium"),i(t+a+1,"small")}this.images.forEach((s,o)=>{this._authoredItemSizes.has(s)||(s.setAttribute("data-carousel-size",e[o]),this._generatedItemSizes.add(s))})}_syncAdaptiveMode(){if(!this.el.classList.contains("full-screen"))return;let t=window.matchMedia("(orientation: landscape)").matches,e=this.el.clientWidth>=840||t,i=this._vertical;this._vertical=!e,this.el.classList.toggle("full-screen-horizontal",e),this._generatedWideLayout=this._generatedWideLayout||e,this._started&&i!==this._vertical&&this._scroller.scrollTo({left:0,top:0,behavior:"auto"})}_focusItem(t){let e=this.images[t];if(!e)return;((e.matches(St)?e:e.querySelector(St))??e).focus({preventScroll:!0})}_updateParallax(){if(this._motion.matches){this.images.forEach(o=>o.style.setProperty("--md-comp-carousel-item-parallax","0px"));return}let t=this._scroller.getBoundingClientRect(),e=this._vertical?t.top+t.height/2:t.left+t.width/2,i=Math.max(1,this._vertical?t.height:t.width),s=this.images.map(o=>o.getBoundingClientRect());this.images.forEach((o,a)=>{let r=s[a],h=this._vertical?r.top+r.height/2:r.left+r.width/2,c=Math.max(-1,Math.min(1,(h-e)/i));o.style.setProperty("--md-comp-carousel-item-parallax",`${c*-24}px`)})}_wrapTrack(){let t=document.createElement("div");t.className="carousel-track",this.images[0].before(t),this.images.forEach(e=>t.appendChild(e)),this._trackEl=t}_unwrapTrack(){this._trackEl&&(this.images.forEach(t=>this.el.insertBefore(t,this._trackEl)),this._trackEl.remove(),this._trackEl=null)}_nearestIndex(){let t=this.el.classList.contains("center-aligned"),e=getComputedStyle(this._scroller),i=!this._vertical&&e.direction==="rtl",s=this._vertical?this._scroller.scrollTop:this._scroller.scrollLeft,o=this._vertical?this._scroller.clientHeight:this._scroller.clientWidth,a=(this._vertical?this._scroller.scrollHeight:this._scroller.scrollWidth)-o,r=parseFloat(this._vertical?e.paddingBlockStart:e.paddingInlineStart)||0,h=this.center,c=1/0;return this.images.forEach((l,u)=>{let f=this._vertical?l.offsetTop:l.offsetLeft,p=this._vertical?l.offsetHeight:l.offsetWidth,v=t?f-(o-p)/2:f+(i?p-o+r:-r),g=Math.max(i?-a:0,Math.min(i?0:a,v)),L=Math.abs(g-s);(L<c||L===c&&u===this.center)&&(c=L,h=u)}),h}_scrollToIndex(t,e=!0){let i=this.images[t];if(!i)return;this._finishScroll();let s=this.el.classList.contains("center-aligned"),o=getComputedStyle(this._scroller),a=Number.parseFloat(o.paddingInlineStart)||0,r=Number.parseFloat(o.paddingBlockStart)||0,h=s?i.offsetLeft-(this._scroller.clientWidth-i.offsetWidth)/2:o.direction==="rtl"?i.offsetLeft+i.offsetWidth-this._scroller.clientWidth+a:i.offsetLeft-a,c=i.offsetTop-r;this._ignoreScroll=!0,this._scroller.style.scrollSnapType="none",this._scroller.scrollTo({left:this._vertical?0:h,top:this._vertical?c:0,behavior:e&&!this._motion.matches?"smooth":"instant"}),this._scroller.addEventListener("scrollend",this._handleScrollEnd),this._scrollEndTimeout=setTimeout(this._finishScroll,this.options.duration+350)}_cycleTo(t,e=null){this._alignAfterResize=!0,typeof e=="function"&&(this.oneTimeCallback=e),this._syncActive(t,!1),this._scrollToIndex(t)}pause(){this._autoPaused=!0,this._syncAutoAdvance()}start(){this._autoPaused=!1,this._syncAutoAdvance()}next(t=1){isNaN(t)&&(t=1);let e=this.center+t;e>=this.count||e<0||this._cycleTo(e)}prev(t=1){isNaN(t)&&(t=1);let e=this.center-t;e>=this.count||e<0||this._cycleTo(e)}set(t,e){(t===void 0||isNaN(t))&&(t=0),!(t>=this.count||t<0)&&this._cycleTo(t,e)}};C._live=new Set,C._resizeListening=!1,C._onResize=m.throttle(()=>{C._live.forEach(t=>t._handleResize())},200);var U=C;var ii=Object.freeze({}),At=class d extends E{constructor(t,e){super(t,{},d);this.updateCounter=()=>{let t=parseInt(this.el.getAttribute("maxlength")),e=this.el.value.length;this.isValidLength=e<=t;let i=e.toString();t&&(i+="/"+t,this._validateInput()),this.counterEl.textContent=i};this.el.Expressive_CharacterCounter=this,this.options={...d.defaults,...e},this.isInvalid=!1,this.isValidLength=!1,this._setupCounter(),this._setupEventHandlers()}static get defaults(){return ii}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_CharacterCounter}destroy(){this._removeEventHandlers(),this.el.Expressive_CharacterCounter=void 0,this._removeCounter()}_setupEventHandlers(){this.el.addEventListener("focus",this.updateCounter,!0),this.el.addEventListener("input",this.updateCounter,!0)}_removeEventHandlers(){this.el.removeEventListener("focus",this.updateCounter,!0),this.el.removeEventListener("input",this.updateCounter,!0)}_setupCounter(){this.counterEl=document.createElement("span"),this.counterEl.classList.add("character-counter"),this.counterEl.setAttribute("aria-live","polite"),this.counterEl.setAttribute("aria-atomic","true"),this.counterEl.style.float="right",this.counterEl.style.fontSize="12px",this.counterEl.style.height="1",this.el.parentElement.appendChild(this.counterEl)}_removeCounter(){this.counterEl.remove()}_validateInput(){this.isValidLength&&this.isInvalid?(this.isInvalid=!1,this.el.classList.remove("invalid")):!this.isValidLength&&!this.isInvalid&&(this.isInvalid=!0,this.el.classList.remove("valid"),this.el.classList.add("invalid"))}};var si={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,origin:{x:.5,y:.5},colors:[],shapes:["square","circle"],scalar:1,manualStart:!1},ni=["primary","secondary","tertiary","primary-container","secondary-container","tertiary-container"],oi=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],oe=Math.PI/180,Ot=new Map,H=null,nt=class d extends E{constructor(t,e){super(t,e,d);this._onClick=()=>{this.fire()};this.el.Expressive_Confetti=this,this.options={...d.defaults,...e},t instanceof HTMLCanvasElement?this.options.manualStart||this.fire():t.addEventListener("click",this._onClick)}static get defaults(){return si}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_Confetti}static fire(t={}){return Xt(re,document.body,{...d.defaults,...t})}fire(t={}){let e={...this.options,...t};if(this.el instanceof HTMLCanvasElement){let s=this.el;return Xt(()=>s,s.parentElement??document.body,e)}let i=this.el.getBoundingClientRect();return e.origin={x:(i.left+i.width/2)/innerWidth,y:(i.top+i.height/2)/innerHeight},Xt(re,this.el.parentElement??document.body,e)}destroy(){this.el.removeEventListener("click",this._onClick),this.el instanceof HTMLCanvasElement&&le(this.el),this.el.Expressive_Confetti=void 0}};function Xt(d,n,t){if(typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches)return Promise.resolve();let e=d(),i=Ot.get(e);if(!i){let l=e.getContext("2d");if(!l)return Promise.resolve();i={ctx:l,pieces:[],frame:0,last:0,done:[],overlay:e===H},Ot.set(e,i)}let{width:s,height:o}=ce(e),a=t.colors.length?t.colors:ai(n),r=(t.origin.x??.5)*s,h=(t.origin.y??.5)*o;for(let l=0;l<t.particleCount;l++)i.pieces.push({x:r,y:h,velocity:t.startVelocity*(.5+Math.random()),angle:-t.angle*oe+(.5-Math.random())*t.spread*oe,wobble:Math.random()*10,wobbleSpeed:.05+Math.random()*.05,tilt:(.25+Math.random()/2)*Math.PI,tick:0,color:a[l%a.length],shape:t.shapes[Math.floor(Math.random()*t.shapes.length)]??"square",options:t});let c=i;return c.frame||(c.frame=requestAnimationFrame(l=>{c.last=l,ae(e,c,l)})),new Promise(l=>c.done.push(l))}function ae(d,n,t){let e=Math.min((t-n.last)/16.666666666666668,4);n.last=t;let{width:i,height:s}=ce(d),{ctx:o}=n,a=d.width/(i||1);o.setTransform(1,0,0,1,0,0),o.clearRect(0,0,d.width,d.height),n.pieces=n.pieces.filter(r=>{let h=r.options;if(r.x+=(Math.cos(r.angle)*r.velocity+h.drift)*e,r.y+=(Math.sin(r.angle)*r.velocity+h.gravity*3)*e,r.velocity*=h.decay**e,r.wobble+=r.wobbleSpeed*e,r.tilt+=.1*e,r.tick+=e,r.tick>=h.ticks)return!1;let c=8*h.scalar;return o.setTransform(a,0,0,a,0,0),o.translate(r.x+10*h.scalar*Math.cos(r.wobble),r.y+10*h.scalar*Math.sin(r.wobble)),o.rotate(r.tilt),o.scale(1,Math.cos(r.wobble)),o.globalAlpha=1-r.tick/h.ticks,o.fillStyle=r.color,o.beginPath(),r.shape==="circle"?o.arc(0,0,c/2,0,2*Math.PI):r.shape==="star"?ri(o,c*.75):o.rect(-c/2,-c/2,c,c),o.fill(),!0}),n.pieces.length?n.frame=requestAnimationFrame(r=>ae(d,n,r)):le(d)}function le(d){let n=Ot.get(d);if(n){cancelAnimationFrame(n.frame),Ot.delete(d),n.ctx.setTransform(1,0,0,1,0,0),n.ctx.clearRect(0,0,d.width,d.height),n.overlay&&(d.remove(),H=null);for(let t of n.done)t()}}function ri(d,n){for(let t=0;t<10;t++){let e=t*Math.PI/5-Math.PI/2,i=t%2?n/2:n;d.lineTo(Math.cos(e)*i,Math.sin(e)*i)}d.closePath()}function ce(d){let n=d.clientWidth,t=d.clientHeight,e=Math.round(n*devicePixelRatio),i=Math.round(t*devicePixelRatio);return(d.width!==e||d.height!==i)&&(d.width=e,d.height=i),{width:n,height:t}}function re(){return H?.isConnected||(H=document.createElement("canvas"),H.className="confetti-overlay",H.setAttribute("aria-hidden","true"),Object.assign(H.style,{position:"fixed",inset:"0",width:"100%",height:"100%",margin:"0",padding:"0",border:"0",background:"transparent",pointerEvents:"none",zIndex:"10001"}),document.body.append(H),typeof H.showPopover=="function"&&(H.popover="manual",H.showPopover())),H}function ai(d){let n=document.createElement("span");n.hidden=!0,d.append(n);let t=getComputedStyle(n),e=ni.filter(i=>t.getPropertyValue(`--md-sys-color-${i}`).trim()).map(i=>(n.style.color=`var(--md-sys-color-${i})`,getComputedStyle(n).color));return n.remove(),e.length?e:oi}var li={quantity:100,staticity:50,ease:50,size:.4,color:"",vx:0,vy:0},ot=class d extends E{constructor(t,e){super(t,e,d);this._particles=[];this._width=0;this._height=0;this._frame=0;this._last=0;this._mouse={x:0,y:0};this._still=!1;this._resizeObserver=null;this._visibility=null;this._onPointerMove=t=>{let e=this.el.getBoundingClientRect(),i=t.clientX-e.left-e.width/2,s=t.clientY-e.top-e.height/2;Math.abs(i)<e.width/2&&Math.abs(s)<e.height/2&&(this._mouse={x:i,y:s})};if(this.el.Expressive_Particles=this,this.options={...d.defaults,...e},this._ctx=this.el.getContext("2d"),!!this._ctx&&(this._style=getComputedStyle(this.el),this._still=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,this._reset(),typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(()=>{(this.el.clientWidth!==this._width||this.el.clientHeight!==this._height)&&this._reset()}),this._resizeObserver.observe(this.el)),!this._still)){if(typeof IntersectionObserver>"u"){this._start();return}this._visibility=new IntersectionObserver(([i])=>i.isIntersecting?this._start():this._stop()),this._visibility.observe(this.el)}}static get defaults(){return li}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_Particles}destroy(){this._stop(),this._resizeObserver?.disconnect(),this._visibility?.disconnect(),this._ctx&&(this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this.el.width,this.el.height)),this.el.Expressive_Particles=void 0}_start(){this._frame||(window.addEventListener("pointermove",this._onPointerMove,{passive:!0}),this._frame=requestAnimationFrame(t=>{this._last=t,this._draw(t)}))}_stop(){cancelAnimationFrame(this._frame),this._frame=0,window.removeEventListener("pointermove",this._onPointerMove)}_reset(){if(this._width=this.el.clientWidth,this._height=this.el.clientHeight,this.el.width=Math.round(this._width*devicePixelRatio),this.el.height=Math.round(this._height*devicePixelRatio),this._particles=Array.from({length:this.options.quantity},()=>this._particle()),this._still){for(let t of this._particles)t.alpha=t.targetAlpha;this._paint()}}_particle(){return{x:Math.floor(Math.random()*this._width),y:Math.floor(Math.random()*this._height),translateX:0,translateY:0,size:Math.floor(Math.random()*2)+this.options.size,alpha:0,targetAlpha:Math.round((Math.random()*.6+.1)*10)/10,dx:(Math.random()-.5)*.1,dy:(Math.random()-.5)*.1,magnetism:.1+Math.random()*4}}_draw(t){let e=Math.min((t-this._last)/16.666666666666668,4);this._last=t;let{staticity:i,ease:s,vx:o,vy:a}=this.options,r=Math.min(e/s,1);this._particles=this._particles.map(h=>{h.x+=(h.dx+o)*e,h.y+=(h.dy+a)*e,h.translateX+=(this._mouse.x/(i/h.magnetism)-h.translateX)*r,h.translateY+=(this._mouse.y/(i/h.magnetism)-h.translateY)*r;let c=h.x+h.translateX,l=h.y+h.translateY,u=Math.min(c-h.size,this._width-c-h.size,l-h.size,this._height-l-h.size)/20;return h.alpha=u>1?Math.min(h.alpha+.02*e,h.targetAlpha):h.targetAlpha*u,h.x<-h.size||h.x>this._width+h.size||h.y<-h.size||h.y>this._height+h.size?this._particle():h}),this._paint(),this._frame=requestAnimationFrame(h=>this._draw(h))}_paint(){let t=this._ctx,e=devicePixelRatio;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.el.width,this.el.height),t.setTransform(e,0,0,e,0,0),t.fillStyle=this.options.color||this._style.color;for(let i of this._particles)i.alpha<=0||(t.globalAlpha=i.alpha,t.beginPath(),t.arc(i.x+i.translateX,i.y+i.translateY,i.size,0,2*Math.PI),t.fill());t.globalAlpha=1}};var ci={onKey:null},Gt=d=>d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement,Ht=new Set,Dt=new WeakSet,he;function de(d){let n=d.target.closest?.("button");if(!n)return null;let t=n.closest(".keypad, .keyboard")?.Expressive_Keypad;if(t)return[t,n];let e=n.dataset.key&&n.closest(".field");if(!e)return null;for(let i of Ht){let s=i.target;if(s&&e.contains(s))return[i,n]}return null}var ue=[["mousedown",d=>{let n=de(d);n&&n[0]._root?.activeElement===n[0].target&&d.preventDefault()}],["click",d=>{let n=de(d);n&&n[0]._press(n[1])}],["focusin",d=>{Gt(d.target)&&Dt.add(d.target)}]],rt=class d extends E{constructor(n,t){super(n,t,d),this.el.Expressive_Keypad=this,this.options={...d.defaults,...t};let e=this.el.getRootNode();if(this._root=e.nodeType===9||e.nodeType===11?e:null,this._root&&!this._shared())for(let[s,o]of ue)this._root.addEventListener(s,o);Ht.add(this);let i=this._root?.activeElement;Gt(i)&&Dt.add(i)}static get defaults(){return ci}static init(n,t={}){return super.init(n,t,d)}static getInstance(n){return n.Expressive_Keypad}destroy(){if(Ht.delete(this),this._root&&!this._shared())for(let[n,t]of ue)this._root.removeEventListener(n,t);this.el.Expressive_Keypad=void 0}get target(){let n=this.el.getAttribute("aria-controls"),t=n?m.getElementById(this.el,n):null;return Gt(t)?t:null}_shared(){for(let n of Ht)if(n!==this&&n._root===this._root)return!0;return!1}_press(n){let t=n.dataset.key;if(n.disabled||!t&&!n.hasAttribute("value"))return;if(t==="Shift"){n.setAttribute("aria-pressed",String(n.getAttribute("aria-pressed")!=="true")),this.options.onKey?.(t);return}let e=t?"":n.value,i=e&&this.el.querySelector('[data-key="Shift"][aria-pressed="true"]');i&&(e=e.toUpperCase(),i.setAttribute("aria-pressed","false"));let s=this.target;s&&!s.matches(":disabled")&&!s.readOnly&&(t==="Enter"&&s instanceof HTMLInputElement?s.form?.requestSubmit():t==="Enter"?this._edit(s,`
6
- `,"insertLineBreak"):t==="Backspace"?this._edit(s,"","deleteContentBackward"):e&&this._edit(s,e,"insertText")),this.options.onKey?.(t??e)}_edit(n,t,e){let{value:i}=n,s=n.selectionStart??i.length,o=n.selectionEnd??i.length;if(s===0&&o===0&&!Dt.has(n)&&(s=o=i.length),e==="deleteContentBackward"&&s===o&&s){let r=i.slice(Math.max(0,s-64),s);s-=(he??(he=new Intl.Segmenter)).segment(r).containing(r.length-1).segment.length}if(s===o&&!t||t&&n.maxLength>=0&&i.length-(o-s)+t.length>n.maxLength)return;let a=i.slice(0,s)+t+i.slice(o);if(n.value=a,a&&!n.value){n.value=i;return}n.selectionStart!==null&&n.setSelectionRange(s+t.length,s+t.length),Dt.add(n),n.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0,inputType:e,data:t||null}))}};var hi={shortcut:"k",closeOnRun:!0},di=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform),pe=d=>d.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase(),at=class d extends E{constructor(t,e){super(t,e,d);this._active=null;this._generatedIds=[];this._observer=null;this.open=()=>{this.el.open||this.el.showModal(),this.input?.focus()};this.close=()=>{this.el.open&&this.el.close()};this._handleInput=()=>this._filter();this._handleKeydown=t=>{t.key===m.keys.ARROW_DOWN||t.key===m.keys.ARROW_UP?(t.preventDefault(),this._move(t.key===m.keys.ARROW_DOWN?1:-1)):t.key===m.keys.ENTER&&!t.isComposing&&t.keyCode!==229&&this._active&&(t.preventDefault(),this._run(this._active))};this._handleListClick=t=>{let e=t.target.closest('[role="option"]');if(!e||!this.list.contains(e)||e.getAttribute("aria-disabled")==="true")return;let i=this._action(e);if(i&&!i.contains(t.target)){i.click();return}this.options.closeOnRun&&this.close()};this._handlePointerMove=t=>{let e=t.target.closest('[role="option"]');e&&this.list.contains(e)&&e.getAttribute("aria-disabled")!=="true"&&this._setActive(e)};this._handleClose=()=>{this.el.open||(this.input.value="",this._filter())};this._handleShortcut=t=>{let{shortcut:e}=this.options;if(!e||t.defaultPrevented||t.altKey||t.shiftKey||!(di?t.metaKey&&!t.ctrlKey:t.ctrlKey&&!t.metaKey))return;let i=e.toLowerCase(),s=/^[a-z]$/i.test(t.key);(t.key.toLowerCase()===i||!s&&/^[a-z]$/.test(i)&&t.code===`Key${i.toUpperCase()}`)&&(t.preventDefault(),this.el.open?this.close():this.open())};this.el.Expressive_CommandPalette=this;let i=t.dataset.shortcut;if(this.options={...d.defaults,...i!==void 0?{shortcut:i||null}:{},...e},this.input=t.querySelector(":scope > input"),this.list=t.querySelector(":scope > :is(ul, ol)"),!this.input||!this.list){console.error("CommandPalette needs an <input> and a <ul> as children of the dialog.");return}this._setupAccessibility(),this._filter(),this._observer=new MutationObserver(()=>this._filter(!0)),this._observer.observe(this.list,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden","disabled"]}),this.input.addEventListener("input",this._handleInput),this.input.addEventListener("keydown",this._handleKeydown),this.list.addEventListener("click",this._handleListClick),this.list.addEventListener("pointermove",this._handlePointerMove),this.el.addEventListener("close",this._handleClose),document.addEventListener("keydown",this._handleShortcut)}static get defaults(){return hi}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_CommandPalette}get isOpen(){return this.el.open}destroy(){if(this._observer?.disconnect(),document.removeEventListener("keydown",this._handleShortcut),this.el.removeEventListener("close",this._handleClose),this.input&&this.list){this.input.removeEventListener("input",this._handleInput),this.input.removeEventListener("keydown",this._handleKeydown),this.list.removeEventListener("click",this._handleListClick),this.list.removeEventListener("pointermove",this._handlePointerMove);for(let e of["role","aria-controls","aria-expanded","aria-autocomplete","aria-activedescendant"])this.input.removeAttribute(e);this.list.removeAttribute("role");for(let e of this._items()){for(let i of["role","aria-selected","aria-disabled","data-filtered"])e.removeAttribute(i);e.classList.remove("active"),this._action(e)?.removeAttribute("tabindex")}for(let e of this._labels())e.removeAttribute("role"),e.removeAttribute("data-filtered");for(let e of this._generatedIds)e.removeAttribute("id");let t=this._empty();t&&(t.hidden=!1)}this.el.Expressive_CommandPalette=void 0}_items(){return Array.from(this.list.children).filter(t=>t instanceof HTMLElement&&!t.classList.contains("label"))}_labels(){return Array.from(this.list.querySelectorAll(":scope > .label"))}_empty(){return this.el.querySelector(":scope > .command-palette-empty")}_action(t){return t.querySelector(":scope > :is(a[href], button)")}_ensureId(t,e){return t.id||(t.id=`${e}-${m.guid()}`,this._generatedIds.push(t)),t.id}_setupAccessibility(){this.list.setAttribute("role","listbox"),this.input.setAttribute("role","combobox"),this.input.setAttribute("aria-controls",this._ensureId(this.list,"command-palette-list")),this.input.setAttribute("aria-expanded","true"),this.input.setAttribute("aria-autocomplete","list")}_wireItems(){for(let t of this._items())t.getAttribute("role")!=="option"&&(t.setAttribute("role","option"),this._ensureId(t,"command-palette-option"),this._action(t)?.setAttribute("tabindex","-1"));for(let t of this._labels())t.setAttribute("role","none")}_shown(){return this._items().filter(t=>!t.hidden&&!t.hasAttribute("data-filtered"))}_visible(){return this._shown().filter(t=>t.getAttribute("aria-disabled")!=="true")}_isDisabled(t){let e=this._action(t);return!!e&&(e.matches(":disabled")||e.getAttribute("aria-disabled")==="true")}_setActive(t){this._active!==t&&(this._active?.classList.remove("active"),this._active?.removeAttribute("aria-selected"),this._active=t,t?(t.classList.add("active"),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),t.scrollIntoView({block:"nearest"})):this.input.removeAttribute("aria-activedescendant"))}_filter(t=!1){this._wireItems();let e=pe(this.input.value).split(/\s+/).filter(Boolean);for(let o of this._items()){let a=o.dataset.keywords??this._action(o)?.dataset.keywords??"",r=pe(`${o.textContent} ${a}`);o.toggleAttribute("data-filtered",!e.every(h=>r.includes(h))),this._isDisabled(o)?o.setAttribute("aria-disabled","true"):o.removeAttribute("aria-disabled")}for(let o of this._labels()){let a=o.nextElementSibling,r=!1;for(;a&&!a.classList.contains("label");)!a.hidden&&!a.hasAttribute("data-filtered")&&(r=!0),a=a.nextElementSibling;o.toggleAttribute("data-filtered",!r)}let i=this._visible(),s=this._empty();s&&(s.hidden=this._shown().length>0),this._setActive(t&&i.includes(this._active)?this._active:i[0]??null)}_move(t){let e=this._visible();if(!e.length)return;let i=e.indexOf(this._active);this._setActive(e[(i+t+e.length)%e.length])}_run(t){(this._action(t)??t).click()}};var ui={progressLabel:"Question {current} of {total}",requiredMessage:"Choose an answer to continue."},me=["previous","skip","next"],lt=class d extends E{constructor(t,e){super(t,e,d);this._active=null;this._generated=[];this._generatedIds=[];this._reporting=!1;this.goTo=t=>{let e=this.items[t];if(!e)return;this._active=e,this._render();let i=this._controls(e).filter(s=>!s.disabled);(i.find(s=>s.checked)??i[0])?.focus()};this.next=()=>{this._validate(this._active)&&this.goTo(this.index+1)};this.previous=()=>this.goTo(this.index-1);this.skip=()=>{if(this._active){for(let t of this._controls(this._active)){let e=t instanceof HTMLInputElement&&(t.type==="radio"||t.type==="checkbox");(e?!t.checked:!t.value)||(e?t.checked=!1:t.value="",t.dispatchEvent(new Event("change",{bubbles:!0})))}this.goTo(this.index+1)}};this._handleClick=t=>{let e=t.target.closest?.("button");if(!(!e||!this._buttons().includes(e))){if(me.includes(e.value)){t.preventDefault(),this[e.value]();return}this._syncRequired()}};this._handleKeydown=t=>{t.key!=="Enter"||t.defaultPrevented||t.isComposing||!(t.target instanceof HTMLInputElement)||this.index>=this.items.length-1||(t.preventDefault(),this.next())};this._handleInvalid=t=>{let e=this.items.find(i=>i.contains(t.target));e&&(t.preventDefault(),!this._reporting&&(this._reporting=!0,setTimeout(()=>this._reporting=!1),this._active=e,this._render(),this._validate(e)))};this._handleInput=t=>{this._syncRequired();let e=t.target.closest?.("fieldset");e instanceof HTMLFieldSetElement&&e.classList.contains("invalid")&&this._setInvalid(e,!1)};this.el.Expressive_Questionnaire=this;let i=t.dataset.progressLabel;this.options={...d.defaults,...i?{progressLabel:i}:{},...e},this._progress=document.createElement("div"),this._progress.className="questionnaire-progress",this._progressText=document.createElement("span"),this._progressText.id=`questionnaire-progress-${m.guid()}`,this._progressBar=document.createElement("progress"),this._progressBar.className="progress",this._progressBar.setAttribute("aria-labelledby",this._progressText.id),this._progress.append(this._progressText,this._progressBar),this.el.prepend(this._progress);for(let s of this._fieldsets()){let o=Array.from(s.querySelectorAll(":scope > p:not(.questionnaire-error)")).map(a=>this._ensureId(a,"questionnaire-description"));o.length&&!s.hasAttribute("aria-describedby")&&(s.setAttribute("aria-describedby",o.join(" ")),this._generatedIds.push(s))}this._active=this.items[0]??null,this._syncRequired(),this._render(),this._observer=new MutationObserver(()=>{this._syncRequired(),this._render()}),this._observer.observe(this.el,{attributes:!0,subtree:!0,attributeFilter:["disabled"]}),this.el.addEventListener("click",this._handleClick),this.el.addEventListener("keydown",this._handleKeydown),this.el.addEventListener("input",this._handleInput),this.el.addEventListener("invalid",this._handleInvalid,!0)}static get defaults(){return ui}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_Questionnaire}get items(){return this._fieldsets().filter(t=>!t.disabled)}get index(){return this.items.indexOf(this._active)}destroy(){this._observer.disconnect(),this.el.removeEventListener("click",this._handleClick),this.el.removeEventListener("keydown",this._handleKeydown),this.el.removeEventListener("input",this._handleInput),this.el.removeEventListener("invalid",this._handleInvalid,!0);for(let t of this._fieldsets()){if(t.hasAttribute("data-required"))for(let e of this._controls(t))e.setCustomValidity("");t.hidden=!1,this._setInvalid(t,!1)}for(let t of this._buttons())t.hidden=!1;this._progress.remove();for(let t of this._generated)t.remove();for(let t of this._generatedIds)t.removeAttribute(t instanceof HTMLFieldSetElement?"aria-describedby":"id");this.el.Expressive_Questionnaire=void 0}_fieldsets(){return Array.from(this.el.querySelectorAll(":scope > fieldset"))}_buttons(){return Array.from(this.el.querySelectorAll(":scope > footer > button")).filter(t=>me.includes(t.value)||t.type==="submit")}_controls(t){return Array.from(t.elements).filter(e=>e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLInputElement&&e.type!=="button"&&e.type!=="submit")}_required(t){return t.hasAttribute("data-required")||this._controls(t).some(e=>e.required)}_ensureId(t,e){return t.id||(t.id=`${e}-${m.guid()}`,this._generatedIds.push(t)),t.id}_render(){let t=this.items;if(!t.includes(this._active)){let s=this._fieldsets(),o=s.slice(s.indexOf(this._active)+1).find(a=>!a.disabled);this._active=o??t[t.length-1]??null}let e=t.indexOf(this._active),i=e===t.length-1;for(let s of this._fieldsets())s.hidden=s!==this._active;for(let s of this._buttons())s.value==="previous"?s.hidden=e<=0:s.value==="skip"?s.hidden=i||!this._active||this._required(this._active):s.value==="next"?s.hidden=i:s.hidden=!i;this._progressText.textContent=this.options.progressLabel.replace("{current}",String(e+1)).replace("{total}",String(t.length)),this._progressBar.max=Math.max(t.length,1),this._progressBar.value=e+1}_syncRequired(){for(let t of this._fieldsets()){if(!t.hasAttribute("data-required"))continue;let e=this._controls(t).filter(s=>s instanceof HTMLInputElement&&s.type==="checkbox"),i=e.filter(s=>!s.disabled);for(let s of e)s.setCustomValidity("");if(i.length&&!i.some(s=>s.checked)){let s=t.querySelector(":scope > .questionnaire-error:not([data-generated])");i[0].setCustomValidity(s?.textContent.trim()||this.options.requiredMessage)}}}_invalidControl(t){return this._controls(t).find(e=>e.willValidate&&!e.validity.valid)}_validate(t){this._syncRequired();let e=t&&this._invalidControl(t);if(!e)return!0;let i=t.querySelector(":scope > .questionnaire-error");return i||(i=document.createElement("p"),i.className="questionnaire-error",i.dataset.generated="",i.textContent=e.validationMessage||this.options.requiredMessage,t.append(i),this._generated.push(i)),this._setInvalid(t,!0),e.focus(),!1}_setInvalid(t,e){t.classList.toggle("invalid",e);let i=t.querySelector(":scope > .questionnaire-error"),s=(t.getAttribute("aria-describedby")??"").split(" ").filter(o=>o&&o!==i?.id);e&&i&&s.push(this._ensureId(i,"questionnaire-error")),s.length?t.setAttribute("aria-describedby",s.join(" ")):t.removeAttribute("aria-describedby");for(let o of this._controls(t))e?o.setAttribute("aria-invalid","true"):o.removeAttribute("aria-invalid");!e&&this._generated.includes(i)&&(i.remove(),this._generated.splice(this._generated.indexOf(i),1))}};var pi={min:null,max:null},mi="http://www.w3.org/2000/svg",fi=4;function T(d,n={}){let t=document.createElementNS(mi,d);for(let e in n)t.setAttribute(e,n[e]);return t}function ct(d,n){let t=d*2*Math.PI;return`${(n*Math.sin(t)).toFixed(3)},${(-n*Math.cos(t)).toFixed(3)}`}var R=d=>String(d%fi+1),vi=0;function gi(d){if(!d)return null;let t=(d.dataset.value??d.textContent).replace(/\u2212/g,"-").replace(/[\s%\p{Sc}]/gu,"");if(!/^[+-]?(\d{1,3}(,\d{3})+|\d+)?(\.\d+)?(e[+-]?\d+)?$/i.test(t))return null;let e=parseFloat(t.replace(/,/g,""));return Number.isFinite(e)?e:null}function fe(d){let n=d.length;if(n===0)return"";if(n===1)return`M${d[0][0]},${d[0][1]}h0`;let t=[];for(let s=0;s<n-1;s++)t.push((d[s+1][1]-d[s][1])/(d[s+1][0]-d[s][0]));let e=d.map((s,o)=>{if(o===0)return t[0];if(o===n-1)return t[n-2];let[a,r]=[t[o-1],t[o]];return a*r<=0?0:2/(1/a+1/r)}),i=`M${d[0][0]},${d[0][1]}`;for(let s=0;s<n-1;s++){let[[o,a],[r,h]]=[d[s],d[s+1]],c=(r-o)/3;i+=`C${o+c},${a+e[s]*c} ${r-c},${h-e[s+1]*c} ${r},${h}`}return i}var k=class extends E{constructor(t,e){super(t,e,new.target);this.labels=[];this.series=[];this.activeIndex=-1;this._generated=[];this._header=[];this._rows=[];this._reversed=!1;this._onPointerMove=t=>{this.show(this._indexAt(t))};this._onFocus=()=>{this.activeIndex<0&&this._plot.matches(":focus-visible")&&this.show(0)};this._onLeave=t=>{t.pointerType==="touch"||this._plot.matches(":focus-visible")||this.show(-1)};this._onCancel=()=>{this.show(-1)};this._onKeyDown=t=>{let e=this._keyTarget(t.key);e!==void 0&&(t.preventDefault(),this.show(e))};this.el[this._key]=this,this.options={...new.target.defaults,...e},this._read(),!(!this.labels.length||!this.series.length)&&(this._reversed=!this._horizontal&&getComputedStyle(this.el).direction==="rtl",this._render(),this.el.classList.contains("sparkline")||(this._plot.tabIndex=0,this._plot.addEventListener("pointerdown",this._onPointerMove),this._plot.addEventListener("pointermove",this._onPointerMove),this._plot.addEventListener("pointerleave",this._onLeave),this._plot.addEventListener("pointercancel",this._onCancel),this._plot.addEventListener("keydown",this._onKeyDown),this._plot.addEventListener("focus",this._onFocus),this._plot.addEventListener("blur",this._onLeave)))}get _type(){return"line-chart"}get _fromZero(){return!1}get _horizontal(){return!1}get _circular(){return!1}get _points(){return!0}get _key(){return"Expressive_LineChart"}static get defaults(){return pi}static init(t,e={}){return super.init(t,e,this)}static getInstance(t){return t.Expressive_LineChart}destroy(){this._generated.forEach(t=>t.remove()),this._generated=[],this.el[this._key]=void 0}show(t){if(!this._tooltip||t===this.activeIndex)return;this.activeIndex=t;let e=t<0||t>=this.labels.length;if(this._cursor.hidden=this._tooltip.hidden=e,e)return;this._cursor.replaceChildren();let i=document.createElement("strong");i.textContent=this.labels[t],this._tooltip.replaceChildren(i),this.series.forEach((s,o)=>{if(s.values[t]===null)return;let r=R(o),h=s.tops[t];if(h!==null&&this._points){let u=document.createElement("span");u.className=s.className,u.dataset.series=r,u.style.top=`${s.y(h)}%`,this._cursor.append(u)}let c=document.createElement("span");c.dataset.series=r,c.textContent=s.name;let l=document.createElement("span");l.textContent=s.text[t],this._tooltip.append(c,l)}),this._place(t)}_place(t){let e=this._x(t),i=this._horizontal?"top":"left";this._cursor.style[i]=this._tooltip.style[i]=`${e}%`,this._tooltip.classList.toggle("end",e>50)}_read(){let t=this.el.querySelector(":scope > table");if(!t)return;let e=t.tHead?.rows[0]??t.rows[0],i=Array.from(e?.cells??[]),s=Array.from(t.tBodies).flatMap(r=>Array.from(r.rows)).filter(r=>r!==e);if([this._header,this._rows]=[i,s],this.labels=s.map(r=>r.cells[0]?.textContent.trim()??""),this.series=i.slice(1).map((r,h)=>{let c=s.map(l=>gi(l.cells[h+1]));return{name:r.textContent.trim(),className:r.className,text:s.map(l=>l.cells[h+1]?.textContent.trim()??""),values:c,tops:c,y:void 0}}),this.el.classList.contains("stacked")){let r=this.labels.map(()=>0);for(let h of this.series)h.base=[...r],h.tops=h.values.map((c,l)=>r[l]=c===null||r[l]===null?null:r[l]+c)}this.series.every(r=>r.tops.every(h=>h===null))&&(this.series=[]);let a=r=>this._number(r)??this.options[r];this._y=this._scale(this.series,a("min"),a("max"))}_number(t){let e=parseFloat(this.el.dataset[t]??"");return Number.isFinite(e)?e:null}_scale(t,e,i,s=this._fromZero){let o=this.el.classList.contains("stacked"),[a,r]=[1/0,-1/0];for(let{tops:c}of t)for(let l of c)l!==null&&(a=Math.min(a,l),r=Math.max(r,l));if(a>r&&(a=r=0),s){let[c,l]=[Math.min(0,a),Math.max(0,r)],u=(l-(e??c))*.1||1;e??(e=c<0?c-u:0),i??(i=l+u)}else{let c=(r-a)*.1||1;e??(e=o?Math.min(0,a):a-c),i??(i=r+(o?(r-e)*.1||1:c))}let h=c=>100-(c-e)/(i-e||1)*100;for(let c of t)c.y=h;return h}_x(t){let e=(t+.5)/this.labels.length*100;return this._reversed?100-e:e}_render(){let t=this._type;this._plot=document.createElement("div"),this._plot.className=`${t}-plot`;let e=this.el.querySelector(":scope > figcaption")?.textContent.trim();this._plot.setAttribute("role","group"),this._plot.setAttribute("aria-roledescription",t.replace(/-/g," ")),e&&this._plot.setAttribute("aria-label",e),this._cursor=document.createElement("div"),this._cursor.className=`${t}-cursor`,this._cursor.hidden=!0,this._tooltip=document.createElement("div"),this._tooltip.className=`${t}-tooltip`,this._tooltip.hidden=!0,this._tooltip.setAttribute("aria-live","polite"),this._plot.append(this._draw(),this._cursor,this._tooltip),this._generated=[this._plot,...this._guides()],this.el.append(...this._generated)}_total(t){let e=this.el.querySelector(":scope > table")?.tFoot?.rows[0];if(!e)return null;let i=document.createElement("div");i.className=t;let[s,o]=[document.createElement("span"),document.createElement("strong")];return s.textContent=e.cells[0]?.textContent.trim()??"",o.textContent=e.cells[1]?.textContent.trim()??"",i.append(o,s),i}_guides(){let t=document.createElement("ol");t.className=`${this._type}-labels`,t.setAttribute("aria-hidden","true");for(let e of this.labels){let i=document.createElement("li");i.textContent=e,t.append(i)}return[t,...this._legend()]}_legend(){if(this.series.length<2)return[];let t=document.createElement("ul");return t.className=`${this._type}-legend`,t.setAttribute("aria-hidden","true"),t.append(...this.series.map((e,i)=>{let s=document.createElement("li");return s.dataset.series=R(i),s.textContent=e.name,s})),[t]}_draw(t=this.series){let e=T("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true",focusable:"false"});for(let i of t){let s=T("g",{class:`${this._type}-series ${i.className}`.trim(),"data-series":R(this.series.indexOf(i))}),o=[[]];i.tops.forEach((p,v)=>{p===null?o.push([]):o[o.length-1].push(v)});let a=o.filter(p=>p.length),r=(p,v)=>p.map(g=>[this._x(g),i.y(v[g])]),h=a.map(p=>fe(r(p,i.tops))),c=`line-chart-gradient-${++vi}`,l=T("linearGradient",{id:c,x2:"0",y2:"1"});l.append(T("stop"),T("stop",{offset:"1"}));let u=T("path",{class:`${this._type}-area`,fill:`url(#${c})`,d:a.map((p,v)=>{if(!i.base)return`${h[v]}V100H${this._x(p[0])}Z`;let g=r(p,i.base).map(([L,y])=>[L,Math.min(100,y)]);return`${h[v]}L${fe(g.reverse()).slice(1)}Z`}).join("")}),f=T("path",{class:`${this._type}-line`,d:h.join("")});s.append(l,u,f),e.append(s)}return e}_indexAt(t){let e=this._plot.getBoundingClientRect(),i=this._horizontal?(t.clientY-e.top)/e.height:(t.clientX-e.left)/e.width,s=Math.floor((this._reversed?1-i:i)*this.labels.length);return Math.min(this.labels.length-1,Math.max(0,s))}_polarAt(t){let e=this._plot.getBoundingClientRect(),[i,s]=[t.clientX-e.left-e.width/2,t.clientY-e.top-e.height/2];return[(Math.atan2(i,-s)/(2*Math.PI)+1)%1,Math.hypot(i,s)/e.width]}get _arrows(){return this._circular?[["ArrowRight","ArrowDown"],["ArrowLeft","ArrowUp"]]:this._horizontal?[["ArrowDown"],["ArrowUp"]]:this._reversed?[["ArrowLeft"],["ArrowRight"]]:[["ArrowRight"],["ArrowLeft"]]}_keyTarget(t){let e=this.labels.length-1,[i,s]=this._arrows,o=a=>this._circular?this.activeIndex<0?a>0?0:e:(this.activeIndex+a+e+1)%(e+1):Math.min(e,Math.max(0,this.activeIndex+a));return t==="Escape"?this.activeIndex<0?void 0:-1:i.includes(t)?o(1):s.includes(t)?o(-1):{Home:0,End:e}[t]}};var W=class extends k{get _type(){return"column-chart"}get _key(){return"Expressive_ColumnChart"}get _fromZero(){return!0}get _points(){return!1}static init(n,t={}){return super.init(n,t)}static getInstance(n){return n.Expressive_ColumnChart}_draw(n=this.series){let t=document.createElement("div");t.className="column-chart-columns",t.setAttribute("aria-hidden","true");let e=(i,s=n[0]?.y??this._y)=>Math.min(100,Math.max(0,s(i)));return t.style.setProperty("--zero",`${e(0)}%`),this._plot.style.setProperty("--rows",String(this.labels.length)),this.labels.forEach((i,s)=>{let o=document.createElement("div");n.forEach(a=>{let r=a.tops[s],h=a.base?.[s]??0;if(a.base&&(r===null||h===null))return;let c=document.createElement("span");r!==null&&(c.className=a.className,c.dataset.series=R(this.series.indexOf(a)),c.classList.toggle("negative",!a.base&&r<h),c.style.setProperty("--top",`${e(Math.max(h,r),a.y)}%`),c.style.setProperty("--bottom",`${100-e(Math.min(h,r),a.y)}%`),this._horizontal&&(c.dataset.text=a.text[s])),o.append(c)}),t.append(o)}),t}};var ht=class extends W{get _type(){return"bar-chart"}get _key(){return"Expressive_BarChart"}get _horizontal(){return!0}static init(n,t={}){return super.init(n,t)}static getInstance(n){return n.Expressive_BarChart}_draw(){let n=super._draw();if(n.className="bar-chart-bars",n.classList.toggle("rtl",getComputedStyle(this.el).direction==="rtl"),!this.el.classList.contains("values"))return n;let t=n.cloneNode(!0);t.classList.replace("bar-chart-bars","bar-chart-values"),t.querySelectorAll("span[data-text]").forEach(i=>{i.textContent=i.dataset.text});let e=document.createElement("div");return e.className="bar-chart-layers",e.append(n,t),e}};var ve=6,$=46,_i=1.06,Ei=.05,bi=0,dt=class extends k{get _type(){return"pie-chart"}get _key(){return"Expressive_PieChart"}get _points(){return!1}get _circular(){return!0}static init(n,t={}){return super.init(n,t)}static getInstance(n){return n.Expressive_PieChart}show(n){if(!this._tooltip||n===this.activeIndex||(super.show(n),this._slices.forEach((s,o)=>s?.classList.toggle("active",o===n)),this._tooltip.hidden))return;let t=this._colors[n];this._tooltip.querySelectorAll("[data-series]").forEach(s=>{t?s.dataset.series=t:delete s.dataset.series});let e=this._share(n),i=this._tooltip.querySelector("span:nth-of-type(2)");e&&i&&(i.textContent+=` (${e})`)}_place(n){let t=(this._turns[n][0]+this._turns[n][1])/2;this._tooltip.style.setProperty("--turn",String(t)),this._tooltip.classList.toggle("end",t<.5)}_share(n){var o;let[t,e]=this._turns[n];if(e<=t)return"";let i=e-t,s=i<.1?1:0;return(o=this._percents??(this._percents=[]))[s]??(o[s]=this._percent(s)),this._percents[s].format(i)}_percent(n){let t={style:"percent",maximumFractionDigits:n};try{return new Intl.NumberFormat(this.el.closest("[lang]")?.lang||void 0,t)}catch{return new Intl.NumberFormat(void 0,t)}}_guides(){this._percents=[];let n=document.createElement("ul");n.className="pie-chart-legend",n.setAttribute("aria-hidden","true");let t=this.series[0].text;return n.append(...this.labels.map((e,i)=>{let s=document.createElement("li");this._colors[i]&&(s.dataset.series=this._colors[i]);let[o,a,r]=[e,t[i],this._share(i)].map(h=>{let c=document.createElement("span");return c.textContent=h,c});return s.append(o,a,r),s})),[n]}_indexAt(n){let[t,e]=this._polarAt(n),i=e*100,s=this.el.classList.contains("donut")&&parseFloat(getComputedStyle(this.el).getPropertyValue("--md-comp-pie-chart-hole"))||0;if(i<$*s)return-1;let o=this._turns.findIndex(([a,r])=>a<=t&&t<r);return i>$*(o===this.activeIndex?_i:1)?-1:o}_draw(){let n=this.series[0].values.map(p=>Math.max(0,p??0)),t=n.reduce((p,v)=>p+v,0),e=0;this._turns=n.map(p=>[e,e+=t?p/t:0]);let i=this._turns.filter(([p,v])=>v>p),s=0;this._colors=this._turns.map(([p,v])=>{if(v<=p)return;let g=s++;return String(g===i.length-1&&g>0&&g%ve===0?2:g%ve+1)});let o=document.createElement("div");o.className="pie-chart-pie",o.setAttribute("aria-hidden","true");let a=T("svg",{viewBox:"-50 -50 100 100",focusable:"false"}),r=`pie-chart-mask-${++bi}`,h={x:"-50",y:"-50",width:"100",height:"100"},c=T("mask",{id:r,maskUnits:"userSpaceOnUse",...h});c.append(T("rect",{...h,fill:"white"}),T("path",{class:"pie-chart-gaps",stroke:"black",d:i.length>1?i.map(([p])=>`M0,0L${ct(p,50)}`).join(""):""}),T("circle",{class:"pie-chart-hole",r:String($),fill:"black"}));let l=T("g",{mask:`url(#${r})`}),u=`A${$},${$} 0`;if(this._slices=this._turns.map(([p,v],g)=>{if(v<=p)return null;let L=T("path",{class:"pie-chart-slice","data-series":this._colors[g],d:v-p>=1?`M0,${-$}${u} 1 1 0,${$}${u} 1 1 0,${-$}Z`:`M0,0L${ct(p,$)}${u} ${v-p>.5?1:0} 1 ${ct(v,$)}Z`});return l.append(L),L}),a.append(c,l),o.append(a),this.el.classList.contains("values")){let p=document.createElement("div");p.className="pie-chart-values",this._turns.forEach(([v,g],L)=>{if(g-v<Ei)return;let y=document.createElement("span");y.dataset.series=this._colors[L],y.style.setProperty("--turn",String((v+g)/2)),y.textContent=this._share(L),p.append(y)}),o.append(p)}let f=this._total("pie-chart-total");return f&&o.append(f),o}};var ut=class extends k{get _type(){return"heatmap-chart"}get _key(){return"Expressive_HeatmapChart"}static init(n,t={}){return super.init(n,t)}static getInstance(n){return n.Expressive_HeatmapChart}show(n){if(!this._tooltip||n===this.activeIndex)return;let t=this._cells[n],[e,i,s,o]=t?[t.offsetLeft,t.offsetTop,t.offsetWidth,this._plot.clientWidth]:[];if(this._cells[this.activeIndex]?.classList.remove("active"),this.activeIndex=n,this._tooltip.hidden=!t,!t)return;t.classList.add("active");let a=this.series.length,[r,h]=[Math.floor(n/a),this.series[n%a]],c=document.createElement("strong");c.textContent=this.labels[r];let[l,u]=[document.createElement("span"),document.createElement("span")];l.textContent=h.name,this._levels[n]===null?l.className="gap":l.style.setProperty("--level",String(this._levels[n])),u.textContent=h.text[r],this._tooltip.replaceChildren(c,l,u);let f=e+s/2>o/2;this._tooltip.classList.toggle("end",f),this._tooltip.style.left=`${e+(f?0:s)}px`,this._tooltip.style.top=`${i}px`}_keyTarget(n){if(n==="Escape")return this.activeIndex<0?void 0:-1;let[t,e]=[this.series.length,this.labels.length-1],i=Math.max(0,this.activeIndex),[s,o]=[Math.floor(i/t),i%t],[a,r]=this._reversed?["ArrowLeft","ArrowRight"]:["ArrowRight","ArrowLeft"],h={[a]:[s,o+1],[r]:[s,o-1],ArrowDown:[s+1,o],ArrowUp:[s-1,o],Home:[s,0],End:[s,t-1]}[n];if(!h)return;if(this.activeIndex<0)return 0;let c=(l,u)=>Math.min(u,Math.max(0,l));return c(h[0],e)*t+c(h[1],t-1)}_indexAt(n){let[t,e]=[this.series.length,this.labels.length],i=this._cells[0].getBoundingClientRect(),s=this._cells[this._cells.length-1].getBoundingClientRect(),[o,a]=[Math.min(i.left,s.left),Math.max(i.right,s.right)],[r,h]=[n.clientX,n.clientY];if(r<o||r>a||h<i.top||h>s.bottom)return-1;let c=(u,f,p)=>Math.min(p-1,Math.floor(u/(f||1)*p)),l=c(r-o,a-o,t);return c(h-i.top,s.bottom-i.top,e)*t+(this._reversed?t-1-l:l)}_guides(){let n=document.createElement("div");n.className="heatmap-chart-legend",n.setAttribute("aria-hidden","true");let[t,e,i]=["span","span","span"].map(s=>document.createElement(s));return[t.textContent,i.textContent]=this._ends,e.className="heatmap-chart-scale",this._reversed&&e.style.setProperty("--heatmap-chart-to","left"),e.style.setProperty("--low",String(this._endLevels[0])),e.style.setProperty("--high",String(this._endLevels[1])),n.append(t,e,i),[n]}_draw(){let n=this.series.length,[t,e]=[1/0,-1/0];this._ends=["",""],this.series.forEach(f=>f.values.forEach((p,v)=>{p!==null&&(p<t&&([t,this._ends[0]]=[p,f.text[v]]),p>e&&([e,this._ends[1]]=[p,f.text[v]]))}));let i=f=>this._number(f)??this.options[f],[s,o]=[i("min")??t,i("max")??e],a=f=>Math.min(1,Math.max(0,(f-s)/(o-s||1)));this._endLevels=[a(t),a(e)];let r=document.createElement("div");r.className="heatmap-chart-grid",r.setAttribute("aria-hidden","true"),r.style.setProperty("--columns",String(n)),r.style.setProperty("--rows",String(this.labels.length));let h=(f,p="")=>{let v=document.createElement("span");return v.className=f,v.textContent=p,v},c=f=>f?.dataset.label??f?.textContent.trim()??"",l=this.el.classList.contains("values");this._cells=[],this._levels=[],this.labels.forEach((f,p)=>{r.append(h("heatmap-chart-row",c(this._rows[p].cells[0]))),this.series.forEach(v=>{let g=v.values[p],L=g===null?null:a(g),y=h("heatmap-chart-cell",l?v.text[p]:"");L===null?y.classList.add("gap"):y.style.setProperty("--level",String(L)),this._cells.push(y),this._levels.push(L),r.append(y)})});let u=this._header.slice(1,n+1).map(c);return u.forEach((f,p)=>{if(!f)return;let v=p+1;for(;v<n&&!u[v];)v++;let g=h("heatmap-chart-column",f);g.classList.toggle("run",v>p+1),g.style.gridArea=`${this.labels.length+1} / ${p+2} / auto / ${v+2}`,r.append(g)}),r}};var ge=4,pt=class extends k{get _type(){return"radar-chart"}get _key(){return"Expressive_RadarChart"}get _fromZero(){return!0}get _circular(){return!0}static init(n,t={}){return super.init(n,t)}static getInstance(n){return n.Expressive_RadarChart}_place(n){for(let e of this._cursor.children)e.style.top=`${Math.min(100,Math.max(0,parseFloat(e.style.top)))}%`;let t=this._turn(n);this._cursor.style.setProperty("--turn",String(t)),this._tooltip.style.setProperty("--turn",String(t)),this._tooltip.classList.toggle("end",t>0&&t<.5)}_turn(n){return n/this.labels.length}_guides(){return this._legend()}_indexAt(n){let[t]=this._polarAt(n);return Math.round(t*this.labels.length)%this.labels.length}_draw(){let n=(h,c)=>ct(this._turn(h),50*c),t=h=>Math.min(1,Math.max(0,1-this._y(h)/100)),e=this.labels.map((h,c)=>c),i=h=>`M${e.map(c=>n(c,h)).join("L")}Z`,s=T("svg",{viewBox:"-50 -50 100 100","aria-hidden":"true",focusable:"false"});s.append(T("path",{class:"radar-chart-grid",d:Array.from({length:ge},(h,c)=>i((c+1)/ge)).join("")+e.map(h=>`M0,0L${n(h,1)}`).join("")}));let o=this.el.classList.contains("points");this.series.forEach((h,c)=>{let l=T("g",{class:`radar-chart-series ${h.className}`.trim(),"data-series":R(c)}),f=e.filter(p=>h.values[p]!==null).map(p=>n(p,t(h.values[p])));l.append(T("path",{class:"radar-chart-shape",d:f.length?`M${f.join("L")}Z`:""})),o&&l.append(T("path",{class:"radar-chart-points",d:f.map(p=>`M${p}h0`).join("")})),s.append(l)});let a=document.createElement("ol");a.className="radar-chart-axes",a.setAttribute("aria-hidden","true"),this.labels.forEach((h,c)=>{let l=document.createElement("li");l.textContent=h,l.style.setProperty("--turn",String(this._turn(c))),a.append(l)});let r=document.createElement("div");return r.className="radar-chart-web",r.append(s,a),r}};var _e=46,yi=.8,mt=class extends k{get _type(){return"radial-chart"}get _key(){return"Expressive_RadialChart"}get _points(){return!1}get _circular(){return!0}get _gauge(){return this.el.classList.contains("gauge")}static init(n,t={}){return super.init(n,t)}static getInstance(n){return n.Expressive_RadialChart}show(n){if(!this._tooltip||n===this.activeIndex||(super.show(n),this._rings.forEach((e,i)=>e.classList.toggle("active",i===n)),this._tooltip.hidden))return;let t=R(n);this._tooltip.querySelectorAll("[data-series]").forEach(e=>{e.dataset.series=t})}_place(n){let t=this._turn(this._fractions[n]),e=this._radii[n],[i,s]=[e*Math.sin(t*2*Math.PI),-e*Math.cos(t*2*Math.PI)];this._tooltip.style.left=`${50+i}%`,this._tooltip.style.top=`${(50+s)/(this._gauge?50:100)*100}%`,this._tooltip.classList.toggle("end",i>0)}_turn(n){return this._gauge?n/2-.25:n}_guides(){if(this.labels.length<2)return[];let n=document.createElement("ul");n.className="radial-chart-legend",n.setAttribute("aria-hidden","true");let t=this.series[0].text;return n.append(...this.labels.map((e,i)=>{let s=document.createElement("li");s.dataset.series=R(i);let[o,a]=[e,t[i]].map(r=>{let h=document.createElement("span");return h.textContent=r,h});return s.append(o,a),s})),[n]}_indexAt(n){let t=this._plot.getBoundingClientRect(),[e,i]=[n.clientX-t.left-t.width/2,n.clientY-t.top-t.width/2];if(this._gauge&&i>0)return-1;let s=Math.hypot(e,i)/t.width*100,o=this._radii.length>1?this._radii[0]-this._radii[1]:this._width;return this._radii.findIndex(a=>Math.abs(s-a)<=o/2)}_draw(){let n=getComputedStyle(this.el),t=(p,v)=>{let g=parseFloat(n.getPropertyValue(`--md-comp-radial-chart-${p}`));return Number.isFinite(g)?g:v},e=this.labels.length,[i,s]=[Math.max(0,t("thickness",8)),Math.max(0,t("gap",2))],o=Math.min(1,_e*yi/(e*i+(e-1)*s||1));[i,s]=[i*o,s*o],this._width=i,this._radii=this.labels.map((p,v)=>_e-i/2-v*(i+s));let a=[parseFloat(this.el.dataset.max??""),this.options.max??NaN,100].find(p=>p>0);this._fractions=this.series[0].values.map(p=>Math.min(1,Math.max(0,(p??0)/a)));let r=this._gauge,h=T("svg",{viewBox:r?"-50 -50 100 50":"-50 -50 100 100",focusable:"false"}),c=r?"rotate(180)":"rotate(-90)",l=r?.5:1;this._rings=this._radii.map((p,v)=>{let g=2*Math.PI*p,L=(S,G,Y)=>{let xt=T("circle",{class:S,r:p.toFixed(3),transform:c,"stroke-width":i.toFixed(3)}),Wt=Math.max(.001,G*l*g-(Y?i:0));return xt.style.setProperty("--radial-chart-dash",`${Wt.toFixed(3)} ${g.toFixed(3)}`),Y&&xt.style.setProperty("--radial-chart-offset",(-i/2).toFixed(3)),xt},y=L("radial-chart-ring",this._fractions[v],!0);return y.dataset.series=R(v),this._fractions[v]||y.classList.add("empty"),h.append(L("radial-chart-track",1,r),y),y});let u=document.createElement("div");u.className="radial-chart-rings",u.setAttribute("aria-hidden","true"),u.style.setProperty("--radial-chart-middle",`${(this._radii[e-1]-this._width/2)*2}%`),u.append(h);let f=this._total("radial-chart-total");return f&&u.append(f),u}};var Pt=(d,n)=>d.className.split(/\s+/).includes(n),ft=class extends W{get _type(){return"mixed-chart"}get _key(){return"Expressive_MixedChart"}get _points(){return!0}static init(n,t={}){return super.init(n,t)}static getInstance(n){return n.Expressive_MixedChart}_scale(n,t,e){let i=n.filter(a=>Pt(a,"end")),s=n.filter(a=>!i.includes(a)),o=a=>a.some(r=>Pt(r,"column"));return super._scale(i,this._number("endMin"),this._number("endMax"),o(i)),super._scale(s,t,e,o(s))}_draw(){let n=document.createElement("div");n.className="mixed-chart-marks";let t=super._draw(this.series.filter(e=>Pt(e,"column")));return t.className="mixed-chart-columns",n.append(t,k.prototype._draw.call(this,this.series.filter(e=>!Pt(e,"column")))),n}};var Li={classes:"",menuOptions:{}},D=class d extends E{constructor(t,e){super(t,e,d);this._originalLabels=new Map;this._validationMessage=null;this._handleSelectChange=()=>{this._setValueToInput(),this._setSelectedStates(),this._syncValidationError()};this._handleInvalid=t=>{t.defaultPrevented||(this._validationMessage||(this._validationMessage=document.createElement("small"),this._validationMessage.id=this.input.id+"-error",this._validationMessage.className="supporting-text",this._validationMessage.style.color="var(--md-sys-color-error)",this.wrapper.append(this._validationMessage),this.input.setAttribute("aria-describedby",[this.input.getAttribute("aria-describedby"),this._validationMessage.id].filter(Boolean).join(" "))),this.input.ariaInvalid="true",this._syncValidationError())};this._handleNativeFocus=()=>queueMicrotask(()=>{d.getInstance(this.el)===this&&this.el.matches(":focus")&&this.input.focus()});this._handleReset=t=>{clearTimeout(this._resetTimer),this._resetTimer=setTimeout(()=>{t.defaultPrevented||(this._handleSelectChange(),this._clearValidationError())},0)};this._handleOptionKeydown=t=>{(t.key===" "||t.key==="Enter")&&this._handleOptionClick(t)};this._handleOptionClick=t=>{t.preventDefault();let e=t.target.closest("li");this._selectOptionElement(e),t.stopPropagation()};this._handleOptionFocus=t=>{let e=t.target;if(!(e instanceof Element))return;let i=e.closest('li[role="option"]');i?.id&&this.input.setAttribute("aria-activedescendant",i.id)};this._handleInputClick=()=>{this.menu&&this.menu.isOpen&&(this._setValueToInput(),this._setSelectedStates())};!this.el.classList.contains("browser-default")&&(this.el.Expressive_FormSelect=this,this.options={...d.defaults,...e},this.isMultiple=this.el.multiple,this.nativeTabIndex=this.el.tabIndex,this.el.tabIndex=-1,this._values=[],this._createdWrapper=!1,this._setupMenu(),this._setupEventHandlers())}static get defaults(){return Li}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_FormSelect}destroy(){this._removeEventHandlers(),this._clearValidationError(),this.menu?.destroy(),this._removeMenu(),this.el.tabIndex=this.nativeTabIndex,this.el.Expressive_FormSelect=void 0}refresh(){if(!this.menuEl)return;this._bindForm();let t=this.menuEl.getRootNode(),e=this._values.find(i=>i.optionEl.contains(t.activeElement))?.el;this.input.disabled=this.el.matches(":disabled"),this.wrapper.classList.toggle("disabled",this.input.disabled),this.input.disabled?this.menu?.close():this.menu||this._initMenu(),this.input.removeAttribute("aria-activedescendant"),this._rebuildOptions(),this._handleSelectChange(),this.menu&&(this.menu.focusedIndex=-1),this.menu?.isOpen&&(this.menu.recalculateDimensions(),e&&(this._values.find(i=>i.el===e)?.optionEl??this.input).focus())}_setupEventHandlers(){this._setupOptionHandlers(),this.el.addEventListener("change",this._handleSelectChange),this.el.addEventListener("invalid",this._handleInvalid),this.el.addEventListener("focus",this._handleNativeFocus),this.input.addEventListener("click",this._handleInputClick),this.menuEl.addEventListener("focusin",this._handleOptionFocus),this._bindForm()}_bindForm(){this._form?.removeEventListener("reset",this._handleReset),this._form=this.el.form,this._form?.addEventListener("reset",this._handleReset)}_removeEventHandlers(){this._removeOptionHandlers(),this.el.removeEventListener("change",this._handleSelectChange),this.el.removeEventListener("invalid",this._handleInvalid),this.el.removeEventListener("focus",this._handleNativeFocus),this.input?.removeEventListener("click",this._handleInputClick),this.menuEl?.removeEventListener("focusin",this._handleOptionFocus),this._form?.removeEventListener("reset",this._handleReset),clearTimeout(this._resetTimer)}_setupOptionHandlers(){this.menuEl.querySelectorAll("li:not(.optgroup)").forEach(t=>{t.addEventListener("click",this._handleOptionClick),t.addEventListener("keydown",this._handleOptionKeydown)})}_removeOptionHandlers(){this.menuEl?.querySelectorAll("li:not(.optgroup)").forEach(t=>{t.removeEventListener("click",this._handleOptionClick),t.removeEventListener("keydown",this._handleOptionKeydown)})}_syncValidationError(){this._validationMessage&&(this.el.willValidate&&!this.el.validity.valid?this._validationMessage.textContent=this.el.validationMessage:this._clearValidationError())}_clearValidationError(){if(!this._validationMessage)return;let t=this.input.getAttribute("aria-describedby")?.split(/\s+/).filter(e=>e!==this._validationMessage.id).join(" ");t?this.input.setAttribute("aria-describedby",t):this.input.removeAttribute("aria-describedby"),this.input.ariaInvalid=this.el.ariaInvalid,this._validationMessage.remove(),this._validationMessage=null}_arraysEqual(t,e){if(t===e)return!0;if(t==null||e==null||t.length!==e.length)return!1;for(let i=0;i<t.length;++i)if(t[i]!==e[i])return!1;return!0}_selectOptionElement(t){if(!this.el.matches(":disabled")){if(!t.classList.contains("disabled")&&!t.classList.contains("optgroup")){let e=this._values.find(a=>a.optionEl===t);if(!e||e.el.matches(":disabled"))return;let i=this.getSelectedValues();this.isMultiple?this._toggleEntryFromArray(e):(this._deselectAll(),this._selectValue(e)),this._handleSelectChange();let s=this.getSelectedValues();!this._arraysEqual(i,s)&&this.el.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0,composed:!0}))}this.isMultiple||this.menu?.close()}}_setupMenu(){this.labelEl=this.el.labels?.[0]??null,Array.from(this.el.labels??[]).forEach(t=>{this._originalLabels.set(t,{for:t.getAttribute("for"),id:t.getAttribute("id")})}),this.labelEl&&!this.el.closest("label")&&(this._labelPlaceholder=document.createComment(""),this.labelEl.before(this._labelPlaceholder)),this._setupWrapper(),this._hideNativeSelect(),this.el.matches(":disabled")&&this.wrapper.classList.add("disabled"),this.menuEl=document.createElement("menu"),this.menuEl.id=`select-options-${m.guid()}`,this.menuEl.setAttribute("popover","auto"),this.menuEl.setAttribute("role","listbox"),this.menuEl.ariaMultiSelectable=this.isMultiple.toString(),this.isMultiple&&this.menuEl.classList.add("multiple-select-menu"),this._buildOptions(),this.wrapper.append(this.menuEl),this._buildInput(),this._buildCaret(),this._initMenu(),this._setSelectedStates(),this._labelPlaceholder&&this.input.after(this.labelEl)}_setupWrapper(){let t=this.el.parentElement;t&&t.matches(".field")&&!t.querySelector(":scope > .hide-select")&&!t.querySelector(":scope > input, :scope > textarea")?(this.wrapper=t,this._createdWrapper=!1):(this.wrapper=document.createElement("div"),this.wrapper.classList.add("field"),this._createdWrapper=!0,this.el.before(this.wrapper)),this.options.classes.length>0&&this.wrapper.classList.add(...this.options.classes.split(" ").filter(Boolean))}_hideNativeSelect(){let t=document.createElement("div");t.classList.add("hide-select"),t.ariaHidden="true",this.el.before(t),t.appendChild(this.el),this._createdWrapper&&this.wrapper.append(t)}_buildInput(){this.input=document.createElement("input"),this.input.id="select-input-"+m.guid(),this.input.classList.add("menu-trigger","no-autoinit"),this.input.type="text",this.input.readOnly=!0,this.input.setAttribute("data-target",this.menuEl.id),this.input.ariaReadOnly="true",this.input.ariaRequired=this.el.hasAttribute("required").toString(),this.input.disabled=this.el.matches(":disabled"),this.input.setAttribute("tabindex",this.nativeTabIndex.toString());let t=this.el.attributes;for(let e=0;e<t.length;++e){let i=t[e];i.name.startsWith("aria-")&&this.input.setAttribute(i.name,i.value)}this.input.setAttribute("role","combobox"),this.input.setAttribute("aria-haspopup","listbox"),this.input.ariaExpanded="false",this.input.setAttribute("aria-controls",this.menuEl.id),this.input.placeholder=" ",this._originalLabels.forEach((e,i)=>{i.htmlFor=this.input.id}),this._labelPlaceholder&&this._originalLabels.size>1&&!this.input.getAttribute("aria-label")&&!this.input.getAttribute("aria-labelledby")&&this.input.setAttribute("aria-labelledby",Array.from(this._originalLabels.keys(),(e,i)=>(e.id||(e.id=`${this.input.id}-label-${i}`),e.id)).join(" ")),this.wrapper.prepend(this.input),this._setValueToInput()}_buildCaret(){let t=document.createElement("span");t.classList.add("caret"),t.setAttribute("aria-hidden","true"),this.wrapper.prepend(t)}_initMenu(){if(this.el.matches(":disabled"))return;let t={...this.options.menuOptions};t.coverTrigger=!1;let e=t.onOpenEnd,i=t.onCloseEnd;t.onOpenEnd=()=>{let s=this.menuEl.querySelector(".selected");if(s){if(this.menu.focusedIndex=[...s.parentNode.children].indexOf(s),this.menu._focusFocusedItem(),this.menu.isScrollable){let o=s.getBoundingClientRect().top-this.menuEl.getBoundingClientRect().top;o-=this.menuEl.clientHeight/2,this.menuEl.scrollTop=o}s.id&&this.input.setAttribute("aria-activedescendant",s.id)}this.input.ariaExpanded="true",typeof e=="function"&&e.call(this.menu,this.el)},t.onCloseEnd=()=>{this.input.ariaExpanded="false",this.input.removeAttribute("aria-activedescendant"),typeof i=="function"&&i.call(this.menu,this.el)},t.closeOnClick=!1,this.menu=F.init(this.input,t)}_nativeOptions(){return Array.from(this.el.children).filter(t=>["OPTION","OPTGROUP"].includes(t.tagName))}_buildOptions(){this.selectOptions=this._nativeOptions(),this._values=[],this.selectOptions.forEach(t=>{if(t.tagName==="OPTION"){let e=this._createAndAppendOptionWithIcon(t,this.isMultiple?"multiple":void 0);this._addOptionToValues(t,e)}else if(t.tagName==="OPTGROUP"){let e="opt-group-"+m.guid(),i=document.createElement("li");i.classList.add("optgroup"),i.tabIndex=-1,i.setAttribute("role","group"),i.setAttribute("aria-labelledby",e);let s=document.createElement("span");s.id=e,s.setAttribute("role","presentation"),s.textContent=t.getAttribute("label")??"",i.replaceChildren(s),this.menuEl.append(i);let o=[];Array.from(t.children).filter(r=>r.tagName==="OPTION").forEach(r=>{let h=this._createAndAppendOptionWithIcon(r,"optgroup-option");o.push(h.id),this._addOptionToValues(r,h)}),i.setAttribute("aria-owns",o.join(" "))}})}_rebuildOptions(){this._removeOptionHandlers(),this.menuEl.replaceChildren(),this._buildOptions(),this._setupOptionHandlers(),this.menu?._makeMenuFocusable()}_addOptionToValues(t,e){this._values.push({el:t,optionEl:e})}_removeMenu(){this.wrapper?.querySelector(":scope > .caret")?.remove(),this.input?.remove(),this.menuEl?.remove();let t=this.el.parentElement;t?.classList.contains("hide-select")&&t.replaceWith(this.el),this._originalLabels.forEach((e,i)=>{for(let s of["for","id"])e[s]===null?i.removeAttribute(s):i.setAttribute(s,e[s])}),this._labelPlaceholder?.replaceWith(this.labelEl),this.wrapper&&(this._createdWrapper?this.wrapper.replaceWith(this.el):(this.wrapper.classList.remove("disabled"),this.options.classes.length>0&&this.wrapper.classList.remove(...this.options.classes.split(" ").filter(Boolean))))}_createAndAppendOptionWithIcon(t,e){let i=document.createElement("li");i.id="select-option-"+m.guid(),i.setAttribute("role","option"),i.tabIndex=0;let s=this.el.matches(":disabled")||t.matches(":disabled");s&&(i.classList.add("disabled"),i.ariaDisabled="true",i.tabIndex=-1),e==="optgroup-option"&&i.classList.add(e);let o=t.textContent,a=document.createElement("span");if(this.isMultiple&&!s){let l=document.createElement("label"),u=document.createElement("input");u.type="checkbox",u.tabIndex=-1;let f=document.createElement("span");f.textContent=o,l.append(u,f),a.appendChild(l)}else a.textContent=o;i.appendChild(a);let r=t.getAttribute("data-icon"),h;if(r)try{let l=new URL(r,this.el.ownerDocument.baseURI);(["http:","https:","blob:"].includes(l.protocol)||/^data:image\/(?:avif|bmp|gif|jpeg|png|svg\+xml|webp|x-icon)(?:;|,)/i.test(l.href))&&(h=l)}catch{}let c=t.getAttribute("class")?.split(" ").filter(Boolean);if(h){let l=document.createElement("img");c?.length&&l.classList.add(...c),l.src=h.href,l.ariaHidden="true",i.prepend(l)}return this.menuEl.append(i),i}_selectValue(t){t.el.selected=!0,t.optionEl.classList.add("selected"),t.optionEl.ariaSelected="true";let e=t.optionEl.querySelector('input[type="checkbox"]');e&&(e.checked=!0)}_deselectValue(t){t.el.selected=!1,t.optionEl.classList.remove("selected"),t.optionEl.ariaSelected="false";let e=t.optionEl.querySelector('input[type="checkbox"]');e&&(e.checked=!1)}_deselectAll(){this._values.forEach(t=>this._deselectValue(t))}_isValueSelected(t){return t.el.selected}_toggleEntryFromArray(t){this._isValueSelected(t)?this._deselectValue(t):this._selectValue(t)}_getSelectedOptions(){return Array.from(this.el.selectedOptions)}_setValueToInput(){this.input.value=this._getSelectedOptions().map(t=>t.textContent.trim()).join(", ")}_setSelectedStates(){this._values.forEach(t=>{let e=t.el.selected,i=t.optionEl.querySelector('input[type="checkbox"]');i&&(i.checked=e),e?this._activateOption(this.menuEl,t.optionEl):(t.optionEl.classList.remove("selected"),t.optionEl.ariaSelected="false")})}_activateOption(t,e){e&&(this.isMultiple||t.querySelectorAll("li.selected").forEach(i=>i.classList.remove("selected")),e.classList.add("selected"),e.ariaSelected="true")}getSelectedValues(){return this._getSelectedOptions().map(t=>t.value)}};var Ti={margin:5,transition:10,duration:250,align:"left"},vt=class d{constructor(n,t,e){this._handleDocumentClick=n=>{if(!this.visible)return;let t=n.composedPath();!t.includes(this.el)&&!t.includes(this.container)&&this.hide()};this.destroy=()=>{document.removeEventListener("click",this._handleDocumentClick),this.container.remove()};this.show=()=>{if(this.visible)return;this.visible=!0,document.addEventListener("click",this._handleDocumentClick);let n=m._setAbsolutePosition(this.el,this.container,"bottom",this.options.margin,this.options.transition,this.options.align);this.container.style.visibility="visible",this.container.style.transition=this._transition,setTimeout(()=>{this.container.style.transform=`translateX(${n.x}px) translateY(${n.y}px)`,this.container.style.opacity="1"},1)};this.hide=()=>{this.visible&&(this.visible=!1,document.removeEventListener("click",this._handleDocumentClick),this.container.removeAttribute("style"),this.container.style.transition=this._transition,setTimeout(()=>{this.container.style.transform="translateX(0px) translateY(0px)",this.container.style.opacity="0"},1))};this.el=n,this.options={...Ti,...e},this.container=document.createElement("div"),this.container.classList.add("display-docked"),this.container.append(t),n.parentElement.append(this.container)}get _transition(){return`
7
- transform ${this.options.duration}ms ease-out,
8
- opacity ${this.options.duration}ms ease-out`}static init(n,t,e){return new d(n,t,e)}};var Mi={format:"mmm dd, yyyy",parse:null,isDateRange:!1,dateRangeEndEl:null,isMultipleSelection:!1,defaultDate:null,defaultEndDate:null,setDefaultDate:!1,setDefaultEndDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearRangeReverse:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,openByDefault:!1,container:null,showClearBtn:!1,autoSubmit:!0,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",previousMonth:"\u2039",nextMonth:"\u203A",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onDraw:null,onInputInteraction:null,displayPlugin:null,displayPluginOptions:null,onConfirm:null,onCancel:null},_=class _ extends E{constructor(t,e){super(t,e,_);this.multiple=!1;this._writtenInputs=new WeakMap;this._checkedRows=new Set;this._drawDepth=0;this._drawDirty=!1;this._controlsKey=null;this._randId=null;this._focusedDate=null;this._handleInputClick=t=>{t.target.type=="date"&&(this.options.openByDefault||this.options.container)&&t.preventDefault(),this._batchDraws(()=>{this.setDateFromInput(t.target),this.draw(),this.gotoDate(t.target===this.el?this.date:this.endDate)}),this.displayPlugin&&this.displayPlugin.show(),this.options.onInputInteraction&&this.options.onInputInteraction.call(this)};this._handleInputKeydown=t=>{t.key===m.keys.ENTER&&(t.preventDefault(),this._batchDraws(()=>{this.setDateFromInput(t.target),this._focusedDate=t.target===this.endDateEl?this.endDate:this.date,this.draw()}),this.displayPlugin&&this.displayPlugin.show(),this._syncCalendarFocus(!0),this.options.onInputInteraction&&this.options.onInputInteraction.call(this))};this._handleCalendarFocus=t=>{let e=t.target;e.matches(".datepicker-day-button")&&(this._focusedDate=this._dayDate(e),this._syncCalendarFocus())};this._handleCalendarKeydown=t=>{let e=t.target;if(!e.matches(".datepicker-day-button")||t.altKey||t.ctrlKey||t.metaKey)return;let i=this._dayDate(e),s=(i.getDay()-this.options.firstDay+7)%7,o={ArrowLeft:this.options.isRTL?1:-1,ArrowRight:this.options.isRTL?-1:1,ArrowUp:-7,ArrowDown:7,Home:-s,End:6-s};if(Object.hasOwn(o,t.key))i.setDate(i.getDate()+o[t.key]);else if(t.key==="PageUp"||t.key==="PageDown"){let v=i.getDate();i.setDate(1),i.setMonth(i.getMonth()+(t.key==="PageUp"?-1:1)*(t.shiftKey?12:1));let g=new Date(i.getTime());g.setMonth(g.getMonth()+1,0),i.setDate(Math.min(v,g.getDate()))}else return;t.preventDefault();let{minDate:a,maxDate:r,minYear:h,maxYear:c,minMonth:l,maxMonth:u}=this.options;if(a&&i<a&&i.setTime(a.getTime()),r&&i>r&&i.setTime(r.getTime()),i.getFullYear()<h||i.getFullYear()>c||i.getFullYear()===h&&i.getMonth()<(l??0)||i.getFullYear()===c&&i.getMonth()>(u??11))return;this._focusedDate=i;let{year:f,month:p}=this.calendars[0];i.getFullYear()===f&&i.getMonth()===p?this._syncCalendarFocus(!0):this.gotoDate(i)};this._handleCalendarClick=t=>{let e=t.target;e.classList.contains("is-disabled")||this._batchDraws(()=>{if(e.classList.contains("datepicker-day-button")&&!e.classList.contains("is-empty")&&!e.parentElement.classList.contains("is-disabled")&&!e.parentElement.classList.contains("is-selection-disabled")){let i=new Date(t.target.getAttribute("data-year"),t.target.getAttribute("data-month"),t.target.getAttribute("data-day"));(!this.multiple||this.options.isMultipleSelection)&&this.setDate(i),this.options.isDateRange&&this._handleDateRangeCalendarClick(i),this.options.autoSubmit&&this._finishSelection()}else e.closest(".month-prev")?this.prevMonth():e.closest(".month-next")&&this.nextMonth()})};this._handleDateRangeCalendarClick=t=>{if(this.endDate==null||!_._compareDates(t,this.endDate)){if(_._isDate(this.date)&&_._comparePastDate(t,this.date))return;this.setDate(t,!1,_._isDate(this.date));return}this._clearDates(),this.draw()};this._handleClearClick=()=>{this._clearDates(),this.setInputValues()};this._clearDates=()=>{this.date=null,this.endDate=null,this.dates?.splice(0),this.draw()};this._handleMonthChange=t=>{this.gotoMonth(t.target.value)};this._handleYearChange=t=>{this.gotoYear(t.target.value)};this._handleInputChange=t=>{t.detail?.firedBy!==this&&this.setDateFromInput(t.target)};this._finishSelection=()=>{this.setInputValues()};this._confirm=()=>{this._finishSelection(),typeof this.options.onConfirm=="function"&&this.options.onConfirm.call(this)};this._cancel=()=>{typeof this.options.onCancel=="function"&&this.options.onCancel.call(this)};this.el.Expressive_Datepicker=this,this.options={..._.defaults,...e},e&&e.hasOwnProperty("i18n")&&typeof e.i18n=="object"&&(this.options.i18n={..._.defaults.i18n,...e.i18n}),this.options.minDate&&this.options.minDate.setHours(0,0,0,0),this.options.maxDate&&this.options.maxDate.setHours(0,0,0,0),this.id=m.guid(),this.options.isMultipleSelection&&(this.multiple=!0,this.dates=[],this.dateEls=[t]),this._setupVariables(),this._insertHTMLIntoDOM(),this._setupEventHandlers(),this.options.defaultDate||(this.options.defaultDate=this._parseInput(this.el.value));let i=this.options.defaultDate;if(_._isDate(i)?this.options.setDefaultDate?(this.setDate(i,!0),this.setInputValue(this.el,i)):this.gotoDate(i):this.gotoDate(new Date),this.options.isDateRange){this.multiple=!0;let s=this.options.defaultEndDate;_._isDate(s)&&this.options.setDefaultEndDate&&(this.setDate(s,!0,!0),this.setInputValue(this.endDateEl,s))}this.options.displayPlugin==="docked"&&(this.displayPlugin=vt.init(this.el,this.containerEl,this.options.displayPluginOptions))}static get defaults(){return Mi}static init(t,e={}){return super.init(t,e,_)}static _escape(t){return String(t??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}static _isDate(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())}static _parseDate(t){if(t=t.trim(),!/^\d{4}-\d{2}-\d{2}$/.test(t))return new Date(Date.parse(t));let e=new Date(t+"T00:00:00");return e.getDate()===Number(t.slice(-2))?e:new Date(NaN)}_parseInput(t){return!t.trim()||!this.options.parse?_._parseDate(t):this.options.parse(t,typeof this.options.format=="string"?this.options.format:"")}static _isWeekend(t){let e=t.getDay();return e===0||e===6}static _setToStartOfDay(t){_._isDate(t)&&t.setHours(0,0,0,0)}static _getDaysInMonth(t,e){return[31,_._isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}static _isLeapYear(t){return t%4===0&&t%100!==0||t%400===0}static _compareDates(t,e){return t.getTime()===e.getTime()}static _compareWithinRange(t,e,i){return t.getTime()>e.getTime()&&t.getTime()<i.getTime()}static _comparePastDate(t,e){return t.getTime()<e.getTime()}static getInstance(t){return t.Expressive_Datepicker}destroy(){this._removeEventHandlers(),this.dateEls?.slice(1).forEach(t=>this._removeDateInput(t)),!this.options.dateRangeEndEl&&this.endDateEl&&this._removeDateInput(this.endDateEl),this.displayPlugin?.destroy(),this.containerEl.remove(),this.destroySelects(),this.el.Expressive_Datepicker=void 0}destroySelects(){let t=this.calendarEl.querySelector(".orig-select-year");t&&D.getInstance(t).destroy();let e=this.calendarEl.querySelector(".orig-select-month");e&&D.getInstance(e).destroy()}_insertHTMLIntoDOM(){if(this.el.type=="date"&&this.el.classList.add("datepicker-date-input"),this._renderDateInputFormat(this.el),this.options.isDateRange&&(this.containerEl.classList.add("daterange"),this.options.dateRangeEndEl?(this.endDateEl=document.querySelector(this.options.dateRangeEndEl),this.endDateEl?this._renderDateInputFormat(this.endDateEl):console.warn("Specified date range end input element in dateRangeEndEl not found")):(this.endDateEl=this.createDateInput(),this.endDateEl.classList.add("datepicker-end-date"))),m.createButton(this.footer,this.options.i18n.clear,["datepicker-clear"],this.options.showClearBtn,this._handleClearClick),this.options.autoSubmit||m.createConfirmationContainer(this.footer,this.options.i18n.done,this.options.i18n.cancel,this._confirm,this._cancel),this.options.container){let t=this.options.container;this.options.container=t instanceof HTMLElement?t:document.querySelector(t),this.options.container.append(this.containerEl)}else{let t=this.endDateEl?this.endDateEl:this.el;this.options.openByDefault||this.containerEl.setAttribute("style","display: none; visibility: hidden;"),t.parentElement.after(this.containerEl)}}_renderDateInputFormat(t){let e=t.parentElement?.querySelector(".datepicker-format");e&&(e.textContent=typeof this.options.format=="function"?"":String(this.options.format))}toString(t=this.date,e=null){return e=e||this.options.format,typeof e=="function"?e(t):_._isDate(t)?this.formatDate(t,e):""}formatDate(t,e){return e.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(s=>this.formats[s]?this.formats[s](t):s).join("")}setDateFromInput(t){if(t.type==="date"&&this.setDataDate(t,_._parseDate(t.value)),(this.options.isDateRange||!this.options.isMultipleSelection)&&!t.value.trim()){this.setSingleDate(null,t===this.endDateEl),this.draw();return}let e=!this.options.parse&&this._writtenInputs.get(t),i=e&&e.value===t.value?e.date:this._parseInput(t.value);if(!_._isDate(i))return;let s=new Date(i.getTime());_._setToStartOfDay(s);let o=t===this.endDateEl;if(this.options.isDateRange&&(o?this.date&&s<this.date:this.endDate&&s>this.endDate)){this.setInputValue(t,o?this.endDate:this.date);return}this.setDate(s,!1,o,!0)}setDate(t=null,e=!1,i=!1,s=!1){let o=this.validateDate(t);o&&(_._setToStartOfDay(o),this.options.isMultipleSelection?s||this.setMultiDate(o):this.setSingleDate(o,i),this.gotoDate(o),!e&&typeof this.options.onSelect=="function"&&this.options.onSelect.call(this,o))}validateDate(t){if(!t)return this._renderDateDisplay(t),this.draw();if(typeof t=="string"&&(t=_._parseDate(t)),!_._isDate(t))return;let e=this.options.minDate,i=this.options.maxDate;return _._isDate(e)&&t<e?t=e:_._isDate(i)&&t>i&&(t=i),new Date(t.getTime())}setSingleDate(t,e){e?this.endDate=t:this.date=t}setMultiDate(t){let e=this.dates.findIndex(i=>i.getTime()===t.getTime());e===-1?this.dates.push(t):this.dates.splice(e,1),this.dates.sort((i,s)=>i.getTime()<s.getTime()?-1:0)}setDataDate(t,e){t.setAttribute("data-date",_._isDate(e)?this.toString(e):"")}setInputValues(){if(!this.options?.isMultipleSelection){this.setInputValue(this.el,this.date),this.options?.isDateRange&&this.setInputValue(this.endDateEl,this.endDate);return}this.setMultipleSelectionInputValues()}setMultipleSelectionInputValues(){let t=Math.max(1,this.dates.length);for(let e of this.dateEls.splice(t))this._removeDateInput(e);for(;this.dateEls.length<t;)this.dateEls.push(this.createDateInput());this.dateEls.forEach((e,i)=>this.setInputValue(e,this.dates[i]??null))}setInputValue(t,e){t&&(t.type=="date"&&this.setDataDate(t,e),_._isDate(e)?t.type=="date"?t.value=this.formatDate(e,"yyyy-mm-dd"):t.value=this.toString(e):t.value="",this._writtenInputs.set(t,{value:t.value,date:_._isDate(e)?new Date(e.getTime()):null}),t.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0,composed:!0,detail:{firedBy:this}})))}_renderDateDisplay(t,e=null){let i=_._isDate(t)?t:new Date;if(!this.options.isDateRange)this.dateTextEl.textContent=this.formatDate(i,"ddd, mmm d");else{let s=_._isDate(e)?e:new Date;this.dateTextEl.textContent=`${this.formatDate(i,"mmm d")} - ${this.formatDate(s,"mmm d")}`}}gotoDate(t){let e=!0;if(_._isDate(t)){if(this.calendars){let i=new Date(this.calendars[0].year,this.calendars[0].month,1),s=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),o=t.getTime();s.setMonth(s.getMonth()+1),s.setDate(s.getDate()-1),e=o<i.getTime()||s.getTime()<o}e&&(this.calendars=[{month:t.getMonth(),year:t.getFullYear()}]),this.adjustCalendars()}}adjustCalendars(){this.calendars[0]=this.adjustCalendar(this.calendars[0]),this.draw()}adjustCalendar(t){return t.month<0&&(t.year-=Math.ceil(Math.abs(t.month)/12),t.month+=12),t.month>11&&(t.year+=Math.floor(Math.abs(t.month)/12),t.month-=12),t}nextMonth(){this.calendars[0].month++,this.adjustCalendars()}prevMonth(){this.calendars[0].month--,this.adjustCalendars()}render(t,e,i){let s=new Date,o=_._getDaysInMonth(t,e),a=[],r=new Date(t,e,1).getDay(),h=[];_._setToStartOfDay(s),this.options.firstDay>0&&(r-=this.options.firstDay,r<0&&(r+=7));let c=e===0?11:e-1,l=e===11?0:e+1,u=e===0?t-1:t,f=e===11?t+1:t,p=_._getDaysInMonth(u,c),v=Math.ceil((o+r)/7)*7;for(let g=0,L=0;g<v;g++){let y=new Date(t,e,1+(g-r)),S=_._compareDates(y,s),G=this.options.events.indexOf(y.toDateString())!==-1,Y=g<r||g>=o+r,xt=this.options.startRange&&_._compareDates(this.options.startRange,y),Wt=this.options.endRange&&_._compareDates(this.options.endRange,y),Ce=this.options.startRange&&this.options.endRange&&this.options.startRange<y&&y<this.options.endRange,we=this.options.minDate&&y<this.options.minDate||this.options.maxDate&&y>this.options.maxDate||this.options.disableWeekends&&_._isWeekend(y)||this.options.disableDayFn&&this.options.disableDayFn(y),Ie=this.options.isDateRange&&this.date&&this.endDate&&_._compareDates(this.date,y),ke=this.options.isDateRange&&this.endDate&&_._compareDates(this.endDate,y),Se=this.options.isDateRange&&_._isDate(this.date)&&_._isDate(this.endDate)&&_._compareWithinRange(y,this.date,this.endDate),Ct=1+(g-r),$t=e,Vt=t,wt=!1;_._isDate(this.date)&&(wt=_._compareDates(y,this.date)),!wt&&_._isDate(this.endDate)&&(wt=_._compareDates(y,this.endDate)),this.options.isMultipleSelection&&this.dates?.some(Oe=>Oe.getTime()===y.getTime())&&(wt=!0),Y&&(g<r?(Ct=p+Ct,$t=c,Vt=u):(Ct=Ct-o,$t=l,Vt=f));let Ae={day:Ct,month:$t,year:Vt,hasEvent:G,isSelected:wt,isToday:S,isDisabled:we,isEmpty:Y,isStartRange:xt,isEndRange:Wt,isInRange:Ce,showDaysInNextAndPreviousMonths:this.options.showDaysInNextAndPreviousMonths,isDateRangeStart:Ie,isDateRangeEnd:ke,isDateRange:Se};h.push(this.renderDay(Ae)),++L===7&&(a.push(this.renderRow(h,this.options.isRTL,!1)),h=[],L=0)}return this.renderTable(this.options,a,i)}renderDay(t){let e={isDisabled:"is-disabled",isToday:"is-today",isSelected:"is-selected",hasEvent:"has-event",isInRange:"is-inrange",isStartRange:"is-startrange",isEndRange:"is-endrange",isDateRangeStart:"is-daterange-start",isDateRangeEnd:"is-daterange-end",isDateRange:"is-daterange"},i=t.isSelected===!0||t.isDateRange===!0,s=["datepicker-day"];if(t.isEmpty)if(t.showDaysInNextAndPreviousMonths)s.push("is-outside-current-month"),s.push("is-selection-disabled");else return'<td class="is-empty"></td>';for(let[h,c]of Object.entries(e))t.hasOwnProperty(h)&&t[h]&&s.push(c);let o=_._escape(t.day),a=_._escape(t.month),r=_._escape(t.year);return`<td data-day="${o}" class="${s.join(" ")}" aria-selected="${i}"><button class="datepicker-day-button" type="button" data-year="${r}" data-month="${a}" data-day="${o}">${o}</button></td>`}renderRow(t,e,i){let s='<tr class="datepicker-row'+(i?" is-selected":"")+'">'+_._calendarMarkup((e?t.reverse():t).join(""),"tr")+"</tr>";return this._checkedRows.add(s),s}renderTable(t,e,i){return'<div class="datepicker-table-wrapper"><table cellpadding="0" cellspacing="0" class="datepicker-table" role="grid" aria-labelledby="'+_._escape(i)+'">'+this.renderHead(t)+this.renderBody(e)+"</table></div>"}renderHead(t){let e=[],i;for(i=0;i<7;i++){let s=_._escape(this.renderDayName(t,i)),o=_._escape(this.renderDayName(t,i,!0));e.push(`<th scope="col"><abbr title="${s}">${o}</abbr></th>`)}return"<thead><tr>"+(t.isRTL?e.reverse():e).join("")+"</tr></thead>"}renderBody(t){let e=t.join(""),i=_._calendarMarkup(e,"tbody");return this._checkedRows.clear(),"<tbody>"+i+"</tbody>"}static _calendarMarkup(t,e){let i=document.createElement("template");i.innerHTML=t;let s={tbody:"tr",tr:"td",td:"button"},o={tr:["class"],td:["class","data-day","aria-selected"],button:["class","type","data-year","data-month","data-day","aria-label","disabled","tabindex"]},a=(r,h)=>{if(r.nodeType===Node.TEXT_NODE){if((h==="tbody"||h==="tr")&&r.textContent.trim())throw new TypeError("Unsupported calendar row content");return _._escape(r.textContent)}if(!(r instanceof HTMLElement))throw new TypeError("Unsupported calendar row content");let c=s[h];if(!c||r.localName!==c)throw new TypeError("Unsupported calendar row element");if([...r.attributes].some(u=>!o[c].includes(u.name)))throw new TypeError("Unsupported calendar row attribute");if(c==="button"&&r.getAttribute("type")!=="button")throw new TypeError('Calendar day buttons require type="button"');let l=o[c].filter(u=>r.hasAttribute(u)).map(u=>` ${u}="${_._escape(r.getAttribute(u))}"`).join("");return`<${c}${l}>${[...r.childNodes].map(u=>a(u,c)).join("")}</${c}>`};return[...i.content.childNodes].map(r=>a(r,e)).join("")}_arrowState(t,e){let i=this.options,s=t===i.minYear,o=t===i.maxYear;return{prev:!(s&&(e===0||i.minMonth>=e)),next:!(o&&(e===11||i.maxMonth<=e))}}_controlsCacheKey(t){let e=this.options;return[t,e.minYear,e.maxYear,e.minMonth,e.maxMonth,Array.isArray(e.yearRange)?e.yearRange.join("-"):e.yearRange,e.yearRangeReverse,e.showMonthAfterYear].join("|")}renderTitle(t,e,i,s,o,a){let r=this.options,h=i===r.minYear,c=i===r.maxYear,l,u,f=[],p='<div id="'+_._escape(a)+'" class="datepicker-controls" role="heading" aria-live="assertive">',{prev:v,next:g}=this._arrowState(i,s);for(l=0;l<12;l++)f.push('<option value="'+(i===o?l-e:12+l-e)+'"'+(l===s?' selected="selected"':"")+(h&&l<r.minMonth||c&&l>r.maxMonth?'disabled="disabled"':"")+">"+_._escape(r.i18n.months[l])+"</option>");let L='<select class="datepicker-select orig-select-month" tabindex="-1">'+f.join("")+"</select>";for(Array.isArray(r.yearRange)?(l=r.yearRange[0],u=r.yearRange[1]+1):(l=i-r.yearRange,u=1+i+r.yearRange),f=[];l<u&&l<=r.maxYear;l++)l>=r.minYear&&f.push(`<option value="${l}" ${l===i?'selected="selected"':""}>${l}</option>`);r.yearRangeReverse&&f.reverse();let y=`<select class="datepicker-select orig-select-year" tabindex="-1">${f.join("")}</select>`;return p+=`<button class="month-prev${v?"":" is-disabled"}" type="button"><svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg></button>`,p+='<div class="selects-container">',r.showMonthAfterYear?p+=y+L:p+=L+y,p+="</div>",p+=`<button class="month-next${g?"":" is-disabled"}" type="button"><svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></svg></button>`,p+="</div>"}_batchDraws(t){this._drawDepth++;try{t()}finally{this._drawDepth--,this._drawDepth===0&&this._drawDirty&&(this._drawDirty=!1,this.draw())}}draw(){if(this._drawDepth>0){this._drawDirty=!0;return}let t=this.calendarEl.getRootNode().activeElement,e=t?.matches(".datepicker-day-button")&&this.calendarEl.contains(t),i=this.calendarEl.contains(t)&&t?.matches(".month-prev, .month-next")?t.classList.contains("month-prev")?".month-prev":".month-next":null,s=this.calendars[0].year,o=this.calendars[0].month;this._renderDateDisplay(this.date,this.endDate);let a=this._controlsCacheKey(s);a===this._controlsKey&&this.calendarEl.querySelector(".datepicker-controls")?this._reuseControls(s,o):(this._controlsKey=a,this._randId="datepicker-title-"+m.guid(),this._rebuildControls(s,o)),this._renderCalendarTable(s,o),this._syncCalendarFocus(!!e),i&&this.calendarEl.querySelector(i)?.focus(),typeof this.options.onDraw=="function"&&this.options.onDraw.call(this)}_rebuildControls(t,e){this.destroySelects(),this.calendarEl.innerHTML=this.renderTitle(this,0,t,e,t,this._randId);let i=this.calendarEl.querySelector(".orig-select-year"),s=this.calendarEl.querySelector(".orig-select-month");D.init(i,{classes:"select-year",menuOptions:{container:m.portalRoot(this.el),constrainWidth:!1}}),D.init(s,{classes:"select-month",menuOptions:{container:m.portalRoot(this.el),constrainWidth:!1}}),i.addEventListener("change",this._handleYearChange),s.addEventListener("change",this._handleMonthChange)}_reuseControls(t,e){let i=this.calendarEl.querySelector(".orig-select-month");i&&i.value!==e.toString()&&(i.value=e.toString(),D.getInstance(i)?.refresh());let{prev:s,next:o}=this._arrowState(t,e);this.calendarEl.querySelector(".month-prev")?.classList.toggle("is-disabled",!s),this.calendarEl.querySelector(".month-next")?.classList.toggle("is-disabled",!o)}_renderCalendarTable(t,e){let i=this.render(t,e,this._randId),s=this.calendarEl.querySelector(".datepicker-table-wrapper");s?s.outerHTML=i:this.calendarEl.insertAdjacentHTML("beforeend",i)}_setupEventHandlers(){this._addInputEventHandlers(this.el),this.endDateEl&&this._addInputEventHandlers(this.endDateEl),this.calendarEl.addEventListener("click",this._handleCalendarClick),this.calendarEl.addEventListener("keydown",this._handleCalendarKeydown),this.calendarEl.addEventListener("focusin",this._handleCalendarFocus)}_setupVariables(){let t=document.createElement("template");t.innerHTML=_._template.trim(),this.containerEl=t.content.firstChild,this.calendarEl=this.containerEl.querySelector(".datepicker-calendar"),this.yearTextEl=this.containerEl.querySelector(".year-text"),this.dateTextEl=this.containerEl.querySelector(".date-text"),this.footer=this.containerEl.querySelector(".datepicker-footer"),this.formats={d:e=>e.getDate(),dd:e=>{let i=e.getDate();return(i<10?"0":"")+i},ddd:e=>this.options.i18n.weekdaysShort[e.getDay()],dddd:e=>this.options.i18n.weekdays[e.getDay()],m:e=>e.getMonth()+1,mm:e=>{let i=e.getMonth()+1;return(i<10?"0":"")+i},mmm:e=>this.options.i18n.monthsShort[e.getMonth()],mmmm:e=>this.options.i18n.months[e.getMonth()],yy:e=>(""+e.getFullYear()).slice(2),yyyy:e=>e.getFullYear()}}_removeEventHandlers(){for(let t of this.dateEls??[this.el])this._removeInputEventHandlers(t);this.calendarEl.removeEventListener("click",this._handleCalendarClick),this.calendarEl.removeEventListener("keydown",this._handleCalendarKeydown),this.calendarEl.removeEventListener("focusin",this._handleCalendarFocus),this.options.isDateRange&&this.endDateEl&&this._removeInputEventHandlers(this.endDateEl)}_addInputEventHandlers(t){t.addEventListener("click",this._handleInputClick),t.addEventListener("keydown",this._handleInputKeydown),t.addEventListener("change",this._handleInputChange)}_removeInputEventHandlers(t){t.removeEventListener("click",this._handleInputClick),t.removeEventListener("keydown",this._handleInputKeydown),t.removeEventListener("change",this._handleInputChange)}_removeDateInput(t){let e=t.getRootNode().activeElement===t;this._removeInputEventHandlers(t),t.remove(),e&&document.activeElement===document.body&&this.el.focus()}_dayDate(t){let e=new Date(0);return e.setFullYear(Number(t.dataset.year),Number(t.dataset.month),Number(t.dataset.day)),_._setToStartOfDay(e),e}_syncCalendarFocus(t=!1){let e=[...this.calendarEl.querySelectorAll(".datepicker-day-button")],i=e.filter(a=>!a.parentElement.classList.contains("is-selection-disabled")),s=this._focusedDate||this.date||new Date,o=i.find(a=>_._compareDates(this._dayDate(a),s))||i.find(a=>a.parentElement.classList.contains("is-selected"))||i.find(a=>!a.parentElement.classList.contains("is-disabled"))||i[0];for(let a of e)a.tabIndex=a===o?0:-1,a.setAttribute("aria-disabled",String(a.parentElement.matches(".is-disabled, .is-selection-disabled")));o&&(this._focusedDate=this._dayDate(o),t&&o.focus())}gotoMonth(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())}gotoYear(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())}renderDayName(t,e,i=!1){for(e+=t.firstDay;e>=7;)e-=7;return i?t.i18n.weekdaysAbbrev[e]:t.i18n.weekdays[e]}createDateInput(){let t=this.el.cloneNode(!0);return t.removeAttribute("id"),t.classList.add("no-autoinit"),this._addInputEventHandlers(t),this.el.parentElement.appendChild(t),t}};_._template=`
5
+ </svg></div>`,K._loadingTemplate=t.content.firstElementChild}return K._loadingTemplate.cloneNode(!0)}destroy(){this._openTimer!==void 0&&(clearTimeout(this._openTimer),this._openTimer=void 0),this._cancelPendingSearch(),this._searchAbort?.abort(),this._events.abort(),this.menu.destroy(),this.isOpen=!1,this._removeMenu();for(let t of["role","aria-autocomplete","aria-controls","data-target","aria-haspopup","aria-expanded","aria-activedescendant"])this.el.removeAttribute(t);this._statusInfo.remove(),this._announcer.remove(),super.destroy()}_setupEventHandlers(){let{signal:t}=this._events;this.el.addEventListener("blur",this._handleInputBlur,{signal:t}),this.el.addEventListener("input",this._handleInput,{signal:t}),this.el.addEventListener("keyup",this._handleInputKeyup,{signal:t}),this.el.addEventListener("focus",this._handleInputFocus,{signal:t}),this.el.addEventListener("keydown",this._handleInputKeydown,{signal:t}),this.el.addEventListener("click",this._handleInputClick,{signal:t}),this.container.addEventListener("pointerdown",this._handleContainerPointerDown,{signal:t}),this.container.addEventListener("pointerup",this._handleContainerPointerUp,{signal:t}),this.container.addEventListener("pointercancel",this._handleContainerPointerUp,{signal:t}),this.container.addEventListener("mousedown",this._handleInertRowPress,{capture:!0,signal:t}),this.container.addEventListener("click",this._handleInertRowPress,{capture:!0,signal:t})}_setupMenu(){this.container=document.createElement("menu"),this.container.style.maxHeight=this.options.maxMenuHeight,this.container.id=`autocomplete-options-${u.guid()}`,this.container.classList.add("autocomplete-content"),this.container.ariaExpanded="true",this.container.setAttribute("role","listbox"),this.el.setAttribute("role","combobox"),this.el.setAttribute("aria-autocomplete","list"),this.el.setAttribute("aria-controls",this.container.id),this.el.setAttribute("data-target",this.container.id),this.menuItems.forEach(l=>{let c=this._createMenuItem(l);this.container.append(c)}),this.el.parentElement.appendChild(this.container);let t={...K.defaults.menuOptions,...this.options.menuOptions},e=t.onOpenStart,i=t.onCloseStart;t.onOpenStart=l=>{this.isOpen=!0,typeof e=="function"&&e.call(this.menu,l)},t.onCloseStart=l=>{this.isOpen=!1,typeof i=="function"&&i.call(this.menu,l)};let n=t.onItemClick;t.onItemClick=l=>{l&&(this._choose(l),typeof n=="function"&&n.call(this.menu,l))},this.menu=B.init(this.el,t),this.el.setAttribute("aria-haspopup","listbox");let o=this.el.parentElement.querySelector("label");o&&this.el.after(o),this.el.removeEventListener("click",this.menu._handleClick),this.el.removeEventListener("keydown",this.menu._handleTriggerKeydown),this.options.isMultiSelect||this._refreshInputText(),this.el.value&&this.selectOption(this.el.value);let a=document.createElement("div");a.classList.add("status-info"),a.setAttribute("aria-hidden","true"),a.setAttribute("style","position: absolute;right:0;top:0;"),this.el.parentElement.appendChild(a),this._statusInfo=a,this._announcer=document.createElement("div"),this._announcer.classList.add("autocomplete-status"),this._announcer.setAttribute("role","status"),this._announcer.setAttribute("aria-live","polite"),this._announcer.setAttribute("aria-atomic","true"),this.el.parentElement.appendChild(this._announcer),this._updateSelectedInfo()}_removeMenu(){this.container.ariaExpanded="false",this.container.parentNode.removeChild(this.container)}_queueSearch(t){this._cancelPendingSearch();let e=this.options.searchDelay;if(!t||!(e>0&&e<1/0))return this._search(this.el.value);this._searchAbort?.abort(),this._searchTimer=setTimeout(()=>{this._searchTimer=void 0,this._search(this.el.value)},e)}_cancelPendingSearch(){clearTimeout(this._searchTimer),this._searchTimer=void 0}_search(t){this._searchAbort?.abort(),this._searchAbort=new AbortController,this.options.onSearch(t,this,this._searchAbort.signal)}_dismiss(t){t.key==="Escape"&&((this.menu.isOpen||this._openTimer!==void 0)&&t.preventDefault(),this._left=!0),this.close(),this._resetCurrentElementPosition()}_options(){return this.container.querySelectorAll('li[role="option"]:not([aria-disabled="true"])')}_resetCurrentElementPosition(){this.activeIndex=-1,this._setActive(null)}_resetAutocomplete(){this.container.replaceChildren(),this._resetCurrentElementPosition(),this.oldVal=null,this._pointerDown=!1}_highlightPartialText(t,e){let i=e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase()),n=i+t.length-1;return i==-1||n==-1?[e,"",""]:[e.slice(0,i),e.slice(i,n+1),e.slice(n+1)]}_createMenuItem(t){let e=document.createElement("li");e.id=`autocomplete-option-${u.guid()}`,e.setAttribute("role","option");let i=this.selectedValues.some(l=>l.id===t.id);if(e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("data-id",t.id),K._markDisabled(e,t),e.setAttribute("style","display:grid; grid-auto-flow: column; user-select: none; align-items: center;"),e.tabIndex=-1,this.options.isMultiSelect){let l=document.createElement("div");l.classList.add("item-selection"),l.style.textAlign="center";let c=document.createElement("input");c.type="checkbox",c.tabIndex=-1,c.checked=i,c.disabled=t.disabled===!0;let h=document.createElement("span");h.style.paddingLeft="21px",l.append(c,h),e.appendChild(l)}if(t.image){let l=document.createElement("img");l.classList.add("circle"),l.src=t.image,e.appendChild(l)}let n=this._createLabel(t),o=document.createElement("div");if(o.classList.add("item-text"),o.setAttribute("style","padding:5px;overflow:hidden;"),e.appendChild(o),o.appendChild(n),typeof t.description=="string"||typeof t.description=="number"&&!isNaN(t.description)){let l=document.createElement("small");l.setAttribute("style","line-height:1.3;color:grey;white-space:nowrap;text-overflow:ellipsis;display:block;width:90%;overflow:hidden;"),l.innerText=t.description,o.appendChild(l)}let a=()=>this.options.isMultiSelect?t.image?"40px min-content auto":"40px auto":t.image?"min-content auto":"auto";return e.style.gridTemplateColumns=a(),e}static _markDisabled(t,e){e.disabled===!0&&t.setAttribute("aria-disabled","true")}_createLabel(t){let e=this.el.value.toLocaleLowerCase(),i=(t.text||t.id).toString(),n=document.createElement("div");return n.setAttribute("style","line-height:1.2;font-weight:500;"),this.options.allowUnsafeHTML&&t.text?this._highlightHTML(n,i,e):this._highlightText(n,this._highlightPartialText(e,i)),n}_highlightHTML(t,e,i){t.innerHTML=e;let n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(let o=n.nextNode();o;o=n.nextNode()){let[a,l]=this._highlightPartialText(i,o.data);if(!l)continue;let c=o.splitText(a.length);c.splitText(l.length);let h=document.createElement("span");h.classList.add("highlight"),c.replaceWith(h),h.append(c);break}}_highlightText(t,e){if(t.appendChild(document.createTextNode(e[0])),e[1]){let i=document.createElement("span");i.textContent=e[1],i.classList.add("highlight"),t.appendChild(i),t.appendChild(document.createTextNode(e[2]))}}_renderMenu(){this._resetAutocomplete(),this._noResults&&this.container.append(this._createNoResultsRow()),this.menuItems.length===0&&(this.menuItems=this.selectedValues);let t=new Map;this.menuItems.forEach(i=>this._groupList(i.group,t).append(this._createMenuItem(i)));let e=this._createText();e&&this.container.append(this._createRow(e))}_groupList(t,e){return t?(e.has(t)||e.set(t,this._createGroup(t)),e.get(t)):this.container}_createGroup(t){let e=document.createElement("li");e.id=`autocomplete-group-${u.guid()}`,e.setAttribute("role","presentation"),e.classList.add("label","autocomplete-group-label"),e.textContent=t;let i=document.createElement("ul");i.setAttribute("role","group"),i.setAttribute("aria-labelledby",e.id),i.append(e);let n=document.createElement("li");return n.setAttribute("role","none"),n.append(i),this.container.append(n),i}_createText(){let t=this.el.value.trim();if(!this.options.allowCreate||t.length<this.options.minLength)return"";let e=t.toLocaleLowerCase();return this.menuItems.some(i=>(i.text||String(i.id)).toLocaleLowerCase()===e)?"":t}_createRow(t){let e=document.createElement("li");e.id=`autocomplete-option-${u.guid()}`,e.setAttribute("role","option"),e.setAttribute("aria-selected","false"),e.setAttribute("data-create",t),e.classList.add("autocomplete-create"),e.setAttribute("style","display:grid; user-select: none; align-items: center;"),e.tabIndex=-1;let i=document.createElement("div");return i.classList.add("item-text"),i.setAttribute("style","padding:5px;overflow:hidden;line-height:1.2;font-weight:500;"),i.textContent=this.options.i18n.create(t),e.append(i),e}_createNoResultsRow(){let t=document.createElement("li");return t.classList.add("autocomplete-no-results"),t.setAttribute("role","none"),t.setAttribute("aria-hidden","true"),t.textContent=this.options.i18n.noResults,t}_setStatusLoading(){let t=this._statusInfo;t&&t.replaceChildren(K._loadingIndicator()),this._announce(this.options.i18n.loading)}_announce(t){if(!this._announcer)return;let e=this.el.matches(":focus")&&this.el.value.length>=this.options.minLength?t:"";this._announcer.textContent!==e&&(this._announcer.textContent=e)}_resultsMessage(){let t=this.menuItems.filter(e=>e.disabled!==!0).length;return t?this.options.i18n.results(t):this.options.i18n.noResults}_updateSelectedInfo(){let t=this._statusInfo;t&&(this.options.isMultiSelect?t.textContent=this.selectedValues.length.toString():t.replaceChildren())}_refreshInputText(){if(this.selectedValues.length===1){let t=this.selectedValues[0];this.el.value=t.text||t.id}}_triggerChanged(){let t=this.selectedValues,e=++this._selection;this.el.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0,composed:!0})),e===this._selection&&this._notify("autocomplete",this.options.onAutocomplete,{args:[t],detail:{values:t},current:()=>e===this._selection})}setMenuItems(t,e=null,i=!0){this.el.Expressive_Autocomplete===this&&(i&&(i=!this._left),this._noResults=t.length===0,this.menuItems=t,e&&(this.selectedValues=this.menuItems.filter(n=>e.indexOf(n.id)!==-1)),this.options.isMultiSelect?i||this._renderMenu():this._refreshInputText(),i&&this.open(),this._updateSelectedInfo(),this._announce(i?this._resultsMessage():""),e&&this._triggerChanged())}_toggleOption(t){let e=!this.selectedValues.some(n=>n.id===t.id);e?this.selectedValues.push(t):this.selectedValues=this.selectedValues.filter(n=>n.id!==t.id);let i=Array.from(this.container.querySelectorAll("li[data-id]")).find(n=>n.getAttribute("data-id")===String(t.id));i&&(i.setAttribute("aria-selected",String(e)),i.querySelector("input").checked=e),this.el.focus()}_selectSingle(t){let e=u.focusIsIn(this.container);this._cancelPendingSearch(),this.selectedValues=[t],this._refreshInputText(),this._resetAutocomplete(),this.close(),e&&(this.oldVal=this.el.value.toLocaleLowerCase(),this.el.focus())}_choose(t){t.hasAttribute("data-create")?this._create(t.getAttribute("data-create")):this.selectOption(t.getAttribute("data-id"))}_create(t){let e=u.focusIsIn(this.container);this._cancelPendingSearch(),this.oldVal=this.el.value.toLocaleLowerCase(),this.close(),e&&this.el.focus(),this._notify("create",this.options.onCreate,{args:[t,this],detail:{text:t}})}selectOption(t){let e=this.menuItems.find(i=>i.id==t&&i.disabled!==!0);e&&(this.options.isMultiSelect?this._toggleOption(e):this._selectSingle(e),this._updateSelectedInfo(),this.options.isMultiSelect&&this._announce(this.options.i18n.selected(this.selectedValues.length)),this._triggerChanged())}};K.key="Expressive_Autocomplete",K._loadingTemplate=null;var Q=K;var qe=()=>typeof ElementInternals<"u"&&"setFormValue"in ElementInternals.prototype,cs=new WeakMap;function dr(r){var s;customElements.get(r)||customElements.define(r,(s=class extends HTMLElement{constructor(){super(...arguments);this.internals=this.attachInternals();this.onFormReset=null}formResetCallback(){this.onFormReset?.()}get form(){return this.internals.form}get name(){return this.getAttribute("name")??""}get labels(){return this._input?.labels}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}get willValidate(){return this.internals.willValidate}checkValidity(){return this.internals.checkValidity()}reportValidity(){return this.internals.reportValidity()}focus(e){this._input?.focus(e)}get _input(){return this.querySelector(":scope > input")}},s.formAssociated=!0,s))}function ls(r,s){["disabled","form"].forEach(t=>x(r,t,s.getAttribute(t)))}function ze(r,s,t){dr(r);let e=document.createElement(r);e.style.display="contents",e.setAttribute("name",s.getAttribute("name")??""),s.removeAttribute("name"),s.replaceWith(e),e.append(s),ls(e,s);let i=new MutationObserver(()=>(ls(e,s),t()));return i.observe(s,{attributeFilter:["disabled","readonly","form"]}),cs.set(e,i),e}function Ke(r,s){cs.get(r)?.disconnect(),r.replaceWith(...r.childNodes),s.setAttribute("name",r.getAttribute("name")??"")}var pr="expressive-chips-control",mr=r=>(r.clipboardData?.getData("text")??"").split(/[,\t\n]/).map(s=>s.trim()).filter(Boolean),hs={data:[],placeholder:"",secondaryPlaceholder:"",closeIconClass:"material-symbols",autocompleteOptions:{},autocompleteOnly:!1,limit:1/0,allowUserInput:!1,i18n:{remove:"Remove",required:"Add at least one item."},onChipAdd:null,onChipSelect:null,onChipDelete:null},J=class J extends b{constructor(t,e){super(t,e);this._name="";this._initialData=[];this._ariaRequired=null;this._control=null;this._source=null;this._required=!1;this._handleInputPaste=t=>{let e=mr(t);e.length<2||this._suggestionsOnly||(t.preventDefault(),e.every(i=>(this.addChip({id:i}),J.getInstance(this.el)===this)))};this._handleChipClick=t=>{let e=t.target.closest(".chip"),i=!!t.target.closest(".close");if(e){let n=this._chips.indexOf(e);if(n<0)return;i?this._deleteChip(n,"input"):this.selectChip(n)}else this._input.focus()};this._handleFocusIn=t=>{let e=t.target.closest(".chip");this._setSelected(e&&this._chips.includes(e)?e:null)};this._handleFocusOut=t=>{this.el.contains(t.relatedTarget)||this._setSelected(null)};this._handleInputFocus=()=>{this.el.classList.add("focus")};this._handleInputBlur=()=>{this.el.classList.remove("focus")};this._handleInputKeydown=t=>{if(!u.isComposing(t))if(t.key==="Enter"){if(this.hasAutocomplete&&this.autocomplete?.isOpen&&this.autocomplete.container.querySelector('[role="option"]'))return;t.preventDefault(),(!this.hasAutocomplete||!this.options.autocompleteOnly)&&this.addChip({id:this._input.value}),this._input.value="",this.autocomplete?.close()}else this._input.value===""&&this.chipsData.length&&["Backspace",J._backKey(this.el)].includes(t.key)&&(t.preventDefault(),this.selectChip(this.chipsData.length-1))};this.el.classList.add("chips"),this.chipsData=[],this._chips=[],this._takeName(),this.options.data.length&&(this.chipsData=[...this.options.data],this._renderChips()),this.options.allowUserInput&&(this.el.classList.add("field"),this._setupInput(),this._setupEventHandlers(),this.el.append(this._end)),this._setupLabel(),this._sync(),this._initialData=[...this.chipsData]}_setSelected(t){this._selectedChip?.classList.remove("selected"),this._selectedChip=t,t?.classList.add("selected")}static get defaults(){return hs}getData(){return this.chipsData}destroy(){this.autocomplete&&Q.getInstance(this._input)===this.autocomplete&&this.autocomplete.destroy(),this._events.abort(),this._chips.forEach(t=>t.remove()),this._chips=[],this._giveNameBack(),super.destroy()}_setupEventHandlers(){let{signal:t}=this._events;this.el.addEventListener("click",this._handleChipClick,{signal:t}),this.el.addEventListener("keydown",J._handleChipsKeydown,{signal:t}),this.el.addEventListener("focusin",this._handleFocusIn,{signal:t}),this.el.addEventListener("focusout",this._handleFocusOut,{signal:t}),this._input.addEventListener("focus",this._handleInputFocus,{signal:t}),this._input.addEventListener("blur",this._handleInputBlur,{signal:t}),this._input.addEventListener("keydown",this._handleInputKeydown,{signal:t}),this._input.addEventListener("paste",this._handleInputPaste,{signal:t})}_takeName(){let t=this._editorInput();this._name=t?.getAttribute("name")??"",this._name&&qe()&&this._wrap(t)}_wrap(t){this._source=t,this._takeRequired(t),this._control=ze(pr,t,()=>this._validate()),this._control.onFormReset=()=>this._resetChips(),this._validate()}_editorInput(){return this.options.allowUserInput?this.el.querySelector('input:is(:not([type]), [type="text"])'):null}get _end(){return this._control??this._input}_sync(){if(!this._control)return;let t=new FormData;this.chipsData.forEach(e=>t.append(this._name,String(e.id))),this._control.internals.setFormValue(t),this._validate()}_takeRequired(t){this._required=t.required,this._required&&(this._ariaRequired=t.getAttribute("aria-required"),t.required=!1,t.setAttribute("aria-required","true"))}_validate(){let t=this._control.internals;this._required&&!this._source.readOnly&&!this.chipsData.length?t.setValidity({valueMissing:!0},this._requiredMessage,this._anchor):t.setValidity({})}get _anchor(){return this._control.contains(this._source)?this._source:void 0}get _requiredMessage(){return this.options.i18n.required||hs.i18n.required}_resetChips(){this._setSelected(null),this._chips.forEach(t=>t.remove()),this.chipsData=[...this._initialData],this._chips=this.chipsData.map(t=>this._renderChip(t)),this._control.before(...this._chips),this._setPlaceholder(),this._sync()}_giveNameBack(){this._control&&(Ke(this._control,this._source),this._control=null,this._required&&(this._source.required=!0,x(this._source,"aria-required",this._ariaRequired)))}get _suggestionsOnly(){return this.hasAutocomplete&&this.options.autocompleteOnly}static _backKey(t){return getComputedStyle(t).direction==="rtl"?"ArrowRight":"ArrowLeft"}static _handleChipsKeydown(t){let e=t.target.closest(".chips"),i=t.target.tagName;if(i==="INPUT"||i==="TEXTAREA"||!e)return;let n=e.Expressive_Chips;if(n){if(t.key==="Backspace"||t.key==="Delete"){let o=n._chips.indexOf(t.target.closest(".chip"));if(o<0)return;t.preventDefault(),n._deleteChip(o,"previous")}else if(t.key==="ArrowLeft"||t.key==="ArrowRight"){let o=t.target.closest(".chip")??n._selectedChip,a=n._chips.indexOf(o);if(a<0)return;if(t.key===J._backKey(e))a>0&&n.selectChip(a-1);else{let l=a+1;l>=n.chipsData.length?(n._setSelected(null),n._input.focus()):n.selectChip(l)}}}}_renderChip(t){if(!t.id&&t.id!==0)return;let e=t.text||t.id,i=document.createElement("span");if(i.classList.add("chip"),i.innerText=e,t.image){let n=document.createElement("img");n.setAttribute("src",t.image),i.insertBefore(n,i.firstChild)}if(this.options.allowUserInput){let n=document.createElement("button");n.type="button",n.classList.add("close"),n.setAttribute("aria-label",`${this.options.i18n.remove} ${e}`);let o=document.createElement("span");o.classList.add(this.options.closeIconClass),o.setAttribute("aria-hidden","true"),o.innerText="close",n.appendChild(o),i.appendChild(n)}return i}_renderChips(){this._chips=[];for(let t=0;t<this.chipsData.length;t++){let e=this._renderChip(this.chipsData[t]);this.el.appendChild(e),this._chips.push(e)}}_setupAutocomplete(){this.options.autocompleteOptions.onAutocomplete=e=>{J.getInstance(this.el)===this&&e.length>0&&(this.addChip({id:e[0].id,text:e[0].text,image:e[0].image}),this._input.value="",this._input.focus())};let t=this.options.autocompleteOptions.onCreate;this.autocomplete=Q.init(this._input,{...this.options.autocompleteOptions,onCreate:(e,i)=>{this._addTyped(e),typeof t=="function"&&t.call(i,e,i)}})}_addTyped(t){J.getInstance(this.el)===this&&(this.addChip({id:t}),this._input.value="",this._input.focus())}_setupInput(){this._input=this.el.querySelector("input"),this._input||(this._input=document.createElement("input"),this.el.append(this._input)),this._input.classList.add("input"),this.hasAutocomplete=Object.keys(this.options.autocompleteOptions).length>0,this.hasAutocomplete&&this._setupAutocomplete(),this._setPlaceholder(),this._input.getAttribute("id")||this._input.setAttribute("id",u.guid())}_setupLabel(){this._label=this.el.querySelector("label"),this._label&&this._input&&this._label.setAttribute("for",this._input.getAttribute("id"))}_setPlaceholder(){this._input&&(!this.chipsData.length&&this.options.placeholder?this._input.placeholder=this.options.placeholder:this.chipsData.length&&this.options.secondaryPlaceholder&&(this._input.placeholder=this.options.secondaryPlaceholder))}_isValidAndNotExist(t){let e=!!t.id||t.id===0,i=!this.chipsData.some(n=>n.id==t.id);return e&&i}addChip(t){if(!this._isValidAndNotExist(t)||this.chipsData.length>=this.options.limit)return;let e=this._renderChip(t);this._chips.push(e),this.chipsData.push(t),this._end?this._end.before(e):this.el.append(e),this._setPlaceholder(),this._sync(),this._notify("chip-add",this.options.onChipAdd,{args:[this.el,e],detail:{chip:e},current:()=>this._chips.includes(e)})}deleteChip(t){let e=this.el.getRootNode();this._deleteChip(t,this._chips[t]?.contains(e.activeElement)?"input":null)}_deleteChip(t,e){let i=this._chips[t];if(!i)return;this._selectedChip===i&&this._setSelected(null),i.remove(),this._chips.splice(t,1),this.chipsData.splice(t,1),this._setPlaceholder(),this._sync();let n=[],o=this.el.getRootNode();for(;o;)n.push({root:o,element:o.activeElement}),o="host"in o?o.host.getRootNode():null;this._notify("chip-delete",this.options.onChipDelete,{args:[this.el,i],detail:{chip:i},current:()=>!this._chips.includes(i)}),!(!e||n.some(({root:a,element:l})=>a.activeElement!==l)||this.el.Expressive_Chips!==this)&&(e==="previous"&&this._chips.length?this.selectChip(Math.max(t-1,0)):(this._setSelected(null),this._input?.focus()))}selectChip(t){let e=this._chips[t];e&&(this._setSelected(e),e.querySelector(".close")?.focus(),this._notify("chip-select",this.options.onChipSelect,{args:[this.el,e],detail:{chip:e},current:()=>this._selectedChip===e}))}static Init(){u.onDocumentReady(()=>{document.querySelectorAll(".chips").forEach(e=>{e.addEventListener("click",i=>{if(!i.target.closest(".close"))return;let n=i.target.closest(".chip");n&&!e.Expressive_Chips?._chips.includes(n)&&n.remove()})})})}};J.key="Expressive_Chips";var it=J;var fr={},Te=new WeakMap,Le=class Le extends b{constructor(t,e){super(t,e);this._resizeObserver=null;this._handleFormReset=()=>{setTimeout(()=>{Le.getInstance(this.el)===this&&this._sync()})};this._handleRangeChange=()=>{this._clampDual(),this._sync(),this.thumb.classList.add("active")};this._handleRangePointerDown=t=>{t.isPrimary&&(t.pointerType==="mouse"&&t.button!==0||(this._pointerDown=!0,this.el.classList.add("active"),this._clampDual(),this._sync(),this.thumb.classList.add("active")))};this._handleRangeInput=()=>{this._clampDual(),this._sync(),this.thumb.classList.add("active")};this._handleRangePointerUp=t=>{t.isPrimary&&(this._pointerDown=!1,this.el.classList.remove("active"))};this._handleRangeRelease=()=>{this._pointerDown||this.thumb.classList.remove("active")};this._pointerDown=!1,this._setupThumb(),this._sync(),this._setupEventHandlers(),this._resizeObserver=new ResizeObserver(()=>this._sync()),this._resizeObserver.observe(this.el),this.el.parentElement&&this._resizeObserver.observe(this.el.parentElement)}static get defaults(){return fr}destroy(){this._resizeObserver?.disconnect(),this._removeThumb(),super.destroy();let t=this._host();for(let e of[this.el,t]){for(let i in Te.get(e))e.style.setProperty(i,Te.get(e)[i]);Te.delete(e)}t?.querySelectorAll('input[type="range"]').forEach(e=>e.Expressive_Slider?._sync())}_set(t,e,i){let n=Te.get(t)??{};Te.set(t,n),n[e]??(n[e]=t.style.getPropertyValue(e)),t.style.setProperty(e,i)}_setupEventHandlers(){let{signal:t}=this._events;this.el.addEventListener("change",this._handleRangeChange,{signal:t}),this.el.addEventListener("pointerdown",this._handleRangePointerDown,{signal:t}),this.el.addEventListener("input",this._handleRangeInput,{signal:t}),this.el.addEventListener("pointerup",this._handleRangePointerUp,{signal:t}),this.el.addEventListener("pointercancel",this._handleRangePointerUp,{signal:t}),this.el.addEventListener("blur",this._handleRangeRelease,{signal:t}),this.el.addEventListener("mouseout",this._handleRangeRelease,{signal:t}),this.el.form?.addEventListener("reset",this._handleFormReset,{signal:t})}_setupThumb(){this.thumb=document.createElement("span"),this.value=document.createElement("span"),this.thumb.classList.add("thumb"),this.value.classList.add("value"),this.thumb.append(this.value),this.el.after(this.thumb)}_removeThumb(){this.thumb.remove()}_isVertical(){return!!this.el.closest(".vertical")}_host(){return this.el.closest(".slider, label")}_clampDual(){let e=this._host()?.querySelectorAll('input[type="range"]');if(!e||e.length!==2)return;let i=e[0],n=e[1];this.el===i&&+i.value>+n.value&&(i.value=n.value),this.el===n&&+n.value<+i.value&&(n.value=i.value)}_bounds(t){let e=parseFloat(t.max);return{max:Number.isNaN(e)?100:e,min:parseFloat(t.min)||0}}_fraction(t){let{max:e,min:i}=this._bounds(t),n=parseFloat(t.value)||0;return e===i?0:(n-i)/(e-i)}_sync(){let t=this._fraction(this.el),e=`${t*100}%`,i=this.el.offsetLeft,n=this.el.offsetTop,o=this.el.offsetWidth,a=this.el.offsetHeight,l=getComputedStyle(this.el),c=l.direction==="rtl",h=this._isVertical(),d=parseFloat(l.getPropertyValue("--md-comp-slider-handle-width"))||4,p=h?a:o,g=d/2+t*(p-d);this._set(this.el,"--md-comp-slider-active-fraction",e),this._set(this.el,"--md-comp-slider-active-position",`${g}px`);let m=this._host(),E=m?.querySelectorAll('input[type="range"]');if(m&&E&&E.length===2){let T=Array.from(E).map(C=>this._fraction(C));this._set(m,"--md-comp-slider-start-fraction",`${Math.min(...T)*100}%`),this._set(m,"--md-comp-slider-end-fraction",`${Math.max(...T)*100}%`),this._set(m,"--md-comp-slider-start-position",`${d/2+Math.min(...T)*(p-d)}px`),this._set(m,"--md-comp-slider-end-position",`${d/2+Math.max(...T)*(p-d)}px`)}if(m?.classList.contains("stops")){let{max:T,min:C}=this._bounds(this.el),_=parseFloat(this.el.step),L=_>0&&Number.isFinite(_)&&T>C;this._set(m,"--md-comp-slider-stop-count",L?String(Math.floor((T-C)/_+1e-9)+1):""),this._set(m,"--md-comp-slider-stop-spacing",L?`${(p-d)*_/(T-C)}px`:""),E?.length===1&&(this._set(m,"--md-comp-slider-active-position",`${g}px`),this._set(m,"--md-comp-slider-track-center",`${n+a/2}px`))}this.value.textContent=this.el.value,h?(this.thumb.style.left=`${i+o/2}px`,this.thumb.style.top=`${n+a-g}px`):(this.thumb.style.left=`${i+(c?o-g:g)}px`,this.thumb.style.top=`${n}px`)}static Init(){u.onDocumentReady(()=>{Le.init(document.querySelectorAll("input[type=range]:not(.image-compare > input, .color-picker-hue)"))})}};Le.key="Expressive_Slider";var Vt=Le;function Ci(r,s){let t=document.createElement(r);return t.textContent=s,t}function us(r,s){let t=Ci("button",r);return t.type="submit",t.value=s,t}var O=class O{static confirm(s){let t=O._confirmDialog(s);return document.body.append(t),t.showModal(),new Promise(e=>{let i=new MutationObserver(()=>{t.isConnected||n(!1)}),n=o=>{i.disconnect(),t.remove(),e(o)};i.observe(document,{childList:!0,subtree:!0}),t.addEventListener("close",()=>n(t.returnValue==="confirm"),{once:!0})})}static _confirmDialog({text:s,headline:t,confirm:e,cancel:i}){let n=document.createElement("dialog");n.setAttribute("role","alertdialog");let o=`expressive-confirm-${++O._confirms}`,a=Ci("p",s);a.id=`${o}-text`;let l=us(i??O.i18n.cancel,"");l.className="text",l.autofocus=!0;let c=document.createElement("form");return c.method="dialog",c.append(l,us(e??O.i18n.confirm,"confirm")),n.append(a,c),O._name(n,a,o,t),n}static _name(s,t,e,i){if(!i){s.setAttribute("aria-labelledby",t.id);return}let n=Ci("h2",i);n.id=`${e}-headline`,s.prepend(n),s.setAttribute("aria-labelledby",n.id),s.setAttribute("aria-describedby",t.id)}static Init(){u.onDocumentReady(()=>{document.addEventListener("pointerdown",O._onPointerDown,{passive:!0}),document.addEventListener("pointerup",O._onPointerUp,{passive:!0}),document.addEventListener("pointercancel",O._onPointerCancel,{passive:!0})})}static _onPointerDown(s){let t=O._isPrimaryPress(s)?O._backdropDialog(s):null;O._down=t&&O._lightDismissible(t)&&O._outside(s,t)?{dialog:t,pointerId:s.pointerId}:null}static _onPointerUp(s){let t=O._down;O._down=null,!(!t||t.pointerId!==s.pointerId)&&(!t.dialog.isConnected||!t.dialog.open||O._lightDismissible(t.dialog)&&O._backdropDialog(s)===t.dialog&&O._outside(s,t.dialog)&&t.dialog.close())}static _onPointerCancel(){O._down=null}static _backdropDialog(s){let t=u.eventTarget(s);return!(t instanceof HTMLDialogElement)||!t.open?null:t}static _outside(s,t){let e=t.getBoundingClientRect();return s.clientX<e.left||s.clientX>e.right||s.clientY<e.top||s.clientY>e.bottom}static _isPrimaryPress(s){return s.isPrimary?s.pointerType!=="mouse"||s.button===0:!1}static _lightDismissible(s){let t=s.getAttribute("closedby");return t==="any"?!("closedBy"in HTMLDialogElement.prototype):t!=="none"&&t!=="closerequest"}};O.i18n={confirm:"OK",cancel:"Cancel"},O._down=null,O._confirms=0;var Wt=O;function _r(r,s,{damping:t,stiffness:e},i){let n=Math.sqrt(e);if(t>=1)return Math.exp(-n*i)*(r+(s+n*r)*i);let o=n*Math.sqrt(1-t*t);return Math.exp(-t*n*i)*(r*Math.cos(o*i)+(s+t*n*r)/o*Math.sin(o*i))}function ds(r,s,t,e){let i=[r],[n,o]=[r-s,t*1e3];for(let a=1;a<300;a++){let l=_r(n,o,e,a/60);if(i.push(s+l),Math.abs(l)<.5&&Math.abs(s+l-i[a-1])<.5)break}return i.push(s),i}function ps(r,s){let t=getComputedStyle(r),e=o=>parseFloat(t.getPropertyValue(`--md-sys-motion-spring-${s}-${o}`)),[i,n]=[e("damping"),e("stiffness")];return i>0&&n>0?{damping:i,stiffness:n}:null}function ms(r,s,t,e){let i=t.map(n=>({[s]:e(n)}));return r.animate(i,{duration:(t.length-1)*1e3/60,easing:"linear"})}var fs="(prefers-reduced-motion: reduce)",ki=96,Ai=.5,gr=100,vr=4,_s=r=>Date.now()-r.lastT<gr?r.velocity:0,br=(r,s)=>r.shift*r.direction>ki||s*r.direction>Ai,Si=new WeakMap;function Er(r,s){let t=Si.get(r);if(!t)return 0;let[e,i="0"]=getComputedStyle(r).translate.split(" ");return t(!1),parseFloat(s==="x"?e:i)||0}var gs=new Set;function Ve(r){if(gs.has(r.selector))return;gs.add(r.selector);let s=_=>r.axis==="x"?_.clientX:_.clientY,t,e=null,i=_=>{let L=u.closestInPath(_,r.selector);return L instanceof HTMLDialogElement?L:null},n=_=>{_.style.transition="",_.style.setProperty(r.property,"0px")},o=_=>{if(!_.isPrimary||_.pointerType==="mouse"&&_.button!==0)return;C(),r.onPress?.();let L=i(_);if(!L?.open||!r.inHandle(_,L))return;L.style.transition="none";let S=s(_),P=Er(L,r.axis);L.style.setProperty(r.property,`${P}px`),e={dialog:L,pointerId:_.pointerId,direction:r.direction(L),start:S-P,last:S,lastT:Date.now(),velocity:0,shift:P};let N={childList:!0,subtree:!0,attributes:!0,attributeFilter:["open"],attributeOldValue:!0},rt=L.getRootNode();t.observe(document,N),rt!==document&&t.observe(rt,N)},a=_=>{if(!e||e.pointerId!==_.pointerId)return;if(!e.dialog.open||!e.dialog.isConnected){C();return}let L=s(_),S=L-e.start;if(e.shift=e.direction===1?Math.max(0,S):Math.min(0,S),L!==e.last){let P=Date.now();e.velocity=(L-e.last)/Math.max(1,P-e.lastT),e.last=L,e.lastT=P}e.dialog.style.setProperty(r.property,`${e.shift}px`)},l=_=>{let L=e;if(!(!L||L.pointerId!==_.pointerId)){if(!L.dialog.open||!L.dialog.isConnected){C();return}a(_),e=null,t.disconnect(),c(L)}},c=_=>{let L=d(_);_.dialog.style.transition="",h(_,!T(_)&&_.dialog.open?L:null)},h=(_,L)=>{L&&(_.dialog.style.transition="none"),_.dialog.style.setProperty(r.property,"0px"),L&&g(_,L)},d=_=>!_.shift||matchMedia(fs).matches||!p(_.dialog)?null:ps(_.dialog,"default-spatial"),p=_=>{let L=getComputedStyle(_),S=N=>L.getPropertyValue(N).trim(),P="--md-sys-motion-spring-default-spatial";return S(r.motion)===S(P)&&S(`${r.motion}-duration`)===S(`${P}-duration`)},g=(_,L)=>{let S=_.dialog,P=r.axis==="x"?X=>`${X}px 0`:X=>`0 ${X}px`,N=ms(S,"translate",ds(_.shift,0,_s(_),L),P),rt=matchMedia(fs),Ne=new MutationObserver(()=>S.open||Ee(!0)),Ee=X=>{Si.delete(S),Ne.disconnect(),rt.removeEventListener("change",Y),N.onfinish=null,N.cancel(),X&&(S.style.transition="")},Y=()=>Ee(!0);Si.set(S,Ee),N.onfinish=Y,rt.addEventListener("change",Y),Ne.observe(S,{attributes:!0,attributeFilter:["open"]})},m=r.onRelease??(()=>{}),E=r.release??(()=>!1),T=_=>{let L=_s(_),S=_.last-_.start,P=Math.abs(S)>vr;m(P);let N=!P||E(_.dialog,S,L);return!N&&br(_,L)&&_.dialog.close(),N},C=_=>{if(_&&e?.pointerId!==_.pointerId)return;t.disconnect(),m(!1);let L=e;e=null,L&&n(L.dialog)};u.onDocumentReady(()=>{t=new MutationObserver(_=>{let L=e?.dialog;L&&(!L.open||!L.isConnected||_.some(S=>S.type==="attributes"&&S.target===L&&S.oldValue===null||[...S.removedNodes].some(P=>P.contains(L))))&&C()}),document.addEventListener("pointerdown",o,{passive:!0}),document.addEventListener("pointermove",a,{passive:!0}),document.addEventListener("pointerup",l,{passive:!0}),document.addEventListener("pointercancel",C,{passive:!0})})}var Hi="dialog.bottom-sheet",yr=48,vs=(r,s,t,e)=>t*r>s||e*r>Ai,$=class ${static Init(){Ve({selector:Hi,axis:"y",property:"--md-comp-bottom-sheet-shift",motion:"--md-comp-bottom-sheet-motion",direction:()=>1,inHandle:(s,t)=>{if(u.closestInPath(s,".drag-handle"))return!0;let e=t.getBoundingClientRect();return s.clientY>=e.top&&s.clientY<=e.top+48},onPress:()=>{$._dragged=!1},onRelease:s=>{$._dragged=s},release:(s,t,e)=>$._resize(s,t,e)}),u.onDocumentReady(()=>{document.addEventListener("click",$._onClick),document.addEventListener("close",$._onClose,!0)})}static _resize(s,t,e){if(!s.classList.contains("expandable"))return!1;let i=s.classList.contains("expanded"),n=i?!vs(1,ki,t,e):vs(-1,yr,t,e);return n===i?!1:($.setExpanded(s,n),!0)}static setExpanded(s,t){s.classList.toggle("expanded",t),s.querySelector(":scope > button.drag-handle")?.setAttribute("aria-expanded",String(t))}static _onClose(s){let t=s.target;t.matches?.(`${Hi}.expandable`)&&$.setExpanded(t,!1)}static _onClick(s){let t=u.closestInPath(s,".drag-handle");if(!(t instanceof HTMLButtonElement)||s.detail!==0&&$._dragged)return;let e=t.closest(Hi);e instanceof HTMLDialogElement&&e.open&&$._activate(e)}static _activate(s){s.classList.contains("expandable")?$.setExpanded(s,!s.classList.contains("expanded")):s.close()}};$._dragged=!1;var Ut=$;var Tr=r=>r.classList.contains("start"),bs=r=>Tr(r)!==(getComputedStyle(r).direction==="rtl"),jt=class{static Init(){Ve({selector:"dialog.side-sheet",axis:"x",property:"--md-comp-side-sheet-shift",motion:"--md-comp-side-sheet-motion",direction:s=>bs(s)?-1:1,inHandle:(s,t)=>{let e=t.querySelector(":scope > header");if(e&&s.composedPath().includes(e))return!0;let i=t.getBoundingClientRect();return bs(t)?s.clientX>=i.right-24&&s.clientX<=i.right:s.clientX>=i.left&&s.clientX<=i.left+24}})}};var Ii='.drop-zone input[type="file"]:is([data-validate-types], [data-max-size], [data-max-files])';function We(r,s){let t=(r.getAttribute(s)||"").trim();if(!/^\d+$/.test(t))return 0;let e=Number(t);return Number.isSafeInteger(e)?e:0}function Lr(r){return r.endsWith("/*")?/^(image|audio|video)\/\*$/.test(r):/^\.[^\s/\\]+$/.test(r)||/^[!#$%&'*+.^_`|~0-9a-z-]+\/[!#$%&'*+.^_`|~0-9a-z-]+$/.test(r)}function wr(r,s){return s.startsWith(".")?r.name.toLowerCase().endsWith(s):s.endsWith("/*")?r.type.toLowerCase().startsWith(s.slice(0,-1)):r.type.toLowerCase()===s}var v=class v{static validateField(s){if(!s){console.error("No text field element found");return}if(v._validatedFile(s)){v._validateFiles(s);return}s.classList.contains("validate")&&(v._markInvalid(s,v._fails(s)),v._describeByError(s))}static _markInvalid(s,t){s.classList.toggle("invalid",t),t?s.setAttribute("aria-invalid","true"):s.removeAttribute("aria-invalid")}static _fails(s){return!v._blankOptional(s)&&(!s.validity.valid||s.value.length>parseInt(s.getAttribute("data-length")))}static _blankOptional(s){return s.value.length===0&&!s.validity.badInput&&!s.required}static _describeByError(s){let t=s.parentElement?.querySelector(":scope > [data-error]");t&&v._addDescription(s,v._idOf(t))}static _idOf(s){return s.id||(s.id=`field-error-${u.guid()}`),s.id}static _addDescription(s,t){let e=(s.getAttribute("aria-describedby")??"").split(/\s+/).filter(Boolean);e.includes(t)||s.setAttribute("aria-describedby",[...e,t].join(" "))}static textareaAutoResize(s){let t=s;if(!t)return;t.hasAttribute("original-height")||v._measureTextarea(t);let e=parseInt(t.getAttribute("original-height"));if(isNaN(e))return;t.style.height="auto";let i=t.offsetHeight-t.clientHeight,n=t.scrollHeight+i;t.style.height=Math.max(e,n)+"px"}static _measureTextarea(s){let t=s.getBoundingClientRect().height;t&&s.setAttribute("original-height",t.toString())}static _validatedFile(s){return s.matches(Ii)||v._fileErrors.has(s)}static _rejectedTypes(s){let t=s.accept.split(",").map(e=>e.trim().toLowerCase()).filter(Lr);return t.length?Array.from(s.files??[]).filter(e=>!t.some(i=>wr(e,i))):[]}static _validateFiles(s){if(s.matches(":disabled"))return;v._bindFileReset(s);let t=v._checkFiles(s);return v._showFileError(s,t?.message??s.validationMessage),t}static _checkFiles(s){if(v._clearFileError(s),!s.matches(Ii)){v._fileErrors.delete(s);return}v._fileErrors.set(s,"");let t=v._fileFailure(s);return t&&v._setFileError(s,t.message),t}static _fileFailure(s){return v._typeFailure(s)??v._sizeFailure(s)??v._countFailure(s)}static _typeFailure(s){if(!s.hasAttribute("data-validate-types"))return;let t=v._rejectedTypes(s);if(t.length)return{rejected:t,reason:"type",message:v._fileTypeMessage(s)}}static _sizeFailure(s){let t=We(s,"data-max-size");if(!t)return;let e=Array.from(s.files??[]).filter(i=>i.size>t);if(e.length)return{rejected:e,reason:"size",message:v._fileSizeMessage(s,t)}}static _fileSizeMessage(s,t){return v._fileError(s)?.getAttribute("data-error-size")?.trim()||`Maximum file size: ${t} bytes.`}static _countFailure(s){let t=We(s,"data-max-files");if(!t)return;let e=Array.from(s.files??[]);if(e.length>t)return{rejected:e,reason:"count",message:v._fileCountMessage(s,t)}}static _fileCountMessage(s,t){return v._fileError(s)?.getAttribute("data-error-count")?.trim()||`Maximum file count: ${t}.`}static _clearFileError(s){let t=v._fileErrors.get(s);t&&t===s.validationMessage&&s.setCustomValidity("")}static _setFileError(s,t){s.validity.customError||(s.setCustomValidity(t),v._fileErrors.set(s,t))}static _fileTypeMessage(s){return v._fileError(s)?.getAttribute("data-error")?.trim()||`Choose files matching: ${s.accept}.`}static _fileError(s){return Array.from(s.closest(".drop-zone")?.children??[]).find(t=>t.hasAttribute("data-error"))}static _showFileError(s,t){v._markInvalid(s,!s.validity.valid);let e=v._fileError(s);e&&(v._addDescription(s,v._idOf(e)),e.textContent=t,e.hidden=!t)}static _updateDropZone(s){v._bindFileReset(s);let t=s.closest(".drop-zone"),e=Array.from(s.files??[]),i=v._validateDropZone(s);v.listDropZoneFiles(t,s),v._reportFileRejection(s,e,i)}static _validateDropZone(s){if(v._validatedFile(s))return v._validateFiles(s);v.validateField(s)}static _reportFileRejection(s,t,e){if(!s.matches(Ii)){v._fileSelections.delete(s);return}v._newFileSelection(s,t)&&e&&u.emit(s.closest(".drop-zone"),"reject",{input:s,files:t.slice(),rejected:e.rejected.slice(),reason:e.reason})}static _newFileSelection(s,t){let e=JSON.stringify([s.hasAttribute("data-validate-types"),s.accept,We(s,"data-max-size"),We(s,"data-max-files")]),i=v._fileSelections.get(s);return v._fileSelections.set(s,{files:t,constraints:e}),!i||i.constraints!==e||i.files.length!==t.length||!i.files.every((n,o)=>n===t[o])}static _bindFileReset(s){if(!s.getRootNode().host)return;let t=s.form;!t||v._fileResetForms.has(t)||(v._fileResetForms.add(t),t.addEventListener("reset",v.resetFormExtras))}static _resetFileInput(s){s.files?.length||(v._fileSelections.delete(s),v._resetFileList(s),v._resetFileValidity(s))}static _resetFileList(s){let t=s.closest(".drop-zone");t&&(v.listDropZoneFiles(t,s),t.classList.remove("dragover"))}static _resetFileValidity(s){s.matches(":disabled")||v._validatedFile(s)&&(v._clearFileError(s),v._fileErrors.delete(s),v._showFileError(s,s.validationMessage))}static _resetDropZones(s){Array.from(s.elements).filter(t=>t instanceof HTMLInputElement&&t.type==="file").forEach(v._resetFileInput)}static Init(){v._initialized||(v._initialized=!0,u.onDocumentReady(()=>{document.addEventListener("input",v._onFileInput),document.addEventListener("change",s=>{let t=u.eventTarget(s);if(t instanceof HTMLInputElement){if(t.matches('.drop-zone input[type="file"]')){v._onFileInput(s);return}v.validateField(t)}}),document.addEventListener("click",v.togglePassword),document.addEventListener("click",v.stepNumber),document.addEventListener("submit",v.resetFormExtras,!0),document.addEventListener("submit",v.summarizeErrors,!0),document.addEventListener("click",v.focusSummaryField),document.addEventListener("reset",v.resetFormExtras,!0);for(let s of["dragenter","dragover","dragleave","drop"])document.addEventListener(s,v.markDropZone);document.querySelectorAll(".expressive-textarea").forEach(s=>{v.InitTextarea(s)}),document.querySelectorAll('.file-field input[type="file"]').forEach(s=>{v.InitFileInputPath(s)})}))}static togglePassword(s){let t=u.closestInPath(s,".password-toggle"),e=t?.closest(".field")?.querySelector('input[type="password"], input[data-password]');if(!e)return;let i=e.type==="password";e.toggleAttribute("data-password",i),e.type=i?"text":"password",t.setAttribute("aria-pressed",String(i))}static stepNumber(s){let t=u.closestInPath(s,".field > [data-step]:not(:disabled)"),e=t?.parentElement.querySelector(':scope > input[type="number"]:not(:disabled, [readonly], [step="any"])');e&&(e[t.dataset.step==="down"?"stepDown":"stepUp"](),e.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})))}static resetFormExtras(s){let t=s.target;t instanceof HTMLFormElement&&(t.querySelectorAll("input[data-password]").forEach(e=>{e.removeAttribute("data-password"),e.type="password",e.closest(".field")?.querySelector(".password-toggle")?.setAttribute("aria-pressed","false")}),s.type==="reset"&&setTimeout(()=>{s.defaultPrevented||v._resetDropZones(t)},0))}static summarizeErrors(s){let t=s.target;if(!(t instanceof HTMLFormElement))return;let e=t.querySelector(".error-summary"),i=e?.querySelector("ul, ol");if(!i||s.submitter?.hasAttribute("formnovalidate"))return;if(t.checkValidity()){e.hidden=!0,i.replaceChildren();return}s.preventDefault(),s.stopPropagation();let n=new Set,o=[...t.elements].flatMap(a=>{if(!a.willValidate||a.validity.valid)return[];if(a.type==="radio"){if(n.has(a.name))return[];n.add(a.name)}a.id||(a.id=`field-${u.guid()}`);let h=((a.type==="radio"?a.closest("fieldset")?.querySelector("legend"):null)??a.labels?.[0]??a.closest(".field")?.querySelector("label"))?.cloneNode(!0);h?.querySelectorAll("select, textarea").forEach(m=>m.remove());let d=h?.textContent??a.getAttribute("aria-label")??"",p=document.createElement("a");p.href=`#${a.id}`,p.textContent=[d.replace(/\s+/g," ").trim(),a.validationMessage].filter(Boolean).join(": ");let g=document.createElement("li");return g.append(p),[g]});i.replaceChildren(...o),e.hasAttribute("tabindex")||(e.tabIndex=-1),e.hidden=!1,e.focus()}static focusSummaryField(s){let t=u.closestInPath(s,'.error-summary a[href^="#"]'),e=t&&u.getElementById(t,t.getAttribute("href").slice(1));e&&(s.preventDefault(),e.focus())}static markDropZone(s){let t=u.eventTarget(s);if(!(t instanceof HTMLInputElement)||t.type!=="file")return;let e=t.closest(".drop-zone");if(!e)return;let i=s.type==="dragenter"||s.type==="dragover";e.classList.toggle("dragover",i&&!t.disabled)}static listDropZoneFiles(s,t){let e=Array.from(s.querySelectorAll(".drop-zone-files")).find(n=>n.closest(".drop-zone")===s);if(!e)return;let i=n=>{let[o,a]=n>=1e6?[n/1e6,"megabyte"]:n>=1e3?[n/1e3,"kilobyte"]:[n,"byte"];return new Intl.NumberFormat(void 0,{style:"unit",unit:a,maximumFractionDigits:1}).format(o)};e.replaceChildren(...Array.from(t.files??[],n=>{let o=document.createElement("li"),a=document.createElement("span"),l=document.createElement("span");return a.textContent=n.name,l.textContent=i(n.size),o.append(a,l),o}))}static InitTextarea(s){s.removeAttribute("original-height"),v.textareaAutoResize(s),s.addEventListener("input",t=>v.textareaAutoResize(t.target)),s.addEventListener("focus",()=>{s.hasAttribute("original-height")||v.textareaAutoResize(s)})}static InitFileInputPath(s){s.addEventListener("change",()=>{let e=s.closest(".file-field")?.querySelector("input.file-path");e&&(e.value=Array.from(s.files,i=>i.name).join(", "),e.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0,composed:!0})))})}};v._initialized=!1,v._fileErrors=new WeakMap,v._fileSelections=new WeakMap,v._fileResetForms=new WeakSet,v._onFileInput=s=>{let t=u.closestInPath(s,'.drop-zone input[type="file"]');t&&(t.matches(":disabled")||v._updateDropZone(t))};var Yt=v;var xr={text:"",action:"",onAction:null,dismissible:!1,displayLength:4e3,inDuration:300,outDuration:375,classes:"",completeCallback:null,activationPercent:.8,root:null,replace:!1},y=class y{constructor(s={}){this._dismissed=!1;this._returnFocus=null;this._restoreElement=null;this.options={...y.defaults,...s},s.displayLength===void 0&&this.options.action&&(this.options.displayLength=1/0),s.dismissible===void 0&&(this.options.dismissible=y._needsClose(this.options)),this.message=this.options.text,this.panning=!1,this.timeRemaining=this.options.displayLength,this._portal=u.portalRoot(this.options.root??document.body),y._dropDetached(),this.options.snackbarId?this._requireBody():this._build(),this.options.replace?y._replaceShown(this):y._queue.push(this),y._advance()}static _needsClose(s){return!!s.action||s.displayLength===1/0}static _dropDetached(){for(let s of y._snackbars.filter(t=>!t.el.isConnected))s._dismissed=!0,s._remove(!1)}_requireBody(){if(!this._hasBody())throw new Error("Snackbar body not found")}_hasBody(){return!this.options.snackbarId||!!u.getElementById(this._portal,this.options.snackbarId)}_build(){this.el=this._createSnackbar(),this.el.Expressive_Snackbar=this}static _replaceShown(s){y._replacing=!0;try{for(;y._snackbars.length;)for(let t of y._snackbars.splice(0))t._dismissed=!0,t._restoreFocus(!0)}finally{y._replacing=!1}y._queue.unshift(s)}_show(){this.el||this._build(),this._returnFocus=y._focused(),y._containerIn(this._portal).appendChild(this.el),y._snackbars.push(this),this._animateIn(),this._setTimer(),u.emit(this.el,"open")}static _focused(){let s=document.activeElement;for(;s?.shadowRoot?.activeElement;)s=s.shadowRoot.activeElement;return s instanceof HTMLElement?s:null}static _containerIn(s){let t=y._container;return t?.isConnected&&t.parentNode===s?t:(y._removeContainer(),y._createContainer(s),y._container)}static get defaults(){return xr}static getInstance(s){return s.Expressive_Snackbar}static _createContainer(s=document.body){let t=document.createElement("div");t.setAttribute("id","snackbar-container"),t.addEventListener("pointerdown",y._onDragStart),document.addEventListener("pointermove",y._onDragMove),document.addEventListener("pointerup",y._onDragEnd),document.addEventListener("pointercancel",y._onDragCancel),s.appendChild(t),y._container=t}static _removeContainer(){document.removeEventListener("pointermove",y._onDragMove),document.removeEventListener("pointerup",y._onDragEnd),document.removeEventListener("pointercancel",y._onDragCancel),y._container?.remove(),y._container=null}static _onDragStart(s){if(!s.isPrimary||s.pointerType==="mouse"&&s.button!==0)return;let t=s.target;if(t&&!t.closest("button, a")&&t.closest(".snackbar")){let i=t.closest(".snackbar").Expressive_Snackbar;if(!i)return;i.panning=!0,i._pauseTimer(),y._draggedSnackbar=i,i.el.classList.add("panning"),i.el.style.transition="",y._dragPointerId=s.pointerId,i.startingXPos=s.clientX,i.velocityX=0,i.time=Date.now(),i.xPos=s.clientX,i._activationDistance=i.el.offsetWidth*i.options.activationPercent}}static _onDragMove(s){if(y._dragPointerId===s.pointerId&&y._draggedSnackbar){s.preventDefault();let t=y._draggedSnackbar;t.deltaX=Math.abs(t.xPos-s.clientX),t.xPos=s.clientX,t.velocityX=t.deltaX/Math.max(1,Date.now()-t.time),t.time=Date.now();let e=t.xPos-t.startingXPos,i=t._activationDistance;t.el.style.transform=`translateX(${e}px)`,t.el.style.opacity=(1-Math.abs(e/i)).toString()}}static _onDragEnd(s){if(y._dragPointerId===s.pointerId&&(y._dragPointerId=null,y._draggedSnackbar)){let t=y._draggedSnackbar;t.panning=!1,t.el.classList.remove("panning");let e=t.xPos-t.startingXPos,i=t._activationDistance,n=Date.now()-t.time<100?t.velocityX:0;Math.abs(e)>i||n>1?(t.wasSwiped=!0,t.dismiss()):t._snapBack(),y._draggedSnackbar=null}}static _onDragCancel(s){if(y._dragPointerId!==s.pointerId)return;y._dragPointerId=null;let t=y._draggedSnackbar;t&&(t.panning=!1,t.el.classList.remove("panning"),t._snapBack(),y._draggedSnackbar=null)}_snapBack(){this.el.style.transition="transform .2s, opacity .2s",this.el.style.transform="",this.el.style.opacity="",this._resumeTimer()}static dismissAll(){for(let s of[...y._queue,...y._snackbars])s.dismiss()}_leaveQueue(){if(this._dismissed)return!0;let s=y._queue.indexOf(this);return s<0?!1:(y._queue.splice(s,1),this._drop(),!0)}_drop(){this._dismissed=!0,this.el&&this._remove(!1),this.options.completeCallback?.()}_createSnackbar(){let s=this.options.snackbarId?u.getElementById(this._portal,this.options.snackbarId):document.createElement("div");if(s instanceof HTMLTemplateElement)s=s.content.cloneNode(!0).firstElementChild;else if(s&&this.options.snackbarId){let e=document.createComment("");s.before(e);let i=[...s.childNodes],n=["class","style","role","aria-live","aria-atomic","inert"].map(o=>[o,s.getAttribute(o)]);this._restoreElement=()=>{s.replaceChildren(...i);for(let[o,a]of n)x(s,o,a);e.replaceWith(s)}}if(!s)throw new Error("Snackbar body not found");this._events=R(s);let t={signal:this._events.signal};if(s.classList.add("snackbar"),s.setAttribute("role","status"),s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true"),s.inert=!1,s.addEventListener("focusin",e=>{e.relatedTarget instanceof HTMLElement&&!s.contains(e.relatedTarget)&&(this._returnFocus=e.relatedTarget),this._pauseTimer()},t),s.addEventListener("keydown",e=>{e.key!=="Escape"||e.defaultPrevented||this._dismissed||(e.preventDefault(),e.stopPropagation(),this.dismiss())},t),s.addEventListener("focusout",()=>{clearTimeout(this._focusTimer),this._focusTimer=setTimeout(()=>this._resumeTimer(),0)},t),s.addEventListener("pointerenter",()=>this._pauseTimer(),t),s.addEventListener("pointerleave",()=>this._resumeTimer(),t),this.options.classes.length>0&&s.classList.add(...this.options.classes.split(" ").filter(Boolean)),this.message){let e=document.createElement("p");e.textContent=this.message,s.replaceChildren(e)}if(this.options.action){let e=document.createElement("button");e.type="button",e.textContent=this.options.action,e.addEventListener("click",i=>{if(i.stopPropagation(),!this._dismissed)try{typeof this.options.onAction=="function"&&this.options.onAction(),u.emit(this.el,"action")}finally{this.dismiss()}},t),s.appendChild(e)}if(this.options.dismissible){let e=document.createElement("button");e.type="button",e.className="circle",e.setAttribute("aria-label","Dismiss");let i=document.createElement("span");i.className="material-symbols",i.setAttribute("aria-hidden","true"),i.textContent="close",e.appendChild(i),e.addEventListener("click",n=>{n.stopPropagation(),this.dismiss()},t),s.appendChild(e)}return s}_remove(s=!0){if(this._events.signal.aborted)return;this._events.abort(),clearTimeout(this.counterTimeout),clearTimeout(this._transitionTimer),clearTimeout(this._dismissTimer),clearTimeout(this._focusTimer),this.counterTimeout=null,y._draggedSnackbar===this&&(y._draggedSnackbar=null,y._dragPointerId=null),this.el.Expressive_Snackbar=void 0,this._restoreElement?this._restoreElement():this.el.remove();let t=y._snackbars.indexOf(this);t>=0&&y._snackbars.splice(t,1),s&&y._advance()}static _advance(){for(;!y._replacing&&!y._snackbars.length;){let s=y._queue.shift();if(!s)return y._tidy();y._showOrDrop(s)}}static _showOrDrop(s){y._canShow(s)?s._show():s._drop()}static _canShow(s){return s._portal.isConnected?!!s.el||s._hasBody():!1}static _tidy(){y._container?.childElementCount===0&&y._removeContainer()}_animateIn(){this.el.style.display="",this.el.style.opacity="0",this.el.style.transform="translateY(24px)",this.el.style.transition=`
6
+ transform ${this.options.inDuration}ms ease,
7
+ opacity ${this.options.inDuration}ms ease
8
+ `,this._transitionTimer=setTimeout(()=>{this.el.style.transform="",this.el.style.opacity="1"},1)}_setTimer(){this.timeRemaining!==1/0&&(this._deadline=Date.now()+this.timeRemaining,this.counterTimeout=setTimeout(()=>this.dismiss(),this.timeRemaining))}_pauseTimer(){this.counterTimeout!=null&&(clearTimeout(this.counterTimeout),this.counterTimeout=null,this.timeRemaining=Math.max(0,this._deadline-Date.now()))}_resumeTimer(){this._dismissed||this.panning||this.el.matches(":hover, :focus-within")||this.counterTimeout!=null||this._setTimer()}_restoreFocus(s=!1){let t=this.el.getRootNode().activeElement,e=t&&this.el.contains(t)?this._returnFocus:null;this.el.inert=!0,s&&this._remove(!1),e?.isConnected&&e.focus({preventScroll:!0})}dismiss(){if(this._leaveQueue()||(this._dismissed=!0,clearTimeout(this.counterTimeout),this.counterTimeout=null,this._restoreFocus(),this._events.signal.aborted))return;u.emit(this.el,"close");let s=this.options.outDuration,t=[`margin ${s}ms ease`,`opacity ${s}ms ease`];if(this.wasSwiped){let e=this.xPos<this.startingXPos?-1:1;this.el.style.transform=`translateX(${e*this.el.offsetWidth}px)`,this.el.style.opacity="0",t.push(`transform ${s}ms ease`)}this.el.style.transition=t.join(", "),clearTimeout(this._transitionTimer),this._transitionTimer=setTimeout(()=>{this.el.style.opacity="0",this.el.style.marginTop="-40px"},1),this._dismissTimer=setTimeout(()=>{u.emit(this.el,"closed"),this._remove(),typeof this.options.completeCallback=="function"&&this.options.completeCallback()},this.options.outDuration)}};y._replacing=!1,y._dragPointerId=null,y._snackbars=[],y._queue=[],y._container=null,y._draggedSnackbar=null;var Xt=y;var ot=class ot{static Init(){typeof document>"u"||document.addEventListener("click",ot._onClick)}static textFor(s){if(s.hasAttribute("data-copy"))return s.getAttribute("data-copy");let t=u.getElementById(s,s.getAttribute("data-copy-for")??"");return t?t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement?t.value:(t.textContent??"").trim():null}static async _onClick(s){let t=u.closestInPath(s,"[data-copy], [data-copy-for]");if(!t||t.matches(':disabled, [aria-disabled="true"]'))return;let e=ot.textFor(t);if(e===null)return;let i=!0;try{await navigator.clipboard.writeText(e)}catch{i=!1}new Xt({text:i?t.getAttribute("data-copy-message")||ot.i18n.copied:t.getAttribute("data-copy-error")||ot.i18n.failed,root:t,replace:!0}),u.emit(t,"copy",{text:e,copied:i})}};ot.i18n={copied:"Copied",failed:"Couldn't copy"};var Gt=ot;var Es=["light","dark","auto"],Mr="theme",V=class V{static Init(){V._initialized||typeof document>"u"||(V._initialized=!0,document.addEventListener("click",V._onClick),u.onDocumentReady(()=>V.sync()))}static get(){let s=document.documentElement.getAttribute("theme");return Es.includes(s)?s:"auto"}static set(s){if(Es.includes(s)){document.documentElement.setAttribute("theme",s);try{localStorage.setItem(Mr,s)}catch{}V.sync()}}static sync(s=document){let t=V.get();s.querySelectorAll("[data-theme-set]").forEach(e=>{let i=String(e.getAttribute("data-theme-set")===t),n=e.getAttribute("role"),o=n==="menuitemradio"||n==="radio";e.setAttribute(o?"aria-checked":"aria-pressed",i)})}static _onClick(s){let t=u.closestInPath(s,"[data-theme-set]");if(!t||t.matches(':disabled, [aria-disabled="true"]'))return;V.set(t.getAttribute("data-theme-set"));let e=t.getRootNode();e!==document&&V.sync(e)}};V._initialized=!1;var Zt=V;var Cr=":is(.panes, .pane-layout, .list-detail, .supporting-pane-layout):not(.equal, .three-pane)",Ue=`${Cr} > button.drag-handle`,ys=240,Ts=16,H=class H{static Init(){typeof document>"u"||(document.addEventListener("pointerdown",H._onPointerDown),document.addEventListener("keydown",H._onKeyDown),document.addEventListener("click",H._onClick))}static width(s){let t=H._pane(s);return t?t.getBoundingClientRect().width:null}static setWidth(s,t){if(!H._pane(s))return;let[i,n]=H._bounds(s),o=s.parentElement;o.style.setProperty(H._token(o),`${Math.round(Math.min(Math.max(t,i),n))}px`)}static _token(s){return s.matches(".supporting, .supporting-pane-layout")?"--md-comp-pane-supporting-width":"--md-comp-pane-list-width"}static _pane(s){if(!s.matches(Ue))return null;let t=s.parentElement;return t.matches(".supporting, .supporting-pane-layout")&&!t.matches(".start, .left")?s.nextElementSibling:s.previousElementSibling}static _bounds(s){let t=s.parentElement,e=getComputedStyle(t),i=parseFloat(e.getPropertyValue("--md-comp-pane-primary-min-width"))||360,o=t.clientWidth-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-s.getBoundingClientRect().width-i;return[ys,Math.max(ys,o)]}static _paneIsLeft(s){return H._pane(s).getBoundingClientRect().left<s.getBoundingClientRect().left}static _onPointerDown(s){let t=u.closestInPath(s,Ue);if(!t||s.button!==0)return;let e=H._pane(t);if(!e)return;let i=s.clientX,n=e.getBoundingClientRect().width,o=H._paneIsLeft(t)?1:-1;H._dragged=!1,t.setPointerCapture(s.pointerId);let a=d=>{let p=d.clientX-i;Math.abs(p)<4&&!H._dragged||(H._dragged=!0,H.setWidth(t,n+o*p))},l=R(t),c=()=>l.abort(),{signal:h}=l;t.addEventListener("pointermove",a,{signal:h}),t.addEventListener("pointerup",c,{signal:h}),t.addEventListener("pointercancel",c,{signal:h})}static _onClick(s){let t=u.closestInPath(s,Ue);if(!t||s.detail!==0&&H._dragged)return;let[e,i]=H._bounds(t),n=H.width(t),o=[e,(e+i)/2,i].find(a=>a>n+1)??e;H.setWidth(t,o)}static _onKeyDown(s){let t=u.closestInPath(s,Ue);if(!t||!u.plainKey(s))return;let e=H.width(t),[i,n]=H._bounds(t),o=s.shiftKey?Ts*4:Ts,a={ArrowLeft:-o,ArrowRight:o}[s.key],l;if(a)l=e+(H._paneIsLeft(t)?a:-a);else if(s.key==="Home")l=i;else if(s.key==="End")l=n;else return;s.preventDefault(),H.setWidth(t,l)}};H._dragged=!1;var Qt=H;var Ls='.image-compare > input[type="range"]',at=class at{static Init(){at._initialized||typeof document>"u"||(at._initialized=!0,document.addEventListener("input",s=>{let t=u.eventTarget(s);t?.matches(Ls)&&at.sync(t)}),u.onDocumentReady(()=>{document.querySelectorAll(Ls).forEach(s=>at.sync(s))}))}static sync(s){let t=parseFloat(s.min)||0,e=Number.isNaN(parseFloat(s.max))?100:parseFloat(s.max),i=e===t?0:(parseFloat(s.value)-t)/(e-t);s.parentElement.style.setProperty("--md-comp-image-compare-position",`${i*100}%`)}};at._initialized=!1;var Jt=at;var tt=new WeakMap,ws="--tour-target",I=class I{static Init(){I._initialized||typeof document>"u"||(I._initialized=!0,document.addEventListener("click",I._onClick),document.addEventListener("keydown",s=>{let t=u.closestInPath(s,".tour");s.key==="Escape"&&t instanceof HTMLElement&&tt.has(t)&&I.end(t)}),document.addEventListener("toggle",s=>{let t=s.target;s.newState==="closed"&&tt.has(t)&&I.end(t)},!0))}static start(s,t=0){let e=[...s.querySelectorAll(":scope > section[data-tour-target]")].filter(o=>I._target(o)?.checkVisibility());if(!e.length)return;let i=tt.get(s);i&&I._release(i.steps[i.index]);let n={steps:e,index:0,opener:I._opener(s,i)};tt.set(s,n),I._show(s,!i),tt.get(s)===n&&I.go(s,t)}static _opener(s,t){if(t?.opener)return t.opener;let e=s.getRootNode().activeElement;return e instanceof HTMLElement?e:null}static _show(s,t){s.matches(":popover-open")||s.showPopover(),t&&u.emit(s,"open")}static go(s,t){let e=tt.get(s);if(!e)return;I._release(e.steps[e.index]),t=Math.min(Math.max(t,0),e.steps.length-1);let i=t<e.index?-1:1;for(;e.steps[t]&&!I._target(e.steps[t]);)t+=i;let n=e.steps[t];if(!n){I.end(s);return}e.index=t;let o=e.index===e.steps.length-1;s.querySelectorAll(":scope > section[data-tour-target]").forEach(p=>{p.hidden=p!==n});let a=n.querySelector("h1, h2, h3, h4, h5, h6");a&&(a.id||(a.id=`tour-${u.guid()}`),s.setAttribute("aria-labelledby",a.id));let l=s.querySelector(".tour-progress");l&&(l.textContent=I.i18n.progress.replace("{current}",String(e.index+1)).replace("{total}",String(e.steps.length)));let c=(p,g)=>s.querySelectorAll(p).forEach(m=>m.hidden=!g);c("[data-tour-back]",e.index>0),c("[data-tour-next]",!o),c("[data-tour-done]",o);let h=I._target(n);h.classList.add("tour-target"),u.setAnchorName(h,ws,!0);let d=!matchMedia("(prefers-reduced-motion: reduce)").matches;h.scrollIntoView({block:"center",behavior:d?"smooth":"auto"}),s.hasAttribute("tabindex")||(s.tabIndex=-1),s.focus({preventScroll:!0}),u.emit(s,"change",{step:n,index:e.index})}static end(s,t=!1){let e=tt.get(s);e&&(I._release(e.steps[e.index]),tt.delete(s),s.matches(":popover-open")&&s.hidePopover(),e.opener?.focus(),u.emit(s,"close",{completed:t}))}static _target(s){return u.getElementById(s,s.getAttribute("data-tour-target")??"")}static _release(s){let t=s&&I._target(s);t?.classList.remove("tour-target"),t&&u.setAnchorName(t,ws,!1)}static _onClick(s){let t=u.closestInPath(s,"[data-tour-start], [data-tour-back], [data-tour-next], [data-tour-done], [data-tour-close]");if(!t)return;if(t.hasAttribute("data-tour-start")){let n=u.getElementById(t,t.getAttribute("data-tour-start"));n?.matches(".tour")&&I.start(n);return}let e=t.closest(".tour"),i=e&&tt.get(e);i&&(t.hasAttribute("data-tour-back")?I.go(e,i.index-1):t.hasAttribute("data-tour-next")?I.go(e,i.index+1):I.end(e,t.hasAttribute("data-tour-done")))}};I.i18n={progress:"Step {current} of {total}"},I._initialized=!1;var te=I;var xs=".sortable > li",A=class A{static Init(){typeof document>"u"||(document.addEventListener("click",A._onClick),document.addEventListener("pointerdown",A._onPointerDown))}static move(s,t){let e=s.parentElement,i=[...e.children],n=i.indexOf(s);if(t=Math.min(Math.max(t,0),i.length-1),t===n)return;let o=s.getRootNode().activeElement,a=s.contains(o)?o:null;e.insertBefore(s,i[t>n?t+1:t]??null),a?.focus(),A._done(e,s,n,t)}static _done(s,t,e,i){let n=A._regions.get(s);n||(n=document.createElement("div"),n.className="visually-hidden",n.setAttribute("aria-live","polite"),s.after(n),A._regions.set(s,n)),n.textContent=A.i18n.moved.replace("{position}",String(i+1)).replace("{total}",String(s.children.length)),s.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{item:t,from:e,to:i}}))}static _onClick(s){let t=u.closestInPath(s,"[data-move]"),e=t?.closest(xs);if(!e||t.matches(':disabled, [aria-disabled="true"]'))return;let i=[...e.parentElement.children].indexOf(e),n=t.getAttribute("data-move");n==="up"?A.move(e,i-1):n==="down"&&A.move(e,i+1)}static _onPointerDown(s){let e=u.closestInPath(s,".drag-handle")?.closest(xs);if(!e||s.button!==0||A._drag)return;s.preventDefault();let i=e.parentElement,n=R(e);A._drag={item:e,list:i,from:[...i.children].indexOf(e),pointerId:s.pointerId,events:n},e.classList.add("dragged");let{signal:o}=n;document.addEventListener("pointermove",A._onPointerMove,{signal:o}),document.addEventListener("pointerup",A._onPointerEnd,{signal:o}),document.addEventListener("pointercancel",A._onPointerEnd,{signal:o}),document.addEventListener("keydown",A._onKeyDown,{signal:o})}static _onPointerMove(s){let t=A._drag;if(!t||s.pointerId!==t.pointerId)return;let e=t.item.previousElementSibling,i=t.item.nextElementSibling,n=o=>{let a=o.getBoundingClientRect();return a.top+a.height/2};e&&s.clientY<n(e)?t.list.insertBefore(t.item,e):i&&s.clientY>n(i)&&t.list.insertBefore(t.item,i.nextElementSibling)}static _onPointerEnd(s){s.pointerId===A._drag?.pointerId&&A._finish(s.type==="pointercancel")}static _onKeyDown(s){s.key==="Escape"&&(s.preventDefault(),A._finish(!0))}static _finish(s){let t=A._drag;if(!t)return;A._drag=null,t.events.abort(),t.item.classList.remove("dragged");let e=[...t.list.children].indexOf(t.item);s?t.list.insertBefore(t.item,t.list.children[t.from>e?t.from+1:t.from]??null):e!==t.from&&A._done(t.list,t.item,t.from,e)}};A.i18n={moved:"Moved to position {position} of {total}"},A._drag=null,A._regions=new WeakMap;var ee=A;var Sr=":scope > li > :is(a[href], button):only-child",kr={ArrowUp:-1,ArrowDown:1},je=class je{static Init(){typeof document>"u"||document.addEventListener("keydown",je._onKeydown)}};je._onKeydown=s=>{let t=u.eventTarget(s)?.closest(".list");if(!t)return;let e=u.focusTarget([...t.querySelectorAll(Sr)],s,kr);e&&(s.preventDefault(),e.focus())};var ie=je;var Ar={min:null,max:null,watch:!1},Hr=4,Cs=4;function Ir(r,s){let t=document.createRange();return r.map(e=>{t.selectNodeContents(e);let i=t.getBoundingClientRect().width,{left:n,right:o}=e.getBoundingClientRect();return s?{width:i,start:-o,end:-n}:{width:i,start:n,end:o}})}function Or(r,s){let t=r[s];return s===0?t.start:s===r.length-1?t.end-t.width:(t.start+t.end-t.width)/2}function Dr(r,s){let t=r[r.length-1].end,e=-1/0;for(let i=0;i<r.length;i+=s){let n=Or(r,i);if(n<e+Cs||n+r[i].width>t)return!1;e=n+r[i].width}return!0}function Pr(r){if(r.every(s=>s.width+Cs<=s.end-s.start))return 1;for(let s=2;s<=r.length;s++)if(Dr(r,s))return s;return 1}function Rr(r,s){let t=Pr(Ir(s,getComputedStyle(r).direction==="rtl"));r.toggleAttribute("data-thinned",t>1),s.forEach((e,i)=>e.toggleAttribute("data-skip",i%t>0))}function Fr(r,s){let t=e=>e.nodeName==="TABLE";return r.some(e=>e.target!==s||[...e.addedNodes,...e.removedNodes].some(t))}function Ye(r,s,t){let e=document.createElement("ul");return e.className=r,e.setAttribute("aria-hidden","true"),e.append(...t.map((i,n)=>{let o=document.createElement("li");return s[n]&&(o.dataset.series=s[n]),o.append(...i.map(a=>Object.assign(document.createElement("span"),{textContent:a}))),o})),e}function se(r,s){let t=r*2*Math.PI;return`${(s*Math.sin(t)).toFixed(3)},${(-s*Math.cos(t)).toFixed(3)}`}var ne=r=>String(r%Hr+1),Nr=0,Br=r=>matchMedia("(prefers-reduced-motion: reduce)").matches?[]:r,$r=r=>/cubic-bezier\(([^)]*)\)/.exec(r)?.[1]??"0.2, 0, 0, 1";function we(r){let s=getComputedStyle(r),t=s.getPropertyValue("--md-sys-motion-duration-medium4").trim()||"400ms";return parseFloat(t)>0?{dur:t,keySplines:$r(s.getPropertyValue("--md-sys-motion-easing-standard"))}:null}function xe(r,s,t){let e=r.getAttribute("d");s!==e&&r.append(M("animate",{attributeName:"d",from:s,to:e,...t,calcMode:"spline",keyTimes:"0;1",fill:"remove"}))}var Ms=r=>r.flatMap(s=>Array.from(s.querySelectorAll("button"))),Oi=r=>r.values.some(s=>s!==null),qr=[1,2,2.5,5,10];function Xe(r,s=4){let t=r/s||1,e=10**Math.floor(Math.log10(t));return e*qr.find(i=>i*e>=t*(1-1e-9))}function Di(r,s,t){let e=[];for(let i=Math.ceil(r/t-1e-9);i*t<=s+t*1e-9;i++)e.push(Number((i*t).toPrecision(12)));return e}function U(r,s){return new Intl.NumberFormat(u.locale(r),s)}function lt(r){return r?Me(r.dataset.value??r.textContent):null}function Me(r){let s=r.replace(/\u2212/g,"-").replace(/[\s%\p{Sc}]/gu,"");if(!/^[+-]?(\d{1,3}(,\d{3})+|\d+)?(\.\d+)?(e[+-]?\d+)?$/i.test(s))return null;let t=parseFloat(s.replace(/,/g,""));return Number.isFinite(t)?t:null}function Pi(r,s,[t,e]){return r.format(s).replace(/^[-\u2212]?/,i=>i+t)+e}function Ri(r){let s=/^[\s\p{Sc}]*/u.exec(r)[0],t=e=>[...e].reverse().join("");return[s,t(/^[\s%\p{Sc}]*/u.exec(t(r.slice(s.length)))[0])]}function Fi(r){let s=r.find(t=>!t?.dataset.value&&lt(t)!==null);return Ri(s?.textContent.trim()??"")}function zr(r){return`M${r.join("L")}${r.length>1?"":"h0"}`}function Kr(r){let s=r.length;if(s===0)return"";if(s===1)return`M${r[0][0]},${r[0][1]}h0`;let t=[];for(let n=0;n<s-1;n++)t.push((r[n+1][1]-r[n][1])/(r[n+1][0]-r[n][0]));let e=r.map((n,o)=>{if(o===0)return t[0];if(o===s-1)return t[s-2];let[a,l]=[t[o-1],t[o]];return a*l<=0?0:2/(1/a+1/l)}),i=`M${r[0][0]},${r[0][1]}`;for(let n=0;n<s-1;n++){let[[o,a],[l,c]]=[r[n],r[n+1]],h=(l-o)/3;i+=`C${o+h},${a+e[n]*h} ${l-h},${c-e[n+1]*h} ${l},${c}`}return i}var k=class extends b{constructor(t,e){super(t,e);this.labels=[];this.series=[];this.activeIndex=-1;this._generated=[];this._labelSizes=null;this._tableWatch=null;this._all=[];this._before=[];this._hidden=new Set;this._header=[];this._rows=[];this._reversed=!1;this._onPointerMove=t=>{this.show(this._indexAt(t))};this._onFocus=()=>{this.activeIndex<0&&this._plot.matches(":focus-visible")&&this.show(0)};this._onLeave=t=>{t.pointerType==="touch"||this._plot.matches(":focus-visible")||this.show(-1)};this._onCancel=()=>{this.show(-1)};this._onKeyDown=t=>{let e=this._keyTarget(t.key);e!==void 0&&(t.preventDefault(),this.show(e))};this._build(),this._listen(),(this.options.watch||this.el.hasAttribute("data-watch"))&&(this._tableWatch=new MutationObserver(i=>Fr(i,this.el)&&this.update())),this._watch()}get _type(){return"line-chart"}get _seriesFrom(){return 1}get _seriesTo(){}get _fromZero(){return!1}get _horizontal(){return!1}get _circular(){return!1}get _axis(){return this.el.classList.contains("axis")&&!this.el.classList.contains("sparkline")}get _points(){return!0}get _count(){return this.labels.length}_watch(){if(!this._tableWatch)return;this._tableWatch.disconnect(),this._tableWatch.observe(this.el,{childList:!0});let t=this.el.querySelector(":scope > table");t&&this._tableWatch.observe(t,{subtree:!0,childList:!0,characterData:!0,attributeFilter:["data-value","class","data-label"]})}_build(){this._read(),!(!this.labels.length||!this.series.length)&&(this._reversed=!this._horizontal&&getComputedStyle(this.el).direction==="rtl",this._render())}get _interactive(){return!this.el.classList.contains("sparkline")}_listen(){this._plot&&this._interactive&&(this._plot.addEventListener("pointerdown",this._onPointerMove),this._plot.addEventListener("pointermove",this._onPointerMove),this._plot.addEventListener("pointerleave",this._onLeave),this._plot.addEventListener("pointercancel",this._onCancel),this._plot.addEventListener("keydown",this._onKeyDown),this._plot.addEventListener("focus",this._onFocus),this._plot.addEventListener("blur",this._onLeave))}static get defaults(){return Ar}destroy(){this._generated.forEach(t=>t.remove()),this._generated=[],this._labelSizes?.disconnect(),this._tableWatch?.disconnect(),super.destroy()}update(){if(this.constructor.getInstance(this.el)!==this)return;let t=this._generated,e=this.el.getRootNode().activeElement,[i,n]=[this.activeIndex,t.some(a=>a.contains(e))],o=Ms(t).indexOf(e);this._generated=[],this.activeIndex=-1,this._plot=this._cursor=this._tooltip=void 0,this._before=Br(this.series),this._build(),this._before=[],n&&(Ms(this._generated)[o]??this._plot)?.focus({preventScroll:!0}),t.forEach(a=>a.remove()),this._listen(),this.show(Math.min(i,this._count-1)),this._watch()}show(t){if(!this._tooltip||t===this.activeIndex)return;this.activeIndex=t;let e=t<0||t>=this.labels.length;if(this._cursor.hidden=this._tooltip.hidden=e,e)return;this._cursor.replaceChildren();let i=document.createElement("strong");i.textContent=this.labels[t],this._tooltip.replaceChildren(i),this.series.forEach(n=>{if(n.values[t]===null)return;let a=n.color,l=n.tops[t];if(l!==null&&this._points){let d=document.createElement("span");d.className=n.className,d.dataset.series=a,d.style.top=`${n.y(l)}%`,this._cursor.append(d)}let c=document.createElement("span");c.dataset.series=a,c.textContent=n.name;let h=document.createElement("span");h.textContent=n.text[t],this._tooltip.append(c,h)}),this._place(t)}_place(t){let e=this._x(t),i=this._horizontal?"top":"left";this._cursor.style[i]=this._tooltip.style[i]=`${e}%`,this._tooltip.classList.toggle("end",e>50)}_read(){let t=this.el.querySelector(":scope > table");if(!t)return;let e=t.tHead?.rows[0]??t.rows[0],i=Array.from(e?.cells??[]),n=Array.from(t.tBodies).flatMap(l=>Array.from(l.rows)).filter(l=>l!==e);[this._header,this._rows]=[i,n],this.labels=n.map(l=>l.cells[0]?.textContent.trim()??"");let o=this._seriesFrom;this.series=i.slice(o,this._seriesTo).map((l,c)=>{let h=n.map(d=>lt(d.cells[c+o]));return{name:l.textContent.trim(),className:l.className,column:c+o,color:ne(c),text:n.map(d=>d.cells[c+o]?.textContent.trim()??""),values:h,tops:h,y:void 0,scale:void 0,affix:Fi(n.map(d=>d.cells[c+o]))}}),this._all=this.series,this.series=this._shown(this._all);let a=l=>this._number(l)??this.options[l];this._y=this._scale(this.series,a("min"),a("max"))}_shown(t){let e=t.filter(i=>!this._hidden.has(i.column));return this._arrange(e),e.some(Oi)?e:this._hidden.size?(this._hidden.clear(),this._shown(t)):[]}_arrange(t){this.el.classList.contains("stacked")&&this._stack(t)}_stack(t){let e=this.labels.map(()=>0);for(let i of t)i.base=[...e],i.tops=i.values.map((n,o)=>e[o]=n===null||e[o]===null?null:e[o]+n)}_number(t){let e=parseFloat(this.el.dataset[t]??"");return Number.isFinite(e)?e:null}_scale(t,e,i,n=this._fromZero){let o=[e!==null,i!==null],a=this.el.classList.contains("stacked"),[l,c]=[1/0,-1/0];for(let{tops:h,base:d=[]}of t)for(let p of[...h,...d])p!==null&&(l=Math.min(l,p),c=Math.max(c,p));if(l>c&&(l=c=0),n){let[h,d]=[Math.min(0,l),Math.max(0,c)],p=(d-(e??h))*.1||1;e??(e=h<0?h-p:0),i??(i=d+p)}else{let h=(c-l)*.1||1;e??(e=a?Math.min(0,l):l-h),i??(i=c+(a?(c-e)*.1||1:h))}return this._apply(t,this._fit(e,i,o))}_fit(t,e,[i,n]){if(!this._axis)return{min:t,max:e,ticks:[]};let o=Xe(e-t),a=i?t:Math.floor(t/o+1e-9)*o,l=n?e:Math.ceil(e/o-1e-9)*o;return{min:a,max:l,ticks:Di(a,l,o)}}_apply(t,e){let i=n=>100-(n-e.min)/(e.max-e.min||1)*100;for(let n of t)Object.assign(n,{y:i,scale:e});return i}_x(t){let e=(t+.5)/this.labels.length*100;return this._reversed?100-e:e}_render(){let t=this._type;this._plot=document.createElement("div"),this._plot.className=`${t}-plot`;let e=this.el.querySelector(":scope > figcaption")?.textContent.trim();this._plot.setAttribute("role","group"),this._plot.setAttribute("aria-roledescription",t.replace(/-/g," ")),e&&this._plot.setAttribute("aria-label",e),this._interactive&&(this._plot.tabIndex=0),this._cursor=document.createElement("div"),this._cursor.className=`${t}-cursor`,this._cursor.hidden=!0,this._tooltip=document.createElement("div"),this._tooltip.className=`${t}-tooltip`,this._tooltip.hidden=!0,this._tooltip.setAttribute("aria-live","polite"),this._plot.append(...this._axes(),this._draw(),this._cursor,this._tooltip),this._generated=[this._plot,...this._guides()],this.el.append(...this._generated)}_total(t){let e=this.el.querySelector(":scope > table")?.tFoot?.rows[0];if(!e)return null;let i=document.createElement("div");i.className=t;let[n,o]=[document.createElement("span"),document.createElement("strong")];return n.textContent=e.cells[0]?.textContent.trim()??"",o.textContent=e.cells[1]?.textContent.trim()??"",i.append(o,n),i}_guides(){let t=document.createElement("ol");t.className=`${this._type}-labels`,t.setAttribute("aria-hidden","true");for(let e of this.labels){let i=document.createElement("li");i.append(document.createElement("span")),i.firstChild.textContent=e,t.append(i)}return this._observeLabels(t,Array.from(t.children)),[t,...this._legend()]}_observeLabels(t,e){this._labelSizes?.disconnect(),!(this._horizontal||!e.length)&&(this._labelSizes=new ResizeObserver(()=>Rr(t,e)),this._labelSizes.observe(t))}_axes(){if(!this._axis)return[];let t=n=>n.className.split(/\s+/).includes("end"),e=this.series.find(n=>!t(n))??this.series[0],i=this.series.find(n=>n.y!==e.y);return[e,i].filter(Boolean).map((n,o)=>this._valueAxis(n,o>0))}_valueAxis(t,e){let i=document.createElement("ol");i.className=`${this._type}-axis${e?" end":""}`,i.setAttribute("aria-hidden","true");let n=U(this.el,{notation:"compact",maximumSignificantDigits:3});for(let o of t.scale.ticks){let a=document.createElement("li"),l=document.createElement("span");l.textContent=Pi(n,o,t.affix),a.style.setProperty("--at",`${t.y(o)}%`),a.append(l),i.append(a)}return i}_legend(){if(this._all.length<2)return[];let t=this.el.classList.contains("toggle"),e=document.createElement("ul");return e.className=`${this._type}-legend`,t||e.setAttribute("aria-hidden","true"),e.append(...this._all.map(i=>{let n=document.createElement("li");return n.dataset.series=i.color,n.append(t?this._toggle(i):i.name),n})),[e]}_toggle(t){let e=document.createElement("button"),i=this.series.includes(t);return e.type="button",e.className="chart-toggle",e.textContent=t.name,e.setAttribute("aria-pressed",String(i)),i&&Oi(t)&&this.series.filter(Oi).length<2&&e.setAttribute("aria-disabled","true"),e.addEventListener("click",()=>{e.hasAttribute("aria-disabled")||(i?this._hidden.add(t.column):this._hidden.delete(t.column),this.update())}),e}_draw(t=this.series){let e=M("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true",focusable:"false"}),i=this._before.length?we(this.el):null,n=i?this._starts(t):[];return e.append(...t.map((o,a)=>this._line(o,n[a],i))),e}_starts(t){let e;return t.map(i=>{let n=i.base?e??this._baseY(i):()=>100;return e=this._was(i,n),this._shape(i,e,n)})}_was(t,e){let i=this._before.find(n=>n.column===t.column);return n=>{let o=i?.tops[n]??null;return o===null?e(n):i.y(o)}}_baseY(t){return e=>Math.min(100,t.y(t.base[e]))}_shape(t,e,i){let n=[[]];t.tops.forEach((h,d)=>{h===null?n.push([]):n[n.length-1].push(d)});let o=n.filter(h=>h.length),a=(h,d)=>h.map(p=>[this._x(p),d(p)]),l=this.el.classList.contains("straight")?zr:Kr,c=o.map(h=>l(a(h,e)));return{line:c.join(""),area:o.map((h,d)=>t.base?`${c[d]}L${l(a(h,i).reverse()).slice(1)}Z`:`${c[d]}V100H${this._x(h[0])}Z`).join(""),dots:o.flatMap(h=>a(h,e)).map(([h,d])=>`M${h},${d}h0`).join("")}}_line(t,e,i){let n=M("g",{class:`${this._type}-series ${t.className}`.trim(),"data-series":t.color}),o=this._shape(t,h=>t.y(t.tops[h]),this._baseY(t)),a=`line-chart-gradient-${++Nr}`,l=M("linearGradient",{id:a,x2:"0",y2:"1"});l.append(M("stop"),M("stop",{offset:"1"}));let c=(h,d,p={})=>{let g=M("path",{class:`${this._type}-${d}`,d:o[h],...p});return e&&xe(g,e[h],i),g};return n.append(l,c("area","area",{fill:`url(#${a})`}),c("line","line")),this.el.classList.contains("points")&&n.append(c("dots","points")),n}_indexAt(t){let e=this._plot.getBoundingClientRect(),i=this._horizontal?(t.clientY-e.top)/e.height:(t.clientX-e.left)/e.width,n=Math.floor((this._reversed?1-i:i)*this.labels.length);return Math.min(this.labels.length-1,Math.max(0,n))}_polarAt(t){let e=this._plot.getBoundingClientRect(),[i,n]=[t.clientX-e.left-e.width/2,t.clientY-e.top-e.height/2];return[(Math.atan2(i,-n)/(2*Math.PI)+1)%1,Math.hypot(i,n)/e.width]}get _arrows(){return this._circular?[["ArrowRight","ArrowDown"],["ArrowLeft","ArrowUp"]]:this._horizontal?[["ArrowDown"],["ArrowUp"]]:this._reversed?[["ArrowLeft"],["ArrowRight"]]:[["ArrowRight"],["ArrowLeft"]]}_keyTarget(t){let e=this.labels.length-1,[i,n]=this._arrows,o=a=>this._circular?this.activeIndex<0?a>0?0:e:(this.activeIndex+a+e+1)%(e+1):Math.min(e,Math.max(0,this.activeIndex+a));return t==="Escape"?this.activeIndex<0?void 0:-1:i.includes(t)?o(1):n.includes(t)?o(-1):{Home:0,End:e}[t]}};k.key="Expressive_LineChart";var Vr=":scope > tbody > tr:not(.data-table-detail)",Wr=':scope > :first-child input[type="checkbox"]',Ni=".data-table > table > thead > tr:first-child > th > button.drag-handle:last-child",Ur=16,jr={ascending:1,descending:-1},Ss='[role="menuitemcheckbox"][data-column]',zi="data-column-hidden",ks='input[type="search"][data-table-filter]',Ce="data-table-filter-hidden",Ze="data-table-page-hidden",As='button[type="button"]:is([data-table-page="previous"], [data-table-page="next"])',Yr={previous:-1,next:1},Xr="select[data-table-page-size]:not([multiple], :disabled):not(:has(option:checked:disabled))";function Gr(r){return r?[[r.page,1],[r.pageSize,1],[r.total,0]].every(([s,t])=>Number.isSafeInteger(s)&&s>=t):!1}function Bi(r,s,t){return Math.min(Math.max(r,1),Math.ceil(s/t))}function Is(r){let s=Number(r);return Number.isSafeInteger(s)&&s>0?s:0}function st(r){return Is(r.getAttribute("data-page-size"))}function $i(r,s){return Array.from(r.querySelectorAll(s)).find(t=>t.closest(".data-table")===r)}function Ge(r){if(r.closest(`[hidden], [${Ce}], [${Ze}]`))return!1;if(r.checkVisibility)return r.checkVisibility({visibilityProperty:!0});let s=getComputedStyle(r);return s.display!=="none"&&!["hidden","collapse"].includes(s.visibility)}function Os(r,s){let t=0;for(let e of Array.from(r.cells))if(t+=e.colSpan,s<t)return e}function qi(r,s){let t=Os(r,s);return(t?.dataset.value??t?.textContent??"").trim()}function Zr(r,s,t,e){for(let i=s;i<s+Math.max(1,e.rowSpan);i++)for(let n=t;n<t+e.colSpan;n++)(r[i]??(r[i]=new Set)).add(n)}function re(r){let[s,t]=[[],new Map];return Array.from(r.rows).forEach((e,i)=>{let n=0;for(let o of Array.from(e.cells)){for(;s[i]?.has(n);)n++;t.set(o,n),Zr(s,i,n,o),n+=o.colSpan}}),t}function Ds(r){let t=r.getRootNode().getElementById?.(r.getAttribute("data-column"));return t?.matches(".data-table > table > thead > tr:first-child > th")&&t.colSpan===1?t:null}function Qr(r,s){let t=[...re(r.tHead)].filter(([,i])=>i===s).map(([i])=>i),e=r.querySelectorAll(":scope > tbody > tr, :scope > tfoot > tr");return[...t,...Array.from(e,i=>Os(i,s))].filter(i=>i?.colSpan===1)}function Jr(r){r.hidden||(r.hidden=!0,r.setAttribute(zi,""))}function to(r){r.hasAttribute(zi)&&(r.hidden=!1,r.removeAttribute(zi))}function Hs(r){let s=Ds(r);if(!s)return;let t=s.closest("table"),e=r.getAttribute("aria-checked")==="true";Qr(t,re(t.tHead).get(s)).forEach(e?to:Jr),eo(t,s)}function eo(r,s){r.style.tableLayout==="fixed"&&(!s.hidden&&!s.style.width&&(s.style.width=`${Math.max(Qe(s)[0],s.scrollWidth)}px`),Ki(r))}function Ps(r){return Array.from(r.rows[0]?.cells??[]).filter(s=>!s.hidden)}function Ki(r){r.style.width=`${Ps(r).reduce((s,t)=>s+parseFloat(t.style.width),0)}px`}function io(r){if(r.style.tableLayout==="fixed")return;let s=Ps(r),t=s.map(e=>e.getBoundingClientRect().width);s.forEach((e,i)=>e.style.width=`${t[i]}px`),r.style.tableLayout="fixed",Ki(r)}function Qe(r){let s=parseFloat(getComputedStyle(r).minWidth)||0;return[s,Math.max(s,r.closest(".data-table").clientWidth)]}function so(r){let[s,t]=Qe(r),e=r.getBoundingClientRect().width;return[s,(s+t)/2,t].find(i=>i>e+1)??s}function no(r,s){let[t,e]=Qe(r),i=(s.shiftKey?4:1)*Ur*(getComputedStyle(r).direction==="rtl"?-1:1),n=r.getBoundingClientRect().width;return{ArrowRight:n+i,ArrowLeft:n-i,Home:t,End:e}[s.key]}var f=class f{static Init(){f._initialized||typeof document>"u"||(f._initialized=!0,document.addEventListener("input",f._onChange),document.addEventListener("input",f._onFilter),document.addEventListener("input",f._onPageSize),document.addEventListener("change",f._onPageSize),document.addEventListener("click",f._onClick),document.addEventListener("click",f._onPage),document.addEventListener("pointerdown",f._onPointerDown),document.addEventListener("click",f._onHandleClick),document.addEventListener("keydown",f._onKeyDown),document.addEventListener("expressive:change",f._onToggle),u.onDocumentReady(()=>document.querySelectorAll(".data-table").forEach(f.sync)))}static sync(s){let t=s.querySelector(":scope > table");t&&(t.querySelectorAll(`:scope > tbody > tr[${Ze}]`).forEach(e=>e.removeAttribute(Ze)),f._pages.get(s)?.server&&t.querySelectorAll(`:scope > tbody > tr[${Ce}]`).forEach(e=>e.removeAttribute(Ce)),f._filter(s,t),f._page(s,t),f._select(f._all(t),f._enabled(t),!1)),s.getRootNode().querySelectorAll(Ss).forEach(e=>{s.contains(Ds(e))&&Hs(e)})}static setPage(s,t){return!s?.matches?.(".data-table:has(> table)")||!f._storePage(s,t)?!1:(f._pageRequests.delete(s),f.sync(s),!0)}static _storePage(s,t){if(t===null)return f._pages.delete(s),!0;if(!t)return!1;let e={page:t.page,pageSize:t.pageSize,total:t.total};return Gr(e)?(s.setAttribute("data-page-size",String(e.pageSize)),f._pages.set(s,{...e,server:!0}),!0):!1}static width(s){return s.getBoundingClientRect().width}static setWidth(s,t){let e=s.closest("table"),[i,n]=Qe(s);io(e),s.style.width=`${Math.round(Math.min(Math.max(t,i),n))}px`,Ki(e)}static _all(s){let t=s.tHead,e='input[type="checkbox"]';return(t&&[...re(t)].find(([n,o])=>o===0&&n.querySelector(e))?.[0])?.querySelector(e)}static _enabled(s){return f._boxes(s).filter(t=>!t.matches(":disabled")&&Ge(t.closest("tr")))}static _boxes(s){return Array.from(s.querySelectorAll(Vr),t=>t.querySelector(Wr)).filter(Boolean)}static _filter(s,t){let e=$i(s,ks);if(!e)return;let i=u.locale(t),n=f._serverRecords(s)?"":e.value.trim().toLocaleLowerCase(i),a=(t.tHead?[...re(t.tHead)]:[]).filter(([h])=>h.hasAttribute("data-filter")&&h.colSpan===1).map(([,h])=>h),l=f._records(t);l.forEach(([h])=>h.removeAttribute(Ce));let c=l.map(([h])=>Ge(h)&&f._matches(h,a,n,i));l.forEach((h,d)=>h.forEach(p=>p.toggleAttribute(Ce,!c[d]))),f._filterCount(s,i,c.filter(Boolean).length)}static _filterCount(s,t,e){if(f._serverRecords(s))return;let i=$i(s,"[data-table-filter-count]");i&&(i.textContent=new Intl.NumberFormat(t).format(e))}static _serverRecords(s){return f._pages.get(s)?.server||f._serverFilters.has(s)}static _matches(s,t,e,i){return!e||t.some(n=>qi(s,n).toLocaleLowerCase(i).includes(e))}static _advancePage(s,t,e){let i=f._pageState(s),n=Bi(i.page+t,i.total,st(s));n<1||n===i.page||f._requestPage(s,{page:n,pageSize:st(s)},e)}static _setPageSize(s,t,e){let i=Is(t);if(!i||!st(s)||i===st(s))return;let n=f._pageState(s),o=Math.max(1,Bi(n.page,n.total,i));f._requestPage(s,{page:o,pageSize:i},e)}static _requestPage(s,t,e){let i=f._pageState(s);f._pageRequests.set(s,e),u.emit(s,"page",t,!0)&&f._pageRequests.get(s)===e&&(i.server||(s.setAttribute("data-page-size",String(t.pageSize)),f._pages.set(s,{...i,...t}),f.sync(s)))}static _pageState(s){let t=f._pages.get(s);if(t)return t;let e=s.querySelector(":scope > table"),i=e?f._records(e).filter(([n])=>Ge(n)).length:0;return{page:1,pageSize:st(s),total:i}}static _page(s,t){let e=st(s);if(!e)return;let i=f._records(t),n=i.filter(([c])=>Ge(c)),o=f._pageView(s,n.length,e);f._pages.set(s,o);let a=o.server?n:n.slice((o.page-1)*e,o.page*e),l=new Set(a.map(([c])=>c));i.forEach(c=>c.forEach(h=>h.toggleAttribute(Ze,!l.has(c[0])))),f._pageControls(s,o.page,Math.ceil(o.total/e))}static _pageView(s,t,e){let i=f._pages.get(s)??{page:1,pageSize:e,total:t},n=i.server?i.total:t;return{...i,page:Bi(i.page,n,e),pageSize:e,total:n}}static _pageControls(s,t,e){s.querySelectorAll(As).forEach(n=>{if(n.closest(".data-table")!==s)return;let o=n.dataset.tablePage==="previous"?t<=1:t>=e;n.setAttribute("aria-disabled",String(o))});let i=$i(s,"[data-table-page-status]");if(i){let n=new Intl.NumberFormat(u.locale(s));i.textContent=`${n.format(t)} / ${n.format(e)}`}}static _firstPage(s){st(s)&&f._resetPage(s)}static _resetPage(s){f._pages.get(s)?.server||(f._pages.delete(s),f.sync(s))}static _select(s,t,e){if(!s)return;e&&t.forEach(n=>n.checked=s.checked);let i=t.filter(n=>n.checked).length;s.indeterminate=i%t.length>0,s.checked=i>0&&!s.indeterminate}static _drag(s,t){let e=s.parentElement,i=f.width(e),n=getComputedStyle(e).direction==="rtl"?-1:1;f._dragged=!1,s.setPointerCapture(t.pointerId);let o=R(s),{signal:a}=o;s.addEventListener("pointermove",c=>{let h=c.clientX-t.clientX;Math.abs(h)<4&&!f._dragged||(f._dragged=!0,f.setWidth(e,i+n*h))},{signal:a});let l=()=>{o.abort(),f._dragged&&f._resized(e,i)};s.addEventListener("pointerup",l,{signal:a}),s.addEventListener("pointercancel",l,{signal:a})}static _resizeTo(s,t){let e=f.width(s);f.setWidth(s,t),f._resized(s,e)}static _resized(s,t){let e=f.width(s);if(Math.abs(e-t)<.5)return;let i=re(s.closest("thead")).get(s);u.emit(s.closest(".data-table"),"resize",{header:s,column:i,width:e})}static _sort(s,t,e,i){if(f._pages.get(s.closest(".data-table"))?.server)return;let n=f._compare(s,t);for(let o of Array.from(s.tBodies)){let a=f._groups(o);a.sort(([l],[c])=>i*n(qi(l,e),qi(c,e))),o.append(...a.flat())}}static _compare(s,t){if(!t.classList.contains("numeric"))return new Intl.Collator(u.locale(s),{numeric:!0,sensitivity:"base"}).compare;let e=i=>Me(i)??-1/0;return(i,n)=>e(i)-e(n)}static _records(s){return Array.from(s.tBodies).flatMap(f._groups).filter(([t])=>!t.classList.contains("data-table-detail"))}static _groups(s){let t=[];for(let e of Array.from(s.rows))t.length&&e.classList.contains("data-table-detail")?t[t.length-1].push(e):t.push([e]);return t}};f._initialized=!1,f._dragged=!1,f._serverFilters=new WeakMap,f._pages=new WeakMap,f._pageRequests=new WeakMap,f._onChange=s=>{let t=u.eventTarget(s),e=t?.closest(".data-table"),i=e?.querySelector(":scope > table");if(!i)return;let[n,o]=[f._all(i),f._boxes(i)];t!==n&&!o.includes(t)||(f._select(n,f._enabled(i),t===n),u.emit(e,"change",{selected:o.filter(a=>a.checked).map(a=>a.closest("tr"))}))},f._onFilter=s=>{let t=u.closestInPath(s,`.data-table ${ks}`);if(!t)return;let e=t.closest(".data-table");f._serverFilters.set(e,s),u.emit(e,"filter",{query:t.value.trim()},!0)&&f._serverFilters.get(e)===s&&(f._serverFilters.delete(e),f._resetPage(e))},f._onPage=s=>{let t=u.closestInPath(s,`.data-table[data-page-size] ${As}:not(:disabled, [aria-disabled="true"])`);if(!t)return;let e=t.closest(".data-table");st(e)&&f._advancePage(e,Yr[t.dataset.tablePage],s)},f._onPageSize=s=>{if(!s.composed)return;let t=u.closestInPath(s,`.data-table[data-page-size] ${Xr}`);t&&f._setPageSize(t.closest(".data-table"),t.value,s)},f._onClick=s=>{let t=u.closestInPath(s,'.data-table[data-sort] > table > thead > tr > th > button:not([aria-haspopup], :disabled, [aria-disabled="true"], .drag-handle)');if(!t)return;let e=t.parentElement,i=e.closest(".data-table"),n=e.getAttribute("aria-sort")==="ascending"?"descending":"ascending";e.closest("thead").querySelectorAll("th[aria-sort]").forEach(a=>a.removeAttribute("aria-sort")),e.setAttribute("aria-sort",n);let o=re(e.closest("thead")).get(e);u.emit(i,"sort",{header:e,column:o,direction:n},!0)&&(f._sort(e.closest("table"),e,o,jr[n]),f._firstPage(i))},f._onToggle=s=>{let t=s.detail?.item;t?.matches?.(Ss)&&Hs(t)},f._onPointerDown=s=>{let t=u.closestInPath(s,Ni);t&&s.button===0&&f._drag(t,s)},f._onHandleClick=s=>{let t=u.closestInPath(s,Ni);if(!t||s.detail!==0&&f._dragged)return;let e=t.parentElement;f._resizeTo(e,so(e))},f._onKeyDown=s=>{let t=u.closestInPath(s,Ni);if(!t||!u.plainKey(s))return;let e=t.parentElement,i=no(e,s);i!==void 0&&(s.preventDefault(),f._resizeTo(e,i))};var oe=f;var ct=".transfer-available",ht=".transfer-chosen",ro=new Map([["add",{from:ct,to:ht,all:!1}],["add-all",{from:ct,to:ht,all:!0}],["remove",{from:ht,to:ct,all:!1}],["remove-all",{from:ht,to:ct,all:!0}]]),D=class D{static Init(){typeof document>"u"||(document.addEventListener("click",D._onClick),document.addEventListener("formdata",D._onFormData,{capture:!0}),document.addEventListener("reset",D._onReset,{capture:!0}))}static _onClick(s){let t=u.closestInPath(s,'.transfer-list [data-transfer]:not(:disabled, [aria-disabled="true"])'),e=ro.get(t?.getAttribute("data-transfer"));e&&D._move(t.closest(".transfer-list"),e)}static _move(s,t){let[e,i]=[t.from,t.to].map(l=>s.querySelector(`:scope > ${l}`)),n=D._boxes(s,t.from).filter(l=>!l.disabled&&(t.all||l.checked));if(!i||!n.length)return;D._record(s);let o=n.map(l=>l.closest("li"));for(let[l,c]of o.entries())n[l].checked=!1,i.insertBefore(c,D._slot(s,c,i));let a=[...i.children].filter(l=>o.includes(l));D._announce(s,a.length,i),s.dispatchEvent(new CustomEvent("expressive:transfer",{bubbles:!0,detail:{rows:a,from:e,to:i}}))}static _boxes(s,t){return[...s.querySelectorAll(`:scope > ${t} > li > label > input[type="checkbox"]`)]}static _record(s){if(D._starts.has(s))return;let t=e=>[...s.querySelectorAll(`:scope > ${e} > li`)];D._starts.set(s,{available:t(ct),chosen:t(ht)})}static _slot(s,t,e){let i=D._starts.get(s),n=[...i.available,...i.chosen],o=n.indexOf(t);return!e.matches(ct)||o<0?null:[...e.children].find(a=>n.indexOf(a)>o)??null}static _announce(s,t,e){let i=D._regions.get(s);i||(i=document.createElement("div"),i.className="visually-hidden",i.setAttribute("aria-live","polite"),s.after(i),D._regions.set(s,i)),i.textContent=D.i18n.moved.replace("{count}",String(t)).replace("{list}",D._name(e))}static _name(s){let t=s.getAttribute("aria-label");if(t!==null)return t;let e=s.getRootNode();return(s.getAttribute("aria-labelledby")??"").split(/\s+/).map(n=>e.getElementById(n)?.textContent.trim()).filter(Boolean).join(" ")}static _onFormData(s){let t=s.target.querySelectorAll('.transfer-list:not([data-name=""])[data-name]');for(let e of t)for(let i of D._boxes(e,ht).filter(D._submits))s.formData.append(e.dataset.name,i.value)}static _submits(s){return!s.matches("fieldset[disabled] > :not(legend:first-of-type) *")}static _onReset(s){let t=[...s.target.querySelectorAll(".transfer-list")];setTimeout(()=>{s.defaultPrevented||t.forEach(D._restore)})}static _restore(s){let t=D._starts.get(s);if(!t)return;let e=i=>i.filter(n=>s.contains(n));s.querySelector(`:scope > ${ct}`)?.append(...e(t.available)),s.querySelector(`:scope > ${ht}`)?.append(...e(t.chosen))}};D.i18n={moved:"Moved {count} to {list}"},D._starts=new WeakMap,D._regions=new WeakMap;var ae=D;var oo={},ao=["Enter","ArrowDown"],ut=class extends b{constructor(t,e){super(t,e);this._observer=null;this._sentinel=null;this._input=null;this._view=null;this._restore=null;this._onIntersect=t=>{let e=t[0];e&&this.el.classList.toggle("collapsed",!e.isIntersecting&&e.boundingClientRect.top<this.el.getBoundingClientRect().top)};this._onSearchFocus=()=>{this._view instanceof HTMLDialogElement||this._openSearch()};this._onSearchKeydown=t=>{!ao.includes(t.key)||u.isComposing(t)||!(this._view instanceof HTMLDialogElement)||(t.preventDefault(),this._openSearch())};this._openSearch=()=>{if(this._view instanceof HTMLDialogElement){this._view.open||this._view.showModal();return}this._restore??(this._restore={hidden:this._view.hidden,expanded:this._input.getAttribute("aria-expanded")}),this._view.hidden=!1,this._input.setAttribute("aria-expanded","true")};this._setupCollapse(),this._setupSearch()}static get defaults(){return oo}destroy(){this._observer?.disconnect(),this._observer=null,this._sentinel?.remove(),this._sentinel=null,this._restore&&(this._view.hidden=this._restore.hidden,x(this._input,"aria-expanded",this._restore.expanded),this._restore=null),this.el.classList.remove("collapsed"),super.destroy()}_setupCollapse(){!this.el.classList.contains("medium")&&!this.el.classList.contains("large")||(this._sentinel=document.createElement("span"),this._sentinel.setAttribute("aria-hidden","true"),this._sentinel.style.cssText="display:block;height:0;position:relative;top:-64px;pointer-events:none;visibility:hidden",this.el.insertAdjacentElement("afterend",this._sentinel),this._observer=new IntersectionObserver(this._onIntersect),this._observer.observe(this._sentinel))}_setupSearch(){if(this._input=this.el.querySelector('input[type="search"]'),!this._input)return;let t=this._input.getAttribute("aria-controls");if(this._view=t&&u.getElementById(this.el,t)||this.el.querySelector(".search-view"),!this._view)return;let{signal:e}=this._events;this._input.addEventListener("focus",this._onSearchFocus,{signal:e}),this._input.addEventListener("click",this._openSearch,{signal:e}),this._input.addEventListener("keydown",this._onSearchKeydown,{signal:e})}};ut.key="Expressive_AppBar";var lo={},dt=class extends b{constructor(t,e){super(t,e);this._addedExpanded=!1;this.open=()=>{this.isOpen||(this.isOpen=!0,this._list&&(this._list.inert=!1),this.el.classList.add("active"),this._anchor?.setAttribute("aria-expanded","true"),document.addEventListener("click",this._handleDocumentClick),document.addEventListener("keydown",this._handleDocumentKeydown))};this.close=()=>{if(!this.isOpen)return;let t=this.el.getRootNode().activeElement;t&&this._list?.contains(t)&&this._anchor?.focus(),this._list&&(this._list.inert=!0),this.isOpen=!1,this.el.classList.remove("active"),this._anchor?.setAttribute("aria-expanded","false"),document.removeEventListener("click",this._handleDocumentClick),document.removeEventListener("keydown",this._handleDocumentKeydown)};this._handleFABClick=t=>{let e=t.target;if(!(e instanceof Element))return;let i=e.closest("a, button");!i||i.matches(':disabled, [aria-disabled="true"]')||(i===this._anchor?this._toggle():this._list?.contains(i)&&this.close())};this._handleAnchorKeydown=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._toggle())};this._handleDocumentKeydown=t=>{t.key==="Escape"&&!t.defaultPrevented&&this.close()};this._handleDocumentClick=t=>{t.composedPath().includes(this.el)||this.close()};this.isOpen=!1,this._anchor=this.el.querySelector(":scope > a, :scope > button"),this._list=this.el.querySelector(":scope > ul, :scope > menu"),this._listWasInert=this._list?.inert??!1,this.el.classList.remove("active"),this._list&&(this._list.inert=!0),this._addedExpanded=!!this._anchor&&!this._anchor.hasAttribute("aria-expanded"),this._anchor?.setAttribute("aria-expanded","false"),this._anchor instanceof HTMLAnchorElement&&!this._anchor.hasAttribute("href")&&((!this._anchor.hasAttribute("tabindex")||this._anchor.tabIndex<0)&&(this._anchorTabIndex=this._anchor.getAttribute("tabindex"),this._anchor.tabIndex=0),this._anchor.addEventListener("keydown",this._handleAnchorKeydown,{signal:this._events.signal})),this.el.addEventListener("click",this._handleFABClick,{signal:this._events.signal})}static get defaults(){return lo}destroy(){this.close(),this._list&&(this._list.inert=this._listWasInert),this._addedExpanded&&this._anchor.removeAttribute("aria-expanded"),this._anchorTabIndex!==void 0&&x(this._anchor,"tabindex",this._anchorTabIndex),super.destroy()}_toggle(){this.isOpen?this.close():this.open()}};dt.key="Expressive_FloatingActionButton";var co={},ho=new Set(["single","multiple"]),Rs="button-group-pressed",uo=.15,pt=class extends b{constructor(t,e={}){super(t,e);this._pressedStyles=new Map;this._releaseStyles=new Map;this._releaseTimer=null;this._originalPressed=new Map;this._activeItem=null;this._handleClick=t=>{if(!this._selectionMode)return;let e=this._itemFromEvent(t);if(!(e instanceof HTMLButtonElement)||this._isDisabled(e))return;this._rememberPressed(e);let i=e.getAttribute("aria-pressed")!=="true",n=this._toggleItems.filter(o=>o.getAttribute("aria-pressed")==="true").length;!i&&this.el.hasAttribute("data-selection-required")&&n===1||(this._selectionMode==="single"&&i&&this._toggleItems.forEach(o=>{this._rememberPressed(o),o.setAttribute("aria-pressed","false")}),e.setAttribute("aria-pressed",i?"true":"false"),this._notify("change",null,{detail:{button:e,pressed:i}}))};this._handlePointerDown=t=>{if(t.button!==0)return;let e=this._itemFromEvent(t);e&&!this._isDisabled(e)&&this._startPress(e)};this._handleKeyDown=t=>{if(t.repeat||t.key!==" "&&t.key!=="Enter")return;let e=this._itemFromEvent(t);e&&!this._isDisabled(e)&&this._startPress(e)};this._handleKeyUp=t=>{(t.key===" "||t.key==="Enter")&&this._resetPress()};this._handleFocusOut=t=>{t.target===this._activeItem&&this._resetPress()};this._resetPress=()=>{if(this._activeItem?.classList.remove(Rs),this._activeItem=null,!!this._pressedStyles.size){this._finishRelease(),this._releaseStyles=new Map(this._pressedStyles);for(let[t,e]of this._releaseStyles)t.style.width=`${e.baseWidth}px`;this._pressedStyles.clear(),this._releaseTimer=window.setTimeout(this._finishRelease,200)}};this._finishRelease=()=>{this._releaseTimer!==null&&window.clearTimeout(this._releaseTimer),this._releaseTimer=null;for(let[t,e]of this._releaseStyles)t.style.width=e.width;this._releaseStyles.clear()};let{signal:i}=this._events;this._selectionMode&&(this._normalizeSelection(),this.el.addEventListener("click",this._handleClick,{capture:!0,signal:i})),this.el.addEventListener("pointerdown",this._handlePointerDown,{signal:i}),this.el.addEventListener("keydown",this._handleKeyDown,{signal:i}),this.el.addEventListener("focusout",this._handleFocusOut,{signal:i}),document.addEventListener("pointerup",this._resetPress,{signal:i}),document.addEventListener("pointercancel",this._resetPress,{signal:i}),document.addEventListener("keyup",this._handleKeyUp,{signal:i}),window.addEventListener("blur",this._resetPress,{signal:i})}static get defaults(){return co}destroy(){this._resetPress(),this._finishRelease();for(let[t,e]of this._originalPressed)x(t,"aria-pressed",e);this._originalPressed.clear(),super.destroy()}get _selectionMode(){let t=this.el.dataset.selection;return ho.has(t)?t:null}get _items(){return Array.from(this.el.children).filter(t=>t instanceof HTMLButtonElement||t instanceof HTMLAnchorElement&&t.classList.contains("button"))}get _toggleItems(){return this._items.filter(t=>t instanceof HTMLButtonElement)}_normalizeSelection(){let t=this._toggleItems;t.forEach(e=>{this._rememberPressed(e),["true","false"].includes(e.getAttribute("aria-pressed")||"")||e.setAttribute("aria-pressed","false")}),this._selectionMode==="single"&&t.filter(i=>i.getAttribute("aria-pressed")==="true").slice(1).forEach(i=>i.setAttribute("aria-pressed","false")),this.el.hasAttribute("data-selection-required")&&!t.some(e=>e.getAttribute("aria-pressed")==="true")&&t.find(e=>!this._isDisabled(e))?.setAttribute("aria-pressed","true")}_itemFromEvent(t){if(!(t.target instanceof Element))return null;let e=t.target.closest("button, a.button");return e instanceof HTMLElement&&e.parentElement===this.el?e:null}_isDisabled(t){return t instanceof HTMLButtonElement&&t.disabled||t.getAttribute("aria-disabled")==="true"||t.classList.contains("disabled")}_rememberPressed(t){this._originalPressed.has(t)||this._originalPressed.set(t,t.getAttribute("aria-pressed"))}_startPress(t){if(this._activeItem)return;this._finishRelease();let e=this._items,i=e.indexOf(t);if(i<0||(this._activeItem=t,t.classList.add(Rs),this.el.classList.contains("connected")||e.length<2))return;let n=e.map(g=>g.getBoundingClientRect()),o=n[i].width;if(o<=0)return;let a=Number.parseFloat(getComputedStyle(this.el).getPropertyValue("--md-comp-button-group-pressed-item-width-multiplier")),l=Number.isFinite(a)?a:.15,c=o*l,h=[i-1,i+1].filter(g=>g>=0&&g<e.length),d=new Map;if(h.length===1){let g=h[0];d.set(g,Math.min(c,this._compressionCapacity(e[g],n[g])))}else{let g=c/2;for(let E of h)d.set(E,Math.min(g,this._compressionCapacity(e[E],n[E])));let m=c-[...d.values()].reduce((E,T)=>E+T,0);for(let E of h){if(m<=0)break;let T=this._compressionCapacity(e[E],n[E])-d.get(E),C=Math.min(m,T);d.set(E,d.get(E)+C),m-=C}}let p=[...d.values()].reduce((g,m)=>g+m,0);p<=0||(e.forEach((g,m)=>{this._pressedStyles.set(g,{width:g.style.width,baseWidth:n[m].width}),g.style.width=`${n[m].width}px`}),this.el.offsetWidth,e.forEach((g,m)=>{let E=m===i?p:-(d.get(m)||0);g.style.width=`${n[m].width+E}px`}))}_compressionCapacity(t,e){let i=t.classList.contains("icon-button")?e.width*(1-uo):e.height;return Math.max(0,e.width-i)}};pt.key="Expressive_ButtonGroup";var po={duration:200,indicators:!1,noWrap:!1,interval:0,height:null,onCycleTo:null,i18n:{carousel:"Carousel",item:"Item",of:"of",indicators:"Slides",slide:"Slide"}},Je='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',mt=class extends b{constructor(t,e){super(t,e);this.center=0;this._ownIndicators=!1;this._trackEl=null;this._ignoreScroll=!1;this._alignAfterResize=!1;this._trackRaf=null;this._started=!1;this._vertical=!1;this._resizeObserver=null;this._resizeTimeout=null;this._dragPointerId=null;this._dragStartX=0;this._dragStartY=0;this._dragStartScroll=0;this._suppressClick=!1;this._suppressClickTimeout=null;this._generatedContainerRole=!1;this._generatedContainerLabel=!1;this._generatedContainerDescription=!1;this._generatedWideLayout=!1;this._generatedFixedHeight=!1;this._authoredInlineHeight=null;this._autoAdvanceTimer=null;this._autoAdvances=!1;this._autoPaused=!1;this._hovered=!1;this._focused=!1;this._motion=window.matchMedia("(prefers-reduced-motion: reduce)");this._generatedItemTabIndexes=new Set;this._generatedItemLabels=new Set;this._generatedItemDescriptions=new Set;this._generatedItemSizes=new Set;this._authoredItemSizes=new Set;this._itemA11yOriginal=new Map;this._handleThrottledResize=()=>{!this._started||this._resizeTimeout!==null||(this._handleResize(),this._resizeTimeout=setTimeout(()=>{this._resizeTimeout=null,this._handleResize()},200))};this._handleAutoAdvanceState=t=>{t.type==="mouseenter"?this._hovered=!0:t.type==="mouseleave"?this._hovered=!1:t.type==="focusin"?this._focused=!0:t.type==="focusout"&&(this._focused=this.el.contains(t.relatedTarget)),this._syncAutoAdvance()};this._handleMotionChange=()=>{this._syncAutoAdvance(),this._motion.matches&&this._scrollToIndex(this.center,!1),this._updateParallax()};this._tick=()=>{this._autoAdvanceTimer=null,this._advance(),this._syncAutoAdvance()};this._advance=()=>{let t=this.center+1;if(t<this.count){this.set(t);return}if(this.options.noWrap){this._autoAdvances=!1,this._syncAutoAdvance();return}this.set(0)};this._handleNativeScroll=()=>{this._alignAfterResize=!1,this._finishScroll()};this._handleTrackPointerDown=t=>{this._handleNativeScroll(),!(t.pointerType!=="mouse"||t.button!==0)&&(this.pressed=!0,this.dragged=!1,this._suppressClick=!1,this._dragPointerId=t.pointerId,this._dragStartX=t.clientX,this._dragStartY=t.clientY,this._dragStartScroll=this._vertical?this._scroller.scrollTop:this._scroller.scrollLeft,this._setDragListeners(!0))};this._handleTrackPointerMove=t=>{if(!this.pressed||t.pointerId!==this._dragPointerId)return;let e=t.clientX-this._dragStartX,i=t.clientY-this._dragStartY,n=this._vertical?i:e,o=this._vertical?e:i;if(!this.dragged){if(Math.abs(n)<6||Math.abs(n)<=Math.abs(o))return;this.dragged=!0,this.el.classList.add("dragging");try{this._scroller.setPointerCapture(t.pointerId)}catch{}}this._vertical?this._scroller.scrollTop=this._dragStartScroll-i:this._scroller.scrollLeft=this._dragStartScroll-e,t.preventDefault()};this._handleTrackPointerUp=t=>{if(!(!this.pressed||t.pointerId!==this._dragPointerId)){this.pressed=!1,this._dragPointerId=null,this._setDragListeners(!1),this.el.classList.remove("dragging");try{this._scroller.releasePointerCapture(t.pointerId)}catch{}this.dragged&&(this._suppressClick=!0,window.clearTimeout(this._suppressClickTimeout),this._suppressClickTimeout=setTimeout(()=>{this._suppressClick=!1},0),this._syncActive(this._nearestIndex(),!0))}};this._handleTrackClick=t=>{this._suppressClick&&(this._suppressClick=!1,t.preventDefault(),t.stopImmediatePropagation())};this._handleTrackDragStart=t=>{t.target.closest("a, img, picture, video")&&t.preventDefault()};this._handleItemResize=t=>{this._alignAfterResize&&!this.pressed&&t.propertyName==="flex-basis"&&this.images.includes(t.target)&&this._scrollToIndex(this.center,!1)};this._handleIndicatorClick=t=>{t.stopPropagation();let e=t.target.closest(".indicator-item");if(!e||!this._indicators.contains(e))return;let i=[...this._indicators.children].indexOf(e);i<0||this._cycleTo(i)};this._handleKeydown=t=>{if(this._keyBelongsElsewhere(t))return;let e=getComputedStyle(this._scroller).direction==="rtl",i=this._vertical?t.key==="ArrowDown":t.key===(e?"ArrowLeft":"ArrowRight"),n=this._vertical?t.key==="ArrowUp":t.key===(e?"ArrowRight":"ArrowLeft");t.key==="Home"?(t.preventDefault(),this.set(0),this._focusItem(0)):t.key==="End"?(t.preventDefault(),this.set(this.count-1),this._focusItem(this.count-1)):i?(t.preventDefault(),this.next(),this._focusItem(this.center)):n&&(t.preventDefault(),this.prev(),this._focusItem(this.center))};this._handleTrackScroll=()=>{this.el.classList.contains("scrolling")||this.el.classList.add("scrolling"),window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=setTimeout(()=>this.el.classList.remove("scrolling"),120),this._trackRaf===null&&(this._trackRaf=requestAnimationFrame(()=>{this._trackRaf=null;let t=this._ignoreScroll?this.center:this._nearestIndex();this._updateParallax(),t!==this.center&&this._syncActive(t,this.dragged)}))};this._handleResize=()=>{!this._started||!this.images.length||(this._syncAdaptiveMode(),this._syncLayoutRoles(this.center),this.pressed||this._scrollToIndex(this.center,!1),this._updateParallax())};this._finishScroll=()=>{this._ignoreScroll=!1,this._scroller.style.scrollSnapType="",clearTimeout(this._scrollEndTimeout),this._scroller.removeEventListener("scrollend",this._handleScrollEnd)};this._handleScrollEnd=()=>{this._nearestIndex()===this.center&&!this.images.some(t=>t.getAnimations().some(e=>e.playState==="running"))&&this._finishScroll()};if(this._vertical=this.el.classList.contains("full-screen"),this.pressed=!1,this.dragged=!1,this.images=this._collectItems(),!this.images.length){console.error("Carousel: no .carousel-item elements to show");return}this.images.forEach(n=>{this._itemA11yOriginal.set(n,{ariaHidden:n.getAttribute("aria-hidden"),tabIndex:n.getAttribute("tabindex")}),n.hasAttribute("data-carousel-size")&&this._authoredItemSizes.add(n)}),this.hasMultipleSlides=this.images.length>1,this.showIndicators=this.options.indicators&&this.hasMultipleSlides,this.count=this.images.length,this._autoAdvances=this.options.interval>0&&this.hasMultipleSlides,this.images.forEach(n=>n.classList.add("carousel-item")),this.options.height!==null&&(this._generatedFixedHeight=!this.el.classList.contains("fixed-height"),this._authoredInlineHeight=this.el.style.getPropertyValue("--carousel-height")||null,this.el.classList.add("fixed-height"),this.el.style.setProperty("--carousel-height",`${this.options.height}px`)),this._wrapTrack(),this._syncAdaptiveMode(),this.showIndicators&&this._setupIndicators(),this._setupAccessibility(),this._setupEventHandlers(),this._started=!0;let i=Math.max(0,this.images.findIndex(n=>n.classList.contains("active")));this.center=i,this._syncActive(i,!1),this._updateParallax(),this._scrollToIndex(i,!1),this._syncAutoAdvance()}get _scroller(){return this._trackEl??this.el}static get defaults(){return po}destroy(){this._started&&this._teardown(),super.destroy()}_collectItems(){let t=Array.from(this.el.children).filter(e=>e instanceof HTMLElement&&e.classList.contains("carousel-item"));return t.length?t:Array.from(this.el.children).filter(e=>!(e instanceof HTMLElement)||e.classList.contains("indicators")?!1:e.tagName!=="NAV")}_setupAccessibility(){this.el.hasAttribute("role")||(this.el.setAttribute("role","region"),this._generatedContainerRole=!0),!this.el.hasAttribute("aria-label")&&!this.el.hasAttribute("aria-labelledby")&&(this.el.setAttribute("aria-label",this.options.i18n.carousel),this._generatedContainerLabel=!0),this.el.hasAttribute("aria-roledescription")||(this.el.setAttribute("aria-roledescription","carousel"),this._generatedContainerDescription=!0),this.images.forEach((t,e)=>{if(t.hasAttribute("aria-roledescription")||(t.setAttribute("aria-roledescription","slide"),this._generatedItemDescriptions.add(t)),!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")){let i=t.querySelector("img[alt]")?.getAttribute("alt")?.trim(),n=t.textContent?.replace(/\s+/g," ").trim(),o=i||n,a=`${this.options.i18n.item} ${e+1} ${this.options.i18n.of} ${this.count}`;t.setAttribute("aria-label",o?`${o}, ${a}`:a),this._generatedItemLabels.add(t)}!t.matches(Je)&&!t.querySelector(Je)&&(t.tabIndex=0,this._generatedItemTabIndexes.add(t))})}_setupIndicators(){let t=Array.from(this.el.children).find(e=>e instanceof HTMLElement&&e.classList.contains("indicators"));this._indicators=t??document.createElement("nav"),this._ownIndicators=!t,this._indicators.classList.add("indicators"),this._indicators.setAttribute("aria-label",this.options.i18n.indicators),this._indicators.replaceChildren(),this.images.forEach((e,i)=>{let n=document.createElement("button");n.type="button",n.classList.add("indicator-item"),n.setAttribute("aria-label",`${this.options.i18n.slide} ${i+1}`),this._indicators.appendChild(n)}),this._ownIndicators&&this.el.appendChild(this._indicators)}_setupEventHandlers(){let{signal:t}=this._events;this.el.addEventListener("keydown",this._handleKeydown,{signal:t}),this._motion.addEventListener("change",this._handleMotionChange,{signal:t}),this._autoAdvances&&(this.el.addEventListener("mouseenter",this._handleAutoAdvanceState,{signal:t}),this.el.addEventListener("mouseleave",this._handleAutoAdvanceState,{signal:t}),this.el.addEventListener("focusin",this._handleAutoAdvanceState,{signal:t}),this.el.addEventListener("focusout",this._handleAutoAdvanceState,{signal:t}),document.addEventListener("visibilitychange",this._handleAutoAdvanceState,{signal:t})),this.showIndicators&&this._indicators&&this._indicators.addEventListener("click",this._handleIndicatorClick,{signal:t}),this._resizeObserver=new ResizeObserver(()=>this._handleThrottledResize()),this._resizeObserver.observe(this.el),this.el.classList.contains("full-screen")&&window.addEventListener("resize",this._handleThrottledResize,{passive:!0,signal:t}),this._scroller.addEventListener("scroll",this._handleTrackScroll,{passive:!0,signal:t}),this._scroller.addEventListener("pointerdown",this._handleTrackPointerDown,{signal:t}),this._scroller.addEventListener("wheel",this._handleNativeScroll,{passive:!0,signal:t}),this._scroller.addEventListener("click",this._handleTrackClick,{capture:!0,signal:t}),this._scroller.addEventListener("dragstart",this._handleTrackDragStart,{signal:t}),this._scroller.addEventListener("transitionend",this._handleItemResize,{signal:t})}_teardown(){this._started=!1,this._events.abort(),this._resizeObserver?.disconnect(),this._resizeObserver=null,this._finishScroll(),this._autoAdvances=!1,this._syncAutoAdvance(),this._trackRaf!==null&&cancelAnimationFrame(this._trackRaf),window.clearTimeout(this.scrollingTimeout),window.clearTimeout(this._suppressClickTimeout),clearTimeout(this._resizeTimeout),this._ownIndicators&&this._indicators?.remove(),this._unwrapTrack(),this.images.forEach(t=>{t.style.removeProperty("--md-comp-carousel-item-parallax"),this._generatedItemLabels.has(t)&&t.removeAttribute("aria-label"),this._generatedItemDescriptions.has(t)&&t.removeAttribute("aria-roledescription"),this._generatedItemSizes.has(t)&&t.removeAttribute("data-carousel-size");let e=this._itemA11yOriginal.get(t);e&&(x(t,"aria-hidden",e.ariaHidden),x(t,"tabindex",e.tabIndex))}),this._generatedContainerRole&&this.el.removeAttribute("role"),this._generatedContainerLabel&&this.el.removeAttribute("aria-label"),this._generatedContainerDescription&&this.el.removeAttribute("aria-roledescription"),this._generatedFixedHeight&&this.el.classList.remove("fixed-height"),this.options.height!==null&&(this._authoredInlineHeight===null?this.el.style.removeProperty("--carousel-height"):this.el.style.setProperty("--carousel-height",this._authoredInlineHeight)),this._generatedWideLayout&&this.el.classList.remove("multi-wide","multi-large","multi-extra-large","full-screen-horizontal")}_syncAutoAdvance(){let t=this._autoAdvances&&!this._autoPaused&&!this._hovered&&!this._focused&&!this._motion.matches&&!document.hidden;t&&this._autoAdvanceTimer===null?this._autoAdvanceTimer=setTimeout(this._tick,this.options.duration+this.options.interval):!t&&this._autoAdvanceTimer!==null&&(clearTimeout(this._autoAdvanceTimer),this._autoAdvanceTimer=null)}_setDragListeners(t){let e=t?"addEventListener":"removeEventListener",i={signal:this._events.signal};document[e]("pointermove",this._handleTrackPointerMove,i),document[e]("pointerup",this._handleTrackPointerUp,i),document[e]("pointercancel",this._handleTrackPointerUp,i)}_keyBelongsElsewhere(t){let e=t.target;return[t.defaultPrevented,t.altKey,t.ctrlKey,t.metaKey,t.shiftKey,e.isContentEditable].some(Boolean)||this.el.contains(e.closest('input, textarea, select, video[controls], audio[controls], [role="slider"], [role="tablist"], [role="menu"]'))}_paintIndicators(t){if(!this.showIndicators||!this._indicators)return;let e=(t%this.count+this.count)%this.count;this._indicators.querySelectorAll(".indicator-item").forEach((i,n)=>{let o=n===e;i.classList.toggle("active",o),o?i.setAttribute("aria-current","true"):i.removeAttribute("aria-current")})}_syncActive(t,e){let i=this.center;this.center=t,this.images.forEach((a,l)=>a.classList.toggle("active",l===t)),this._paintIndicators(t),this._syncLayoutRoles(t);let n=this.images[t],o={item:n,dragged:e};return i!==t&&!this._notify("change",this.options.onCycleTo,{args:[n,e],detail:o,current:()=>this.center===t})?!1:(typeof this.oneTimeCallback=="function"&&(this.oneTimeCallback.call(this,n,e),this.oneTimeCallback=null),!0)}_syncLayoutRoles(t){let e=this.images.map(()=>"large"),i=(n,o)=>{this.images[n]&&(e[n]=o)};if(!(this.el.classList.contains("uncontained")||this.el.classList.contains("full-screen")&&this._vertical))if(this.el.classList.contains("hero")||this.el.classList.contains("full-screen-horizontal"))i(t+1,"small"),this.el.classList.contains("center-aligned")&&i(t-1,"small");else{let n=this.el.clientWidth,o=n>=1600?4:n>=1200?3:n>=600?2:1,a=Math.min(o,Math.max(1,this.count-2));this.el.classList.remove("multi-wide","multi-large","multi-extra-large"),a===2?this.el.classList.add("multi-wide"):a===3?this.el.classList.add("multi-large"):a>=4&&this.el.classList.add("multi-extra-large"),this._generatedWideLayout=this._generatedWideLayout||a>1,i(t+a,"medium"),i(t+a+1,"small")}this.images.forEach((n,o)=>{this._authoredItemSizes.has(n)||(n.setAttribute("data-carousel-size",e[o]),this._generatedItemSizes.add(n))})}_syncAdaptiveMode(){if(!this.el.classList.contains("full-screen"))return;let t=window.matchMedia("(orientation: landscape)").matches,e=this.el.clientWidth>=840||t,i=this._vertical;this._vertical=!e,this.el.classList.toggle("full-screen-horizontal",e),this._generatedWideLayout=this._generatedWideLayout||e,this._started&&i!==this._vertical&&this._scroller.scrollTo({left:0,top:0,behavior:"auto"})}_focusItem(t){let e=this.images[t];if(!e)return;((e.matches(Je)?e:e.querySelector(Je))??e).focus({preventScroll:!0})}_updateParallax(){if(this._motion.matches){this.images.forEach(o=>o.style.setProperty("--md-comp-carousel-item-parallax","0px"));return}let t=this._scroller.getBoundingClientRect(),e=this._vertical?t.top+t.height/2:t.left+t.width/2,i=Math.max(1,this._vertical?t.height:t.width),n=this.images.map(o=>o.getBoundingClientRect());this.images.forEach((o,a)=>{let l=n[a],c=this._vertical?l.top+l.height/2:l.left+l.width/2,h=Math.max(-1,Math.min(1,(c-e)/i));o.style.setProperty("--md-comp-carousel-item-parallax",`${h*-24}px`)})}_wrapTrack(){let t=document.createElement("div");t.className="carousel-track",this.images[0].before(t),this.images.forEach(e=>t.appendChild(e)),this._trackEl=t}_unwrapTrack(){this._trackEl&&(this.images.forEach(t=>this.el.insertBefore(t,this._trackEl)),this._trackEl.remove(),this._trackEl=null)}_nearestIndex(){let t=this.el.classList.contains("center-aligned"),e=getComputedStyle(this._scroller),i=!this._vertical&&e.direction==="rtl",n=this._vertical?this._scroller.scrollTop:this._scroller.scrollLeft,o=this._vertical?this._scroller.clientHeight:this._scroller.clientWidth,a=(this._vertical?this._scroller.scrollHeight:this._scroller.scrollWidth)-o,l=parseFloat(this._vertical?e.paddingBlockStart:e.paddingInlineStart)||0,c=this.center,h=1/0,d=1/0;return this.images.forEach((p,g)=>{let m=this._vertical?p.offsetTop:p.offsetLeft,E=this._vertical?p.offsetHeight:p.offsetWidth,T=t?m-(o-E)/2:m+(i?E-o+l:-l),C=Math.max(i?-a:0,Math.min(i?0:a,T)),_=Math.abs(C-n);g===this.center&&(d=_),_<h&&(h=_,c=g)}),d-h<=1?this.center:c}_scrollToIndex(t,e=!0){let i=this.images[t];if(!i)return;this._finishScroll();let n=this.el.classList.contains("center-aligned"),o=getComputedStyle(this._scroller),a=Number.parseFloat(o.paddingInlineStart)||0,l=Number.parseFloat(o.paddingBlockStart)||0,c=n?i.offsetLeft-(this._scroller.clientWidth-i.offsetWidth)/2:o.direction==="rtl"?i.offsetLeft+i.offsetWidth-this._scroller.clientWidth+a:i.offsetLeft-a,h=i.offsetTop-l;this._ignoreScroll=!0,this._scroller.style.scrollSnapType="none",this._scroller.scrollTo({left:this._vertical?0:c,top:this._vertical?h:0,behavior:e&&!this._motion.matches?"smooth":"instant"}),this._scroller.addEventListener("scrollend",this._handleScrollEnd),this._scrollEndTimeout=setTimeout(this._finishScroll,this.options.duration+350)}_cycleTo(t,e=null){this._alignAfterResize=!0,typeof e=="function"&&(this.oneTimeCallback=e),this._syncActive(t,!1)&&this._scrollToIndex(t)}pause(){this._autoPaused=!0,this._syncAutoAdvance()}start(){this._autoPaused=!1,this._syncAutoAdvance()}next(t=1){isNaN(t)&&(t=1);let e=this.center+t;e>=this.count||e<0||this._cycleTo(e)}prev(t=1){isNaN(t)&&(t=1);let e=this.center-t;e>=this.count||e<0||this._cycleTo(e)}set(t,e){(t===void 0||isNaN(t))&&(t=0),!(t>=this.count||t<0)&&this._cycleTo(t,e)}};mt.key="Expressive_Carousel";var mo=Object.freeze({}),Se=class extends b{constructor(t,e){super(t,e);this.updateCounter=()=>{let t=parseInt(this.el.getAttribute("maxlength")),e=this.el.value.length;this.isValidLength=e<=t;let i=e.toString();t&&(i+="/"+t,this._validateInput()),this.counterEl.textContent=i};this.isInvalid=!1,this.isValidLength=!1,this._setupCounter(),this._setupEventHandlers(),this.updateCounter()}static get defaults(){return mo}destroy(){super.destroy(),this._removeCounter(),this.isInvalid&&this.el.classList.remove("invalid")}_setupEventHandlers(){let t={capture:!0,signal:this._events.signal};this.el.addEventListener("focus",this.updateCounter,t),this.el.addEventListener("input",this.updateCounter,t)}_setupCounter(){this.counterEl=document.createElement("span"),this.counterEl.classList.add("character-counter"),this.counterEl.setAttribute("aria-live","polite"),this.counterEl.setAttribute("aria-atomic","true"),this.counterEl.style.fontSize="12px",this.counterEl.style.height="1",this.el.parentElement.appendChild(this.counterEl)}_removeCounter(){this.counterEl.remove()}_validateInput(){this.isValidLength&&this.isInvalid?(this.isInvalid=!1,this.el.classList.remove("invalid")):!this.isValidLength&&!this.isInvalid&&(this.isInvalid=!0,this.el.classList.remove("valid"),this.el.classList.add("invalid"))}};Se.key="Expressive_CharacterCounter";var fo=Object.freeze({}),Fs={0:/[0-9]/,a:/\p{L}/u,"*":/[0-9\p{L}]/u},_o={deleteContentBackward:-1,deleteContentForward:1},go=r=>(r.match(/\\[^]|[^]/gu)??[]).map(s=>Fs[s]?{accepts:Fs[s]}:{literal:s.slice(-1)});function vo(r,s,t){if(r[s]?.literal===t)return s;let e=r.findIndex((i,n)=>n>=s&&"accepts"in i);return e<0?r.length:e}function bo(r,s,t,e){let i=vo(r,s,t),n=r[i];return n?"literal"in n?i+1:n.accepts.test(t)?(e.push(t),i+1):s:s}function ti(r,s,t){let e=[],i=0,n=0,o=0;for(let a of s){for(let l of a.normalize("NFKC"))i=bo(r,i,l,e);n+=a.length,n<=t&&(o=e.length)}return{chars:e,before:o}}function Ns(r,s){let t="",e="",i=[];for(let n of r){if(i.length===s.length)break;"literal"in n?e+=n.literal:(t+=e+s[i.length],e="",i.push(t.length))}return{text:t,ends:i}}var ft=class extends b{constructor(t,e){super(t,e);this._onInput=t=>{t.isComposing||this._format()};this._onBeforeInput=t=>{let e=_o[t.inputType],i=e&&this.el.selectionStart===this.el.selectionEnd?this._acrossLiteral(e):-1;i<0||(t.preventDefault(),this._remove(i,t.inputType))};this._onReset=t=>{t.target===this.el.form&&setTimeout(this._afterReset)};this._afterReset=()=>{this._events.signal.aborted||this._rewrite()};this._format=()=>{let t=this._rewrite();t!==null&&this.el.ownerDocument.activeElement===this.el&&this.el.setSelectionRange(t,t)};if(this._tokens=go(t.dataset.mask??""),!this._tokens.some(n=>"accepts"in n))return;let i=this._events.signal;t.addEventListener("input",this._onInput,{capture:!0,signal:i}),t.addEventListener("compositionend",this._format,{signal:i}),t.addEventListener("beforeinput",this._onBeforeInput,{signal:i}),t.ownerDocument.addEventListener("reset",this._onReset,{capture:!0,signal:i}),this._rewrite()}static get defaults(){return fo}_acrossLiteral(t){let{selectionStart:e,value:i}=this.el,n=ti(this._tokens,i,e),o=n.before+Math.min(t,0);return ti(this._tokens,i,e+t).before===n.before&&o in n.chars?o:-1}_remove(t,e){let{chars:i}=ti(this._tokens,this.el.value,0);i.splice(t,1);let{text:n,ends:o}=Ns(this._tokens,i);this.el.value=n;let a=o[t-1]??0;this.el.setSelectionRange(a,a),this.el.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0,inputType:e}))}_rewrite(){let t=this.el,{chars:e,before:i}=ti(this._tokens,t.value,t.selectionEnd??t.value.length),{text:n,ends:o}=Ns(this._tokens,e);return n===t.value?null:(t.value=n,o[i-1]??0)}};ft.key="Expressive_InputMask";var Eo={onOpen:null,onClose:null,i18n:{showLess:"Show less"}},Bs=["-webkit-line-clamp","line-clamp"],$s=["aria-expanded","aria-controls","hidden"];function yo(r){let s=r.ownerDocument.createTreeWalker(r,NodeFilter.SHOW_TEXT),t=null;for(let e=s.nextNode();e;e=s.nextNode())e.textContent.trim()&&!e.parentElement.closest('[aria-hidden="true"]')&&(t=e);return t}var ei=class ei extends b{constructor(t,e){super(t,e);this.isOpen=!1;this._initial={};this._initialId=null;this._label=null;this._moreLabel="";this._observer=null;this.open=()=>{this.isOpen||!this.button||(this._show(!0),this._notify("open",this.options.onOpen,{current:()=>this.isOpen}))};this.close=()=>{this.isOpen&&(this._show(!1),this._notify("close",this.options.onClose,{current:()=>!this.isOpen}))};this._toggle=()=>this.isOpen?this.close():this.open();this._fit=()=>{this.isOpen||this.button.matches(":focus")||ei.getInstance(this.el)!==this||(this.button.hidden=this.text.scrollHeight-this.text.clientHeight<=1)};if(this.text=t.querySelector(":scope > :is(.line-clamp-1, .line-clamp-2, .line-clamp-3)"),this.button=t.querySelector(":scope > button"),!this.text||!this.button)return;this._wire();let{signal:i}=this._events;this.button.addEventListener("click",this._toggle,{signal:i}),this.button.addEventListener("blur",this._fit,{signal:i}),this._observer=new ResizeObserver(this._fit),this._observer.observe(this.text),t.ownerDocument.fonts?.ready.then(this._fit)}static get defaults(){return Eo}destroy(){if(this.button){this._observer.disconnect(),this.isOpen&&this._show(!1);for(let t of $s)x(this.button,t,this._initial[t]);x(this.text,"id",this._initialId)}super.destroy()}_wire(){for(let t of $s)this._initial[t]=this.button.getAttribute(t);this._initialId=this.text.getAttribute("id"),this.text.id||(this.text.id=`show-more-${u.guid()}`),this._label=yo(this.button),this._label&&(this._moreLabel=this._label.data),this.button.ariaExpanded="false",this.button.setAttribute("aria-controls",this.text.id)}_show(t){this.isOpen=t,this.button.ariaExpanded=String(t),this._label&&(this._label.data=t?this._lessLabel():this._moreLabel),this._clamp(!t)}_lessLabel(){return this.button.dataset.showLess||this.options.i18n.showLess}_clamp(t){if(t)this._restoreClamp();else for(let e of Bs)this.text.style.setProperty(e,"unset")}_restoreClamp(){for(let t of Bs)this.text.style.removeProperty(t);this.text.style.length||this.text.removeAttribute("style")}};ei.key="Expressive_ShowMore";var le=ei;var To={enterDelay:500,exitDelay:300},qs=new WeakMap,_t=class extends b{constructor(t,e){super(t,e);this._shown=!1;this._holds=new Set;this._anchorName=`--hover-card-${u.guid()}`;this.open=()=>{clearTimeout(this._timeout),!(!this.cardEl||this._shown)&&(qs.get(this.cardEl)?.close(),this.cardEl.showPopover.call(this.cardEl,{source:this.el}),qs.set(this.cardEl,this),this._shown=!0,this._listenForEscape(!0),this._anchor(!0),this._notify("open"))};this.close=()=>{clearTimeout(this._timeout),this._shown&&(this.cardEl.hidePopover(),this._hidden(),this._notify("close"))};this._handlePointerEnter=t=>{t.pointerType!=="touch"&&this._hold("pointer")};this._handlePointerLeave=t=>{t.pointerType!=="touch"&&this._release("pointer")};this._handleLinkFocus=()=>{this.el.matches(":focus-visible")&&this._hold("focus")};this._handleCardFocus=()=>this._hold("focus");this._handleFocusOut=t=>{let e=t.relatedTarget;(!e||!(this.el.contains(e)||this.cardEl.contains(e)))&&this._release("focus")};this._handleKeydown=t=>{t.key!=="Escape"||u.isComposing(t)||(u.focusIsIn(this.el,this.cardEl)&&this._takeEscape(t),this.close())};this._handleToggle=t=>{t.newState!=="closed"||!this._shown||(this._hidden(),this._notify("close"))};if(this.cardEl=u.getElementById(t,t.getAttribute("aria-details")??""),!this.cardEl){console.error("HoverCard: aria-details names no element; the link shows no card.");return}let{signal:i}=this._events;this.cardEl.addEventListener("toggle",this._handleToggle,{signal:i});for(let n of[this.el,this.cardEl])n.addEventListener("pointerenter",this._handlePointerEnter,{signal:i}),n.addEventListener("pointerleave",this._handlePointerLeave,{signal:i}),n.addEventListener("focusout",this._handleFocusOut,{signal:i});this.el.addEventListener("focus",this._handleLinkFocus,{signal:i}),this.cardEl.addEventListener("focusin",this._handleCardFocus,{signal:i})}static get defaults(){return To}destroy(){clearTimeout(this._timeout),this._shown&&(this.cardEl.hidePopover(),this._hidden()),super.destroy()}_hidden(){this._shown=!1,this._listenForEscape(!1),this._anchor(!1)}_anchor(t){u.setAnchorName(this.el,this._anchorName,t),t?this.cardEl.style.setProperty("position-anchor",this._anchorName):this.cardEl.style.removeProperty("position-anchor");for(let e of[this.el,this.cardEl])e.getAttribute("style")||e.removeAttribute("style")}_schedule(){clearTimeout(this._timeout);let t=this._holds.size>0;if(t===this._shown)return;let[e,i]=t?[this.open,this.options.enterDelay]:[this.close,this.options.exitDelay];this._timeout=setTimeout(e,i)}_hold(t){this._holds.add(t),this._schedule()}_release(t){this._holds.delete(t),this._schedule()}_listenForEscape(t){let e=this.el.ownerDocument;t?e.addEventListener("keydown",this._handleKeydown,{capture:!0,signal:this._events.signal}):e.removeEventListener("keydown",this._handleKeydown,!0)}_takeEscape(t){t.preventDefault(),t.stopPropagation(),u.focusIsIn(this.cardEl)&&this.el.focus()}};_t.key="Expressive_HoverCard";var Lo=Object.freeze({i18n:Object.freeze({invalid:"Enter an amount."})}),wo="9876543210";function xo(r,s){let t=Math.max(r.lastIndexOf("."),r.lastIndexOf(",")),e=r.slice(t+1);return t>=0&&e.length<=s?[r.slice(0,t),e]:[r,""]}function Mo(r,s){let t=r.replace(/[^\d.,]/g,"").replace(/[.,]+$/,"");if(!/\d/.test(t))return null;let[e,i]=xo(t,s);return(/^\D*[-−]/.test(r)?-1:1)*+`${e.replace(/[.,]/g,"")}.${i}`}var gt=class extends b{constructor(t,e){super(t,e);this._format=()=>{this._show(this.value)};this._onChange=()=>{this.el.matches(":focus")||this._format()};this._onFocus=()=>{let t=this.value;if(t===null)return;let e=this._edit.format(t);this.el.value=e,this.el.setSelectionRange(e.length,e.length)};this._validate=()=>{let{el:t}=this,e=t.value.trim()!==""&&this.value===null;t.setCustomValidity(e?this.options.i18n.invalid:"")};this._onReset=t=>{t.target===this.el.form&&setTimeout(this._afterReset)};this._afterReset=()=>{this._events.signal.aborted||this._start()};this._onFormData=t=>{this._submitsTo(t.target)&&t.formData.set(this.el.name,String(this.value??this.el.value))};let i=u.locale(t);try{this._display=new Intl.NumberFormat(i,{style:"currency",currency:t.dataset.currency})}catch{return}this._digits=this._display.resolvedOptions().maximumFractionDigits,this._edit=new Intl.NumberFormat(i,{useGrouping:!1,maximumFractionDigits:this._digits}),this._plain=new Intl.NumberFormat("en",{useGrouping:!1,maximumFractionDigits:this._digits}),this._native=new Intl.NumberFormat(i,{useGrouping:!1}).format(9876543210),this._decimal=new Intl.NumberFormat(i).formatToParts(.5).find(l=>l.type==="decimal").value;let n=this._events.signal;t.addEventListener("change",this._onChange,{capture:!0,signal:n}),t.addEventListener("blur",this._format,{signal:n}),t.addEventListener("focus",this._onFocus,{signal:n}),t.addEventListener("input",this._validate,{signal:n});let o=t.getRootNode(),a="host"in o?o:t.ownerDocument;a.addEventListener("formdata",this._onFormData,{capture:!0,signal:n}),a.addEventListener("reset",this._onReset,{capture:!0,signal:n}),this._start()}static get defaults(){return Lo}get value(){return this._round(this._read(this.el.value))}_read(t){let e=Array.from(t.normalize("NFKC"),i=>i===this._decimal?".":wo[this._native.indexOf(i)]??i);return Mo(e.join(""),this._digits)}_round(t){return t===null?null:Number(this._plain.format(t))}_start(){let t=this.el.value,e=Number(t);this._show(this._round(t.trim()&&Number.isFinite(e)?e:this._read(t)))}_show(t){t!==null&&(this.el.value=this._display.format(t)),this._validate()}_submitsTo(t){let{el:e}=this;return t===e.form&&e.name!==""&&!e.matches(":disabled")}destroy(){super.destroy(),this.el.setCustomValidity("")}};gt.key="Expressive_CurrencyInput";var Co="expressive-cascader-control",Vi=["readonly","role","aria-haspopup","aria-expanded","aria-controls","aria-required","aria-invalid"],So=["Enter"," ","ArrowDown"],ko={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"},Ao=" / ",Ho=r=>Array.from(r.childNodes,s=>s.nodeName==="UL"?" ":s.textContent).join("").replace(/\s+/g," ").trim();function Ks(r,s){return r?Array.from(r.querySelectorAll(":scope > li"),t=>{let e={value:t.dataset.value??"",label:Ho(t),parent:s,children:[],source:t};return e.children=Ks(t.querySelector(":scope > ul"),e),e}):[]}var Io=(r,s)=>r.length===s.length&&r.every((t,e)=>t===s[e]),Vs=r=>r.flatMap(s=>[s,...Vs(s.children)]);function Oo(r){let s=[];for(let t=r;t;t=t.parent)s.unshift(t);return s}var zs={i18n:{required:"Choose an option."}},vt=class extends b{constructor(t,e={}){super(t,e);this._path=[];this.isOpen=!1;this._open=[];this._columns=[];this._nodes=new Map;this._rendered=new Map;this._insidePress=null;this._openEvents=null;this._stampedLabel=null;this._ids=0;this._initialPath=[];this._control=null;this._formName="";this._required=!1;this._keys={ArrowDown:(t,e)=>this._move(t,e),ArrowUp:(t,e)=>this._move(t,e),Home:(t,e)=>this._move(t,e),End:(t,e)=>this._move(t,e),ArrowRight:t=>this._forward(t),ArrowLeft:t=>this._back(t),Enter:t=>this._activate(t)," ":t=>this._activate(t),Escape:()=>this._dismiss(),Tab:()=>this._dismiss()};this._handleInputKeydown=u.ignoringComposition(t=>{this.isOpen||!So.includes(t.key)||(t.preventDefault(),this.open())});this._handleOptionKeydown=t=>{let e=t.target.closest('[role="option"]'),i=e&&this._keys[this._keyName(t)];!i||!u.plainKey(t)||(t.preventDefault(),i(e,t))};this._handleInvalid=()=>{this.input.setAttribute("aria-invalid","true")};this._handleInputClick=()=>{this.isOpen?this.close():this.open()};this._handleOptionClick=t=>{let e=t.target.closest('[role="option"]');e&&(this._focus(e),this._pick(e))};this._handleInsidePointer=t=>{this._insidePress=t};this._handleOutsidePointer=t=>{t!==this._insidePress&&this.close()};if(this.input=this.el.querySelector(":scope > input"),this._options=Ks(this.el.querySelector(":scope > .cascader-options"),null),!this.input)return;this._saved=Vi.map(n=>this.input.getAttribute(n)),this.popover=document.createElement("div"),this.popover.id=`cascader-${u.guid()}`,this.popover.className="cascader-popover",this.popover.setAttribute("popover","manual"),this.popover.setAttribute("role","dialog"),this.el.append(this.popover),this._labelledBy=this.input.getAttribute("aria-labelledby")??this._labelId(),this._name(this.popover),this.input.readOnly=!0,this.input.setAttribute("role","combobox"),this.input.setAttribute("aria-haspopup","dialog"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls",this.popover.id),this._path=this._initialPath=this._startingPath(),this._show(),this._takeName();let{signal:i}=this._events;this.input.addEventListener("click",this._handleInputClick,{signal:i}),this.input.addEventListener("keydown",this._handleInputKeydown,{signal:i}),this.popover.addEventListener("click",this._handleOptionClick,{signal:i}),this.popover.addEventListener("keydown",this._handleOptionKeydown,{signal:i})}static get defaults(){return zs}get value(){return this._path.map(t=>t.value)}open(){this.isOpen||this.input.matches(":disabled")||(this.isOpen=!0,this._columns=[this._addColumn(this._options,null)],this._open=[],this._path.forEach((t,e)=>this._choose(e,t)),this._showPopover(),this._focus(this._optionFor(this._path.at(-1))??this._columns[0].querySelector('[role="option"]')))}close(){this.isOpen&&(this.isOpen=!1,this._openEvents.abort(),this.popover.hidePopover?.(),this.popover.replaceChildren(),this._columns=[],this._nodes.clear(),this._rendered.clear(),this.input.setAttribute("aria-expanded","false"))}destroy(){this.input&&(this.close(),this._giveNameBack(),this._stampedLabel?.removeAttribute("id"),this.popover.remove(),Vi.forEach((t,e)=>x(this.input,t,this._saved[e]))),super.destroy()}_startingPath(){return Oo(Vs(this._options).find(t=>!t.children.length&&t.source.hasAttribute("data-selected")))}_showPopover(){this.popover.showPopover?.({source:this.input}),this.input.setAttribute("aria-expanded","true"),this._openEvents=R(this.el);let{signal:t}=this._openEvents;this.el.addEventListener("pointerdown",this._handleInsidePointer,{signal:t}),document.addEventListener("pointerdown",this._handleOutsidePointer,{signal:t})}_labelId(){let t=this.input.labels?.[0];return t?(t.id||(t.id=`${this.popover.id}-label`,this._stampedLabel=t),t.id):null}_name(t){this._labelledBy?t.setAttribute("aria-labelledby",this._labelledBy):x(t,"aria-label",this.input.getAttribute("aria-label"))}_addColumn(t,e){let i=document.createElement("ul");return i.setAttribute("role","listbox"),e?i.setAttribute("aria-labelledby",this._optionFor(e).id):this._name(i),i.append(...t.map(n=>this._addOption(n))),i.firstElementChild?.setAttribute("tabindex","0"),this.popover.append(i),i}_addOption(t){let e=document.createElement("li");if(e.id=`${this.popover.id}-${this._ids++}`,e.setAttribute("role","option"),e.setAttribute("aria-selected","false"),e.tabIndex=-1,e.textContent=t.label,t.children.length){let i=document.createElement("span");i.className="cascader-chevron",i.setAttribute("aria-hidden","true"),e.append(i)}return this._nodes.set(e,t),this._rendered.set(t,e),e}_optionFor(t){return this._rendered.get(t)}_choose(t,e){this._open=[...this._open.slice(0,t),e],this._columns.splice(t+1).forEach(i=>i.remove()),this._columns[t].querySelectorAll('[role="option"]').forEach(i=>{let n=this._nodes.get(i)===e;i.setAttribute("aria-selected",String(n)),i.setAttribute("tabindex",n?"0":"-1")}),e.children.length&&this._columns.push(this._addColumn(e.children,e))}_focus(t){t instanceof HTMLElement&&(t.parentElement.querySelectorAll('[tabindex="0"]').forEach(e=>e.setAttribute("tabindex","-1")),t.tabIndex=0,t.focus())}_takeName(){this._formName=this.input.getAttribute("name")??"",this._formName&&qe()&&this._wrap()}_wrap(){this._required=this.input.required,this.input.required=!1,this._required&&this.input.setAttribute("aria-required","true"),this._control=ze(Co,this.input,()=>this._sync()),this._control.onFormReset=()=>this._reset(),this._control.addEventListener("invalid",this._handleInvalid,{signal:this._events.signal}),this._sync()}_sync(){if(!this._control)return;let t=new FormData;this.value.forEach(e=>t.append(this._formName,e)),this._control.internals.setFormValue(t),this._validate()}_validate(){let t=this._required&&!this._path.length;this._control.internals.setValidity({valueMissing:t},t?this._requiredMessage:"",this.input),t||x(this.input,"aria-invalid",this._saved[Vi.indexOf("aria-invalid")])}get _requiredMessage(){return this.options.i18n.required||zs.i18n.required}_reset(){this.close(),this._path=this._initialPath,this._show(),this._sync()}_giveNameBack(){this._control&&(Ke(this._control,this.input),this._control=null,this.input.required=this._required)}_commit(){let t=!Io(this._open,this._path);this._path=this._open,this._show(),this._sync(),this.close(),this.input.focus(),t&&(this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.dispatchEvent(new Event("change",{bubbles:!0})))}_pick(t){if(this.input.matches(":disabled"))return this.close();let e=this._nodes.get(t);this._choose(this._columns.indexOf(t.parentElement),e),e.children.length||this._commit()}_forward(t){this._nodes.get(t).children.length&&this._enter(t)}_activate(t){this._nodes.get(t).children.length?this._enter(t):this._pick(t)}_enter(t){this._pick(t),this._focus(this._columns.at(-1)?.firstElementChild)}_back(t){let e=this._columns.indexOf(t.parentElement);e>0&&this._focus(this._optionFor(this._open[e-1]))}_dismiss(){this.close(),this.input.focus()}_move(t,e){this._focus(u.focusTarget(Array.from(t.parentElement.children),e,{ArrowDown:1,ArrowUp:-1}))}_keyName(t){return getComputedStyle(this.el).direction==="rtl"?ko[t.key]??t.key:t.key}_show(){this.input.value=this._path.map(t=>t.label).join(Ao)}};vt.key="Expressive_Cascader";var Do={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,origin:{x:.5,y:.5},colors:[],shapes:["square","circle"],scalar:1,manualStart:!1},Po=["primary","secondary","tertiary","primary-container","secondary-container","tertiary-container"],Ro=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],Ws=Math.PI/180,ii=new Map,q=null,si=class si extends b{constructor(t,e){super(t,e);this._onClick=()=>{this.fire()};t instanceof HTMLCanvasElement?this.options.manualStart||this.fire():t.addEventListener("click",this._onClick,{signal:this._events.signal})}static get defaults(){return Do}static fire(t={}){return Wi(Us,document.body,{...si.defaults,...t})}fire(t={}){let e={...this.options,...t};if(this.el instanceof HTMLCanvasElement){let n=this.el;return Wi(()=>n,n.parentElement??document.body,e)}let i=this.el.getBoundingClientRect();return e.origin={x:(i.left+i.width/2)/innerWidth,y:(i.top+i.height/2)/innerHeight},Wi(Us,this.el.parentElement??document.body,e)}destroy(){this.el instanceof HTMLCanvasElement&&Ys(this.el),super.destroy()}};si.key="Expressive_Confetti";var ce=si;function Wi(r,s,t){if(matchMedia("(prefers-reduced-motion: reduce)").matches)return Promise.resolve();let e=r(),i=ii.get(e);if(!i){let d=e.getContext("2d");if(!d)return Promise.resolve();i={ctx:d,pieces:[],frame:0,last:0,done:[],overlay:e===q},ii.set(e,i)}let{width:n,height:o}=Xs(e),a=t.colors.length?t.colors:No(s),l=(t.origin.x??.5)*n,c=(t.origin.y??.5)*o;for(let d=0;d<t.particleCount;d++)i.pieces.push({x:l,y:c,velocity:t.startVelocity*(.5+Math.random()),angle:-t.angle*Ws+(.5-Math.random())*t.spread*Ws,wobble:Math.random()*10,wobbleSpeed:.05+Math.random()*.05,tilt:(.25+Math.random()/2)*Math.PI,tick:0,color:a[d%a.length],shape:t.shapes[Math.floor(Math.random()*t.shapes.length)]??"square",options:t});let h=i;return h.frame||(h.frame=requestAnimationFrame(d=>{h.last=d,js(e,h,d)})),new Promise(d=>h.done.push(d))}function js(r,s,t){let e=Math.min((t-s.last)/16.666666666666668,4);s.last=t;let{width:i,height:n}=Xs(r),{ctx:o}=s,a=r.width/(i||1);o.setTransform(1,0,0,1,0,0),o.clearRect(0,0,r.width,r.height),s.pieces=s.pieces.filter(l=>{let c=l.options;if(l.x+=(Math.cos(l.angle)*l.velocity+c.drift)*e,l.y+=(Math.sin(l.angle)*l.velocity+c.gravity*3)*e,l.velocity*=c.decay**e,l.wobble+=l.wobbleSpeed*e,l.tilt+=.1*e,l.tick+=e,l.tick>=c.ticks)return!1;let h=8*c.scalar;return o.setTransform(a,0,0,a,0,0),o.translate(l.x+10*c.scalar*Math.cos(l.wobble),l.y+10*c.scalar*Math.sin(l.wobble)),o.rotate(l.tilt),o.scale(1,Math.cos(l.wobble)),o.globalAlpha=1-l.tick/c.ticks,o.fillStyle=l.color,o.beginPath(),l.shape==="circle"?o.arc(0,0,h/2,0,2*Math.PI):l.shape==="star"?Fo(o,h*.75):o.rect(-h/2,-h/2,h,h),o.fill(),!0}),s.pieces.length?s.frame=requestAnimationFrame(l=>js(r,s,l)):Ys(r)}function Ys(r){let s=ii.get(r);if(s){cancelAnimationFrame(s.frame),ii.delete(r),s.ctx.setTransform(1,0,0,1,0,0),s.ctx.clearRect(0,0,r.width,r.height),s.overlay&&(r.remove(),q=null);for(let t of s.done)t()}}function Fo(r,s){for(let t=0;t<10;t++){let e=t*Math.PI/5-Math.PI/2,i=t%2?s/2:s;r.lineTo(Math.cos(e)*i,Math.sin(e)*i)}r.closePath()}function Xs(r){let s=r.clientWidth,t=r.clientHeight,e=Math.round(s*devicePixelRatio),i=Math.round(t*devicePixelRatio);return(r.width!==e||r.height!==i)&&(r.width=e,r.height=i),{width:s,height:t}}function Us(){return q?.isConnected||(q=document.createElement("canvas"),q.className="confetti-overlay",q.setAttribute("aria-hidden","true"),Object.assign(q.style,{position:"fixed",inset:"0",width:"100%",height:"100%",margin:"0",padding:"0",border:"0",background:"transparent",pointerEvents:"none",zIndex:"var(--expressive-z-confetti, 10001)"}),document.body.append(q),typeof q.showPopover=="function"&&(q.popover="manual",q.showPopover())),q}function No(r){let s=document.createElement("span");s.hidden=!0,r.append(s);let t=getComputedStyle(s),e=Po.filter(i=>t.getPropertyValue(`--md-sys-color-${i}`).trim()).map(i=>(s.style.color=`var(--md-sys-color-${i})`,getComputedStyle(s).color));return s.remove(),e.length?e:Ro}var Bo={quantity:100,staticity:50,ease:50,size:.4,color:"",vx:0,vy:0},bt=class extends b{constructor(t,e){super(t,e);this._particles=[];this._width=0;this._height=0;this._frame=0;this._last=0;this._mouse={x:0,y:0};this._still=!1;this._visible=!0;this._motion=null;this._theme=null;this._resizeObserver=null;this._visibility=null;this._onMotion=()=>{if(this._still=this._motion.matches,this._still){for(let t of this._particles)t.alpha=t.targetAlpha;this._paint()}this._animate()};this._repaint=()=>{this._still&&this._paint()};this._onPointerMove=t=>{let e=this.el.getBoundingClientRect(),i=t.clientX-e.left-e.width/2,n=t.clientY-e.top-e.height/2;Math.abs(i)<e.width/2&&Math.abs(n)<e.height/2&&(this._mouse={x:i,y:n})};if(this._ctx=this.el.getContext("2d"),!this._ctx)return;this._style=getComputedStyle(this.el),this._motion=matchMedia("(prefers-reduced-motion: reduce)");let{signal:i}=this._events;this._motion.addEventListener("change",this._onMotion,{signal:i}),matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this._repaint,{signal:i}),this._theme=new MutationObserver(this._repaint),this._theme.observe(document.documentElement,{attributes:!0,attributeFilter:["theme"],subtree:!0}),this._still=this._motion.matches,this._reset(),this._resizeObserver=new ResizeObserver(()=>{(this.el.clientWidth!==this._width||this.el.clientHeight!==this._height)&&this._reset()}),this._resizeObserver.observe(this.el),this._visibility=new IntersectionObserver(n=>{this._visible=n[n.length-1].isIntersecting,this._animate()}),this._visibility.observe(this.el)}static get defaults(){return Bo}destroy(){this._stop(),this._theme?.disconnect(),this._resizeObserver?.disconnect(),this._visibility?.disconnect(),this._ctx&&(this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this.el.width,this.el.height)),super.destroy()}_animate(){this._visible&&!this._still?this._start():this._stop()}_start(){this._frame||(window.addEventListener("pointermove",this._onPointerMove,{passive:!0}),this._frame=requestAnimationFrame(t=>{this._last=t,this._draw(t)}))}_stop(){cancelAnimationFrame(this._frame),this._frame=0,window.removeEventListener("pointermove",this._onPointerMove)}_reset(){if(this._width=this.el.clientWidth,this._height=this.el.clientHeight,this.el.width=Math.round(this._width*devicePixelRatio),this.el.height=Math.round(this._height*devicePixelRatio),this._particles=Array.from({length:this.options.quantity},()=>this._particle()),this._still){for(let t of this._particles)t.alpha=t.targetAlpha;this._paint()}}_particle(){return{x:Math.floor(Math.random()*this._width),y:Math.floor(Math.random()*this._height),translateX:0,translateY:0,size:Math.floor(Math.random()*2)+this.options.size,alpha:0,targetAlpha:Math.round((Math.random()*.6+.1)*10)/10,dx:(Math.random()-.5)*.1,dy:(Math.random()-.5)*.1,magnetism:.1+Math.random()*4}}_draw(t){let e=Math.min((t-this._last)/16.666666666666668,4);this._last=t;let{staticity:i,ease:n,vx:o,vy:a}=this.options,l=Math.min(e/n,1);this._particles=this._particles.map(c=>{c.x+=(c.dx+o)*e,c.y+=(c.dy+a)*e,c.translateX+=(this._mouse.x/(i/c.magnetism)-c.translateX)*l,c.translateY+=(this._mouse.y/(i/c.magnetism)-c.translateY)*l;let h=c.x+c.translateX,d=c.y+c.translateY,p=Math.min(h-c.size,this._width-h-c.size,d-c.size,this._height-d-c.size)/20;return c.alpha=p>1?Math.min(c.alpha+.02*e,c.targetAlpha):c.targetAlpha*p,c.x<-c.size||c.x>this._width+c.size||c.y<-c.size||c.y>this._height+c.size?this._particle():c}),this._paint(),this._frame=requestAnimationFrame(c=>this._draw(c))}_paint(){let t=this._ctx,e=devicePixelRatio;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.el.width,this.el.height),t.setTransform(e,0,0,e,0,0),t.fillStyle=this.options.color||this._style.color;for(let i of this._particles)i.alpha<=0||(t.globalAlpha=i.alpha,t.beginPath(),t.arc(i.x+i.translateX,i.y+i.translateY,i.size,0,2*Math.PI),t.fill());t.globalAlpha=1}};bt.key="Expressive_Particles";var $o={onKey:null,i18n:{tooShort:r=>`Use at least ${r} characters.`}},ke=r=>r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement,Ae=new Set,ni=new WeakSet,ri=new WeakMap,Ui=new WeakMap;function qo(r,s){if(!s)return ji(r);r.validity.customError||(r.setCustomValidity(s),Ui.set(r,s))}var ji=r=>{Ui.get(r)===r.validationMessage&&r.setCustomValidity(""),Ui.delete(r)},Gs;function Zs(r){let s=r.target.closest?.("button");if(!s)return null;let t=s.closest(".keypad, .keyboard")?.Expressive_Keypad;if(t)return[t,s];let e=s.dataset.key&&s.closest(".field");if(!e)return null;for(let i of Ae){let n=i.target;if(n&&e.contains(n))return[i,s]}return null}var zo=[["mousedown",r=>{let s=Zs(r);s&&s[0]._root?.activeElement===s[0].target&&r.preventDefault()}],["click",r=>{let s=Zs(r);s&&s[0]._press(s[1])}],["focusin",r=>{ke(r.target)&&ni.add(r.target)}],["input",r=>{ke(r.target)&&ri.get(r.target)?._checkLength(r.target)}],["reset",r=>{for(let s of r.target.elements??[])ke(s)&&ji(s)}],["keydown",r=>Qs(r,!0)],["keyup",r=>Qs(r,!1)]],Ko=["focusin","mousedown","click"];function Qs(r,s){for(let t of Ae)(!s||t.target===r.target)&&t._light(r.key,s)}var Vo=r=>!r.disabled&&(!!r.dataset.key||r.hasAttribute("value")),Wo=(r,s)=>r.dataset.key===s||r.hasAttribute("value")&&r.value.toLowerCase()===s.toLowerCase(),Et=class extends b{constructor(t,e){super(t,e);this._fields=new Set;this._attach=()=>{let t=this.el.getRootNode(),e=t.nodeType===9||t.nodeType===11;if(this._waitForInsertion(!e),!e)return;this._root=t,this._listen("addEventListener");let i=this._root.activeElement;ke(i)&&ni.add(i)};this._root=null,Ae.add(this),this._attach()}_waitForInsertion(t){for(let e of Ko)this.el[t?"addEventListener":"removeEventListener"](e,this._attach)}_listen(t){if(!(!this._root||this._shared()))for(let[e,i]of zo)this._root[t](e,i)}static get defaults(){return $o}destroy(){Ae.delete(this);for(let t of this._fields)ji(t),ri.get(t)===this&&ri.delete(t);this._waitForInsertion(!1),this._listen("removeEventListener"),super.destroy()}get target(){let t=this.el.getAttribute("aria-controls"),e=t?u.getElementById(this.el,t):null;return ke(e)?e:null}_shared(){for(let t of Ae)if(t!==this&&t._root===this._root)return!0;return!1}_press(t){if(!Vo(t))return;let e=this._act(t);this.options.onKey?.(e)}_act(t){let e=t.dataset.key;return e==="Layer"?this._layer(t):e==="Shift"||e==="CapsLock"?this._latch(t,e):this._type(t,e)}_latch(t,e){return t.setAttribute("aria-pressed",String(t.getAttribute("aria-pressed")!=="true")),e}_layer(t){for(let e of this.el.querySelectorAll("[data-layer]"))e.hidden=e.dataset.layer!==t.value;return"Layer"}_type(t,e){let i=e?"":this._case(t.value),n=this._editable;return n&&this._apply(n,e,i),e??i}_case(t){let e=this.el.querySelector('[data-key="Shift"][aria-pressed="true"]');return e?.setAttribute("aria-pressed","false"),e||this.el.querySelector('[data-key="CapsLock"][aria-pressed="true"]')?t.toUpperCase():t}get _editable(){let t=this.target;return t&&!t.matches(":disabled")&&!t.readOnly?t:null}_apply(t,e,i){if(e==="Enter")return this._enter(t);if(e==="Backspace")return this._edit(t,"","deleteContentBackward");i&&this._edit(t,i,"insertText")}_enter(t){t instanceof HTMLInputElement?t.form?.requestSubmit():this._edit(t,`
9
+ `,"insertLineBreak")}_light(t,e){for(let i of this.el.querySelectorAll("button"))Wo(i,t)&&i.classList.toggle("pressed",e)}_checkLength(t){if(t.minLength<1)return;let e=t.value.length>0&&t.value.length<t.minLength;qo(t,e?this.options.i18n.tooShort(t.minLength):"")}_edit(t,e,i){let{value:n}=t,o=t.selectionStart??n.length,a=t.selectionEnd??n.length;if(o===0&&a===0&&!ni.has(t)&&(o=a=n.length),i==="deleteContentBackward"&&o===a&&o){let c=n.slice(Math.max(0,o-64),o);o-=(Gs??(Gs=new Intl.Segmenter)).segment(c).containing(c.length-1).segment.length}if(o===a&&!e||e&&t.maxLength>=0&&n.length-(a-o)+e.length>t.maxLength)return;let l=n.slice(0,o)+e+n.slice(a);if(t.value=l,l&&!t.value){t.value=n;return}t.selectionStart!==null&&t.setSelectionRange(o+e.length,o+e.length),ni.add(t),ri.set(t,this),this._fields.add(t),t.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0,inputType:i,data:e||null}))}};Et.key="Expressive_Keypad";var Uo={onChange:null},oi=r=>Math.min(1,Math.max(0,r));function jo(r,s,t){let e=Math.max(r,s,t),i=e-Math.min(r,s,t);return i?((e===r?(s-t)/i:e===s?(t-r)/i+2:(r-s)/i+4)*60+360)%360:0}function ai(r){let s=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(r.trim());if(!s)return null;let t=s[1].length===3?[...s[1]].map(a=>a+a).join(""):s[1],[e,i,n]=[0,2,4].map(a=>parseInt(t.slice(a,a+2),16)/255),o=Math.max(e,i,n);return{h:jo(e,i,n),s:o?(o-Math.min(e,i,n))/o:0,v:o}}function He({h:r,s,v:t}){let e=i=>{let n=(i+r/60)%6;return t-t*s*Math.max(0,Math.min(n,4-n,1))};return"#"+[5,3,1].map(i=>Math.round(e(i)*255).toString(16).padStart(2,"0")).join("")}var Yo={ArrowRight:[1,0],ArrowLeft:[-1,0],ArrowUp:[0,1],ArrowDown:[0,-1],PageUp:[0,10],PageDown:[0,-10],Home:[-100,0],End:[100,0]},yt=class extends b{constructor(t,e){super(t,e);this._hsv={h:0,s:0,v:0};this._area=null;this._thumb=null;this._hue=null;this._hex=null;this._writing=!1;this._onNativeInput=()=>{if(this._writing||!this.input)return;let t=ai(this.input.value);t&&(this._hsv=t,this._render())};this._onHex=()=>{let t=ai(this._hex.value);t&&He(t)!==this.input.value&&this._set(t),this._hex.value=He(this._hsv)};this._onPointerDown=t=>{if(t.button||this.input.disabled)return;let e=this._area;t.preventDefault(),this._thumb.focus(),e.setPointerCapture(t.pointerId),this._fromPoint(t,!1);let i=l=>this._fromPoint(l,!1),n=R(e),o=l=>{n.abort(),this._fromPoint(l,!0)},{signal:a}=n;e.addEventListener("pointermove",i,{signal:a}),e.addEventListener("pointerup",o,{signal:a}),e.addEventListener("pointercancel",o,{signal:a})};this._onKeyDown=t=>{let e=Yo[t.key];if(!e||this.input.disabled)return;t.preventDefault();let i=t.shiftKey?.1:.01,{s:n,v:o}=this._hsv;this._set({...this._hsv,s:oi(n+e[0]*i),v:oi(o+e[1]*i)})};this.input=t.querySelector(':scope > input[type="color"]'),this.input&&(this._hsv=ai(this.input.value)??this._hsv,this._build(),this.input.addEventListener("input",this._onNativeInput,{signal:this._events.signal}),this._render())}static get defaults(){return Uo}destroy(){for(let t of[this._area,this._hue,this._hex])t?.remove();this._area=this._thumb=this._hue=this._hex=null,this.el.style.removeProperty("--_color-picker-hue"),super.destroy()}get value(){return this.input?.value??""}set value(t){let e=ai(t);!e||!this.input||(this._hsv=e,this._writing=!0,this.input.value=He(e),this._writing=!1,this._render())}_build(){let t=this.input.disabled,e=document.createElement("div");e.className="color-picker-area";let i=document.createElement("div");i.className="color-picker-thumb",i.setAttribute("role","slider"),i.setAttribute("aria-label","Saturation and brightness"),i.setAttribute("aria-valuemin","0"),i.setAttribute("aria-valuemax","100"),i.tabIndex=t?-1:0,t&&i.setAttribute("aria-disabled","true"),e.append(i);let n=document.createElement("input");n.type="range",n.className="color-picker-hue",n.min="0",n.max="359",n.setAttribute("aria-label","Hue"),n.disabled=t;let o=document.createElement("input");o.type="text",o.className="color-picker-hex",o.setAttribute("aria-label","Hex color"),o.autocomplete="off",o.spellcheck=!1,o.maxLength=7,o.disabled=t,this.input.before(e,n),this.input.after(o),this._area=e,this._thumb=i,this._hue=n,this._hex=o,e.addEventListener("pointerdown",this._onPointerDown),i.addEventListener("keydown",this._onKeyDown),n.addEventListener("input",()=>this._set({...this._hsv,h:Number(n.value)},!1)),n.addEventListener("change",()=>this._commit()),o.addEventListener("change",this._onHex),o.addEventListener("keydown",a=>{a.key==="Enter"&&!u.isComposing(a)&&(a.preventDefault(),this._onHex())})}_render(){let{h:t,s:e,v:i}=this._hsv,n=He(this._hsv),o=this._thumb;this.el.style.setProperty("--_color-picker-hue",String(Math.round(t))),o.style.setProperty("--_color-picker-x",String(e)),o.style.setProperty("--_color-picker-y",String(1-i)),o.style.setProperty("--_color-picker-color",n),o.setAttribute("aria-valuenow",String(Math.round(e*100))),o.setAttribute("aria-valuetext",`Saturation ${Math.round(e*100)}%, brightness ${Math.round(i*100)}%`),this._hue.value=String(Math.round(t)),this._hex.value=n}_set(t,e=!0){let i=this.input;this._hsv=t;let n=He(t),o=i.value!==n;this._writing=!0,i.value=n,o&&i.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this._writing=!1,this._render(),e&&this._commit()}_commit(){this.input&&(this._writing=!0,this.input.dispatchEvent(new Event("change",{bubbles:!0})),this._writing=!1,this.options.onChange?.(this.input.value))}_fromPoint(t,e){let i=this._area.getBoundingClientRect(),n=oi((t.clientX-i.left)/i.width),o=1-oi((t.clientY-i.top)/i.height);this._set({...this._hsv,s:n,v:o},e)}};yt.key="Expressive_ColorPicker";var Xo={shortcut:"k",closeOnRun:!0},Go=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform),Js=r=>r.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase(),Tt=class extends b{constructor(t,e){let i=t.dataset.shortcut;super(t,{...i!==void 0?{shortcut:i||null}:{},...e});this._active=null;this._generatedIds=[];this._observer=null;this.open=()=>{this.el.open||this.el.showModal(),this.input?.focus()};this.close=()=>{this.el.open&&this.el.close()};this._handleInput=()=>this._filter();this._handleKeydown=t=>{t.key==="ArrowDown"||t.key==="ArrowUp"?(t.preventDefault(),this._move(t.key==="ArrowDown"?1:-1)):t.key==="Enter"&&!u.isComposing(t)&&this._active&&(t.preventDefault(),this._run(this._active))};this._handleEscape=t=>{t.key!=="Escape"||!this.input.value||u.isComposing(t)||(t.preventDefault(),this.input.value="",this.input.dispatchEvent(new Event("input",{bubbles:!0})))};this._handleListClick=t=>{let e=t.target.closest('[role="option"]');if(!e||!this.list.contains(e)||e.getAttribute("aria-disabled")==="true")return;let i=this._action(e);if(i&&!i.contains(t.target)){i.click();return}this.options.closeOnRun&&this.close()};this._handlePointerMove=t=>{let e=t.target.closest('[role="option"]');e&&this.list.contains(e)&&e.getAttribute("aria-disabled")!=="true"&&this._setActive(e)};this._handleClose=()=>{this.el.open||(this.input.value="",this._filter())};this._handleShortcut=t=>{let{shortcut:e}=this.options;if(!e||t.defaultPrevented||t.altKey||t.shiftKey||!(Go?t.metaKey&&!t.ctrlKey:t.ctrlKey&&!t.metaKey))return;let i=e.toLowerCase(),n=/^[a-z]$/i.test(t.key);(t.key.toLowerCase()===i||!n&&/^[a-z]$/.test(i)&&t.code===`Key${i.toUpperCase()}`)&&(t.preventDefault(),this.el.open?this.close():this.open())};if(this.input=t.querySelector(":scope > input"),this.list=t.querySelector(":scope > :is(ul, ol)"),!this.input||!this.list){console.error("CommandPalette needs an <input> and a <ul> as children of the dialog.");return}this._setupAccessibility(),this._filter(),this._observer=new MutationObserver(()=>this._filter(!0)),this._observer.observe(this.list,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden","disabled"]});let{signal:n}=this._events;this.input.addEventListener("input",this._handleInput,{signal:n}),this.input.addEventListener("keydown",this._handleKeydown,{signal:n}),this.input.addEventListener("keydown",this._handleEscape,{signal:n}),this.list.addEventListener("click",this._handleListClick,{signal:n}),this.list.addEventListener("pointermove",this._handlePointerMove,{signal:n}),this.el.addEventListener("close",this._handleClose,{signal:n}),document.addEventListener("keydown",this._handleShortcut,{signal:n})}static get defaults(){return Xo}get isOpen(){return this.el.open}destroy(){if(this._observer?.disconnect(),this.input&&this.list){for(let e of["role","aria-controls","aria-expanded","aria-autocomplete","aria-activedescendant"])this.input.removeAttribute(e);this.list.removeAttribute("role");for(let e of this._items()){for(let i of["role","aria-selected","aria-disabled","data-filtered"])e.removeAttribute(i);e.classList.remove("active"),this._action(e)?.removeAttribute("tabindex")}for(let e of this._labels())e.removeAttribute("role"),e.removeAttribute("data-filtered");for(let e of this._generatedIds)e.removeAttribute("id");let t=this._empty();t&&(t.hidden=!1)}super.destroy()}_items(){return Array.from(this.list.children).filter(t=>t instanceof HTMLElement&&!t.classList.contains("label"))}_labels(){return Array.from(this.list.querySelectorAll(":scope > .label"))}_empty(){return this.el.querySelector(":scope > .command-palette-empty")}_action(t){return t.querySelector(":scope > :is(a[href], button)")}_ensureId(t,e){return t.id||(t.id=`${e}-${u.guid()}`,this._generatedIds.push(t)),t.id}_setupAccessibility(){this.list.setAttribute("role","listbox"),this.input.setAttribute("role","combobox"),this.input.setAttribute("aria-controls",this._ensureId(this.list,"command-palette-list")),this.input.setAttribute("aria-expanded","true"),this.input.setAttribute("aria-autocomplete","list")}_wireItems(){for(let t of this._items())t.getAttribute("role")!=="option"&&(t.setAttribute("role","option"),this._ensureId(t,"command-palette-option"),this._action(t)?.setAttribute("tabindex","-1"));for(let t of this._labels())t.setAttribute("role","none")}_shown(){return this._items().filter(t=>!t.hidden&&!t.hasAttribute("data-filtered"))}_visible(){return this._shown().filter(t=>t.getAttribute("aria-disabled")!=="true")}_isDisabled(t){let e=this._action(t);return!!e&&(e.matches(":disabled")||e.getAttribute("aria-disabled")==="true")}_setActive(t){this._active!==t&&(this._active?.classList.remove("active"),this._active?.removeAttribute("aria-selected"),this._active=t,t?(t.classList.add("active"),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),t.scrollIntoView({block:"nearest"})):this.input.removeAttribute("aria-activedescendant"))}_filter(t=!1){this._wireItems();let e=Js(this.input.value).split(/\s+/).filter(Boolean);for(let o of this._items()){let a=o.dataset.keywords??this._action(o)?.dataset.keywords??"",l=Js(`${o.textContent} ${a}`);o.toggleAttribute("data-filtered",!e.every(c=>l.includes(c))),this._isDisabled(o)?o.setAttribute("aria-disabled","true"):o.removeAttribute("aria-disabled")}for(let o of this._labels()){let a=o.nextElementSibling,l=!1;for(;a&&!a.classList.contains("label");)!a.hidden&&!a.hasAttribute("data-filtered")&&(l=!0),a=a.nextElementSibling;o.toggleAttribute("data-filtered",!l)}let i=this._visible(),n=this._empty();n&&(n.hidden=this._shown().length>0),this._setActive(t&&i.includes(this._active)?this._active:i[0]??null)}_move(t){let e=this._visible();if(!e.length)return;let i=e.indexOf(this._active);this._setActive(e[(i+t+e.length)%e.length])}_run(t){(this._action(t)??t).click()}};Tt.key="Expressive_CommandPalette";var Zo={progressLabel:"Question {current} of {total}",requiredMessage:"Choose an answer to continue.",summaryLabel:"Review your answers",editLabel:"Edit",skippedLabel:"Not answered"},tn=["previous","skip","next"],Qo=["file","password","hidden"],Jo="abcdefghijklmnopqrstuvwxyz",Ie=r=>r instanceof HTMLInputElement&&(r.type==="radio"||r.type==="checkbox");function ta(r){let s=r.closest("label")?.cloneNode(!0);return s?.querySelectorAll("input, small").forEach(t=>t.remove()),s?.textContent.trim()||r.value}function ea(r){return r instanceof HTMLSelectElement?Array.from(r.selectedOptions,s=>s.text).join(", "):Ie(r)?r.checked?ta(r):"":r.value.trim()}var Yi=r=>r instanceof HTMLSelectElement?Array.from(r.selectedOptions,s=>s.value):Ie(r)?r.checked:r.value,ia=r=>Array.isArray(r?.answers)?r:null;function sa(r,s){if(r instanceof HTMLSelectElement)return na(r,s);Ie(r)?r.checked=s===!0:typeof s=="string"&&(r.value=s)}function na(r,s){if(Array.isArray(s))for(let t of r.options)t.selected=s.includes(t.value)}function ra(r,s){let t=JSON.stringify(Yi(r));sa(r,s),JSON.stringify(Yi(r))!==t&&r.dispatchEvent(new Event("change",{bubbles:!0}))}function oa(r){if(la(r.target)||!u.plainKey(r))return-1;let s="123456789".indexOf(r.key);return s>=0?s:ca(r.key)}var aa='textarea, select, [contenteditable], input:not([type="radio"], [type="checkbox"], [type="button"], [type="submit"], [type="reset"])',la=r=>!!r.matches?.(aa),ca=r=>r.length===1?Jo.indexOf(r.toLowerCase()):-1,Lt=class extends b{constructor(t,e){let i=t.dataset.progressLabel;super(t,{...i?{progressLabel:i}:{},...e});this._active=null;this._generated=[];this._generatedIds=[];this._reporting=!1;this._summary=null;this._reviewing=!1;this.goTo=t=>{let e=this.items[t];if(!e)return;this._active=e,this._reviewing=!1,this._render(),this._save();let i=this._controls(e).filter(n=>!n.disabled);(i.find(n=>n.checked)??i[0])?.focus()};this.next=()=>{this._validate(this._active)&&this._advance()};this.previous=()=>this.goTo(this._reviewing?this.items.length-1:this.index-1);this.review=()=>{this._summary&&(this._fillSummary(this._summary),this._reviewing=!0,this._render(),this._summary.focus())};this.skip=()=>{if(this._active){for(let t of this._controls(this._active)){let e=Ie(t);(e?!t.checked:!t.value)||(e?t.checked=!1:t.value="",t.dispatchEvent(new Event("change",{bubbles:!0})))}this._setInvalid(this._active,!1),this._advance()}};this._save=()=>{let t=this._key;if(!t)return;let e={index:this.index,answers:this._allControls().map(Yi)};try{localStorage.setItem(t,JSON.stringify(e))}catch{}};this._forget=()=>{try{this._key&&localStorage.removeItem(this._key)}catch{}};this._handleClick=t=>{let e=t.target.closest?.("button");if(!(!e||!this._buttons().includes(e))){if(tn.includes(e.value)){t.preventDefault(),this[e.value]();return}this._syncRequired()}};this._handleKeydown=t=>{if(t.key!=="Enter")return this._handleShortcut(t);t.defaultPrevented||u.isComposing(t)||!(t.target instanceof HTMLInputElement)||this._end||(t.preventDefault(),this.next())};this._handleInvalid=t=>{let e=this.items.find(i=>i.contains(t.target));e&&(t.preventDefault(),!this._reporting&&(this._reporting=!0,setTimeout(()=>this._reporting=!1),this._active=e,this._reviewing=!1,this._render(),this._validate(e)))};this._handleInput=t=>{this._syncRequired(),this._save();let e=t.target.closest?.("fieldset");e instanceof HTMLFieldSetElement&&e.classList.contains("invalid")&&this._setInvalid(e,!1)};this._progress=document.createElement("div"),this._progress.className="questionnaire-progress",this._progressText=document.createElement("span"),this._progressText.id=`questionnaire-progress-${u.guid()}`,this._progressBar=document.createElement("progress"),this._progressBar.className="progress",this._progressBar.setAttribute("aria-labelledby",this._progressText.id),this._progress.append(this._progressText,this._progressBar),this.el.prepend(this._progress);for(let o of this._fieldsets()){let a=Array.from(o.querySelectorAll(":scope > p:not(.questionnaire-error)")).map(l=>this._ensureId(l,"questionnaire-description"));a.length&&!o.hasAttribute("aria-describedby")&&(o.setAttribute("aria-describedby",a.join(" ")),this._generatedIds.push(o))}this._active=this.items[0]??null,this._summary=this._createSummary(),this._restore(),this._syncRequired(),this._render(),this._observer=new MutationObserver(()=>{this._syncRequired(),this._render()}),this._observer.observe(this.el,{attributes:!0,subtree:!0,attributeFilter:["disabled"]});let{signal:n}=this._events;this.el.addEventListener("click",this._handleClick,{signal:n}),this.el.addEventListener("keydown",this._handleKeydown,{signal:n}),this.el.addEventListener("input",this._handleInput,{signal:n}),this.el.addEventListener("change",this._save,{signal:n}),this.el.addEventListener("submit",this._forget,{signal:n}),this.el.addEventListener("invalid",this._handleInvalid,{capture:!0,signal:n})}static get defaults(){return Zo}get items(){return this._fieldsets().filter(t=>!t.disabled)}get index(){return this.items.indexOf(this._active)}_advance(){this._summary&&this.index===this.items.length-1?this.review():this.goTo(this.index+1)}destroy(){this._observer.disconnect(),this._summary?.remove();for(let t of this._fieldsets()){if(t.hasAttribute("data-required"))for(let e of this._controls(t))e.setCustomValidity("");t.hidden=!1,this._setInvalid(t,!1)}for(let t of this._buttons())t.hidden=!1;this._progress.remove();for(let t of this._generated)t.remove();for(let t of this._generatedIds)t.removeAttribute(t instanceof HTMLFieldSetElement?"aria-describedby":"id");super.destroy()}_fieldsets(){return Array.from(this.el.querySelectorAll(":scope > fieldset"))}_buttons(){return Array.from(this.el.querySelectorAll(":scope > footer > button")).filter(t=>tn.includes(t.value)||t.type==="submit")}_controls(t){return Array.from(t.elements).filter(e=>e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLInputElement&&e.type!=="button"&&e.type!=="submit")}_required(t){return t.hasAttribute("data-required")||this._controls(t).some(e=>e.required)}_ensureId(t,e){return t.id||(t.id=`${e}-${u.guid()}`,this._generatedIds.push(t)),t.id}_render(){let t=this.items;t.includes(this._active)||(this._active=this._after(t));let e=t.indexOf(this._active);for(let i of this._fieldsets())i.hidden=this._reviewing||i!==this._active;this._summary?.toggleAttribute("hidden",!this._reviewing);for(let i of this._buttons())i.hidden=!this._shows(i,e);this._renderProgress(e,t.length)}_after(t){let e=this._fieldsets();return e.slice(e.indexOf(this._active)+1).find(n=>!n.disabled)??t[t.length-1]??null}get _end(){return this._summary?this._reviewing:this.index===this.items.length-1}_shows(t,e){let i=this._end;return{previous:e>0||this._reviewing,skip:!i&&this._skippable(),next:!i}[t.value]??i}_skippable(){return!!this._active&&!this._required(this._active)}_renderProgress(t,e){this._progressText.textContent=this._reviewing?this.options.summaryLabel:this.options.progressLabel.replace("{current}",String(t+1)).replace("{total}",String(e)),this._progressBar.max=Math.max(e,1),this._progressBar.value=this._reviewing?e:t+1}_createSummary(){if(!this.el.hasAttribute("data-summary"))return null;let t=document.createElement("section");t.className="questionnaire-summary",t.tabIndex=-1,t.setAttribute("aria-label",this.options.summaryLabel),t.hidden=!0,t.addEventListener("click",i=>{let n=i.target.closest("button[data-question]");n&&this.goTo(Number(n.dataset.question))});let e=this.el.querySelector(":scope > footer");return e?e.before(t):this.el.append(t),t}_fillSummary(t){let e=document.createElement("dl");e.append(...this.items.map((i,n)=>{let o=document.createElement("div"),[a,l,c]=[document.createElement("dt"),document.createElement("dd"),document.createElement("dd")];a.id=`questionnaire-summary-${u.guid()}`,a.textContent=i.querySelector(":scope > legend")?.textContent.trim()??"",l.textContent=this._controls(i).map(ea).filter(Boolean).join(", ")||this.options.skippedLabel;let h=document.createElement("button");return Object.assign(h,{type:"button",className:"text",textContent:this.options.editLabel}),h.dataset.question=String(n),h.setAttribute("aria-describedby",a.id),c.append(h),o.append(a,l,c),o})),t.replaceChildren(e)}get _key(){let t=this.el.dataset.save;return t?`questionnaire:${t}`:""}_allControls(){return this._fieldsets().flatMap(t=>this._controls(t)).filter(t=>!Qo.includes(t.type))}_restore(){let t=this._read(),e=this._allControls();t?.answers.length===e.length&&(e.forEach((i,n)=>ra(i,t.answers[n])),this._active=this.items[t.index]??this._active)}_read(){try{return ia(JSON.parse(localStorage.getItem(this._key)??"null"))}catch{return null}}_syncRequired(){for(let t of this._fieldsets()){if(!t.hasAttribute("data-required"))continue;let e=this._controls(t).filter(n=>n instanceof HTMLInputElement&&n.type==="checkbox"),i=e.filter(n=>!n.disabled);for(let n of e)n.setCustomValidity("");if(i.length&&!i.some(n=>n.checked)){let n=t.querySelector(":scope > .questionnaire-error:not([data-generated])");i[0].setCustomValidity(n?.textContent.trim()||this.options.requiredMessage)}}}_invalidControl(t){return this._controls(t).find(e=>e.willValidate&&!e.validity.valid)}_validate(t){this._syncRequired();let e=t&&this._invalidControl(t);if(!e)return!0;let i=t.querySelector(":scope > .questionnaire-error");return i||(i=document.createElement("p"),i.className="questionnaire-error",i.dataset.generated="",i.textContent=e.validationMessage||this.options.requiredMessage,t.append(i),this._generated.push(i)),this._setInvalid(t,!0),e.focus(),!1}_setInvalid(t,e){t.classList.toggle("invalid",e);let i=t.querySelector(":scope > .questionnaire-error"),n=(t.getAttribute("aria-describedby")??"").split(" ").filter(o=>o&&o!==i?.id);e&&i&&n.push(this._ensureId(i,"questionnaire-error")),n.length?t.setAttribute("aria-describedby",n.join(" ")):t.removeAttribute("aria-describedby");for(let o of this._controls(t))e?o.setAttribute("aria-invalid","true"):o.removeAttribute("aria-invalid");!e&&this._generated.includes(i)&&(i.remove(),this._generated.splice(this._generated.indexOf(i),1))}get _shortcuts(){return this.el.hasAttribute("data-shortcuts")&&!!this._active&&!this._reviewing}_handleShortcut(t){if(!this._shortcuts)return;let e=this._controls(this._active).filter(Ie)[oa(t)];!e||e.disabled||(t.preventDefault(),e.click(),e.focus())}};Lt.key="Expressive_Questionnaire";function ha(r){let s=ua(r).map(Me);return s.length===2&&!s.includes(null)?[Math.min(s[0],s[1]),Math.max(s[0],s[1])]:[null,null]}function ua(r){return r?r.dataset.value?.trim().split(/\s+/)??r.textContent.split(/\s*[–—]\s*|\s+(?:-|to)\s+/):[]}var en=(r,s)=>r.base?.[s]??0;function sn(r,s,t,e){return[e(Math.max(r,s),t),100-e(Math.min(r,s),t)]}var W=class extends k{get _type(){return"column-chart"}get _fromZero(){return!0}get _points(){return!1}_arrange(s){let t=this._ranges=s.filter(e=>e.className.split(/\s+/).includes("range"));for(let e of t){let i=this._rows.map(n=>ha(n.cells[e.column]));e.base=i.map(([n])=>n),e.values=e.tops=i.map(([,n])=>n)}super._arrange(s.filter(e=>!t.includes(e)))}_draw(s=this.series){let t=document.createElement("div");t.className="column-chart-columns",t.setAttribute("aria-hidden","true");let e=(o,a=s[0]?.y??this._y)=>Math.min(100,Math.max(0,a(o))),i=this.el.classList.contains("stacked"),n=e(0);return t.style.setProperty("--zero",`${n}%`),this._plot.style.setProperty("--rows",String(this.labels.length)),this.labels.forEach((o,a)=>{let l=document.createElement("div"),c=n;s.forEach(h=>{let d=h.tops[a],p=en(h,a);if(i&&(d===null||p===null))return;let g=document.createElement("span");if(d!==null){g.className=h.className,g.dataset.series=h.color,g.classList.toggle("negative",!h.base&&d<p),g.classList.toggle("floating",this._ranges.includes(h));let[m,E]=sn(p,d,h.y,e);g.style.setProperty("--top",`${m}%`),g.style.setProperty("--bottom",`${E}%`),c=this._start(g,h,a,c,e),this._horizontal&&(g.dataset.text=h.text[a])}l.append(g)}),t.append(l)}),t}_start(s,t,e,i,n){if(!this._before.length)return i;let[o,a]=this._oldInsets(t,e,n)??[i,100-i];return s.style.setProperty("--from-top",`${o}%`),s.style.setProperty("--from-bottom",`${a}%`),this.el.classList.contains("stacked")?o:i}_oldInsets(s,t,e){let i=this._before.find(o=>o.column===s.column),n=i?.tops[t]??null;return n===null?null:sn(en(i,t),n,i.y,e)}};W.key="Expressive_ColumnChart";var wt=class extends W{get _type(){return"bar-chart"}get _horizontal(){return!0}_draw(){let s=super._draw();if(s.className="bar-chart-bars",s.classList.toggle("rtl",getComputedStyle(this.el).direction==="rtl"),!this.el.classList.contains("values"))return s;let t=s.cloneNode(!0);t.classList.replace("bar-chart-bars","bar-chart-values"),t.querySelectorAll("span[data-text]").forEach(i=>{i.textContent=i.dataset.text});let e=document.createElement("div");return e.className="bar-chart-layers",e.append(s,t),e}};wt.key="Expressive_BarChart";var nn=6,j=46,da=1.06,pa=.05,ma=0;function fa(r){let[,s="",t="0"]=/(?:\.(\d+))?(?:e([+-]?\d+))?$/i.exec(r.replace(/[^\d.e+-]/gi,""));return Math.max(0,s.length-Number(t))}function rn(r,s,t){r.sort(([n],[o])=>(n-o)*s);let e=r.map(([n])=>n);t!==void 0&&e.unshift(t);let i=e.length-r.length;r.forEach(([,n],o)=>{let a=e.slice(0,i+o+1).map((l,c)=>`calc(50cqw + ${l} * var(--pie-chart-name-at) + ${(i+o-c)*s} * var(--pie-chart-name-step))`);n.style.setProperty("--pie-chart-name-top",`${s>0?"max":"min"}(${a.join(", ")})`)})}var xt=class extends k{get _type(){return"pie-chart"}get _axis(){return!1}get _points(){return!1}get _circular(){return!0}_read(){super._read();let s=this._small();if(!s)return;let t=this.series[0].values.reduce((n,o,a)=>n+(s[a]?Math.max(0,o):0),0),e=this._written(t,this._rows.filter((n,o)=>s[o]).map(n=>n.cells[1])),i=(n,o)=>[...n.filter((a,l)=>!s[l]),o];this.labels=i(this.labels,this.el.dataset.otherLabel||"Other"),this.series=this.series.map((n,o)=>{let a=i(n.values,o?null:t);return{...n,values:a,tops:a,text:i(n.text,o?"":e)}})}_written(s,t){let e=t.map(o=>o.textContent.trim()),[i,n]=Ri(e[0]);return`${i}${U(this.el,this._precision(e,t)).format(s)}${n}`}_precision(s,t){if(t.some(i=>i.dataset.value))return{notation:"compact",maximumSignificantDigits:3};let e=Math.max(0,...s.map(fa));return e>20?{maximumSignificantDigits:3}:{maximumFractionDigits:e}}_small(){let s=this._number("other"),t=this.series[0]?.values.map(n=>n===null?null:Math.max(0,n));if(!t||!(s>0))return null;let e=t.reduce((n,o)=>n+(o??0),0),i=t.map(n=>n!==null&&n/e*100<s-1e-9);return i.filter(Boolean).length>1?i:null}show(s){if(!this._tooltip||s===this.activeIndex||(super.show(s),this._slices.forEach((n,o)=>n?.classList.toggle("active",o===s)),this._tooltip.hidden))return;let t=this._colors[s];this._tooltip.querySelectorAll("[data-series]").forEach(n=>{t?n.dataset.series=t:delete n.dataset.series});let e=this._share(s),i=this._tooltip.querySelector("span:nth-of-type(2)");e&&i&&(i.textContent+=` (${e})`)}_place(s){let t=(this._turns[s][0]+this._turns[s][1])/2;this._tooltip.style.setProperty("--turn",String(t)),this._tooltip.classList.toggle("end",t<.5)}_share(s){var o;let[t,e]=this._turns[s];if(e<=t)return"";let i=e-t,n=i<.1?1:0;return(o=this._percents??(this._percents=[]))[n]??(o[n]=this._percent(n)),this._percents[n].format(i)}_percent(s){return U(this.el,{style:"percent",maximumFractionDigits:s})}_names(){let s=document.createElement("div");s.className="pie-chart-names";let t=[[],[],[],[]];this._turns.forEach(([e,i],n)=>{if(i<=e)return;let o=(e+i)/2,a=-Math.cos(o*2*Math.PI),l=document.createElement("span");l.dataset.series=this._colors[n],l.style.setProperty("--turn",String(o)),l.classList.toggle("end",o>=.5);let c=document.createElement("span");c.textContent=this.labels[n],l.append(c),s.append(l),t[(o>=.5?2:0)+ +(a>=0)].push([a,l])});for(let e of[0,2])rn(t[e],-1),rn(t[e+1],1,t[e][0]?.[0]);return s}_guides(){this._percents=[];let s=this.series[0].text;return[Ye("pie-chart-legend",this._colors,this.labels.map((t,e)=>[t,s[e],this._share(e)]))]}_indexAt(s){let[t,e]=this._polarAt(s),i=e*100,n=this.el.classList.contains("donut")&&parseFloat(getComputedStyle(this.el).getPropertyValue("--md-comp-pie-chart-hole"))||0;if(i<j*n)return-1;let o=this._turns.findIndex(([a,l])=>a<=t&&t<l);return i>j*(o===this.activeIndex?da:1)?-1:o}_draw(){let s=this.series[0].values.map(m=>Math.max(0,m??0)),t=s.reduce((m,E)=>m+E,0),e=0;this._turns=s.map(m=>[e,e+=t?m/t:0]);let i=this._turns.filter(([m,E])=>E>m),n=0;this._colors=this._turns.map(([m,E])=>{if(E<=m)return;let T=n++;return String(T===i.length-1&&T>0&&T%nn===0?2:T%nn+1)});let o=document.createElement("div");o.className="pie-chart-pie",o.setAttribute("aria-hidden","true");let a=M("svg",{viewBox:"-50 -50 100 100",focusable:"false"}),l=`pie-chart-mask-${++ma}`,c={x:"-50",y:"-50",width:"100",height:"100"},h=M("mask",{id:l,maskUnits:"userSpaceOnUse",...c});h.append(M("rect",{...c,fill:"white"}),M("path",{class:"pie-chart-gaps",stroke:"black",d:i.length>1?i.map(([m])=>`M0,0L${se(m,50)}`).join(""):""}),M("circle",{class:"pie-chart-hole",r:String(j),fill:"black"}));let d=M("g",{mask:`url(#${l})`}),p=`A${j},${j} 0`;this._slices=this._turns.map(([m,E],T)=>{if(E<=m)return null;let C=M("path",{class:"pie-chart-slice","data-series":this._colors[T],d:E-m>=1?`M0,${-j}${p} 1 1 0,${j}${p} 1 1 0,${-j}Z`:`M0,0L${se(m,j)}${p} ${E-m>.5?1:0} 1 ${se(E,j)}Z`});return d.append(C),C}),a.append(h,d),o.append(a,...this._texts());let g=this._total("pie-chart-total");return g&&o.append(g),o}_texts(){let s=[];return this.el.classList.contains("values")&&s.push(this._values()),this.el.classList.contains("labels")&&!this.el.classList.contains("sparkline")&&s.push(this._names()),s}_values(){let s=document.createElement("div");return s.className="pie-chart-values",this._turns.forEach(([t,e],i)=>{if(e-t<pa)return;let n=document.createElement("span");n.dataset.series=this._colors[i],n.style.setProperty("--turn",String((t+e)/2)),n.textContent=this._share(i),s.append(n)}),s}};xt.key="Expressive_PieChart";function _a(r,s){return Math.sign(r)*Math.min(s-1,Math.floor(Math.abs(r)*s))/(s-1)}var Mt=class extends k{get _type(){return"heatmap-chart"}get _axis(){return!1}get _count(){return this.labels.length*this.series.length}update(){let s=this._scroll?.scrollLeft;super.update(),this._scroll&&s&&(this._scroll.scrollLeft=s)}show(s){!this._tooltip||s===this.activeIndex||this._activate(this._cells[s],s)}_activate(s,t){let e=s?this._box(s):null;this._cells[this.activeIndex]?.classList.remove("active"),this.activeIndex=t,this._tooltip.hidden=!e,e&&this._fill(s,t,e)}_box(s){return this._plot.matches(":focus-visible")&&s.scrollIntoView({block:"nearest",inline:"nearest"}),this._measure(s)}_measure(s){let[t,e]=[s.getBoundingClientRect(),this._plot.getBoundingClientRect()];return[t.left-e.left,t.top-e.top,t.width,this._plot.clientWidth]}_follow(s){let t=this._cells[this.activeIndex];if(!t)return;let[e,i]=[s.getBoundingClientRect(),t.getBoundingClientRect()];i.right<=e.left||i.left>=e.right?this.show(-1):this._position(this._measure(t))}_fill(s,t,[e,i,n,o]){s.classList.add("active");let a=this.series.length,[l,c]=[Math.floor(t/a),this.series[t%a]],h=document.createElement("strong");h.textContent=this.labels[l];let[d,p]=[document.createElement("span"),document.createElement("span")];d.textContent=c.name,this._levels[t]===null?d.className="gap":d.style.setProperty("--level",String(this._levels[t])),p.textContent=c.text[l],this._tooltip.replaceChildren(h,d,p),this._position([e,i,n,o])}_position([s,t,e,i]){let n=s+e/2>i/2;this._tooltip.classList.toggle("end",n),this._tooltip.style.left=`${s+(n?0:e)}px`,this._tooltip.style.top=`${t}px`}_keyTarget(s){if(s==="Escape")return this.activeIndex<0?void 0:-1;let[t,e]=[this.series.length,this.labels.length-1],i=Math.max(0,this.activeIndex),[n,o]=[Math.floor(i/t),i%t],[a,l]=this._reversed?["ArrowLeft","ArrowRight"]:["ArrowRight","ArrowLeft"],c={[a]:[n,o+1],[l]:[n,o-1],ArrowDown:[n+1,o],ArrowUp:[n-1,o],Home:[n,0],End:[n,t-1]}[s];if(!c)return;if(this.activeIndex<0)return 0;let h=(d,p)=>Math.min(p,Math.max(0,d));return h(c[0],e)*t+h(c[1],t-1)}_indexAt(s){let[t,e]=[this.series.length,this.labels.length],i=this._cells[0].getBoundingClientRect(),n=this._cells[this._cells.length-1].getBoundingClientRect(),[o,a]=[Math.min(i.left,n.left),Math.max(i.right,n.right)],[l,c]=[s.clientX,s.clientY];if(this._off(l,c,[o,a,i.top,n.bottom]))return-1;let h=(p,g,m)=>Math.min(m-1,Math.floor(p/(g||1)*m)),d=h(l-o,a-o,t);return h(c-i.top,n.bottom-i.top,e)*t+(this._reversed?t-1-d:d)}_off(s,t,[e,i,n,o]){let a=this._scroll.getBoundingClientRect();return s<Math.max(e,a.left)||s>Math.min(i,a.right)||t<n||t>o}_guides(){let s=document.createElement("div");s.className="heatmap-chart-legend",s.setAttribute("aria-hidden","true");let[t,e,i]=["span","span","span"].map(a=>document.createElement(a));[t.textContent,i.textContent]=this._ends,e.className="heatmap-chart-scale",this._reversed&&e.style.setProperty("--heatmap-chart-to","left");let[n,o]=this._endLevels;return e.style.setProperty("--low",String(n)),e.style.setProperty("--high",String(o)),e.classList.toggle("diverging",n<0&&o>0),e.style.setProperty("--mid",`${-n/(o-n||1)*100}%`),e.append(...this._bands().filter(a=>a>=n&&a<=o).map(a=>{let l=document.createElement("span");return l.style.setProperty("--level",String(a)),l})),s.append(t,e,i),[s]}_bands(){let s=this._steps;return s?Array.from({length:2*s-1},(t,e)=>(e-s+1)/(s-1)):[]}get _steps(){let s=Math.round(this._number("steps")??0);return s>1?s:0}_shade(s,t){let e=(h,d)=>this._number(h)??this.options[h]??d,[i,n,o]=[e("min",s),e("max",t),this._number("mid")],a=(h,d)=>Math.min(1,Math.max(d,h)),l=o===null?h=>a((h-i)/(n-i||1),0):h=>a((Math.min(n,Math.max(i,h))-o)/(Math.max(n-o,o-i)||1),-1),c=this._steps;return c?h=>_a(l(h),c):l}_draw(){let s=this.series.length,[t,e]=[1/0,-1/0];this._ends=["",""],this.series.forEach(m=>m.values.forEach((E,T)=>{E!==null&&(E<t&&([t,this._ends[0]]=[E,m.text[T]]),E>e&&([e,this._ends[1]]=[E,m.text[T]]))}));let i=this._shade(t,e);this._endLevels=[i(t),i(e)];let n=document.createElement("div");n.className="heatmap-chart-grid",n.setAttribute("aria-hidden","true"),n.style.setProperty("--columns",String(s)),n.style.setProperty("--rows",String(this.labels.length));let o=(m,E="")=>{let T=document.createElement("span");return T.className=m,T.textContent=E,T},a=m=>m?.dataset.label??m?.textContent.trim()??"",l=this.el.classList.contains("values");this._cells=[],this._levels=[];let[c,h]=[document.createElement("div"),document.createElement("div")];c.className="heatmap-chart-rows",h.className="heatmap-chart-cells",this.labels.forEach((m,E)=>{c.append(o("heatmap-chart-row",a(this._rows[E].cells[0]))),this.series.forEach(T=>{let C=T.values[E],_=C===null?null:i(C),L=o("heatmap-chart-cell",l?T.text[E]:"");_===null?L.classList.add("gap"):L.style.setProperty("--level",String(_)),this._cells.push(L),this._levels.push(_),h.append(L)})});let d=this._header.slice(1,s+1).map(a),p=[];d.forEach((m,E)=>{if(!m)return;let T=E+1;for(;T<s&&!d[T];)T++;let C=o("heatmap-chart-column",m);C.classList.toggle("run",T>E+1),C.style.gridArea=`${this.labels.length+1} / ${E+1} / auto / ${T+1}`,h.append(C),p.push(C)}),this._observeLabels(h,p.some(m=>m.classList.contains("run"))?[]:p);let g=this._scroll=document.createElement("div");return g.className="heatmap-chart-scroll",g.tabIndex=-1,g.addEventListener("focus",()=>this._plot.focus()),g.addEventListener("scroll",()=>this._follow(g),{passive:!0}),g.append(h),n.append(c,g),n}};Mt.key="Expressive_HeatmapChart";var on=4;function ga(r){let s=[[]];return r.forEach((t,e)=>t===null?s.push([]):s[s.length-1].push(e)),s.length>1&&(s[0]=[...s.pop(),...s[0]]),s.filter(t=>t.length)}var an=r=>`M${r.join("L")}Z`,va=r=>`M${r.join("L")}${r.length>1?"":"h0"}`,ba=r=>`M0,0L${r.join("L")}Z`,Ct=class extends k{get _type(){return"radar-chart"}get _fromZero(){return!0}get _circular(){return!0}_place(s){for(let e of this._cursor.children)e.style.top=`${Math.min(100,Math.max(0,parseFloat(e.style.top)))}%`;let t=this._turn(s);this._cursor.style.setProperty("--turn",String(t)),this._tooltip.style.setProperty("--turn",String(t)),this._tooltip.classList.toggle("end",t>0&&t<.5)}_turn(s){return s/this.labels.length}_guides(){return this._legend()}_indexAt(s){let[t]=this._polarAt(s);return Math.round(t*this.labels.length)%this.labels.length}_rings(s){return this._axis?this.series[0].scale.ticks.filter(t=>t>0).map(s):Array.from({length:on},(t,e)=>(e+1)/on)}_series(s,t){let e=M("g",{class:`radar-chart-series ${s.className}`.trim(),"data-series":s.color}),i=ga(s.values).map(l=>l.map(t)),[n,o]=s.values.includes(null)?[va,ba]:[an,an];e.append(M("path",{class:"radar-chart-shape",d:i.map(n).join("")}));let a=this.el.classList;return a.contains("area")&&e.append(M("path",{class:"radar-chart-area",d:i.map(o).join("")})),a.contains("points")&&e.append(M("path",{class:"radar-chart-points",d:i.flat().map(l=>`M${l}h0`).join("")})),e}_draw(){let s=(l,c)=>se(this._turn(l),50*c),t=l=>Math.min(1,Math.max(0,1-this._y(l)/100)),e=this.labels.map((l,c)=>c),i=l=>`M${e.map(c=>s(c,l)).join("L")}Z`,n=M("svg",{viewBox:"-50 -50 100 100","aria-hidden":"true",focusable:"false"});n.append(M("path",{class:"radar-chart-grid",d:this._rings(t).map(i).join("")+e.map(l=>`M0,0L${s(l,1)}`).join("")})),this.series.forEach(l=>n.append(this._series(l,c=>s(c,t(l.values[c])))));let o=document.createElement("ol");o.className="radar-chart-axes",o.setAttribute("aria-hidden","true"),this.labels.forEach((l,c)=>{let h=document.createElement("li");h.textContent=l,h.style.setProperty("--turn",String(this._turn(c))),o.append(h)});let a=document.createElement("div");return a.className="radar-chart-web",a.append(n,o),a}};Ct.key="Expressive_RadarChart";var ln=46,Ea=.8,St=class extends k{get _type(){return"radial-chart"}get _axis(){return!1}get _points(){return!1}get _circular(){return!0}get _gauge(){return this.el.classList.contains("gauge")}get _labeled(){let s=this.el.classList;return s.contains("labels")&&!s.contains("sparkline")}get _span(){return this._gauge?.5:this._labeled?.75:1}get _segments(){let s=Math.round(this._number("segments")??0);return s>1?s:0}_lit(s){let t=this._segments;return t?Math.round(s*t)/t:s}_dash(s,t,e){let[i,n,o]=[e?this._width:0,this._segments,this._span*t];if(!n)return`${Math.max(.001,s*o-i).toFixed(3)} ${t.toFixed(3)}`;let a=o/n,l=Math.max(.001,a-this._gap-i);return`${Array.from({length:Math.round(s*n)},()=>`${l.toFixed(3)} ${(a-l).toFixed(3)}`).join(" ").replace(/ [\d.]+$/,"")||0} ${t.toFixed(3)}`}get _step(){return this._radii.length>1?this._radii[0]-this._radii[1]:this._width}show(s){if(!this._tooltip||s===this.activeIndex||(super.show(s),this._rings.forEach((e,i)=>e.classList.toggle("active",i===s)),this._sweeps.forEach((e,i)=>e?.classList.toggle("active",i===s)),this._tooltip.hidden))return;let t=ne(s);this._tooltip.querySelectorAll("[data-series]").forEach(e=>{e.dataset.series=t})}_place(s){let t=this._turn(this._fractions[s]),e=this._radii[s],[i,n]=[e*Math.sin(t*2*Math.PI),-e*Math.cos(t*2*Math.PI)];this._tooltip.style.left=`${50+i}%`,this._tooltip.style.top=`${(50+n)/(this._gauge?50:100)*100}%`,this._tooltip.classList.toggle("end",i>0)}_turn(s){return s*this._span-(this._gauge?.25:0)}_guides(){if(this.labels.length<2)return[];let s=this.series[0].text,t=this.labels.map((e,i)=>ne(i));return[Ye("radial-chart-legend",t,this.labels.map((e,i)=>[e,s[i]]))]}_indexAt(s){let t=this._plot.getBoundingClientRect(),[e,i]=[s.clientX-t.left-t.width/2,s.clientY-t.top-t.width/2];if(this._gauge&&i>0)return this._nameAt(s);let n=this._distance(e,i,t.width);return this._radii.findIndex(o=>Math.abs(n-o)<=this._step/2)}_distance(s,t,e){return this._span===.75&&s<0&&t<0?-t/e*100:Math.hypot(s,t)/e*100}_nameAt(s){let t=s.target.closest(".radial-chart-names > span");return t?[...t.parentElement.children].indexOf(t):-1}get _frame(){return this._gauge?["rotate(180)","-50 -50 100 50"]:["rotate(-90)","-50 -50 100 100"]}_sweep(s,t,e){let i=this._fractions[t];if(!i||!this.el.classList.contains("gradient"))return null;let[n,o]=this._frame,a=this._width.toFixed(3),l=this._dash(i,e,!0),c=`<svg xmlns='http://www.w3.org/2000/svg' viewBox='${o}'><circle r='${s.toFixed(3)}' stroke-width='${a}' transform='${n}' stroke-dasharray='${l}' stroke-dashoffset='${(-this._width/2).toFixed(3)}' stroke-linecap='round' fill='none' stroke='black'/></svg>`,h=document.createElement("div");return h.className="radial-chart-sweep",h.dataset.series=ne(t),h.style.setProperty("--radial-chart-shape",`url("data:image/svg+xml,${encodeURIComponent(c)}")`),h.style.setProperty("--radial-chart-from",`${this._turn(0)}turn`),h.style.setProperty("--radial-chart-to",`${i*this._span}turn`),h}_names(){if(!this._labeled)return[];let s=this._radii.length,t=document.createElement("div");return t.className="radial-chart-names",t.style.setProperty("--radial-chart-step",this._step.toFixed(3)),this._plot.style.setProperty("--radial-chart-rows",String(s)),t.append(...this._radii.map((e,i)=>{let n=document.createElement("span");return n.style.setProperty("--radial-chart-at",`${(50-e).toFixed(3)}%`),n.style.setProperty("--radial-chart-row",String(s-1-i)),n.textContent=this.labels[i],n})),[t]}_draw(){let s=getComputedStyle(this.el),t=(m,E)=>{let T=parseFloat(s.getPropertyValue(`--md-comp-radial-chart-${m}`));return Number.isFinite(T)?T:E},e=this.labels.length,[i,n]=[Math.max(0,t("thickness",8)),Math.max(0,t("gap",2))],o=Math.min(1,ln*Ea/(e*i+(e-1)*n||1));[i,n]=[i*o,n*o],[this._width,this._gap]=[i,n],this._radii=this.labels.map((m,E)=>ln-i/2-E*(i+n));let a=[parseFloat(this.el.dataset.max??""),this.options.max??NaN,100].find(m=>m>0);this._fractions=this.series[0].values.map(m=>this._lit(Math.min(1,Math.max(0,(m??0)/a))));let[l,c]=this._frame,h=M("svg",{viewBox:c,focusable:"false"}),d=this._span;this._sweeps=[],this._rings=this._radii.map((m,E)=>{let T=2*Math.PI*m,C=(L,S,P)=>{let N=M("circle",{class:L,r:m.toFixed(3),transform:l,"stroke-width":i.toFixed(3)});return N.style.setProperty("--radial-chart-dash",this._dash(S,T,P)),P&&(N.style.setProperty("--radial-chart-offset",(-i/2).toFixed(3)),N.classList.add("capped")),N},_=C("radial-chart-ring",this._fractions[E],!0);return _.dataset.series=ne(E),this._fractions[E]||_.classList.add("empty"),h.append(C("radial-chart-track",1,d<1||!!this._segments),_),this._sweeps.push(this._sweep(m,E,T)),_});let p=document.createElement("div");p.className="radial-chart-rings",p.setAttribute("aria-hidden","true"),p.style.setProperty("--radial-chart-middle",`${(this._radii[e-1]-this._width/2)*2}%`),p.append(h,...this._sweeps.filter(m=>m!==null),...this._names());let g=this._total("radial-chart-total");return g&&p.append(g),p}};St.key="Expressive_RadialChart";function ya(r,s,t){let e=Xe(s-r,t);for(;Math.floor(r/e)*e+t*e<s;)e=Xe(e*t*1.001,t);return[Math.floor(r/e)*e,e]}var kt=(r,s)=>r.className.split(/\s+/).includes(s),At=class extends W{get _type(){return"mixed-chart"}get _points(){return!0}_stack(s){let t=s.filter(e=>kt(e,"column"));super._stack(t.filter(e=>!kt(e,"end"))),super._stack(t.filter(e=>kt(e,"end")))}_scale(s,t,e){let i=s.filter(c=>kt(c,"end")),n=s.filter(c=>!i.includes(c)),o=c=>c.some(h=>kt(h,"column")),a=[this._number("endMin"),this._number("endMax")],l=super._scale(n,t,e,o(n));return super._scale(i,...a,o(i)),[t,e,...a].every(c=>c===null)&&this._align(n,i),l}_align(s,t){let e=s.length?s[0].scale.ticks.length-1:0;if(e<1||!t.length)return;let[i,n]=ya(t[0].scale.min,t[0].scale.max,e),o=i+e*n;this._apply(t,{min:i,max:o,ticks:Di(i,o,n)})}_draw(){let s=document.createElement("div");s.className="mixed-chart-marks";let t=super._draw(this.series.filter(e=>kt(e,"column")));return t.className="mixed-chart-columns",s.append(t,k.prototype._draw.call(this,this.series.filter(e=>!kt(e,"column")))),s}};At.key="Expressive_MixedChart";var cn=r=>r.map(({x:s,y:t})=>`M${s},${t}h0`).join(""),Xi=({row:r,series:s})=>`${r} ${s.column}`,li=r=>Object.assign(document.createElement("span"),{textContent:r}),Ta=r=>parseFloat(r)*(r.trim().endsWith("ms")?1:1e3);function La(r,s,t,e){r.style.setProperty("--scatter-chart-size",`${s}`),!(!e||!t||t.size===s)&&r.animate({"--scatter-chart-size":[`${t.size}`,`${s}`]},{duration:Ta(e.dur),easing:`cubic-bezier(${e.keySplines})`})}var Ht=class extends k{get _type(){return"scatter-chart"}get _seriesFrom(){return 2}get _seriesTo(){return this._bubble?-1:void 0}get _bubble(){return this.el.classList.contains("bubble")}static get defaults(){return{...k.defaults,xMin:null,xMax:null}}_arrange(s){let t=this._xs=this._rows.map(i=>lt(i.cells[1])),e=this._sizes=this._rows.map(i=>this._size(i));for(let i of s)i.values=i.tops=i.values.map((n,o)=>t[o]===null||e[o]===null?null:n)}_size(s){if(!this._bubble)return 1;let t=lt(s.cells[this._header.length-1])??0;return t>0?t:null}get _count(){return this._marks?.length??0}show(s){if(!this._tooltip||s===this.activeIndex)return;this.activeIndex=s;let t=this._marks[s];this._cursor.hidden=this._tooltip.hidden=!t,t&&this._fill(t)}_fill({row:s,series:t,x:e,y:i,size:n}){this._cursor.dataset.series=t.color,this._cursor.style.setProperty("--scatter-chart-size",`${n}`);for(let c of[this._cursor,this._tooltip])Object.assign(c.style,{left:`${e}%`,top:`${i}%`});this._tooltip.classList.toggle("end",e>50);let[o,a]=[document.createElement("strong"),li(t.name)];o.textContent=this.labels[s],a.dataset.series=t.color;let l=this._bubble?this._cellText(s,this._header.length-1):[];this._tooltip.replaceChildren(o,...this._cellText(s,1),a,li(t.text[s]),...l)}_cellText(s,t){let e=li(this._header[t].textContent.trim());return e.className="x",[e,li(this._rows[s].cells[t]?.textContent.trim()??"")]}_indexAt(s){let[t,e]=[this._plot,this._plot.getBoundingClientRect()],i=({x:n,y:o})=>Math.hypot(e.left+t.clientLeft+n/100*t.clientWidth-s.clientX,e.top+t.clientTop+o/100*t.clientHeight-s.clientY);return this._marks.reduce((n,o,a)=>n<0||i(o)<i(this._marks[n])?a:n,-1)}_keyTarget(s){if(s==="Escape")return this.activeIndex<0?void 0:-1;let t=this._marks.length-1,e={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[s];return e?Math.min(t,Math.max(0,this.activeIndex+e)):{Home:0,End:t}[s]}_read(){[this._drawn,this._marks]=[this._marks??[],[]],super._read(),this.series.length&&(this._xFit=this._xScale(),this._xAffix=Fi(this._rows.map(s=>s.cells[1])))}_xScale(){let[s,t]=this._xRange(),[e,i]=[this._xEnd("xMin"),this._xEnd("xMax")];return this._fit(e??s,i??t,[e!==null,i!==null])}_xRange(){let s=this._xs.filter((n,o)=>this._hasPoint(o));if(!s.length)return[-1,1];let[t,e]=[s.reduce((n,o)=>Math.min(n,o)),s.reduce((n,o)=>Math.max(n,o))],i=(e-t)*.1||1;return[t-i,e+i]}_xEnd(s){return this._number(s)??this.options[s]??null}_xAt(s){let{min:t,max:e}=this._xFit,i=(s-t)/(e-t||1)*100;return this._reversed?100-i:i}_hasPoint(s){return this.series.some(t=>t.values[s]!==null)}_layout(){let s=this._sizes.reduce((t,e,i)=>this._hasPoint(i)?Math.max(t,e):t,0);return this.labels.flatMap((t,e)=>this.series.filter(i=>i.values[e]!==null).map(i=>({row:e,series:i,x:this._xAt(this._xs[e]),y:i.y(i.values[e]),size:Math.sqrt(this._sizes[e]/s)})))}_draw(){this._marks=this._layout();let s=M("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true",focusable:"false"}),t=this._before.length?we(this.el):null,e=new Map(this._drawn.map(i=>[Xi(i),i]));return s.append(...this.series.map(i=>this._group(i,t,e))),s}_group(s,t,e){let i=M("g",{class:`scatter-chart-series ${s.className}`.trim(),"data-series":s.color}),n=this._marks.filter(a=>a.series===s),o=this._bubble?n.sort((a,l)=>l.size-a.size).map(a=>[a]):[n];return i.append(...o.map(a=>this._pointPath(a,t,e))),i}_pointPath(s,t,e){let i=M("path",{class:"scatter-chart-points",d:cn(s)});return t&&xe(i,cn(s.map(n=>e.get(Xi(n))??n)),t),this._bubble&&La(i,s[0].size,e.get(Xi(s[0])),t),i}_axes(){return this._axis?[...super._axes(),this._xAxis()]:[]}_xAxis(){let s=document.createElement("ol");s.className="scatter-chart-axis x",s.setAttribute("aria-hidden","true");let t=U(this.el,{notation:"compact",maximumSignificantDigits:3});for(let e of this._xFit.ticks){let i=document.createElement("li"),n=document.createElement("span");n.textContent=Pi(t,e,this._xAffix),i.style.setProperty("--at",`${this._xAt(e)}%`),i.append(n),s.append(i)}return s}_guides(){return this._legend()}};Ht.key="Expressive_ScatterChart";function hn(r){let s=r.reduce((t,e)=>Math.max(t,e??0),0);return r.map(t=>t>0?t/s*100:null)}function wa(r,s){let t=document.createElement("span");return t.dataset.series="1",t.style.setProperty("--width",String(r)),s!=null&&t.style.setProperty("--from-width",String(s)),t}var It=class extends k{get _type(){return"funnel-chart"}get _horizontal(){return!0}get _axis(){return!1}get _points(){return!1}_read(){super._read();for(let s of this.series)s.color="1"}show(s){!this._tooltip||s===this.activeIndex||(super.show(s),this._addShare(s))}_addShare(s){let t=this._share(s),e=this._tooltip.querySelector("span:nth-of-type(2)");t&&e&&(e.textContent+=` (${t})`)}_share(s){let t=this.series[0].values,[e,i]=[t[0],t[s]];if(!(e>0&&i>0))return"";let n=i/e;return U(this.el,{style:"percent",maximumFractionDigits:n<.1?1:0}).format(n)}_legend(){return[]}_draw(){let s=document.createElement("div");s.className="funnel-chart-stages",s.setAttribute("aria-hidden","true"),this._plot.style.setProperty("--rows",String(this.labels.length));let t=hn(this._before[0]?.values??[]);return hn(this.series[0].values).forEach((e,i)=>{let n=document.createElement("div");e!==null&&n.append(wa(e,t[i])),s.append(n)}),s}};It.key="Expressive_FunnelChart";var Oe=2,xa=4,Ma=6,he=r=>Object.assign(document.createElement("span"),{textContent:r}),Gi=(r,s)=>r.cells[s]?.textContent.trim()??"",un=r=>r.reduce((s,t)=>s+t.value,0);function Ca(r,s){let[t,e,i]=[Gi(r,0),Gi(r,1),Number(lt(r.cells[2]))];return t&&e&&i>0?{row:s,source:t,target:e,value:i}:null}function dn(r,s,t,e=new Set){return s===t?!0:(e.add(s),r.some(i=>i.source===s&&!e.has(i.target)&&dn(r,i.target,t,e)))}function Sa(r){let s=[];return r.forEach((t,e)=>{let i=Ca(t,e);i&&!dn(s,i.target,i.source)&&s.push(i)}),s}function pn(r,s,t){if(!t.has(r)){let e=s.filter(i=>i.target===r).map(i=>pn(i.source,s,t)+1);t.set(r,Math.max(0,...e))}return t.get(r)}function ka(r){let s=new Map;return[...new Set(r.flatMap(t=>[t.source,t.target]))].map((t,e)=>({name:t,color:String(e%Ma+1),column:pn(t,r,s),size:Math.max(un(r.filter(i=>i.target===t)),un(r.filter(i=>i.source===t))),x:0,top:0,height:0}))}function Aa(r){let s=Math.max(...r.map(a=>a.column))+1,t=Array.from({length:s},(a,l)=>r.filter(c=>c.column===l)),e=Math.min(xa,50/Math.max(...t.map(a=>a.length))),i=a=>100-(a.length-1)*e,n=a=>a.reduce((l,c)=>l+c.size,0),o=Math.min(...t.map(a=>i(a)/n(a)));return t.forEach((a,l)=>{let c=(i(a)-n(a)*o)/2;for(let h of a)Object.assign(h,{x:l/(s-1)*(100-Oe),top:c,height:h.size*o}),c+=h.height+e}),o}function Ha(r,s,t){let e=new Map(s.map(a=>[a.name,a])),[i,n]=[new Map,new Map],o=(a,l,c)=>{let h=l.top+(a.get(l)??0);return a.set(l,h-l.top+c),h};return r.map(a=>{let[l,c,h]=[e.get(a.source),e.get(a.target),a.value*t];return{flow:a,source:l,target:c,from:o(i,l,h),to:o(n,c,h),size:h}})}var Ot=class extends k{get _type(){return"sankey-chart"}get _seriesFrom(){return 2}get _seriesTo(){return 3}get _axis(){return!1}get _count(){return this._links?.length??0}show(s){if(!this._tooltip||s===this.activeIndex)return;this.activeIndex=s;let t=this._links[s];this._paths.forEach((e,i)=>e.classList.toggle("active",i===s)),this._tooltip.hidden=!t,t&&this._fill(t)}_fill({flow:s,source:t,target:e,from:i,to:n,size:o}){let a=this._across((t.x+Oe+e.x)/2);Object.assign(this._tooltip.style,{left:`${a}%`,top:`${(i+n+o)/2}%`}),this._tooltip.classList.toggle("end",a>50);let l=this._header.map(p=>p.textContent.trim()),[c,h,d]=[he(l[0]),he(l[1]),he(l[2])];c.dataset.series=t.color,h.dataset.series=e.color,d.className="value",this._tooltip.replaceChildren(c,he(t.name),h,he(e.name),d,he(Gi(this._rows[s.row],2)))}_indexAt(s){let e=this.el.getRootNode().elementsFromPoint(s.clientX,s.clientY).find(i=>this._paths.includes(i));return this._paths.indexOf(e)}_keyTarget(s){if(s==="Escape")return this.activeIndex<0?void 0:-1;let t=this._links.length-1,e={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[s];return e?Math.min(t,Math.max(0,this.activeIndex+e)):{Home:0,End:t}[s]}_read(){super._read();let s=Sa(this._rows);if(!s.length){[this.series,this._nodes,this._links]=[[],[],[]];return}this._nodes=ka(s),this._links=Ha(s,this._nodes,Aa(this._nodes))}_across(s){return this._reversed?100-s:s}_nodePath({x:s,top:t,height:e}){let[i,n]=[this._across(s),this._across(s+Oe)];return`M${i},${t}H${n}V${t+e}H${i}Z`}_linkPath({source:s,target:t,from:e,to:i,size:n}){let[o,a]=[s.x+Oe,t.x],[l,c,h]=[this._across(o),this._across((o+a)/2),this._across(a)];return`M${l},${e}C${c},${e} ${c},${i} ${h},${i}V${i+n}C${c},${i+n} ${c},${e+n} ${l},${e+n}Z`}_draw(){let s=M("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true",focusable:"false"}),[t,e]=[this._shapes??new Map,this._before.length?we(this.el):null];this._shapes=new Map;let i=(o,a,l,c)=>{let h=M("path",{class:o,"data-series":l,d:c});return e&&t.has(a)&&xe(h,t.get(a),e),this._shapes.set(a,c),h};this._paths=this._links.map(o=>i("sankey-chart-link",JSON.stringify([o.source.name,o.target.name]),o.source.color,this._linkPath(o)));let n=this._nodes.map(o=>i("sankey-chart-node",JSON.stringify(o.name),o.color,this._nodePath(o)));return s.append(...this._paths,...n),s}_axes(){let s=document.createElement("div");s.className="sankey-chart-names",s.setAttribute("aria-hidden","true");let t=Math.max(...this._nodes.map(e=>e.column));return s.append(...this._nodes.map(e=>this._name(e,e.column===t))),[s]}_name({name:s,x:t,top:e,height:i},n){let o=document.createElement("span");return o.className=n?"sankey-chart-name end":"sankey-chart-name",o.textContent=s,o.style.setProperty("--sankey-chart-x",`${n?t:t+Oe}%`),o.style.setProperty("--sankey-chart-y",`${e+i/2}%`),o}_guides(){return[]}};Ot.key="Expressive_SankeyChart";var Ia=6,Oa=["ArrowRight","ArrowDown"],Da=["ArrowLeft","ArrowUp"],ci=r=>r.reduce((s,t)=>s+t,0),Zi=([r,s,t,e])=>[s,r,e,t];function mn(r,s){let[t,e]=[ci(r)**2,s**2];return Math.max(...r.map(i=>Math.max(e*i/t,t/(e*i))))}function Qi(r,s){if(s[2]<s[3]){let[c,h]=Qi(r,Zi(s));return[c.map(Zi),Zi(h)]}let[t,e,i,n]=s,o=ci(r)/n,a=e;return[r.map(c=>{let h=[t,a,o,c/o];return a+=c/o,h}),[t+o,e,i-o,n]]}function Pa(r,s){let t=[],e=[];for(let i of r){let n=Math.min(s[2],s[3]);if(e.length&&mn([...e,i],n)>mn(e,n)){let[o,a]=Qi(e,s);t.push(...o),[s,e]=[a,[]]}e.push(i)}return[...t,...Qi(e,s)[0]]}var Ra=([r,s,t,e],i,n)=>i>=r&&i<r+t&&n>=s&&n<s+e,Fa=(r,s)=>r+s/2>.5?{top:"auto",bottom:`${(1-r-s)*100}%`}:{top:`${r*100}%`,bottom:"auto"},Dt=class extends k{get _type(){return"treemap-chart"}get _axis(){return!1}get _points(){return!1}show(s){let t=this._drawnFrom(s);!this._tooltip||t===this.activeIndex||(this._boxes.forEach((e,i)=>e?.classList.toggle("active",i===t)),super.show(t),this._share(t))}_drawnFrom(s){return s<0?s:this._boxes.findIndex((t,e)=>e>=s&&t)}_share(s){if(s<0)return;let t=this._values[s]/ci(this._values),e=U(this.el,{style:"percent",maximumFractionDigits:t<.1?1:0});this._tooltip.querySelector("span:nth-of-type(2)").textContent+=` (${e.format(t)})`}_place(s){let[t,e,i,n]=this._places[s],o=t+i/2,a=this._reversed?1-o:o;Object.assign(this._tooltip.style,{left:`${a*100}%`,...Fa(e,n)}),this._tooltip.classList.toggle("end",a>.5)}_indexAt(s){let t=this._plot.getBoundingClientRect(),e=(s.clientX-t.left)/t.width,[i,n]=[this._reversed?1-e:e,(s.clientY-t.top)/t.height];return this._places.findIndex(o=>o&&Ra(o,i,n))}_keyTarget(s){let t=this._boxes.flatMap((o,a)=>o?[a]:[]),[e,i]=[t.indexOf(this.activeIndex),t.length-1],n=Oa.includes(s)?Math.min(e+1,i):Da.includes(s)?Math.max(e-1,0):{Home:0,End:i}[s];return n===void 0?super._keyTarget(s):t[n]}destroy(){this._sizes?.disconnect(),super.destroy()}_guides(){return[]}_draw(){this._values=this.series[0].values.map(e=>Math.max(0,e??0));let s=document.createElement("div");s.className="treemap-chart-boxes",s.setAttribute("aria-hidden","true");let t=0;return this._boxes=this._values.map((e,i)=>{if(!e)return null;let n=document.createElement("div");n.className="treemap-chart-box",n.dataset.series=String(t++%Ia+1);let[o,a]=[document.createElement("span"),document.createElement("span")];return[o.textContent,a.textContent]=[this.labels[i],this.series[0].text[i]],n.append(o,a),s.append(n),n}),this.el.append(this._plot),this._layout(),this._sizes?.disconnect(),this._sizes=new ResizeObserver(()=>this._layout()),this._sizes.observe(this._plot),s}_layout(){let[s,t]=[this._plot.clientWidth||1,this._plot.clientHeight||1],e=this._values.map((o,a)=>a).filter(o=>this._values[o]).sort((o,a)=>this._values[a]-this._values[o]),i=s*t/ci(this._values),n=Pa(e.map(o=>this._values[o]*i),[0,0,s,t]);this._places=[],e.forEach((o,a)=>{let[l,c,h,d]=n[a],p=this._places[o]=[l/s,c/t,h/s,d/t];Object.assign(this._boxes[o].style,{insetInlineStart:`${p[0]*100}%`,top:`${p[1]*100}%`,width:`${p[2]*100}%`,height:`${p[3]*100}%`})})}};Dt.key="Expressive_TreemapChart";var Na={classes:"",menuOptions:{},searchable:!1,i18n:{searchLabel:"Search options",noResults:"No results"}},De=class De extends b{constructor(t,e){super(t,e);this._originalLabels=new Map;this._validationMessage=null;this._handleSelectChange=()=>{this._setValueToInput(),this._setSelectedStates(),this._syncValidationError()};this._handleInvalid=t=>{t.defaultPrevented||(this._validationMessage||(this._validationMessage=document.createElement("small"),this._validationMessage.id=this.input.id+"-error",this._validationMessage.className="supporting-text",this._validationMessage.style.color="var(--md-sys-color-error)",this.wrapper.append(this._validationMessage),this.input.setAttribute("aria-describedby",[this.input.getAttribute("aria-describedby"),this._validationMessage.id].filter(Boolean).join(" "))),this.input.ariaInvalid="true",this._syncValidationError())};this._handleNativeFocus=()=>queueMicrotask(()=>{this.constructor.getInstance(this.el)===this&&this.el.matches(":focus")&&this.input.focus()});this._handleReset=t=>{clearTimeout(this._resetTimer),this._resetTimer=setTimeout(()=>{t.defaultPrevented||(this._resetSearch(),this._handleSelectChange(),this._clearValidationError())},0)};this._handleOptionKeydown=t=>{(t.key===" "||t.key==="Enter")&&this._handleOptionClick(t)};this._handleOptionClick=t=>{t.target.matches('input[type="checkbox"]')||t.preventDefault();let e=t.target.closest("li");this._selectOptionElement(e),t.stopPropagation()};this._handleOptionFocus=t=>{if(this._searchInput)return;let e=t.target;if(!(e instanceof Element))return;let i=e.closest('li[role="option"]');i&&this.input.setAttribute("aria-activedescendant",i.id)};this._handleInputClick=()=>{this.menu&&this.menu.isOpen&&(this._setValueToInput(),this._setSelectedStates())};this._filterOptions=()=>{let t=this._searchInput.value.trim().toLowerCase();this._filterSearch(t),this._searchStatus.textContent=this._values.some(({optionEl:e})=>!e.hidden)?"":this.options.i18n.noResults,this.input.removeAttribute("aria-activedescendant"),this.menu?.recalculateDimensions()};this._handleSearchKeydown=t=>{t.stopPropagation(),!(!u.plainKey(t)||u.isComposing(t))&&(this._searchDismissKey(t)||this._searchNavigate(t))};if(this.el.classList.contains("browser-default")||new.target===De&&this.el.matches("[data-tree]")){this.el[new.target.key]=void 0;return}this.isMultiple=this.el.multiple,this._searchable=this._canSearch(),this.nativeTabIndex=this.el.tabIndex,this.el.tabIndex=-1,this._values=[],this._createdWrapper=!1,this._setupMenu(),this._setupEventHandlers()}static get defaults(){return Na}_canSearch(){return this.constructor===De&&this.options.searchable}destroy(){this._events.abort(),this.menuEl&&(clearTimeout(this._resetTimer),this._clearValidationError(),this.menu?.destroy(),this._removeMenu(),this.el.tabIndex=this.nativeTabIndex,super.destroy())}refresh(){if(!this.menuEl)return;this._bindForm();let t=this.menuEl.getRootNode(),e=this._values.find(i=>i.optionEl.contains(t.activeElement))?.el;this.input.disabled=this.el.matches(":disabled"),this.wrapper.classList.toggle("disabled",this.input.disabled),this.input.disabled?this.menu?.close():this.menu||this._initMenu(),this.input.removeAttribute("aria-activedescendant"),this._rebuildOptions(),this._handleSelectChange(),this.menu&&(this.menu.focusedIndex=-1),this.menu?.isOpen&&(this.menu.recalculateDimensions(),this._restoreOptionFocus(e))}_restoreOptionFocus(t){if(!t)return;(this._values.filter(({el:i,optionEl:n})=>i===t&&n.tabIndex===0).map(({optionEl:i})=>i)[0]||this._searchInput||this.input).focus()}_setupEventHandlers(){let{signal:t}=this._events;this._setupOptionHandlers(),this.el.addEventListener("change",this._handleSelectChange,{signal:t}),this.el.addEventListener("invalid",this._handleInvalid,{signal:t}),this.el.addEventListener("focus",this._handleNativeFocus,{signal:t}),this.input.addEventListener("click",this._handleInputClick,{signal:t}),this.menuEl.addEventListener("focusin",this._handleOptionFocus,{signal:t}),this._bindForm()}_bindForm(){this._form?.removeEventListener("reset",this._handleReset),this._form=this.el.form,this._form?.addEventListener("reset",this._handleReset,{signal:this._events.signal})}_setupOptionHandlers(){let{signal:t}=this._events;this.menuEl.querySelectorAll("li:not(.optgroup)").forEach(e=>{e.addEventListener("click",this._handleOptionClick,{signal:t}),e.addEventListener("keydown",this._handleOptionKeydown,{signal:t})})}_syncValidationError(){this._validationMessage&&(this.el.willValidate&&!this.el.validity.valid?this._validationMessage.textContent=this.el.validationMessage:this._clearValidationError())}_clearValidationError(){if(!this._validationMessage)return;let t=this.input.getAttribute("aria-describedby")?.split(/\s+/).filter(e=>e!==this._validationMessage.id).join(" ");t?this.input.setAttribute("aria-describedby",t):this.input.removeAttribute("aria-describedby"),this.input.ariaInvalid=this.el.ariaInvalid,this._validationMessage.remove(),this._validationMessage=null}_selectOptionElement(t){if(!t.hidden&&!this.el.matches(":disabled")&&!t.classList.contains("disabled")&&!t.classList.contains("optgroup")){let e=this._values.find(n=>n.optionEl===t);if(!e||e.el.matches(":disabled"))return;let i=JSON.stringify(this.getSelectedValues());e.el.selected=!this.isMultiple||!e.el.selected,this._handleSelectChange(),JSON.stringify(this.getSelectedValues())!==i&&this.el.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0,composed:!0})),this.isMultiple||this._closeSingleSelect()}}_closeSingleSelect(){this.menu?.close(),this._searchInput&&this.input.focus()}_setupMenu(){this.labelEl=this.el.labels?.[0]??null,Array.from(this.el.labels??[]).forEach(t=>{this._originalLabels.set(t,{for:t.getAttribute("for"),id:t.getAttribute("id")})}),this.labelEl&&!this.el.closest("label")&&(this._labelPlaceholder=document.createComment(""),this.labelEl.before(this._labelPlaceholder)),this._setupWrapper(),this._hideNativeSelect(),this.el.matches(":disabled")&&this.wrapper.classList.add("disabled"),this.menuEl=document.createElement(this._searchable?"div":"menu"),this.menuEl.popover="manual",this.menuEl.id=`select-options-${u.guid()}`,this.menuEl.setAttribute("role","listbox"),this.menuEl.ariaMultiSelectable=this.isMultiple.toString(),this.isMultiple&&this.menuEl.classList.add("multiple-select-menu"),this._buildOptions(),this.wrapper.append(this.menuEl),this._buildInput(),this._searchable&&this._buildSearch(),this._buildCaret(),this._initMenu(),this._setSelectedStates(),this._labelPlaceholder&&this.input.after(this.labelEl)}_setupWrapper(){let t=this.el.parentElement;t&&t.matches(".field")&&!t.querySelector(":scope > .hide-select")&&!t.querySelector(":scope > input, :scope > textarea")?(this.wrapper=t,this._createdWrapper=!1):(this.wrapper=document.createElement("div"),this.wrapper.classList.add("field"),this._createdWrapper=!0,this.el.before(this.wrapper)),this.options.classes.length>0&&this.wrapper.classList.add(...this.options.classes.split(" ").filter(Boolean))}_hideNativeSelect(){let t=document.createElement("div");t.classList.add("hide-select"),t.ariaHidden="true",this.el.before(t),t.appendChild(this.el),this._createdWrapper&&this.wrapper.append(t)}_buildInput(){this.input=document.createElement("input"),this.input.id="select-input-"+u.guid(),this.input.classList.add("menu-trigger","no-autoinit"),this.input.type="text",this.input.readOnly=!0,this.input.setAttribute("data-target",this.menuEl.id),this.input.ariaReadOnly="true",this.input.ariaRequired=this.el.hasAttribute("required").toString(),this.input.disabled=this.el.matches(":disabled"),this.input.setAttribute("tabindex",this.nativeTabIndex.toString());let t=this.el.attributes;for(let e=0;e<t.length;++e){let i=t[e];i.name.startsWith("aria-")&&this.input.setAttribute(i.name,i.value)}this.input.setAttribute("role","combobox"),this.input.setAttribute("aria-haspopup","listbox"),this.input.ariaExpanded="false",this.input.setAttribute("aria-controls",this.menuEl.id),this.input.placeholder=" ",this._originalLabels.forEach((e,i)=>{i.htmlFor=this.input.id}),this._labelPlaceholder&&this._originalLabels.size>1&&!this.input.getAttribute("aria-label")&&!this.input.getAttribute("aria-labelledby")&&this.input.setAttribute("aria-labelledby",Array.from(this._originalLabels.keys(),(e,i)=>(e.id||(e.id=`${this.input.id}-label-${i}`),e.id)).join(" ")),this.wrapper.prepend(this.input),this._setValueToInput()}_buildCaret(){let t=document.createElement("span");t.classList.add("caret"),t.setAttribute("aria-hidden","true"),this.wrapper.prepend(t)}_buildSearch(){this.menuEl.classList.add("select-search-popup"),this.menuEl.setAttribute("role","dialog"),this.menuEl.removeAttribute("aria-multiselectable"),this.menuEl.classList.remove("multiple-select-menu"),this.input.setAttribute("aria-haspopup","dialog"),this._searchResults=this._searchList(),this._searchInput=document.createElement("input"),this._searchInput.type="search",this._searchInput.placeholder=this.options.i18n.searchLabel,this._searchInput.setAttribute("aria-label",this.options.i18n.searchLabel),this._searchStatus=document.createElement("div"),this._searchStatus.setAttribute("role","status"),this.menuEl.append(this._searchInput,this._searchStatus,this._searchResults),this._searchInput.addEventListener("input",this._filterOptions,{signal:this._events.signal}),this.menuEl.addEventListener("keydown",this._handleSearchKeydown,{signal:this._events.signal,capture:!0}),this._nameSearch(),this._filterOptions()}_searchList(){let t=document.createElement("menu");return t.id=this.menuEl.id+"-list",t.setAttribute("role","listbox"),t.ariaMultiSelectable=this.isMultiple.toString(),t.classList.toggle("multiple-select-menu",this.isMultiple),t.append(...this.menuEl.childNodes),t}_nameSearch(){let t=Array.from(this._originalLabels.keys(),(n,o)=>(n.id||(n.id=this.input.id+"-label-"+o),n.id)).join(" "),e=this.input.hasAttribute("aria-labelledby")?"aria-labelledby":"aria-label",i=this.input.getAttribute(e);[this.menuEl,this._searchResults].forEach(n=>n.setAttribute(i?e:"aria-labelledby",i||t))}_filterSearch(t){this._values.forEach(({el:e,optionEl:i})=>{i.hidden=!e.textContent.trim().toLowerCase().includes(t),i.tabIndex=i.hidden||e.matches(":disabled")?-1:0}),this._filterGroups()}_filterGroups(){for(let t of this._searchResults.querySelectorAll(":scope > li.optgroup")){let e=new Set(t.getAttribute("aria-owns").split(" "));t.hidden=!this._values.some(({optionEl:i})=>e.has(i.id)&&!i.hidden)}}_searchRows(){return this._values.map(({optionEl:t})=>t).filter(t=>t.tabIndex!==-1)}_searchDismissKey(t){return t.key==="Tab"?(this._searchTab(t),!0):t.key!=="Escape"?!1:(t.preventDefault(),this._closeSingleSelect(),!0)}_searchTab(t){if(t.shiftKey){t.preventDefault(),this._searchBackwardTab(t);return}let e=this._searchRows()[0];if(t.target===this._searchInput&&e){t.preventDefault(),e.focus();return}this._closeSingleSelect()}_searchBackwardTab(t){t.target===this._searchInput?this._closeSingleSelect():this._searchInput.focus()}_searchNavigate(t){if(t.target===this._searchInput){this._searchInputKey(t);return}this._searchRowKey(t)}_searchInputKey(t){if(t.key==="Enter"&&t.preventDefault(),!["ArrowDown","ArrowUp"].includes(t.key))return;t.preventDefault();let e=this._searchRows();this._focusSearchRow(e[t.key==="ArrowUp"?e.length-1:0])}_focusSearchRow(t){t&&t.focus()}_searchRowKey(t){if(["Enter"," "].includes(t.key)){t.preventDefault(),this._selectOptionElement(t.target);return}let e=u.focusTarget([this._searchInput,...this._searchRows()],t,{ArrowDown:1,ArrowUp:-1});e&&(t.preventDefault(),t.key==="Home"?this._searchRows()[0]?.focus():e.focus())}_clearSearch(){this._searchInput&&(this._searchInput.value="",this._filterOptions())}_resetSearch(){this._searchInput&&(this.menu?.close(),this._clearSearch())}_bindSearchClose(t){let e=t.onCloseStart;t.onCloseStart=()=>(this._clearSearch(),e?.call(this.menu,this.el))}_initMenu(){if(this.el.matches(":disabled"))return;let t={...this.options.menuOptions};this._searchInput&&this._bindSearchClose(t),t.coverTrigger=!1;let e=t.onOpenEnd,i=t.onCloseEnd;t.onOpenEnd=()=>{this._focusMenu(),this.input.ariaExpanded="true",typeof e=="function"&&e.call(this.menu,this.el)},t.onCloseEnd=()=>{this.input.ariaExpanded="false",this.input.removeAttribute("aria-activedescendant"),typeof i=="function"&&i.call(this.menu,this.el)},t.closeOnClick=!1,this.menu=B.init(this.input,t)}_focusMenu(){if(!this._searchInput)return this._focusSelected();this.menu.options.autoFocus&&!u.focusIsIn(this.menuEl)&&this._searchInput.focus()}_focusSelected(){let t=this.menuEl.querySelector(".selected");if(t){if(this.menu.focusedIndex=[...t.parentNode.children].indexOf(t),this.menu._focusFocusedItem(),this.menu.isScrollable){let e=t.getBoundingClientRect().top-this.menuEl.getBoundingClientRect().top;e-=this.menuEl.clientHeight/2,this.menuEl.scrollTop=e}t.id&&this.input.setAttribute("aria-activedescendant",t.id)}}_nativeOptions(){return Array.from(this.el.children).filter(t=>["OPTION","OPTGROUP"].includes(t.tagName))}get _optionList(){return this._searchResults??this.menuEl}_buildOptions(){this.selectOptions=this._nativeOptions(),this._values=[],this.selectOptions.forEach(t=>{if(t.tagName==="OPTION"){let e=this._createAndAppendOptionWithIcon(t,this.isMultiple?"multiple":void 0);this._values.push({el:t,optionEl:e})}else if(t.tagName==="OPTGROUP"){let e="opt-group-"+u.guid(),i=document.createElement("li");i.classList.add("optgroup"),i.tabIndex=-1,i.setAttribute("role","group"),i.setAttribute("aria-labelledby",e);let n=document.createElement("span");n.id=e,n.setAttribute("role","presentation"),n.textContent=t.getAttribute("label")??"",i.replaceChildren(n),this._optionList.append(i);let o=[];Array.from(t.children).filter(l=>l.tagName==="OPTION").forEach(l=>{let c=this._createAndAppendOptionWithIcon(l,"optgroup-option");o.push(c.id),this._values.push({el:l,optionEl:c})}),i.setAttribute("aria-owns",o.join(" "))}})}_rebuildOptions(){this._optionList.replaceChildren(),this._buildOptions(),this._setupOptionHandlers(),this.menu?._makeMenuFocusable(),this._searchInput&&this._filterOptions()}_removeMenu(){this.wrapper?.querySelector(":scope > .caret")?.remove(),this.input?.remove(),this.menuEl?.remove();let t=this.el.parentElement;t?.classList.contains("hide-select")&&t.replaceWith(this.el),this._originalLabels.forEach((e,i)=>{for(let n of["for","id"])x(i,n,e[n])}),this._labelPlaceholder?.replaceWith(this.labelEl),this.wrapper&&(this._createdWrapper?this.wrapper.replaceWith(this.el):(this.wrapper.classList.remove("disabled"),this.options.classes.length>0&&this.wrapper.classList.remove(...this.options.classes.split(" ").filter(Boolean))))}_createAndAppendOptionWithIcon(t,e){let i=document.createElement("li");i.id="select-option-"+u.guid(),i.setAttribute("role","option"),i.tabIndex=0;let n=this.el.matches(":disabled")||t.matches(":disabled");n&&(i.classList.add("disabled"),i.ariaDisabled="true",i.tabIndex=-1),e==="optgroup-option"&&i.classList.add(e);let o=t.textContent,a=document.createElement("span");if(this.isMultiple&&!n){let d=document.createElement("label"),p=document.createElement("input");p.type="checkbox",p.tabIndex=-1;let g=document.createElement("span");g.textContent=o,d.append(p,g),a.appendChild(d)}else a.textContent=o;i.appendChild(a);let l=t.getAttribute("data-icon"),c;if(l)try{let d=new URL(l,this.el.ownerDocument.baseURI);(["http:","https:","blob:"].includes(d.protocol)||/^data:image\/(?:avif|bmp|gif|jpeg|png|svg\+xml|webp|x-icon)(?:;|,)/i.test(d.href))&&(c=d)}catch{}let h=t.getAttribute("class")?.split(" ").filter(Boolean);if(c){let d=document.createElement("img");h?.length&&d.classList.add(...h),d.src=c.href,d.ariaHidden="true",i.prepend(d)}return this._optionList.append(i),i}_setValueToInput(){this.input.value=Array.from(this.el.selectedOptions,t=>t.textContent.trim()).join(", ")}_setSelectedStates(){this._values.forEach(({el:t,optionEl:e})=>{e.classList.toggle("selected",t.selected),e.ariaSelected=String(t.selected);let i=e.querySelector('input[type="checkbox"]');i&&(i.checked=t.selected)})}getSelectedValues(){return Array.from(this.el.selectedOptions,t=>t.value)}};De.key="Expressive_FormSelect";var z=De;var Ba={margin:5,transition:10,duration:250,align:"left"},hi=class{constructor(s,t,e){this._handleDocumentClick=s=>{if(!this.visible)return;let t=s.composedPath();[...this.triggers,this.container].some(e=>t.includes(e))||this.hide()};this.destroy=()=>{document.removeEventListener("click",this._handleDocumentClick),this.container.remove()};this.show=()=>{this.visible||(this.visible=!0,document.addEventListener("click",this._handleDocumentClick),this._place(),this.container.style.visibility="visible",this._animate(this.options.transition,"1"))};this.hide=()=>{this.visible&&(this.visible=!1,document.removeEventListener("click",this._handleDocumentClick),this.container.removeAttribute("style"),this._animate(0,"0"))};this.el=s,this.triggers=[s],this.options={...Ba,...e},this.container=document.createElement("div"),this.container.classList.add("display-docked"),this.container.append(t),s.parentElement.append(this.container)}_animate(s,t){let{duration:e}=this.options;this.container.style.transition=`transform ${e}ms ease-out, opacity ${e}ms ease-out`,setTimeout(()=>{this.container.style.transform=`translateX(0px) translateY(${s}px)`,this.container.style.opacity=t},1)}_place(){let{margin:s,transition:t,align:e}=this.options,{offsetHeight:i,offsetWidth:n}=this.el,o=this.container.offsetWidth,a=this.el.getBoundingClientRect(),l=a.left+window.scrollX;e==="center"?l+=n/2-o/2:e==="right"&&(l+=n-o-s);let c=a.top+window.scrollY+i+s,h=u._repositionWithinScreen(l,c,o,this.container.offsetHeight,s,t,e);u._placeInOffsetParent(this.container,h)}};var ue=class{constructor(s,t,e){this._settled=!1;this._opener=null;this._handleClick=s=>{s.target===this.dialog&&this.dialog.close()};this._handleClose=()=>{let s=!this._settled;this._settled=!1,this._opener?.focus({preventScroll:!0}),s&&this.onDismiss()};this.destroy=()=>{this.dialog.removeEventListener("click",this._handleClick),this.dialog.removeEventListener("close",this._handleClose),this.dialog.remove()};this.show=()=>{if(this.dialog.open)return;let s=this.dialog.getRootNode();this._opener=s.activeElement,this.dialog.showModal()};this.hide=()=>{this.dialog.open&&(this._settled=!0,this.dialog.close())};this.triggers=[s],this.onDismiss=e,this.dialog=document.createElement("dialog"),this.dialog.className="display-modal";let i=s.labels?.[0]?.textContent.trim()||s.getAttribute("aria-label");i&&this.dialog.setAttribute("aria-label",i),this.dialog.append(t),s.parentElement.append(this.dialog),this.dialog.addEventListener("click",this._handleClick),this.dialog.addEventListener("close",this._handleClose)}};function ui(r,s,t,e,i){if(r==="modal")return new ue(s,t,i);if(r==="docked")return new hi(s,t,e)}function de(r){r instanceof ue&&r.hide()}var fn=Array.from({length:12},(r,s)=>new Date(Date.UTC(2023,s,1))),Ji=Array.from({length:7},(r,s)=>new Date(Date.UTC(2023,0,1+s)));function $a(r){let s=(i,n)=>{let o=new Intl.DateTimeFormat(r,{...n,calendar:"gregory",timeZone:"UTC"});return i.map(a=>o.format(a))},t=new Intl.Locale(r),e=t.getWeekInfo?.()??t.weekInfo;return{week:e?{firstDay:e.firstDay%7}:{},i18n:{months:s(fn,{month:"long"}),monthsShort:s(fn,{month:"short"}),weekdays:s(Ji,{weekday:"long"}),weekdaysShort:s(Ji,{weekday:"short"}),weekdaysAbbrev:s(Ji,{weekday:"narrow"})}}}var vn=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),di="(\\d{1,2})",pi=(r,s)=>[`(${r.map(vn).join("|")})`,(t,e)=>s&&(t[s]=r.findIndex(i=>i.toLowerCase()===e.toLowerCase()))],qa={d:()=>[di,(r,s)=>r.day=+s],dd:()=>[di,(r,s)=>r.day=+s],ddd:r=>pi(r.weekdaysShort),dddd:r=>pi(r.weekdays),m:()=>[di,(r,s)=>r.month=+s-1],mm:()=>[di,(r,s)=>r.month=+s-1],mmm:r=>pi(r.monthsShort,"month"),mmmm:r=>pi(r.months,"month"),yy:()=>["(\\d{2})",(r,s)=>r.year=+s+(+s<50?2e3:1900)],yyyy:()=>["(\\d{4})",(r,s)=>r.year=+s]},_n=r=>String(r).padStart(2,"0"),gn={d:r=>r.getDate(),dd:r=>_n(r.getDate()),ddd:(r,s)=>s.weekdaysShort[r.getDay()],dddd:(r,s)=>s.weekdays[r.getDay()],m:r=>r.getMonth()+1,mm:r=>_n(r.getMonth()+1),mmm:(r,s)=>s.monthsShort[r.getMonth()],mmmm:(r,s)=>s.months[r.getMonth()],yy:r=>String(r.getFullYear()).slice(2),yyyy:r=>r.getFullYear()};function za(r,s,t){let e=[],i=s.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(c=>{let h=qa[c]?.(t);return h&&e.push(h),h?h[0]:vn(c)}),n=new RegExp(`^\\s*${i.join("")}\\s*$`,"iu").exec(r);if(!n)return null;let o={};e.forEach(([,c],h)=>c(o,n[h+1]));let a=new Date(2e3,0,1);return a.setFullYear(o.year,o.month,o.day),[a.getFullYear(),a.getMonth(),a.getDate()].join()===[o.year,o.month,o.day].join()?a:null}function Ka(r,s={}){let t=u.locale(r);if(!t)return s;let{week:e,i18n:i}=$a(t);return{...e,...s,i18n:{...i,...s.i18n}}}var Va={format:"mmm dd, yyyy",parse:null,isDateRange:!1,dateRangeEndEl:null,isMultipleSelection:!1,defaultDate:null,defaultEndDate:null,setDefaultDate:!1,setDefaultEndDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,isRTL:!1,yearRangeReverse:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,openByDefault:!1,container:null,showClearBtn:!1,autoSubmit:!0,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",previousMonth:"Previous month",nextMonth:"Next month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onDraw:null,onInputInteraction:null,displayPlugin:null,displayPluginOptions:null,onConfirm:null,onCancel:null},w=class w extends b{constructor(t,e){e=Ka(t,e);super(t,e);this.multiple=!1;this._writtenInputs=new WeakMap;this._form=null;this._resetDates=new WeakMap;this._selection=0;this._drawDepth=0;this._drawDirty=!1;this._controlsKey=null;this._randId=null;this._focusedDate=null;this._handleInputClick=t=>{t.target.type=="date"&&(this.options.openByDefault||this.options.container)&&t.preventDefault(),this._batchDraws(()=>{this.setDateFromInput(t.target),this.draw(),this.gotoDate(t.target===this.el?this.date:this.endDate)}),this._showDisplay(),this.options.onInputInteraction&&this.options.onInputInteraction.call(this)};this._handleInputKeydown=u.ignoringComposition(t=>{t.key==="Enter"&&(t.preventDefault(),this._batchDraws(()=>{this.setDateFromInput(t.target),this._focusedDate=t.target===this.endDateEl?this.endDate:this.date,this.draw()}),this.displayPlugin&&this.displayPlugin.show(),this._syncCalendarFocus(!0),this.options.onInputInteraction&&this.options.onInputInteraction.call(this))});this._handleCalendarFocus=t=>{let e=t.target;e.matches(".datepicker-day-button")&&(this._focusedDate=this._dayDate(e),this._syncCalendarFocus())};this._handleCalendarKeydown=t=>{let e=t.target;if(!e.matches(".datepicker-day-button")||!u.plainKey(t))return;let i=this._dayDate(e),n=(i.getDay()-this.options.firstDay+7)%7,o={ArrowLeft:this.options.isRTL?1:-1,ArrowRight:this.options.isRTL?-1:1,ArrowUp:-7,ArrowDown:7,Home:-n,End:6-n};if(Object.hasOwn(o,t.key))i.setDate(i.getDate()+o[t.key]);else if(t.key==="PageUp"||t.key==="PageDown"){let E=i.getDate();i.setDate(1),i.setMonth(i.getMonth()+(t.key==="PageUp"?-1:1)*(t.shiftKey?12:1));let T=new Date(i.getTime());T.setMonth(T.getMonth()+1,0),i.setDate(Math.min(E,T.getDate()))}else return;t.preventDefault();let{minDate:a,maxDate:l,minYear:c,maxYear:h,minMonth:d,maxMonth:p}=this.options;if(a&&i<a&&i.setTime(a.getTime()),l&&i>l&&i.setTime(l.getTime()),i.getFullYear()<c||i.getFullYear()>h||i.getFullYear()===c&&i.getMonth()<(d??0)||i.getFullYear()===h&&i.getMonth()>(p??11))return;this._focusedDate=i;let{year:g,month:m}=this.calendars[0];i.getFullYear()===g&&i.getMonth()===m?this._syncCalendarFocus(!0):this.gotoDate(i)};this._handleCalendarClick=t=>{let e=t.target;e.classList.contains("is-disabled")||this._batchDraws(()=>{if(e.classList.contains("datepicker-day-button")&&!e.classList.contains("is-empty")&&!e.parentElement.classList.contains("is-disabled")&&!e.parentElement.classList.contains("is-selection-disabled")){let i=new Date(t.target.getAttribute("data-year"),t.target.getAttribute("data-month"),t.target.getAttribute("data-day"));(!this.multiple||this.options.isMultipleSelection)&&this.setDate(i),this.options.isDateRange&&this._handleDateRangeCalendarClick(i),this.options.autoSubmit&&this._finishSelection()}else e.closest(".month-prev")?this.prevMonth():e.closest(".month-next")&&this.nextMonth()})};this._handleDateRangeCalendarClick=t=>{if(this.endDate==null||!w._compareDates(t,this.endDate)){if(w._isDate(this.date)&&t<this.date)return;this.setDate(t,!1,w._isDate(this.date));return}this._clearDates(),this.draw()};this._handleClearClick=()=>{this._clearDates(),this.setInputValues()};this._clearDates=()=>{this.date=null,this.endDate=null,this.dates?.splice(0),this.draw()};this._handleMonthChange=t=>{this.gotoMonth(t.target.value)};this._handleYearChange=t=>{this.gotoYear(t.target.value)};this._handleFormReset=t=>{clearTimeout(this._resetTimer),this._resetTimer=setTimeout(()=>{t.defaultPrevented||(this.options.isMultipleSelection?this._readBackMultiple():this._readBackSingle(),this.draw())})};this._handleInputChange=t=>{t.detail?.firedBy!==this&&this.setDateFromInput(t.target)};this._finishSelection=()=>{this.setInputValues()};this._confirm=()=>{this._finishSelection(),de(this.displayPlugin),this._notify("confirm",this.options.onConfirm,{args:[]})};this._cancel=()=>{de(this.displayPlugin),this._notify("cancel",this.options.onCancel,{args:[]})};this.options.displayPlugin==="modal"&&Object.assign(this.options,{openByDefault:!0,autoSubmit:!1});let{minDate:i,maxDate:n}=this.options;i&&(this.options.minDate=new Date(new Date(i.getTime()).setHours(0,0,0,0))),n&&(this.options.maxDate=new Date(new Date(n.getTime()).setHours(0,0,0,0))),this.id=u.guid(),this.options.isMultipleSelection&&(this.multiple=!0,this.dates=[],this.dateEls=[t]),this._setupVariables(),this._insertHTMLIntoDOM(),this._setupEventHandlers();let o=!this.options.defaultDate;o&&(this.options.defaultDate=this._parseInput(this.el.value));let a=this.options.defaultDate;if(w._isDate(a)?this.options.setDefaultDate?(this.setDate(a,!0),this.setInputValue(this.el,a)):o&&this._isSelectableDay(a)?this.setDate(a,!0):this.gotoDate(a):this.gotoDate(new Date),this.options.isDateRange){this.multiple=!0;let l=this.options.defaultEndDate;w._isDate(l)&&this.options.setDefaultEndDate&&(this.setDate(l,!0,!0),this.setInputValue(this.endDateEl,l))}this.displayPlugin=ui(this.options.displayPlugin,this.el,this.containerEl,this.options.displayPluginOptions,this._cancel),this.endDateEl&&this.displayPlugin?.triggers.push(this.endDateEl);for(let l of[this.el,this.endDateEl])this._rememberResetDate(l)}_rememberResetDate(t){let e=t&&this._writtenInputs.get(t);e&&e.value===t.defaultValue&&this._resetDates.set(t,e)}static get defaults(){return Va}static _escape(t){return String(t??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}static _isDate(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())}_readDefault(t,e){let{format:i,i18n:n}=this.options;return(typeof i=="string"&&e.type!=="date"?za(t,i,n):null)??w._parseDate(t)}static _parseDate(t){if(t=t.trim(),!/^\d{4}-\d{2}-\d{2}$/.test(t))return new Date(Date.parse(t));let e=new Date(t+"T00:00:00");return e.getDate()===Number(t.slice(-2))?e:new Date(NaN)}_parseInput(t,e=this.el){return!t.trim()||!this.options.parse?this._readDefault(t,e):this.options.parse(t,typeof this.options.format=="string"?this.options.format:"")}static _setToStartOfDay(t){w._isDate(t)&&t.setHours(0,0,0,0)}static _compareDates(t,e){return t.getTime()===e.getTime()}destroy(){this._events.abort(),clearTimeout(this._resetTimer),this.dateEls?.slice(1).forEach(t=>this._removeDateInput(t)),!this.options.dateRangeEndEl&&this.endDateEl&&this._removeDateInput(this.endDateEl),this.displayPlugin?.destroy(),this.containerEl.remove(),this.destroySelects(),this._removeDateOverlay(),super.destroy()}_removeDateOverlay(){this.el.classList.remove("datepicker-date-input");for(let t of[this.el,this.endDateEl])t?.type==="date"&&t.removeAttribute("data-date")}destroySelects(){this._formSelect(".orig-select-year")?.destroy(),this._formSelect(".orig-select-month")?.destroy()}_insertHTMLIntoDOM(){if(this.el.type=="date"&&this.el.classList.add("datepicker-date-input"),this._renderDateInputFormat(this.el),this.options.isDateRange&&(this.containerEl.classList.add("daterange"),this.options.dateRangeEndEl?(this.endDateEl=document.querySelector(this.options.dateRangeEndEl),this.endDateEl?this._renderDateInputFormat(this.endDateEl):console.warn("Specified date range end input element in dateRangeEndEl not found")):(this.endDateEl=this.createDateInput(),this.endDateEl.classList.add("datepicker-end-date"))),Be(this.footer,this.options,"datepicker-clear",this._handleClearClick,this._confirm,this._cancel),this.options.container){let t=this.options.container;this.options.container=t instanceof HTMLElement?t:document.querySelector(t),this.options.container.append(this.containerEl)}else{let t=this.endDateEl?this.endDateEl:this.el;this.options.openByDefault||this.containerEl.setAttribute("style","display: none; visibility: hidden;"),t.parentElement.after(this.containerEl)}}_renderDateInputFormat(t){let e=t.parentElement?.querySelector(".datepicker-format");e&&(e.textContent=typeof this.options.format=="function"?"":String(this.options.format))}toString(t=this.date,e=null){return e=e||this.options.format,typeof e=="function"?e(t):w._isDate(t)?this.formatDate(t,e):""}formatDate(t,e){return e.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(n=>gn[n]?gn[n](t,this.options.i18n):n).join("")}setDateFromInput(t){if(this._syncDataDate(t),(this.options.isDateRange||!this.options.isMultipleSelection)&&!t.value.trim()){this.setSingleDate(null,t===this.endDateEl),this.draw();return}let e=this._dateInInput(t);if(!w._isDate(e))return;let i=new Date(e.getTime());w._setToStartOfDay(i);let n=t===this.endDateEl;if(this.options.isDateRange&&(n?this.date&&i<this.date:this.endDate&&i>this.endDate)||this._isDisabledDay(i)){this.setInputValue(t,this._selectedDateFor(t));return}this._selectTypedMultiDate(t,i),this.setDate(i,!1,n,!0)}_selectTypedMultiDate(t,e){if(!this.options.isMultipleSelection)return;let i=this._selectedDateFor(t);this.dates=this.dates.filter(n=>n!==i&&n.getTime()!==e.getTime()),this.setMultiDate(e)}setDate(t=null,e=!1,i=!1,n=!1){let o=this.validateDate(t);if(!o)return;w._setToStartOfDay(o);let a=++this._selection;this.options.isMultipleSelection?n||this.setMultiDate(o):this.setSingleDate(o,i),this.gotoDate(o),!e&&this._notify("select",this.options.onSelect,{args:[o],detail:{date:o},current:()=>a===this._selection})}validateDate(t){if(!t)return this._renderDateDisplay(t),this.draw();if(typeof t=="string"&&(t=w._parseDate(t)),!w._isDate(t))return;let e=this.options.minDate,i=this.options.maxDate;return w._isDate(e)&&t<e?t=e:w._isDate(i)&&t>i&&(t=i),new Date(t.getTime())}_dateInInput(t){let e=!this.options.parse&&[this._writtenInputs.get(t),this._resetDates.get(t)].find(i=>i?.value===t.value);return e?e.date:this._parseInput(t.value,t)}_selectedDateFor(t){return this.options.isMultipleSelection?this.dates[this.dateEls.indexOf(t)]??null:t===this.endDateEl?this.endDate:this.date}_isSelectableDay(t){let e=new Date(t.getTime());return w._setToStartOfDay(e),!this._isDisabledDay(e)}_isDisabledDay(t){return this._isOutOfBounds(t)||this._isRefusedDay(t)}_isOutOfBounds(t){let{minDate:e,maxDate:i}=this.options;return e&&t<e||i&&t>i}_isRefusedDay(t){let{disableWeekends:e,disableDayFn:i}=this.options;return e&&[0,6].includes(t.getDay())||!!i?.(t)}setSingleDate(t,e){e?this.endDate=t:this.date=t}setMultiDate(t){let e=this.dates.findIndex(i=>i.getTime()===t.getTime());e===-1?this.dates.push(t):this.dates.splice(e,1),this.dates.sort((i,n)=>i.getTime()-n.getTime())}setDataDate(t,e){t.setAttribute("data-date",w._isDate(e)?this.toString(e):"")}setInputValues(){if(!this.options?.isMultipleSelection){this.setInputValue(this.el,this.date),this.options?.isDateRange&&this.setInputValue(this.endDateEl,this.endDate);return}this.setMultipleSelectionInputValues()}setMultipleSelectionInputValues(){let t=Math.max(1,this.dates.length);for(let e of this.dateEls.splice(t))this._removeDateInput(e);for(;this.dateEls.length<t;)this.dateEls.push(this.createDateInput());this.dateEls.forEach((e,i)=>this.setInputValue(e,this.dates[i]??null))}setInputValue(t,e){t&&(t.type=="date"&&this.setDataDate(t,e),w._isDate(e)?t.type=="date"?t.value=this.formatDate(e,"yyyy-mm-dd"):t.value=this.toString(e):t.value="",this._writtenInputs.set(t,{value:t.value,date:w._isDate(e)?new Date(e.getTime()):null}),t.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0,composed:!0,detail:{firedBy:this}})))}_renderDateDisplay(t,e=null){let i=w._isDate(t)?t:new Date;if(!this.options.isDateRange)this.dateTextEl.textContent=this.formatDate(i,"ddd, mmm d");else{let n=w._isDate(e)?e:new Date;this.dateTextEl.textContent=`${this.formatDate(i,"mmm d")} - ${this.formatDate(n,"mmm d")}`}}gotoDate(t){let e=!0;if(w._isDate(t)){if(this.calendars){let i=new Date(this.calendars[0].year,this.calendars[0].month,1),n=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),o=t.getTime();n.setMonth(n.getMonth()+1),n.setDate(n.getDate()-1),e=o<i.getTime()||n.getTime()<o}e&&(this.calendars=[{month:t.getMonth(),year:t.getFullYear()}]),this.adjustCalendars()}}adjustCalendars(){this.calendars[0]=this.adjustCalendar(this.calendars[0]),this.draw()}adjustCalendar(t){return t.month<0&&(t.year-=Math.ceil(Math.abs(t.month)/12),t.month+=12),t.month>11&&(t.year+=Math.floor(Math.abs(t.month)/12),t.month-=12),t}nextMonth(){this.calendars[0].month++,this.adjustCalendars()}prevMonth(){this.calendars[0].month--,this.adjustCalendars()}render(t,e,i){let n=new Date,o=new Date(t,e+1,0).getDate(),a=[],l=new Date(t,e,1).getDay(),c=[];w._setToStartOfDay(n),this.options.firstDay>0&&(l-=this.options.firstDay,l<0&&(l+=7));let h=e===0?11:e-1,d=e===11?0:e+1,p=e===0?t-1:t,g=e===11?t+1:t,m=new Date(t,e,0).getDate(),E=Math.ceil((o+l)/7)*7;for(let T=0,C=0;T<E;T++){let _=new Date(t,e,1+(T-l)),L=w._compareDates(_,n),S=this.options.events.indexOf(_.toDateString())!==-1,P=T<l||T>=o+l,N=this._isDisabledDay(_),rt=this.options.isDateRange&&this.date&&this.endDate&&w._compareDates(this.date,_),Ne=this.options.isDateRange&&this.endDate&&w._compareDates(this.endDate,_),Ee=this.options.isDateRange&&[this.date,this.endDate].every(w._isDate)&&_>this.date&&_<this.endDate,Y=1+(T-l),X=e,Ei=t,ye=!1;w._isDate(this.date)&&(ye=w._compareDates(_,this.date)),!ye&&w._isDate(this.endDate)&&(ye=w._compareDates(_,this.endDate)),this.options.isMultipleSelection&&this.dates?.some(Un=>Un.getTime()===_.getTime())&&(ye=!0),P&&(T<l?(Y=m+Y,X=h,Ei=p):(Y=Y-o,X=d,Ei=g));let Wn={day:Y,month:X,year:Ei,hasEvent:S,isSelected:ye,isToday:L,isDisabled:N,isEmpty:P,showDaysInNextAndPreviousMonths:this.options.showDaysInNextAndPreviousMonths,isDateRangeStart:rt,isDateRangeEnd:Ne,isDateRange:Ee};c.push(this.renderDay(Wn)),++C===7&&(a.push(this.renderRow(c,this.options.isRTL,!1)),c=[],C=0)}return this.renderTable(this.options,a,i)}renderDay(t){let e={isDisabled:"is-disabled",isToday:"is-today",isSelected:"is-selected",hasEvent:"has-event",isDateRangeStart:"is-daterange-start",isDateRangeEnd:"is-daterange-end",isDateRange:"is-daterange"},i=t.isSelected===!0||t.isDateRange===!0,n=["datepicker-day"];if(t.isEmpty)if(t.showDaysInNextAndPreviousMonths)n.push("is-outside-current-month"),n.push("is-selection-disabled");else return'<td class="is-empty"></td>';for(let[c,h]of Object.entries(e))t.hasOwnProperty(c)&&t[c]&&n.push(h);let o=w._escape(t.day),a=w._escape(t.month),l=w._escape(t.year);return`<td data-day="${o}" class="${n.join(" ")}" aria-selected="${i}"><button class="datepicker-day-button" type="button" data-year="${l}" data-month="${a}" data-day="${o}">${o}</button></td>`}renderRow(t,e,i){return'<tr class="datepicker-row'+(i?" is-selected":"")+'">'+w._calendarMarkup((e?t.reverse():t).join(""),"tr")+"</tr>"}renderTable(t,e,i){return'<div class="datepicker-table-wrapper"><table cellpadding="0" cellspacing="0" class="datepicker-table" role="grid" aria-labelledby="'+w._escape(i)+'">'+this.renderHead(t)+this.renderBody(e)+"</table></div>"}renderHead(t){let e=[],i;for(i=0;i<7;i++){let n=w._escape(this.renderDayName(t,i)),o=w._escape(this.renderDayName(t,i,!0));e.push(`<th scope="col"><abbr title="${n}">${o}</abbr></th>`)}return"<thead><tr>"+(t.isRTL?e.reverse():e).join("")+"</tr></thead>"}renderBody(t){let e=t.join("");return"<tbody>"+w._calendarMarkup(e,"tbody")+"</tbody>"}static _calendarMarkup(t,e){let i=document.createElement("template");i.innerHTML=t;let n={tbody:"tr",tr:"td",td:"button"},o={tr:["class"],td:["class","data-day","aria-selected"],button:["class","type","data-year","data-month","data-day","aria-label","disabled","tabindex"]},a=(l,c)=>{if(l.nodeType===Node.TEXT_NODE){if((c==="tbody"||c==="tr")&&l.textContent.trim())throw new TypeError("Unsupported calendar row content");return w._escape(l.textContent)}if(!(l instanceof HTMLElement))throw new TypeError("Unsupported calendar row content");let h=n[c];if(!h||l.localName!==h)throw new TypeError("Unsupported calendar row element");if([...l.attributes].some(p=>!o[h].includes(p.name)))throw new TypeError("Unsupported calendar row attribute");if(h==="button"&&l.getAttribute("type")!=="button")throw new TypeError('Calendar day buttons require type="button"');let d=o[h].filter(p=>l.hasAttribute(p)).map(p=>` ${p}="${w._escape(l.getAttribute(p))}"`).join("");return`<${h}${d}>${[...l.childNodes].map(p=>a(p,h)).join("")}</${h}>`};return[...i.content.childNodes].map(l=>a(l,e)).join("")}_arrowState(t,e){let i=this.options,n=t===i.minYear,o=t===i.maxYear;return{prev:!(n&&(e===0||i.minMonth>=e)),next:!(o&&(e===11||i.maxMonth<=e))}}_controlsCacheKey(t){let e=this.options;return[t,e.minYear,e.maxYear,e.minMonth,e.maxMonth,Array.isArray(e.yearRange)?e.yearRange.join("-"):e.yearRange,e.yearRangeReverse,e.showMonthAfterYear].join("|")}renderTitle(t,e,i,n,o,a){let l=this.options,c=i===l.minYear,h=i===l.maxYear,d,p,g=[],m='<div id="'+w._escape(a)+'" class="datepicker-controls" role="heading" aria-live="assertive">',{prev:E,next:T}=this._arrowState(i,n);for(d=0;d<12;d++)g.push('<option value="'+(i===o?d-e:12+d-e)+'"'+(d===n?' selected="selected"':"")+(c&&d<l.minMonth||h&&d>l.maxMonth?'disabled="disabled"':"")+">"+w._escape(l.i18n.months[d])+"</option>");let C='<select class="datepicker-select orig-select-month" tabindex="-1">'+g.join("")+"</select>";for(Array.isArray(l.yearRange)?(d=l.yearRange[0],p=l.yearRange[1]+1):(d=i-l.yearRange,p=1+i+l.yearRange),g=[];d<p&&d<=l.maxYear;d++)d>=l.minYear&&g.push(`<option value="${d}" ${d===i?'selected="selected"':""}>${d}</option>`);l.yearRangeReverse&&g.reverse();let _=`<select class="datepicker-select orig-select-year" tabindex="-1">${g.join("")}</select>`;return m+=`<button class="month-prev${E?"":" is-disabled"}" type="button" aria-label="${w._escape(l.i18n.previousMonth)}"><svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg></button>`,m+='<div class="selects-container">',l.showMonthAfterYear?m+=_+C:m+=C+_,m+="</div>",m+=`<button class="month-next${T?"":" is-disabled"}" type="button" aria-label="${w._escape(l.i18n.nextMonth)}"><svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></svg></button>`,m+="</div>"}_batchDraws(t){this._drawDepth++;try{t()}finally{this._drawDepth--,this._drawDepth===0&&this._drawDirty&&(this._drawDirty=!1,this.draw())}}draw(){if(this._drawDepth>0){this._drawDirty=!0;return}let t=this.calendarEl.getRootNode().activeElement,e=t?.matches(".datepicker-day-button")&&this.calendarEl.contains(t),i=this.calendarEl.contains(t)&&t?.matches(".month-prev, .month-next")?t.classList.contains("month-prev")?".month-prev":".month-next":null,n=this._selectFocusRestorer(t),o=this.calendars[0].year,a=this.calendars[0].month;this._renderDateDisplay(this.date,this.endDate);let l=this._controlsCacheKey(o);l===this._controlsKey&&this.calendarEl.querySelector(".datepicker-controls")?this._reuseControls(o,a):(this._controlsKey=l,this._randId="datepicker-title-"+u.guid(),this._rebuildControls(o,a)),this._renderCalendarTable(o,a),this._syncCalendarFocus(!!e),i&&this.calendarEl.querySelector(i)?.focus(),n(),typeof this.options.onDraw=="function"&&this.options.onDraw.call(this)}_formSelect(t){let e=this.calendarEl.querySelector(t);return e?z.getInstance(e):void 0}_selectFocusRestorer(t){let e=n=>!!n&&(n.input===t||!!n.menuEl?.contains(t)),i=[".orig-select-year",".orig-select-month"].find(n=>e(this._formSelect(n)));return()=>{i&&!t.isConnected&&this._formSelect(i)?.input.focus()}}_rebuildControls(t,e){this.destroySelects(),this.calendarEl.innerHTML=this.renderTitle(this,0,t,e,t,this._randId);let i=this.calendarEl.querySelector(".orig-select-year"),n=this.calendarEl.querySelector(".orig-select-month");z.init(i,{classes:"select-year",menuOptions:{container:u.portalRoot(this.el),constrainWidth:!1}}),z.init(n,{classes:"select-month",menuOptions:{container:u.portalRoot(this.el),constrainWidth:!1}}),i.addEventListener("change",this._handleYearChange),n.addEventListener("change",this._handleMonthChange)}_reuseControls(t,e){let i=this.calendarEl.querySelector(".orig-select-month");i&&i.value!==e.toString()&&(i.value=e.toString(),z.getInstance(i)?.refresh());let{prev:n,next:o}=this._arrowState(t,e);this.calendarEl.querySelector(".month-prev")?.classList.toggle("is-disabled",!n),this.calendarEl.querySelector(".month-next")?.classList.toggle("is-disabled",!o)}_renderCalendarTable(t,e){let i=this.render(t,e,this._randId),n=this.calendarEl.querySelector(".datepicker-table-wrapper");n?n.outerHTML=i:this.calendarEl.insertAdjacentHTML("beforeend",i)}_setupEventHandlers(){this._addInputEventHandlers(this.el),this.endDateEl&&this._addInputEventHandlers(this.endDateEl),this._form=this.el.form;let{signal:t}=this._events;this._form?.addEventListener("reset",this._handleFormReset,{signal:t}),this.calendarEl.addEventListener("click",this._handleCalendarClick,{signal:t}),this.calendarEl.addEventListener("keydown",this._handleCalendarKeydown,{signal:t}),this.calendarEl.addEventListener("focusin",this._handleCalendarFocus,{signal:t})}_setupVariables(){let t=document.createElement("template");t.innerHTML=w._template.trim(),this.containerEl=t.content.firstChild,this.calendarEl=this.containerEl.querySelector(".datepicker-calendar"),this.dateTextEl=this.containerEl.querySelector(".date-text"),this.footer=this.containerEl.querySelector(".datepicker-footer")}_addInputEventHandlers(t){let{signal:e}=this._events;t.addEventListener("click",this._handleInputClick,{signal:e}),t.addEventListener("keydown",this._handleInputKeydown,{signal:e}),t.addEventListener("change",this._handleInputChange,{signal:e})}_removeDateInput(t){let e=t.getRootNode().activeElement===t;t.remove(),e&&document.activeElement===document.body&&this.el.focus()}_showDisplay(){this.displayPlugin?.show(),this.displayPlugin instanceof ue&&this._syncCalendarFocus(!0)}_dayDate(t){let e=new Date(0);return e.setFullYear(Number(t.dataset.year),Number(t.dataset.month),Number(t.dataset.day)),w._setToStartOfDay(e),e}_syncCalendarFocus(t=!1){let e=[...this.calendarEl.querySelectorAll(".datepicker-day-button")],i=e.filter(a=>!a.parentElement.classList.contains("is-selection-disabled")),n=this._focusedDate||this.date||new Date(new Date().setHours(0,0,0,0)),o=i.find(a=>w._compareDates(this._dayDate(a),n))||i.find(a=>a.parentElement.classList.contains("is-selected"))||i.find(a=>!a.parentElement.classList.contains("is-disabled"))||i[0];for(let a of e)a.tabIndex=a===o?0:-1,a.setAttribute("aria-disabled",String(a.parentElement.matches(".is-disabled, .is-selection-disabled")));o&&(this._focusedDate=this._dayDate(o),t&&o.focus())}gotoMonth(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())}gotoYear(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())}_readBackMultiple(){for(let e of this.dateEls.splice(1))this._removeDateInput(e);this.dates=[],this._syncDataDate(this.el);let t=this._dateInInput(this.el);w._isDate(t)&&this._isSelectableDay(t)&&this.setDate(t,!0)}_syncDataDate(t){t.type==="date"&&this.setDataDate(t,w._parseDate(t.value))}_readBackSingle(){this.setSingleDate(null,!1),this.setSingleDate(null,!0);for(let t of[this.el,this.endDateEl])t&&this.setDateFromInput(t)}renderDayName(t,e,i=!1){for(e+=t.firstDay;e>=7;)e-=7;return i?t.i18n.weekdaysAbbrev[e]:t.i18n.weekdays[e]}createDateInput(){let t=this.el.cloneNode(!0);return t.removeAttribute("id"),t.classList.add("no-autoinit"),this._addInputEventHandlers(t),this.el.parentElement.appendChild(t),t}};w.key="Expressive_Datepicker",w._template=`
9
10
  <div class="datepicker-container">
10
11
  <div class="datepicker-date-display">
11
- <span class="year-text"></span>
12
12
  <span class="date-text"></span>
13
13
  </div>
14
14
  <div class="datepicker-calendar-container">
15
15
  <div class="datepicker-calendar"></div>
16
16
  <div class="datepicker-footer"></div>
17
17
  </div>
18
- </div>`;var gt=_;var xi={autoScroll:!0,defaultScrollPosition:"end",peek:64},Rt=2,Ci=new Set(["ArrowUp","PageUp","Home"]),Ee=["pointerup","pointercancel","touchend","touchcancel"],_t=class d extends E{constructor(t,e){super(t,e,d);this._opened=!1;this._following=!1;this._holding=!1;this._lastTop=0;this._target=null;this._distance=1/0;this._ref=null;this._refOffset=0;this._anchor=null;this._spacer=0;this._last=null;this._resizeObserver=null;this._mutationObserver=null;this._handleScroll=()=>{if(this._target!==null){let t=Math.abs(this.viewport.scrollTop-this._resolve(this._target));if(t>Rt&&t<this._distance){this._distance=t;return}this._target=null}this._settle()};this._handleUserScroll=t=>{t.type==="wheel"&&t.deltaY>=0||t.type==="keydown"&&!Ci.has(t.key)||(this._target=null,t.type==="pointerdown"||t.type==="touchstart"?this._holding=!0:this._following=!1)};this._handleRelease=()=>{this._holding&&(this._holding=!1,this._following&&(this.viewport.scrollTop=this.viewport.scrollHeight),this._sync())};this._handleButtonClick=()=>this.scrollToEnd();this._handleMutations=t=>{for(let i of t)i.addedNodes.forEach(s=>{s instanceof Element&&this._resizeObserver?.observe(s)}),i.removedNodes.forEach(s=>{s instanceof Element&&this._resizeObserver?.unobserve(s)});let e=this._last;if(this._last=this.viewport.lastElementChild,!!this._opened&&(!this._following&&this._target===null&&this._restore(),!!this.options.autoScroll&&!(e&&e.parentElement!==this.viewport))){for(let i=this._last;i&&i!==e;i=i.previousElementSibling)if(i.hasAttribute("data-scroll-anchor")){this._anchor=i,this._updateSpacer(),this._following=!0,this._scrollTo(this._top(i)-this.options.peek);return}}};this._handleResize=()=>{if(!this._opened){this.viewport.clientHeight>0&&this._open();return}this._updateSpacer();let t=this.viewport;this._target==="end"?this._scrollTo("end"):this._target===null&&(this._following&&!this._holding?t.scrollTop=t.scrollHeight:this._restore()),this._sync()};if(this.el.Expressive_MessageScroller=this,this.options={...d.defaults,...e},this.viewport=t.querySelector(":scope > .message-scroller-viewport"),this.button=t.querySelector(":scope > .message-scroller-button"),!this.viewport){console.error("MessageScroller needs a .message-scroller-viewport child.");return}if(this._last=this.viewport.lastElementChild,this.viewport.clientHeight>0&&this._open(),typeof ResizeObserver<"u"){this._resizeObserver=new ResizeObserver(this._handleResize),this._resizeObserver.observe(this.viewport,{box:"border-box"});for(let i of Array.from(this.viewport.children))this._resizeObserver.observe(i)}this._mutationObserver=new MutationObserver(this._handleMutations),this._mutationObserver.observe(this.viewport,{childList:!0}),this.viewport.addEventListener("scroll",this._handleScroll,{passive:!0});for(let i of["wheel","touchstart","pointerdown","keydown"])this.viewport.addEventListener(i,this._handleUserScroll,{passive:!0});for(let i of Ee)document.addEventListener(i,this._handleRelease);this.button?.addEventListener("click",this._handleButtonClick)}static get defaults(){return xi}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_MessageScroller}destroy(){if(this.el.Expressive_MessageScroller=void 0,!!this.viewport){this._resizeObserver?.disconnect(),this._mutationObserver?.disconnect(),this.viewport.removeEventListener("scroll",this._handleScroll);for(let t of["wheel","touchstart","pointerdown","keydown"])this.viewport.removeEventListener(t,this._handleUserScroll);for(let t of Ee)document.removeEventListener(t,this._handleRelease);this.viewport.style.removeProperty("--md-comp-message-scroller-spacer"),this.button&&(this.button.removeEventListener("click",this._handleButtonClick),this.button.inert=!1)}}scrollToEnd(){this._following=this.options.autoScroll,this._scrollTo("end")}scrollToStart(){this._following=!1,this._scrollTo(0)}scrollToMessage(t){let e=m.getElementById(this.viewport,t);return!e||!this.viewport.contains(e)?!1:(this._following=!1,this._scrollTo(this._top(e)-this.options.peek),!0)}_open(){this._opened=!0;let t=this.viewport,e=this.options.defaultScrollPosition,i=t.querySelectorAll(":scope > [data-scroll-anchor]"),s=e==="last-anchor"?i[i.length-1]:null;e==="start"?t.scrollTop=0:s&&this._contentEnd()-this._top(s)+this.options.peek>t.clientHeight?t.scrollTop=this._top(s)-this.options.peek:t.scrollTop=t.scrollHeight,this._settle()}_settle(){let t=this.viewport.scrollTop,e=this._following&&t>=this._lastTop-Rt;this._following=this.options.autoScroll&&(e||this._atEnd()),this._lastTop=t,this._capture(),this._sync()}_scrollTo(t){let e=this.viewport;if(Math.abs(e.scrollTop-this._resolve(t))<=Rt){this._target=null,this._settle();return}this._target=t,this._distance=1/0;let i=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;e.scrollTo({top:t==="end"?e.scrollHeight:t,behavior:i?"auto":"smooth"})}_resolve(t){let e=this.viewport.scrollHeight-this.viewport.clientHeight;return t==="end"?e:Math.max(0,Math.min(t,e))}_atEnd(){let t=this.viewport;return t.scrollHeight-t.scrollTop-t.clientHeight<=Rt}_top(t){let e=this.viewport;return t.getBoundingClientRect().top-e.getBoundingClientRect().top-e.clientTop+e.scrollTop}_contentEnd(){let t=this.viewport.lastElementChild;if(!t)return 0;let e=parseFloat(getComputedStyle(this.viewport).paddingBlockEnd)-this._spacer;return this._top(t)+t.getBoundingClientRect().height+e}_capture(){let t=this.viewport.children,e=this.viewport.getBoundingClientRect().top+this.viewport.clientTop,i=0,s=t.length-1;for(;i<s;){let o=i+s>>1;t[o].getBoundingClientRect().bottom>e?s=o:i=o+1}this._ref=t[i]??null,this._refOffset=this._ref?this._ref.getBoundingClientRect().top-e:0}_restore(){if(this._ref?.parentElement!==this.viewport){this._capture();return}let t=this.viewport.getBoundingClientRect().top+this.viewport.clientTop,e=this._ref.getBoundingClientRect().top-t-this._refOffset;Math.abs(e)>=1&&(this.viewport.scrollTop+=e)}_updateSpacer(){let t=0;if(this._anchor?.parentElement===this.viewport){let e=this._top(this._anchor)-this.options.peek+this.viewport.clientHeight;t=Math.max(0,Math.ceil(e-this._contentEnd()))}else this._anchor=null;t!==this._spacer&&(this._spacer=t,t?this.viewport.style.setProperty("--md-comp-message-scroller-spacer",`${t}px`):this.viewport.style.removeProperty("--md-comp-message-scroller-spacer"))}_sync(){if(!this.button)return;let t=this._atEnd(),e=this.button.getRootNode();t&&e.activeElement===this.button&&this.viewport.focus({preventScroll:!0}),this.button.inert=t}};var wi={Editor:null,extensions:[]},Ii=["aria-label","aria-labelledby","aria-describedby"],Bt=class d extends E{constructor(t,e){super(t,e,d);this.editor=null;this.content=null;this._actions=new Map;this._label=null;this._handleClick=t=>{let e=t.target.closest("button[data-command]"),i=this._actions.get(e);i&&!e.disabled&&this.editor.chain().focus()[i.command](i.attributes).run()};this._handleLabelClick=()=>{this.editor.chain().focus().run()};this._handleUpdate=()=>{this.textarea.value=this.editor.isEmpty?"":this.editor.getHTML(),this.textarea.dispatchEvent(new Event("input",{bubbles:!0}))};this._handleTransaction=()=>{let t=this.editor.isEditable&&this.editor.can();for(let[e,{command:i,attributes:s,active:o}]of this._actions){if(e.disabled=!t||!(i in this.editor.commands)||!t[i](s),!o)continue;let a=this.editor.isActive(o,s);e.setAttribute("aria-pressed",String(a)),e.classList.toggle("active",a)}};if(this.el.Expressive_RichTextEditor=this,this.options={...d.defaults,...e},this.textarea=t.querySelector(":scope > textarea"),!this.textarea||!this.options.Editor){console.error("RichTextEditor needs a <textarea> child and the Tiptap Editor class in options.Editor.");return}for(let s of t.querySelectorAll("button[data-command]")){let o=s.dataset.command,a=s.dataset.attributes?JSON.parse(s.dataset.attributes):void 0,r=o.startsWith("toggle")?o[6].toLowerCase()+o.slice(7):void 0;this._actions.set(s,{command:o,attributes:a,active:r})}let i={role:"textbox","aria-multiline":"true"};for(let s of Ii){let o=this.textarea.getAttribute(s);o&&(i[s]=o)}this._label=this.textarea.labels?.[0]??null,this._label&&!i["aria-labelledby"]&&(this._label.id||(this._label.id=`rich-text-editor-label-${m.guid()}`),i["aria-labelledby"]=this._label.id,this._label.addEventListener("click",this._handleLabelClick)),this.content=document.createElement("div"),this.content.className="rich-text-editor-content",this.textarea.after(this.content),this.textarea.hidden=!0,this.editor=new this.options.Editor({element:this.content,extensions:this.options.extensions,content:this.textarea.value,editable:!(this.textarea.disabled||this.textarea.readOnly),editorProps:{attributes:i}}),this.editor.on("update",this._handleUpdate),this.editor.on("transaction",this._handleTransaction),this._handleTransaction(),t.addEventListener("click",this._handleClick)}static get defaults(){return wi}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_RichTextEditor}destroy(){if(this.el.Expressive_RichTextEditor=void 0,!!this.editor){this.el.removeEventListener("click",this._handleClick),this._label?.removeEventListener("click",this._handleLabelClick),this.editor.off("update",this._handleUpdate),this.editor.off("transaction",this._handleTransaction),this.editor.destroy(),this.editor=null,this.content.remove(),this.textarea.hidden=!1;for(let t of this._actions.keys())t.disabled=!1,t.classList.remove("active"),t.removeAttribute("aria-pressed")}}};var be="https://tiles.openfreemap.org/styles/",ki={maplibregl:null,style:{light:`${be}positron`,dark:`${be}dark`},center:[0,20],zoom:1,mapOptions:{}},ye=d=>d.dataset.lngLat.split(",").map(Number);function Si([d,n],[t,e],i=32){let s=t>=d?.25:-.25,o=(d+t)/2-(e-n)*s,a=(n+e)/2+(t-d)*s;return Array.from({length:i+1},(r,h)=>{let c=h/i,l=1-c;return[l*l*d+2*l*c*o+c*c*t,l*l*n+2*l*c*a+c*c*e]})}var Nt=class d extends E{constructor(t,e){super(t,e,d);this.map=null;this.markers=[];this._children=[];this._popups=[];this._markerPopups=new Map;this._overlays=new Map;this._styleReady=!1;this._dark=!1;this._location=null;this._media=null;this._observer=null;this._zoomIn=[];this._zoomOut=[];this._handleStyleLoad=()=>{this._styleReady=!0;for(let t of this._overlays.values())t.draw()};this._handleScheme=()=>{let t=this._isDark();t!==this._dark&&(this._dark=t,this._styleReady=!1,this.map.setStyle(this._style(),{diff:!1}))};this._sync=()=>{let t=this.map.getZoom();for(let e of this._zoomIn)e.disabled=t>=this.map.getMaxZoom();for(let e of this._zoomOut)e.disabled=t<=this.map.getMinZoom();this.el.style.setProperty("--md-comp-map-bearing",`${-this.map.getBearing()}deg`)};this._handleFullscreen=()=>{for(let t of this._buttons("fullscreen"))t.setAttribute("aria-pressed",String(document.fullscreenElement===this.el))};this._handleClick=t=>{let e=t.target,i=e.closest(".map-controls [data-action]"),s=i?.dataset.action;if(s==="zoom-in")this.map.zoomIn();else if(s==="zoom-out")this.map.zoomOut();else if(s==="compass")this.map.resetNorthPitch();else if(s==="locate")this._locate(i);else if(s==="fullscreen")document.fullscreenElement===this.el?document.exitFullscreen():this.el.requestFullscreen();else{let o=e.closest(".map-marker");this._markerPopups.has(o)&&this._toggle(o)}};this._handleMapClick=t=>{let e=t.originalEvent.target;for(let[i,s]of this._markerPopups)!i.contains(e)&&!s.getElement()?.contains(e)&&s.remove()};this._handleKeydown=t=>{if(t.key==="Escape")for(let e of this._popups)e.getElement()?.contains(t.target)&&(t.preventDefault(),e.remove())};this.el.Expressive_MapView=this,this.options={...d.defaults,...e};let i=this.options.maplibregl;if(!i){console.error("MapView needs the maplibre-gl module in options.maplibregl.");return}this._children=[...t.children],this._zoomIn=[...this._buttons("zoom-in")],this._zoomOut=[...this._buttons("zoom-out")],this._dark=this._isDark(),this.map=new i.Map({...this.options.mapOptions,container:t,style:this._style(),center:this.options.center,zoom:this.options.zoom}),this.map.on("style.load",this._handleStyleLoad),this.map.on("move",this._sync),this.map.on("click",this._handleMapClick);let s=this._children.filter(a=>a instanceof HTMLElement),o=new Set;for(let a of s.filter(r=>r.matches(".map-marker[data-lng-lat]"))){let r=a.hasAttribute("aria-controls")?m.getElementById(a,a.getAttribute("aria-controls")):null,h=r?.parentElement===t&&r.matches(".map-popup")?r:null;h&&o.add(h),this._addMarker(a,h)}for(let a of s.filter(r=>r.matches(".map-popup[data-lng-lat]")&&!o.has(r)))this._popup(a,0).setLngLat(ye(a)).addTo(this.map);this._themed()&&(this._media=matchMedia("(prefers-color-scheme: dark)"),this._media.addEventListener("change",this._handleScheme),this._observer=new MutationObserver(this._handleScheme),this._observer.observe(document.documentElement,{attributes:!0,attributeFilter:["theme"],subtree:!0}));for(let a of this._buttons("fullscreen"))a.hidden=!document.fullscreenEnabled;document.addEventListener("fullscreenchange",this._handleFullscreen),t.addEventListener("click",this._handleClick),t.addEventListener("keydown",this._handleKeydown),this._sync()}static get defaults(){return ki}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_MapView}destroy(){if(this.el.Expressive_MapView=void 0,!!this.map){this.el.removeEventListener("click",this._handleClick),this.el.removeEventListener("keydown",this._handleKeydown),document.removeEventListener("fullscreenchange",this._handleFullscreen),this._media?.removeEventListener("change",this._handleScheme),this._observer?.disconnect();for(let t of this._overlays.values())t.off?.();for(let t of this._popups)t.remove();for(let t of this.markers){t.remove();let e=t.getElement();e.classList.remove(...[...e.classList].filter(i=>i.startsWith("maplibregl-"))),e.style.removeProperty("transform"),e.style.removeProperty("opacity"),e.hasAttribute("aria-controls")&&e.removeAttribute("aria-expanded")}this._location?.remove(),this._location=null,this.map.remove(),this.map=null,this.markers=[],this._popups=[],this._markerPopups.clear(),this._overlays.clear(),this.el.style.removeProperty("--md-comp-map-bearing");for(let t of this.el.querySelectorAll(".map-controls [data-action]"))t.disabled=!1,t.hidden=!1,t.removeAttribute("aria-pressed");this.el.append(...this._children)}}addRoute(t,e,i={}){this._line(t,{type:"LineString",coordinates:e},"route",{width:4,...i})}addArcs(t,e,i={}){this._line(t,{type:"MultiLineString",coordinates:e.map(({from:s,to:o})=>Si(s,o))},"arc",{width:2,...i})}addClusters(t,e,i={}){let s=`${t}-clusters`,o=`${t}-points`,a=async l=>{let[u]=l.features,f=await this.map.getSource(t).getClusterExpansionZoom(u.properties.cluster_id);this.map.easeTo({center:u.geometry.coordinates,zoom:f})},r=()=>{this.map.getCanvas().style.cursor="pointer"},h=()=>{this.map.getCanvas().style.cursor=""},c=l=>{this.map[l]("click",s,a);for(let u of[s,o])this.map[l]("mouseenter",u,r),this.map[l]("mouseleave",u,h)};this._draw(t,{draw:()=>{let l=i.color??this._color("var(--md-comp-map-cluster-color)"),u=this._color("var(--md-comp-map-marker-ring-color)");this.map.addSource(t,{type:"geojson",data:e,cluster:!0,clusterRadius:i.radius??50,clusterMaxZoom:i.maxZoom??14}),this.map.addLayer({id:s,type:"circle",source:t,filter:["has","point_count"],paint:{"circle-color":l,"circle-radius":["step",["get","point_count"],16,10,20,100,26],"circle-stroke-width":6,"circle-stroke-color":l,"circle-stroke-opacity":.3}});let f=this.map.getStyle(),p=f.glyphs&&f.layers.find(v=>v.layout?.["text-font"])?.layout["text-font"];p&&this.map.addLayer({id:`${t}-count`,type:"symbol",source:t,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],"text-font":p,"text-size":12},paint:{"text-color":this._color("var(--md-comp-map-cluster-label-color)")}}),this.map.addLayer({id:o,type:"circle",source:t,filter:["!",["has","point_count"]],paint:{"circle-color":l,"circle-radius":6,"circle-stroke-width":2,"circle-stroke-color":u}})},off:()=>c("off")}),c("on")}removeOverlay(t){let e=this._overlays.get(t);if(e&&(this._overlays.delete(t),e.off?.(),!(!this._styleReady||!this.map.getSource(t)))){for(let i of this.map.getStyle().layers)i.source===t&&this.map.removeLayer(i.id);this.map.removeSource(t)}}_line(t,e,i,s){this._draw(t,{draw:()=>{this.map.addSource(t,{type:"geojson",data:{type:"Feature",properties:{},geometry:e}}),this.map.addLayer({id:t,type:"line",source:t,layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":s.color??this._color(`var(--md-comp-map-${i}-color)`),"line-width":s.width,"line-opacity":s.opacity??1,...s.dashArray&&{"line-dasharray":s.dashArray}}})}})}_draw(t,e){this.removeOverlay(t),this._overlays.set(t,e),this._styleReady&&e.draw()}_addMarker(t,e){let i=new this.options.maplibregl.Marker({element:t,draggable:t.hasAttribute("data-draggable")}).setLngLat(ye(t)).addTo(this.map);if(i.on("dragend",()=>{let{lng:o,lat:a}=i.getLngLat();t.dataset.lngLat=`${o},${a}`,t.dispatchEvent(new Event("change",{bubbles:!0}))}),this.markers.push(i),!e)return;t.setAttribute("aria-expanded","false");let s=this._popup(e,16);s.on("open",()=>t.setAttribute("aria-expanded","true")),s.on("close",()=>{t.setAttribute("aria-expanded","false"),(!document.activeElement||document.activeElement===document.body)&&t.focus()}),this._markerPopups.set(t,s)}_popup(t,e){let i=new this.options.maplibregl.Popup({closeOnClick:!1,maxWidth:"none",offset:e}).setDOMContent(t);return this._popups.push(i),i}_toggle(t){let e=this._markerPopups.get(t);e.isOpen()?e.remove():e.setLngLat(this.markers.find(i=>i.getElement()===t).getLngLat()).addTo(this.map)}_buttons(t){return this.el.querySelectorAll(`.map-controls [data-action="${t}"]`)}_locate(t){navigator.geolocation?.getCurrentPosition(({coords:e})=>{if(!this.map)return;let i=[e.longitude,e.latitude];if(!this._location){let s=document.createElement("span");s.className="map-marker location",s.setAttribute("aria-hidden","true"),this._location=new this.options.maplibregl.Marker({element:s})}this._location.setLngLat(i).addTo(this.map),this.map.flyTo({center:i,zoom:Math.max(this.map.getZoom(),14)})},e=>{this.map&&e.code===e.PERMISSION_DENIED&&(t.disabled=!0)})}_color(t){let e=document.createElement("span");e.hidden=!0,e.style.color=t,this.el.append(e);let i=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});i.fillStyle=getComputedStyle(e).color,e.remove(),i.fillRect(0,0,1,1);let[s,o,a,r]=i.getImageData(0,0,1,1).data;return`rgba(${s}, ${o}, ${a}, ${Math.round(r/255*100)/100})`}_isDark(){return this._color("light-dark(black, white)")==="rgba(255, 255, 255, 1)"}_themed(){let t=this.options.style;return typeof t=="object"&&"light"in t&&"dark"in t}_style(){return this._themed()?this.options.style[this._dark?"dark":"light"]:this.options.style}};var Ai={inDuration:275,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},B=class B extends E{constructor(t,e){super(t,e,B);this._changedAncestorList=[];this._timers=new Map;this._motion=window.matchMedia("(prefers-reduced-motion: reduce)");this._isOpen=!1;this._destroyed=!1;this._revision=0;this._handleMotionChange=()=>{if(!this._motion.matches)return;let t=[...this._timers.values()],e=this._cancel();for(let i of t){if(e!==this._revision)break;i()}if(this.overlayActive)for(let i of[this.el,this._overlay,this._photoCaption])i&&(i.style.transition="none")};this._handleLightboxKeypress=t=>{this._trigger===this.el&&(t.key===m.keys.ENTER||t.key===" ")&&(t.preventDefault(),this._handleLightboxToggle())};this._handleLightboxToggle=()=>{this._isOpen?this.close():this.open()};this._handleWindowChange=()=>{this.overlayActive&&this.close()};this._handleWindowEscape=t=>{t.key===m.keys.ESC&&this.close()};this.open=()=>{if(this._destroyed||this._isOpen)return;let t=this._cancel();this.overlayActive&&this._reset(),this._isOpen=!0,this._updateVars();let e=this.el.getBoundingClientRect(),i=this.placeholder.getBoundingClientRect();if(this.originalWidth=e.width,this.originalHeight=e.height,this.doneAnimating=!1,this.el.classList.add("active"),this.overlayActive=!0,typeof this.options.onOpenStart=="function"&&this.options.onOpenStart.call(this,this.el),t!==this._revision)return;this.placeholder.style.width=i.width+"px",this.placeholder.style.height=i.height+"px",this.placeholder.style.position="relative",this.placeholder.style.top="0",this.placeholder.style.left="0",this._makeAncestorsOverflowVisible(),this.el.style.position="absolute",this.el.style.zIndex="1000",this.el.style.willChange="left, top, width, height",this.attrWidth=this.el.getAttribute("width"),this.attrHeight=this.el.getAttribute("height"),this.attrWidth&&(this.el.style.width=this.attrWidth+"px",this.el.removeAttribute("width")),this.attrHeight&&(this.el.style.height=this.attrHeight+"px",this.el.removeAttribute("height")),this._addOverlay(),this.caption!==""&&this._addCaption();let s=this.originalWidth/this.windowWidth,o=this.originalHeight/this.windowHeight;if(s>o){let a=this.originalHeight/this.originalWidth;this.newWidth=this.windowWidth*.9,this.newHeight=this.windowWidth*.9*a}else{let a=this.originalWidth/this.originalHeight;this.newWidth=this.windowHeight*.9*a,this.newHeight=this.windowHeight*.9}window.addEventListener("scroll",this._handleWindowChange,{passive:!0}),window.addEventListener("resize",this._handleWindowChange,{passive:!0}),window.addEventListener("keyup",this._handleWindowEscape),this._animateImageIn()};this.close=()=>{if(this._destroyed||!this._isOpen)return;let t=this._cancel();this._isOpen=!1,this.doneAnimating=!1,typeof this.options.onCloseStart=="function"&&this.options.onCloseStart.call(this,this.el),t===this._revision&&(window.removeEventListener("scroll",this._handleWindowChange),window.removeEventListener("resize",this._handleWindowChange),window.removeEventListener("keyup",this._handleWindowEscape),this._overlay&&this._fadeOut(this._overlay),this._photoCaption&&this._fadeOut(this._photoCaption),this._animateImageOut())};this.el.Expressive_Lightbox=this,this.options={...B.defaults,...e},this.overlayActive=!1,this.doneAnimating=!0,this.placeholder=document.createElement("div"),this.placeholder.classList.add("material-placeholder"),this.originalWidth=0,this.originalHeight=0,this.originInlineStyles=this.el.getAttribute("style"),this.caption=this.el.getAttribute("data-caption")||"",this._tabindex=this.el.getAttribute("tabindex"),this._trigger=this.el.closest("button")??this.el,this.el.tabIndex=this._trigger===this.el?0:-1,this.el.before(this.placeholder),this.placeholder.append(this.el),this._setupEventHandlers()}static get defaults(){return Ai}static init(t,e={}){return super.init(t,e,B)}static getInstance(t){return t.Expressive_Lightbox}destroy(){if(this._destroyed)return;this._destroyed=!0;let t=this.el.getRootNode(),e=t.activeElement===this.el;this._removeEventHandlers(),this._cancel(),this._reset(),this.placeholder.replaceWith(this.el);let i=document.activeElement;for(;i?.shadowRoot?.activeElement;)i=i.shadowRoot.activeElement;e&&(i===document.body||i===t.host)&&this._trigger.focus(),this._tabindex===null?this.el.removeAttribute("tabindex"):this.el.setAttribute("tabindex",this._tabindex),this.el.Expressive_Lightbox=void 0}_reset(){window.removeEventListener("scroll",this._handleWindowChange),window.removeEventListener("resize",this._handleWindowChange),window.removeEventListener("keyup",this._handleWindowEscape),this._overlay?.remove(),this._photoCaption?.remove();for(let t of this._changedAncestorList){let e=B._overflow.get(t);--e.count===0&&(t.style.setProperty("overflow",e.value,e.priority),B._overflow.delete(t))}this._changedAncestorList=[],this.attrWidth!=null&&this.el.setAttribute("width",this.attrWidth),this.attrHeight!=null&&this.el.setAttribute("height",this.attrHeight),this.el.classList.remove("active"),this.placeholder.removeAttribute("style"),this.originInlineStyles===null?this.el.removeAttribute("style"):this.el.setAttribute("style",this.originInlineStyles),this.overlayActive=!1,this._isOpen=!1,this.doneAnimating=!0}_cancel(){for(let t of this._timers.keys())clearTimeout(t);return this._timers.clear(),++this._revision}_schedule(t,e){if(this._motion.matches){t();return}let i=setTimeout(()=>{this._timers.delete(i),t()},e);this._timers.set(i,t)}_setupEventHandlers(){this._motion.addEventListener("change",this._handleMotionChange),this._trigger.addEventListener("click",this._handleLightboxToggle),this.el.addEventListener("keydown",this._handleLightboxKeypress)}_removeEventHandlers(){this._motion.removeEventListener("change",this._handleMotionChange),this._trigger.removeEventListener("click",this._handleLightboxToggle),this.el.removeEventListener("keydown",this._handleLightboxKeypress)}_makeAncestorsOverflowVisible(){this._changedAncestorList=[];let t=this.placeholder.parentNode;for(;t!=null&&t!==document;){let e=t;if(e.style&&(e.style.overflow!=="visible"||B._overflow.has(e))){let i=B._overflow.get(e)??{count:0,value:e.style.overflow,priority:e.style.getPropertyPriority("overflow")};i.count++,B._overflow.set(e,i),this._changedAncestorList.push(e),e.style.overflow="visible"}t=t.parentNode??t.host}}_offset(t){let e=t.getBoundingClientRect(),i=document.documentElement;return{top:e.top+window.scrollY-i.clientTop,left:e.left+window.scrollX-i.clientLeft}}_updateVars(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.caption=this.el.getAttribute("data-caption")||""}_animateImageIn(){this.el.style.maxHeight=this.newHeight.toString()+"px",this.el.style.maxWidth=this.newWidth.toString()+"px";let t=this._motion.matches?0:this.options.inDuration;this.el.style.transition="none",this.el.style.height=this.originalHeight+"px",this.el.style.width=this.originalWidth+"px",this._schedule(()=>{let e=this._offset(this.placeholder);this.el.style.transition=`height ${t}ms ease,
19
- width ${t}ms ease,
20
- left ${t}ms ease,
21
- top ${t}ms ease
22
- `,this.el.style.height=this.newHeight+"px",this.el.style.width=this.newWidth+"px",this.el.style.left=m.getDocumentScrollLeft()+this.windowWidth/2-e.left-this.newWidth/2+"px",this.el.style.top=m.getDocumentScrollTop()+this.windowHeight/2-e.top-this.newHeight/2+"px"},1),this._schedule(()=>{this.doneAnimating=!0,typeof this.options.onOpenEnd=="function"&&this.options.onOpenEnd.call(this,this.el)},t)}_animateImageOut(){let t=this._motion.matches?0:this.options.outDuration;this.el.style.transition=`height ${t}ms ease,
23
- width ${t}ms ease,
24
- left ${t}ms ease,
25
- top ${t}ms ease
26
- `,this.el.style.height=this.originalHeight+"px",this.el.style.width=this.originalWidth+"px",this.el.style.left="0",this.el.style.top="0",this._schedule(()=>{this._reset(),typeof this.options.onCloseEnd=="function"&&this.options.onCloseEnd.call(this,this.el)},t)}_addCaption(){this._photoCaption=document.createElement("div"),this._photoCaption.classList.add("lightbox-caption"),this._photoCaption.innerText=this.caption,m.portalRoot(this.el).append(this._photoCaption),this._photoCaption.style.display="inline",this._fadeIn(this._photoCaption)}_addOverlay(){this._overlay=document.createElement("div"),this._overlay.id="lightbox-overlay",this._overlay.addEventListener("click",e=>{e.stopPropagation(),this.close()},{once:!0}),this.el.before(this._overlay);let t=this._overlay.getBoundingClientRect();this._overlay.style.width=this.windowWidth+"px",this._overlay.style.height=this.windowHeight+"px",this._overlay.style.left=-1*t.left+"px",this._overlay.style.top=-1*t.top+"px",this._fadeIn(this._overlay)}_fadeIn(t){t.style.transition="none",t.style.opacity="0";let e=this._motion.matches?0:this.options.inDuration;this._schedule(()=>{t.style.transition=`opacity ${e}ms ease`,t.style.opacity="1"},1)}_fadeOut(t){let e=this._motion.matches?0:this.options.outDuration;t.style.transition=`opacity ${e}ms ease`,t.style.opacity="0"}};B._overflow=new WeakMap;var Et=B;var Le=d=>`a[href="#${d}"]`,Oi={scrollOffset:200,activeClass:"active",getActiveElement:Le,keepTopElementActive:!1},M=class M extends E{constructor(t,e){super(t,e,M);this._ratio=0;this._link=null;this.el.Expressive_ScrollSpy=this,this.options={...M.defaults,...e},this._offset=this.el.style.getPropertyValue("--md-comp-scrollspy-offset"),this._offsetPriority=this.el.style.getPropertyPriority("--md-comp-scrollspy-offset"),this.el.style.setProperty("--md-comp-scrollspy-offset",`${this.options.scrollOffset}px`),M._elements.push(this),typeof IntersectionObserver<"u"&&(this._observer=new IntersectionObserver(i=>{if(M.getInstance(this.el)===this){for(let s of i)this._ratio=s.isIntersecting?s.intersectionRatio:0;M._syncActive(this.options.getActiveElement)}},{rootMargin:`-${this.options.scrollOffset}px 0px -45% 0px`,threshold:[0,.1,.25,.5,.75,1]}),this._observer.observe(this.el))}static get defaults(){return Oi}static init(t,e={}){return super.init(t,e,M)}static getInstance(t){return t.Expressive_ScrollSpy}destroy(){let t=M._elements.indexOf(this);if(t<0)return;M._elements.splice(t,1),this._observer?.disconnect();let e=this.options.getActiveElement;M._active.get(e)===this&&M._clearActive(e),this.el.style.setProperty("--md-comp-scrollspy-offset",this._offset,this._offsetPriority),this.el.Expressive_ScrollSpy=void 0,M._syncActive(e)}static _syncActive(t){let e=M._elements.filter(r=>r.options.getActiveElement===t),i=null,s=0;for(let r of e){let h=r._ratio;h>s&&(s=h,i=r)}if(!i){let r=e.filter(h=>h.options.keepTopElementActive);i=M._nearestAbove(r)??r[0]}let o=M._active.get(t);if(i&&o===i&&i._link?.isConnected)return;let a=i?M._linkFor(i.el.id,i.options):null;o===i&&o?._link===a||(M._clearActive(t),a&&(a.classList.add(i.options.activeClass),a.setAttribute("aria-current","true"),i._link=a,M._active.set(t,i)))}static _nearestAbove(t){let e=null,i=-1/0;for(let s of t){let o=s.el.getBoundingClientRect().top;o<=0&&o>=i&&(i=o,e=s)}return e}static _clearActive(t){let e=M._active.get(t);e&&(e._link?.classList.remove(e.options.activeClass),e._link?.removeAttribute("aria-current"),e._link=null,M._active.delete(t))}static _linkFor(t,e){if(!t)return null;if(e.getActiveElement!==Le)try{return document.querySelector(e.getActiveElement(t))}catch{return null}let i=`#${t}`;return Array.from(document.querySelectorAll('a[href^="#"]')).find(s=>s.getAttribute("href")===i)??null}};M._elements=[],M._active=new Map;var bt=M;var Hi={onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},Di="(width < 600px)";function Te(d){let n=d.activeElement;for(;n?.shadowRoot?.activeElement;)n=n.shadowRoot.activeElement;return n}var yt=class d extends E{constructor(t,e){super(t,e,d);this.expand=()=>{this.isExpanded||(typeof this.options.onOpenStart=="function"&&this.options.onOpenStart.call(this,this.el),this.isExpanded=!0,this.el.classList.add("expanded"),this._sync(),typeof this.options.onOpenEnd=="function"&&this.options.onOpenEnd.call(this,this.el))};this.collapse=()=>{this.isExpanded&&(typeof this.options.onCloseStart=="function"&&this.options.onCloseStart.call(this,this.el),this.isExpanded=!1,this.el.classList.remove("expanded"),this._sync(),typeof this.options.onCloseEnd=="function"&&this.options.onCloseEnd.call(this,this.el))};this.toggle=()=>{this.isExpanded?this.collapse():this.expand()};this._onClick=t=>{let e=t.target;if(e instanceof Node){if(this._toggle?.contains(e)){this.toggle(),t.preventDefault();return}e===this.el&&this.isExpanded&&this._isModal()&&this.collapse()}};this._onKeyDown=t=>{if(!(t.key!=="Escape"||t.defaultPrevented)&&this.isExpanded&&this._isModal()){let e=this.el.getRootNode(),i=this.el.contains(e.activeElement),s=Te(e);this.collapse(),!this.isExpanded&&i&&Te(e)===s&&this._toggle?.focus()}};this.el.Expressive_NavigationRail=this,this.options={...d.defaults,...e},this._toggle=this._findToggle(),this._mql=window.matchMedia(Di),this.isExpanded=this.el.classList.contains("expanded"),this._sync(),this.el.addEventListener("click",this._onClick),document.addEventListener("keydown",this._onKeyDown)}static get defaults(){return Hi}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_NavigationRail}destroy(){this.el.removeEventListener("click",this._onClick),document.removeEventListener("keydown",this._onKeyDown),this.el.Expressive_NavigationRail=void 0}_findToggle(){let t=this.el.querySelector(":scope > button:not(.button)");return t instanceof HTMLButtonElement?t:null}_isCompact(){return this._mql.matches}_isModal(){return this.el.classList.contains("modal")||this._isCompact()}_sync(){this.el.setAttribute("aria-expanded",this.isExpanded?"true":"false"),this._toggle?.setAttribute("aria-expanded",this.isExpanded?"true":"false")}};var Pi={duration:300,onShow:null,swipeable:!1,responsiveThreshold:1/0},Lt=class d extends E{constructor(t,e){var i;super(t,e,d);this._originalPanels=new Map;this._originalLinks=new Map;this._handleWindowResize=m.throttle(()=>{this._setTabsAndTabWidth(),this._tabWidth!==0&&this._tabsWidth!==0&&this._positionIndicator()},200);this._handleTabClick=t=>{let e=t.target;if(!e)return;let i=e.closest("a");if(!i||!Array.from(this._tabLinks).includes(i))return;let s=i.parentElement;if(i.classList.contains("disabled")||i.getAttribute("aria-disabled")==="true"||s?.classList.contains("disabled")){t.preventDefault();return}if(i.hasAttribute("target"))return;if(this.options.swipeable){let h=this._tabsCarousel.images.indexOf(this._panelFor(i));h>=0&&this._tabsCarousel.set(h),t.preventDefault();return}let a=this._content;this._tabLinks=this._queryTabLinks();let r=this._index;this._setActiveTabLink(i),this._content&&(this._content.style.display="block",this._content.classList.add("active"),typeof this.options.onShow=="function"&&this.options.onShow.call(this,this._content),a&&a!==this._content&&(a.style.display="none",a.classList.remove("active"))),this._setTabsAndTabWidth(),this._animateIndicator(r),t.preventDefault()};if(this.el.Expressive_Tabs=this,this.options={...d.defaults,...e},this._tabLinks=this._queryTabLinks(),!this._tabLinks.length){console.error("Tabs: no tab links (an <a> child, or one inside .tab) to show");return}this._tabLinks.forEach(s=>{this._originalLinks.set(s,{active:s.classList.contains("active"),current:s.getAttribute("aria-current")});let o=this._panelFor(s);o&&this._originalPanels.set(o,{display:o.style.display,priority:o.style.getPropertyPriority("display"),active:o.classList.contains("active"),carousel:o.classList.contains("carousel-item")})}),(i=this.options).swipeable&&(i.swipeable=window.innerWidth<=this.options.responsiveThreshold&&this._originalPanels.size>0),this._index=0,this._setupActiveTabLink(),this.options.swipeable?this._setupSwipeableTabs():this._setupNormalTabs(),this._setTabsAndTabWidth(),this._createIndicator(),this._setupEventHandlers(),document.fonts?.ready.then(()=>{this.el.Expressive_Tabs===this&&this._handleWindowResize()})}static get defaults(){return Pi}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_Tabs}destroy(){this._removeEventHandlers(),this._indicator?.remove(),this._tabsCarousel&&this._teardownSwipeableTabs(),this._originalPanels.forEach((t,e)=>{e.style.setProperty("display",t.display,t.priority),e.classList.toggle("active",t.active),e.classList.toggle("carousel-item",t.carousel),e.className||e.removeAttribute("class")}),this._originalLinks.forEach((t,e)=>{e.classList.toggle("active",t.active),t.current===null?e.removeAttribute("aria-current"):e.setAttribute("aria-current",t.current)}),this.el.Expressive_Tabs=void 0}get index(){return this._index}_setupEventHandlers(){window.addEventListener("resize",this._handleWindowResize),this.el.addEventListener("click",this._handleTabClick)}_removeEventHandlers(){window.removeEventListener("resize",this._handleWindowResize),this.el.removeEventListener("click",this._handleTabClick)}_queryTabLinks(){return this.el.querySelectorAll(":scope > a, :scope > .tab > a")}_createIndicator(){let t=this.el.tagName==="UL"||this.el.tagName==="OL"?"li":"span",e=document.createElement(t);e.classList.add("indicator"),this.el.appendChild(e),this._indicator=e,this._positionIndicator()}_positionIndicator(){let t=this._calcLeftPos(this._activeTabLink),e=this._calcRightPos(this._activeTabLink);this._indicator.style.left=t+"px",this._indicator.style.right=e+"px"}_panelFor(t){return!t.hash||t.hasAttribute("target")?null:document.getElementById(t.hash.slice(1))}_setActiveTabLink(t){Array.from(this._tabLinks).forEach(e=>{e.classList.remove("active"),e.removeAttribute("aria-current")}),this._activeTabLink=t,t.classList.add("active"),t.setAttribute("aria-current","page"),this._index=Array.from(this._tabLinks).indexOf(t),this._content=this._panelFor(t)}_setupActiveTabLink(){this._activeTabLink=Array.from(this._tabLinks).find(t=>t.getAttribute("href")===location.hash)??this.el.querySelector("a.active")??this._tabLinks[0],this._setActiveTabLink(this._activeTabLink),this._originalPanels.forEach((t,e)=>e.classList.toggle("active",e===this._content))}_setupSwipeableTabs(){let t=[];this._tabLinks.forEach(i=>{let s=this._panelFor(i);s&&(s.classList.add("carousel-item"),t.push(s))});let e=document.createElement("div");e.classList.add("tabs-content","carousel","flat"),t[0].parentElement.insertBefore(e,t[0]),t.forEach(i=>{let s=document.createComment("");i.before(s),this._originalPanels.get(i).marker=s,e.appendChild(i),i.style.display=""}),this._tabsCarousel=U.init(e,{fullWidth:!0,noWrap:!0,duration:this.options.duration,onCycleTo:i=>{let s=this._index;this._setActiveTabLink(Array.from(this._tabLinks).find(o=>!o.hasAttribute("target")&&o.hash==="#"+i.id)),this._setTabsAndTabWidth(),this._animateIndicator(s),typeof this.options.onShow=="function"&&this.options.onShow.call(this,this._content)}})}_teardownSwipeableTabs(){let t=this._tabsCarousel.el;this._tabsCarousel.destroy(),this._originalPanels.forEach((e,i)=>e.marker?.replaceWith(i)),t.remove()}_setupNormalTabs(){Array.from(this._tabLinks).forEach(t=>{if(t===this._activeTabLink)return;let e=this._panelFor(t);e&&(e.style.display="none")})}_setTabsAndTabWidth(){this._tabsWidth=this.el.getBoundingClientRect().width,this._tabWidth=Math.max(this._tabsWidth,this.el.scrollWidth)/this._tabLinks.length}_calcRightPos(t){return Math.ceil(this._tabsWidth-t.offsetLeft-t.getBoundingClientRect().width)}_calcLeftPos(t){return Math.floor(t.offsetLeft)}updateTabIndicator(){this._setTabsAndTabWidth(),this._animateIndicator(this._index)}_animateIndicator(t){let e=0,i=0;this._index-t>=0?e=90:i=90,this._indicator.style.transition=`
27
- left ${this.options.duration}ms ease-out ${e}ms,
28
- right ${this.options.duration}ms ease-out ${i}ms`,this._positionIndicator()}select(t){let e=Array.from(this._tabLinks).find(i=>i.getAttribute("href")==="#"+t);e&&e.click()}};var Ri={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:"now",fromNow:0,showClearBtn:!1,autoSubmit:!0,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",hours:"Hours",minutes:"Minutes"},twelveHour:!0,vibrate:!0,onSelect:null,onInputInteraction:null,onDone:null,onCancel:null,displayPlugin:null,displayPluginOptions:null},x=class x extends E{constructor(t,e){super(t,e,x);this._dragPointerId=null;this._clockBuilt=!1;this._handleInputClick=()=>{this._updateTimeFromInput(),this._ensureClockBuilt(),this.displayPlugin&&this.displayPlugin.show(),this.inputHours.focus(),typeof this.options.onInputInteraction=="function"&&this.options.onInputInteraction.call(this)};this._handleInputKeydown=t=>{t.key===m.keys.ENTER&&(t.preventDefault(),this._handleInputClick())};this._handleClockClickStart=t=>{if(!t.isPrimary||t.pointerType==="mouse"&&t.button!==0)return;t.preventDefault(),this._ensureClockBuilt();let e=this.plate.getBoundingClientRect(),i={x:e.left,y:e.top};this.x0=i.x+this.options.dialRadius,this.y0=i.y+this.options.dialRadius,this.moved=!1,this._dragPointerId=t.pointerId,this.dx=t.clientX-this.x0,this.dy=t.clientY-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener("pointermove",this._handleDocumentClickMove),document.addEventListener("pointerup",this._handleDocumentClickEnd),document.addEventListener("pointercancel",this._handleDocumentClickCancel)};this._handleDocumentClickMove=t=>{if(t.pointerId!==this._dragPointerId)return;t.preventDefault();let e=t.clientX-this.x0,i=t.clientY-this.y0;this.moved=!0,this.setHand(e,i,!1)};this._handleDocumentClickEnd=t=>{if(t.pointerId!==this._dragPointerId)return;this._dragPointerId=null,t.preventDefault(),this._removeDragListeners();let e=t.clientX-this.x0,i=t.clientY-this.y0;this.moved&&e===this.dx&&i===this.dy&&this.setHand(e,i),this.currentView==="hours"?(this.inputMinutes.focus(),this.showView("minutes",this.options.duration/2)):(clearTimeout(this._autoSubmitTimer),this._autoSubmitTimer=setTimeout(()=>{this._autoSubmitTimer=null,this.options.autoSubmit&&this.done()},this.options.duration/2)),typeof this.options.onSelect=="function"&&this.options.onSelect.call(this,this.hours,this.minutes)};this._handleDocumentClickCancel=t=>{t.pointerId===this._dragPointerId&&(this._dragPointerId=null,this.moved=!1,this._removeDragListeners())};this._handleAmPmClick=t=>{this._handleAmPmInteraction(t.target)};this._handleAmPmInteraction=t=>{this.amOrPm=t.classList.contains("am-btn")?"AM":"PM",this._updateAmPmView()};this.showView=(t,e=null)=>{this._ensureClockBuilt();let i=t==="hours",s=i?this.hoursView:this.minutesView,o=i?this.minutesView:this.hoursView;this.currentView=t,o.classList.add("timepicker-dial-out"),s.style.visibility="visible",s.classList.remove("timepicker-dial-out"),this.resetClock(e),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout(()=>{o.style.visibility="hidden"},this.options.duration)};this._inputFromTextField=t=>{let e=t.target,i=e===this.inputHours;if(!i&&e!==this.inputMinutes)return;this._cancelClockReset();let s=Number(e.value),o=i&&this.options.twelveHour?1:0,a=i?this.options.twelveHour?12:23:59;!e.value.trim()||!Number.isInteger(s)||s<o||s>a||(this[i?"hours":"minutes"]=s,this.drawClockFromTimeInput(s,i))};this.done=(t=null)=>{let e=this.el.value,i=t?"":x._addLeadingZero(this.hours)+":"+x._addLeadingZero(this.minutes);this.time=i,!t&&this.options.twelveHour&&(i=`${i} ${this.amOrPm}`),this.el.value=i,i!==e&&this.el.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0,composed:!0}))};this.confirm=()=>{this.done(),typeof this.options.onDone=="function"&&this.options.onDone.call(this)};this.cancel=()=>{typeof this.options.onCancel=="function"&&this.options.onCancel.call(this)};this.clear=()=>{this.done(!0)};this.el.Expressive_Timepicker=this,this.options={...x.defaults,...e,i18n:{...x.defaults.i18n,...e?.i18n}},this.id=m.guid(),this._insertHTMLIntoDOM(),this._setupVariables(),this._setupEventHandlers(),this._pickerSetup(),this.options.displayPlugin==="docked"&&(this.displayPlugin=vt.init(this.el,this.containerEl,this.options.displayPluginOptions))}static get defaults(){return Ri}static init(t,e={}){return super.init(t,e,x)}static _addLeadingZero(t){return(t<10?"0":"")+t}static _createSVGEl(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}static getInstance(t){return t.Expressive_Timepicker}destroy(){clearTimeout(this._autoSubmitTimer),clearTimeout(this.toggleViewTimer),clearTimeout(this.vibrateTimer),this._cancelClockReset(),this._removeEventHandlers(),this.displayPlugin?.destroy(),this.containerEl.remove(),this.el.Expressive_Timepicker=void 0}_setupEventHandlers(){this.el.addEventListener("click",this._handleInputClick),this.el.addEventListener("keydown",this._handleInputKeydown),this.plate.addEventListener("pointerdown",this._handleClockClickStart),this.digitalClock.addEventListener("input",this._inputFromTextField),this.inputHours.addEventListener("focus",()=>this.showView("hours")),this.inputHours.addEventListener("focusout",()=>this.formatHours()),this.inputMinutes.addEventListener("focus",()=>this.showView("minutes")),this.inputMinutes.addEventListener("focusout",()=>this.formatMinutes())}_removeEventHandlers(){this.digitalClock.removeEventListener("input",this._inputFromTextField),this.el.removeEventListener("click",this._handleInputClick),this.el.removeEventListener("keydown",this._handleInputKeydown),this._removeDragListeners()}_removeDragListeners(){document.removeEventListener("pointermove",this._handleDocumentClickMove),document.removeEventListener("pointerup",this._handleDocumentClickEnd),document.removeEventListener("pointercancel",this._handleDocumentClickCancel)}_insertHTMLIntoDOM(){let t=document.createElement("template");t.innerHTML=x._template.trim(),this.containerEl=t.content.firstChild,this.containerEl.id="container-"+this.id;let e=this.options.container,i=e instanceof HTMLElement?e:document.querySelector(e);this.options.container&&i?i.append(this.containerEl):this.el.parentElement.appendChild(this.containerEl)}_setupVariables(){this.currentView="hours",this.canVibrate=typeof navigator.vibrate=="function",this._canvas=this.containerEl.querySelector(".timepicker-canvas"),this.plate=this.containerEl.querySelector(".timepicker-plate"),this.digitalClock=this.containerEl.querySelector(".timepicker-display-column"),this.hoursView=this.containerEl.querySelector(".timepicker-hours"),this.minutesView=this.containerEl.querySelector(".timepicker-minutes"),this.inputHours=this.containerEl.querySelector(".timepicker-input-hours"),this.inputMinutes=this.containerEl.querySelector(".timepicker-input-minutes"),this.inputHours.setAttribute("aria-label",this.options.i18n.hours),this.inputMinutes.setAttribute("aria-label",this.options.i18n.minutes),this.spanAmPm=this.containerEl.querySelector(".timepicker-span-am-pm"),this.footer=this.containerEl.querySelector(".timepicker-footer"),this.amOrPm="PM"}_pickerSetup(){m.createButton(this.footer,this.options.i18n.clear,["timepicker-clear"],this.options.showClearBtn,this.clear),this.options.autoSubmit||m.createConfirmationContainer(this.footer,this.options.i18n.done,this.options.i18n.cancel,this.confirm,this.cancel),this._updateTimeFromInput(),this.options.displayPlugin||this.showView("hours")}_ensureClockBuilt(){this._clockBuilt||(this._clockBuilt=!0,this._clockSetup(),this._updateAmPmView())}_clockSetup(){this.options.twelveHour&&(this._amBtn=document.createElement("button"),this._amBtn.type="button",this._amBtn.classList.add("am-btn"),this._amBtn.innerText="AM",this._amBtn.addEventListener("click",this._handleAmPmClick),this.spanAmPm.appendChild(this._amBtn),this._pmBtn=document.createElement("button"),this._pmBtn.type="button",this._pmBtn.classList.add("pm-btn"),this._pmBtn.innerText="PM",this._pmBtn.addEventListener("click",this._handleAmPmClick),this.spanAmPm.appendChild(this._pmBtn)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}_buildSVGClock(){let t=this.options.dialRadius,e=this.options.tickRadius,i=t*2,s=x._createSVGEl("svg");s.setAttribute("class","timepicker-svg"),s.setAttribute("width",i.toString()),s.setAttribute("height",i.toString());let o=x._createSVGEl("g");o.setAttribute("transform","translate("+t+","+t+")");let a=x._createSVGEl("circle");a.setAttribute("class","timepicker-canvas-bearing"),a.setAttribute("cx","0"),a.setAttribute("cy","0"),a.setAttribute("r","4");let r=x._createSVGEl("line");r.setAttribute("x1","0"),r.setAttribute("y1","0");let h=x._createSVGEl("circle");h.setAttribute("class","timepicker-canvas-bg"),h.setAttribute("r",e.toString()),o.appendChild(r),o.appendChild(h),o.appendChild(a),s.appendChild(o),this._canvas.appendChild(s),this.hand=r,this.bg=h,this.bearing=a,this.g=o}_buildHoursView(){if(this.options.twelveHour)for(let t=1;t<13;t+=1){let e=t/6*Math.PI,i=this.options.outerRadius;this._buildHoursTick(t,e,i)}else for(let t=0;t<24;t+=1){let e=t/6*Math.PI,s=t>0&&t<13?this.options.innerRadius:this.options.outerRadius;this._buildHoursTick(t,e,s)}}_buildHoursTick(t,e,i){this._placeTick(this.hoursView,e,i,t===0?"00":t.toString())}_buildMinutesView(){for(let t=0;t<60;t+=5){let e=t/30*Math.PI;this._placeTick(this.minutesView,e,this.options.outerRadius,x._addLeadingZero(t))}}_placeTick(t,e,i,s){let o=document.createElement("div");o.classList.add("timepicker-tick"),o.style.left=this.options.dialRadius+Math.sin(e)*i-this.options.tickRadius+"px",o.style.top=this.options.dialRadius-Math.cos(e)*i-this.options.tickRadius+"px",o.textContent=s,t.appendChild(o)}_updateAmPmView(){!this._amBtn||!this._pmBtn||(this._amBtn.setAttribute("aria-pressed",String(this.amOrPm==="AM")),this._pmBtn.setAttribute("aria-pressed",String(this.amOrPm==="PM")),this._amBtn.classList.toggle("outlined",this.amOrPm!=="AM"),this._pmBtn.classList.toggle("outlined",this.amOrPm!=="PM"),this.options.twelveHour&&(this.amOrPm==="PM"?(this._amBtn.classList.remove("filled"),this._pmBtn.classList.add("filled")):this.amOrPm==="AM"&&(this._amBtn.classList.add("filled"),this._pmBtn.classList.remove("filled"))))}_updateTimeFromInput(){this._cancelClockReset();let t=((this.el.value||this.options.defaultTime||"")+"").trim().toUpperCase().split(":"),e=t[1]?.match(/AM|PM/)?.[0];if(t[1]=t[1]?.replace(/AM|PM/,""),t[0]==="NOW"){let i=new Date(+new Date+this.options.fromNow);t=[i.getHours().toString(),i.getMinutes().toString()]}this.hours=+t[0]||0,this.minutes=+t[1]||0,this.options.twelveHour&&(this.amOrPm=e==="AM"||e==="PM"?e:this.hours>=12?"PM":"AM",this.hours=this.hours%12||12),this.inputHours.value=x._addLeadingZero(this.hours),this.inputMinutes.value=x._addLeadingZero(this.minutes),this._updateAmPmView()}_cancelClockReset(){clearTimeout(this._clockResetTimer),this._clockResetTimer=null,this._canvas?.classList.remove("timepicker-canvas-out")}resetClock(t){this._cancelClockReset();let e=this.currentView,i=this[e],s=e==="hours",o=Math.PI/(s?6:30),a=i*o,r=s&&i>0&&i<13?this.options.innerRadius:this.options.outerRadius,h=Math.sin(a)*r,c=-Math.cos(a)*r;t?(this._canvas?.classList.add("timepicker-canvas-out"),this._clockResetTimer=setTimeout(()=>{this.setHand(h,c)},t)):this.setHand(h,c)}drawClockFromTimeInput(t,e){let i=Math.PI/(e?6:30),s=t*i,o;this.options.twelveHour?o=this.options.outerRadius:o=e&&t>0&&t<13?this.options.innerRadius:this.options.outerRadius,this.setClockAttributes(s,o)}setHand(t,e,i=!1){this._cancelClockReset();let s=this.currentView==="hours",o=Math.PI/(s||i?6:30),a=Math.sqrt(t*t+e*e),r=s&&a<(this.options.outerRadius+this.options.innerRadius)/2,h=r&&!this.options.twelveHour?this.options.innerRadius:this.options.outerRadius,c=Math.atan2(t,-e);c<0&&(c=Math.PI*2+c);let l=Math.round(c/o);c=l*o,s?this.options.twelveHour?l===0&&(l=12):l%12===0?l=r?12:0:r||(l+=12):(i&&(l*=5),l===60&&(l=0)),this[this.currentView]!==l&&this.canVibrate&&this.options.vibrate&&!this.vibrateTimer&&(navigator.vibrate(10),this.vibrateTimer=setTimeout(()=>{this.vibrateTimer=null},100)),this[this.currentView]=l,(s?this.inputHours:this.inputMinutes).value=x._addLeadingZero(l),this.setClockAttributes(c,h)}setClockAttributes(t,e){if(!this.hand||!this.bg)return;let i=Math.sin(t)*(e-this.options.tickRadius),s=-Math.cos(t)*(e-this.options.tickRadius),o=Math.sin(t)*e,a=-Math.cos(t)*e;this.hand.setAttribute("x2",i.toString()),this.hand.setAttribute("y2",s.toString()),this.bg.setAttribute("cx",o.toString()),this.bg.setAttribute("cy",a.toString())}formatHours(){this.inputHours.value==""&&this.setHoursDefault(),this.inputHours.value=x._addLeadingZero(this.hours)}formatMinutes(){this.inputMinutes.value==""&&(this.minutes=new Date().getMinutes()),this.inputMinutes.value=x._addLeadingZero(this.minutes)}setHoursDefault(){this.hours=new Date().getHours(),this.options.twelveHour&&(this.hours=this.hours%12||12),this.inputHours.value=this.hours.toString()}};x._template=`<div class="timepicker-container">
18
+ </div>`;var pe=w;var Wa={menuOptions:{constrainWidth:!1,coverTrigger:!1}},Pt=class extends b{constructor(t,e){super(t,e);this._added=[];this._onFocusin=t=>{let e=this._items;e.includes(t.target)&&e.forEach(i=>i.tabIndex=i===t.target?0:-1)};this._onBarKeydown=t=>{if(!u.plainKey(t))return;let e=this._items,i=e.indexOf(t.target);if(i<0)return;let n=this._step(t.key);if(n)this._focusItem(i,n,!1);else if(t.key==="Home")this._focusItem(-1,1,!1);else if(t.key==="End")this._focusItem(e.length,-1,!1);else return;t.preventDefault()};this._onMenuKeydown=t=>{let e=this._step(t.key);if(!e||t.defaultPrevented||!u.plainKey(t))return;let i=this._items,n=t.composedPath(),o=i.findIndex(a=>{let l=B.getInstance(a);return l?.isOpen&&l.menuEl&&n.includes(l.menuEl)});o<0||(t.preventDefault(),this._focusItem(o,e,!0))};this._setAttribute(this.el,"role","menubar"),this._items.forEach((n,o)=>{B.init(n,this.options.menuOptions),this._setAttribute(n,"role","menuitem"),n.tabIndex=o===0?0:-1});let{signal:i}=this._events;this.el.addEventListener("keydown",this._onBarKeydown,{signal:i}),this.el.addEventListener("focusin",this._onFocusin,{signal:i}),document.addEventListener("keydown",this._onMenuKeydown,{signal:i})}static get defaults(){return Wa}destroy(){this._items.forEach(t=>{B.getInstance(t)?.destroy(),t.removeAttribute("tabindex")}),this._added.forEach(({el:t,name:e})=>t.removeAttribute(e)),this._added=[],super.destroy()}get _items(){return[...this.el.querySelectorAll(":scope > .menu-trigger")]}_setAttribute(t,e,i){t.hasAttribute(e)||(t.setAttribute(e,i),this._added.push({el:t,name:e}))}_step(t){let e=getComputedStyle(this.el).direction==="rtl";return t==="ArrowRight"?e?-1:1:t==="ArrowLeft"?e?1:-1:null}_focusItem(t,e,i){let n=this._items,o=n.length,a=n.map((l,c)=>n[((t+e*(c+1))%o+o)%o]).find(l=>!l.matches(':disabled, [aria-disabled="true"]'));a&&(n.forEach(l=>{let c=B.getInstance(l);l!==a&&c?.isOpen&&c.close()}),a.focus(),i&&B.getInstance(a)?.open())}};Pt.key="Expressive_Menubar";var Ua={autoScroll:!0,defaultScrollPosition:"end",peek:64},mi=2,ja=new Set(["ArrowUp","PageUp","Home"]),Ya=["pointerup","pointercancel","touchend","touchcancel"],Rt=class extends b{constructor(t,e){super(t,e);this._opened=!1;this._following=!1;this._holding=!1;this._lastTop=0;this._target=null;this._distance=1/0;this._ref=null;this._refOffset=0;this._anchor=null;this._spacer=0;this._last=null;this._resizeObserver=null;this._mutationObserver=null;this._handleScroll=()=>{if(this._target!==null){let t=Math.abs(this.viewport.scrollTop-this._resolve(this._target));if(t>mi&&t<this._distance){this._distance=t;return}this._target=null}this._settle()};this._handleUserScroll=t=>{t.type==="wheel"&&t.deltaY>=0||t.type==="keydown"&&!ja.has(t.key)||(this._target=null,t.type==="pointerdown"||t.type==="touchstart"?this._holding=!0:this._following=!1)};this._handleRelease=()=>{this._holding&&(this._holding=!1,this._following&&(this.viewport.scrollTop=this.viewport.scrollHeight),this._sync())};this._handleButtonClick=()=>this.scrollToEnd();this._handleMutations=t=>{for(let i of t)i.addedNodes.forEach(n=>{n instanceof Element&&this._resizeObserver.observe(n)}),i.removedNodes.forEach(n=>{n instanceof Element&&this._resizeObserver.unobserve(n)});let e=this._last;if(this._last=this.viewport.lastElementChild,!!this._opened&&(!this._following&&this._target===null&&this._restore(),!!this.options.autoScroll&&!(e&&e.parentElement!==this.viewport))){for(let i=this._last;i&&i!==e;i=i.previousElementSibling)if(i.hasAttribute("data-scroll-anchor")){this._anchor=i,this._updateSpacer(),this._following=!0,this._scrollTo(this._top(i)-this.options.peek);return}}};this._handleResize=()=>{if(!this._opened){this.viewport.clientHeight>0&&this._open();return}this._updateSpacer();let t=this.viewport;this._target==="end"?this._scrollTo("end"):this._target===null&&(this._following&&!this._holding?t.scrollTop=t.scrollHeight:this._restore()),this._sync()};if(this.viewport=t.querySelector(":scope > .message-scroller-viewport"),this.button=t.querySelector(":scope > .message-scroller-button"),!this.viewport){console.error("MessageScroller needs a .message-scroller-viewport child.");return}this._last=this.viewport.lastElementChild,this.viewport.clientHeight>0&&this._open(),this._resizeObserver=new ResizeObserver(this._handleResize),this._resizeObserver.observe(this.viewport,{box:"border-box"});for(let n of Array.from(this.viewport.children))this._resizeObserver.observe(n);this._mutationObserver=new MutationObserver(this._handleMutations),this._mutationObserver.observe(this.viewport,{childList:!0});let{signal:i}=this._events;this.viewport.addEventListener("scroll",this._handleScroll,{passive:!0,signal:i});for(let n of["wheel","touchstart","pointerdown","keydown"])this.viewport.addEventListener(n,this._handleUserScroll,{passive:!0,signal:i});for(let n of Ya)document.addEventListener(n,this._handleRelease,{signal:i});this.button?.addEventListener("click",this._handleButtonClick,{signal:i})}static get defaults(){return Ua}destroy(){super.destroy(),this.viewport&&(this._resizeObserver?.disconnect(),this._mutationObserver?.disconnect(),this.viewport.style.removeProperty("--md-comp-message-scroller-spacer"),this.button&&(this.button.inert=!1))}scrollToEnd(){this._following=this.options.autoScroll,this._scrollTo("end")}scrollToStart(){this._following=!1,this._scrollTo(0)}scrollToMessage(t){let e=u.getElementById(this.viewport,t);return!e||!this.viewport.contains(e)?!1:(this._following=!1,this._scrollTo(this._top(e)-this.options.peek),!0)}_open(){this._opened=!0;let t=this.viewport,e=this.options.defaultScrollPosition,i=t.querySelectorAll(":scope > [data-scroll-anchor]"),n=e==="last-anchor"?i[i.length-1]:null;e==="start"?t.scrollTop=0:n&&this._contentEnd()-this._top(n)+this.options.peek>t.clientHeight?t.scrollTop=this._top(n)-this.options.peek:t.scrollTop=t.scrollHeight,this._settle()}_settle(){let t=this.viewport.scrollTop,e=this._following&&t>=this._lastTop-mi;this._following=this.options.autoScroll&&(e||this._atEnd()),this._lastTop=t,this._capture(),this._sync()}_scrollTo(t){let e=this.viewport;if(Math.abs(e.scrollTop-this._resolve(t))<=mi){this._target=null,this._settle();return}this._target=t,this._distance=1/0;let i=matchMedia("(prefers-reduced-motion: reduce)").matches;e.scrollTo({top:t==="end"?e.scrollHeight:t,behavior:i?"auto":"smooth"})}_resolve(t){let e=this.viewport.scrollHeight-this.viewport.clientHeight;return t==="end"?e:Math.max(0,Math.min(t,e))}_atEnd(){let t=this.viewport;return t.scrollHeight-t.scrollTop-t.clientHeight<=mi}_top(t){let e=this.viewport;return t.getBoundingClientRect().top-e.getBoundingClientRect().top-e.clientTop+e.scrollTop}_contentEnd(){let t=this.viewport.lastElementChild;if(!t)return 0;let e=parseFloat(getComputedStyle(this.viewport).paddingBlockEnd)-this._spacer;return this._top(t)+t.getBoundingClientRect().height+e}_capture(){let t=this.viewport.children,e=this.viewport.getBoundingClientRect().top+this.viewport.clientTop,i=0,n=t.length-1;for(;i<n;){let o=i+n>>1;t[o].getBoundingClientRect().bottom>e?n=o:i=o+1}this._ref=t[i]??null,this._refOffset=this._ref?this._ref.getBoundingClientRect().top-e:0}_restore(){if(this._ref?.parentElement!==this.viewport){this._capture();return}let t=this.viewport.getBoundingClientRect().top+this.viewport.clientTop,e=this._ref.getBoundingClientRect().top-t-this._refOffset;Math.abs(e)>=1&&(this.viewport.scrollTop+=e)}_updateSpacer(){let t=0;if(this._anchor?.parentElement===this.viewport){let e=this._top(this._anchor)-this.options.peek+this.viewport.clientHeight;t=Math.max(0,Math.ceil(e-this._contentEnd()))}else this._anchor=null;t!==this._spacer&&(this._spacer=t,t?this.viewport.style.setProperty("--md-comp-message-scroller-spacer",`${t}px`):this.viewport.style.removeProperty("--md-comp-message-scroller-spacer"))}_sync(){if(!this.button)return;let t=this._atEnd(),e=this.button.getRootNode();t&&e.activeElement===this.button&&this.viewport.focus({preventScroll:!0}),this.button.inert=t}};Rt.key="Expressive_MessageScroller";var bn={threshold:64,onRefresh:null,i18n:{refreshing:"Refreshing",refreshed:"Refreshed"}},Xa=4,Ga=new Set(["auto","scroll"]),Za=(r,s)=>Ga.has(getComputedStyle(r).overflowY)&&(r.scrollTop>0||r.contains(s)),fi=class fi extends b{constructor(t,e){super(t,e);this._start=null;this._pulling=!1;this._travel=0;this._refresh=null;this._onStart=t=>{if(this._refresh)return;if(t.touches.length!==1){this._endPull();return}let{clientX:e,clientY:i}=t.touches[0];this._start={x:e,y:i,target:u.eventTarget(t)}};this._onMove=t=>{if(!this._start)return;let{clientX:e,clientY:i}=t.touches[0],n=e-this._start.x,o=i-this._start.y;this._pulling||this._decide(n,o,this._start.target),this._pulling&&this._drag(t,o)};this._onEnd=()=>{let t=this._pulling&&this._travel>=this.options.threshold;this._endPull(),t&&this.refresh()};this._endPull=()=>{this._start=null,this._pulling=!1,this._travel=0,this.el.classList.remove("pulling"),this.el.style.removeProperty("--pull-to-refresh-offset"),this.el.style.removeProperty("--pull-to-refresh-progress")};this._onClick=t=>{let e=u.eventTarget(t)?.closest("[data-refresh]");e&&this.el.contains(e)&&this.refresh()};this.options.threshold>0||(this.options.threshold=bn.threshold),this._status=t.ownerDocument.createElement("span"),this._status.className="pull-to-refresh-status",this._status.setAttribute("role","status"),t.append(this._status);let i=this._events.signal;t.addEventListener("touchstart",this._onStart,{passive:!0,signal:i}),t.addEventListener("touchmove",this._onMove,{passive:!1,signal:i}),t.addEventListener("touchend",this._onEnd,{signal:i}),t.addEventListener("touchcancel",this._endPull,{signal:i}),t.addEventListener("click",this._onClick,{signal:i})}static get defaults(){return bn}refresh(){if(this._refresh||fi.getInstance(this.el)!==this)return;let t={pending:0};this._refresh=t,this.el.setAttribute("aria-busy","true"),this._status.textContent=this.options.i18n.refreshing;let e=()=>{--t.pending===0&&this._refresh===t&&this.complete()},i={waitUntil:n=>{t.pending++,Promise.resolve(n).finally(e)}};this._fireRefresh(t,i)}complete(){this._refresh&&(this._status.textContent=this.options.i18n.refreshed),this._refresh=null,this.el.removeAttribute("aria-busy")}destroy(){this._endPull(),this.complete(),this._status.remove(),super.destroy()}_fireRefresh(t,e){try{this._notify("refresh",this.options.onRefresh,{args:[e],detail:e})}catch(i){throw this._refresh===t&&this.complete(),i}}_canScrollUp(t){let e=t;for(;e&&!Za(e,this.el);)e=e.parentElement;return(e??this.el.ownerDocument.scrollingElement).scrollTop>0}_decide(t,e,i){Math.max(Math.abs(t),Math.abs(e))<=Xa||(e>Math.abs(t)&&!this._canScrollUp(i)?this._pulling=!0:this._start=null)}_drag(t,e){t.cancelable&&t.preventDefault();let{threshold:i}=this.options;this._travel=Math.max(e,0),this.el.classList.add("pulling"),this.el.style.setProperty("--pull-to-refresh-offset",`${Math.min(this._travel,i*2)/2}px`),this.el.style.setProperty("--pull-to-refresh-progress",`${Math.min(this._travel/i,1)}`)}};fi.key="Expressive_PullToRefresh";var me=fi;var Qa={i18n:{loading:"Loading",loaded:"Loaded"}},Ja=r=>!r.activeElement||r.activeElement===r.body,Ft=class extends b{constructor(t,e){super(t,e);this._busy=!1;this._wasInert=!1;this._focus=null;this._status=t.ownerDocument.createElement("span"),this._status.className="loading-overlay-status",this._status.setAttribute("role","status"),t.after(this._status),this._observer=new MutationObserver(()=>this._sync()),this._observer.observe(t,{attributeFilter:["aria-busy"]}),this._sync(),this._busy&&(this._status.textContent="",requestAnimationFrame(()=>this._announceStart()))}static get defaults(){return Qa}destroy(){this._observer.disconnect(),this._busy&&(this.el.inert=this._wasInert),this._status.remove(),super.destroy()}_sync(){let t=this.el.getAttribute("aria-busy")==="true";t!==this._busy&&(this._busy=t,t?this._start():this._clear())}_start(){let t=this.el.getRootNode().activeElement;this._focus=t instanceof HTMLElement&&this.el.contains(t)?t:null,this._wasInert=this.el.inert,this.el.inert=!0,this._focus?.blur(),this._status.textContent=this.options.i18n.loading}_clear(){this.el.inert=this._wasInert,this._status.textContent=this.options.i18n.loaded;let t=this._focus;this._focus=null,t?.isConnected&&Ja(this.el.ownerDocument)&&t.focus()}_announceStart(){this._busy&&this._status.isConnected&&(this._status.textContent=this.options.i18n.loading)}};Ft.key="Expressive_LoadingOverlay";var tl={onToggle:null},el=4,il=.5,sl=100,nl=r=>Date.now()-r.lastT<sl?r.velocity*r.sign:0,rl=r=>{let s=nl(r);return Math.abs(s)>il?s>0:r.reveal>r.width/2},Nt=class extends b{constructor(t,e){super(t,e);this._open=null;this._swipe=null;this._onStart=t=>{if(t.touches.length!==1){this._cancel();return}let e=this._rowFor(u.eventTarget(t));if(!e)return;let{clientX:i,clientY:n}=t.touches[0],o=this._width(e),a=e===this._open?o:0;this._swipe={row:e,x:i,y:n,sign:this._sign(e),width:o,base:a,reveal:a,swiping:!1,last:i,lastT:Date.now(),velocity:0}};this._onMove=t=>{let e=this._swipe;if(!e)return;let{clientX:i,clientY:n}=t.touches[0];(e.swiping||this._decide(e,i-e.x,n-e.y))&&this._drag(t,e,i)};this._onEnd=()=>{let t=this._swipe;this._swipe=null,t?.swiping&&(t.row.classList.remove("swiping"),this._settle(t.row,rl(t)))};this._onCancel=()=>this._cancel();this._onClick=t=>{let e=u.eventTarget(t);e.closest(".swipe-actions button")?this._closeFrom(e.closest("li")):e.closest("[data-swipe-toggle]")&&this._toggle(this._rowFor(e))};this._onKeydown=t=>{t.key==="Escape"&&this._closeFrom(this._rowFor(u.eventTarget(t)))};this._onFocusin=t=>{let e=u.eventTarget(t);e?.closest(".swipe-actions")?this.open(this._rowFor(e)):this._closeOutside(e)};this._onPointerdown=t=>this._closeOutside(u.eventTarget(t));this._rows().forEach(o=>this._toggleFor(o)?.setAttribute("aria-expanded","false"));let i=this._events.signal,n=t.ownerDocument;t.addEventListener("click",this._onClick,{signal:i}),t.addEventListener("keydown",this._onKeydown,{signal:i}),t.addEventListener("touchstart",this._onStart,{passive:!0,signal:i}),t.addEventListener("touchmove",this._onMove,{passive:!1,signal:i}),t.addEventListener("touchcancel",this._onCancel,{signal:i}),t.addEventListener("touchend",this._onEnd,{signal:i}),n.addEventListener("focusin",this._onFocusin,{signal:i}),n.addEventListener("pointerdown",this._onPointerdown,{signal:i})}static get defaults(){return tl}open(t){this._isRow(t)&&(this._place(t,this._width(t)),this._open!==t&&(this.close(),this._open=t,t.classList.add("swipe-open"),this._toggleFor(t)?.setAttribute("aria-expanded","true"),this._fire(t,!0)))}close(){let t=this._open;t&&(this._open=null,this._shut(t),this._fire(t,!1))}destroy(){let t=[this._swipe?.row,this._open];this._swipe=null,this._open=null,t.forEach(e=>e&&this._shut(e)),this._rows().forEach(e=>this._toggleFor(e)?.removeAttribute("aria-expanded")),super.destroy()}_rows(){return[...this.el.querySelectorAll(":scope > li:has(> .swipe-actions)")]}_isRow(t){return!!t&&t.parentElement===this.el&&!!t.querySelector(":scope > .swipe-actions")}_rowFor(t){let e=t?.closest("li")??null;return this._isRow(e)?e:null}_toggleFor(t){return t.querySelector("[data-swipe-toggle]")}_width(t){return t.querySelector(":scope > .swipe-actions").offsetWidth}_sign(t){return getComputedStyle(t).direction==="rtl"?1:-1}_place(t,e){t.style.setProperty("--swipe-offset",`${e*this._sign(t)}px`)}_shut(t){t.classList.remove("swipe-open","swiping"),t.style.removeProperty("--swipe-offset"),this._toggleFor(t)?.setAttribute("aria-expanded","false")}_fire(t,e){let i={row:t,open:e};this._notify("swipetoggle",this.options.onToggle,{args:[i],detail:i})}_decide(t,e,i){return Math.max(Math.abs(e),Math.abs(i))<=el?!1:(t.swiping=Math.abs(e)>Math.abs(i),t.swiping||(this._swipe=null),t.swiping)}_drag(t,e,i){t.cancelable&&t.preventDefault();let n=Date.now();i!==e.last&&(e.velocity=(i-e.last)/Math.max(1,n-e.lastT),e.last=i,e.lastT=n),e.reveal=Math.min(Math.max(e.base+(i-e.x)*e.sign,0),e.width),e.row.classList.add("swiping"),this._place(e.row,e.reveal)}_settle(t,e){e?this.open(t):t===this._open?this.close():this._shut(t)}_cancel(){let t=this._swipe;this._swipe=null,t?.swiping&&(t.row.classList.remove("swiping"),this._settle(t.row,t.row===this._open))}_toggle(t){t===this._open?this.close():this.open(t)}_closeFrom(t){if(!t||t!==this._open)return;let e=t.querySelector(":scope > .swipe-actions").contains(t.ownerDocument.activeElement);this.close(),e&&this._focusToggle(t)}_focusToggle(t){this._toggleFor(t)?.focus()}_closeOutside(t){this._open&&!this._open.contains(t)&&this.close()}};Nt.key="Expressive_SwipeActions";var ol={Editor:null,extensions:[]},al=["aria-label","aria-labelledby","aria-describedby"],Pe=class extends b{constructor(t,e){super(t,e);this.editor=null;this.content=null;this._actions=new Map;this._label=null;this._required=!1;this._form=null;this._handleClick=t=>{let e=t.target.closest("button[data-command]"),i=this._actions.get(e);i&&!e.disabled&&this.editor.chain().focus()[i.command](i.attributes).run()};this._handleLabelClick=()=>{this.editor.chain().focus().run()};this._handleSubmit=t=>{this._skipsValidation(t)||!this.editor.isEditable||!this.editor.isEmpty||(t.preventDefault(),t.stopImmediatePropagation(),this.editor.chain().focus().run())};this._handleUpdate=()=>{this.textarea.value=this.editor.isEmpty?"":this.editor.getHTML(),this.textarea.dispatchEvent(new Event("input",{bubbles:!0}))};this._handleTransaction=()=>{let t=this.editor.isEditable&&this.editor.can();for(let[e,{command:i,attributes:n,active:o}]of this._actions){if(e.disabled=!t||!(i in this.editor.commands)||!t[i](n),!o)continue;let a=this.editor.isActive(o,n);e.setAttribute("aria-pressed",String(a)),e.classList.toggle("active",a)}};if(this.textarea=t.querySelector(":scope > textarea"),!this.textarea||!this.options.Editor){console.error("RichTextEditor needs a <textarea> child and the Tiptap Editor class in options.Editor.");return}for(let n of t.querySelectorAll("button[data-command]")){let o=n.dataset.command,a;try{a=n.dataset.attributes?JSON.parse(n.dataset.attributes):void 0}catch{console.warn("RichTextEditor ignored invalid JSON in data-attributes:",n.dataset.attributes)}let l=o.startsWith("toggle")?o[6].toLowerCase()+o.slice(7):void 0;this._actions.set(n,{command:o,attributes:a,active:l})}let i={role:"textbox","aria-multiline":"true"};for(let n of al){let o=this.textarea.getAttribute(n);o&&(i[n]=o)}this._label=this.textarea.labels?.[0]??null,this._label&&!i["aria-labelledby"]&&(this._label.id||(this._label.id=`rich-text-editor-label-${u.guid()}`),i["aria-labelledby"]=this._label.id,this._label.addEventListener("click",this._handleLabelClick,{signal:this._events.signal})),this._required=this.textarea.required,this._required&&(i["aria-required"]="true",this.textarea.required=!1,this._form=this.textarea.form,this._form?.addEventListener("submit",this._handleSubmit,{capture:!0,signal:this._events.signal})),this.content=document.createElement("div"),this.content.className="rich-text-editor-content",this.textarea.after(this.content),this.textarea.hidden=!0,this.editor=new this.options.Editor({element:this.content,extensions:this.options.extensions,content:this.textarea.value,editable:!(this.textarea.disabled||this.textarea.readOnly),editorProps:{attributes:i}}),this.editor.on("update",this._handleUpdate),this.editor.on("transaction",this._handleTransaction),this._handleTransaction(),t.addEventListener("click",this._handleClick,{signal:this._events.signal})}static get defaults(){return ol}destroy(){if(super.destroy(),!!this.editor){this.editor.off("update",this._handleUpdate),this.editor.off("transaction",this._handleTransaction),this.editor.destroy(),this.editor=null,this.content.remove(),this.textarea.hidden=!1,this.textarea.required=this._required;for(let t of this._actions.keys())t.disabled=!1,t.classList.remove("active"),t.removeAttribute("aria-pressed")}}_skipsValidation(t){return this._form.noValidate||!!t.submitter?.formNoValidate}};Pe.key="Expressive_RichTextEditor";var En="https://tiles.openfreemap.org/styles/",ll={maplibregl:null,style:{light:`${En}positron`,dark:`${En}dark`},center:[0,20],zoom:1,mapOptions:{}},cl=r=>r.length===2&&r.every(Number.isFinite)&&Math.abs(r[1])<=90,hl=r=>{let s=r.dataset.lngLat.split(",").map(t=>t.trim()?Number(t):NaN);return cl(s)?s:(console.warn(`MapView skipped data-lng-lat="${r.dataset.lngLat}": expected "longitude,latitude".`,r),null)},yn=r=>r.map(s=>[s,hl(s)]).filter(s=>s[1]!==null);function ul([r,s],[t,e],i=32){let n=t>=r?.25:-.25,o=(r+t)/2-(e-s)*n,a=(s+e)/2+(t-r)*n;return Array.from({length:i+1},(l,c)=>{let h=c/i,d=1-h;return[d*d*r+2*d*h*o+h*h*t,d*d*s+2*d*h*a+h*h*e]})}var dl={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]},pl=r=>u.plainKey(r)?dl[r.key]:void 0,Re=class extends b{constructor(t,e){super(t,e);this.map=null;this.markers=[];this._children=[];this._popups=[];this._markerPopups=new Map;this._overlays=new Map;this._styleReady=!1;this._dark=!1;this._location=null;this._observer=null;this._zoomIn=[];this._zoomOut=[];this._picked=null;this._dragged=null;this._restore=[];this._actions={"zoom-in":()=>this.map.zoomIn(),"zoom-out":()=>this.map.zoomOut(),compass:()=>this.map.resetNorthPitch(),locate:t=>this._locate(t),fullscreen:()=>this._toggleFullscreen(),"pan-up":()=>this._pan(0,-1),"pan-down":()=>this._pan(0,1),"pan-left":()=>this._pan(-1,0),"pan-right":()=>this._pan(1,0)};this._handleStyleLoad=()=>{this._styleReady=!0;for(let t of this._overlays.values())t.draw()};this._handleScheme=()=>{let t=this._isDark();t!==this._dark&&(this._dark=t,this._styleReady=!1,this.map.setStyle(this._style(),{diff:!1}))};this._sync=()=>{let t=this.map.getZoom();for(let e of this._zoomIn)e.disabled=t>=this.map.getMaxZoom();for(let e of this._zoomOut)e.disabled=t<=this.map.getMinZoom();this.el.style.setProperty("--md-comp-map-bearing",`${-this.map.getBearing()}deg`)};this._handleFullscreen=()=>{for(let t of this._buttons("fullscreen"))t.setAttribute("aria-pressed",String(document.fullscreenElement===this.el))};this._handleClick=t=>{let e=t.target,i=e.closest(".map-controls [data-action]");i?this._actions[i.dataset.action]?.(i):this._tapMarker(e.closest(".map-marker"))};this._handleMapClick=t=>{let e=t.originalEvent.target;this._drop(e,t.lngLat);for(let[i,n]of this._markerPopups)!i.contains(e)&&!n.getElement()?.contains(e)&&n.remove()};this._handleKeydown=t=>{t.key==="Escape"&&this._escape(t)};let i=this.options.maplibregl;if(!i){console.error("MapView needs the maplibre-gl module in options.maplibregl.");return}this._children=[...t.children],this._zoomIn=[...this._buttons("zoom-in")],this._zoomOut=[...this._buttons("zoom-out")],this._dark=this._isDark(),this.map=new i.Map({...this.options.mapOptions,container:t,style:this._style(),center:this.options.center,zoom:this.options.zoom}),this.map.on("style.load",this._handleStyleLoad),this.map.on("move",this._sync),this.map.on("click",this._handleMapClick);let n=this._children.filter(l=>l instanceof HTMLElement),o=new Set;for(let[l,c]of yn(n.filter(h=>h.matches(".map-marker[data-lng-lat]")))){let h=l.hasAttribute("aria-controls")?u.getElementById(l,l.getAttribute("aria-controls")):null,d=h?.parentElement===t&&h.matches(".map-popup")?h:null;d&&o.add(d),this._addMarker(l,d,c)}for(let[l,c]of yn(n.filter(h=>h.matches(".map-popup[data-lng-lat]")&&!o.has(h))))this._popup(l,0).setLngLat(c).addTo(this.map);let{signal:a}=this._events;this._themed()&&(matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this._handleScheme,{signal:a}),this._observer=new MutationObserver(this._handleScheme),this._observer.observe(document.documentElement,{attributes:!0,attributeFilter:["theme"],subtree:!0}));for(let l of this._buttons("fullscreen"))l.hidden=!document.fullscreenEnabled;document.addEventListener("fullscreenchange",this._handleFullscreen,{signal:a}),t.addEventListener("click",this._handleClick,{signal:a}),t.addEventListener("keydown",this._handleKeydown,{signal:a}),this._sync()}static get defaults(){return ll}destroy(){if(super.destroy(),!!this.map){this._releaseMarkers(),this._observer?.disconnect();for(let t of this._overlays.values())t.off?.();for(let t of this._popups)t.remove();for(let t of this.markers){t.remove();let e=t.getElement();e.classList.remove(...[...e.classList].filter(i=>i.startsWith("maplibregl-"))),e.style.removeProperty("transform"),e.style.removeProperty("opacity"),e.hasAttribute("aria-controls")&&e.removeAttribute("aria-expanded")}this._location?.remove(),this._location=null,this.map.remove(),this.map=null,this.markers=[],this._popups=[],this._markerPopups.clear(),this._overlays.clear(),this.el.style.removeProperty("--md-comp-map-bearing");for(let t of this.el.querySelectorAll(".map-controls [data-action]"))t.disabled=!1,t.hidden=!1,t.removeAttribute("aria-pressed");this.el.append(...this._children)}}addRoute(t,e,i={}){this._line(t,{type:"LineString",coordinates:e},"route",{width:4,...i})}addArcs(t,e,i={}){this._line(t,{type:"MultiLineString",coordinates:e.map(({from:n,to:o})=>ul(n,o))},"arc",{width:2,...i})}addClusters(t,e,i={}){let n=`${t}-clusters`,o=`${t}-points`,a=async d=>{let[p]=d.features,g=await this.map.getSource(t).getClusterExpansionZoom(p.properties.cluster_id);this.map?.easeTo({center:p.geometry.coordinates,zoom:g})},l=()=>{this.map.getCanvas().style.cursor="pointer"},c=()=>{this.map.getCanvas().style.cursor=""},h=d=>{this.map[d]("click",n,a);for(let p of[n,o])this.map[d]("mouseenter",p,l),this.map[d]("mouseleave",p,c)};this._draw(t,{draw:()=>{let d=i.color??this._color("var(--md-comp-map-cluster-color)"),p=this._color("var(--md-comp-map-marker-ring-color)");this.map.addSource(t,{type:"geojson",data:e,cluster:!0,clusterRadius:i.radius??50,clusterMaxZoom:i.maxZoom??14}),this.map.addLayer({id:n,type:"circle",source:t,filter:["has","point_count"],paint:{"circle-color":d,"circle-radius":["step",["get","point_count"],16,10,20,100,26],"circle-stroke-width":6,"circle-stroke-color":d,"circle-stroke-opacity":.3}});let g=this.map.getStyle(),m=g.glyphs&&g.layers.find(E=>E.layout?.["text-font"])?.layout["text-font"];m&&this.map.addLayer({id:`${t}-count`,type:"symbol",source:t,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],"text-font":m,"text-size":12},paint:{"text-color":this._color("var(--md-comp-map-cluster-label-color)")}}),this.map.addLayer({id:o,type:"circle",source:t,filter:["!",["has","point_count"]],paint:{"circle-color":d,"circle-radius":6,"circle-stroke-width":2,"circle-stroke-color":p}})},off:()=>h("off")}),h("on")}removeOverlay(t){let e=this._overlays.get(t);if(e&&(this._overlays.delete(t),e.off?.(),!(!this._styleReady||!this.map.getSource(t)))){for(let i of this.map.getStyle().layers)i.source===t&&this.map.removeLayer(i.id);this.map.removeSource(t)}}_line(t,e,i,n){this._draw(t,{draw:()=>{this.map.addSource(t,{type:"geojson",data:{type:"Feature",properties:{},geometry:e}}),this.map.addLayer({id:t,type:"line",source:t,layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":n.color??this._color(`var(--md-comp-map-${i}-color)`),"line-width":n.width,"line-opacity":n.opacity??1,...n.dashArray&&{"line-dasharray":n.dashArray}}})}})}_draw(t,e){this.removeOverlay(t),this._overlays.set(t,e),this._styleReady&&e.draw()}_addMarker(t,e,i){let n=new this.options.maplibregl.Marker({element:t,draggable:t.hasAttribute("data-draggable")}).setLngLat(i).addTo(this.map);if(n.on("dragend",()=>this._moved(n)),t.hasAttribute("data-draggable")&&this._makeMovable(t,n),this.markers.push(n),!e)return;t.setAttribute("aria-expanded","false");let o=this._popup(e,16);o.on("open",()=>t.setAttribute("aria-expanded","true")),o.on("close",()=>{t.setAttribute("aria-expanded","false"),(!document.activeElement||document.activeElement===document.body)&&t.focus()}),this._markerPopups.set(t,o)}_moved(t){let e=t.getElement(),{lng:i,lat:n}=t.getLngLat();e.dataset.lngLat=`${i},${n}`,e.dispatchEvent(new Event("change",{bubbles:!0}))}_makeMovable(t,e){let i=t instanceof HTMLButtonElement?[]:["role","tabindex"].filter(n=>!t.hasAttribute(n));i.includes("role")&&t.setAttribute("role","button"),i.includes("tabindex")&&(t.tabIndex=0),t.setAttribute("aria-pressed","false"),this._restore.push(()=>["aria-pressed",...i].forEach(n=>t.removeAttribute(n))),t.addEventListener("keydown",n=>this._nudge(n,e),{signal:this._events.signal}),e.on("dragstart",()=>this._dragged=t),e.on("dragend",()=>setTimeout(()=>this._dragged=null))}_releaseMarkers(){this._restore.splice(0).forEach(t=>t()),this._picked=null}_nudge(t,e){let i=pl(t);if(!i)return;t.preventDefault(),t.stopPropagation();let n=this.map.project(e.getLngLat());e.setLngLat(this.map.unproject([n.x+i[0]*10,n.y+i[1]*10])),this._moved(e)}_pick(t){this._picked?.setAttribute("aria-pressed","false"),this._picked=t,t?.setAttribute("aria-pressed","true")}_tapMarker(t){t?.hasAttribute("data-draggable")?this._tapMovable(t):this._markerPopups.has(t)&&this._toggle(t)}_tapMovable(t){this._dragged!==t&&this._pick(this._picked===t?null:t)}_pan(t,e){let{width:i,height:n}=this.el.getBoundingClientRect();this.map.panBy([t*i/3,e*n/3])}_toggleFullscreen(){(document.fullscreenElement===this.el?document.exitFullscreen():this.el.requestFullscreen()).catch(()=>{})}_popup(t,e){let i=new this.options.maplibregl.Popup({closeOnClick:!1,maxWidth:"none",offset:e}).setDOMContent(t);return this._popups.push(i),i}_toggle(t){let e=this._markerPopups.get(t);e.isOpen()?e.remove():e.setLngLat(this.markers.find(i=>i.getElement()===t).getLngLat()).addTo(this.map)}_buttons(t){return this.el.querySelectorAll(`.map-controls [data-action="${t}"]`)}_locate(t){navigator.geolocation?.getCurrentPosition(({coords:e})=>{if(!this.map)return;let i=[e.longitude,e.latitude];if(!this._location){let n=document.createElement("span");n.className="map-marker location",n.setAttribute("aria-hidden","true"),this._location=new this.options.maplibregl.Marker({element:n})}this._location.setLngLat(i).addTo(this.map),this.map.flyTo({center:i,zoom:Math.max(this.map.getZoom(),14)})},e=>{this.map&&e.code===e.PERMISSION_DENIED&&(t.disabled=!0)})}_color(t){let e=document.createElement("span");e.hidden=!0,e.style.color=t,this.el.append(e);let i=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});i.fillStyle=getComputedStyle(e).color,e.remove(),i.fillRect(0,0,1,1);let[n,o,a,l]=i.getImageData(0,0,1,1).data;return`rgba(${n}, ${o}, ${a}, ${Math.round(l/255*100)/100})`}_isDark(){return this._color("light-dark(black, white)")==="rgba(255, 255, 255, 1)"}_themed(){let t=this.options.style;return typeof t=="object"&&"light"in t&&"dark"in t}_style(){return this._themed()?this.options.style[this._dark?"dark":"light"]:this.options.style}_drop(t,e){if(!this._picked||t.closest?.(".map-marker"))return;let i=this.markers.find(n=>n.getElement()===this._picked);i.setLngLat(e),this._moved(i),this._pick(null)}_escape(t){if(this._picked){t.preventDefault(),this._pick(null);return}for(let e of this._popups)e.getElement()?.contains(t.target)&&(t.preventDefault(),e.remove())}};Re.key="Expressive_MapView";var ml={inDuration:275,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},Bt=class extends b{constructor(t,e){super(t,e);this._timers=new Map;this._motion=window.matchMedia("(prefers-reduced-motion: reduce)");this._isOpen=!1;this._destroyed=!1;this._revision=0;this._phase=0;this._handleMotionChange=()=>{if(!this._motion.matches)return;let t=[...this._timers.values()],e=this._cancel();for(let i of t){if(e!==this._revision)break;i()}if(this.overlayActive)for(let i of[this.el,this._overlay,this._photoCaption])i&&(i.style.transition="none")};this._handleLightboxKeypress=t=>{this._trigger===this.el&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._handleLightboxToggle())};this._handleLightboxToggle=()=>{this._isOpen?this.close():this.open()};this._handleWindowChange=()=>{this.overlayActive&&this.close()};this._handleWindowEscape=t=>{t.key==="Escape"&&this.close()};this._handleWindowTab=t=>{t.key==="Tab"&&this.close()};this.open=()=>{if(this._destroyed||this._isOpen)return;this._phase++;let t=this._cancel();this.overlayActive&&this._reset(),this._updateVars();let e=this.el.getBoundingClientRect(),i=this.placeholder.getBoundingClientRect();if(!e.width||!e.height||(this._isOpen=!0,this.originalWidth=e.width,this.originalHeight=e.height,this.doneAnimating=!1,this.el.classList.add("active"),this.overlayActive=!0,!this._notify("open",this.options.onOpenStart,{current:()=>t===this._revision})))return;this.placeholder.style.width=i.width+"px",this.placeholder.style.height=i.height+"px",this.el.style.position="absolute",this.el.style.inset="auto",this.el.style.left=i.left+window.scrollX+"px",this.el.style.top=i.top+window.scrollY+"px",this.el.style.willChange="left, top, width, height",this.attrWidth=this.el.getAttribute("width"),this.attrHeight=this.el.getAttribute("height"),this.attrWidth&&(this.el.style.width=this.attrWidth+"px",this.el.removeAttribute("width")),this.attrHeight&&(this.el.style.height=this.attrHeight+"px",this.el.removeAttribute("height")),this._addOverlay(),this._showOnTop(this.el),this.caption!==""&&this._addCaption();let n=this.originalWidth/this.windowWidth,o=this.originalHeight/this.windowHeight;if(n>o){let l=this.originalHeight/this.originalWidth;this.newWidth=this.windowWidth*.9,this.newHeight=this.windowWidth*.9*l}else{let l=this.originalWidth/this.originalHeight;this.newWidth=this.windowHeight*.9*l,this.newHeight=this.windowHeight*.9}this._windowEvents?.abort(),this._windowEvents=R(this.el);let{signal:a}=this._windowEvents;window.addEventListener("scroll",this._handleWindowChange,{passive:!0,signal:a}),window.addEventListener("resize",this._handleWindowChange,{passive:!0,signal:a}),window.addEventListener("keyup",this._handleWindowEscape,{signal:a}),window.addEventListener("keydown",this._handleWindowTab,{signal:a}),this._animateImageIn()};this.close=()=>{if(this._destroyed||!this._isOpen)return;this._phase++;let t=this._cancel();this._isOpen=!1,this.doneAnimating=!1,this._notify("close",this.options.onCloseStart,{current:()=>t===this._revision})&&(this._windowEvents?.abort(),this._restoreFocus(),this._overlay&&this._fadeOut(this._overlay),this._photoCaption&&this._fadeOut(this._photoCaption),this._animateImageOut())};this.overlayActive=!1,this.doneAnimating=!0,this.placeholder=document.createElement("div"),this.placeholder.classList.add("material-placeholder"),this.originalWidth=0,this.originalHeight=0,this.originInlineStyles=this.el.getAttribute("style"),this.caption=this.el.getAttribute("data-caption")||"",this._tabindex=this.el.getAttribute("tabindex"),this._trigger=this.el.closest("button")??this.el,this.el.tabIndex=this._trigger===this.el?0:-1,this.el.before(this.placeholder),this.placeholder.append(this.el),this._setupEventHandlers()}static get defaults(){return ml}destroy(){if(this._destroyed)return;this._destroyed=!0;let t=this.el.getRootNode().activeElement===this.el;this._cancel(),this._reset(),this.placeholder.replaceWith(this.el),t&&this._restoreFocus(),x(this.el,"tabindex",this._tabindex),super.destroy()}_restoreFocus(){let t=this.el.getRootNode(),e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;[document.body,t.host].includes(e)&&this._trigger.focus({preventScroll:!0})}_reset(){this._windowEvents?.abort(),this._overlay?.remove(),this._photoCaption?.remove(),this.el.removeAttribute("popover"),this.attrWidth!=null&&this.el.setAttribute("width",this.attrWidth),this.attrHeight!=null&&this.el.setAttribute("height",this.attrHeight),this.el.classList.remove("active"),this.placeholder.removeAttribute("style"),x(this.el,"style",this.originInlineStyles),this.overlayActive=!1,this._isOpen=!1,this.doneAnimating=!0}_cancel(){for(let t of this._timers.keys())clearTimeout(t);return this._timers.clear(),++this._revision}_schedule(t,e){if(this._motion.matches){t();return}let i=setTimeout(()=>{this._timers.delete(i),t()},e);this._timers.set(i,t)}_setupEventHandlers(){let{signal:t}=this._events;this._motion.addEventListener("change",this._handleMotionChange,{signal:t}),this._trigger.addEventListener("click",this._handleLightboxToggle,{signal:t}),this.el.addEventListener("keydown",this._handleLightboxKeypress,{signal:t})}_showOnTop(t){t.setAttribute("popover","manual"),t.showPopover()}_restingPlace(){let t=this.placeholder.getBoundingClientRect();return{left:t.left+window.scrollX+"px",top:t.top+window.scrollY+"px"}}_updateVars(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.caption=this.el.getAttribute("data-caption")||""}_animateImageIn(){let t=this._phase;this.el.style.maxHeight=this.newHeight.toString()+"px",this.el.style.maxWidth=this.newWidth.toString()+"px";let e=this._motion.matches?0:this.options.inDuration;this.el.style.transition="none",this.el.style.height=this.originalHeight+"px",this.el.style.width=this.originalWidth+"px",this._schedule(()=>{this.el.style.transition=`height ${e}ms ease,
19
+ width ${e}ms ease,
20
+ left ${e}ms ease,
21
+ top ${e}ms ease
22
+ `,this.el.style.height=this.newHeight+"px",this.el.style.width=this.newWidth+"px",this.el.style.left=window.scrollX+(this.windowWidth-this.newWidth)/2+"px",this.el.style.top=window.scrollY+(this.windowHeight-this.newHeight)/2+"px"},1),this._schedule(()=>{this.doneAnimating=!0,this._notify("opened",this.options.onOpenEnd,{current:()=>t===this._phase})},e)}_animateImageOut(){let t=this._phase,e=this._motion.matches?0:this.options.outDuration;this.el.style.transition=`height ${e}ms ease,
23
+ width ${e}ms ease,
24
+ left ${e}ms ease,
25
+ top ${e}ms ease
26
+ `,this.el.style.height=this.originalHeight+"px",this.el.style.width=this.originalWidth+"px",Object.assign(this.el.style,this._restingPlace()),this._schedule(()=>{this._reset(),this._notify("closed",this.options.onCloseEnd,{current:()=>t===this._phase})},e)}_addCaption(){this._photoCaption=document.createElement("div"),this._photoCaption.classList.add("lightbox-caption"),this._photoCaption.innerText=this.caption,u.portalRoot(this.el).append(this._photoCaption),this._photoCaption.style.display="inline",this._showOnTop(this._photoCaption),this._fadeIn(this._photoCaption)}_addOverlay(){this._overlay=document.createElement("div"),this._overlay.id="lightbox-overlay",this._overlay.addEventListener("click",t=>{t.stopPropagation(),this.close()},{once:!0}),this.el.before(this._overlay),this._showOnTop(this._overlay),this._fadeIn(this._overlay)}_fadeIn(t){t.style.transition="none",t.style.opacity="0";let e=this._motion.matches?0:this.options.inDuration;this._schedule(()=>{t.style.transition=`opacity ${e}ms ease`,t.style.opacity="1"},1)}_fadeOut(t){let e=this._motion.matches?0:this.options.outDuration;t.style.transition=`opacity ${e}ms ease`,t.style.opacity="0"}};Bt.key="Expressive_Lightbox";var Tn=r=>`a[href="#${r}"]`,fl={scrollOffset:200,activeClass:"active",getActiveElement:Tn,keepTopElementActive:!1},F=class F extends b{constructor(t,e){super(t,e);this._ratio=0;this._link=null;this._offset=this.el.style.getPropertyValue("--md-comp-scrollspy-offset"),this._offsetPriority=this.el.style.getPropertyPriority("--md-comp-scrollspy-offset"),this.el.style.setProperty("--md-comp-scrollspy-offset",`${this.options.scrollOffset}px`),F._elements.push(this),this._observer=new IntersectionObserver(i=>{if(F.getInstance(this.el)===this){for(let n of i)this._ratio=n.isIntersecting?n.intersectionRatio:0;F._syncActive(this.options.getActiveElement)}},{rootMargin:`-${this.options.scrollOffset}px 0px -45% 0px`,threshold:[0,.1,.25,.5,.75,1]}),this._observer.observe(this.el)}static get defaults(){return fl}destroy(){let t=F._elements.indexOf(this);if(t<0)return;F._elements.splice(t,1),this._observer?.disconnect();let e=this.options.getActiveElement;F._active.get(e)===this&&F._clearActive(e),this.el.style.setProperty("--md-comp-scrollspy-offset",this._offset,this._offsetPriority),super.destroy(),F._syncActive(e)}static _syncActive(t){let e=F._elements.filter(l=>l.options.getActiveElement===t),i=null,n=0;for(let l of e){let c=l._ratio;c>n&&(n=c,i=l)}if(!i){let l=e.filter(c=>c.options.keepTopElementActive);i=F._nearestAbove(l)??l[0]}let o=F._active.get(t);if(i&&o===i&&i._link?.isConnected)return;let a=i?F._linkFor(i.el.id,i.options,i.el.getRootNode()):null;o===i&&o?._link===a||(F._clearActive(t),a&&(a.classList.add(i.options.activeClass),a.setAttribute("aria-current","true"),i._link=a,F._active.set(t,i),i._notify("change",null,{detail:{link:a}})))}static _nearestAbove(t){let e=null,i=-1/0;for(let n of t){let o=n.el.getBoundingClientRect().top;o<=0&&o>=i&&(i=o,e=n)}return e}static _clearActive(t){let e=F._active.get(t);e&&(e._link?.classList.remove(e.options.activeClass),e._link?.removeAttribute("aria-current"),e._link=null,F._active.delete(t))}static _linkFor(t,e,i=document){if(!t)return null;if(e.getActiveElement!==Tn)try{return i.querySelector(e.getActiveElement(t))}catch{return null}let n=`#${t}`;return Array.from(i.querySelectorAll('a[href^="#"]')).find(o=>o.getAttribute("href")===n)??null}};F._elements=[],F._active=new Map,F.key="Expressive_ScrollSpy";var fe=F;var Ln={threshold:"100vh"},_l=r=>r.ctrlKey||r.metaKey||r.shiftKey||r.altKey,$t=class extends b{constructor(t,e){super(t,e);this._observer=null;this._sentinel=null;this._temporary=null;this._blur=null;this._above=!0;this._onIntersect=t=>{let e=t[t.length-1];e&&(this._above=e.isIntersecting||e.boundingClientRect.top>=0,this._update())};this._update=()=>{this.el.toggleAttribute("inert",this._above&&!this.el.matches(":focus"))};this._onClick=t=>{if(t.defaultPrevented||_l(t))return;t.preventDefault(),this._focus(this._target());let e=this.el.ownerDocument.defaultView,i=e.matchMedia("(prefers-reduced-motion: reduce)").matches;e.scrollTo({top:0,behavior:i?"instant":"smooth"})};this._clearTabindex=()=>{this._blur?.abort(),this._temporary?.removeAttribute("tabindex"),this._temporary=this._blur=null};this.el.setAttribute("inert",""),this._sentinel=this.el.ownerDocument.createElement("span"),this._sentinel.setAttribute("aria-hidden","true"),this._sentinel.style.cssText="position:absolute;inset-inline-start:0;height:0;pointer-events:none;visibility:hidden",this._setThreshold(this.options.threshold),this.el.ownerDocument.body.prepend(this._sentinel),this._observer=new IntersectionObserver(this._onIntersect),this._observer.observe(this._sentinel);let{signal:i}=this._events;this.el.addEventListener("click",this._onClick,{signal:i}),this.el.addEventListener("blur",this._update,{signal:i})}static get defaults(){return Ln}destroy(){this._observer?.disconnect(),this._observer=null,this._sentinel?.remove(),this._sentinel=null,this._clearTabindex(),this.el.removeAttribute("inert"),super.destroy()}_setThreshold(t){this._sentinel.style.top=t,!this._sentinel.style.top&&(console.warn(`BackToTop ignored threshold "${t}": expected a CSS length.`,this.el),this._sentinel.style.top=Ln.threshold)}_target(){let t=/^#(.+)/.exec(String(this.el.getAttribute("href")));return t&&u.getElementById(this.el,t[1])||this.el.ownerDocument.body}_focus(t){t.focus({preventScroll:!0}),!this._focused(t)&&(this._clearTabindex(),t.setAttribute("tabindex","-1"),t.focus({preventScroll:!0}),this._temporary=t,this._blur=R(t),t.addEventListener("blur",this._clearTabindex,{once:!0,signal:this._blur.signal}))}_focused(t){return t===t.ownerDocument.body?t.hasAttribute("tabindex"):t.getRootNode().activeElement===t}};$t.key="Expressive_BackToTop";function gl(r){let s=new Map;r.forEach(o=>{s.has(o.value)||s.set(o.value,o)});let t=o=>s.get(o.dataset.parent||void 0),e=o=>{let a=t(o);for(let l=0;a&&a!==o&&l<r.length;l++)a=t(a);return a===o},i=new Map(r.map(o=>[o,{option:o,children:[]}])),n=[];return r.forEach(o=>{let a=e(o)?void 0:t(o);(a?i.get(a).children:n).push(i.get(o))}),n}var vl={ArrowUp:-1,ArrowDown:1},_i=(r,s,t)=>r._focusRow(u.focusTarget(r._visibleRows(),t,vl)),wn=(r,s)=>r._activate(s),bl={ArrowDown:_i,ArrowUp:_i,Home:_i,End:_i,ArrowRight:(r,s)=>r._openOrEnter(s),ArrowLeft:(r,s)=>r._closeOrLeave(s),"*":(r,s)=>r._openSiblings(s),Enter:wn," ":wn},El=(r,s,t)=>r._typeahead(s,t.key),yl={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"},qt=class extends z{constructor(t,e){super(t,e);this._typed="";this._handleTreeKeydown=u.ignoringComposition(t=>{let e=u.eventTarget(t)?.closest('li[role="treeitem"]'),i=e&&this._keyFor(t);i&&(t.preventDefault(),t.stopPropagation(),i(this,e,t))});this._handleTreeClick=t=>{let e=u.eventTarget(t);if(!this.tree.contains(e))return;let i=e.closest('li[role="treeitem"] > span');t.preventDefault(),t.stopPropagation(),i&&this._activate(i.parentElement)};if(!this.menuEl)return;let{signal:i}=this._events;this._searchInput||(this.menuEl.setAttribute("role","presentation"),this.input.setAttribute("aria-haspopup","tree"),this.input.setAttribute("aria-controls",this.tree.id)),this.menuEl.removeAttribute("aria-multiselectable"),this._nameTree(),this._leaveImplicitBranch(),this._handleSelectChange(),this._searchInput||this.menuEl.addEventListener("keydown",this._handleTreeKeydown,{signal:i,capture:!0}),this.menuEl.addEventListener("click",this._handleTreeClick,{signal:i,capture:!0})}_setValueToInput(){this.isMultiple&&this._branches.forEach(t=>{t.selected=!1}),super._setValueToInput()}_canSearch(){return this.options.searchable}_searchList(){return this.tree}_searchRows(){return this._enabledRows()}_filterSearch(t){let e=this._matchingRows(t);this.tree.querySelectorAll('li[role="treeitem"]').forEach(i=>{i.hidden=!e.has(i)}),this._searchExpansion(t)}_matchingRows(t){let e=new Set;return this._values.filter(({el:i})=>i.textContent.trim().toLowerCase().includes(t)).forEach(({optionEl:i})=>{for(let n=i;n;n=this._parentRow(n))e.add(n)}),e}_searchExpansion(t){if(t){this._searchOpen??(this._searchOpen=this._openValues()),this._branches.forEach((i,n)=>{n.hidden||this._setExpanded(n,!0)});return}let e=this._searchOpen;this._searchOpen=void 0,e&&this._branches.forEach((i,n)=>this._setExpanded(n,e.has(i.value)))}_searchNavigate(t){t.target===this._searchInput?super._searchNavigate(t):this._handleTreeKeydown(t)}destroy(){clearTimeout(this._typedTimer),this._restoreBranches(),super.destroy()}refresh(){let t=this._focusedOption();this._keepOpen=this._searchOpen??this._openValues(),super.refresh(),this._keepOpen=void 0,this._restoreOpenFocus(t)}_restoreOpenFocus(t){t&&this.menu?.isOpen&&this._restoreFocus(t)}_focusedOption(){let t=this.menuEl?.getRootNode();return this._optionOf(t?.activeElement?.closest('li[role="treeitem"]'))}_openValues(){return new Set(Array.from(this._branches??[],([t,e])=>t.ariaExpanded==="true"?e.value:null))}_restoreFocus(t){let e=this._rowOf(t);this._expandTo(e);let i=this._enabledRows(),n=i.includes(e)?e:i[0];n?this._focusRow(n):(this._searchInput??this.input).focus()}_nameTree(){let{input:t}=this;t.hasAttribute("aria-labelledby")?this.tree.setAttribute("aria-labelledby",t.getAttribute("aria-labelledby")):t.ariaLabel?this.tree.ariaLabel=t.ariaLabel:this._labelTree()}_labelTree(){let t=Array.from(this.input.labels??[],(e,i)=>e.id||(e.id=`${this.input.id}-label-${i}`));t.length&&this.tree.setAttribute("aria-labelledby",t.join(" "))}_setupOptionHandlers(){}_buildOptions(){this._restoreBranches(),this._branches=new Map,this.selectOptions=this._nativeOptions(),this._values=[];let t=this.selectOptions.filter(e=>e.tagName==="OPTION");this.tree||(this.tree=document.createElement("ul"),this.tree.id="select-tree-"+u.guid(),this.tree.setAttribute("role","tree")),this.tree.ariaMultiSelectable=String(this.isMultiple),this.tree.replaceChildren(...gl(t).map(e=>this._row(e))),this.menuEl.append(this.tree)}_leaveImplicitBranch(){if(this.isMultiple||!this._browserPickedBranch())return;let t=Array.from(this.el.options).find(e=>!e.disabled);t?t.selected=!0:this.el.selectedIndex=-1}_browserPickedBranch(){let t=this.el.selectedOptions[0];return!!t&&!t.defaultSelected&&this._disabledBranches.has(t)}_row(t){let e=document.createElement("li");e.id="select-option-"+u.guid(),e.setAttribute("role","treeitem"),e.tabIndex=-1;let i=document.createElement("span");return i.textContent=t.option.textContent,e.append(i),t.children.length?this._branch(e,t):this._leaf(e,t.option),e}_branch(t,e){let i=document.createElement("ul");i.setAttribute("role","group"),i.append(...e.children.map(n=>this._row(n))),t.append(i),this._setExpanded(t,!!this._keepOpen?.has(e.option.value)),this._branches.set(t,e.option),!e.option.disabled&&(e.option.disabled=!0,this._disabledBranches.add(e.option))}_leaf(t,e){(this.el.matches(":disabled")||e.disabled)&&(t.classList.add("disabled"),t.ariaDisabled="true"),this._values.push({el:e,optionEl:t})}_restoreBranches(){this._disabledBranches?.forEach(t=>{t.disabled=!1}),this._disabledBranches=new Set}_setExpanded(t,e){t.ariaExpanded=String(e),t.querySelector(":scope > ul").hidden=!e}_visibleRows(){return Array.from(this.tree.querySelectorAll('li[role="treeitem"]')).filter(t=>!t.closest("[hidden]"))}_enabledRows(){return this._visibleRows().filter(t=>!t.matches(".disabled"))}_focusRow(t){t?.focus({preventScroll:!0}),t?.scrollIntoView({block:"nearest",inline:"nearest"})}_focusSelected(){if(!this.menu.options.autoFocus||u.focusIsIn(this.menuEl))return;let t=this._values.find(({el:e,optionEl:i})=>e.selected&&!i.matches(".disabled"));this._restoreFocus(t?.el)}_expandTo(t){for(let e=this._parentRow(t);e;e=this._parentRow(e))this._setExpanded(e,!0)}_parentRow(t){let e=t?.parentElement.closest('li[role="treeitem"]');return this._branches.has(e)?e:null}_optionOf(t){return this._branches?.get(t)??this._values?.find(({optionEl:e})=>e===t)?.el}_rowOf(t){return Array.from(this._branches).find(([,i])=>i===t)?.[0]??this._values.find(({el:i})=>i===t)?.optionEl}_activate(t){t.closest("[hidden]")||(this._branches.has(t)?this._toggle(t,t.ariaExpanded!=="true"):this._selectOptionElement(t))}_openOrEnter(t){this._branches.has(t)&&(t.ariaExpanded!=="true"?this._toggle(t,!0):this._focusRow(t.querySelector(":scope > ul > li:not(.disabled, [hidden])")))}_closeOrLeave(t){t.ariaExpanded==="true"?this._toggle(t,!1):this._focusRow(this._parentRow(t))}_openSiblings(t){Array.from(t.parentElement.children).forEach(e=>{this._branches.has(e)&&!e.hasAttribute("hidden")&&this._toggle(e,!0)})}_typeahead(t,e){clearTimeout(this._typedTimer),this._typed+=e.toLowerCase(),this._typedTimer=setTimeout(()=>{this._typed=""},1e3);let i=this._enabledRows(),n=i.indexOf(t)+(this._typed.length===1?1:0),o=[...i.slice(n),...i.slice(0,n)].find(a=>a.firstChild.textContent.trim().toLowerCase().startsWith(this._typed));this._focusRow(o)}_toggle(t,e){this._setExpanded(t,e),this.menu?.isOpen&&this.menu.recalculateDimensions()}_keyFor(t){if(u.plainKey(t))return bl[this._logicalKey(t.key)]??(t.key.length===1?El:void 0)}_logicalKey(t){return getComputedStyle(this.tree).direction==="rtl"&&yl[t]||t}};qt.key="Expressive_TreeSelect";var Tl={onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},Ll="(width < 600px)",xn=200;function Mn(r){let s=r.activeElement;for(;s?.shadowRoot?.activeElement;)s=s.shadowRoot.activeElement;return s}var zt=class extends b{constructor(t,e){super(t,e);this._hoverPanel=null;this.expand=()=>{this.isExpanded||this._notify("open",this.options.onOpenStart,{current:()=>!this.isExpanded})&&(this.isExpanded=!0,this.el.classList.add("expanded"),this._sync(),this._notify("opened",this.options.onOpenEnd,{current:()=>this.isExpanded}))};this.collapse=()=>{this.isExpanded&&this._notify("close",this.options.onCloseStart,{current:()=>this.isExpanded})&&(this.isExpanded=!1,this.el.classList.remove("expanded"),this._sync(),this._notify("closed",this.options.onCloseEnd,{current:()=>!this.isExpanded}))};this.toggle=()=>{this.isExpanded?this.collapse():this.expand()};this._onPointerOver=t=>{if(t.pointerType!=="mouse")return;clearTimeout(this._hoverTimer);let e=t.target,i=this._panelAt(e);i?i!==this._hoverPanel&&(this._hoverTimer=setTimeout(()=>this._hoverOpen(e),xn)):this._hoverClose(e)};this._onPointerLeave=t=>{t.pointerType==="mouse"&&(clearTimeout(this._hoverTimer),this._hoverClose())};this._onClick=t=>{let e=t.target;if(!(!(e instanceof Node)||this._pinPanel(t))){if(this._toggle?.contains(e)){this.toggle(),t.preventDefault();return}this._isScrimClick(t)&&this.isExpanded&&this._isModal()&&this.collapse()}};this._onKeyDown=t=>{if(!(t.key!=="Escape"||t.defaultPrevented||this._escapePanel(t))&&this.isExpanded&&this._isModal()){let e=this.el.getRootNode(),i=this.el.contains(e.activeElement),n=Mn(e);this.collapse(),!this.isExpanded&&i&&Mn(e)===n&&this._toggle?.focus()}};this._toggle=this._findToggle(),this._mql=window.matchMedia(Ll),this.isExpanded=this.el.classList.contains("expanded"),this._sync();let{signal:i}=this._events;this.el.addEventListener("click",this._onClick,{signal:i}),this.el.addEventListener("pointerover",this._onPointerOver,{signal:i}),this.el.addEventListener("pointerleave",this._onPointerLeave,{signal:i}),document.addEventListener("keydown",this._onKeyDown,{signal:i})}static get defaults(){return Tl}destroy(){clearTimeout(this._hoverTimer),super.destroy()}_findToggle(){let t=this.el.querySelector(":scope > button:not(.button, [popovertarget])");return t instanceof HTMLButtonElement?t:null}_isCompact(){return this._mql.matches}_isModal(){return this.el.classList.contains("modal")||this._isCompact()}_sync(){this.el.setAttribute("aria-expanded",this.isExpanded?"true":"false"),this._toggle?.setAttribute("aria-expanded",this.isExpanded?"true":"false")}_panelAt(t){let i=(t instanceof Element?t.closest("button[popovertarget]:enabled"):null)?.popoverTargetElement;return i?.classList.contains("navigation-rail-panel")?i:null}_hoverOpen(t){let e=this._panelAt(t);!e||e.matches(":popover-open")||(e.showPopover.call(e,{source:t.closest("button[popovertarget]")}),this._hoverPanel=e)}_hoverClose(t=null){let e=this._hoverPanel;!e||e.contains(t)||(this._hoverTimer=setTimeout(()=>{let i=this.el.getRootNode();e.matches(":popover-open")&&!e.contains(i.activeElement)&&e.hidePopover(),this._hoverPanel===e&&(this._hoverPanel=null)},xn))}_pinPanel(t){let e=this._panelAt(t.target);return e?(clearTimeout(this._hoverTimer),e===this._hoverPanel&&e.matches(":popover-open")&&t.preventDefault(),this._hoverPanel=null,!0):!1}_escapePanel(t){clearTimeout(this._hoverTimer),this._hoverPanel=null;let e=Array.from(this.el.querySelectorAll(".navigation-rail-panel")).find(o=>o.matches(":popover-open"));if(!e)return!1;if(e.querySelector(":popover-open"))return!0;let i=this.el.getRootNode(),n=e.contains(i.activeElement);return e.hidePopover(),n&&e.previousElementSibling?.focus(),t.preventDefault(),!0}_isScrimClick(t){if(t.target!==this.el)return!1;let{left:e,right:i}=this.el.getBoundingClientRect();return t.clientX<e||t.clientX>i}};zt.key="Expressive_NavigationRail";var wl={ltr:{ArrowLeft:-1,ArrowRight:1},rtl:{ArrowLeft:1,ArrowRight:-1}},xl={duration:null,onShow:null,swipeable:!1,responsiveThreshold:1/0},Cn=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches?"instant":"smooth",kn=r=>r.matches('.disabled, [aria-disabled="true"]'),An=r=>r.checkVisibility?.()??!0,Sn=r=>!kn(r)&&An(r),Kt=class Kt extends b{constructor(t,e){var i;super(t,e);this._panels=[];this._scrollTarget=null;this._trackObserver=null;this._trackWidth=-1;this._originalPanels=new Map;this._originalLinks=new Map;this._tablist=!1;this._barTabindex=null;this._stripObserver=null;this._handleKeydown=t=>{let e=wl[getComputedStyle(this.el).direction==="rtl"?"rtl":"ltr"],i=u.focusTarget(Array.from(this._tabLinks).filter(An),t,e,!0);i&&(t.preventDefault(),i.focus(),this._followFocus(i))};this._handleTabClick=t=>{let e=t.target;if(!e)return;let i=e.closest("a");if(!i||!Array.from(this._tabLinks).includes(i))return;if(i.classList.contains("disabled")||i.getAttribute("aria-disabled")==="true"){t.preventDefault();return}i.hasAttribute("target")||(t.preventDefault(),this._select(i))};this._releaseScrollTarget=()=>{clearTimeout(this._scrollTimer),this._scrollTarget=null};this._handleTrackScroll=()=>{if(this._scrollTarget!==null){this._trackAt(this._scrollTarget)?this._releaseScrollTarget():this._waitForScroll();return}let t=this._panels[this._trackIndex()];!t||t===this._content||this._showPanel(Array.from(this._tabLinks).find(e=>this._panelFor(e)===t))};if(this._tabLinks=this._queryTabLinks(),!this._tabLinks.length){console.error("Tabs: no tab links (an <a> child) to show");return}this._setupTablist(),this._tabLinks.forEach(n=>{this._originalLinks.set(n,{active:n.classList.contains("active"),current:n.getAttribute("aria-current"),selected:n.getAttribute("aria-selected"),tabindex:n.getAttribute("tabindex")});let o=this._panelFor(n);o&&this._originalPanels.set(o,{display:o.style.display,priority:o.style.getPropertyPriority("display"),active:o.classList.contains("active"),inert:o.inert})}),(i=this.options).swipeable&&(i.swipeable=window.innerWidth<=this.options.responsiveThreshold&&this._originalPanels.size>0),this._index=0,this._setupActiveTabLink(),this.options.swipeable?this._setupSwipeableTabs():this._setupNormalTabs(),this._setTabsAndTabWidth(),this._createIndicator(),this._setupEventHandlers(),document.fonts?.ready.then(()=>{this.el.Expressive_Tabs===this&&this._remeasure()})}_setupTablist(){this._tablist=this.el.getAttribute("role")==="tablist",this._barTabindex=this.el.getAttribute("tabindex"),this._tablist&&(this.el.tabIndex=-1),this._stripObserver=new ResizeObserver(()=>{this._tablist&&this._refreshTabStop(),this._remeasure()}),this._stripObserver.observe(this.el),this._tabLinks.forEach(t=>this._stripObserver.observe(t))}static get defaults(){return xl}destroy(){this._stripObserver?.disconnect(),this._stripObserver=null,this._indicator?.remove(),this._track&&this._teardownSwipeableTabs(),this._originalPanels.forEach((t,e)=>{e.style.setProperty("display",t.display,t.priority),e.classList.toggle("active",t.active),e.inert=t.inert,e.className||e.removeAttribute("class")}),this._originalLinks.forEach((t,e)=>{e.classList.toggle("active",t.active),x(e,"aria-current",t.current),x(e,"aria-selected",t.selected),x(e,"tabindex",t.tabindex)}),x(this.el,"tabindex",this._barTabindex),super.destroy()}get index(){return this._index}_setupEventHandlers(){this.el.addEventListener("click",this._handleTabClick,{signal:this._events.signal}),this.el.addEventListener("keydown",this._handleKeydown,{signal:this._events.signal})}_followFocus(t){this._tablist&&t!==this._activeTabLink&&Kt.getInstance(this.el)===this&&this._select(t)}_remeasure(){this._setTabsAndTabWidth(),this._tabWidth!==0&&this._tabsWidth!==0&&this._positionIndicator()}_queryTabLinks(){return this.el.querySelectorAll(":scope > a")}_select(t){this.options.swipeable?this._clickSwipeable(t):this._clickTab(t)}_clickSwipeable(t){this._panels.includes(this._panelFor(t))&&(t!==this._activeTabLink&&!this._showPanel(t)||this._scrollToActivePanel(Cn()))}_clickTab(t){let e=this._content;this._tabLinks=this._queryTabLinks();let i=this._index;this._setActiveTabLink(t),!(this._content&&!this._swapPanels(e))&&(this._setTabsAndTabWidth(),this._animateIndicator(i))}_swapPanels(t){return this._content.style.display="",this._content.classList.add("active"),t&&t!==this._content&&(t.style.display="none",t.classList.remove("active")),this._notifyShow()}_createIndicator(){let t=document.createElement("span");t.classList.add("indicator"),this.el.appendChild(t),this._indicator=t,this._positionIndicator()}_positionIndicator(){let t=this._calcLeftPos(this._activeTabLink),e=this._calcRightPos(this._activeTabLink);this._indicator.style.left=t+"px",this._indicator.style.right=e+"px"}_panelFor(t){return!t.hash||t.hasAttribute("target")?null:u.getElementById(this.el,Kt._decodeHash(t.hash))}static _decodeHash(t){try{return decodeURIComponent(t.slice(1))}catch{return t.slice(1)}}_setActiveTabLink(t,e=Cn()){let i=this._tabStop(t);Array.from(this._tabLinks).forEach(n=>this._mark(n,n===t,n===i)),this._activeTabLink=t,this._index=Array.from(this._tabLinks).indexOf(t),this._content=this._panelFor(t),this._reveal(t,e)}_mark(t,e,i){t.classList.toggle("active",e),this._tablist?(t.setAttribute("aria-selected",String(e)),t.tabIndex=i?0:-1):e?t.setAttribute("aria-current","page"):t.removeAttribute("aria-current")}_tabStop(t){if(Sn(t))return t;let e=Array.from(this._tabLinks);return e.find(Sn)??e.find(i=>!kn(i))??t}_refreshTabStop(){let t=this._tabStop(this._activeTabLink);this._tabLinks.forEach(e=>e.tabIndex=e===t?0:-1)}_reveal(t,e){let i=this.el.getBoundingClientRect(),n=t.getBoundingClientRect(),o=Math.min(0,n.left-i.left)||Math.max(0,n.right-i.right);o&&this.el.scrollBy({left:o,behavior:e})}_setupActiveTabLink(){let t=location.hash&&Kt._decodeHash(location.hash);this._activeTabLink=Array.from(this._tabLinks).find(e=>t&&Kt._decodeHash(e.getAttribute("href")??"")===t)??this.el.querySelector("a.active")??this._tabStop(this._tabLinks[0]),this._setActiveTabLink(this._activeTabLink,"instant"),this._originalPanels.forEach((e,i)=>i.classList.toggle("active",i===this._content))}_setupSwipeableTabs(){this._panels=[...new Set(Array.from(this._tabLinks,i=>this._panelFor(i)).filter(Boolean))];let t=document.createElement("div");t.classList.add("tabs-content"),this._panels[0].before(t),this._panels.forEach(i=>{let n=document.createComment("");i.before(n),this._originalPanels.get(i).marker=n,t.appendChild(i),i.style.display=""}),this._track=t,this._syncPanels();let e={passive:!0,signal:this._events.signal};t.addEventListener("scroll",this._handleTrackScroll,e),t.addEventListener("pointerdown",this._releaseScrollTarget,e),t.addEventListener("wheel",this._releaseScrollTarget,e),this._trackObserver=new ResizeObserver(()=>{t.clientWidth!==this._trackWidth&&(this._trackWidth=t.clientWidth,this._scrollToActivePanel("instant"))}),this._trackObserver.observe(t),this._scrollToActivePanel("instant")}_teardownSwipeableTabs(){let t=this._track;this._trackObserver?.disconnect(),this._trackObserver=null,this._releaseScrollTarget(),this._originalPanels.forEach((e,i)=>e.marker?.replaceWith(i)),t.remove(),this._track=void 0}_syncPanels(){this._panels.forEach(t=>{t.classList.toggle("active",t===this._content),t.inert=t!==this._content})}_trackIndex(){return Math.round(Math.abs(this._track.scrollLeft)/(this._track.clientWidth||1))}_trackAt(t){return Math.abs(this._panels[t].getBoundingClientRect().left-this._track.getBoundingClientRect().left)<1}_scrollToActivePanel(t){let e=this._panels.indexOf(this._content);if(e<0||this._trackAt(e))return;let n=(getComputedStyle(this._track).direction==="rtl"?-1:1)*e*this._track.clientWidth;this._scrollTarget=e,this._waitForScroll(),this._track.scrollTo({left:n,behavior:t})}_waitForScroll(){clearTimeout(this._scrollTimer),this._scrollTimer=setTimeout(()=>{this._releaseScrollTarget(),this._scrollToActivePanel("instant")},500)}_showPanel(t){let e=this._index;return this._setActiveTabLink(t),this._syncPanels(),this._setTabsAndTabWidth(),this._animateIndicator(e),this._notifyShow()}_notifyShow(){let t=this._content;return this._notify("change",this.options.onShow,{args:[t],detail:{panel:t},current:()=>this._content===t})}_setupNormalTabs(){Array.from(this._tabLinks).forEach(t=>{if(t===this._activeTabLink)return;let e=this._panelFor(t);e&&(e.style.display="none")})}_setTabsAndTabWidth(){this._tabsWidth=this.el.getBoundingClientRect().width,this._tabWidth=Math.max(this._tabsWidth,this.el.scrollWidth)/this._tabLinks.length}_calcRightPos(t){return Math.ceil(this._tabsWidth-t.offsetLeft-t.getBoundingClientRect().width)}_calcLeftPos(t){return Math.floor(t.offsetLeft)}updateTabIndicator(){this._setTabsAndTabWidth(),this._animateIndicator(this._index)}_animateIndicator(t){let e=this.options.duration,i=e==null?["var(--md-comp-tabs-indicator-duration) var(--md-comp-tabs-indicator-easing)","calc(var(--md-comp-tabs-indicator-duration) * 0.3)"]:[`${e}ms ease-out`,`${e*.3}ms`],[n,o]=this._index-t>=0?[i[1],"0s"]:["0s",i[1]];this._indicator.style.transition=`left ${i[0]} ${n}, right ${i[0]} ${o}`,this._positionIndicator()}select(t){let e=Array.from(this._tabLinks).find(i=>i.getAttribute("href")==="#"+t);e&&e.click()}};Kt.key="Expressive_Tabs";var _e=Kt;var Ml=["hours","minutes","seconds"],Hn={ArrowUp:1,ArrowDown:-1,PageUp:5,PageDown:-5},Rn=(r,s)=>r%12+(s?12:0),In={hours:[3600,24],minutes:[60,60],seconds:[1,60]},Cl=(r,s)=>{let t=r%12+(s?0:12);return t%12?t:12-t},On=24*3600-1,nt=r=>String(r).padStart(2,"0");function Dn(r,s){let t=r.trim().toUpperCase();if(t.split(":")[0]==="NOW"){let l=new Date(+new Date+s);return[l.getHours(),l.getMinutes(),l.getSeconds()]}let e=/AM|PM/.exec(t)?.[0],i=t.replace(/AM|PM/,"").split(":"),[n,o,a]=[0,1,2].map(l=>+i[l]||0);return[e?Rn(n,e==="PM"):n,o,a]}var Pn=([r,s,t])=>r*3600+s*60+t;function Sl(r){let s=u.locale(r);if(!s)return{};let t=new Intl.DateTimeFormat(s,{hour:"numeric"}).resolvedOptions().hourCycle;return{twelveHour:t==="h11"||t==="h12"}}var kl={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:"now",fromNow:0,showClearBtn:!1,autoSubmit:!0,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},twelveHour:!0,showSeconds:!1,minTime:null,maxTime:null,vibrate:!0,onSelect:null,onInputInteraction:null,onDone:null,onCancel:null,displayPlugin:null,displayPluginOptions:null},Fe=class Fe extends b{constructor(t,e){var i;super(t,{...Sl(t),...e});this._dragPointerId=null;this._drag=null;this._clockBuilt=!1;this._handRefused=!1;this._limits=[0,On];this._handleInputClick=()=>{this._updateTimeFromInput(),this._ensureClockBuilt(),this.displayPlugin&&this.displayPlugin.show(),this.inputHours.focus(),typeof this.options.onInputInteraction=="function"&&this.options.onInputInteraction.call(this)};this._handleInputKeydown=u.ignoringComposition(t=>{t.key==="Enter"&&(t.preventDefault(),this._handleInputClick())});this._handleClockClickStart=t=>{if(!t.isPrimary||t.pointerType==="mouse"&&t.button!==0)return;t.preventDefault(),this._ensureClockBuilt();let e=this.plate.getBoundingClientRect(),i={x:e.left,y:e.top};this.x0=i.x+this.options.dialRadius,this.y0=i.y+this.options.dialRadius,this.moved=!1,this._dragPointerId=t.pointerId,this.dx=t.clientX-this.x0,this.dy=t.clientY-this.y0,this.setHand(this.dx,this.dy,!1),this._drag?.abort(),this._drag=R(this.el);let{signal:n}=this._drag;document.addEventListener("pointermove",this._handleDocumentClickMove,{signal:n}),document.addEventListener("pointerup",this._handleDocumentClickEnd,{signal:n}),document.addEventListener("pointercancel",this._handleDocumentClickCancel,{signal:n})};this._handleDocumentClickMove=t=>{if(t.pointerId!==this._dragPointerId)return;t.preventDefault();let e=t.clientX-this.x0,i=t.clientY-this.y0;this.moved=!0,this.setHand(e,i,!1)};this._handleDocumentClickEnd=t=>{if(t.pointerId!==this._dragPointerId)return;this._dragPointerId=null,t.preventDefault(),this._drag.abort();let e=t.clientX-this.x0,i=t.clientY-this.y0;this.moved&&e===this.dx&&i===this.dy&&this.setHand(e,i),this._handRefused||this._chooseHand()};this._handleDocumentClickCancel=t=>{t.pointerId===this._dragPointerId&&(this._dragPointerId=null,this.moved=!1,this._drag.abort())};this._handleAmPmClick=t=>{this._handleAmPmInteraction(t.target)};this._handleAmPmInteraction=t=>{this.amOrPm=t.classList.contains("am-btn")?"AM":"PM",this._updateAmPmView(),this._afterChange(),this.resetClock(null)};this.showView=(t,e=null)=>{this._ensureClockBuilt();let i=t==="hours",n=i?this.hoursView:this.minutesView,o=i?this.minutesView:this.hoursView;this.currentView=t,o.classList.add("timepicker-dial-out"),n.style.visibility="visible",n.classList.remove("timepicker-dial-out"),this.resetClock(e),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout(()=>{o.style.visibility="hidden"},this.options.duration)};this._handleDigitalKeydown=u.ignoringComposition(t=>{if(t.key in Hn)return this._step(t);t.key==="Enter"&&(t.preventDefault(),this._formatFields(),this.options.autoSubmit?this.done():this.confirm())});this._inputFromTextField=t=>{let e=t.target,i=this._unitOf(e);if(!i)return;i!=="seconds"&&this._cancelClockReset();let n=this._fieldValue(i,e.value);Number.isNaN(n)||(this[i]=n,this._afterChange(e),this._moveHand(i,n))};this.done=(t=null)=>{let e=this.el.value,i=t?"":this._clockTime(this.hours);this.time=i,t||(i=this._inputValue(i)),this.el.value=i,i!==e&&this.el.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0,composed:!0}))};this.confirm=()=>{this.done(),de(this.displayPlugin),this._notify("confirm",this.options.onDone,{args:[]})};this.cancel=()=>{de(this.displayPlugin),this._notify("cancel",this.options.onCancel,{args:[]})};this.clear=()=>{this.done(!0)};(i=this.options).autoSubmit&&(i.autoSubmit=this.options.displayPlugin!=="modal"),this.id=u.guid(),this._readLimits(),this._insertHTMLIntoDOM(),this._setupVariables(),this._setupEventHandlers(),this._pickerSetup(),this.displayPlugin=ui(this.options.displayPlugin,this.el,this.containerEl,this.options.displayPluginOptions,this.cancel)}static get defaults(){return kl}destroy(){clearTimeout(this._autoSubmitTimer),clearTimeout(this.toggleViewTimer),clearTimeout(this.vibrateTimer),this._cancelClockReset(),this._drag?.abort(),this.displayPlugin?.destroy(),this.containerEl.remove(),super.destroy()}_setupEventHandlers(){let{signal:t}=this._events;this.el.addEventListener("click",this._handleInputClick,{signal:t}),this.el.addEventListener("keydown",this._handleInputKeydown,{signal:t}),this.plate.addEventListener("pointerdown",this._handleClockClickStart),this.digitalClock.addEventListener("input",this._inputFromTextField,{signal:t}),this.digitalClock.addEventListener("keydown",this._handleDigitalKeydown,{signal:t}),this.inputHours.addEventListener("focus",()=>this.showView("hours")),this.inputHours.addEventListener("focusout",()=>this.formatHours()),this.inputMinutes.addEventListener("focus",()=>this.showView("minutes")),this.inputMinutes.addEventListener("focusout",()=>this.formatMinutes()),this.inputSeconds?.addEventListener("focusout",()=>this.formatSeconds())}_chooseHand(){this.currentView==="hours"?(this.inputMinutes.focus(),this.showView("minutes",this.options.duration/2)):(clearTimeout(this._autoSubmitTimer),this._autoSubmitTimer=setTimeout(()=>{this._autoSubmitTimer=null,this.options.autoSubmit&&this.done()},this.options.duration/2));let{hours:t,minutes:e}=this;this._notify("select",this.options.onSelect,{args:[t,e],detail:{hours:t,minutes:e},current:()=>this.hours===t&&this.minutes===e})}_readLimits(){let{minTime:t,maxTime:e,showSeconds:i,fromNow:n}=this.options,o=(c,h)=>c?Pn(Dn(c,n)):h,[a,l]=[o(t,0),o(e,On)];if(i||([a,l]=[Math.ceil(a/60)*60,Math.floor(l/60)*60+59]),a>l)return console.warn("Timepicker ignored minTime and maxTime: minTime is after maxTime.",this.el);this._limits=[a,l]}_insertHTMLIntoDOM(){let t=document.createElement("template");t.innerHTML=Fe._template.trim(),this.containerEl=t.content.firstChild,this.containerEl.id="container-"+this.id;let e=this.options.container,i=e instanceof HTMLElement?e:document.querySelector(e);this.options.container&&i?i.append(this.containerEl):this.el.parentElement.appendChild(this.containerEl)}_setupVariables(){this.currentView="hours",this.canVibrate=typeof navigator.vibrate=="function",this._canvas=this.containerEl.querySelector(".timepicker-canvas"),this.plate=this.containerEl.querySelector(".timepicker-plate"),this.digitalClock=this.containerEl.querySelector(".timepicker-display-column"),this.hoursView=this.containerEl.querySelector(".timepicker-hours"),this.minutesView=this.containerEl.querySelector(".timepicker-minutes"),this.inputHours=this.containerEl.querySelector(".timepicker-input-hours"),this.inputMinutes=this.containerEl.querySelector(".timepicker-input-minutes"),this.inputSeconds=this.containerEl.querySelector(".timepicker-input-seconds"),this.options.showSeconds||this._removeSecondsField();for(let t of this._units()){let[e,i]=this._bounds(t),n={role:"spinbutton","aria-valuemin":e,"aria-valuemax":i,"aria-label":this.options.i18n[t]};Object.entries(n).forEach(([o,a])=>this._input(t).setAttribute(o,String(a)))}this.spanAmPm=this.containerEl.querySelector(".timepicker-span-am-pm"),this.footer=this.containerEl.querySelector(".timepicker-footer"),this.amOrPm="PM"}_removeSecondsField(){this.containerEl.querySelectorAll(".timepicker-seconds-divider, .timepicker-input-seconds-wrapper").forEach(t=>t.remove()),this.inputSeconds=null}_input(t){return{hours:this.inputHours,minutes:this.inputMinutes,seconds:this.inputSeconds}[t]}_units(){return Ml.filter(t=>this._input(t))}_unitOf(t){return this._units().find(e=>this._input(e)===t)}_pickerSetup(){Be(this.footer,this.options,"timepicker-clear",this.clear,this.confirm,this.cancel),this._updateTimeFromInput(),this.options.displayPlugin||this.showView("hours")}_ensureClockBuilt(){this._clockBuilt||(this._clockBuilt=!0,this._clockSetup(),this._updateAmPmView(),this._updateRanges())}_clockSetup(){this.options.twelveHour&&(this._amBtn=document.createElement("button"),this._amBtn.type="button",this._amBtn.classList.add("am-btn"),this._amBtn.innerText="AM",this._amBtn.addEventListener("click",this._handleAmPmClick),this.spanAmPm.appendChild(this._amBtn),this._pmBtn=document.createElement("button"),this._pmBtn.type="button",this._pmBtn.classList.add("pm-btn"),this._pmBtn.innerText="PM",this._pmBtn.addEventListener("click",this._handleAmPmClick),this.spanAmPm.appendChild(this._pmBtn)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}_buildSVGClock(){let t=this.options.dialRadius,e=this.options.tickRadius,i=t*2;this.plate.style.width=this.plate.style.height=i+"px";let n=M("svg",{class:"timepicker-svg",width:String(i),height:String(i)}),o=M("g",{transform:`translate(${t},${t})`}),a=M("circle",{class:"timepicker-canvas-bearing",cx:"0",cy:"0",r:"4"}),l=M("line",{x1:"0",y1:"0"}),c=M("circle",{class:"timepicker-canvas-bg",r:String(e)});o.appendChild(l),o.appendChild(c),o.appendChild(a),n.appendChild(o),this._canvas.appendChild(n),this.hand=l,this.bg=c,this.g=o}_buildHoursView(){if(this.options.twelveHour)for(let t=1;t<13;t+=1){let e=t/6*Math.PI,i=this.options.outerRadius;this._buildHoursTick(t,e,i)}else for(let t=0;t<24;t+=1){let e=t/6*Math.PI,n=t>0&&t<13?this.options.innerRadius:this.options.outerRadius;this._buildHoursTick(t,e,n)}}_buildHoursTick(t,e,i){this._placeTick(this.hoursView,e,i,t===0?"00":t.toString())}_buildMinutesView(){for(let t=0;t<60;t+=5){let e=t/30*Math.PI;this._placeTick(this.minutesView,e,this.options.outerRadius,nt(t))}}_placeTick(t,e,i,n){let o=document.createElement("div");o.classList.add("timepicker-tick"),o.style.left=this.options.dialRadius+Math.sin(e)*i-this.options.tickRadius+"px",o.style.top=this.options.dialRadius-Math.cos(e)*i-this.options.tickRadius+"px",o.textContent=n,t.appendChild(o)}_updateAmPmView(){!this._amBtn||!this._pmBtn||(this._amBtn.setAttribute("aria-pressed",String(this.amOrPm==="AM")),this._pmBtn.setAttribute("aria-pressed",String(this.amOrPm==="PM")),this._amBtn.classList.toggle("outlined",this.amOrPm!=="AM"),this._pmBtn.classList.toggle("outlined",this.amOrPm!=="PM"),this.options.twelveHour&&(this.amOrPm==="PM"?(this._amBtn.classList.remove("filled"),this._pmBtn.classList.add("filled")):this.amOrPm==="AM"&&(this._amBtn.classList.add("filled"),this._pmBtn.classList.remove("filled"))))}_updateTimeFromInput(){this._cancelClockReset();let[t,e,i]=Dn(`${this.el.value||this.options.defaultTime||""}`,this.options.fromNow);[this.minutes,this.seconds]=[e,i],this._setHours24(t),this._clamp(),this._writeFields(),this._updateAmPmView(),this._updateRanges()}_writeFields(t){this._units().forEach(e=>{this._input(e)!==t&&(this._input(e).value=nt(this[e]))})}_afterChange(t){this._clamp()&&this._writeFields(t),this._updateRanges()}_updateRanges(){for(let i of this._units()){let[n,o]=this._range(i);this._input(i).setAttribute("aria-valuemin",String(n)),this._input(i).setAttribute("aria-valuemax",String(o))}let[t,e]=this._dayRange("hours");this._amBtn&&([this._amBtn.disabled,this._pmBtn.disabled]=[t>11,e<12]),this._disableTicks(this.hoursView,"hours"),this._disableTicks(this.minutesView,"minutes")}_disableTicks(t,e){t.querySelectorAll(".timepicker-tick").forEach(i=>{i.classList.toggle("is-disabled",!this._allows(e,Number(i.textContent)))})}_setHours24(t){if(!this.options.twelveHour)return void(this.hours=t);this.amOrPm=t>=12?"PM":"AM",this.hours=t%12||12,this._updateAmPmView()}_time(){return Pn([this._dayValue("hours",this.hours),this.minutes,this.seconds])}_clamp(){let t=this._time(),e=Math.min(Math.max(t,this._limits[0]),this._limits[1]);return e===t?!1:(this._setHours24(Math.floor(e/3600)),[this.minutes,this.seconds]=[Math.floor(e/60)%60,e%60],!0)}_cancelClockReset(){clearTimeout(this._clockResetTimer),this._clockResetTimer=null,this._canvas?.classList.remove("timepicker-canvas-out")}resetClock(t){this._cancelClockReset();let e=this.currentView,i=this[e],n=e==="hours",o=Math.PI/(n?6:30),a=i*o,l=n&&i>0&&i<13?this.options.innerRadius:this.options.outerRadius,c=Math.sin(a)*l,h=-Math.cos(a)*l;t?(this._canvas?.classList.add("timepicker-canvas-out"),this._clockResetTimer=setTimeout(()=>{this.setHand(c,h)},t)):this.setHand(c,h)}_bounds(t){return t!=="hours"?[0,59]:this.options.twelveHour?[1,12]:[0,23]}_range(t){let[e,i]=this._bounds(t),n=Array.from({length:i-e+1},(o,a)=>e+a).filter(o=>this._allows(t,o));return n.length?[Math.min(...n),Math.max(...n)]:[e,i]}_dayRange(t){let[e,i]=In[t],n=this._time()-this._time()%(e*i);return this._limits.map(o=>Math.min(Math.max(Math.floor((o-n)/e),0),i-1))}_dayValue(t,e){return t==="hours"&&this.options.twelveHour?Rn(e,this.amOrPm==="PM"):e}_allows(t,e){let[i,n]=this._dayRange(t),o=this._dayValue(t,e);return Math.min(Math.max(o,i),n)===o}_fieldValue(t,e){let i=Number(e.trim()||NaN);return this._takes(t,i)?i:NaN}_takes(t,e){let[i,n]=this._bounds(t);return Number.isInteger(e)&&Math.min(Math.max(e,i),n)===e&&this._allows(t,e)}_moveHand(t,e){t!=="seconds"&&(this._cancelClockReset(),this.drawClockFromTimeInput(e,t==="hours"))}_step(t){let e=t.target,i=this._unitOf(e);if(!i)return;t.preventDefault();let n=this._stepValue(i,Hn[t.key]);i==="hours"?this._setHours24(n):this[i]=n,this._afterChange(),e.value=nt(this[i]),this._moveHand(i,this[i])}_stepValue(t,e){let[i,n]=this._dayRange(t),o=In[t][1],a=this._dayValue(t,this[t])+e;return i===0&&n===o-1?(a+o)%o:Math.min(Math.max(a,i),n)}drawClockFromTimeInput(t,e){let i=Math.PI/(e?6:30),n=t*i,o;this.options.twelveHour?o=this.options.outerRadius:o=e&&t>0&&t<13?this.options.innerRadius:this.options.outerRadius,this.setClockAttributes(n,o)}setHand(t,e,i=!1){this._cancelClockReset();let n=this.currentView==="hours",o=Math.PI/(n||i?6:30),a=Math.sqrt(t*t+e*e),l=n&&a<(this.options.outerRadius+this.options.innerRadius)/2,c=l&&!this.options.twelveHour?this.options.innerRadius:this.options.outerRadius,h=Math.atan2(t,-e);h<0&&(h=Math.PI*2+h);let d=Math.round(h/o);h=d*o;let p=n?this._hourAt(d,l):(i?d*5:d)%60;this._handRefused=!this._allows(this.currentView,p),!this._handRefused&&(this[this.currentView]!==p&&this.canVibrate&&this.options.vibrate&&!this.vibrateTimer&&(navigator.vibrate(10),this.vibrateTimer=setTimeout(()=>{this.vibrateTimer=null},100)),this[this.currentView]=p,(n?this.inputHours:this.inputMinutes).value=nt(p),this.setClockAttributes(h,c),this._afterChange())}_hourAt(t,e){return this.options.twelveHour?t%12||12:Cl(t,e)}setClockAttributes(t,e){if(!this.hand||!this.bg)return;let i=Math.sin(t)*(e-this.options.tickRadius),n=-Math.cos(t)*(e-this.options.tickRadius),o=Math.sin(t)*e,a=-Math.cos(t)*e;this.hand.setAttribute("x2",i.toString()),this.hand.setAttribute("y2",n.toString()),this.bg.setAttribute("cx",o.toString()),this.bg.setAttribute("cy",a.toString())}formatHours(){this.inputHours.value==""&&this.setHoursDefault(),this.inputHours.value=nt(this.hours)}formatMinutes(){this.inputMinutes.value==""&&(this.minutes=new Date().getMinutes()),this.inputMinutes.value=nt(this.minutes)}formatSeconds(){this.inputSeconds.value==""&&(this.seconds=new Date().getSeconds()),this.inputSeconds.value=nt(this.seconds)}_formatFields(){this.formatHours(),this.formatMinutes(),this.inputSeconds&&this.formatSeconds()}setHoursDefault(){this.hours=new Date().getHours(),this.options.twelveHour&&(this.hours=this.hours%12||12),this.inputHours.value=this.hours.toString()}_clockTime(t){return(this.inputSeconds?[t,this.minutes,this.seconds]:[t,this.minutes]).map(nt).join(":")}_inputValue(t){return this.el.type==="time"?this._clockTime(this._dayValue("hours",this.hours)):this.options.twelveHour?`${t} ${this.amOrPm}`:t}};Fe.key="Expressive_Timepicker",Fe._template=`<div class="timepicker-container">
29
27
  <div class="timepicker-digital-display">
30
28
  <div class="timepicker-text-container">
31
29
  <div class="timepicker-display-column timepicker-display-digital-clock">
32
30
  <div class="timepicker-input-hours-wrapper">
33
- <input type="text" maxlength="2" class="timepicker-input-hours text-primary" />
31
+ <input type="text" maxlength="2" class="timepicker-input-hours" />
34
32
  </div>
35
33
  <div class="timepicker-input-divider-wrapper">
36
34
  <span class="timepicker-input-divider">:</span>
@@ -38,6 +36,12 @@ var Expressive=(()=>{var qt=Object.defineProperty;var He=Object.getOwnPropertyDe
38
36
  <div class="timepicker-input-minutes-wrapper">
39
37
  <input type="text" maxlength="2" class="timepicker-input-minutes" />
40
38
  </div>
39
+ <div class="timepicker-input-divider-wrapper timepicker-seconds-divider">
40
+ <span class="timepicker-input-divider">:</span>
41
+ </div>
42
+ <div class="timepicker-input-seconds-wrapper">
43
+ <input type="text" maxlength="2" class="timepicker-input-seconds" />
44
+ </div>
41
45
  </div>
42
46
  <div class="timepicker-display-column timepicker-display-am-pm">
43
47
  <div class="timepicker-span-am-pm"></div>
@@ -52,8 +56,5 @@ var Expressive=(()=>{var qt=Object.defineProperty;var He=Object.getOwnPropertyDe
52
56
  </div>
53
57
  <div class="timepicker-footer"></div>
54
58
  </div>
55
- </div>`;var Tt=x;var Bi={text:"",action:"",onAction:null,dismissible:!1,displayLength:4e3,inDuration:300,outDuration:375,classes:"",completeCallback:null,activationPercent:.8,root:null},b=class b{constructor(n={}){this._dismissed=!1;this._returnFocus=null;this._restoreElement=null;for(this.options={...b.defaults,...n},n.displayLength===void 0&&this.options.action&&(this.options.displayLength=1/0),n.dismissible===void 0&&this.options.action&&(this.options.dismissible=!0),this.message=this.options.text,this.panning=!1,this.timeRemaining=this.options.displayLength;b._snackbars.length>0;){let i=b._snackbars.shift();i._dismissed=!0,i._restoreFocus(!0)}let t=document.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;this._returnFocus=t instanceof HTMLElement?t:null,this.el=this._createSnackbar();let e=m.portalRoot(this.options.root??document.body);(!b._container||!b._container.isConnected||b._container.parentNode!==e)&&(b._container&&b._removeContainer(),b._createContainer(e)),b._container.appendChild(this.el),this.el.Expressive_Snackbar=this,b._snackbars.push(this),this._animateIn(),this._setTimer()}static get defaults(){return Bi}static getInstance(n){return n.Expressive_Snackbar}static _createContainer(n=document.body){let t=document.createElement("div");t.setAttribute("id","snackbar-container"),t.addEventListener("pointerdown",b._onDragStart),document.addEventListener("pointermove",b._onDragMove),document.addEventListener("pointerup",b._onDragEnd),document.addEventListener("pointercancel",b._onDragCancel),n.appendChild(t),b._container=t}static _removeContainer(){document.removeEventListener("pointermove",b._onDragMove),document.removeEventListener("pointerup",b._onDragEnd),document.removeEventListener("pointercancel",b._onDragCancel),b._container.remove(),b._container=null}static _onDragStart(n){if(!n.isPrimary||n.pointerType==="mouse"&&n.button!==0)return;let t=n.target;if(t&&!t.closest("button, a")&&t.closest(".snackbar")){let i=t.closest(".snackbar").Expressive_Snackbar;if(!i)return;i.panning=!0,i._pauseTimer(),b._draggedSnackbar=i,i.el.classList.add("panning"),i.el.style.transition="",b._dragPointerId=n.pointerId,i.startingXPos=n.clientX,i.velocityX=0,i.time=Date.now(),i.xPos=n.clientX,i._activationDistance=i.el.offsetWidth*i.options.activationPercent}}static _onDragMove(n){if(b._dragPointerId===n.pointerId&&b._draggedSnackbar){n.preventDefault();let t=b._draggedSnackbar;t.deltaX=Math.abs(t.xPos-n.clientX),t.xPos=n.clientX,t.velocityX=t.deltaX/(Date.now()-t.time),t.time=Date.now();let e=t.xPos-t.startingXPos,i=t._activationDistance;t.el.style.transform=`translateX(${e}px)`,t.el.style.opacity=(1-Math.abs(e/i)).toString()}}static _onDragEnd(n){if(b._dragPointerId===n.pointerId&&(b._dragPointerId=null,b._draggedSnackbar)){let t=b._draggedSnackbar;t.panning=!1,t.el.classList.remove("panning");let e=t.xPos-t.startingXPos,i=t._activationDistance,s=Date.now()-t.time<100?t.velocityX:0;Math.abs(e)>i||s>1?(t.wasSwiped=!0,t.dismiss()):t._snapBack(),b._draggedSnackbar=null}}static _onDragCancel(n){if(b._dragPointerId!==n.pointerId)return;b._dragPointerId=null;let t=b._draggedSnackbar;t&&(t.panning=!1,t.el.classList.remove("panning"),t._snapBack(),b._draggedSnackbar=null)}_snapBack(){this.el.style.transition="transform .2s, opacity .2s",this.el.style.transform="",this.el.style.opacity="",this._resumeTimer()}static dismissAll(){for(let n of[...b._snackbars])n.dismiss()}_createSnackbar(){let n=this.options.snackbarId?m.getElementById(this.options.root??document.body,this.options.snackbarId):document.createElement("div");if(n instanceof HTMLTemplateElement)n=n.content.cloneNode(!0).firstElementChild;else if(n&&this.options.snackbarId){let e=document.createComment("");n.before(e);let i=[...n.childNodes],s=["class","style","role","aria-live","aria-atomic","inert"].map(o=>[o,n.getAttribute(o)]);this._restoreElement=()=>{n.replaceChildren(...i);for(let[o,a]of s)a===null?n.removeAttribute(o):n.setAttribute(o,a);e.replaceWith(n)}}if(!n)throw new Error("Snackbar body not found");this._events=new(n.ownerDocument.defaultView??window).AbortController;let t={signal:this._events.signal};if(n.classList.add("snackbar"),n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),n.inert=!1,n.addEventListener("focusin",e=>{e.relatedTarget instanceof HTMLElement&&!n.contains(e.relatedTarget)&&(this._returnFocus=e.relatedTarget),this._pauseTimer()},t),n.addEventListener("keydown",e=>{e.key!=="Escape"||e.defaultPrevented||this._dismissed||(e.preventDefault(),e.stopPropagation(),this.dismiss())},t),n.addEventListener("focusout",()=>{clearTimeout(this._focusTimer),this._focusTimer=setTimeout(()=>this._resumeTimer(),0)},t),n.addEventListener("pointerenter",()=>this._pauseTimer(),t),n.addEventListener("pointerleave",()=>this._resumeTimer(),t),this.options.classes.length>0&&n.classList.add(...this.options.classes.split(" ").filter(Boolean)),this.message){let e=document.createElement("p");e.textContent=this.message,n.replaceChildren(e)}if(this.options.action){let e=document.createElement("button");e.type="button",e.textContent=this.options.action,e.addEventListener("click",i=>{if(i.stopPropagation(),!this._dismissed)try{typeof this.options.onAction=="function"&&this.options.onAction()}finally{this.dismiss()}},t),n.appendChild(e)}if(this.options.dismissible){let e=document.createElement("button");e.type="button",e.className="circle",e.setAttribute("aria-label","Dismiss");let i=document.createElement("i");i.className="material-symbols",i.setAttribute("aria-hidden","true"),i.textContent="close",e.appendChild(i),e.addEventListener("click",s=>{s.stopPropagation(),this.dismiss()},t),n.appendChild(e)}return n}_remove(){if(this._events.signal.aborted)return;this._events.abort(),clearTimeout(this.counterTimeout),clearTimeout(this._transitionTimer),clearTimeout(this._dismissTimer),clearTimeout(this._focusTimer),this.counterTimeout=null,b._draggedSnackbar===this&&(b._draggedSnackbar=null,b._dragPointerId=null),this.el.Expressive_Snackbar=void 0,this._restoreElement?this._restoreElement():this.el.remove();let n=b._snackbars.indexOf(this);n>=0&&b._snackbars.splice(n,1),!b._snackbars.length&&b._container?.childElementCount===0&&b._removeContainer()}_animateIn(){this.el.style.display="",this.el.style.opacity="0",this.el.style.transform="translateY(24px)",this.el.style.transition=`
56
- transform ${this.options.inDuration}ms ease,
57
- opacity ${this.options.inDuration}ms ease
58
- `,this._transitionTimer=setTimeout(()=>{this.el.style.transform="",this.el.style.opacity="1"},1)}_setTimer(){this.timeRemaining!==1/0&&(this._deadline=Date.now()+this.timeRemaining,this.counterTimeout=setTimeout(()=>this.dismiss(),this.timeRemaining))}_pauseTimer(){this.counterTimeout!=null&&(clearTimeout(this.counterTimeout),this.counterTimeout=null,this.timeRemaining=Math.max(0,this._deadline-Date.now()))}_resumeTimer(){this._dismissed||this.panning||this.el.matches(":hover, :focus-within")||this.counterTimeout!=null||this._setTimer()}_restoreFocus(n=!1){let t=this.el.getRootNode().activeElement,e=t&&this.el.contains(t)?this._returnFocus:null;this.el.inert=!0,n&&this._remove(),e?.isConnected&&e.focus({preventScroll:!0})}dismiss(){if(this._dismissed||(this._dismissed=!0,clearTimeout(this.counterTimeout),this.counterTimeout=null,this._restoreFocus(),this._events.signal.aborted))return;let n=this.options.outDuration,t=[`margin ${n}ms ease`,`opacity ${n}ms ease`];if(this.wasSwiped){let e=this.xPos<this.startingXPos?-1:1;this.el.style.transform=`translateX(${e*this.el.offsetWidth}px)`,this.el.style.opacity="0",t.push(`transform ${n}ms ease`)}this.el.style.transition=t.join(", "),clearTimeout(this._transitionTimer),this._transitionTimer=setTimeout(()=>{this.el.style.opacity="0",this.el.style.marginTop="-40px"},1),this._dismissTimer=setTimeout(()=>{this._remove(),typeof this.options.completeCallback=="function"&&this.options.completeCallback()},this.options.outDuration)}};b._dragPointerId=null,b._snackbars=[],b._container=null,b._draggedSnackbar=null;var Ft=b;var Ni={exitDelay:200,enterDelay:0,text:"",margin:4,inDuration:250,outDuration:200,position:"bottom",transitionMovement:10,opacity:1},Mt=class d extends E{constructor(t,e){super(t,e,d);this.open=(t=!0)=>{this.isOpen||(clearTimeout(this._exitDelayTimeout),clearTimeout(this._animationTimeout),this.isOpen=!0,this.el.ownerDocument.addEventListener("keydown",this._handleKeydown,!0),this.options={...this.options,...this._getAttributeOptions()},this._updateTooltipContent(),this._setEnterDelayTimeout(t))};this.close=()=>{this.isOpen&&(this.isHovered=!1,this.isFocused=!1,this.isOpen=!1,this.el.ownerDocument.removeEventListener("keydown",this._handleKeydown,!0),clearTimeout(this._enterDelayTimeout),this._setExitDelayTimeout())};this._handleMouseEnter=()=>{this.isHovered=!0,this.open(!1)};this._handleMouseLeave=t=>{let e=t.relatedTarget;e&&(this.el.contains(e)||this.tooltipEl.contains(e))||(this.isHovered=!1,this.isFocused||this.close())};this._handleKeydown=t=>{t.key!=="Escape"||!this.isOpen||(t.preventDefault(),t.stopPropagation(),this.close(),clearTimeout(this._exitDelayTimeout),this._animateOut())};this._handleFocus=t=>{t.target.matches(":focus-visible")&&(this.isFocused=!0,this.open(!1))};this._handleBlur=t=>{let e=t.relatedTarget;e&&(this.el.contains(e)||this.tooltipEl.contains(e))||(this.isFocused=!1,this.isHovered||this.close())};this.el.Expressive_Tooltip=this,this.options={...d.defaults,...this._getAttributeOptions(),...e},this.isOpen=!1,this.isHovered=!1,this.isFocused=!1,this._appendTooltipEl(),this._setupEventHandlers()}static get defaults(){return Ni}static init(t,e={}){return super.init(t,e,d)}static getInstance(t){return t.Expressive_Tooltip}destroy(){clearTimeout(this._enterDelayTimeout),clearTimeout(this._exitDelayTimeout),clearTimeout(this._animationTimeout),this.isOpen=!1,this.isHovered=!1,this.isFocused=!1;let t=this.el.getAttribute("aria-describedby")?.split(/\s+/);if(t?.includes(this.tooltipEl.id)){let e=t.filter(i=>i&&i!==this.tooltipEl.id).join(" ");e?this.el.setAttribute("aria-describedby",e):this.el.removeAttribute("aria-describedby")}if(this._originalContent){let{el:e,marker:i,display:s,priority:o,hidden:a,contentClass:r}=this._originalContent;e.style.setProperty("display",s,o),a===null?e.removeAttribute("hidden"):e.setAttribute("hidden",a),e.classList.toggle("tooltip-content",r),e.className||e.removeAttribute("class"),i.replaceWith(e),this._originalContent=null}this.tooltipEl.remove(),this._removeEventHandlers(),this.el.Expressive_Tooltip=void 0}_appendTooltipEl(){this.tooltipEl=document.createElement("div"),this.tooltipEl.classList.add("tooltip"),this.tooltipEl.id=`tooltip-${m.guid()}`,this.tooltipEl.setAttribute("role","tooltip"),this.el.setAttribute("aria-describedby",[this.el.getAttribute("aria-describedby"),this.tooltipEl.id].filter(Boolean).join(" "));let t=this.options.tooltipId?m.getElementById(this.el,this.options.tooltipId):null;this.options.tooltipId&&!t&&console.error(`Tooltip: no element with id "${this.options.tooltipId}"; showing the text tooltip instead.`);let e=t??document.createElement("div");if(t){this.tooltipEl.classList.add("rich");let i=document.createComment("");e.before(i),this._originalContent={el:e,marker:i,display:e.style.display,priority:e.style.getPropertyPriority("display"),hidden:e.getAttribute("hidden"),contentClass:e.classList.contains("tooltip-content")},e.removeAttribute("hidden")}e.style.display="",e.classList.add("tooltip-content"),this._setTooltipContent(e),this.tooltipEl.appendChild(e),m.portalRoot(this.el).appendChild(this.tooltipEl)}_setTooltipContent(t){this._originalContent||(t.innerText=this.options.text)}_updateTooltipContent(){this._setTooltipContent(this.tooltipEl.querySelector(".tooltip-content"))}_setupEventHandlers(){for(let t of[this.el,this.tooltipEl])t.addEventListener("mouseenter",this._handleMouseEnter),t.addEventListener("mouseleave",this._handleMouseLeave),t.addEventListener("focus",this._handleFocus,!0),t.addEventListener("blur",this._handleBlur,!0)}_removeEventHandlers(){for(let t of[this.el,this.tooltipEl])t.removeEventListener("mouseenter",this._handleMouseEnter),t.removeEventListener("mouseleave",this._handleMouseLeave),t.removeEventListener("focus",this._handleFocus,!0),t.removeEventListener("blur",this._handleBlur,!0);this.el.ownerDocument.removeEventListener("keydown",this._handleKeydown,!0)}_setExitDelayTimeout(){clearTimeout(this._exitDelayTimeout),this._exitDelayTimeout=setTimeout(()=>{this.isHovered||this.isFocused||this._animateOut()},this.options.exitDelay)}_setEnterDelayTimeout(t){clearTimeout(this._enterDelayTimeout),this._enterDelayTimeout=setTimeout(()=>{!this.isHovered&&!this.isFocused&&!t||this._animateIn()},this.options.enterDelay)}_positionTooltip(){let t=this.tooltipEl,e=this.el,i=e.offsetHeight,s=e.offsetWidth,o=t.offsetHeight,a=t.offsetWidth,r=this.options.margin;this.xMovement=0,this.yMovement=0;let h=e.getBoundingClientRect(),c=h.top+m.getDocumentScrollTop(),l=h.left+m.getDocumentScrollLeft();this.options.position==="top"?(c+=-o-r,l+=s/2-a/2,this.yMovement=-this.options.transitionMovement):this.options.position==="right"?(c+=i/2-o/2,l+=s+r,this.xMovement=this.options.transitionMovement):this.options.position==="left"?(c+=i/2-o/2,l+=-a-r,this.xMovement=-this.options.transitionMovement):(c+=i+r,l+=s/2-a/2,this.yMovement=this.options.transitionMovement);let u=this._repositionWithinScreen(l,c,a,o);t.style.setProperty("--md-comp-tooltip-anchor-gap",`${Math.max(0,r)+Math.abs(this.options.transitionMovement)}px`),t.style.top=u.y+"px",t.style.left=u.x+"px"}_repositionWithinScreen(t,e,i,s){return m._repositionWithinScreen(t,e,i,s,this.options.margin,this.options.transitionMovement,"center")}_animateIn(){this._animate(!0)}_animateOut(){this._animate(!1)}_animate(t){let e=this.tooltipEl.style,i=this.el.ownerDocument.defaultView.matchMedia("(prefers-reduced-motion: reduce)").matches,s=i?0:t?this.options.inDuration:this.options.outDuration;t&&(this._positionTooltip(),e.visibility="visible",e.overflow="visible"),e.transition=`transform ${s}ms ease-out, opacity ${s}ms ease-out`,clearTimeout(this._animationTimeout),this._animationTimeout=setTimeout(()=>{e.transform=t&&!i?`translateX(${this.xMovement}px) translateY(${this.yMovement}px)`:"none",e.opacity=t?(this.options.opacity||1).toString():"0",t||(this._animationTimeout=setTimeout(()=>{e.visibility="hidden",e.overflow=""},s))},1)}_getAttributeOptions(){let t={},e=this.el.getAttribute("data-tooltip"),i=this.el.getAttribute("data-tooltip-id"),s=this.el.getAttribute("data-position");return e&&(t.text=e),s&&(t.position=s),i&&(t.tooltipId=i),t}};var Me={AppBar:{component:et,selector:"header.medium, header.large, header:has(> :is(nav:not(.tabs, .navigation-bar, .navigation-rail), .bar) > :is(.search-bar, .searchbar))"},Autocomplete:{component:V,selector:".autocomplete"},ButtonGroup:{component:st,selector:".button-group"},Cards:{component:q,selector:Kt,filter:Ut},ExpandingCard:{component:z,selector:Yt},Carousel:{component:U,selector:".carousel"},Chips:{component:K,selector:".chips"},Confetti:{component:nt,selector:".confetti"},Particles:{component:ot,selector:"canvas.particles"},Keypad:{component:rt,selector:".keypad, .keyboard"},ColumnChart:{component:W,selector:".column-chart"},BarChart:{component:ht,selector:".bar-chart"},PieChart:{component:dt,selector:".pie-chart"},HeatmapChart:{component:ut,selector:".heatmap-chart"},RadarChart:{component:pt,selector:".radar-chart"},RadialChart:{component:mt,selector:".radial-chart"},MixedChart:{component:ft,selector:".mixed-chart"},CommandPalette:{component:at,selector:"dialog.command-palette"},Questionnaire:{component:lt,selector:"form.questionnaire"},Datepicker:{component:gt,selector:".datepicker, .date-picker"},LineChart:{component:k,selector:".line-chart"},Menu:{component:F,selector:".menu-trigger"},MessageScroller:{component:_t,selector:".message-scroller"},Lightbox:{component:Et,selector:".lightboxed"},ScrollSpy:{component:bt,selector:".scrollspy"},FormSelect:{component:D,selector:"select"},NavigationRail:{component:yt,selector:".navigation-rail"},Tabs:{component:Lt,selector:".tabs"},Timepicker:{component:Tt,selector:".timepicker, .time-picker"},Tooltip:{component:Mt,selector:".tooltipped"},FloatingActionButton:{component:it,selector:".fab-menu"}};function xe(d=document.body,n){for(let t of Object.keys(Me)){let{component:e,selector:i,filter:s}=Me[t],o=d.querySelectorAll(`:is(${i}):not(.no-autoinit)`);s?o.forEach(a=>{s(a)&&e.init(a,n?.[t]??{})}):e.init(o,n?.[t]??{})}}var Wi="0.15.0";tt.Init();K.Init();j.Init();q.Init();z.Init();Z.Init();Q.Init();J.Init();return Ne($i);})();
59
+ </div>`;var ge=Fe;var Al=typeof CSS<"u"&&!!CSS.supports?.("anchor-name: --a"),Fn={top:["top","justify-self"],right:["right","align-self"],left:["left","align-self"],bottom:["bottom","justify-self"]},Hl=500,Il=1500,Ol=800,Dl=400,Pl=300,Nn=-1/0,ts=-1/0,Bn=r=>r>=Nn&&r<ts;function Rl(r){let s=Date.now(),t=s+r+Pl;ts=Bn(s)?Math.max(ts,t):t,Nn=s}var Fl={exitDelay:200,enterDelay:0,text:"",margin:4,inDuration:250,outDuration:200,position:"bottom",transitionMovement:10,opacity:1,openOnClick:!1},gi=class gi extends b{constructor(t,e){super(t,e);this._insideClick=null;this._lastTouch=-1/0;this._touchShown=!1;this._swallowClickUntil=-1/0;this._shown=!1;this.open=(t=!0)=>{if(this.isOpen)return;clearTimeout(this._exitDelayTimeout),clearTimeout(this._animationTimeout),this.isOpen=!0;let{signal:e}=this._events;this.el.ownerDocument.addEventListener("keydown",this._handleKeydown,{capture:!0,signal:e}),this.options.openOnClick&&(this._outsideTimeout=setTimeout(()=>this.el.ownerDocument.addEventListener("click",this._handleDocumentClick,{signal:e}))),this.options={...this.options,...this._getAttributeOptions()},this._updateTooltipContent(),this._setEnterDelayTimeout(t)};this.close=()=>{clearTimeout(this._pressTimeout),clearTimeout(this._lingerTimeout),this._touchShown=!1,this.isOpen&&(this._shown&&Rl(this.options.exitDelay),this.isHovered=!1,this.isFocused=!1,this.isOpen=!1,this.el.ownerDocument.removeEventListener("keydown",this._handleKeydown,!0),clearTimeout(this._outsideTimeout),this.el.ownerDocument.removeEventListener("click",this._handleDocumentClick),clearTimeout(this._enterDelayTimeout),this._setExitDelayTimeout())};this._handleMouseEnter=()=>{this.options.openOnClick||performance.now()-this._lastTouch<Ol||(this._touchShown=!1,this.isHovered=!0,this.open(!1))};this._handlePointerEnter=t=>{this._touched(t)};this._handlePointerDown=t=>{this._longPress(t)&&(clearTimeout(this._lingerTimeout),clearTimeout(this._pressTimeout),this._pressTimeout=setTimeout(()=>{this.isHovered=!0,this._showNow(),this._touchShown=!0},Hl))};this._handlePointerEnd=t=>{this._longPress(t)&&(clearTimeout(this._pressTimeout),this._touchShown&&(this._swallowClickUntil=performance.now()+Dl),this.isOpen&&(this.isHovered=!1,this._lingerTimeout=setTimeout(()=>this.isHovered||this.isFocused||this.close(),Il)))};this._handleClick=t=>{if(this.options.openOnClick)return this._toggle(t);performance.now()>this._swallowClickUntil||(this._swallowClickUntil=-1/0,t.preventDefault(),t.stopImmediatePropagation())};this._handleTooltipClick=t=>{this._insideClick=t};this._handleDocumentClick=t=>{t!==this._insideClick&&this._hideNow()};this._handlePointerCancel=t=>{this._longPress(t)&&(clearTimeout(this._pressTimeout),this._touchShown&&(this.isHovered=!1,this.isFocused||this.close()))};this._handleMouseLeave=t=>{this.options.openOnClick||this._holds(t.relatedTarget)||(this.isHovered=!1,this.isFocused||this.close())};this._handleKeydown=t=>{t.key!=="Escape"||!this.isOpen||(u.focusIsIn(this.el,this.tooltipEl)&&(t.preventDefault(),t.stopPropagation()),this._hideNow())};this._handleFocus=t=>{!this.options.openOnClick&&t.target.matches(":focus-visible")&&(this.isFocused=!0,this.open(!1))};this._handleBlur=t=>{let e=t.relatedTarget;if(!this._holds(e)){if(this.options.openOnClick)return this._blurClickTooltip(e);this.isFocused=!1,this.isHovered||this.close()}};this.options={...gi.defaults,...this._getAttributeOptions(),...e},this.isOpen=!1,this.isHovered=!1,this.isFocused=!1,this._appendTooltipEl(),this._setupEventHandlers()}static get defaults(){return Fl}destroy(){clearTimeout(this._enterDelayTimeout),clearTimeout(this._exitDelayTimeout),clearTimeout(this._animationTimeout),clearTimeout(this._pressTimeout),clearTimeout(this._lingerTimeout),clearTimeout(this._outsideTimeout),this.isOpen=!1,this.isHovered=!1,this.isFocused=!1;let t=this.el.getAttribute("aria-describedby")?.split(/\s+/);if(t?.includes(this.tooltipEl.id)){let e=t.filter(i=>i&&i!==this.tooltipEl.id).join(" ");e?this.el.setAttribute("aria-describedby",e):this.el.removeAttribute("aria-describedby")}if(this._originalContent){let{el:e,marker:i,display:n,priority:o,hidden:a,contentClass:l}=this._originalContent;e.style.setProperty("display",n,o),x(e,"hidden",a),e.classList.toggle("tooltip-content",l),e.className||e.removeAttribute("class"),i.replaceWith(e),this._originalContent=null}this.tooltipEl.remove(),u.setAnchorName(this.el,`--${this.tooltipEl.id}`,!1),super.destroy()}_appendTooltipEl(){this.tooltipEl=document.createElement("div"),this.tooltipEl.classList.add("tooltip"),this.tooltipEl.id=`tooltip-${u.guid()}`,this.tooltipEl.setAttribute("role","tooltip"),this.el.setAttribute("aria-describedby",[this.el.getAttribute("aria-describedby"),this.tooltipEl.id].filter(Boolean).join(" "));let t=this.options.tooltipId?u.getElementById(this.el,this.options.tooltipId):null;this.options.tooltipId&&!t&&console.error(`Tooltip: no element with id "${this.options.tooltipId}"; showing the text tooltip instead.`);let e=t??document.createElement("div");if(t){this.tooltipEl.classList.add("rich");let i=document.createComment("");e.before(i),this._originalContent={el:e,marker:i,display:e.style.display,priority:e.style.getPropertyPriority("display"),hidden:e.getAttribute("hidden"),contentClass:e.classList.contains("tooltip-content")},e.removeAttribute("hidden")}e.style.display="",e.classList.add("tooltip-content"),this._setTooltipContent(e),this.tooltipEl.appendChild(e),u.portalRoot(this.el).appendChild(this.tooltipEl)}_setTooltipContent(t){this._originalContent||(t.innerText=this.options.text)}_updateTooltipContent(){this._setTooltipContent(this.tooltipEl.querySelector(".tooltip-content"))}_setupEventHandlers(){let{signal:t}=this._events,e={capture:!0,signal:t};for(let i of[this.el,this.tooltipEl])i.addEventListener("mouseenter",this._handleMouseEnter,{signal:t}),i.addEventListener("mouseleave",this._handleMouseLeave,{signal:t}),i.addEventListener("focus",this._handleFocus,e),i.addEventListener("blur",this._handleBlur,e);this.el.addEventListener("pointerenter",this._handlePointerEnter,{signal:t}),this.el.addEventListener("pointerdown",this._handlePointerDown,{signal:t}),this.el.addEventListener("pointerup",this._handlePointerEnd,{signal:t}),this.el.addEventListener("pointercancel",this._handlePointerCancel,{signal:t}),this.el.addEventListener("click",this._handleClick,e),this.tooltipEl.addEventListener("click",this._handleTooltipClick,e)}_showNow(){this.open(),clearTimeout(this._enterDelayTimeout),this._animateIn()}_hideNow(){this.close(),clearTimeout(this._exitDelayTimeout),this._animateOut()}_setExitDelayTimeout(){clearTimeout(this._exitDelayTimeout),this._exitDelayTimeout=setTimeout(()=>{this.isHovered||this.isFocused||this._animateOut()},this.options.exitDelay)}_setEnterDelayTimeout(t){clearTimeout(this._enterDelayTimeout);let e=Bn(Date.now());this._enterDelayTimeout=setTimeout(()=>{!this.isHovered&&!this.isFocused&&!t||this._animateIn()},e?0:this.options.enterDelay)}_positionTooltip(){let t=this.tooltipEl,e=this.el,i=e.offsetHeight,n=e.offsetWidth,o=t.offsetHeight,a=t.offsetWidth,l=this.options.margin;this.xMovement=0,this.yMovement=0;let c=e.getBoundingClientRect(),h=c.top+window.scrollY,d=c.left+window.scrollX;this.options.position==="top"?(h+=-o-l,d+=n/2-a/2,this.yMovement=-this.options.transitionMovement):this.options.position==="right"?(h+=i/2-o/2,d+=n+l,this.xMovement=this.options.transitionMovement):this.options.position==="left"?(h+=i/2-o/2,d+=-a-l,this.xMovement=-this.options.transitionMovement):(h+=i+l,d+=n/2-a/2,this.yMovement=this.options.transitionMovement);let p=u._repositionWithinScreen(d,h,a,o,l,this.options.transitionMovement,"center");t.style.setProperty("--md-comp-tooltip-anchor-gap",`${Math.max(0,l)+Math.abs(this.options.transitionMovement)}px`),u._placeInOffsetParent(t,p)}_place(){Al?this._anchorTooltip():this._positionTooltip()}_anchorTooltip(){let[t,e]=Fn[this.options.position]??Fn.bottom,i=`--${this.tooltipEl.id}`;this.xMovement=0,this.yMovement=0,u.setAnchorName(this.el,i,!0);let n=this.tooltipEl.style;n.position="fixed",n.inset="auto",n.margin=`${Math.max(0,this.options.margin)+Math.abs(this.options.transitionMovement)}px`,n.setProperty("position-anchor",i),n.setProperty("position-area",t),n.setProperty(e,"anchor-center"),n.setProperty("position-try-fallbacks","flip-block, flip-inline")}_animateIn(){this._animate(!0)}_animateOut(){this._animate(!1)}_animate(t){let e=this.tooltipEl.style,i=this.el.ownerDocument.defaultView.matchMedia("(prefers-reduced-motion: reduce)").matches,n=i?0:t?this.options.inDuration:this.options.outDuration;t&&(this._place(),e.visibility="visible",e.overflow="visible"),e.transition=`transform ${n}ms ease-out, opacity ${n}ms ease-out`,clearTimeout(this._animationTimeout),this._animationTimeout=setTimeout(()=>{e.transform=t&&!i?`translateX(${this.xMovement}px) translateY(${this.yMovement}px)`:"none",e.opacity=t?(this.options.opacity||1).toString():"0",t||(this._animationTimeout=setTimeout(()=>{e.visibility="hidden",e.overflow=""},n))},1),this._reportShown(t)}_reportShown(t){t!==this._shown&&(this._shown=t,this._notify(t?"open":"close"))}_touched(t){return t.pointerType!=="touch"?!1:(this._lastTouch=performance.now(),!0)}_longPress(t){return!this.options.openOnClick&&this._touched(t)}_toggle(t){this._insideClick=t,this._shown?this._hideNow():this._showNow()}_holds(t){return!!t&&(this.el.contains(t)||this.tooltipEl.contains(t))}_blurClickTooltip(t){t&&(this.isOpen||this._shown)&&this._hideNow()}_getAttributeOptions(){let t={},e=this.el.getAttribute("data-tooltip"),i=this.el.getAttribute("data-tooltip-id"),n=this.el.getAttribute("data-position");return e&&(t.text=e),n&&(t.position=n),i&&(t.tooltipId=i),t}};gi.key="Expressive_Tooltip";var ve=gi;var $n={AppBar:{component:ut,selector:"header.medium, header.large, header:has(> :is(nav:not(.tabs, .navigation-bar, .navigation-rail), .bar) > .search-bar)"},Autocomplete:{component:Q,selector:".autocomplete"},ButtonGroup:{component:pt,selector:".button-group"},Cards:{component:G,selector:wi,filter:xi},ExpandingCard:{component:Z,selector:Mi},Carousel:{component:mt,selector:".carousel"},Chips:{component:it,selector:".chips"},Confetti:{component:ce,selector:".confetti"},Particles:{component:bt,selector:"canvas.particles"},Keypad:{component:Et,selector:".keypad, .keyboard"},ColorPicker:{component:yt,selector:".color-picker"},ColumnChart:{component:W,selector:".column-chart"},BarChart:{component:wt,selector:".bar-chart"},PieChart:{component:xt,selector:".pie-chart"},HeatmapChart:{component:Mt,selector:".heatmap-chart"},RadarChart:{component:Ct,selector:".radar-chart"},RadialChart:{component:St,selector:".radial-chart"},MixedChart:{component:At,selector:".mixed-chart"},ScatterChart:{component:Ht,selector:".scatter-chart"},FunnelChart:{component:It,selector:".funnel-chart"},SankeyChart:{component:Ot,selector:".sankey-chart"},TreemapChart:{component:Dt,selector:".treemap-chart"},CommandPalette:{component:Tt,selector:"dialog.command-palette"},Questionnaire:{component:Lt,selector:"form.questionnaire"},Datepicker:{component:pe,selector:".date-picker"},LineChart:{component:k,selector:".line-chart"},Menu:{component:B,selector:".menu-trigger"},MessageScroller:{component:Rt,selector:".message-scroller"},PullToRefresh:{component:me,selector:".pull-to-refresh"},LoadingOverlay:{component:Ft,selector:".loading-overlay"},SwipeActions:{component:Nt,selector:".list.swipeable"},InputMask:{component:ft,selector:'input[data-mask]:is(:not([type]), [type="text" i], [type="tel" i], [type="search" i], [type="url" i], [type="password" i])'},ShowMore:{component:le,selector:".show-more"},CurrencyInput:{component:gt,selector:'input[data-currency]:is(:not([type]), [type="text" i])'},Lightbox:{component:Bt,selector:".lightboxed"},ScrollSpy:{component:fe,selector:".scrollspy"},BackToTop:{component:$t,selector:".back-to-top"},FormSelect:{component:z,selector:"select:not([data-tree])"},TreeSelect:{component:qt,selector:"select[data-tree]"},Cascader:{component:vt,selector:".cascader"},NavigationRail:{component:zt,selector:".navigation-rail"},Tabs:{component:_e,selector:".tabs"},Timepicker:{component:ge,selector:".time-picker"},Tooltip:{component:ve,selector:".tooltipped"},HoverCard:{component:_t,selector:".hover-card-trigger"},FloatingActionButton:{component:dt,selector:".fab-menu"},Menubar:{component:Pt,selector:".menubar"}},Bl=new Set(["allowUnsafeHTML","minYear","maxYear","data"]),vi="[object Object]",qn="[object Array]",$l=new Set(["[object String]","[object Number]","[object Boolean]",qn,vi]),ql=r=>`data-${r.replace(/\B[A-Z]/g,"-$&").toLowerCase()}-options`;function be(r){let s=Object.prototype.toString.call(r);return s===vi&&Object.getPrototypeOf(r)!==Object.prototype?"other":s}var zl=(r,s)=>!r.length||s.every(t=>be(t)===be(r[0]));function Kl(r,s){let t=be(r);return!$l.has(t)||be(s)!==t?!1:t!==qn||zl(r,s)}var Vl=(r,s,t)=>Object.hasOwn(r,s)&&!Bl.has(s)&&Kl(r[s],t),Wl=(r,s)=>{r.push(s)};function Ul(r,s,t,e){if(be(r)!==vi)return r;let i=t.length,n=zn(r,s,t,e);return t.length===i?n:void 0}function zn(r,s,t,e=""){let i={};for(let[n,o]of Object.entries(r)){let a=Vl(s,n,o)?Ul(o,s[n],t,`${e}${n}.`):Wl(t,e+n);a!==void 0&&(i[n]=a)}return i}function jl(r){try{let s=JSON.parse(r);return be(s)===vi?s:null}catch{return null}}function Yl(r,s,t){let e=ql(s),i=r.getAttribute(e);if(i===null)return{};let n=jl(i);if(!n)return console.warn(`${s} ignored ${e}: expected a JSON object.`,r),{};let o=[],a=zn(n,t,o);return o.forEach(l=>console.warn(`${s} ignored "${l}" in ${e}: markup cannot set that option to that value.`,r)),a}var bi=r=>$n[r],es=Object.keys($n);function Kn(r,s,t={}){let{component:e}=bi(r);e.init(s,{...Yl(s,r,e.defaults),...t})}function is(r,s,t=!1){let{selector:e,filter:i=()=>!0}=bi(r),n=`:is(${e}):not(.no-autoinit)`;return[...t&&s.matches(n)?[s]:[],...s.querySelectorAll(n)].filter(i)}function Xl(r,s){if(r.nodeType===Node.ELEMENT_NODE)for(let t of es)is(t,r,!0).forEach(e=>bi(t).component.getInstance(e)||Kn(t,e,s?.[t]))}function Gl(r){if(!(r.nodeType!==Node.ELEMENT_NODE||r.isConnected))for(let s of es)is(s,r,!0).forEach(t=>bi(s).component.getInstance(t)?.destroy())}function Zl(r,s){let t=i=>{for(let{addedNodes:n,removedNodes:o}of i)o.forEach(Gl),n.forEach(a=>r.contains(a)&&Xl(a,s))},e=new MutationObserver(t);return e.observe(r,{childList:!0,subtree:!0}),()=>{t(e.takeRecords()),e.disconnect()}}function Vn(r=document.body,s,t={}){for(let e of es)is(e,r).forEach(i=>Kn(e,i,s?.[e]));return t.watch?Zl(r,s):()=>{}}var Ql="0.16.0";Yt.Init();it.Init();Vt.Init();G.Init();Z.Init();Wt.Init();Ut.Init();jt.Init();Gt.Init();Zt.Init();Qt.Init();Jt.Init();te.Init();ee.Init();ie.Init();oe.Init();ae.Init();return Qn(Jl);})();
59
60
  //# sourceMappingURL=expressive.min.js.map