@oiz/stzh-components 2.11.1 → 2.12.0-beta2

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 (257) hide show
  1. package/dist/cjs/{app-globals-7697372c.js → app-globals-b9d20033.js} +8 -4
  2. package/dist/cjs/app-globals-b9d20033.js.map +1 -0
  3. package/dist/cjs/index.cjs.js.map +1 -1
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/stzh-accordion.cjs.entry.js +1 -1
  6. package/dist/cjs/stzh-accordion.cjs.entry.js.map +1 -1
  7. package/dist/cjs/stzh-appointments.cjs.entry.js +7 -3
  8. package/dist/cjs/stzh-appointments.cjs.entry.js.map +1 -1
  9. package/dist/cjs/stzh-components.cjs.js +2 -2
  10. package/dist/cjs/stzh-container.cjs.entry.js +1 -1
  11. package/dist/cjs/stzh-container.cjs.entry.js.map +1 -1
  12. package/dist/cjs/stzh-datalist_2.cjs.entry.js +1 -1
  13. package/dist/cjs/stzh-datalist_2.cjs.entry.js.map +1 -1
  14. package/dist/cjs/stzh-datepicker_3.cjs.entry.js +33 -14
  15. package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
  16. package/dist/cjs/stzh-gallery.cjs.entry.js +1 -1
  17. package/dist/cjs/stzh-gallery.cjs.entry.js.map +1 -1
  18. package/dist/cjs/stzh-progressbar-item.cjs.entry.js +2 -1
  19. package/dist/cjs/stzh-progressbar-item.cjs.entry.js.map +1 -1
  20. package/dist/cjs/stzh-progressbar.cjs.entry.js +14 -0
  21. package/dist/cjs/stzh-progressbar.cjs.entry.js.map +1 -1
  22. package/dist/cjs/stzh-sticky.cjs.entry.js +1 -1
  23. package/dist/cjs/stzh-sticky.cjs.entry.js.map +1 -1
  24. package/dist/cjs/stzh-toastbar.cjs.entry.js +8 -1
  25. package/dist/cjs/stzh-toastbar.cjs.entry.js.map +1 -1
  26. package/dist/cjs/stzh-vbz-majorticker.cjs.entry.js +7 -3
  27. package/dist/cjs/stzh-vbz-majorticker.cjs.entry.js.map +1 -1
  28. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +7 -3
  29. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js.map +1 -1
  30. package/dist/collection/assets/i18n/de.json +12 -0
  31. package/dist/collection/assets/i18n/en.json +12 -0
  32. package/dist/collection/components/stzh-accordion/stzh-accordion.css +3 -2
  33. package/dist/collection/components/stzh-appointments/stzh-appointments.js +9 -3
  34. package/dist/collection/components/stzh-appointments/stzh-appointments.js.map +1 -1
  35. package/dist/collection/components/stzh-button/stzh-button.js +1 -1
  36. package/dist/collection/components/stzh-checkbox/stzh-checkbox.js +1 -1
  37. package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js +1 -1
  38. package/dist/collection/components/stzh-chip-select/stzh-chip-select.js +1 -1
  39. package/dist/collection/components/stzh-container/stzh-container.css +8 -8
  40. package/dist/collection/components/stzh-datalist/stzh-datalist.css +1 -1
  41. package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.js +1 -1
  42. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js +62 -15
  43. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js.map +1 -1
  44. package/dist/collection/components/stzh-gallery/stzh-gallery.css +0 -4
  45. package/dist/collection/components/stzh-input/stzh-input.js +1 -1
  46. package/dist/collection/components/stzh-link/stzh-link.js +1 -1
  47. package/dist/collection/components/stzh-progressbar/stzh-progressbar.js +35 -0
  48. package/dist/collection/components/stzh-progressbar/stzh-progressbar.js.map +1 -1
  49. package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js +3 -2
  50. package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js.map +1 -1
  51. package/dist/collection/components/stzh-radio/stzh-radio.js +1 -1
  52. package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js +1 -1
  53. package/dist/collection/components/stzh-richtext/stzh-richtext.js +1 -1
  54. package/dist/collection/components/stzh-sticky/stzh-sticky.css +4 -4
  55. package/dist/collection/components/stzh-timepicker/stzh-timepicker.js +1 -1
  56. package/dist/collection/components/stzh-toastbar/stzh-toastbar.js +8 -1
  57. package/dist/collection/components/stzh-toastbar/stzh-toastbar.js.map +1 -1
  58. package/dist/collection/components/stzh-toggle/stzh-toggle.js +1 -1
  59. package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.js +9 -3
  60. package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.js.map +1 -1
  61. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js +9 -3
  62. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js.map +1 -1
  63. package/dist/collection/global/js/helpers/utils.js +6 -2
  64. package/dist/collection/index.js.map +1 -1
  65. package/dist/collection/utils/translation-utils.js.map +1 -1
  66. package/dist/components/index.js +7 -3
  67. package/dist/components/index.js.map +1 -1
  68. package/dist/components/index2.js.map +1 -1
  69. package/dist/components/stzh-accordion.js +1 -1
  70. package/dist/components/stzh-accordion.js.map +1 -1
  71. package/dist/components/stzh-appointments.js +8 -3
  72. package/dist/components/stzh-appointments.js.map +1 -1
  73. package/dist/components/stzh-container.js +1 -1
  74. package/dist/components/stzh-container.js.map +1 -1
  75. package/dist/components/stzh-datalist2.js +1 -1
  76. package/dist/components/stzh-datalist2.js.map +1 -1
  77. package/dist/components/stzh-datepicker2.js +38 -16
  78. package/dist/components/stzh-datepicker2.js.map +1 -1
  79. package/dist/components/stzh-gallery.js +1 -1
  80. package/dist/components/stzh-gallery.js.map +1 -1
  81. package/dist/components/stzh-progressbar-item2.js +2 -1
  82. package/dist/components/stzh-progressbar-item2.js.map +1 -1
  83. package/dist/components/stzh-progressbar.js +16 -1
  84. package/dist/components/stzh-progressbar.js.map +1 -1
  85. package/dist/components/stzh-sticky.js +1 -1
  86. package/dist/components/stzh-sticky.js.map +1 -1
  87. package/dist/components/stzh-toastbar.js +8 -1
  88. package/dist/components/stzh-toastbar.js.map +1 -1
  89. package/dist/components/stzh-vbz-majorticker.js +8 -3
  90. package/dist/components/stzh-vbz-majorticker.js.map +1 -1
  91. package/dist/components/stzh-vbz-ticker.js +8 -3
  92. package/dist/components/stzh-vbz-ticker.js.map +1 -1
  93. package/dist/esm/{app-globals-1a77c38b.js → app-globals-0cf2577d.js} +8 -4
  94. package/dist/esm/app-globals-0cf2577d.js.map +1 -0
  95. package/dist/esm/index.js.map +1 -1
  96. package/dist/esm/loader.js +2 -2
  97. package/dist/esm/stzh-accordion.entry.js +1 -1
  98. package/dist/esm/stzh-accordion.entry.js.map +1 -1
  99. package/dist/esm/stzh-appointments.entry.js +7 -3
  100. package/dist/esm/stzh-appointments.entry.js.map +1 -1
  101. package/dist/esm/stzh-components.js +2 -2
  102. package/dist/esm/stzh-container.entry.js +1 -1
  103. package/dist/esm/stzh-container.entry.js.map +1 -1
  104. package/dist/esm/stzh-datalist_2.entry.js +1 -1
  105. package/dist/esm/stzh-datalist_2.entry.js.map +1 -1
  106. package/dist/esm/stzh-datepicker_3.entry.js +34 -15
  107. package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
  108. package/dist/esm/stzh-gallery.entry.js +1 -1
  109. package/dist/esm/stzh-gallery.entry.js.map +1 -1
  110. package/dist/esm/stzh-progressbar-item.entry.js +2 -1
  111. package/dist/esm/stzh-progressbar-item.entry.js.map +1 -1
  112. package/dist/esm/stzh-progressbar.entry.js +14 -0
  113. package/dist/esm/stzh-progressbar.entry.js.map +1 -1
  114. package/dist/esm/stzh-sticky.entry.js +1 -1
  115. package/dist/esm/stzh-sticky.entry.js.map +1 -1
  116. package/dist/esm/stzh-toastbar.entry.js +8 -1
  117. package/dist/esm/stzh-toastbar.entry.js.map +1 -1
  118. package/dist/esm/stzh-vbz-majorticker.entry.js +7 -3
  119. package/dist/esm/stzh-vbz-majorticker.entry.js.map +1 -1
  120. package/dist/esm/stzh-vbz-ticker.entry.js +7 -3
  121. package/dist/esm/stzh-vbz-ticker.entry.js.map +1 -1
  122. package/dist/esm-es5/{app-globals-1a77c38b.js → app-globals-0cf2577d.js} +2 -2
  123. package/dist/esm-es5/app-globals-0cf2577d.js.map +1 -0
  124. package/dist/esm-es5/index.js.map +1 -1
  125. package/dist/esm-es5/loader.js +1 -1
  126. package/dist/esm-es5/loader.js.map +1 -1
  127. package/dist/esm-es5/stzh-accordion.entry.js +1 -1
  128. package/dist/esm-es5/stzh-accordion.entry.js.map +1 -1
  129. package/dist/esm-es5/stzh-appointments.entry.js +1 -1
  130. package/dist/esm-es5/stzh-appointments.entry.js.map +1 -1
  131. package/dist/esm-es5/stzh-components.js +1 -1
  132. package/dist/esm-es5/stzh-components.js.map +1 -1
  133. package/dist/esm-es5/stzh-container.entry.js +1 -1
  134. package/dist/esm-es5/stzh-container.entry.js.map +1 -1
  135. package/dist/esm-es5/stzh-datalist_2.entry.js +1 -1
  136. package/dist/esm-es5/stzh-datalist_2.entry.js.map +1 -1
  137. package/dist/esm-es5/stzh-datepicker_3.entry.js +1 -1
  138. package/dist/esm-es5/stzh-datepicker_3.entry.js.map +1 -1
  139. package/dist/esm-es5/stzh-gallery.entry.js +1 -1
  140. package/dist/esm-es5/stzh-gallery.entry.js.map +1 -1
  141. package/dist/esm-es5/stzh-progressbar-item.entry.js +1 -1
  142. package/dist/esm-es5/stzh-progressbar-item.entry.js.map +1 -1
  143. package/dist/esm-es5/stzh-progressbar.entry.js +1 -1
  144. package/dist/esm-es5/stzh-progressbar.entry.js.map +1 -1
  145. package/dist/esm-es5/stzh-sticky.entry.js +1 -1
  146. package/dist/esm-es5/stzh-sticky.entry.js.map +1 -1
  147. package/dist/esm-es5/stzh-toastbar.entry.js +1 -1
  148. package/dist/esm-es5/stzh-toastbar.entry.js.map +1 -1
  149. package/dist/esm-es5/stzh-vbz-majorticker.entry.js +1 -1
  150. package/dist/esm-es5/stzh-vbz-majorticker.entry.js.map +1 -1
  151. package/dist/esm-es5/stzh-vbz-ticker.entry.js +1 -1
  152. package/dist/esm-es5/stzh-vbz-ticker.entry.js.map +1 -1
  153. package/dist/stzh-components/assets/i18n/de.json +12 -0
  154. package/dist/stzh-components/assets/i18n/en.json +12 -0
  155. package/dist/stzh-components/index.esm.js.map +1 -1
  156. package/dist/stzh-components/p-0b1b2aa6.system.entry.js +2 -0
  157. package/dist/stzh-components/p-0b1b2aa6.system.entry.js.map +1 -0
  158. package/dist/stzh-components/{p-11784b90.entry.js → p-0ba7ce34.entry.js} +2 -2
  159. package/dist/stzh-components/p-0ba7ce34.entry.js.map +1 -0
  160. package/dist/stzh-components/p-0bb08043.system.js.map +1 -1
  161. package/dist/stzh-components/p-222ba06a.entry.js +2 -0
  162. package/dist/stzh-components/p-222ba06a.entry.js.map +1 -0
  163. package/dist/stzh-components/{p-c658502d.system.entry.js → p-241997a2.system.entry.js} +2 -2
  164. package/dist/stzh-components/p-241997a2.system.entry.js.map +1 -0
  165. package/dist/stzh-components/p-2d88c544.system.entry.js +2 -0
  166. package/dist/stzh-components/p-2d88c544.system.entry.js.map +1 -0
  167. package/dist/stzh-components/p-361996d1.entry.js +2 -0
  168. package/dist/stzh-components/p-361996d1.entry.js.map +1 -0
  169. package/dist/stzh-components/{p-54dbcd0e.system.entry.js → p-383c2c21.system.entry.js} +2 -2
  170. package/dist/stzh-components/{p-54dbcd0e.system.entry.js.map → p-383c2c21.system.entry.js.map} +1 -1
  171. package/dist/stzh-components/{p-15980af0.entry.js → p-534dc28e.entry.js} +2 -2
  172. package/dist/stzh-components/{p-15980af0.entry.js.map → p-534dc28e.entry.js.map} +1 -1
  173. package/dist/stzh-components/{p-5fdf0a8e.entry.js → p-5486402c.entry.js} +2 -2
  174. package/dist/stzh-components/{p-5fdf0a8e.entry.js.map → p-5486402c.entry.js.map} +1 -1
  175. package/dist/stzh-components/p-55d76b46.system.entry.js +2 -0
  176. package/dist/stzh-components/p-55d76b46.system.entry.js.map +1 -0
  177. package/dist/stzh-components/{p-84ae2651.system.js → p-6233fc4f.system.js} +2 -2
  178. package/dist/stzh-components/p-6233fc4f.system.js.map +1 -0
  179. package/dist/stzh-components/{p-e5c1f04c.system.entry.js → p-628b5b0d.system.entry.js} +2 -2
  180. package/dist/stzh-components/p-628b5b0d.system.entry.js.map +1 -0
  181. package/dist/stzh-components/p-66b0d1f3.entry.js +2 -0
  182. package/dist/stzh-components/p-66b0d1f3.entry.js.map +1 -0
  183. package/dist/stzh-components/{p-8b4cc10d.entry.js → p-761909d5.entry.js} +2 -2
  184. package/dist/stzh-components/p-761909d5.entry.js.map +1 -0
  185. package/dist/stzh-components/{p-50914ed3.system.entry.js → p-87a3758c.system.entry.js} +2 -2
  186. package/dist/stzh-components/p-87a3758c.system.entry.js.map +1 -0
  187. package/dist/stzh-components/p-a1e1261a.entry.js +2 -0
  188. package/dist/stzh-components/p-a1e1261a.entry.js.map +1 -0
  189. package/dist/stzh-components/p-aa9975e6.entry.js +2 -0
  190. package/dist/stzh-components/p-aa9975e6.entry.js.map +1 -0
  191. package/dist/stzh-components/p-ae0e530e.system.js +2 -0
  192. package/dist/stzh-components/{p-bde8bb45.system.js.map → p-ae0e530e.system.js.map} +1 -1
  193. package/dist/stzh-components/{p-98b60fb7.js → p-b2b9d87e.js} +2 -2
  194. package/dist/stzh-components/p-b2b9d87e.js.map +1 -0
  195. package/dist/stzh-components/{p-bb2fe16f.system.entry.js → p-b3d76f2a.system.entry.js} +2 -2
  196. package/dist/stzh-components/{p-bb2fe16f.system.entry.js.map → p-b3d76f2a.system.entry.js.map} +1 -1
  197. package/dist/stzh-components/{p-aefc1441.entry.js → p-c57402af.entry.js} +2 -2
  198. package/dist/stzh-components/p-c57402af.entry.js.map +1 -0
  199. package/dist/stzh-components/{p-cbcb366a.system.entry.js → p-c60ccc16.system.entry.js} +2 -2
  200. package/dist/stzh-components/p-c60ccc16.system.entry.js.map +1 -0
  201. package/dist/stzh-components/{p-cc260e20.entry.js → p-d5ee8b1a.entry.js} +2 -2
  202. package/dist/stzh-components/{p-cc260e20.entry.js.map → p-d5ee8b1a.entry.js.map} +1 -1
  203. package/dist/stzh-components/{p-d9984b93.system.entry.js → p-dc30c467.system.entry.js} +2 -2
  204. package/dist/stzh-components/p-dc30c467.system.entry.js.map +1 -0
  205. package/dist/stzh-components/{p-9bfe7d0d.system.entry.js → p-e69312e4.system.entry.js} +2 -2
  206. package/dist/stzh-components/p-e69312e4.system.entry.js.map +1 -0
  207. package/dist/stzh-components/p-fa0e39e0.system.entry.js +2 -0
  208. package/dist/stzh-components/p-fa0e39e0.system.entry.js.map +1 -0
  209. package/dist/stzh-components/p-ffb4e717.entry.js +2 -0
  210. package/dist/stzh-components/p-ffb4e717.entry.js.map +1 -0
  211. package/dist/stzh-components/stzh-components.esm.js +1 -1
  212. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  213. package/dist/stzh-components/stzh-components.js +1 -1
  214. package/dist/types/components/stzh-appointments/stzh-appointments.d.ts +1 -0
  215. package/dist/types/components/stzh-datepicker/stzh-datepicker.d.ts +11 -1
  216. package/dist/types/components/stzh-progressbar/stzh-progressbar.d.ts +10 -0
  217. package/dist/types/components/stzh-vbz-majorticker/stzh-vbz-majorticker.d.ts +1 -0
  218. package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.d.ts +1 -0
  219. package/dist/types/components.d.ts +14 -2
  220. package/dist/types/index.d.ts +1 -0
  221. package/dist/types/utils/translation-utils.d.ts +2 -0
  222. package/package.json +1 -1
  223. package/dist/cjs/app-globals-7697372c.js.map +0 -1
  224. package/dist/esm/app-globals-1a77c38b.js.map +0 -1
  225. package/dist/esm-es5/app-globals-1a77c38b.js.map +0 -1
  226. package/dist/stzh-components/p-07819ba5.entry.js +0 -2
  227. package/dist/stzh-components/p-07819ba5.entry.js.map +0 -1
  228. package/dist/stzh-components/p-1095d872.system.entry.js +0 -2
  229. package/dist/stzh-components/p-1095d872.system.entry.js.map +0 -1
  230. package/dist/stzh-components/p-11784b90.entry.js.map +0 -1
  231. package/dist/stzh-components/p-446dcea5.entry.js +0 -2
  232. package/dist/stzh-components/p-446dcea5.entry.js.map +0 -1
  233. package/dist/stzh-components/p-50914ed3.system.entry.js.map +0 -1
  234. package/dist/stzh-components/p-7b0da017.entry.js +0 -2
  235. package/dist/stzh-components/p-7b0da017.entry.js.map +0 -1
  236. package/dist/stzh-components/p-7fdd98fe.entry.js +0 -2
  237. package/dist/stzh-components/p-7fdd98fe.entry.js.map +0 -1
  238. package/dist/stzh-components/p-84ae2651.system.js.map +0 -1
  239. package/dist/stzh-components/p-8b4cc10d.entry.js.map +0 -1
  240. package/dist/stzh-components/p-8f98fc45.system.entry.js +0 -2
  241. package/dist/stzh-components/p-8f98fc45.system.entry.js.map +0 -1
  242. package/dist/stzh-components/p-98b60fb7.js.map +0 -1
  243. package/dist/stzh-components/p-9bfe7d0d.system.entry.js.map +0 -1
  244. package/dist/stzh-components/p-aafc8687.entry.js +0 -2
  245. package/dist/stzh-components/p-aafc8687.entry.js.map +0 -1
  246. package/dist/stzh-components/p-aefc1441.entry.js.map +0 -1
  247. package/dist/stzh-components/p-afb2885a.entry.js +0 -2
  248. package/dist/stzh-components/p-afb2885a.entry.js.map +0 -1
  249. package/dist/stzh-components/p-bde8bb45.system.js +0 -2
  250. package/dist/stzh-components/p-c658502d.system.entry.js.map +0 -1
  251. package/dist/stzh-components/p-cbcb366a.system.entry.js.map +0 -1
  252. package/dist/stzh-components/p-d9984b93.system.entry.js.map +0 -1
  253. package/dist/stzh-components/p-e278cda2.system.entry.js +0 -2
  254. package/dist/stzh-components/p-e278cda2.system.entry.js.map +0 -1
  255. package/dist/stzh-components/p-e5c1f04c.system.entry.js.map +0 -1
  256. package/dist/stzh-components/p-ff356dc8.system.entry.js +0 -2
  257. package/dist/stzh-components/p-ff356dc8.system.entry.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhDatepickerCss","StzhDatepicker","this","onRootFocus","input","setFocus","onInputChanged","parsedDate","dateAdapter","parse","value","isoDate","printISODate","calendar","valueWatcher","stzhChange","emit","component","valueAsDate","onCalendarChange","event","detail","format","popover","hide","createDateFormatters","localization","dateFormatLong","Intl","DateTimeFormat","$locale","day","month","year","newValue","date","parseISODate","updateButtonAccessibleLabel","setDate","getPopover","buttonLabel","label","selectedDateMessage","err","connectedCallback","componentWillLoad","window","stzhComponents","utils","fetchTranslations","element","createFormatParseAdapter","$formats","$globals","componentDidLoad","render","classes","inline","h","Host","tabindex","disabled","onFocus","class","type","name","Fragment","ref","el","isDateDisabled","calendarIsDateDisabled","min","calendarMin","max","calendarMax","onStzhChange","labelHidden","noAutocomplete","onStzhChanged","readonly","description","descriptionLong","error","invalid","required","showMarker","size","slot","placement","variant","icon","a11yLabel","stzhRadioCss","radioCounter","StzhRadio","focusedByInput","onInput","checked","originalEvent","focusEvent","FocusEvent","view","bubbles","cancelable","dispatchEvent","stzhFocus","onBlur","blurEvent","stzhBlur","focus","errorWatcher","_error","JSON","e","length","inputId","descriptionUsed","hasSlot","descriptionLongUsed","errorUsed","id","a11yDescribedby","requiredFieldMarker","optionalFieldMarker","requiredFieldText","optionalFieldText","StzhInputDescription","classPrefix","moreInfoButtonLabel","stzhRadiogroupCss","SELECTOR_RADIO","radiogroupCounter","StzhRadiogroup","_preventUpdateProperties","init","radios","Array","from","querySelectorAll","updateRadiosProperty","radiogroupId","watchValue","watchName","watchDisabled","watchInvalid","watchRequired","updateCheckedRadioByValue","preventUpdatePropertiesWatcher","onChange","prop","forEach","radio","indexOf","camelCase","checkedRadio","find","uncheckRadios","preventUpdateProperties","componentShouldUpdate","_newValue","_oldValue","componentDidRender","observer","MutationObserver","observe","childList","subtree","disconnectedCallback","disconnect","hideLegend","direction","legend"],"sources":["src/components/stzh-datepicker/stzh-datepicker.scss?tag=stzh-datepicker&encapsulation=scoped","src/components/stzh-datepicker/stzh-datepicker.tsx","src/components/stzh-radio/stzh-radio.scss?tag=stzh-radio&encapsulation=scoped","src/components/stzh-radio/stzh-radio.tsx","src/components/stzh-radiogroup/stzh-radiogroup.scss?tag=stzh-radiogroup&encapsulation=scoped","src/components/stzh-radiogroup/stzh-radiogroup.tsx"],"sourcesContent":[":host {\n width: 100%;\n}\n\n.stzh-datepicker {\n &__popover {\n --padding: #{space('medium')};\n --width: auto;\n }\n\n &__actions {\n display: flex;\n justify-content: flex-end;\n\n &:not(:empty) {\n margin-top: space('xsmall');\n }\n }\n}\n","import {\n Component,\n Prop,\n Host,\n Element,\n h,\n Event,\n EventEmitter,\n Method,\n Watch,\n Fragment,\n State\n} from \"@stencil/core\";\n\nimport {\n StzhCalendarChangeEvent,\n StzhDatepickerChangeEvent\n} from \"../../index\";\n\nimport { StzhCalendarDateDisabledPredicate } from \"../../index\";\n\nimport { printISODate, parseISODate } from \"../../utils/date-utils\"\nimport { StzhLocaleAdapter } from \"../../utils/date-adapter\"\n\nimport { StzhDatepickerLocalizedText } from \"./stzh-datepicker.localization\";\n\n/**\n * @slot action - Slot for action below calendar (stzh-link element)\n */\n@Component({\n tag: \"stzh-datepicker\",\n styleUrl: \"stzh-datepicker.scss\",\n scoped: true\n})\nexport class StzhDatepicker {\n /**\n * Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\n * This setting can be used alone or together with the max property.\n */\n @Prop() calendarMin: string = \"\"\n\n /**\n * Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\n * This setting can be used alone or together with the min property.\n */\n @Prop() calendarMax: string = \"\"\n\n /**\n * Controls which days are disabled and therefore disallowed.\n * For example, this can be used to disallow selection of weekends.\n */\n @Prop() calendarIsDateDisabled: StzhCalendarDateDisabledPredicate = () => false\n\n /** Name of the hidden date picker input. */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** Value of hidden date picker input (current selected date in ISO format). */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Label for input field and popover */\n @Prop() label: string = \"\";\n\n /** Whether label is visually hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Append text to label depending if field is optional/required. true -> show \"(optional)\", false -> show nothing */\n @Prop({ reflect: true }) showMarker: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Show calendar inline */\n @Prop() inline: boolean = false;\n\n /**\n * Date adapter, for custom parsing/formatting.\n * Must be object with a `parse` function which accepts a `string` and returns a `Date`,\n * and a `format` function which accepts a `Date` and returns a `string`.\n */\n @Prop() dateAdapter: StzhLocaleAdapter;\n\n /** Translation strings. */\n @Prop() localization: StzhDatepickerLocalizedText;\n\n @State() buttonLabel: string;\n\n @Watch(\"localization\")\n createDateFormatters() {\n if (this.localization) {\n this.dateFormatLong = new Intl.DateTimeFormat(this.localization.$locale, {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n })\n }\n }\n\n /** Update calendar and input when value prop has changed */\n @Watch(\"value\")\n valueWatcher(newValue: string) {\n const date = parseISODate(newValue);\n\n if (this.calendar) {\n this.calendar.value = newValue;\n }\n\n if (this.input) {\n this.input.value = this.dateAdapter.format(date, \"dateInput\");\n }\n\n this.updateButtonAccessibleLabel();\n }\n\n /** Set value by a JS Date object */\n @Method()\n async setDate(date: Date) {\n this.value = printISODate(date);\n }\n\n /** Return internal popover element */\n @Method()\n async getPopover(): Promise<HTMLStzhPopoverElement> {\n return this.popover;\n }\n\n /** Datepicker change event */\n @Event() stzhChange: EventEmitter<StzhDatepickerChangeEvent>;\n\n @Element() element: HTMLStzhDatepickerElement;\n\n /**\n * To format dates exclusively for the benefit of screen readers.\n *\n * We prefer DateTimeFormat over date.toLocaleDateString, as the former has\n * better performance when formatting large number of dates. See:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance\n */\n private dateFormatLong: Intl.DateTimeFormat\n\n private input: HTMLStzhInputElement;\n private popover: HTMLStzhPopoverElement;\n private calendar: HTMLStzhCalendarElement;\n\n private onRootFocus = () => {\n if (this.input) {\n this.input.setFocus();\n }\n }\n\n private onInputChanged = () => {\n const parsedDate = this.dateAdapter.parse(this.input.value, \"dateInput\");\n\n if (this.input.value === \"\" || parsedDate) {\n const isoDate = printISODate(parsedDate);\n\n if (this.value !== isoDate) {\n if (this.calendar) {\n this.calendar.value = isoDate;\n }\n\n this.value = isoDate;\n } else {\n this.valueWatcher(isoDate);\n }\n\n this.stzhChange.emit({\n component: \"stzh-datepicker\",\n value: this.value,\n valueAsDate: parsedDate,\n })\n }\n }\n\n private onCalendarChange = (event: CustomEvent<StzhCalendarChangeEvent>) => {\n this.value = event.detail.value;\n this.stzhChange.emit({\n component: \"stzh-datepicker\",\n value: this.value,\n valueAsDate: event.detail.valueAsDate,\n });\n\n if (this.input) {\n this.input.value = event.detail.valueAsDate\n && this.dateAdapter.format(event.detail.valueAsDate, \"dateInput\");\n }\n\n if (this.popover) {\n this.popover.hide();\n }\n }\n\n private updateButtonAccessibleLabel() {\n if (!this.localization) {\n return;\n }\n\n try {\n const valueAsDate = parseISODate(this.value);\n this.buttonLabel = `${this.label}, ${this.localization.buttonLabel}, ${this.localization.selectedDateMessage} ${this.dateFormatLong.format(valueAsDate)}`;\n } catch (err) {\n this.buttonLabel = `${this.label}, ${this.localization.buttonLabel}`;\n }\n }\n\n connectedCallback() {\n this.createDateFormatters();\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"datepicker\");\n }\n\n if (!this.dateAdapter) {\n this.dateAdapter = window.stzhComponents.utils.createFormatParseAdapter(\n this.localization.$formats,\n this.localization.$globals\n );\n }\n }\n\n componentDidLoad() {\n this.valueWatcher(this.value);\n }\n\n render() {\n const classes = {\n \"stzh-datepicker\": true,\n \"stzh-datepicker--inline\": this.inline\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n <input\n type=\"hidden\"\n name={this.name}\n value={this.value}\n />\n\n {this.inline &&\n <Fragment>\n <stzh-calendar\n ref={(el) => (this.calendar = el as HTMLStzhCalendarElement)}\n isDateDisabled={this.calendarIsDateDisabled}\n min={this.calendarMin}\n max={this.calendarMax}\n onStzhChange={this.onCalendarChange}\n ></stzh-calendar>\n <div class=\"stzh-datepicker__actions\">\n <slot name=\"action\"></slot>\n </div>\n </Fragment>\n }\n\n {!this.inline &&\n <stzh-input\n label={this.label}\n labelHidden={this.labelHidden}\n ref={(el) => (this.input = el as HTMLStzhInputElement)}\n noAutocomplete\n onStzhChanged={this.onInputChanged}\n readonly={this.readonly}\n disabled={this.disabled}\n description={this.description}\n descriptionLong={this.descriptionLong}\n error={this.error}\n invalid={this.invalid}\n required={this.required}\n showMarker={this.showMarker}\n size={this.size}\n >\n <stzh-popover\n ref={(el) => (this.popover = el as HTMLStzhPopoverElement)}\n class=\"stzh-datepicker__popover\"\n slot=\"button-right\"\n placement=\"bottom-end\"\n label={this.label}\n >\n <stzh-button\n variant=\"input\"\n icon-only\n icon=\"calendar\"\n disabled={this.disabled}\n a11yLabel={this.buttonLabel}\n >\n </stzh-button>\n <div slot=\"content\">\n <stzh-calendar\n ref={(el) => (this.calendar = el as HTMLStzhCalendarElement)}\n isDateDisabled={this.calendarIsDateDisabled}\n min={this.calendarMin}\n max={this.calendarMax}\n onStzhChange={this.onCalendarChange}\n >\n </stzh-calendar>\n <div class=\"stzh-datepicker__actions\">\n <slot name=\"action\"></slot>\n </div>\n </div>\n </stzh-popover>\n </stzh-input>\n }\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n\n ::slotted(stzh-text) {\n --color: inherit;\n }\n}\n\n.stzh-radio {\n\t@include input-description;\n\n &__field-wrapper {\n @include fontSize('milli');\n position: relative;\n display: flex;\n user-select: none;\n cursor: pointer;\n }\n\n &__input {\n @include visuallyhiddenInput;\n border-radius: $formInputBorderRadius;\n }\n\n &__mark {\n @include radio__mark();\n }\n\n &__check {\n @include radio__check();\n }\n\n &__label {\n display: inline-block;\n color: $baseColor;\n transition: color $baseTransitionAnimationSpeed;\n margin-left: space('small');\n line-height: 24px;\n\n &:empty {\n display: none;\n }\n }\n\n &__marker-symbol {\n @include fontSize('micro');\n }\n\n /* Hover / Focus / Checked */\n\n &:hover &__label,\n &__input:checked:hover ~ &__label,\n &__input:checked:hover ~ &__mark &__check,\n &__input:checked:focus ~ &__mark &__check {\n color: $colorPrimaryHover;\n }\n\n &__input:checked ~ &__label {\n color: $colorPrimary;\n }\n\n &:hover &__mark,\n &__input:focus:hover ~ &__mark,\n &__input:checked:hover ~ &__mark,\n &__input:checked:focus ~ &__mark {\n border-color: $colorPrimaryHover;\n }\n\n &__input:focus ~ &__mark,\n &__input:checked ~ &__mark {\n border-color: $colorPrimary;\n }\n\n &__input:checked ~ &__mark &__check {\n opacity: 1;\n }\n\n /* Invalid */\n\n &--is-invalid &__input ~ &__label,\n &--is-invalid &__input ~ &__mark &__check {\n color: $colorError;\n }\n\n &--is-invalid &__input ~ &__mark {\n border-color: $colorError;\n }\n\n /* Disabled */\n\n\t&--is-disabled &__field-wrapper {\n cursor: not-allowed;\n }\n\n &--is-disabled &__input ~ &__label,\n &--is-disabled &__input ~ &__mark &__check {\n color: $formDisabledColor;\n }\n\n &--is-disabled &__input ~ &__mark {\n border-color: $formDisabledBorderColor;\n }\n\n &--is-disabled &__mark {\n background-color: $formDisabledBackgroundColor;\n }\n}\n","import {\n Host,\n Component,\n Prop,\n Event,\n Element,\n EventEmitter,\n Method,\n h,\n Watch\n} from \"@stencil/core\";\n\nimport {\n StzhRadioChangeEvent,\n StzhRadioFocusEvent,\n StzhRadioBlurEvent\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nlet radioCounter = 0;\n\n/**\n * @slot - Slot for label content\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-radio\",\n styleUrl: \"stzh-radio.scss\",\n scoped: true\n})\nexport class StzhRadio {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** The value of the input element */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Append text to label depending if field is optional/required. true -> show \"(optional)\", false -> show nothing */\n @Prop({ reflect: true }) showMarker: boolean = false;\n\n /** Checked status */\n @Prop({ mutable: true, reflect: true }) checked: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Id for element which describes the radio button (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Focus input field */\n @Method()\n async setFocus() {\n this.input.focus();\n }\n\n /** Input change event */\n @Event() stzhChange: EventEmitter<StzhRadioChangeEvent>;\n\n /** Input focus event */\n @Event() stzhFocus: EventEmitter<StzhRadioFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhRadioBlurEvent>;\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n\n this.invalid = this._error.length > 0;\n }\n\n @Element() element: HTMLStzhRadioElement;\n\n private input: HTMLInputElement;\n private inputId: string;\n private focusedByInput: boolean = false;\n\n private onInput = (event: InputEvent) => {\n this.checked = this.input.checked;\n this.stzhChange.emit({\n component: \"stzh-radio\",\n originalEvent: event,\n value: this.value,\n checked: this.checked\n });\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.setFocus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent('focus', {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-radio\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent('blur', {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-radio\",\n originalEvent: event\n });\n }\n\n async componentWillLoad() {\n this.inputId = `stzh-radio-${radioCounter++}`;\n this.errorWatcher(this.error);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'radio');\n }\n }\n\n render() {\n const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n\n const classes = {\n \"stzh-radio\": true,\n \"stzh-radio--has-description\": descriptionUsed,\n \"stzh-radio--has-description-long\": descriptionLongUsed,\n \"stzh-radio--has-error\": errorUsed,\n \"stzh-radio--is-required\": this.required,\n \"stzh-radio--is-invalid\": this.invalid,\n \"stzh-radio--is-disabled\": this.disabled\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n <label class=\"stzh-radio__field-wrapper\">\n <input\n class=\"stzh-radio__input\"\n ref={(el) => (this.input = el as HTMLInputElement)}\n type=\"radio\"\n id={this.inputId}\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n checked={this.checked}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n <div class=\"stzh-radio__mark\">\n <div class=\"stzh-radio__check\"></div>\n </div>\n <div class=\"stzh-radio__label\">\n {this.label ? this.label : <slot></slot>}\n {this.showMarker &&\n <span class=\"stzh-radio__marker\">\n <span class=\"stzh-radio__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker\n }\n </span>\n <span class=\"stzh-radio__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </div>\n </label>\n <StzhInputDescription\n classPrefix=\"stzh-radio\"\n id={`${this.inputId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n </div>\n </Host>\n );\n }\n}\n",":host([direction=\"vertical\"]) {\n ::slotted(stzh-radio:not(:last-child)) {\n margin-bottom: space('medium');\n }\n}\n\n:host([direction=\"horizontal\"]) {\n ::slotted(stzh-radio:not(:last-child)) {\n margin-right: space('large');\n }\n}\n\n.stzh-radiogroup {\n @include input-description;\n margin: 0;\n padding: 0;\n border: none;\n\n &__fields {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n }\n\n &__legend {\n @include font('heavy');\n @include fontSize('nano');\n padding: 0;\n margin-bottom: space('xsmall');\n }\n\n &--hide-legend &__legend {\n @include visuallyhidden;\n }\n\n &--direction-horizontal &__fields {\n flex-direction: row;\n }\n}\n","import {\n Component,\n Prop,\n Element,\n Watch,\n h,\n Listen\n} from \"@stencil/core\";\n\nimport { StzhRadioChangeEvent } from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { camelCase } from \"../../utils/string-utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nconst SELECTOR_RADIO = 'stzh-radio, stzh-button[type=radio], stzh-card';\n\nlet radiogroupCounter = 0;\n\n/**\n * @slot - Slot for `stzh-radio`, `stzh-button[type=\"radio\"]` or `stzh-card` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-radiogroup\",\n styleUrl: \"stzh-radiogroup.scss\",\n scoped: true\n})\nexport class StzhRadiogroup {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** The name of the input radio elements, will define the radio group. If you have more than one radio group on a page, every group needs to have its own unique name */\n @Prop({ reflect: true }) name: string;\n\n /** The legend */\n @Prop() legend: string;\n\n /** Hide legend to show only for screenreaders */\n @Prop({ reflect: true }) hideLegend: boolean = false;\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Append text to label depending if field is optional/required. true -> show \"(optional)\", false -> show nothing */\n @Prop({ reflect: true }) showMarker: boolean = false;\n\n /** Select a radio by value */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Direction */\n @Prop({ reflect: true }) direction: \"vertical\" | \"horizontal\" = \"vertical\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Current checked radio element (readonly) */\n @Prop() checkedRadio: HTMLStzhRadioElement | null = null;\n\n /** Prevent updating certain properties of radio elements (possible values inside array: disabled, invalid, required, hide-marker) */\n @Prop() preventUpdateProperties: string[] | string = [];\n private _preventUpdateProperties: string[] = [];\n\n /** Host element */\n @Element() element: HTMLElement;\n\n @Watch(\"name\")\n watchName(newValue: string) {\n this.updateRadiosProperty(\"name\", newValue);\n }\n\n @Watch(\"disabled\")\n watchDisabled(newValue: boolean) {\n this.updateRadiosProperty(\"disabled\", newValue);\n }\n\n @Watch(\"invalid\")\n watchInvalid(newValue: boolean) {\n this.updateRadiosProperty(\"invalid\", newValue);\n }\n\n @Watch(\"required\")\n watchRequired(newValue: boolean) {\n this.updateRadiosProperty(\"required\", newValue);\n }\n\n @Watch(\"value\")\n watchValue(newValue: string) {\n this.updateCheckedRadioByValue(newValue);\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n\n this.invalid = this._error.length > 0;\n }\n\n @Watch(\"preventUpdateProperties\")\n preventUpdatePropertiesWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._preventUpdateProperties = JSON.parse(newValue);\n } else {\n this._preventUpdateProperties = newValue;\n }\n }\n\n @Listen(\"stzhChange\")\n onChange(event: CustomEvent<StzhRadioChangeEvent>) {\n this.value = event.detail.value;\n }\n\n /** Radio elements */\n private radios: HTMLStzhRadioElement[];\n private radiogroupId: string;\n private observer: MutationObserver;\n\n private updateRadiosProperty(prop: string, value: any) {\n this.radios.forEach((radio: HTMLStzhRadioElement) => {\n if (prop === \"name\" || (this._preventUpdateProperties.indexOf(prop) === -1)) {\n radio[camelCase(prop)] = value;\n }\n });\n }\n\n private updateCheckedRadioByValue(value: string) {\n this.checkedRadio = this.radios.find(radio => radio.value === value);\n\n if (this.checkedRadio) {\n this.checkedRadio.checked = true;\n }\n\n this.uncheckRadios();\n }\n\n private uncheckRadios() {\n // make sure that no other radios are checked than the current one or no one\n this.radios.forEach((radio: HTMLStzhRadioElement) => {\n if (!this.checkedRadio || radio !== this.checkedRadio) {\n radio.checked = false;\n }\n });\n }\n\n private init = () => {\n // update radios\n this.radios = Array.from(this.element.querySelectorAll(SELECTOR_RADIO));\n\n this.updateRadiosProperty(\"show-marker\", false);\n this.updateRadiosProperty(\"a11y-describedby\", `${this.radiogroupId}-description`);\n\n this.watchValue(this.value);\n this.watchName(this.name);\n this.watchDisabled(this.disabled);\n this.watchInvalid(this.invalid);\n this.watchRequired(this.required);\n }\n\n async componentWillLoad() {\n this.radiogroupId = `stzh-radiogroup-${radiogroupCounter++}`;\n this.errorWatcher(this.error);\n this.preventUpdatePropertiesWatcher(this.preventUpdateProperties);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'radiogroup');\n }\n }\n\n componentShouldUpdate(_newValue, _oldValue, prop: string) {\n return prop !== \"checkedRadio\";\n }\n\n componentDidRender() {\n this.init();\n }\n\n connectedCallback() {\n if (!this.value) {\n this.radios = Array.from(this.element.querySelectorAll(SELECTOR_RADIO));\n\n // try to find a checkbox that might has checked set to true\n const checkedRadio = this.radios.find(radio => radio.checked);\n\n if (checkedRadio) {\n this.value = checkedRadio.value;\n }\n }\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true,\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n\n const classes = {\n \"stzh-radiogroup\": true,\n \"stzh-radiogroup--has-description\": descriptionUsed,\n \"stzh-radiogroup--has-description-long\": descriptionLongUsed,\n \"stzh-radiogroup--has-error\": errorUsed,\n \"stzh-radiogroup--is-required\": this.required,\n \"stzh-radiogroup--is-disabled\": this.disabled,\n \"stzh-radiogroup--is-invalid\": this.invalid,\n \"stzh-radiogroup--hide-legend\": this.hideLegend,\n [`stzh-radiogroup--direction-${this.direction}`]: !!this.direction\n };\n\n return (\n <fieldset class={classes}>\n {this.legend &&\n <legend class=\"stzh-radiogroup__legend\">\n {this.legend}\n {this.showMarker &&\n <span class=\"stzh-radiogroup__marker\">\n <span class=\"stzh-radiogroup__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker\n }\n </span>\n <span class=\"stzh-radiogroup__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </legend>\n }\n <div class=\"stzh-radiogroup__fields\">\n <slot></slot>\n </div>\n <StzhInputDescription\n classPrefix=\"stzh-radiogroup\"\n id={`${this.radiogroupId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n </fieldset>\n );\n }\n}\n"],"mappings":"oNAAA,MAAMA,EAAoB,2wC,MCkCbC,EAAc,M,gEAkIjBC,KAAAC,YAAc,KACpB,GAAID,KAAKE,MAAO,CACdF,KAAKE,MAAMC,U,GAIPH,KAAAI,eAAiB,KACvB,MAAMC,EAAaL,KAAKM,YAAYC,MAAMP,KAAKE,MAAMM,MAAO,aAE5D,GAAIR,KAAKE,MAAMM,QAAU,IAAMH,EAAY,CACzC,MAAMI,EAAUC,EAAaL,GAE7B,GAAIL,KAAKQ,QAAUC,EAAS,CAC1B,GAAIT,KAAKW,SAAU,CACjBX,KAAKW,SAASH,MAAQC,C,CAGxBT,KAAKQ,MAAQC,C,KACR,C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AAKgD,QAAS,uBAAyBhD,KAAK+E,gBAChF,MAAMsC,EAAYF,EAAQnH,KAAKgD,QAAS,YAAchD,KAAKgF,MAE3D,MAAM1B,EAAU,CACd,kBAAmB,KACnB,mCAAoC4D,EACpC,wCAAyCE,EACzC,6BAA8BC,EAC9B,+BAAgCrH,KAAKkF,SACrC,+BAAgClF,KAAK2D,SACrC,8BAA+B3D,KAAKiF,QACpC,+BAAgCjF,KAAKuK,WACrC,CAAC,8BAA8BvK,KAAKwK,eAAgBxK,KAAKwK,WAG3D,OACEhH,EAAA,YAAUK,MAAOP,GACdtD,KAAKyK,QACJjH,EAAA,UAAQK,MAAM,2BACX7D,KAAKyK,OACLzK,KAAKmF,YACJ3B,EAAA,QAAMK,MAAM,2BACVL,EAAA,QAAMK,MAAM,iCAAgC,cAAa,QACtD7D,KAAKkF,SACFlF,KAAKwB,aAAa2B,SAASqE,oBAC3BxH,KAAKwB,aAAa2B,SAASsE,qBAGjCjE,EAAA,QAAMK,MAAM,gCACT7D,KAAKkF,SACFlF,KAAKwB,aAAa2B,SAASuE,kBAC3B1H,KAAKwB,aAAa2B,SAASwE,qBAOzCnE,EAAA,OAAKK,MAAM,2BACTL,EAAA,cAEFA,EAACoE,EAAoB,CACnBC,YAAY,kBACZP,GAAI,GAAGtH,KAAK0I,2BACZ1D,MAAOhF,KAAK6G,OACZ/B,YAAa9E,KAAK8E,YAClBC,gBAAiB/E,KAAK+E,gBACtBqC,oBAAqBA,EACrBU,oBAAqB9H,KAAKwB,aAAa2B,SAAS2E,sB"}
@@ -1,2 +0,0 @@
1
- System.register(["./p-290fcb28.system.js","./p-84ae2651.system.js"],(function(e,a){"use strict";var t,i,s,l,o,r;return{setters:[function(a){t=a.p;i=a.d;s=a.N;l=a.H;o=a.b;e("setNonce",a.s)},function(e){r=e.g}],execute:function(){var e=function(){{n(l.prototype)}var e=Array.from(i.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(s,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===s}));var o=a.meta.url;var r=(e||{})["data-opts"]||{};if(o!==""){r.resourcesUrl=new URL(".",o).href}return t(r)};var n=function(e){var a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}var t=a.call(this,false);var i=this.childNodes;if(e){for(var s=0;s<i.length;s++){if(i[s].nodeType!==2){t.appendChild(i[s].cloneNode(true))}}}return t}};e().then((function(e){r();return o(JSON.parse('[["p-b39d06ea.system",[[4,"stzh-datatable",{"tableLayout":[1,"table-layout"],"localization":[16],"label":[1],"sortBy":[1025,"sort-by"],"sortDirection":[1025,"sort-direction"],"tokenize":[1],"idField":[1,"id-field"],"hideSearch":[516,"hide-search"],"showList":[516,"show-list"],"page":[1026],"pageSize":[2,"page-size"],"disableMinWidth":[516,"disable-min-width"],"rows":[1],"columns":[1],"query":[32],"hasScrollLeft":[32],"hasScrollRight":[32],"isScrollable":[32],"cellsStickyLeft":[32],"cellsStickyRight":[32],"toggleSort":[64]},null,{"rows":["rowsWatcher"],"columns":["columnsWatcher"],"sortBy":["sortByWatcher"],"sortDirection":["sortDirectionWatcher"]}]]],["p-2c3b8de4.system",[[2,"stzh-microsite-teaserlist",{"localization":[16],"api":[1],"tags":[1],"stepItems":[2,"step-items"],"showItems":[32],"activeFilter":[32]},null,{"showItems":["filterHandler"],"activeFilter":["filterHandler"],"tags":["tagsWatcher"],"api":["apiWatcher"]}]]],["p-cbcb366a.system",[[2,"stzh-appointments",{"localization":[16],"sortBy":[1025,"sort-by"],"appointments":[1],"currentDate":[1025,"current-date"],"value":[1025],"name":[513],"showItems":[1026,"show-items"],"stepItems":[2,"step-items"],"calendarTitle":[1,"calendar-title"],"appointmentsTitle":[1,"appointments-title"],"dateAdapter":[16]},null,{"currentDate":["currentDateWatcher"],"sortBy":["sortByWatcher"],"value":["valueWatcher"],"appointments":["appointmentsWatcher"]}]]],["p-59c9bb4a.system",[[2,"stzh-datamessagelist-item",{"localization":[16],"heading":[1],"unread":[4],"href":[1],"rel":[1],"target":[1],"description":[1],"icon":[1],"loadingStatus":[1,"loading-status"],"meta":[1],"actions":[1],"tags":[1],"analyticsId":[1,"analytics-id"],"external":[32]},null,{"rel":["externalWatcher"],"loadingStatus":["loadingStatusWatcher"],"meta":["metaWatcher"],"actions":["actionsWatcher"],"tags":["tagsWatcher"]}]]],["p-ff9a0645.system",[[6,"stzh-contact",{"type":[1],"heading":[1],"mainHeading":[1,"main-heading"],"name":[1],"address":[1],"street":[1],"streetInfo":[1,"street-info"],"postalCode":[1,"postal-code"],"location":[1],"numbers":[1],"poBoxHeading":[1,"po-box-heading"],"poboxTitle":[1,"pobox-title"],"poboxPostalCode":[1,"pobox-postal-code"],"poboxLocation":[1,"pobox-location"],"availabilityTitle":[1,"availability-title"],"availability":[1],"withBorder":[4,"with-border"]},null,{"availability":["availabilityWatcher"],"numbers":["numbersWatcher"]}]]],["p-54dbcd0e.system",[[4,"stzh-gallery",{"localization":[16],"images":[1],"variant":[1],"itemElement":[1,"item-element"],"openLightbox":[64]},[[8,"appload","apploadListener"]],{"images":["imagesWatcher"]}]]],["p-c1ab5b6a.system",[[0,"stzh-panorama",{"localization":[16],"caption":[1],"copyright":[1],"scene":[1025],"sceneFadeDuration":[2,"scene-fade-duration"],"autoload":[4],"orientationOnByDefault":[4,"orientation-on-by-default"],"scenes":[1],"isOrientationSupported":[32],"isOrientationActive":[32],"isFullscreen":[32],"getViewer":[64]},null,{"scenes":["scenesWatcher","updateWatcher"],"scene":["sceneWatcher"],"autoload":["updateWatcher"],"type":["updateWatcher"],"localization":["updateWatcher"],"orientationOnByDefault":["updateWatcher"],"sceneFadeDuration":["updateWatcher"]}]]],["p-f356fa70.system",[[0,"stzh-sitemap",{"items":[1]}]]],["p-05dd9d15.system",[[0,"stzh-amount",{"minValue":[2,"min-value"],"maxValue":[2,"max-value"],"minValueDropdown":[2,"min-value-dropdown"],"maxValueDropdown":[2,"max-value-dropdown"],"value":[1025],"step":[2],"name":[513],"size":[513],"disabled":[516],"popoverPlacement":[513,"popover-placement"],"label":[1],"labelHidden":[4,"label-hidden"],"invalid":[516],"required":[516],"clearable":[516],"showMarker":[516,"show-marker"],"description":[1],"descriptionLong":[1,"description-long"],"error":[1025],"a11yDescribedby":[1,"a11y-describedby"],"localization":[16]},null,{"minValueDropdown":["minMaxValueDropdownWatcher"],"maxValueDropdown":["minMaxValueDropdownWatcher"]}]]],["p-c658502d.system",[[1,"stzh-toastbar",{"hideAfter":[2,"hide-after"],"max":[2],"initialToasts":[1,"initial-toasts"],"toast":[64]},null,{"initialToasts":["initialToastsWatcher"]}]]],["p-7bba3418.system",[[2,"stzh-saptcha",{"localization":[16],"numbers":[1],"value":[1],"name":[513],"error":[1],"invalid":[516],"disabled":[516]},null,{"numbers":["numbersWatcher"],"error":["errorWatcher"]}]]],["p-50914ed3.system",[[2,"stzh-vbz-majorticker",{"api":[1],"data":[8],"moreInfoLink":[1,"more-info-link"],"dateAdapter":[16],"localization":[16],"ghettoboxCloseTimeKey":[1,"ghettobox-close-time-key"],"ghettoboxShown":[32],"getGhettoboxShown":[64],"getDisturbance":[64]},null,{"api":["apiWatcher"],"data":["dataWatcher"]}]]],["p-e5c1f04c.system",[[6,"stzh-vbz-ticker",{"api":[1],"data":[8],"moreInfoLink":[1,"more-info-link"],"dateAdapter":[16],"localization":[16]},null,{"localization":["localizationWatcher"],"api":["apiWatcher"],"data":["dataWatcher"]}]]],["p-d7cbaefa.system",[[6,"stzh-youtube",{"localization":[16],"url":[1],"cookie":[1],"cookieExpires":[2,"cookie-expires"],"skipPreviewIfCookieAccepted":[4,"skip-preview-if-cookie-accepted"],"skipPreview":[4,"skip-preview"],"previewSkipped":[32]}]]],["p-0d9721b6.system",[[2,"stzh-anchornav",{"columns":[514],"columnsSmall":[514,"columns-small"],"columnsMedium":[514,"columns-medium"],"columnsLarge":[514,"columns-large"],"columnsUltra":[514,"columns-ultra"],"items":[1],"withBorder":[516,"with-border"]},null,{"items":["appointmentsWatcher"]}]]],["p-3ceef7dd.system",[[6,"stzh-audio",{"localization":[16],"src":[1],"preload":[1],"transcript":[1],"transcriptShown":[1028,"transcript-shown"],"downloadAnalyticsId":[1,"download-analytics-id"],"transcriptAnalyticsId":[1,"transcript-analytics-id"],"play":[64],"pause":[64]}]]],["p-54a1fdcc.system",[[4,"stzh-upload",{"existingFiles":[1,"existing-files"],"label":[1],"description":[1],"button":[1],"url":[1],"method":[1],"withCredentials":[4,"with-credentials"],"disabled":[516],"invalid":[516],"downloadDisabled":[4,"download-disabled"],"downloadDisabledWhileProcessing":[4,"download-disabled-while-processing"],"error":[1],"acceptedFiles":[1,"accepted-files"],"autoProcessQueue":[4,"auto-process-queue"],"hideProgress":[4,"hide-progress"],"hideProgressWhileIdle":[4,"hide-progress-while-idle"],"maxFiles":[2,"max-files"],"maxFilesize":[2,"max-filesize"],"parallelUploads":[2,"parallel-uploads"],"uploadMultiple":[4,"upload-multiple"],"chunking":[4],"forceChunking":[4,"force-chunking"],"chunkSize":[2,"chunk-size"],"parallelChunkUploads":[4,"parallel-chunk-uploads"],"retryChunks":[4,"retry-chunks"],"retryChunksLimit":[2,"retry-chunks-limit"],"filesizeBase":[2,"filesize-base"],"headers":[16],"defaultHeaders":[4,"default-headers"],"accept":[16],"chunksUploaded":[16],"hiddenInputContainer":[1,"hidden-input-container"],"localization":[16],"processQueue":[64],"removeFile":[64],"removeAllFiles":[64]},null,{"existingFiles":["existingFilesWatcher"],"disabled":["disabledWatcher"],"error":["errorWatcher"]}]]],["p-194f6f51.system",[[1,"stzh-accordion-item",{"collapsible":[4],"open":[1540],"disabled":[516],"heading":[1],"subtitle":[1],"description":[1],"icon":[1],"badge":[1],"badgeEmpty":[516,"badge-empty"],"badgeType":[513,"badge-type"],"headingLevel":[513,"heading-level"],"analyticsId":[1,"analytics-id"],"show":[64],"hide":[64],"toggle":[64],"setFocus":[64]},null,{"open":["openWatcher"]}]]],["p-d22fbf2e.system",[[4,"stzh-footer",{"localization":[16],"copyright":[1],"variant":[1],"mainUrl":[1,"main-url"],"withBorder":[4,"with-border"]}]]],["p-a6af09e4.system",[[2,"stzh-langnav",{"languageActive":[1,"language-active"],"languages":[1],"popoverPlacement":[513,"popover-placement"],"preventUrlchange":[4,"prevent-urlchange"]}]]],["p-c20c6805.system",[[6,"stzh-message",{"label":[1],"description":[1],"closeKey":[1,"close-key"],"type":[513],"hideClose":[4,"hide-close"],"localization":[16],"open":[32],"show":[64],"hide":[64]}]]],["p-d3d21624.system",[[2,"stzh-monthyearpicker",{"monthOpen":[4,"month-open"],"yearOpen":[4,"year-open"],"months":[1],"years":[1],"min":[1],"max":[1],"minYear":[2,"min-year"],"maxYear":[2,"max-year"],"format":[513],"name":[513],"value":[1025],"popoverPlacement":[513,"popover-placement"],"monthLabel":[1,"month-label"],"yearLabel":[1,"year-label"],"readonly":[516],"disabled":[516],"required":[516],"showMarker":[516,"show-marker"],"size":[513],"descriptionMonth":[1,"description-month"],"descriptionYear":[1,"description-year"],"descriptionLongMonth":[1,"description-long-month"],"descriptionLongYear":[1,"description-long-year"],"errorMonth":[1,"error-month"],"errorYear":[1,"error-year"],"invalidMonth":[516,"invalid-month"],"invalidYear":[516,"invalid-year"],"a11yDescribedbyMonth":[1,"a11y-describedby"],"a11yDescribedbyYear":[1,"a11y-describedby"],"localization":[16]},null,{"months":["monthsWatcher"],"years":["yearsWatcher"],"value":["minMaxWatcher"],"min":["minMaxWatcher"],"max":["minMaxWatcher"]}]]],["p-42f483f6.system",[[6,"stzh-pagebottom",{"shareTitle":[1,"share-title"],"shareUrl":[1,"share-url"],"shareServices":[1,"share-services"],"shareDisabled":[4,"share-disabled"],"logoHref":[1,"logo-href"],"logoAnalyticsId":[1,"logo-analytics-id"],"withBorder":[4,"with-border"]}]]],["p-34ff6606.system",[[1,"stzh-timeline-item",{"foldable":[4],"collapsible":[4],"open":[1540],"disabled":[516],"heading":[1],"description":[1],"step":[514],"icon":[1],"badge":[1],"badgeEmpty":[516,"badge-empty"],"badgeType":[513,"badge-type"],"headingLevel":[513,"heading-level"],"analyticsId":[1,"analytics-id"],"_foldable":[32],"show":[64],"hide":[64],"toggle":[64],"setFocus":[64]},null,{"open":["openWatcher"],"foldable":["foldableWatcher"]}]]],["p-2f61dd4b.system",[[2,"stzh-timepicker",{"open":[4],"min":[2],"max":[2],"step":[2],"name":[513],"value":[1025],"popoverPlacement":[513,"popover-placement"],"label":[1],"readonly":[516],"disabled":[516],"description":[1],"descriptionLong":[1,"description-long"],"error":[1],"invalid":[516],"required":[516],"showMarker":[516,"show-marker"],"size":[513],"a11yDescribedby":[1,"a11y-describedby"],"localization":[16]},null,{"min":["minMaxWatcher"],"max":["minMaxWatcher"]}]]],["p-c143a3f0.system",[[6,"stzh-checkbox",{"localization":[16],"disabled":[516],"name":[513],"value":[1025],"invalid":[516],"required":[516],"checked":[1540],"label":[1],"description":[1],"descriptionLong":[1,"description-long"],"showMarker":[516,"show-marker"],"error":[1],"a11yDescribedby":[1,"a11y-describedby"],"setFocus":[64]},null,{"error":["errorWatcher"]}]]],["p-c41d9fa7.system",[[6,"stzh-checkboxgroup",{"localization":[16],"disabled":[516],"name":[513],"legend":[1],"hideLegend":[516,"hide-legend"],"invalid":[516],"showMarker":[516,"show-marker"],"value":[1025],"direction":[513],"description":[1],"descriptionLong":[1,"description-long"],"error":[1],"checkedCheckbox":[16],"preventUpdateProperties":[1,"prevent-update-properties"]},[[0,"stzhChange","onChange"]],{"name":["watchName"],"disabled":["watchDisabled"],"invalid":["watchInvalid"],"showMarker":["watchShowMarker"],"value":["watchValue"],"error":["errorWatcher"],"preventUpdateProperties":["preventUpdatePropertiesWatcher"]}]]],["p-e670eba0.system",[[6,"stzh-dialog",{"localization":[16],"closeOnEscapeKey":[4,"close-on-escape-key"],"closeOnBackdropClick":[4,"close-on-backdrop-click"],"open":[1028],"stay":[4],"size":[513],"hideClose":[4,"hide-close"],"heading":[1],"a11yRole":[1,"a11y-role"],"a11yLabel":[1,"a11y-label"],"closeAnalyticsId":[1,"close-analytics-id"],"show":[64],"hide":[64]},[[6,"click","handleOutsideClick"],[4,"keydown","handleKeydown"],[4,"click","handleOpenTriggerClick"]]]]],["p-d9984b93.system",[[2,"stzh-progressbar",{"localization":[16],"data":[1],"index":[2],"steps":[2],"stepsSmall":[2,"steps-small"],"stepsMedium":[2,"steps-medium"],"stepsLarge":[2,"steps-large"],"stepsUltra":[2,"steps-ultra"],"currentSteps":[32]},null,{"data":["dataWatcher"]}]]],["p-df322682.system",[[6,"stzh-toggle",{"localization":[16],"disabled":[516],"name":[513],"value":[1025],"invalid":[516],"required":[516],"showMarker":[516,"show-marker"],"checked":[1540],"label":[1],"labelPosition":[513,"label-position"],"description":[1],"descriptionLong":[1,"description-long"],"error":[1],"a11yDescribedby":[1,"a11y-describedby"],"setFocus":[64]},null,{"error":["errorWatcher"]}]]],["p-88cf07c8.system",[[6,"stzh-fieldset",{"legend":[1],"hideLegend":[4,"hide-legend"],"legendLevel":[1,"legend-level"],"legendCurve":[1,"legend-curve"]}]]],["p-6e979c9c.system",[[6,"stzh-imagecomparison",{"localization":[16],"hintLeft":[1,"hint-left"],"hintRight":[1,"hint-right"],"value":[1026],"label":[1],"a11yDescribedby":[1,"a11y-describedby"]}]]],["p-ecd0eee1.system",[[0,"stzh-olmap",{"localization":[16],"hostname":[1],"scaleControl":[4,"scale-control"],"layerControl":[4,"layer-control"],"printControl":[4,"print-control"],"locationControl":[4,"location-control"],"layer":[1025],"zoom":[2],"zoomLocation":[2,"zoom-location"],"center":[1],"centerMarker":[4,"center-marker"],"pinchRotateThreshold":[2,"pinch-rotate-threshold"],"resolutions":[1],"layers":[1],"getMap":[64],"addIconMarker":[64],"removeIconMarker":[64],"setIconMarkerActive":[64],"setIconMarkerInactive":[64],"enableLocationTracking":[64],"disableLocationTracking":[64],"getDistance":[64]},[[8,"load","handleLoad"],[8,"deviceorientation","handleLoad"],[8,"pageshow","handleLoad"]],{"layers":["layersWatcher"],"resolutions":["resolutionsWatcher"],"zoom":["zoomWatcher"],"scaleControl":["scaleControlWatcher"],"printControl":["printControlWatcher"],"layerControl":["layerControlWatcher"],"locationControl":["locationControlWatcher"],"layer":["layerWatcher"],"center":["centerWatcher"],"centerMarker":["centerMarkerWatcher"]}]]],["p-10b21279.system",[[6,"stzh-vbz-carousel",{"autoplayTimeout":[2,"autoplay-timeout"]}]]],["p-9bfe7d0d.system",[[1,"stzh-accordion",{"collapsible":[4],"multiselectable":[4],"setItemFocus":[64]},[[0,"stzhOpen","openListener"]]]]],["p-5e861cb6.system",[[6,"stzh-actions",{"variant":[513],"withBorder":[516,"with-border"]}]]],["p-0c2381f6.system",[[6,"stzh-appnav",{"appTitle":[1,"app-title"],"appStatus":[1,"app-status"],"appHref":[1,"app-href"],"appAnalyticsId":[1,"app-analytics-id"]}]]],["p-8c1c75a7.system",[[1,"stzh-cell",{"span":[514],"spanSmall":[514,"span-small"],"spanMedium":[514,"span-medium"],"spanLarge":[514,"span-large"],"spanUltra":[514,"span-ultra"],"align":[513],"alignSelf":[513,"align-self"]}]]],["p-b71dd6b1.system",[[0,"stzh-chart",{"chartId":[1,"chart-id"],"create":[16]},null,{"create":["createWatcher"]}]]],["p-e278cda2.system",[[6,"stzh-container",{"size":[1],"noMargin":[4,"no-margin"]}]]],["p-cfd1eed9.system",[[1,"stzh-cspace",{"removeFirstMargin":[516,"remove-first-margin"],"removeLastMargin":[516,"remove-last-margin"]}]]],["p-b193ae8e.system",[[6,"stzh-datamessagelist"]]],["p-2ff7c5db.system",[[6,"stzh-details",{"open":[1540],"show":[64],"hide":[64],"toggle":[64]},null,{"open":["openWatcher"]}]]],["p-94c8624d.system",[[2,"stzh-flyingfocus",{"style":[32],"position":[32],"enabled":[32],"visible":[32],"helper":[32],"moving":[32],"reposition":[64]},[[4,"keydown","handleKeydown"],[5,"mousedown","handleMousedown"],[6,"focus","handleFocus"],[6,"stzhFocus","handleFocus"],[6,"blur","handleBlur"],[7,"scroll","handleScrollResize"],[11,"resize","handleScrollResize"]]]]],["p-0c049996.system",[[6,"stzh-header",{"href":[1],"metabarStay":[4,"metabar-stay"],"stickyDisabled":[4,"sticky-disabled"],"preventAppnavPlaceholder":[4,"prevent-appnav-placeholder"],"logoAnalyticsId":[1,"logo-analytics-id"],"hideLogo":[32],"paddingTop":[32],"metabarTransform":[32],"sticky":[32],"stickyClosing":[32],"stickyMetabar":[32],"stickyMetabarEnd":[32],"updatePosition":[64]},[[9,"scroll","scrollListener"]]]]],["p-03eb4d68.system",[[2,"stzh-hr"]]],["p-d5d76cb3.system",[[6,"stzh-invert"]]],["p-d0e1f09b.system",[[1,"stzh-list",{"variant":[513]}]]],["p-9306653d.system",[[1,"stzh-list-item"]]],["p-3e447222.system",[[2,"stzh-loadingbar",{"percent":[2],"hidePercent":[4,"hide-percent"],"label":[1]}]]],["p-287edde1.system",[[1,"stzh-logo",{"type":[513]}]]],["p-edd46daa.system",[[6,"stzh-metanav"]]],["p-6528a6ce.system",[[6,"stzh-overlay",{"open":[1028],"stay":[4],"a11yLabel":[1,"a11y-label"],"show":[64],"hide":[64]}]]],["p-1faddb7a.system",[[6,"stzh-page-skiplinks"]]],["p-88adaf4b.system",[[6,"stzh-pagetitle"]]],["p-5d02c5e0.system",[[6,"stzh-pagetitle-hero",{"heading":[1],"leadAuthor":[1,"lead-author"],"subtitle":[1]}]]],["p-153f8f3f.system",[[1,"stzh-print"]]],["p-1a49012e.system",[[4,"stzh-readspeaker",{"href":[1],"eventId":[1,"event-id"]},[[8,"DOMContentLoaded","addClickEvents"],[8,"load","addClickEvents"]]]]],["p-0684cfac.system",[[1,"stzh-row",{"span":[514],"spanSmall":[514,"span-small"],"spanMedium":[514,"span-medium"],"spanLarge":[514,"span-large"],"spanUltra":[514,"span-ultra"],"justify":[513],"items":[513],"content":[513]}]]],["p-709514fc.system",[[1,"stzh-scrollup"]]],["p-ef393b81.system",[[6,"stzh-section",{"variant":[1]}]]],["p-53eaed5b.system",[[0,"stzh-skin-portal-mitwirken"]]],["p-9b086f39.system",[[0,"stzh-skin-storybook-preview"]]],["p-135d2e40.system",[[6,"stzh-skiplink",{"label":[1],"href":[1],"linkAccesskey":[1,"link-accesskey"],"linkTitle":[1,"link-title"],"analyticsId":[1,"analytics-id"],"focused":[32]},[[0,"focusin","focusinHandler"],[0,"focusout","focusoutHandler"]]]]],["p-e61f6afc.system",[[1,"stzh-space",{"curve":[513],"size":[513],"sizeSmall":[513,"size-small"],"sizeMedium":[513,"size-medium"],"sizeLarge":[513,"size-large"],"sizeUltra":[513,"size-ultra"],"justify":[513],"items":[513],"around":[516],"border":[513]}]]],["p-1095d872.system",[[6,"stzh-sticky",{"disableStickyTop":[516,"disable-sticky-top"],"disableStickyBottom":[516,"disable-sticky-bottom"],"breakout":[516],"position":[513],"isStuckTop":[32],"isStuckBottom":[32],"hasReachedTopLimit":[32],"hasReachedBottomLimit":[32]},null,{"disableStickyTop":["disableStickyWatcher"],"disableStickyBottom":["disableStickyWatcher"],"isStuckTop":["isStuckTopWatcher"],"isStuckBottom":["isStuckBottomWatcher"],"position":["positionWatcher"]}]]],["p-3154e4da.system",[[4,"stzh-table",{"fixedLeft":[2,"fixed-left"],"fixedRight":[2,"fixed-right"],"disableMinWidth":[516,"disable-min-width"],"hasScrollLeft":[32],"hasScrollRight":[32],"isScrollable":[32],"cellsStickyLeft":[32],"cellsStickyRight":[32]},null,{"fixedLeft":["fixedCellWatcher"],"fixedRight":["fixedCellWatcher"]}]]],["p-0b8a15cc.system",[[1,"stzh-textandimage",{"floating":[516],"fullwidth":[516],"size":[513]}]]],["p-235cfc86.system",[[1,"stzh-timeline",{"foldable":[4],"collapsible":[4],"multiselectable":[4],"setItemFocus":[64],"updateSteps":[64]},[[0,"stzhOpen","openListener"]],{"foldable":["foldableWatcher"]}]]],["p-2f7cac5b.system",[[6,"stzh-visuallyhidden"]]],["p-24c0e33a.system",[[1,"stzh-vspace",{"curve":[513],"size":[513],"sizeSmall":[513,"size-small"],"sizeMedium":[513,"size-medium"],"sizeLarge":[513,"size-large"],"sizeUltra":[513,"size-ultra"],"justify":[513],"items":[513],"around":[516],"aroundTop":[516,"around-top"],"aroundBottom":[516,"around-bottom"],"border":[513]}]]],["p-79eb298e.system",[[6,"stzh-chip-select",{"localization":[16],"data":[1],"name":[513],"label":[1],"value":[1],"description":[1],"descriptionLong":[1,"description-long"],"error":[1],"invalid":[516],"required":[516],"disabled":[516],"a11yDescribedby":[1,"a11y-describedby"],"activeFocusOptionIndex":[32]},null,{"data":["dataWatcher"],"error":["errorWatcher"]}]]],["p-b47299a3.system",[[2,"stzh-pagination",{"total":[2],"name":[513],"value":[1026],"label":[1],"labelHidden":[4,"label-hidden"],"readonly":[516],"disabled":[516],"description":[1],"descriptionLong":[1,"description-long"],"error":[1],"invalid":[516],"required":[516],"showMarker":[516,"show-marker"],"size":[513],"a11yDescribedby":[1,"a11y-describedby"],"localization":[16],"prev":[64],"next":[64]}]]],["p-f8511c39.system",[[1,"stzh-toast",{"label":[1],"type":[513],"hideClose":[516,"hide-close"],"open":[516],"initialOpenAnimation":[4,"initial-open-animation"],"localization":[16],"show":[64],"hide":[64]},null,{"open":["openWatcher"]}]]],["p-1834deba.system",[[6,"stzh-ghettobox",{"hiddenTitle":[1,"hidden-title"],"mainTitle":[1,"main-title"],"description":[1],"hideClose":[4,"hide-close"],"publishDate":[1,"publish-date"],"closeTimeKey":[1,"close-time-key"],"localization":[16],"open":[32],"show":[64],"hide":[64]},null,{"publishDate":["publishDateWatcher"]}]]],["p-3a113d93.system",[[6,"stzh-iframe",{"localization":[16],"src":[1],"cookie":[1],"cookieExpires":[2,"cookie-expires"],"cookieConfirmIcon":[1,"cookie-confirm-icon"],"cookieConfirmLabel":[1,"cookie-confirm-label"],"cookieConfirmText":[1,"cookie-confirm-text"],"previewLabel":[1,"preview-label"],"previewIcon":[1,"preview-icon"],"skipPreviewIfCookieAccepted":[4,"skip-preview-if-cookie-accepted"],"skipPreview":[4,"skip-preview"],"view":[32]},null,{"src":["srcWatcher"],"view":["viewWatcher"]}]]],["p-0b4cba00.system",[[2,"stzh-share",{"localization":[16],"url":[1],"services":[1]},null,{"services":["servicesWatcher"]}]]],["p-bb2fe16f.system",[[6,"stzh-progressbar-item",{"label":[513],"disabled":[516],"first":[516],"last":[516],"passed":[516],"current":[516],"hide":[516],"dotted":[516],"step":[514],"icon":[513],"analyticsId":[1,"analytics-id"]}]]],["p-b98ad3b6.system",[[2,"stzh-vbz-linechip",{"line":[1],"active":[516],"alert":[516],"global":[516],"disabled":[516],"analyticsId":[1,"analytics-id"],"setFocus":[64]}]]],["p-b073bc4f.system",[[6,"stzh-loader",{"size":[1],"label":[1],"hideLabel":[4,"hide-label"]}]]],["p-9ba341e2.system",[[2,"stzh-calendar",{"value":[1025],"min":[1],"max":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"isDateDisabled":[16],"prevMonthAnalyticsId":[1,"prev-month-analytics-id"],"nextMonthAnalyticsId":[1,"next-month-analytics-id"],"activeFocus":[32],"focusedDay":[32],"setFocusedDay":[64],"setDate":[64]},null,{"localization":["createDateFormatters"],"value":["valueWatcher"]}]]],["p-80f1f324.system",[[1,"stzh-hspace",{"curve":[513],"size":[513],"sizeSmall":[513,"size-small"],"sizeMedium":[513,"size-medium"],"sizeLarge":[513,"size-large"],"sizeUltra":[513,"size-ultra"],"justify":[513],"items":[513],"around":[516],"aroundLeft":[516,"around-left"],"aroundRight":[516,"around-right"],"border":[513]}],[1,"stzh-show",{"mikro":[516],"small":[516],"medium":[516],"large":[516],"ultra":[516],"hideFromDate":[1,"hide-from-date"]},null,{"hideFromDate":["hideFromDateWatcher"]}]]],["p-a60e85c8.system",[[6,"stzh-carousel",{"localization":[16],"variant":[513],"disabled":[516],"noPeek":[516,"no-peek"],"slides":[2],"slidesSmall":[2,"slides-small"],"slidesMedium":[2,"slides-medium"],"slidesLarge":[2,"slides-large"],"slidesUltra":[2,"slides-ultra"],"slide":[2],"autoplay":[1028],"autoplayTimeout":[2,"autoplay-timeout"],"nonInteractive":[4,"non-interactive"],"preventMouseDrag":[4,"prevent-mouse-drag"],"preventAutoplayPause":[4,"prevent-autoplay-pause"],"preventAutoplayStop":[4,"prevent-autoplay-stop"],"tabThrough":[4,"tab-through"],"scrollTimeout":[32],"distanceQuickSwipe":[32],"distancePreventClick":[32],"autoplayRunning":[32],"autoplayDisabledByMotionMedia":[32],"autoplayDisabledByMouse":[32],"autoplayDisabledByFocus":[32],"autoplayDisabledByScroll":[32],"autoplayDisabledByDrag":[32],"dragging":[32],"scrolling":[32],"ariaLive":[32],"currentSlides":[32],"currentSwipeSlides":[32],"slideElements":[32],"previousElements":[32],"nextElements":[32],"navigationTextElements":[32],"slideTo":[64],"slideToPrevious":[64],"slideToNext":[64]},null,{"disabled":["disabledWatcher","preventMouseDragWatcher","autoplayRunningWatcher"],"preventMouseDrag":["preventMouseDragWatcher"],"autoplay":["autoplayRunningWatcher"],"autoplayDisabledByMotionMedia":["autoplayRunningWatcher"],"autoplayDisabledByMouse":["autoplayRunningWatcher"],"autoplayDisabledByFocus":["autoplayRunningWatcher"],"autoplayDisabledByScroll":["autoplayRunningWatcher"],"autoplayDisabledByDrag":["autoplayRunningWatcher"],"autoplayTimeout":["autoplayRunningWatcher"],"slideElements":["snapAlignWatcher","inertWatcher","prevNextHiddenWatcher","nextPrevDisabledWatcher"],"currentSwipeSlides":["snapAlignWatcher"],"slide":["inertWatcher","nextPrevDisabledWatcher"],"variant":["inertWatcher","prevNextNavigationWatcher"],"currentSlides":["inertWatcher","prevNextHiddenWatcher","nextPrevDisabledWatcher"],"tabThrough":["inertWatcher","prevNextNavigationWatcher"],"nextElements":["prevNextNavigationWatcher","prevNextHiddenWatcher","nextPrevDisabledWatcher","nextElementsWatcher"],"previousElements":["prevNextNavigationWatcher","prevNextHiddenWatcher","nextPrevDisabledWatcher","previousElementsWatcher"],"navigationTextElements":["prevNextHiddenWatcher"]}]]],["p-2547ec12.system",[[6,"stzh-text",{"font":[1],"curve":[513],"lead":[516],"size":[1],"sizeSmall":[1,"size-small"],"sizeMedium":[1,"size-medium"],"sizeLarge":[1,"size-large"],"sizeUltra":[1,"size-ultra"]}]]],["p-ff356dc8.system",[[6,"stzh-datepicker",{"calendarMin":[1,"calendar-min"],"calendarMax":[1,"calendar-max"],"calendarIsDateDisabled":[16],"name":[513],"value":[1025],"label":[1],"labelHidden":[4,"label-hidden"],"readonly":[516],"disabled":[516],"description":[1],"descriptionLong":[1,"description-long"],"error":[1],"invalid":[516],"required":[516],"showMarker":[516,"show-marker"],"size":[513],"inline":[4],"dateAdapter":[16],"localization":[16],"buttonLabel":[32],"setDate":[64],"getPopover":[64]},null,{"localization":["createDateFormatters"],"value":["valueWatcher"]}],[6,"stzh-radio",{"localization":[16],"disabled":[516],"name":[513],"value":[1025],"invalid":[516],"required":[516],"showMarker":[516,"show-marker"],"checked":[1540],"label":[1],"description":[1],"descriptionLong":[1,"description-long"],"error":[1],"a11yDescribedby":[1,"a11y-describedby"],"setFocus":[64]},null,{"error":["errorWatcher"]}],[6,"stzh-radiogroup",{"localization":[16],"disabled":[516],"name":[513],"legend":[1],"hideLegend":[516,"hide-legend"],"invalid":[516],"required":[516],"showMarker":[516,"show-marker"],"value":[1025],"direction":[513],"description":[1],"descriptionLong":[1,"description-long"],"error":[1],"checkedRadio":[16],"preventUpdateProperties":[1,"prevent-update-properties"]},[[0,"stzhChange","onChange"]],{"name":["watchName"],"disabled":["watchDisabled"],"invalid":["watchInvalid"],"required":["watchRequired"],"value":["watchValue"],"error":["errorWatcher"],"preventUpdateProperties":["preventUpdatePropertiesWatcher"]}]]],["p-ab5cfffa.system",[[6,"stzh-heading",{"level":[513],"curve":[513],"withBorder":[516,"with-border"]}]]],["p-a12c6ca5.system",[[6,"stzh-buttongroup"]]],["p-61de025a.system",[[0,"stzh-icon-sprite"]]],["p-2a3fdd90.system",[[6,"stzh-figure",{"caption":[1],"copyright":[1],"counter":[1],"heading":[1],"fullwidth":[516]}],[6,"stzh-ratio",{"ratio":[1],"ratioSmall":[1,"ratio-small"],"ratioMedium":[1,"ratio-medium"],"ratioLarge":[1,"ratio-large"],"ratioUltra":[1,"ratio-ultra"],"portrait":[516],"fit":[513]}]]],["p-9d0fedfe.system",[[6,"stzh-button",{"localization":[16],"badge":[1],"badgeType":[513,"badge-type"],"badgePosition":[513,"badge-position"],"badgeEmpty":[516,"badge-empty"],"fullwidth":[516],"rounded":[516],"floating":[516],"size":[513],"textAlign":[513,"text-align"],"variant":[513],"icon":[1],"iconPosition":[513,"icon-position"],"checked":[1540],"name":[513],"value":[1025],"href":[1],"rel":[1],"target":[1],"download":[1],"type":[1],"disabled":[516],"active":[516],"label":[1],"effect":[1],"iconOnly":[516,"icon-only"],"linkAccesskey":[1,"link-accesskey"],"a11yLabel":[1,"a11y-label"],"a11yDescribedby":[1,"a11y-describedby"],"a11yExpanded":[516,"a11y-expanded"],"a11yDisabled":[516,"a11y-disabled"],"a11yControls":[1,"a11y-controls"],"a11yTabindex":[1,"a11y-tabindex"],"analyticsId":[1,"analytics-id"],"setFocus":[64]}],[2,"stzh-badge",{"label":[1],"type":[513]}],[2,"stzh-icon",{"name":[1],"a11yTitle":[1,"a11y-title"]}]]],["p-ff1d24e2.system",[[6,"stzh-popover",{"open":[1540],"placement":[513],"variant":[513],"skidding":[2],"distance":[2],"label":[1],"strategy":[1],"localization":[16],"computedPlacement":[32],"show":[64],"hide":[64],"toggle":[64],"update":[64]},[[6,"click","handleOutsideClick"]],{"open":["openWatcher"],"distance":["distanceWatcher"]}]]],["p-a0b350c2.system",[[6,"stzh-input",{"localization":[16],"multiline":[4],"rows":[2],"type":[1],"step":[2],"min":[2],"max":[2],"showSpin":[516,"show-spin"],"readonly":[516],"disabled":[516],"clearable":[516],"showMarker":[516,"show-marker"],"minlength":[2],"maxlength":[2],"name":[513],"value":[1025],"description":[1],"descriptionLong":[1,"description-long"],"error":[1],"invalid":[516],"required":[516],"inputmode":[1],"autocomplete":[1],"noAutocomplete":[4,"no-autocomplete"],"label":[1],"labelHidden":[4,"label-hidden"],"size":[513],"a11yDescribedby":[1,"a11y-describedby"],"filled":[32],"setFocus":[64]},null,{"value":["valueWatcher"],"error":["errorWatcher"],"type":["typeWatcher"]}]]],["p-8f98fc45.system",[[6,"stzh-datalist",{"direction":[513],"directionSmall":[513,"direction-small"],"directionMedium":[513,"direction-medium"],"directionLarge":[513,"direction-large"],"directionUltra":[513,"direction-ultra"],"hideBorder":[516,"hide-border"],"disableLabelMinWidth":[516,"disable-label-min-width"],"currentDirection":[513,"current-direction"],"items":[1]},null,{"hideBorder":["hideBorderWatcher"],"direction":["directionWatcher"],"directionSmall":["directionWatcher"],"directionMedium":["directionWatcher"],"directionLarge":["directionWatcher"],"directionUltra":["directionWatcher"],"currentDirection":["currentDirectionWatcher"],"items":["itemsWatcher"]}],[6,"stzh-datalist-item",{"localization":[16],"direction":[513],"href":[513],"rel":[1],"target":[1],"download":[1],"leadingIcon":[1,"leading-icon"],"icon":[1],"iconLabel":[1,"icon-label"],"iconTooltip":[1,"icon-tooltip"],"label":[1],"value":[1],"meta":[1],"statusLabel":[1,"status-label"],"statusType":[1,"status-type"],"hideBorder":[516,"hide-border"],"a11yExpanded":[516,"a11y-expanded"],"a11yControls":[1,"a11y-controls"],"external":[32]},null,{"rel":["externalWatcher"]}]]],["p-509f90d0.system",[[6,"stzh-chip",{"label":[1],"icon":[1],"href":[1],"target":[1],"nonInteractive":[516,"non-interactive"],"removable":[516],"variant":[513],"size":[513],"type":[513],"counter":[1],"removeLabel":[1,"remove-label"],"active":[516],"disabled":[516],"a11yTabindex":[1,"a11y-tabindex"],"a11yLabel":[1,"a11y-label"],"a11yDescribedby":[1,"a11y-describedby"],"analyticsId":[1,"analytics-id"],"removeAnalyticsId":[1,"remove-analytics-id"],"setFocus":[64]}],[4,"stzh-clamp",{"localization":[16],"lines":[2],"linesSmall":[2,"lines-small"],"linesMedium":[2,"lines-medium"],"linesLarge":[2,"lines-large"],"linesUltra":[2,"lines-ultra"],"showExpandLink":[4,"show-expand-link"],"expanded":[1540],"clamped":[1540],"update":[64]}]]],["p-97704eb0.system",[[4,"stzh-dropdown",{"options":[1],"optgroups":[1],"items":[1],"searchField":[1,"search-field"],"multiple":[516],"inline":[516],"maxOptions":[2,"max-options"],"searchConjunction":[1,"search-conjunction"],"allowEmptyOption":[4,"allow-empty-option"],"openOnFocus":[4,"open-on-focus"],"closeAfterSelect":[4,"close-after-select"],"load":[16],"minCharacters":[2,"min-characters"],"loadThrottle":[2,"load-throttle"],"preload":[8],"labelField":[1,"label-field"],"valueField":[1,"value-field"],"optgroupField":[1,"optgroup-field"],"optgroupLabelField":[1,"optgroup-label-field"],"optgroupValueField":[1,"optgroup-value-field"],"lockOptgroupOrder":[4,"lock-optgroup-order"],"name":[513],"open":[4],"isOpen":[516,"is-open"],"variant":[513],"size":[513],"disabled":[516],"popoverPlacement":[513,"popover-placement"],"label":[1],"labelHidden":[4,"label-hidden"],"icon":[1],"iconAngle":[1,"icon-angle"],"noSearch":[4,"no-search"],"noBackspaceDelete":[4,"no-backspace-delete"],"invalid":[516],"required":[516],"showMarker":[516,"show-marker"],"description":[1],"descriptionLong":[1,"description-long"],"error":[1],"localization":[16],"a11yDescribedby":[1,"a11y-describedby"],"getValue":[64],"setValue":[64],"setFocus":[64],"resetLoadedSearches":[64],"getLoadedSearches":[64],"getItems":[64],"loadItems":[64],"show":[64],"hide":[64]},null,{"options":["optionsWatcher"],"items":["itemsWatcher"],"searchField":["searchFieldWatcher"],"optgroups":["optgroupsWatcher"],"error":["errorWatcher"]}]]],["p-188dd49d.system",[[6,"stzh-menu-item",{"badge":[1],"badgeType":[513,"badge-type"],"badgeEmpty":[516,"badge-empty"],"disabled":[516],"active":[516],"icon":[1],"label":[1],"href":[1],"target":[1],"a11yLabel":[1,"a11y-label"],"analyticsId":[1,"analytics-id"],"setFocus":[64]}],[6,"stzh-menu"]]],["p-3ab3a5a7.system",[[6,"stzh-link",{"localization":[16],"icon":[1],"iconPosition":[513,"icon-position"],"size":[513],"href":[1],"rel":[1],"target":[1],"download":[1],"type":[1],"variant":[513],"fullwidth":[516],"textAlign":[513,"text-align"],"badge":[1],"badgeType":[513,"badge-type"],"badgeEmpty":[516,"badge-empty"],"badgePosition":[513,"badge-position"],"disabled":[516],"active":[516],"iconOnly":[516,"icon-only"],"label":[1],"linkAccesskey":[1,"link-accesskey"],"a11yLabel":[1,"a11y-label"],"a11yDescribedby":[1,"a11y-describedby"],"a11yExpanded":[516,"a11y-expanded"],"a11yDisabled":[516,"a11y-disabled"],"a11yControls":[1,"a11y-controls"],"a11yTabindex":[1,"a11y-tabindex"],"analyticsId":[1,"analytics-id"],"setFocus":[64]}]]],["p-42e25ae1.system",[[6,"stzh-card",{"localization":[16],"collapsed":[1540],"starred":[1540],"starrable":[516],"selectable":[516],"checked":[516],"name":[513],"href":[513],"target":[1],"value":[1025],"disabled":[516],"withArrow":[516,"with-arrow"],"heading":[1],"subtitle":[1],"headerActions":[1,"header-actions"],"footerActions":[1,"footer-actions"],"subtitleInteractive":[4,"subtitle-interactive"],"sortableDisabled":[516,"sortable-disabled"],"collapsible":[516],"hideHeaderBorder":[516,"hide-header-border"],"hideFooterBorder":[516,"hide-footer-border"],"hideElevation":[516,"hide-elevation"],"hideMovementActions":[4,"hide-movement-actions"],"analyticsId":[1,"analytics-id"]},null,{"subtitle":["subtitleWatcher"],"headerActions":["headerActionsWatcher"],"footerActions":["footerActionsWatcher"],"collapsed":["collapsedWatcher"]}],[6,"stzh-card-list",{"localization":[16],"layout":[513],"description":[1],"showToggleLink":[516,"show-toggle-link"],"sortableEnabled":[4,"sortable-enabled"],"sortableDataIdAttribute":[1,"sortable-data-id-attribute"],"allCollapsed":[32]},[[0,"stzhCollapse","collapseListener"]]],[2,"stzh-actionset",{"localization":[16],"variant":[513],"popoverButtonVariant":[513,"popover-button-variant"],"popoverButtonSize":[513,"popover-button-size"],"popoverPlacement":[513,"popover-placement"],"actions":[1],"actionsCollapsed":[32],"dynamicActions":[32],"isSmall":[32],"isMedium":[32]},null,{"actions":["actionsWatcher"]}],[6,"stzh-sortable",{"localization":[16],"disabled":[516],"dataIdAttribute":[1,"data-id-attribute"],"container":[16],"ghostClone":[16],"filterElements":[1,"filter-elements"],"toArray":[64],"sort":[64],"moveItem":[64]},null,{"disabled":["disabledWatcher"],"filterElements":["filterElementsWatcher"]}]]],["p-90a0c853.system",[[6,"stzh-richtext",{"localization":[16],"removeFirstMargin":[516,"remove-first-margin"],"removeLastMargin":[516,"remove-last-margin"],"externalLinkSelector":[1,"external-link-selector"],"externalLinkIcon":[1,"external-link-icon"]}],[2,"stzh-status",{"percent":[2],"withLoadingbar":[516,"with-loadingbar"],"label":[1],"type":[513]}]]],["p-f159a561.system",[[6,"stzh-tooltip",{"open":[1028],"label":[1],"content":[1],"placement":[1],"strategy":[1],"skidding":[2],"distance":[2],"interactive":[4],"trigger":[1],"localization":[16],"computedPlacement":[32],"show":[64],"hide":[64],"toggle":[64],"update":[64]},[[6,"click","handleDocumentClick"]],{"open":["openWatcher"],"trigger":["triggerWatcher"]}]]]]'),e)}))}}}));
2
- //# sourceMappingURL=p-bde8bb45.system.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhToastbarCss","KEY_PREFIX_CLOSED","StzhToastbar","exports","this","_initialToasts","handleSlotchange","_this","toastsAppended","hideOverflowingItems","class_1","prototype","toast","label","_a","_b","type","link","document","createElement","hidden","role","initialOpenAnimation","slot","size","appendChild","element","initialToastsWatcher","newValue","JSON","parse","toastAppended","getAttribute","setAttribute","addEventListener","remove","timeoutStarted_1","Date","getTime","restTime_1","hideAfter","currentTimeout_1","window","setTimeout","hide","clearTimeout","timePassed","Array","from","children","forEach","childCount","length","splice","max","componentWillLoad","initialToasts","componentDidLoad","data","__awaiter","cookie","alreadyClosedBefore","Cookie","get","concat","HTMLElement","generatedLink","Object","assign","sent","set","expires","cookieExpires","render","classes","h","Host","class","onSlotchange"],"sources":["src/components/stzh-toastbar/stzh-toastbar.scss?tag=stzh-toastbar&encapsulation=shadow","src/components/stzh-toastbar/stzh-toastbar.tsx"],"sourcesContent":[":host {\n @include spaceCurve('bottom', 'regular');\n z-index: $zIndexOverlay;\n position: fixed;\n pointer-events: none;\n bottom: var(--stzh-header-sticky-appnav-height, 0);\n left: $containerMargin;\n right: $containerMargin;\n\n @include mq($from: small) {\n left: $containerMarginSmall;\n right: auto;\n max-width: 560px;\n max-width: min(560px, calc(100% - (#{$containerMarginSmall} * 2)));\n }\n\n @include mq($from: medium) {\n left: $containerMarginMedium;\n // max-width: calc(100% - (#{$containerMarginMedium} * 2));\n }\n\n @include mq($from: large) {\n left: $containerMarginLarge;\n // max-width: calc(100% - (#{$containerMarginLarge} * 2));\n }\n\n ::slotted(*:not([hidden]):not([slot])) {\n @include spaceCurve('margin-bottom', 'regular');\n }\n}\n\n.stzh-toastbar {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n\n @include mq($from: small) {\n align-items: flex-start;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n StzhToastbarInitialToast,\n StzhToastType,\n} from \"../../index\";\n\nimport Cookie from \"js-cookie\";\n\nconst KEY_PREFIX_CLOSED = \"stzh-components-toastbar-closed\";\n\n/**\n * @slot - Slot for stzh-toast elements\n */\n@Component({\n tag: \"stzh-toastbar\",\n styleUrl: \"stzh-toastbar.scss\",\n shadow: true\n})\nexport class StzhToastbar {\n /**\n * Time after toasts are hidden (in seconds).\n * Toasts with type `error` will stay, until the user closes them manually.\n */\n @Prop() hideAfter: number = 30;\n\n /**\n * Maximum of toasts allowed to be shown.\n * If more are created, oldest will be hidden, even if timeout not ended yet or toast type is `error`.\n */\n @Prop() max: number = 5;\n\n /**\n * Initial toasts.\n *\n * Array of objects that at least includes `label` and optionally `type`, `link` (object with `href` and `label`) `cookie` and `cookieExpires`:\n * `[{\"label\": \"Lorem ipsum\", \"link\": { \"label\": \"More info\", \"href\": \"https://example.com\" }, \"cookie\": \"cookie-banner\", \"cookieExpires\": 365 }]`\n *\n * If `cookie` exists in an object, it will check for that cookie name first (prefixed with `stzh-components-toastbar-closed-`) and only show if cookie doesn't exist.\n * `cookieExpires` sets the cookie lifetime (default 365 days, set 0 for session cookie).\n */\n @Prop() initialToasts: StzhToastbarInitialToast[] | string = [];\n private _initialToasts: StzhToastbarInitialToast[] = [];\n\n @Element() element: HTMLStzhToastbarElement;\n\n /** Create new toast. */\n @Method()\n async toast(\n label: string,\n { type, link }: { type?: StzhToastType, link?: HTMLStzhLinkElement } = { type: \"info\" }\n ): Promise<HTMLStzhToastElement> {\n const toast = document.createElement(\"stzh-toast\");\n toast.hidden = true;\n toast.label = label;\n toast.role = \"alert\";\n toast.type = type || \"info\";\n toast.initialOpenAnimation = true;\n\n if (link) {\n link.slot = \"link\";\n link.size = \"small\";\n toast.appendChild(link);\n }\n\n this.element.appendChild(toast);\n\n return toast;\n }\n\n @Watch(\"initialToasts\")\n initialToastsWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._initialToasts = JSON.parse(newValue);\n } else {\n this._initialToasts = newValue;\n }\n }\n\n private toastAppended(toast: HTMLStzhToastElement) {\n if (toast.getAttribute('data-stzh-toastbar-managed')) {\n return;\n }\n\n toast.setAttribute('data-stzh-toastbar-managed', '');\n\n toast.addEventListener(\"stzhClosed\", () => {\n toast.remove();\n });\n\n if (toast.type !== \"error\") {\n let timeoutStarted = new Date().getTime();\n let restTime = this.hideAfter * 1000;\n let currentTimeout = window.setTimeout(() => {\n toast.hide();\n }, restTime);\n\n toast.addEventListener(\"pointerenter\", () => {\n if (currentTimeout) {\n window.clearTimeout(currentTimeout);\n const timePassed = new Date().getTime() - timeoutStarted;\n restTime = restTime - timePassed;\n }\n });\n\n toast.addEventListener(\"pointerleave\", () => {\n timeoutStarted = new Date().getTime();\n currentTimeout = window.setTimeout(() => {\n toast.hide();\n }, restTime);\n });\n }\n }\n\n private toastsAppended() {\n Array.from(this.element.children).forEach((toast: HTMLStzhToastElement) => {\n this.toastAppended(toast);\n });\n }\n\n private hideOverflowingItems() {\n const childCount = this.element.children.length;\n\n Array.from(this.element.children)\n .splice(0, childCount - this.max)\n .forEach((toast: HTMLStzhToastElement) => {\n toast.hide();\n });\n }\n\n private handleSlotchange = () => {\n this.toastsAppended();\n this.hideOverflowingItems();\n }\n\n componentWillLoad() {\n this.initialToastsWatcher(this.initialToasts);\n }\n\n componentDidLoad() {\n this._initialToasts.forEach(async (data) => {\n if (data.cookie) {\n const alreadyClosedBefore = Cookie.get(`${KEY_PREFIX_CLOSED}-${data.cookie}`);\n\n if (alreadyClosedBefore) {\n return;\n }\n }\n\n let link = data.link;\n\n if (!(link instanceof HTMLElement)) {\n const generatedLink = document.createElement(\"stzh-link\");\n generatedLink.slot = \"link\";\n generatedLink.size = \"small\";\n\n Object.assign(generatedLink, data.link);\n link = generatedLink;\n }\n\n const toast = await this.toast(data.label, {\n type: data.type,\n link: link as HTMLStzhLinkElement\n })\n\n if (data.cookie) {\n toast.addEventListener(\"stzhClosed\", () => {\n Cookie.set(`${KEY_PREFIX_CLOSED}-${data.cookie}`, '1', {\n expires: typeof data.cookieExpires !== \"undefined\" ? data.cookieExpires : 365\n });\n });\n }\n })\n }\n\n render() {\n const classes = {\n \"stzh-toastbar\": true,\n };\n\n return (\n <Host>\n <div class={classes}>\n <slot onSlotchange={this.handleSlotchange}></slot>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"4rDAAA,IAAMA,EAAkB,+zDCiBxB,IAAMC,EAAoB,kC,IAUbC,EAAYC,EAAA,2B,mCAuBfC,KAAAC,eAA6C,GAwF7CD,KAAAE,iBAAmB,WACzBC,EAAKC,iBACLD,EAAKE,sB,iBA5GqB,G,SAMN,E,mBAWuC,E,CAOvDC,EAAAC,UAAAC,MAAN,SACEC,EACAC,G,IAAAC,EAAAD,SAAA,EAAuE,CAAEE,KAAM,QAAQF,EAArFE,EAAID,EAAAC,KAAEC,EAAIF,EAAAE,K,2FAENL,EAAQM,SAASC,cAAc,cACrCP,EAAMQ,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,EAAa/C,KAAKkD,KAC5BJ,SAAQ,SAACtC,GACRA,EAAMgC,M,KASZlC,EAAAC,UAAA4C,kBAAA,WACEnD,KAAKuB,qBAAqBvB,KAAKoD,c,EAGjC9C,EAAAC,UAAA8C,iBAAA,eAAAlD,EAAAH,KACEA,KAAKC,eAAe6C,SAAQ,SAAOQ,GAAI,OAAAC,UAAApD,OAAA,qB,wEACrC,GAAImD,EAAKE,OAAQ,CACTC,EAAsBC,EAAOC,IAAI,GAAAC,OAAG/D,EAAiB,KAAA+D,OAAIN,EAAKE,SAEpE,GAAIC,EAAqB,CACvB,S,EAIA5C,EAAOyC,EAAKzC,KAEhB,KAAMA,aAAgBgD,aAAc,CAC5BC,EAAgBhD,SAASC,cAAc,aAC7C+C,EAAc3C,KAAO,OACrB2C,EAAc1C,KAAO,QAErB2C,OAAOC,OAAOF,EAAeR,EAAKzC,MAClCA,EAAOiD,C,CAGK,SAAM9D,KAAKQ,MAAM8C,EAAK7C,MAAO,CACzCG,KAAM0C,EAAK1C,KACXC,KAAMA,K,OAFFL,EAAQE,EAAAuD,OAKd,GAAIX,EAAKE,OAAQ,CACfhD,EAAMsB,iBAAiB,cAAc,WACnC4B,EAAOQ,IAAI,GAAAN,OAAG/D,EAAiB,KAAA+D,OAAIN,EAAKE,QAAU,IAAK,CACrDW,eAAgBb,EAAKc,gBAAkB,YAAcd,EAAKc,cAAgB,K,yBAOpF9D,EAAAC,UAAA8D,OAAA,WACE,IAAMC,EAAU,CACd,gBAAiB,MAGnB,OACEC,EAACC,EAAI,KACHD,EAAA,OAAKE,MAAOH,GACVC,EAAA,QAAMG,aAAc1E,KAAKE,oB,oQApKV,I"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["tc","translation","count","parts","split","part","trim","length","replace","toString","stzhAppointmentsCss","StzhAppointments","exports","this","showMoreLink","moreItemsLeft","showCalendar","showSort","showSortStart","showSortPlace","showAppointmentsTitle","allAppointsmentOnSameDay","sortOptions","isDateDisabled","date","dateHasAppointment","_this","_appointments","find","appointment","start","getFullYear","getMonth","getDate","onNextActiveDateClick","__awaiter","nextDate","currentDate","datepickerElement","getPopover","popover","_a","sent","hide","onMoreClick","showItems","stepItems","radio","inputElement","querySelector","setFocus","onDropdownChange","event","target","getValue","sortBy","onDatepickerChange","detail","component","valueAsDate","onRadioChange","value","stzhChange","emit","class_1","prototype","currentDateWatcher","newValue","_currentDate","dateByValue","earliestDate","setValueToFirstAppointmentOfCurrentDate","parseISODate","sortByWatcher","valueWatcher","updateDateByValue","appointmentsWatcher","JSON","parse","forEach","Date","end","sort","a","b","latestDate","firstDate_1","map","every","concat","getCurrentDateAppointments","indexOfLastCurrentDayDate","appointmentsCurrentDate","filter","index","dateIsInCurrentDay","appointments","disabled","componentWillLoad","localization","window","stzhComponents","utils","fetchTranslations","element","_b","dateAdapter","createFormatParseAdapter","$formats","$globals","componentWillRender","appointmentsShown","slice","format","item","pos","self","indexOf","place","push","text","sortByTime","sortByPlace","_sortBy","componentDidRender","setDate","datepickerElementMedium","render","classes","h","Host","class","name","font","calendarTitle","ref","el","onStzhChange","label","datepickerLabel","calendarIsDateDisabled","calendarMin","printISODate","calendarMax","slot","onClick","size","nextDayWithAppointments","inline","appointmentsTitle","variant","items","options","legend","inputLegend","preventUpdateProperties","formatSpan","caption","moreTextItems"],"sources":["src/utils/translation-utils.ts","src/components/stzh-appointments/stzh-appointments.scss?tag=stzh-appointments&encapsulation=scoped","src/components/stzh-appointments/stzh-appointments.tsx"],"sourcesContent":["import {\n StzhDateFormat,\n StzhDateParse\n} from \"./date-adapter\";\n\nexport type StzhLocaleFormats = {\n datetime?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n datetimeLong?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n datetimeInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n date?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n dateLong?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n dateInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n time?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n timeInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n}\n\ntype MonthsNames = [string, string, string, string, string, string, string, string, string, string, string, string]\ntype DayNames = [string, string, string, string, string, string, string]\n\nexport type StzhLocaleGlobals = {\n dateRange: string,\n timeRange: string,\n externalLinkLabel: string\n downloadLinkLabel: string\n requiredFieldMarker: string\n requiredFieldText: string\n optionalFieldMarker: string\n optionalFieldText: string\n invalidFieldText: string\n clearButtonLabel: string\n moreInfoButtonLabel: string\n dayNames: DayNames\n monthNames: MonthsNames\n monthNamesShort: MonthsNames\n}\n\nexport type StzhLocaleComponent = {\n $locale: \"de\" | \"en\",\n $formats: StzhLocaleFormats,\n $globals: StzhLocaleGlobals\n}\n\nexport function tc(translation: string, count: number): string {\n if (!translation) {\n return \"\";\n }\n\n const parts = translation.split('|');\n let part = parts[0].trim();\n\n if (parts.length === 3 && count === 1) {\n part = parts[1].trim();\n } else if (parts.length === 3 && count > 1) {\n part = parts[2].trim();\n }\n\n if (parts.length === 2 && count !== 1) {\n part = parts[1].trim();\n }\n\n return part.replace(/\\{n\\}/ig, count.toString());\n}\n",".stzh-appointments {\n &__wrapper {\n display: flex;\n flex-direction: column;\n\n @include mq($from: medium) {\n flex-direction: row;\n }\n }\n\n &__calendar-wrapper {\n display: flex;\n flex-direction: column;\n\n @include mq($from: medium) {\n margin-right: space('large');\n }\n }\n\n &__appointments-wrapper {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n }\n\n &__calendar-title-wrapper,\n &__appointments-title-wrapper {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n margin-bottom: space('xsmall');\n\n @include mq($from: medium) {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n margin-bottom: space('medium');\n height: space('xxlarge');\n }\n }\n\n &__calendar-title,\n &__appointments-title {\n display: flex;\n }\n\n &__calendar-icon,\n &__appointments-icon {\n margin-right: space('xsmall');\n display: none;\n\n @include mq($from: medium) {\n display: inline-flex;\n }\n }\n\n &__calendar-content-medium,\n &__appointments-content {\n background-color: $colorWhite;\n border: 1px solid $colorGrey13;\n border-radius: 2px;\n }\n\n &__calendar-content {\n @include mq($from: medium) {\n display: none;\n }\n }\n\n &__calendar-content-medium {\n display: none;\n padding: space('medium');\n\n @include mq($from: medium) {\n display: block;\n }\n }\n\n &__appointments-content {\n padding: space('xlarge');\n flex-grow: 1;\n }\n\n &__more-link {\n margin-top: space('medium');\n }\n\n &--has-calendar &__appointments-wrapper {\n margin-top: space('large');\n\n @include mq($from: medium) {\n margin-top: 0;\n }\n }\n}\n","import {\n Component,\n Host,\n Element,\n Prop,\n h,\n Watch,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhAppointmentsChangeEvent,\n StzhRadioChangeEvent,\n StzhDatepickerChangeEvent,\n StzhDropdownChangeEvent,\n} from \"../../index\";\n\nimport { tc } from \"../../utils/translation-utils\";\n\nimport { printISODate, parseISODate } from \"../../utils/date-utils\";\nimport { StzhLocaleAdapter } from \"../../utils/date-adapter\";\n\nimport { StzhAppointmentsLocalizedText } from \"./stzh-appointments.localization\"\n\n/**\n * @slot - Slot for any content\n */\n@Component({\n tag: \"stzh-appointments\",\n styleUrl: \"stzh-appointments.scss\",\n scoped: true\n})\nexport class StzhAppointments {\n /** Translation strings */\n @Prop() localization: StzhAppointmentsLocalizedText;\n\n /** Sort by */\n @Prop({ mutable: true }) sortBy: \"start\" | \"place\" = \"start\";\n private _sortBy: \"start\" | \"place\";\n\n /** Initial selected values */\n @Prop() appointments: any[] | string = [];\n private _appointments: any[];\n private appointmentsShown: any[];\n\n /** Current selected date (if undefined, earliest appointment date in list is taken or current selected one by value) */\n @Prop({ mutable: true }) currentDate: Date | string;\n private _currentDate: Date;\n\n /* Selected appointment by value */\n @Prop({ mutable: true }) value: string = \"\";\n\n /* Name of radiogroup form element */\n @Prop({ reflect: true }) name: string = \"appointment\";\n\n /** Nr of items shown */\n @Prop({ mutable: true }) showItems: number = 5;\n\n /** Nr of items shown when more link is clicked */\n @Prop() stepItems: number = 5;\n\n /** Overwrite default calendar title */\n @Prop() calendarTitle = \"\";\n\n /** Overwrite default appointments title */\n @Prop() appointmentsTitle = \"\";\n\n /**\n * Date adapter, for custom parsing/formatting.\n * Must be object with a `parse` function which accepts a `string` and returns a `Date`,\n * and a `format` function which accepts a `Date` and returns a `string`.\n */\n @Prop() dateAdapter: StzhLocaleAdapter;\n\n @Element() element: HTMLStzhAppointmentsElement;\n\n /** Appointments change event */\n @Event() stzhChange: EventEmitter<StzhAppointmentsChangeEvent>;\n\n @Watch(\"currentDate\")\n currentDateWatcher(newValue: Date | string) {\n if (!newValue) {\n this._currentDate = this.dateByValue || this.earliestDate;\n\n if (!this.dateByValue) {\n this.setValueToFirstAppointmentOfCurrentDate();\n }\n } else if (typeof newValue === \"string\") {\n this._currentDate = parseISODate(newValue);\n this.setValueToFirstAppointmentOfCurrentDate();\n } else {\n this._currentDate = newValue;\n this.setValueToFirstAppointmentOfCurrentDate();\n }\n }\n\n @Watch(\"sortBy\")\n sortByWatcher() {\n this.setValueToFirstAppointmentOfCurrentDate();\n }\n\n @Watch(\"value\")\n valueWatcher() {\n this.updateDateByValue();\n // update current date if user has not choosen one\n this.currentDateWatcher(this.currentDate);\n }\n\n @Watch(\"appointments\")\n appointmentsWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._appointments = JSON.parse(newValue);\n } else {\n this._appointments = newValue;\n }\n\n // convert start and end field to date\n this._appointments.forEach(appointment => {\n appointment.start = new Date(appointment.start);\n appointment.end = new Date(appointment.end);\n })\n\n if (this._appointments.length > 0) {\n // sort with start field and find earliest and latest date\n this._appointments.sort((a, b) => a['start'] > b['start'] ? 1 : -1);\n this.earliestDate = this._appointments[0].start;\n this.latestDate = this._appointments[this._appointments.length - 1].start;\n this.updateDateByValue();\n }\n\n // determine whether all appointments are from the same day\n if (this._appointments.length > 1) {\n const firstDate = this._appointments[0].start;\n this.allAppointsmentOnSameDay = this._appointments\n .map(appointment => appointment.start)\n .every(date => `${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`\n === `${firstDate.getFullYear()}-${firstDate.getMonth()}-${firstDate.getDate()}`);\n }\n\n // update flags\n this.showCalendar = !this.allAppointsmentOnSameDay;\n this.showAppointmentsTitle = this._appointments.length > 1;\n\n // update current date if user has not choosen one\n this.currentDateWatcher(this.currentDate);\n }\n\n private dateByValue: Date;\n private earliestDate: Date;\n private latestDate: Date;\n private nextDate: Date;\n\n private showMoreLink: boolean = false;\n private moreItemsLeft: number = 0;\n private showCalendar: boolean = false;\n private showSort: boolean = false;\n private showSortStart: boolean = false;\n private showSortPlace: boolean = false;\n private showAppointmentsTitle: boolean = false;\n private allAppointsmentOnSameDay: boolean = true;\n private sortOptions = [];\n\n private inputElement: HTMLStzhRadiogroupElement;\n private datepickerElement: HTMLStzhDatepickerElement;\n private datepickerElementMedium: HTMLStzhDatepickerElement;\n\n private updateDateByValue() {\n this.dateByValue = this.value\n && this._appointments\n .find(appointment => appointment.value === this.value)\n .start;\n }\n\n private getCurrentDateAppointments() {\n let indexOfLastCurrentDayDate = 0;\n\n // filter to current date appointments that can be shown\n const appointmentsCurrentDate = this._appointments\n .filter((appointment, index) => {\n const dateIsInCurrentDay = appointment.start.getFullYear() === this._currentDate.getFullYear()\n && appointment.start.getMonth() === this._currentDate.getMonth()\n && appointment.start.getDate() === this._currentDate.getDate();\n\n if (dateIsInCurrentDay) {\n indexOfLastCurrentDayDate = index;\n }\n\n return dateIsInCurrentDay;\n });\n\n // find next day with dates or set to null\n if (this._appointments[indexOfLastCurrentDayDate + 1]) {\n this.nextDate = this._appointments[indexOfLastCurrentDayDate + 1].start;\n } else {\n this.nextDate = null;\n }\n\n // sort\n appointmentsCurrentDate.sort((a, b) => a[this.sortBy] > b[this.sortBy] ? 1 : -1);\n return appointmentsCurrentDate;\n }\n\n private setValueToFirstAppointmentOfCurrentDate() {\n // choose the first available appointment from current date\n const appointments = this.getCurrentDateAppointments()\n .filter(appointment => !appointment.disabled)\n\n if (appointments.length > 0) {\n this.value = appointments[0].value;\n this.stzhChange.emit({\n component: \"stzh-appointments\",\n value: this.value\n });\n }\n }\n\n private isDateDisabled = (date: Date) => {\n const dateHasAppointment: boolean = !!this._appointments.find(appointment => {\n return appointment.start.getFullYear() === date.getFullYear()\n && appointment.start.getMonth() === date.getMonth()\n && appointment.start.getDate() === date.getDate();\n });\n\n return !dateHasAppointment;\n }\n\n private onNextActiveDateClick = async () => {\n if (this.nextDate) {\n this.currentDate = this.nextDate;\n\n const popover = await this.datepickerElement.getPopover();\n\n if (popover) {\n popover.hide();\n }\n }\n }\n\n private onMoreClick = () => {\n this.showItems = this.stepItems + this.showItems;\n\n // return focus to radiogroup\n const radio = this.inputElement.querySelector('stzh-radio');\n radio.setFocus();\n }\n\n private onDropdownChange = async (event: CustomEvent<StzhDropdownChangeEvent>) => {\n const target: HTMLStzhDropdownElement = event.target as HTMLStzhDropdownElement;\n\n const sortBy = await target.getValue() as \"start\" | \"place\" | \"\";\n\n if (sortBy) {\n this.sortBy = sortBy;\n }\n }\n\n private onDatepickerChange = (event: CustomEvent<StzhDatepickerChangeEvent>) => {\n if (event.detail.component !== 'stzh-datepicker' || !event.detail.valueAsDate) {\n return;\n }\n\n this.currentDate = event.detail.valueAsDate;\n // reset number of items that should be shown\n this.showItems = this.stepItems;\n }\n\n private onRadioChange = (event: CustomEvent<StzhRadioChangeEvent>) => {\n this.value = event.detail.value;\n this.stzhChange.emit({\n component: \"stzh-appointments\",\n value: this.value\n });\n }\n\n async componentWillLoad() {\n this.appointmentsWatcher(this.appointments);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"appointments\");\n }\n\n if (!this.dateAdapter) {\n this.dateAdapter = window.stzhComponents.utils.createFormatParseAdapter(\n this.localization.$formats,\n this.localization.$globals\n );\n }\n }\n\n componentWillRender() {\n const appointments = this.getCurrentDateAppointments();\n\n // slice to max that should be visible\n this.appointmentsShown = appointments.slice(0, this.showItems);\n\n // set flags\n this.showMoreLink = this.showItems < appointments.length;\n this.moreItemsLeft = appointments.length - this.showItems;\n\n // don't show time sort when only one time in the current day\n this.showSortStart = appointments\n .map(appointment => {\n return this.dateAdapter.format(appointment.start, \"time\");\n }).filter((item, pos, self) => {\n return self.indexOf(item) == pos;\n }).length > 1;\n\n // don't show place sort when only one place in the current day\n this.showSortPlace = appointments\n .map(appointment => {\n return appointment.place;\n }).filter((item, pos, self) => {\n return self.indexOf(item) == pos;\n }).length > 1;\n\n this.sortOptions = [];\n\n if (this.showSortStart) {\n this.sortOptions.push({\n text: this.localization.sortByTime,\n value: \"start\"\n });\n }\n\n if (this.showSortPlace) {\n this.sortOptions.push({\n text: this.localization.sortByPlace,\n value: \"place\"\n });\n }\n\n this.showSort = this.appointmentsShown.length > 1;\n\n // determine sort (force alternative sorting if it makes sense)\n this._sortBy =\n (this.showSortStart && !this.showSortPlace && \"start\")\n || (!this.showSortStart && this.showSortPlace && \"place\")\n || this.sortBy;\n }\n\n componentDidRender() {\n // set datepickers values to current date\n if (this.datepickerElement) {\n this.datepickerElement.setDate(this._currentDate);\n }\n\n if (this.datepickerElementMedium) {\n this.datepickerElementMedium.setDate(this._currentDate);\n }\n }\n\n render() {\n const classes = {\n \"stzh-appointments\": true,\n \"stzh-appointments--has-calendar\": this.showCalendar,\n \"stzh-appointments--has-appointments-title\": this.showAppointmentsTitle,\n \"stzh-appointments--has-sort\": this.showSort\n };\n\n return (\n <Host>\n <div class={classes}>\n <div class=\"stzh-appointments__wrapper\">\n {this.showCalendar &&\n <div class=\"stzh-appointments__calendar-wrapper\">\n <div class=\"stzh-appointments__calendar-title-wrapper\">\n <div class=\"stzh-appointments__calendar-title\">\n <stzh-icon class=\"stzh-appointments__calendar-icon\" name=\"calendar\"></stzh-icon>\n <stzh-text font=\"heavy\">{this.calendarTitle || this.localization.calendarTitle}</stzh-text>\n </div>\n </div>\n <div class=\"stzh-appointments__calendar-content\">\n <stzh-datepicker\n ref={(el) => (this.datepickerElement = el as HTMLStzhDatepickerElement)}\n onStzhChange={this.onDatepickerChange}\n label={this.localization.datepickerLabel}\n calendarIsDateDisabled={this.isDateDisabled}\n calendarMin={printISODate(this.earliestDate)}\n calendarMax={printISODate(this.latestDate)}\n >\n <stzh-link\n slot=\"action\"\n disabled={!this.nextDate}\n onClick={this.onNextActiveDateClick}\n >\n <stzh-text size=\"milli\">\n {this.localization.nextDayWithAppointments}\n </stzh-text>\n </stzh-link>\n </stzh-datepicker>\n </div>\n <div class=\"stzh-appointments__calendar-content-medium\">\n <stzh-datepicker\n ref={(el) => (this.datepickerElementMedium = el as HTMLStzhDatepickerElement)}\n onStzhChange={this.onDatepickerChange}\n inline\n calendarIsDateDisabled={this.isDateDisabled}\n calendarMin={printISODate(this.earliestDate)}\n calendarMax={printISODate(this.latestDate)}\n >\n {this.nextDate &&\n <stzh-link\n slot=\"action\"\n onClick={this.onNextActiveDateClick}\n >\n <stzh-text size=\"milli\">\n {this.localization.nextDayWithAppointments}\n </stzh-text>\n </stzh-link>\n }\n </stzh-datepicker>\n </div>\n </div>\n }\n <div class=\"stzh-appointments__appointments-wrapper\">\n {this.showAppointmentsTitle &&\n <div class=\"stzh-appointments__appointments-title-wrapper\">\n <div class=\"stzh-appointments__appointments-title\">\n <stzh-icon class=\"stzh-appointments__appointments-icon\" name=\"clock\"></stzh-icon>\n <stzh-text font=\"heavy\">{this.appointmentsTitle || this.localization.appointmentsTitle}</stzh-text>\n </div>\n {this.showSort &&\n <div class=\"stzh-appointments__sort\">\n <stzh-dropdown\n inline\n no-search\n class=\"stzh-appointments__sort-dropdown\"\n variant=\"plain\"\n size=\"small\"\n items={[this._sortBy]}\n options={this.sortOptions}\n onStzhChange={this.onDropdownChange}\n ></stzh-dropdown>\n </div>\n }\n </div>\n }\n\n <div class=\"stzh-appointments__appointments-content\">\n <stzh-radiogroup\n ref={(el) => this.inputElement = el as HTMLStzhRadiogroupElement}\n legend={this.localization.inputLegend}\n hide-legend\n name={this.name}\n value={this.value}\n preventUpdateProperties={[\"disabled\"]}\n >\n {this.appointmentsShown.map((appointment) =>\n <stzh-radio\n onStzhChange={this.onRadioChange}\n value={appointment.value}\n disabled={typeof appointment.disabled !== \"undefined\" ? appointment.disabled : false}\n >\n <stzh-text font=\"heavy\" size=\"milli\">\n {!this.showCalendar && <span>{this.dateAdapter.format(appointment.start, \"dateLong\")},&nbsp;</span>}\n {this.dateAdapter.formatSpan(appointment.start, appointment.end, \"time\")}\n </stzh-text>\n <stzh-text size=\"milli\">{appointment.caption}</stzh-text>\n </stzh-radio>\n )}\n </stzh-radiogroup>\n\n {this.showMoreLink &&\n <stzh-link\n class=\"stzh-appointments__more-link\"\n onClick={this.onMoreClick}\n >\n <stzh-text size=\"milli\">\n {tc(this.localization.moreTextItems,\n this.moreItemsLeft > this.stepItems\n ? this.stepItems\n : this.moreItemsLeft)}\n </stzh-text>\n </stzh-link>\n }\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"+qDAkEgBA,EAAGC,EAAqBC,GACtC,IAAKD,EAAa,CAChB,MAAO,E,CAGT,IAAME,EAAQF,EAAYG,MAAM,KAChC,IAAIC,EAAOF,EAAM,GAAGG,OAEpB,GAAIH,EAAMI,SAAW,GAAKL,IAAU,EAAG,CACrCG,EAAOF,EAAM,GAAGG,M,MACX,GAAIH,EAAMI,SAAW,GAAKL,EAAQ,EAAG,CAC1CG,EAAOF,EAAM,GAAGG,M,CAGlB,GAAIH,EAAMI,SAAW,GAAKL,IAAU,EAAG,CACrCG,EAAOF,EAAM,GAAGG,M,CAGlB,OAAOD,EAAKG,QAAQ,UAAWN,EAAMO,WACvC,CCrFA,IAAMC,EAAsB,k5H,ICiCfC,EAAgBC,EAAA,+B,0EAwHnBC,KAAAC,aAAwB,MACxBD,KAAAE,cAAwB,EACxBF,KAAAG,aAAwB,MAC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EAAA,aAAWiB,KAAK,SAASrH,EAAYgI,SATvC,KAcHhJ,KAAKC,cACJmH,EAAA,aACEE,MAAM,+BACNc,QAASpI,KAAK+B,aAEdqF,EAAA,aAAWiB,KAAK,SACblJ,EAAGa,KAAKsF,aAAa2D,cACpBjJ,KAAKE,cAAgBF,KAAKiC,UACtBjC,KAAKiC,UACLjC,KAAKE,qB,qVAvbJ,I"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhProgressbarCss","StzhProgressbar","exports","this","setCurrentSteps","media","matches","_this","stepsUltra","currentSteps","stepsLarge","stepsMedium","stepsSmall","steps","element","style","setProperty","toString","class_1","prototype","dataWatcher","newValue","_data","JSON","parse","lastItemIndex","length","maxStepIndex","withinLastFewSteps","index","getItemAttributes","itemIndex","item","step","first","last","current","passed","dotted","hide","substract","componentWillLoad","data","localization","_a","window","stzhComponents","utils","fetchTranslations","_b","sent","connectedCallback","addMediaChangeListener","disconnectedCallback","removeMediaChangeListener","render","classes","concat","h","Host","class","role","label","map","Object","assign","icon","disabled"],"sources":["src/components/stzh-progressbar/stzh-progressbar.scss?tag=stzh-progressbar&encapsulation=scoped","src/components/stzh-progressbar/stzh-progressbar.tsx"],"sourcesContent":[":host {\n min-width: calc(var(--steps) * #{$progressbarItemDottedSize} * 2);\n\n @include mq($from: small) {\n min-width: calc(var(--steps) * #{$progressbarItemDottedSizeSmallUp} * 2);\n }\n}\n\n.stzh-progressbar {\n position: relative;\n\toverflow: hidden;\n\n &__items {\n display: flex;\n flex-wrap: nowrap;\n }\n\n &__item {\n /* flex the bullets to always have the same size */\n\t\tflex-grow: 1;\n\t\tflex-shrink: 1;\n\t\tflex-basis: 0;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Watch\n} from \"@stencil/core\";\n\nimport {\n StzhProgressbarDataItem\n} from '../../index';\n\nimport { addMediaChangeListener, removeMediaChangeListener, media } from \"../../utils/media-utils\";\nimport { StzhProgressbarLocalizedText } from \"./stzh-progressbar.localization\"\n\n/**\n * @slot - Slot for any text content\n */\n@Component({\n tag: \"stzh-progressbar\",\n styleUrl: \"stzh-progressbar.scss\",\n scoped: true\n})\nexport class StzhProgressbar {\n /** Translation strings */\n @Prop() localization: StzhProgressbarLocalizedText;\n\n /**\n * Step data (JSON array with objects that have `label` attribute and optional:\n * - `disabled`, if step should be disabled\n * - `icon`, if icon instead of step number should be displayed):\n * - `analyticsId`, for Adobe Analytics, rendered as `s-object-id` (default is `label`)\n *\n * ```\n * {\n * \"label\": \"Step Label\"\n * \"icon\": \"clock\",\n * \"disabled\": true\n * }\n * ```\n */\n @Prop() data: StzhProgressbarDataItem[] | string = [];\n private _data: StzhProgressbarDataItem[];\n\n /** Index of the item that be active */\n @Prop() index: number = 0;\n\n /** Number of steps to show below small breakpoint */\n @Prop() steps: number = 5;\n\n /** Number of steps to show above small breakpoint */\n @Prop() stepsSmall: number = 6;\n\n /** Number of steps to show above medium breakpoint */\n @Prop() stepsMedium: number = 0;\n\n /** Number of steps to show above large breakpoint */\n @Prop() stepsLarge: number = 0;\n\n /** Number of steps to show above ultra breakpoint */\n @Prop() stepsUltra: number = 0;\n\n @State() currentSteps: number;\n\n @Element() element: HTMLStzhProgressbarElement;\n\n @Watch(\"data\")\n dataWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n }\n else {\n this._data = newValue;\n }\n\n this.lastItemIndex = this._data.length - 1;\n this.maxStepIndex = this.currentSteps - 1;\n this.withinLastFewSteps = this.index >= this._data.length - this.maxStepIndex;\n }\n\n private lastItemIndex: number;\n private maxStepIndex: number;\n private withinLastFewSteps: boolean;\n\n private getItemAttributes(itemIndex: number): any {\n const item = {} as HTMLStzhProgressbarItemElement;\n\n item.step = itemIndex + 1;\n item.first = itemIndex === 0;\n item.last = itemIndex === this.lastItemIndex;\n item.current = itemIndex === this.index;\n item.passed = itemIndex < this.index;\n\n // hide overflowings if more items than max steps in DOM\n if (this._data.length > this.currentSteps) {\n // add dots to last item if current index is below the last few items\n if (itemIndex === this.lastItemIndex && !this.withinLastFewSteps) {\n item.dotted = true;\n }\n\n if (this.index < 2) {\n // hide overflowing items on the right\n item.hide = itemIndex > this.maxStepIndex - 1 && itemIndex < this.lastItemIndex;\n } else {\n // add dots to first item if current item is third or above\n if (itemIndex === 0) {\n item.dotted = true;\n }\n\n let substract = this.index;\n\n // if is within the last elements, calculate how much previous\n // should be shown to stay on 5 visible elements\n if (this.withinLastFewSteps) {\n substract = this._data.length - this.maxStepIndex;\n }\n\n // hide overflowing items on left and right side\n item.hide = itemIndex > 0 && itemIndex < substract\n || itemIndex > this.index + (this.currentSteps - 3) && itemIndex < this.lastItemIndex;\n }\n }\n\n return item;\n }\n\n private setCurrentSteps = () => {\n if (media(\"ultra\").matches && this.stepsUltra) {\n this.currentSteps = this.stepsUltra;\n } else if (media(\"large\").matches && this.stepsLarge) {\n this.currentSteps = this.stepsLarge;\n } else if (media(\"medium\").matches && this.stepsMedium) {\n this.currentSteps = this.stepsMedium;\n } else if (media(\"small\").matches && this.stepsSmall) {\n this.currentSteps = this.stepsSmall;\n } else {\n this.currentSteps = this.steps;\n }\n\n this.element.style.setProperty(\"--steps\", this.currentSteps.toString());\n }\n\n async componentWillLoad() {\n this.dataWatcher(this.data);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"progressbar\");\n }\n }\n\n connectedCallback() {\n this.setCurrentSteps();\n addMediaChangeListener(this.setCurrentSteps);\n }\n\n disconnectedCallback() {\n removeMediaChangeListener(this.setCurrentSteps);\n }\n\n render() {\n const classes = {\n \"stzh-progressbar\": true,\n [`stzh-progressbar--index-${this.index}`]: !!this.index\n };\n\n return (\n <Host>\n <div class={classes}>\n <div\n class=\"stzh-progressbar__items\"\n role=\"list\"\n aria-label={this.localization.label}\n >\n {this._data.map((step, index) =>\n <stzh-progressbar-item\n {...this.getItemAttributes(index)}\n icon={step.icon}\n disabled={step.disabled}\n label={step.label}\n class=\"stzh-prog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iC,KACXC,SAAUlC,EAAKkC,SACfL,MAAO7B,EAAK6B,MACZF,MAAM,2BALR,M,kPAvJc,I"}
@@ -1,2 +0,0 @@
1
- System.register(["./p-290fcb28.system.js"],(function(t){"use strict";var i,n,e;return{setters:[function(t){i=t.r;n=t.h;e=t.a}],execute:function(){var r=".sc-stzh-container-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-container-h{display:none}.sc-stzh-container-h *.sc-stzh-container,.sc-stzh-container-h *.sc-stzh-container::before,.sc-stzh-container-h *.sc-stzh-container::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-container-h .has-focus.sc-stzh-container{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-container-h .stzh-fylingfocus-focused.sc-stzh-container{outline-style:none !important}.sc-stzh-container-h .stzh-fylingfocus-focused.sc-stzh-container::-moz-focus-inner{border:0 !important}.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-1.25rem;margin-right:-1.25rem}@media screen and (min-width: 600px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-2rem;margin-right:-2rem}}@media screen and (min-width: 1024px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-2.5rem;margin-right:-2.5rem}}@media screen and (min-width: 1260px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-5.5rem;margin-right:-5.5rem}}@media screen and (min-width: 1440px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:calc((100vw - 78.75rem - var(--stzh-scrollbar-width, 0px)) / -2);margin-right:calc((100vw - 78.75rem - var(--stzh-scrollbar-width, 0px)) / -2)}}.sc-stzh-container-h .sc-stzh-container-s stzh-container{position:relative;left:50%;right:50%;margin-left:-50vw;margin-right:-50vw;width:100vw;max-width:100vw}.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:1.25rem}@media screen and (min-width: 600px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:2rem}}@media screen and (min-width: 1024px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:2.5rem}}@media screen and (min-width: 1260px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:var(--stzh-space-xlarge)}}@media screen and (max-width: 1259px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{position:relative;left:50%;right:50%;margin-left:-50vw;margin-right:-50vw;width:100vw;max-width:100vw}}.sc-stzh-container-h .sc-stzh-container-s stzh-row stzh-section[variant=highlight]{--highlight-horizontal-padding:var(--stzh-section-highlight-horizontal-padding)}@media screen and (max-width: 1259px){.sc-stzh-container-h .sc-stzh-container-s stzh-row stzh-section[variant=highlight]{left:initial;right:initial;margin-left:initial;margin-right:initial;width:initial;max-width:initial}}.stzh-container.sc-stzh-container{margin-left:1.25rem;margin-right:1.25rem}@media screen and (min-width: 600px){.stzh-container.sc-stzh-container{margin-left:2rem;margin-right:2rem}}@media screen and (min-width: 1024px){.stzh-container.sc-stzh-container{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (min-width: 1260px){.stzh-container.sc-stzh-container{margin-left:5.5rem;margin-right:5.5rem}}@media screen and (min-width: 1440px){.stzh-container.sc-stzh-container{margin-left:auto;margin-right:auto;width:78.75rem}}@media screen and (min-width: 1440px){.stzh-container--size-big.sc-stzh-container{width:90rem}}.stzh-container--has-no-margin.sc-stzh-container{margin-left:auto;margin-right:auto}";var s=t("stzh_container",function(){function t(t){i(this,t);this.size="default";this.noMargin=false}t.prototype.render=function(){var t;var i=(t={"stzh-container":true,"stzh-container--has-no-margin":this.noMargin},t["stzh-container--size-".concat(this.size)]=!!this.size,t);return n(e,null,n("div",{class:i},n("slot",null)))};return t}());s.style=r}}}));
2
- //# sourceMappingURL=p-e278cda2.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhContainerCss","StzhContainer","exports","class_1","prototype","render","classes","_a","this","noMargin","concat","size","h","Host","class"],"sources":["src/components/stzh-container/stzh-container.scss?tag=stzh-container&encapsulation=scoped","src/components/stzh-container/stzh-container.tsx"],"sourcesContent":[":host {\n ::slotted(*) {\n stzh-header {\n margin-left: -$containerMargin;\n margin-right: -$containerMargin;\n\n @include mq($from: small) {\n margin-left: -$containerMarginSmall;\n margin-right: -$containerMarginSmall;\n }\n\n @include mq($from: medium) {\n margin-left: -$containerMarginMedium;\n margin-right: -$containerMarginMedium;\n }\n\n @include mq($from: large) {\n margin-left: -$containerMarginLarge;\n margin-right: -$containerMarginLarge;\n }\n\n @include mq($from: ultra) {\n margin-left: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / -2);\n margin-right: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / -2);\n }\n }\n\n stzh-container {\n position: relative;\n left: 50%;\n right: 50%;\n margin-left: -50vw;\n margin-right: -50vw;\n width: 100vw;\n max-width: 100vw;\n }\n\n stzh-section[variant=\"highlight\"] {\n --highlight-horizontal-padding: #{$containerMargin};\n\n @include mq($from: small) {\n --highlight-horizontal-padding: #{$containerMarginSmall};\n }\n\n @include mq($from: medium) {\n --highlight-horizontal-padding: #{$containerMarginMedium};\n }\n\n @include mq($from: large) {\n --highlight-horizontal-padding: #{space('xlarge')};\n }\n\n @include mq($to: large) {\n position: relative;\n left: 50%;\n right: 50%;\n margin-left: -50vw;\n margin-right: -50vw;\n width: 100vw;\n max-width: 100vw;\n }\n }\n\n stzh-row stzh-section[variant=\"highlight\"] {\n --highlight-horizontal-padding: #{$sectionHighlightHorizontalPadding};\n\n @include mq($to: large) {\n left: initial;\n right: initial;\n margin-left: initial;\n margin-right: initial;\n width: initial;\n max-width: initial;\n }\n }\n }\n}\n\n.stzh-container {\n @include container;\n\n &--size-big {\n @include mq($from: ultra) {\n width: $containerBigMaxWidth;\n }\n }\n\n &--has-no-margin {\n margin-left: auto;\n margin-right: auto;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n} from \"@stencil/core\";\n\n/**\n * @slot - Slot for any content\n */\n@Component({\n tag: \"stzh-container\",\n styleUrl: \"stzh-container.scss\",\n scoped: true\n})\nexport class StzhContainer {\n /** Size variant */\n @Prop() size: \"default\" | \"big\" = \"default\";\n\n /** Whether to prevent side margins */\n @Prop() noMargin: boolean = false;\n\n render() {\n const classes = {\n \"stzh-container\": true,\n \"stzh-container--has-no-margin\": this.noMargin,\n [`stzh-container--size-${this.size}`]: !!this.size,\n };\n\n return (\n <Host>\n <div class={classes}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"kJAAA,IAAMA,EAAmB,+oH,ICeZC,EAAaC,EAAA,4B,kCAEU,U,cAGN,K,CAE5BC,EAAAC,UAAAC,OAAA,W,MACE,IAAMC,GAAOC,EAAA,CACX,iBAAkB,KAClB,gCAAiCC,KAAKC,UACtCF,EAAC,wBAAAG,OAAwBF,KAAKG,SAAWH,KAAKG,K,GAGhD,OACEC,EAACC,EAAI,KACHD,EAAA,OAAKE,MAAOR,GACVM,EAAA,c,WAjBgB,I"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhVbzTickerCss","StzhVbzTicker","exports","this","globalDisturbances","lines","counter","_c","concat","VBZ","DISTURBANCE_GLOBAL","DISTURBANCE_INFORMATION","DISTURBANCE_CONSTRUCTION","DISTURBANCE_NORMAL","DISTURBANCE_EVENT","DISTURBANCE_BUS","class_1","prototype","localizationWatcher","collator","Intl","Collator","localization","$locale","numeric","apiWatcher","newValue","apiUrl","api","replace","includes","Date","now","axios","get","data","sent","dataWatcher","_data","JSON","parse","_b","_a","Message","forEach","message","urls","channel","filter","name","CHANNEL_TICKER","url","map","reduce","a","b","infoUrl","find","indexOf","CHANNEL_INFO_URL_FILTER","baseType","BASE_TYPE_GLOBAL","_this","push","id","head","category","startDate","sDate","sTime","endDate","eDate","eTime","altStart","altEnd","affectedProduct","affectedLines_1","product","lineId","line","cls","disturbances","alert","Object","keys","key","sort","compare","componentWillLoad","window","stzhComponents","utils","fetchTranslations","element","_d","dateAdapter","createFormatParseAdapter","$formats","$globals","renderDisturbance","disturbance","h","class","formatSpan","size","href","moreInfo","target","icon","moreInfoLink","render","classes","Host","length","noDisturbances","furtherDisturbanceTitle","disturbanceTitle","constructionsTitle","Fragment","role","slot"],"sources":["src/components/stzh-vbz-ticker/stzh-vbz-ticker.scss?tag=stzh-vbz-ticker&encapsulation=scoped","src/components/stzh-vbz-ticker/stzh-vbz-ticker.tsx"],"sourcesContent":[":host {\n}\n\n.stzh-vbz-ticker {\n display: flex;\n flex-direction: column;\n position: relative;\n\n @include mq($from: medium) {\n flex-direction: row;\n align-items: flex-start;\n }\n\n &__icon {\n --size: #{iconSize('small')};\n margin-right: space('xsmall');\n }\n\n &__title {\n @include font('medium');\n @include fontCurve('p1');\n display: flex;\n flex-wrap: wrap;\n }\n\n &__title-parts {\n display: flex;\n flex-wrap: wrap;\n margin: calc(#{space('xxxsmall')} / -1) 0;\n }\n\n &__title-part {\n display: flex;\n align-items: center;\n white-space: nowrap;\n margin: space('xxxsmall') 0;\n\n &:not(:last-child) {\n margin-right: space('large');\n }\n\n &--no-disturbances {\n color: $colorTruegreen;\n }\n\n &--major-events {\n color: $colorCoral;\n }\n\n &--disturbances {\n color: $colorError;\n }\n }\n\n // &__description {\n // @include fontSize('micro');\n // @include spaceCurve('margin-top', 'tiny');\n // }\n\n &__link {\n margin-top: space('small');\n\n @include mq($from: medium) {\n position: absolute;\n top: 0;\n right: 0;\n margin-top: 0;\n }\n }\n\n &__chips {\n display: flex;\n flex-wrap: wrap;\n\n &:not(:empty) {\n margin: calc(#{space('xxsmall')} * -1);\n margin-top: calc(#{space('medium')} - #{space('xxsmall')});\n }\n }\n\n &__chip {\n margin: space('xxsmall');\n }\n\n &__tooltip {\n --width: 334px;\n }\n\n &__disturbance {\n display: flex;\n align-items: flex-start;\n\n &:not(:first-child) {\n margin-top: space('small');\n }\n }\n\n &__disturbance--type0 &__disturbance-title,\n &__disturbance--type0 &__disturbance-icon,\n &__disturbance--type2 &__disturbance-title,\n &__disturbance--type2 &__disturbance-icon {\n color: $colorError;\n }\n\n &__disturbance-title {\n @include font('medium');\n display: flex;\n }\n\n &__disturbance--type0 &__disturbance-title,\n &__disturbance--type2 &__disturbance-title {\n @include font('heavy');\n }\n\n &__disturbance-icon {\n --size: #{iconSize('xsmall')};\n margin-top: space('xxxsmall');\n margin-right: space('xsmall');\n }\n\n &__disturbance-link {\n margin-top: space('xsmall');\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Watch,\n Element,\n Fragment\n} from \"@stencil/core\";\n\nimport axios from 'axios';\n\nimport { StzhLocaleAdapter } from \"../../utils/date-adapter\";\n\nimport {\n VBZ,\n VbzTickerInfoUrl,\n VbzTickerDisturbance,\n VbzTickerLine\n} from \"../../index\";\n\nimport { StzhVbzTickerLocalizedText } from \"./stzh-vbz-ticker.localization\";\n\n/**\n * @slot link - Optional link to traffic situation\n */\n@Component({\n tag: \"stzh-vbz-ticker\",\n styleUrl: \"stzh-vbz-ticker.scss\",\n scoped: true\n})\nexport class StzhVbzTicker {\n /** API URL (`{lang}` is replaced in the URL) */\n @Prop() api: string = \"https://fpbe.zvv.ch/restproxy/himsearch?format=json&accessId=unic&channels=ticker&additionalfields=tickers:VBZ&orderBy=LMOD_DESC&lang={lang}\";\n\n /** Data to pass in directly (alternative for API call) */\n @Prop() data: any = \"\";\n private _data: any;\n\n /** More info link (`{lang}` and `{id}` are replaced in the URL) */\n @Prop() moreInfoLink: string = \"https://zvv.ch/zvv/{lang}/fahrplan/vl.html?himIds={id}\";\n\n /**\n * Date adapter, for custom parsing/formatting.\n * Must be object with a `parse` function which accepts a `string` and returns a `Date`,\n * and a `format` function which accepts a `Date` and returns a `string`.\n */\n @Prop() dateAdapter: StzhLocaleAdapter;\n\n /** Translation strings. */\n @Prop() localization: StzhVbzTickerLocalizedText;\n\n @Element() element: HTMLStzhVbzTickerElement;\n\n private globalDisturbances: VbzTickerDisturbance[] = [];\n private lines: VbzTickerLine[] = [];\n private collator: Intl.Collator;\n\n private counter = {\n [`${VBZ.DISTURBANCE_GLOBAL}`]: 0,\n [`${VBZ.DISTURBANCE_INFORMATION}`]: 0,\n [`${VBZ.DISTURBANCE_CONSTRUCTION}`]: 0,\n [`${VBZ.DISTURBANCE_NORMAL}`]: 0,\n [`${VBZ.DISTURBANCE_EVENT}`]: 0,\n [`${VBZ.DISTURBANCE_BUS}`]: 0\n };\n\n @Watch(\"localization\")\n localizationWatcher() {\n this.collator = new Intl.Collator(this.localization.$locale, {\n numeric: true\n });\n }\n\n @Watch(\"api\")\n async apiWatcher(newValue: string) {\n if (!newValue) {\n return;\n }\n\n let apiUrl = this.api.replace(/\\{lang\\}/, this.localization.$locale)\n apiUrl = apiUrl + (apiUrl.includes(\"?\") ? \"&\" : \"?\") + Date.now();\n\n // load data from API\n const { data } = await axios.get(apiUrl);\n\n this.data = data;\n }\n\n @Watch(\"data\")\n async dataWatcher(newValue: any) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n } else {\n this._data = newValue;\n }\n\n const lines: { [key: string]: VbzTickerLine } = {};\n\n this._data?.Message?.forEach(message => {\n const urls: VbzTickerInfoUrl[] = message.channel\n .filter(channel => channel.name === VBZ.CHANNEL_TICKER && channel.url)\n .map(channel => channel.url)\n .reduce((a, b) => a.concat(b), []);\n\n const infoUrl = urls\n .find(url => url.url.indexOf(VBZ.CHANNEL_INFO_URL_FILTER) !== -1);\n\n if (message.baseType === VBZ.BASE_TYPE_GLOBAL) {\n this.counter[VBZ.DISTURBANCE_GLOBAL]++;\n\n this.globalDisturbances.push({\n id: message.id,\n head: message.head,\n category: message.category,\n baseType: message.baseType,\n startDate: new Date(`${message.sDate}T${message.sTime}+02:00`),\n endDate: new Date(`${message.eDate}T${message.eTime}+02:00`),\n altStart: message.altStart,\n altEnd: message.altEnd,\n infoUrl: infoUrl\n });\n } else {\n this.counter[message.category]++;\n }\n\n // don't add to lines if no line/product has been linked to\n // or if it is a information disturbance or global\n if (\n message.affectedProduct\n && message.category !== VBZ.DISTURBANCE_INFORMATION\n && message.baseType !== VBZ.BASE_TYPE_GLOBAL\n ) {\n const affectedLines = [];\n\n message.affectedProduct.forEach(product => {\n if (typeof lines[product.lineId] === \"undefined\") {\n lines[product.lineId] = {\n line: product.line,\n name: product.name,\n category: product.cls,\n disturbances: [],\n alert: false\n }\n }\n\n if (message.category === VBZ.DISTURBANCE_NORMAL) {\n lines[product.lineId].alert = true;\n }\n\n // only add disturbance message to line if it was not already added (avoiding same message twice)\n if (!affectedLines.includes(product.lineId)) {\n affectedLines.push(product.lineId);\n\n lines[product.lineId].disturbances.push({\n id: message.id,\n head: message.head,\n category: message.category,\n baseType: message.baseType,\n startDate: new Date(`${message.sDate}T${message.sTime}+02:00`),\n endDate: new Date(`${message.eDate}T${message.eTime}+02:00`),\n altStart: message.altStart,\n altEnd: message.altEnd,\n infoUrl: infoUrl\n })\n }\n })\n }\n });\n\n this.lines = Object.keys(lines)\n .map(key => lines[key]);\n\n // sort by line name\n this.lines.sort((a, b) => this.collator\n .compare(a.line, b.line));\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"vbz-ticker\");\n this.localizationWatcher();\n }\n\n if (!this.dateAdapter) {\n this.dateAdapter = window.stzhComponents.utils.createFormatParseAdapter(\n this.localization.$formats,\n this.localization.$globals\n );\n }\n\n if (this.data) {\n await this.dataWatcher(this.data);\n } else {\n await this.apiWatcher(this.api);\n }\n }\n\n renderDisturbance(disturbance: VbzTickerDisturbance) {\n return (\n <div class={{\n \"stzh-vbz-ticker__disturbance\": true,\n [`stzh-vbz-ticker__disturbance--type${disturbance.category}`]: !!disturbance.category\n }}>\n {disturbance.category === VBZ.DISTURBANCE_NORMAL\n || disturbance.baseType === VBZ.BASE_TYPE_GLOBAL\n ?\n <stzh-icon name=\"warning-big\" class=\"stzh-vbz-ticker__disturbance-icon\"></stzh-icon>\n :\n <stzh-icon name=\"construction\" class=\"stzh-vbz-ticker__disturbance-icon\"></stzh-icon>\n }\n\n <div class=\"stzh-vbz-ticker__disturbance-text\">\n <div class=\"stzh-vbz-ticker__disturbance-title\">\n {disturbance.head}\n </div>\n\n <div class=\"stzh-vbz-ticker__disturbance-date\">\n {this.dateAdapter.formatSpan(\n disturbance.altStart || disturbance.startDate,\n disturbance.altEnd || disturbance.endDate,\n \"date\"\n )}\n </div>\n\n {disturbance.infoUrl ?\n <stzh-link\n class=\"stzh-vbz-ticker__disturbance-link\"\n size=\"small\"\n href={disturbance.infoUrl.url}\n >\n {this.localization.moreInfo}\n </stzh-link>\n :\n <stzh-link\n class=\"stzh-vbz-ticker__disturbance-link\"\n size=\"small\"\n target=\"_blank\"\n icon=\"external-link\"\n href={this.moreInfoLink\n .replace(/\\{lang\\}/, this.localization.$locale)\n .replace(/\\{id\\}/, disturbance.id)}\n >\n {this.localization.moreInfo}\n </stzh-link>\n }\n </div>\n </div>\n );\n }\n\n render() {\n const classes = {\n \"stzh-vbz-ticker\": true\n };\n\n return (\n <Host>\n <div class={classes}>\n <div class=\"stzh-vbz-ticker__text\">\n <div class=\"stzh-vbz-ticker__title\">\n <div class=\"stzh-vbz-ticker__title-parts\">\n {this.lines.length === 0 && this.counter[VBZ.DISTURBANCE_GLOBAL] === 0 &&\n <div class=\"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--no-disturbances\">\n <stzh-icon class=\"stzh-vbz-ticker__icon\" name=\"checkmark-circle\"></stzh-icon>\n {this.localization.noDisturbances}\n </div>}\n\n {/* {this.counter[DISTURBANCE_GLOBAL] > 0 &&\n <div class=\"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--major-events\">\n <stzh-icon class=\"stzh-vbz-ticker__icon\" name=\"important-warning\"></stzh-icon>\n {this.localization.majorEventTitle}\n </div>} */}\n\n {this.counter[VBZ.DISTURBANCE_NORMAL] > 0 &&\n <div class=\"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--disturbances\">\n <stzh-icon class=\"stzh-vbz-ticker__icon\" name=\"warning\"></stzh-icon>\n {this.counter[VBZ.DISTURBANCE_GLOBAL] > 0 ?\n this.localization.furtherDisturbanceTitle : this.localization.disturbanceTitle}\n </div>}\n\n {(this.counter[VBZ.DISTURBANCE_CONSTRUCTION] > 0\n || this.counter[VBZ.DISTURBANCE_EVENT] > 0\n || this.counter[VBZ.DISTURBANCE_BUS] > 0) &&\n <div class=\"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--others\">\n <stzh-icon class=\"stzh-vbz-ticker__icon\" name=\"construction\"></stzh-icon>\n {this.localization.constructionsTitle}\n </div>}\n </div>\n </div>\n\n {(this.lines.length > 0 || this.counter[VBZ.DISTURBANCE_GLOBAL] > 0) &&\n <Fragment>\n {/* <div class=\"stzh-vbz-ticker__description\">\n {this.counter[VBZ.DISTURBANCE_GLOBAL] > 0\n ? this.localization.globalDisturbance\n : this.localization.affectedLines}\n </div> */}\n <div class=\"stzh-vbz-ticker__chips\" role=\"list\">\n {/* {this.counter[VBZ.DISTURBANCE_GLOBAL] > 0 &&\n <div class=\"stzh-vbz-ticker__chip\" role=\"listitem\">\n <stzh-tooltip class=\"stzh-vbz-ticker__tooltip\">\n <stzh-vbz-linechip global></stzh-vbz-linechip>\n <div class=\"stzh-vbz-ticker__tooltip-content\" slot=\"content\">\n {this.globalDisturbances.map((disturbance) => this.renderDisturbance(disturbance))}\n </div>\n </stzh-tooltip>\n </div>} */}\n\n {this.lines.map((line) =>\n <div class=\"stzh-vbz-ticker__chip\" role=\"listitem\">\n <stzh-tooltip class=\"stzh-vbz-ticker__tooltip\">\n <stzh-vbz-linechip line={line.line} alert={line.alert}></stzh-vbz-linechip>\n <div class=\"stzh-vbz-ticker__tooltip-content\" slot=\"content\">\n {line.disturbances.map((disturbance) => this.renderDisturbance(disturbance))}\n </div>\n </stzh-tooltip>\n </div>\n )}\n </div>\n </Fragment>}\n </div>\n\n <div class=\"stzh-vbz-ticker__link\">\n <slot name=\"link\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"8sDAAA,IAAMA,EAAmB,s8J,IC+BZC,EAAaC,EAAA,6B,8BAuBhBC,KAAAC,mBAA6C,GAC7CD,KAAAE,MAAyB,GAGzBF,KAAAG,SAAOC,EAAA,GACbA,EAAC,GAAAC,OAAGC,EAAIC,qBAAuB,EAC/BH,EAAC,GAAAC,OAAGC,EAAIE,0BAA4B,EACpCJ,EAAC,GAAAC,OAAGC,EAAIG,2BAA6B,EACrCL,EAAC,GAAAC,OAAGC,EAAII,qBAAuB,EAC/BN,EAAC,GAAAC,OAAGC,EAAIK,oBAAsB,EAC9BP,EAAC,GAAAC,OAAGC,EAAIM,kBAAoB,E,YA/BR,+I,UAGF,G,kBAIW,yD,uDA4B/BC,EAAAC,UAAAC,oBAAA,WACEf,KAAKgB,SAAW,IAAIC,KAAKC,SAASlB,KAAKmB,aAAaC,QAAS,CAC3DC,QAAS,M,EAKPR,EAAAC,UAAAQ,WAAN,SAAiBC,G,oHACf,IAAKA,EAAU,CACb,S,CAGEC,EAASxB,KAAKyB,IAAIC,QAAQ,WAAY1B,KAAKmB,aAAaC,SAC5DI,EAASA,GAAUA,EAAOG,SAAS,KAAO,IAAM,KAAOC,KAAKC,MAG3C,SAAMC,EAAMC,IAAIP,I,OAAzBQ,EAAS5B,EAAA6B,OAAuBD,KAExChC,KAAKgC,KAAOA,E,kBAIRnB,EAAAC,UAAAoB,YAAN,SAAkBX,G,0GAChB,UAAWA,IAAa,SAAU,CAChCvB,KAAKmC,MAAQC,KAAKC,MAAMd,E,KACnB,CACLvB,KAAKmC,MAAQZ,C,CAGTrB,EAA0C,IAEhDoC,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sB,GACtCwF,EAAA,OAAKC,MAAM,yEACTD,EAAA,aAAWC,MAAM,wBAAwBrD,KAAK,YAC7C9C,KAAKG,QAAQG,EAAIC,oBAAsB,EACtCP,KAAKmB,aAAa6F,wBAA0BhH,KAAKmB,aAAa8F,mBAGlEjH,KAAKG,QAAQG,EAAIG,0BAA4B,GAC1CT,KAAKG,QAAQG,EAAIK,mBAAqB,GACtCX,KAAKG,QAAQG,EAAIM,iBAAmB,IACvCsF,EAAA,OAAKC,MAAM,mEACTD,EAAA,aAAWC,MAAM,wBAAwBrD,KAAK,iBAC7C9C,KAAKmB,aAAa+F,uBAKzBlH,KAAKE,MAAM4G,OAAS,GAAK9G,KAAKG,QAAQG,EAAIC,oBAAsB,IAChE2F,EAACiB,EAAQ,KAMPjB,EAAA,OAAKC,MAAM,yBAAyBiB,KAAK,QAWtCpH,KAAKE,MAAM+C,KAAI,SAAC2B,GACf,OAAAsB,EAAA,OAAKC,MAAM,wBAAwBiB,KAAK,YACtClB,EAAA,gBAAcC,MAAM,4BAClBD,EAAA,qBAAmBtB,KAAMA,EAAKA,KAAMG,MAAOH,EAAKG,QAChDmB,EAAA,OAAKC,MAAM,mCAAmCkB,KAAK,WAChDzC,EAAKE,aAAa7B,KAAI,SAACgD,GAAgB,OAAAtC,EAAKqC,kBAAkBC,EAAvB,MAJ9C,OAaVC,EAAA,OAAKC,MAAM,yBACTD,EAAA,QAAMpD,KAAK,W,0SArSG,I"}
@@ -1,2 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,r,i){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,s){function a(t){try{h(i.next(t))}catch(t){s(t)}}function n(t){try{h(i["throw"](t))}catch(t){s(t)}}function h(t){t.done?r(t.value):o(t.value).then(a,n)}h((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,a;return a={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function n(t){return function(e){return h([t,e])}}function h(n){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,n[0]&&(r=0)),r)try{if(i=1,o&&(s=n[0]&2?o["return"]:n[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,n[1])).done)return s;if(o=0,s)n=[n[0]&2,s.value];switch(n[0]){case 0:case 1:s=n;break;case 4:r.label++;return{value:n[1],done:false};case 5:r.label++;o=n[1];n=[0];continue;case 7:n=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(n[0]===6||n[0]===2)){r=0;continue}if(n[0]===3&&(!s||n[1]>s[0]&&n[1]<s[3])){r.label=n[1];break}if(n[0]===6&&r.label<s[1]){r.label=s[1];s=n;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(n);break}if(s[2])r.ops.pop();r.trys.pop();continue}n=e.call(t,r)}catch(t){n=[6,t];o=0}finally{i=s=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-290fcb28.system.js","./p-f6588a0f.system.js","./p-f9cb0fcd.system.js","./p-8550bdd3.system.js","./p-774595ba.system.js"],(function(t){"use strict";var e,r,i,o,s,a,n,h,d,c,l;return{setters:[function(t){e=t.r;r=t.c;i=t.h;o=t.F;s=t.a;a=t.g},function(t){n=t.a;h=t.p},function(t){d=t.h},function(t){c=t.S},function(t){l=t.c}],execute:function(){var u=".sc-stzh-datepicker-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-datepicker-h{display:none}.sc-stzh-datepicker-h *.sc-stzh-datepicker,.sc-stzh-datepicker-h *.sc-stzh-datepicker::before,.sc-stzh-datepicker-h *.sc-stzh-datepicker::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-datepicker-h .has-focus.sc-stzh-datepicker{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-datepicker-h .stzh-fylingfocus-focused.sc-stzh-datepicker{outline-style:none !important}.sc-stzh-datepicker-h .stzh-fylingfocus-focused.sc-stzh-datepicker::-moz-focus-inner{border:0 !important}.sc-stzh-datepicker-h{width:100%}.stzh-datepicker__popover.sc-stzh-datepicker{--padding:var(--stzh-space-medium);--width:auto}.stzh-datepicker__actions.sc-stzh-datepicker{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.stzh-datepicker__actions.sc-stzh-datepicker:not(:empty){margin-top:var(--stzh-space-xsmall)}";var p=t("stzh_datepicker",function(){function t(t){var i=this;e(this,t);this.stzhChange=r(this,"stzhChange",7);this.onRootFocus=function(){if(i.input){i.input.setFocus()}};this.onInputChanged=function(){var t=i.dateAdapter.parse(i.input.value,"dateInput");if(i.input.value===""||t){var e=n(t);if(i.value!==e){if(i.calendar){i.calendar.value=e}i.value=e}else{i.valueWatcher(e)}i.stzhChange.emit({component:"stzh-datepicker",value:i.value,valueAsDate:t})}};this.onCalendarChange=function(t){i.value=t.detail.value;i.stzhChange.emit({component:"stzh-datepicker",value:i.value,valueAsDate:t.detail.valueAsDate});if(i.input){i.input.value=t.detail.valueAsDate&&i.dateAdapter.format(t.detail.valueAsDate,"dateInput")}if(i.popover){i.popover.hide()}};this.calendarMin="";this.calendarMax="";this.calendarIsDateDisabled=function(){return false};this.name="";this.value="";this.label="";this.labelHidden=false;this.readonly=false;this.disabled=false;this.description=undefined;this.descriptionLong=undefined;this.error=undefined;this.invalid=false;this.required=false;this.showMarker=false;this.size="default";this.inline=false;this.dateAdapter=undefined;this.localization=undefined;this.buttonLabel=undefined}t.prototype.createDateFormatters=function(){if(this.localization){this.dateFormatLong=new Intl.DateTimeFormat(this.localization.$locale,{day:"numeric",month:"long",year:"numeric"})}};t.prototype.valueWatcher=function(t){var e=h(t);if(this.calendar){this.calendar.value=t}if(this.input){this.input.value=this.dateAdapter.format(e,"dateInput")}this.updateButtonAccessibleLabel()};t.prototype.setDate=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.value=n(t);return[2]}))}))};t.prototype.getPopover=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.popover]}))}))};t.prototype.updateButtonAccessibleLabel=function(){if(!this.localization){return}try{var t=h(this.value);this.buttonLabel="".concat(this.label,", ").concat(this.localization.buttonLabel,", ").concat(this.localization.selectedDateMessage," ").concat(this.dateFormatLong.format(t))}catch(t){this.buttonLabel="".concat(this.label,", ").concat(this.localization.buttonLabel)}};t.prototype.connectedCallback=function(){this.createDateFormatters()};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:if(!!this.localization)return[3,2];t=this;return[4,window.stzhComponents.utils.fetchTranslations(this.element,"datepicker")];case 1:t.localization=e.sent();e.label=2;case 2:if(!this.dateAdapter){this.dateAdapter=window.stzhComponents.utils.createFormatParseAdapter(this.localization.$formats,this.localization.$globals)}return[2]}}))}))};t.prototype.componentDidLoad=function(){this.valueWatcher(this.value)};t.prototype.render=function(){var t=this;var e={"stzh-datepicker":true,"stzh-datepicker--inline":this.inline};return i(s,{tabindex:this.disabled?null:"-1",onFocus:this.onRootFocus},i("div",{class:e},i("input",{type:"hidden",name:this.name,value:this.value}),this.inline&&i(o,null,i("stzh-calendar",{ref:function(e){return t.calendar=e},isDateDisabled:this.calendarIsDateDisabled,min:this.calendarMin,max:this.calendarMax,onStzhChange:this.onCalendarChange}),i("div",{class:"stzh-datepicker__actions"},i("slot",{name:"action"}))),!this.inline&&i("stzh-input",{label:this.label,labelHidden:this.labelHidden,ref:function(e){return t.input=e},noAutocomplete:true,onStzhChanged:this.onInputChanged,readonly:this.readonly,disabled:this.disabled,description:this.description,descriptionLong:this.descriptionLong,error:this.error,invalid:this.invalid,required:this.required,showMarker:this.showMarker,size:this.size},i("stzh-popover",{ref:function(e){return t.popover=e},class:"stzh-datepicker__popover",slot:"button-right",placement:"bottom-end",label:this.label},i("stzh-button",{variant:"input","icon-only":true,icon:"calendar",disabled:this.disabled,a11yLabel:this.buttonLabel}),i("div",{slot:"content"},i("stzh-calendar",{ref:function(e){return t.calendar=e},isDateDisabled:this.calendarIsDateDisabled,min:this.calendarMin,max:this.calendarMax,onStzhChange:this.onCalendarChange}),i("div",{class:"stzh-datepicker__actions"},i("slot",{name:"action"})))))))};Object.defineProperty(t.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{localization:["createDateFormatters"],value:["valueWatcher"]}},enumerable:false,configurable:true});return t}());p.style=u;var z='.sc-stzh-radio-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-radio-h{display:none}.sc-stzh-radio-h *.sc-stzh-radio,.sc-stzh-radio-h *.sc-stzh-radio::before,.sc-stzh-radio-h *.sc-stzh-radio::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-radio-h .has-focus.sc-stzh-radio{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-radio-h .stzh-fylingfocus-focused.sc-stzh-radio{outline-style:none !important}.sc-stzh-radio-h .stzh-fylingfocus-focused.sc-stzh-radio::-moz-focus-inner{border:0 !important}.sc-stzh-radio-h{display:inline-block}.sc-stzh-radio-h .sc-stzh-radio-s>stzh-text{--color:inherit}.stzh-radio__marker-symbol.sc-stzh-radio{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular)}.stzh-radio__marker-text.sc-stzh-radio{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-radio__description-wrapper.sc-stzh-radio{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.stzh-radio__error.sc-stzh-radio,.stzh-radio__description.sc-stzh-radio{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);color:var(--stzh-base-color)}.stzh-radio__error.sc-stzh-radio{color:var(--stzh-color-error)}.stzh-radio__error-list.sc-stzh-radio{list-style:none;margin:0;padding:0}.stzh-radio__description.sc-stzh-radio{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.stzh-radio__description-long.sc-stzh-radio{margin-left:var(--stzh-space-xxsmall);margin-top:0.1875rem}.stzh-radio__description-long-popover.sc-stzh-radio{--width:auto;--max-width:27.3125rem}.stzh-radio__description-long-popover[open].sc-stzh-radio:not([open=false]) .stzh-radio__description-long-button.sc-stzh-radio{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-radio__description-long-button.sc-stzh-radio{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);color:var(--stzh-base-lead-color)}.stzh-radio__description-long-button.sc-stzh-radio:hover{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-radio.sc-stzh-radio stzh-icon.stzh-radio__description-long-icon.sc-stzh-radio{--size:var(--stzh-icon-size-xsmall)}.stzh-radio--has-error.sc-stzh-radio .stzh-radio__error.sc-stzh-radio,.stzh-radio--has-description.sc-stzh-radio .stzh-radio__description.sc-stzh-radio{margin-top:var(--stzh-space-xxsmall)}.stzh-radio__field-wrapper.sc-stzh-radio{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);position:relative;display:-ms-flexbox;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.stzh-radio__input.sc-stzh-radio{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;z-index:-1;opacity:0;pointer-events:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--stzh-form-input-border-radius)}.stzh-radio__mark.sc-stzh-radio{border:0.0625rem solid var(--stzh-color-grey61);background-color:var(--stzh-color-white);width:1.5rem;height:1.5rem;-ms-flex-negative:0;flex-shrink:0;border-radius:50%;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-transition:border-color var(--stzh-base-transition-animation-speed);transition:border-color var(--stzh-base-transition-animation-speed)}.stzh-radio__mark.sc-stzh-radio::before{content:""}.stzh-radio__check.sc-stzh-radio{background-color:currentColor;color:var(--stzh-color-primary, var(--stzh-color-zueriblue));width:0.5rem;height:0.5rem;border-radius:50%;opacity:0}@media (forced-colors: active), (-ms-high-contrast: active){.stzh-radio__check.sc-stzh-radio{background-color:ButtonText}}.stzh-radio__label.sc-stzh-radio{display:inline-block;color:var(--stzh-base-color);-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);margin-left:var(--stzh-space-small);line-height:1.5rem}.stzh-radio__label.sc-stzh-radio:empty{display:none}.stzh-radio__marker-symbol.sc-stzh-radio{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height)}.stzh-radio.sc-stzh-radio:hover .stzh-radio__label.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:checked:hover~.stzh-radio__label.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:checked:hover~.stzh-radio__mark.sc-stzh-radio .stzh-radio__check.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:checked:focus~.stzh-radio__mark.sc-stzh-radio .stzh-radio__check.sc-stzh-radio{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-radio__input.sc-stzh-radio:checked~.stzh-radio__label.sc-stzh-radio{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-radio.sc-stzh-radio:hover .stzh-radio__mark.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:focus:hover~.stzh-radio__mark.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:checked:hover~.stzh-radio__mark.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:checked:focus~.stzh-radio__mark.sc-stzh-radio{border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-radio__input.sc-stzh-radio:focus~.stzh-radio__mark.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:checked~.stzh-radio__mark.sc-stzh-radio{border-color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-radio__input.sc-stzh-radio:checked~.stzh-radio__mark.sc-stzh-radio .stzh-radio__check.sc-stzh-radio{opacity:1}.stzh-radio--is-invalid.sc-stzh-radio .stzh-radio__input.sc-stzh-radio~.stzh-radio__label.sc-stzh-radio,.stzh-radio--is-invalid.sc-stzh-radio .stzh-radio__input.sc-stzh-radio~.stzh-radio__mark.sc-stzh-radio .stzh-radio__check.sc-stzh-radio{color:var(--stzh-color-error)}.stzh-radio--is-invalid.sc-stzh-radio .stzh-radio__input.sc-stzh-radio~.stzh-radio__mark.sc-stzh-radio{border-color:var(--stzh-color-error)}.stzh-radio--is-disabled.sc-stzh-radio .stzh-radio__field-wrapper.sc-stzh-radio{cursor:not-allowed}.stzh-radio--is-disabled.sc-stzh-radio .stzh-radio__input.sc-stzh-radio~.stzh-radio__label.sc-stzh-radio,.stzh-radio--is-disabled.sc-stzh-radio .stzh-radio__input.sc-stzh-radio~.stzh-radio__mark.sc-stzh-radio .stzh-radio__check.sc-stzh-radio{color:var(--stzh-color-grey61)}.stzh-radio--is-disabled.sc-stzh-radio .stzh-radio__input.sc-stzh-radio~.stzh-radio__mark.sc-stzh-radio{border-color:transparent}.stzh-radio--is-disabled.sc-stzh-radio .stzh-radio__mark.sc-stzh-radio{background-color:var(--stzh-color-black8)}';var f=0;var g=t("stzh_radio",function(){function t(t){var i=this;e(this,t);this.stzhChange=r(this,"stzhChange",7);this.stzhFocus=r(this,"stzhFocus",7);this.stzhBlur=r(this,"stzhBlur",7);this.focusedByInput=false;this.onInput=function(t){i.checked=i.input.checked;i.stzhChange.emit({component:"stzh-radio",originalEvent:t,value:i.value,checked:i.checked})};this.onRootFocus=function(){if(!i.focusedByInput){i.setFocus()}i.focusedByInput=false};this.onFocus=function(t){i.focusedByInput=true;var e=new FocusEvent("focus",{view:window,bubbles:false,cancelable:false});i.element.dispatchEvent(e);i.stzhFocus.emit({component:"stzh-radio",originalEvent:t})};this.onBlur=function(t){var e=new FocusEvent("blur",{view:window,bubbles:false,cancelable:false});i.element.dispatchEvent(e);i.stzhBlur.emit({component:"stzh-radio",originalEvent:t})};this.localization=undefined;this.disabled=false;this.name="";this.value="";this.invalid=false;this.required=false;this.showMarker=false;this.checked=false;this.label="";this.description=undefined;this.descriptionLong=undefined;this.error=undefined;this.a11yDescribedby=""}t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.input.focus();return[2]}))}))};t.prototype.errorWatcher=function(t){if(typeof t==="string"){try{this._error=JSON.parse(t)}catch(e){if(t){this._error=[t]}else{this._error=[]}}}else if(t){this._error=t}else{this._error=[]}this.invalid=this._error.length>0};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:this.inputId="stzh-radio-".concat(f++);this.errorWatcher(this.error);if(!!this.localization)return[3,2];t=this;return[4,window.stzhComponents.utils.fetchTranslations(this.element,"radio")];case 1:t.localization=e.sent();e.label=2;case 2:return[2]}}))}))};t.prototype.render=function(){var t=this;var e=d(this.element,"description")||!!this.description;var r=d(this.element,"description-long")||!!this.descriptionLong;var o=d(this.element,"error")||!!this.error;var a={"stzh-radio":true,"stzh-radio--has-description":e,"stzh-radio--has-description-long":r,"stzh-radio--has-error":o,"stzh-radio--is-required":this.required,"stzh-radio--is-invalid":this.invalid,"stzh-radio--is-disabled":this.disabled};return i(s,{tabindex:this.disabled?null:"-1",onFocus:this.onRootFocus},i("div",{class:a},i("label",{class:"stzh-radio__field-wrapper"},i("input",{class:"stzh-radio__input",ref:function(e){return t.input=e},type:"radio",id:this.inputId,name:this.name,value:this.value,disabled:this.disabled,"aria-describedby":"".concat(this.inputId,"-description ").concat(this.a11yDescribedby),"aria-required":this.required?"true":"false","aria-invalid":this.invalid?"true":"false",checked:this.checked,onInput:this.onInput,onFocus:this.onFocus,onBlur:this.onBlur}),i("div",{class:"stzh-radio__mark"},i("div",{class:"stzh-radio__check"})),i("div",{class:"stzh-radio__label"},this.label?this.label:i("slot",null),this.showMarker&&i("span",{class:"stzh-radio__marker"},i("span",{class:"stzh-radio__marker-symbol","aria-hidden":"true"},this.required?this.localization.$globals.requiredFieldMarker:this.localization.$globals.optionalFieldMarker),i("span",{class:"stzh-radio__marker-text"},this.required?this.localization.$globals.requiredFieldText:this.localization.$globals.optionalFieldText)))),i(c,{classPrefix:"stzh-radio",id:"".concat(this.inputId,"-description"),error:this._error,description:this.description,descriptionLong:this.descriptionLong,descriptionLongUsed:r,moreInfoButtonLabel:this.localization.$globals.moreInfoButtonLabel})))};Object.defineProperty(t.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{error:["errorWatcher"]}},enumerable:false,configurable:true});return t}());g.style=z;var b=".sc-stzh-radiogroup-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-radiogroup-h{display:none}.sc-stzh-radiogroup-h *.sc-stzh-radiogroup,.sc-stzh-radiogroup-h *.sc-stzh-radiogroup::before,.sc-stzh-radiogroup-h *.sc-stzh-radiogroup::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-radiogroup-h .has-focus.sc-stzh-radiogroup{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-radiogroup-h .stzh-fylingfocus-focused.sc-stzh-radiogroup{outline-style:none !important}.sc-stzh-radiogroup-h .stzh-fylingfocus-focused.sc-stzh-radiogroup::-moz-focus-inner{border:0 !important}.sc-stzh-radiogroup-h[direction=vertical] .sc-stzh-radiogroup-s>stzh-radio:not(:last-child){margin-bottom:var(--stzh-space-medium)}.sc-stzh-radiogroup-h[direction=horizontal] .sc-stzh-radiogroup-s>stzh-radio:not(:last-child){margin-right:var(--stzh-space-large)}.stzh-radiogroup.sc-stzh-radiogroup{margin:0;padding:0;border:none}.stzh-radiogroup__marker-symbol.sc-stzh-radiogroup{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular)}.stzh-radiogroup__marker-text.sc-stzh-radiogroup{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-radiogroup__description-wrapper.sc-stzh-radiogroup{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.stzh-radiogroup__error.sc-stzh-radiogroup,.stzh-radiogroup__description.sc-stzh-radiogroup{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);color:var(--stzh-base-color)}.stzh-radiogroup__error.sc-stzh-radiogroup{color:var(--stzh-color-error)}.stzh-radiogroup__error-list.sc-stzh-radiogroup{list-style:none;margin:0;padding:0}.stzh-radiogroup__description.sc-stzh-radiogroup{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.stzh-radiogroup__description-long.sc-stzh-radiogroup{margin-left:var(--stzh-space-xxsmall);margin-top:0.1875rem}.stzh-radiogroup__description-long-popover.sc-stzh-radiogroup{--width:auto;--max-width:27.3125rem}.stzh-radiogroup__description-long-popover[open].sc-stzh-radiogroup:not([open=false]) .stzh-radiogroup__description-long-button.sc-stzh-radiogroup{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-radiogroup__description-long-button.sc-stzh-radiogroup{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);color:var(--stzh-base-lead-color)}.stzh-radiogroup__description-long-button.sc-stzh-radiogroup:hover{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-radiogroup.sc-stzh-radiogroup stzh-icon.stzh-radiogroup__description-long-icon.sc-stzh-radiogroup{--size:var(--stzh-icon-size-xsmall)}.stzh-radiogroup--has-error.sc-stzh-radiogroup .stzh-radiogroup__error.sc-stzh-radiogroup,.stzh-radiogroup--has-description.sc-stzh-radiogroup .stzh-radiogroup__description.sc-stzh-radiogroup{margin-top:var(--stzh-space-xxsmall)}.stzh-radiogroup__fields.sc-stzh-radiogroup{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:column;flex-direction:column}.stzh-radiogroup__legend.sc-stzh-radiogroup{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);padding:0;margin-bottom:var(--stzh-space-xsmall)}.stzh-radiogroup--hide-legend.sc-stzh-radiogroup .stzh-radiogroup__legend.sc-stzh-radiogroup{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-radiogroup--direction-horizontal.sc-stzh-radiogroup .stzh-radiogroup__fields.sc-stzh-radiogroup{-ms-flex-direction:row;flex-direction:row}";var v="stzh-radio, stzh-button[type=radio], stzh-card";var m=0;var _=t("stzh_radiogroup",function(){function t(t){var r=this;e(this,t);this._preventUpdateProperties=[];this.init=function(){r.radios=Array.from(r.element.querySelectorAll(v));r.updateRadiosProperty("show-marker",false);r.updateRadiosProperty("a11y-describedby","".concat(r.radiogroupId,"-description"));r.watchValue(r.value);r.watchName(r.name);r.watchDisabled(r.disabled);r.watchInvalid(r.invalid);r.watchRequired(r.required)};this.localization=undefined;this.disabled=false;this.name=undefined;this.legend=undefined;this.hideLegend=false;this.invalid=false;this.required=false;this.showMarker=false;this.value="";this.direction="vertical";this.description=undefined;this.descriptionLong=undefined;this.error=undefined;this.checkedRadio=null;this.preventUpdateProperties=[]}t.prototype.watchName=function(t){this.updateRadiosProperty("name",t)};t.prototype.watchDisabled=function(t){this.updateRadiosProperty("disabled",t)};t.prototype.watchInvalid=function(t){this.updateRadiosProperty("invalid",t)};t.prototype.watchRequired=function(t){this.updateRadiosProperty("required",t)};t.prototype.watchValue=function(t){this.updateCheckedRadioByValue(t)};t.prototype.errorWatcher=function(t){if(typeof t==="string"){try{this._error=JSON.parse(t)}catch(e){if(t){this._error=[t]}else{this._error=[]}}}else if(t){this._error=t}else{this._error=[]}this.invalid=this._error.length>0};t.prototype.preventUpdatePropertiesWatcher=function(t){if(typeof t==="string"){this._preventUpdateProperties=JSON.parse(t)}else{this._preventUpdateProperties=t}};t.prototype.onChange=function(t){this.value=t.detail.value};t.prototype.updateRadiosProperty=function(t,e){var r=this;this.radios.forEach((function(i){if(t==="name"||r._preventUpdateProperties.indexOf(t)===-1){i[l(t)]=e}}))};t.prototype.updateCheckedRadioByValue=function(t){this.checkedRadio=this.radios.find((function(e){return e.value===t}));if(this.checkedRadio){this.checkedRadio.checked=true}this.uncheckRadios()};t.prototype.uncheckRadios=function(){var t=this;this.radios.forEach((function(e){if(!t.checkedRadio||e!==t.checkedRadio){e.checked=false}}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:this.radiogroupId="stzh-radiogroup-".concat(m++);this.errorWatcher(this.error);this.preventUpdatePropertiesWatcher(this.preventUpdateProperties);if(!!this.localization)return[3,2];t=this;return[4,window.stzhComponents.utils.fetchTranslations(this.element,"radiogroup")];case 1:t.localization=e.sent();e.label=2;case 2:return[2]}}))}))};t.prototype.componentShouldUpdate=function(t,e,r){return r!=="checkedRadio"};t.prototype.componentDidRender=function(){this.init()};t.prototype.connectedCallback=function(){if(!this.value){this.radios=Array.from(this.element.querySelectorAll(v));var t=this.radios.find((function(t){return t.checked}));if(t){this.value=t.value}}this.observer=new MutationObserver(this.init);this.observer.observe(this.element,{childList:true,subtree:true})};t.prototype.disconnectedCallback=function(){if(this.observer){this.observer.disconnect()}};t.prototype.render=function(){var t;var e=d(this.element,"description")||!!this.description;var r=d(this.element,"description-long")||!!this.descriptionLong;var o=d(this.element,"error")||!!this.error;var s=(t={"stzh-radiogroup":true,"stzh-radiogroup--has-description":e,"stzh-radiogroup--has-description-long":r,"stzh-radiogroup--has-error":o,"stzh-radiogroup--is-required":this.required,"stzh-radiogroup--is-disabled":this.disabled,"stzh-radiogroup--is-invalid":this.invalid,"stzh-radiogroup--hide-legend":this.hideLegend},t["stzh-radiogroup--direction-".concat(this.direction)]=!!this.direction,t);return i("fieldset",{class:s},this.legend&&i("legend",{class:"stzh-radiogroup__legend"},this.legend,this.showMarker&&i("span",{class:"stzh-radiogroup__marker"},i("span",{class:"stzh-radiogroup__marker-symbol","aria-hidden":"true"},this.required?this.localization.$globals.requiredFieldMarker:this.localization.$globals.optionalFieldMarker),i("span",{class:"stzh-radiogroup__marker-text"},this.required?this.localization.$globals.requiredFieldText:this.localization.$globals.optionalFieldText))),i("div",{class:"stzh-radiogroup__fields"},i("slot",null)),i(c,{classPrefix:"stzh-radiogroup",id:"".concat(this.radiogroupId,"-description"),error:this._error,description:this.description,descriptionLong:this.descriptionLong,descriptionLongUsed:r,moreInfoButtonLabel:this.localization.$globals.moreInfoButtonLabel}))};Object.defineProperty(t.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{name:["watchName"],disabled:["watchDisabled"],invalid:["watchInvalid"],required:["watchRequired"],value:["watchValue"],error:["errorWatcher"],preventUpdateProperties:["preventUpdatePropertiesWatcher"]}},enumerable:false,configurable:true});return t}());_.style=b}}}));
2
- //# sourceMappingURL=p-ff356dc8.system.entry.js.map