@ecl/preset-ec 5.0.0-alpha.2 → 5.0.0-alpha.21

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 (303) hide show
  1. package/dist/fonts/InterVariable-Italic.woff2 +0 -0
  2. package/dist/fonts/InterVariable.woff2 +0 -0
  3. package/dist/fonts/version.txt +1 -0
  4. package/dist/images/logo/negative/all.json +1 -0
  5. package/dist/images/logo/negative/esm-export.js +504 -0
  6. package/dist/images/logo/negative/logo-ec--gl.svg +251 -0
  7. package/dist/images/logo/negative/logo-ec--kl.svg +251 -0
  8. package/dist/images/logo/positive/all.json +1 -0
  9. package/dist/images/logo/positive/esm-export.js +496 -0
  10. package/dist/images/logo/positive/logo-ec--gl.svg +247 -0
  11. package/dist/images/logo/positive/logo-ec--kl.svg +247 -0
  12. package/dist/scripts/ecl-ec.js +13 -13
  13. package/dist/scripts/ecl-esm-ec.js +13 -13
  14. package/dist/styles/ecl-ec-color-modes.css +1 -2
  15. package/dist/styles/ecl-ec-color-modes.css.map +1 -1
  16. package/dist/styles/ecl-ec-print.css +1 -2
  17. package/dist/styles/ecl-ec-print.css.map +1 -1
  18. package/dist/styles/ecl-ec.css +2 -3
  19. package/dist/styles/ecl-ec.css.map +1 -1
  20. package/dist/styles/optional/ecl-ec-default-print.css +1 -1
  21. package/dist/styles/optional/ecl-ec-default.css +1 -1
  22. package/dist/styles/optional/ecl-ec-easy-to-read.css +1 -1
  23. package/dist/styles/optional/ecl-ec-utilities.css +1 -2
  24. package/dist/styles/optional/ecl-ec-utilities.css.map +1 -1
  25. package/dist/styles/optional/ecl-reset.css +1 -1
  26. package/fonts/InterVariable-Italic.woff2 +0 -0
  27. package/fonts/InterVariable.woff2 +0 -0
  28. package/fonts/version.txt +1 -0
  29. package/package.json +89 -90
  30. package/dist/images/icons/lists/all.json +0 -1
  31. package/dist/images/icons/sprites/icons.svg +0 -1
  32. package/dist/images/icons/svg/all/arrow-left.svg +0 -1
  33. package/dist/images/icons/svg/all/audio.svg +0 -1
  34. package/dist/images/icons/svg/all/book.svg +0 -1
  35. package/dist/images/icons/svg/all/brochure.svg +0 -1
  36. package/dist/images/icons/svg/all/budget.svg +0 -1
  37. package/dist/images/icons/svg/all/calendar.svg +0 -1
  38. package/dist/images/icons/svg/all/camera.svg +0 -1
  39. package/dist/images/icons/svg/all/chain.svg +0 -1
  40. package/dist/images/icons/svg/all/check-filled.svg +0 -1
  41. package/dist/images/icons/svg/all/check.svg +0 -1
  42. package/dist/images/icons/svg/all/clock-filled.svg +0 -1
  43. package/dist/images/icons/svg/all/clock.svg +0 -1
  44. package/dist/images/icons/svg/all/close-filled.svg +0 -1
  45. package/dist/images/icons/svg/all/close-outline.svg +0 -1
  46. package/dist/images/icons/svg/all/close.svg +0 -1
  47. package/dist/images/icons/svg/all/copy.svg +0 -1
  48. package/dist/images/icons/svg/all/corner-arrow.svg +0 -1
  49. package/dist/images/icons/svg/all/data.svg +0 -1
  50. package/dist/images/icons/svg/all/digital.svg +0 -1
  51. package/dist/images/icons/svg/all/document.svg +0 -1
  52. package/dist/images/icons/svg/all/download.svg +0 -1
  53. package/dist/images/icons/svg/all/edit.svg +0 -1
  54. package/dist/images/icons/svg/all/email.svg +0 -1
  55. package/dist/images/icons/svg/all/energy.svg +0 -1
  56. package/dist/images/icons/svg/all/error-outline.svg +0 -1
  57. package/dist/images/icons/svg/all/error.svg +0 -1
  58. package/dist/images/icons/svg/all/euro.svg +0 -1
  59. package/dist/images/icons/svg/all/event.svg +0 -1
  60. package/dist/images/icons/svg/all/external-events.svg +0 -1
  61. package/dist/images/icons/svg/all/external.svg +0 -1
  62. package/dist/images/icons/svg/all/eye.svg +0 -1
  63. package/dist/images/icons/svg/all/faq.svg +0 -1
  64. package/dist/images/icons/svg/all/feedback.svg +0 -1
  65. package/dist/images/icons/svg/all/file-blank.svg +0 -1
  66. package/dist/images/icons/svg/all/file.svg +0 -1
  67. package/dist/images/icons/svg/all/folder.svg +0 -1
  68. package/dist/images/icons/svg/all/fullscreen.svg +0 -1
  69. package/dist/images/icons/svg/all/global.svg +0 -1
  70. package/dist/images/icons/svg/all/growth.svg +0 -1
  71. package/dist/images/icons/svg/all/hamburger.svg +0 -1
  72. package/dist/images/icons/svg/all/image.svg +0 -1
  73. package/dist/images/icons/svg/all/infographic.svg +0 -1
  74. package/dist/images/icons/svg/all/information-outline.svg +0 -1
  75. package/dist/images/icons/svg/all/information-round.svg +0 -1
  76. package/dist/images/icons/svg/all/information.svg +0 -1
  77. package/dist/images/icons/svg/all/laco-filled.svg +0 -1
  78. package/dist/images/icons/svg/all/laco.svg +0 -1
  79. package/dist/images/icons/svg/all/list.svg +0 -1
  80. package/dist/images/icons/svg/all/livestreaming.svg +0 -1
  81. package/dist/images/icons/svg/all/location-filled.svg +0 -1
  82. package/dist/images/icons/svg/all/location.svg +0 -1
  83. package/dist/images/icons/svg/all/log-in-outline.svg +0 -1
  84. package/dist/images/icons/svg/all/log-in.svg +0 -1
  85. package/dist/images/icons/svg/all/logged-in.svg +0 -1
  86. package/dist/images/icons/svg/all/minus-outline.svg +0 -1
  87. package/dist/images/icons/svg/all/minus.svg +0 -1
  88. package/dist/images/icons/svg/all/multiple-files.svg +0 -1
  89. package/dist/images/icons/svg/all/notification-active.svg +0 -1
  90. package/dist/images/icons/svg/all/notification.svg +0 -1
  91. package/dist/images/icons/svg/all/organigram.svg +0 -1
  92. package/dist/images/icons/svg/all/package.svg +0 -1
  93. package/dist/images/icons/svg/all/pause-filled.svg +0 -1
  94. package/dist/images/icons/svg/all/pause-outline.svg +0 -1
  95. package/dist/images/icons/svg/all/pause.svg +0 -1
  96. package/dist/images/icons/svg/all/play-filled.svg +0 -1
  97. package/dist/images/icons/svg/all/play-outline.svg +0 -1
  98. package/dist/images/icons/svg/all/play.svg +0 -1
  99. package/dist/images/icons/svg/all/plus-filled.svg +0 -1
  100. package/dist/images/icons/svg/all/plus-outline.svg +0 -1
  101. package/dist/images/icons/svg/all/plus.svg +0 -1
  102. package/dist/images/icons/svg/all/presentation.svg +0 -1
  103. package/dist/images/icons/svg/all/print.svg +0 -1
  104. package/dist/images/icons/svg/all/regulation.svg +0 -1
  105. package/dist/images/icons/svg/all/rss.svg +0 -1
  106. package/dist/images/icons/svg/all/search.svg +0 -1
  107. package/dist/images/icons/svg/all/settings.svg +0 -1
  108. package/dist/images/icons/svg/all/share-filled.svg +0 -1
  109. package/dist/images/icons/svg/all/share.svg +0 -1
  110. package/dist/images/icons/svg/all/shopping-bag.svg +0 -1
  111. package/dist/images/icons/svg/all/solid-arrow.svg +0 -1
  112. package/dist/images/icons/svg/all/sort-carets.svg +0 -1
  113. package/dist/images/icons/svg/all/spinner.svg +0 -1
  114. package/dist/images/icons/svg/all/spreadsheet.svg +0 -1
  115. package/dist/images/icons/svg/all/star-filled.svg +0 -1
  116. package/dist/images/icons/svg/all/star-outline.svg +0 -1
  117. package/dist/images/icons/svg/all/tag.svg +0 -1
  118. package/dist/images/icons/svg/all/trash.svg +0 -1
  119. package/dist/images/icons/svg/all/upload.svg +0 -1
  120. package/dist/images/icons/svg/all/warning-outline.svg +0 -1
  121. package/dist/images/icons/svg/all/warning-round.svg +0 -1
  122. package/dist/images/icons/svg/all/warning.svg +0 -1
  123. package/dist/images/icons-flag/lists/members/all.json +0 -1
  124. package/dist/images/icons-flag/lists/non-members/all.json +0 -1
  125. package/dist/images/icons-flag/sprites/icons-flag-non-members.svg +0 -1
  126. package/dist/images/icons-flag/sprites/icons-flag.svg +0 -1
  127. package/dist/images/icons-flag/svg/members/EU-square.svg +0 -1
  128. package/dist/images/icons-flag/svg/members/EU.svg +0 -1
  129. package/dist/images/icons-flag/svg/members/austria-square.svg +0 -1
  130. package/dist/images/icons-flag/svg/members/austria.svg +0 -1
  131. package/dist/images/icons-flag/svg/members/belgium-square.svg +0 -1
  132. package/dist/images/icons-flag/svg/members/belgium.svg +0 -1
  133. package/dist/images/icons-flag/svg/members/bulgaria-square.svg +0 -1
  134. package/dist/images/icons-flag/svg/members/bulgaria.svg +0 -1
  135. package/dist/images/icons-flag/svg/members/croatia-square.svg +0 -1
  136. package/dist/images/icons-flag/svg/members/croatia.svg +0 -1
  137. package/dist/images/icons-flag/svg/members/cyprus-square.svg +0 -1
  138. package/dist/images/icons-flag/svg/members/cyprus.svg +0 -1
  139. package/dist/images/icons-flag/svg/members/czech-republic-square.svg +0 -1
  140. package/dist/images/icons-flag/svg/members/czech-republic.svg +0 -1
  141. package/dist/images/icons-flag/svg/members/denmark-square.svg +0 -1
  142. package/dist/images/icons-flag/svg/members/denmark.svg +0 -1
  143. package/dist/images/icons-flag/svg/members/estonia-square.svg +0 -1
  144. package/dist/images/icons-flag/svg/members/estonia.svg +0 -1
  145. package/dist/images/icons-flag/svg/members/finland-square.svg +0 -1
  146. package/dist/images/icons-flag/svg/members/finland.svg +0 -1
  147. package/dist/images/icons-flag/svg/members/france-square.svg +0 -1
  148. package/dist/images/icons-flag/svg/members/france.svg +0 -1
  149. package/dist/images/icons-flag/svg/members/germany-square.svg +0 -1
  150. package/dist/images/icons-flag/svg/members/germany.svg +0 -1
  151. package/dist/images/icons-flag/svg/members/greece-square.svg +0 -1
  152. package/dist/images/icons-flag/svg/members/greece.svg +0 -1
  153. package/dist/images/icons-flag/svg/members/hungary-square.svg +0 -1
  154. package/dist/images/icons-flag/svg/members/hungary.svg +0 -1
  155. package/dist/images/icons-flag/svg/members/ireland-square.svg +0 -1
  156. package/dist/images/icons-flag/svg/members/ireland.svg +0 -1
  157. package/dist/images/icons-flag/svg/members/italy-square.svg +0 -1
  158. package/dist/images/icons-flag/svg/members/italy.svg +0 -1
  159. package/dist/images/icons-flag/svg/members/latvia-square.svg +0 -1
  160. package/dist/images/icons-flag/svg/members/latvia.svg +0 -1
  161. package/dist/images/icons-flag/svg/members/lithuania-square.svg +0 -1
  162. package/dist/images/icons-flag/svg/members/lithuania.svg +0 -1
  163. package/dist/images/icons-flag/svg/members/luxembourg-square.svg +0 -1
  164. package/dist/images/icons-flag/svg/members/luxembourg.svg +0 -1
  165. package/dist/images/icons-flag/svg/members/malta-square.svg +0 -1
  166. package/dist/images/icons-flag/svg/members/malta.svg +0 -1
  167. package/dist/images/icons-flag/svg/members/netherlands-square.svg +0 -1
  168. package/dist/images/icons-flag/svg/members/netherlands.svg +0 -1
  169. package/dist/images/icons-flag/svg/members/poland-square.svg +0 -1
  170. package/dist/images/icons-flag/svg/members/poland.svg +0 -1
  171. package/dist/images/icons-flag/svg/members/portugal-square.svg +0 -1
  172. package/dist/images/icons-flag/svg/members/portugal.svg +0 -1
  173. package/dist/images/icons-flag/svg/members/romania-square.svg +0 -1
  174. package/dist/images/icons-flag/svg/members/romania.svg +0 -1
  175. package/dist/images/icons-flag/svg/members/slovakia-square.svg +0 -1
  176. package/dist/images/icons-flag/svg/members/slovakia.svg +0 -1
  177. package/dist/images/icons-flag/svg/members/slovenia-square.svg +0 -1
  178. package/dist/images/icons-flag/svg/members/slovenia.svg +0 -1
  179. package/dist/images/icons-flag/svg/members/spain-square.svg +0 -1
  180. package/dist/images/icons-flag/svg/members/spain.svg +0 -1
  181. package/dist/images/icons-flag/svg/members/sweden-square.svg +0 -1
  182. package/dist/images/icons-flag/svg/members/sweden.svg +0 -1
  183. package/dist/images/icons-flag/svg/non-members/albania-square.svg +0 -1
  184. package/dist/images/icons-flag/svg/non-members/albania.svg +0 -1
  185. package/dist/images/icons-flag/svg/non-members/armenia-square.svg +0 -1
  186. package/dist/images/icons-flag/svg/non-members/armenia.svg +0 -1
  187. package/dist/images/icons-flag/svg/non-members/bosnia-and-herzegovina-square.svg +0 -1
  188. package/dist/images/icons-flag/svg/non-members/bosnia-and-herzegovina.svg +0 -1
  189. package/dist/images/icons-flag/svg/non-members/georgia-square.svg +0 -1
  190. package/dist/images/icons-flag/svg/non-members/georgia.svg +0 -1
  191. package/dist/images/icons-flag/svg/non-members/iceland-square.svg +0 -1
  192. package/dist/images/icons-flag/svg/non-members/iceland.svg +0 -1
  193. package/dist/images/icons-flag/svg/non-members/israel-square.svg +0 -1
  194. package/dist/images/icons-flag/svg/non-members/israel.svg +0 -1
  195. package/dist/images/icons-flag/svg/non-members/liechtenstein-square.svg +0 -1
  196. package/dist/images/icons-flag/svg/non-members/liechtenstein.svg +0 -1
  197. package/dist/images/icons-flag/svg/non-members/moldova-square.svg +0 -1
  198. package/dist/images/icons-flag/svg/non-members/moldova.svg +0 -1
  199. package/dist/images/icons-flag/svg/non-members/montenegro-square.svg +0 -1
  200. package/dist/images/icons-flag/svg/non-members/montenegro.svg +0 -1
  201. package/dist/images/icons-flag/svg/non-members/north-macedonia-square.svg +0 -1
  202. package/dist/images/icons-flag/svg/non-members/north-macedonia.svg +0 -1
  203. package/dist/images/icons-flag/svg/non-members/norway-square.svg +0 -1
  204. package/dist/images/icons-flag/svg/non-members/norway.svg +0 -1
  205. package/dist/images/icons-flag/svg/non-members/serbia-square.svg +0 -1
  206. package/dist/images/icons-flag/svg/non-members/serbia.svg +0 -1
  207. package/dist/images/icons-flag/svg/non-members/switzerland-square.svg +0 -1
  208. package/dist/images/icons-flag/svg/non-members/switzerland.svg +0 -1
  209. package/dist/images/icons-flag/svg/non-members/turkey-square.svg +0 -1
  210. package/dist/images/icons-flag/svg/non-members/turkey.svg +0 -1
  211. package/dist/images/icons-flag/svg/non-members/ukraine-square.svg +0 -1
  212. package/dist/images/icons-flag/svg/non-members/ukraine.svg +0 -1
  213. package/dist/images/icons-flag/svg/non-members/united-kingdom-square.svg +0 -1
  214. package/dist/images/icons-flag/svg/non-members/united-kingdom.svg +0 -1
  215. package/dist/images/icons-social-media/lists/all.json +0 -1
  216. package/dist/images/icons-social-media/lists/social-media.json +0 -1
  217. package/dist/images/icons-social-media/sprites/icons-social-media.svg +0 -1
  218. package/dist/images/icons-social-media/svg/social-media/blog-color.svg +0 -1
  219. package/dist/images/icons-social-media/svg/social-media/blog-negative.svg +0 -1
  220. package/dist/images/icons-social-media/svg/social-media/blog.svg +0 -1
  221. package/dist/images/icons-social-media/svg/social-media/bluesky-color.svg +0 -1
  222. package/dist/images/icons-social-media/svg/social-media/bluesky-negative.svg +0 -1
  223. package/dist/images/icons-social-media/svg/social-media/bluesky.svg +0 -1
  224. package/dist/images/icons-social-media/svg/social-media/chain-color.svg +0 -1
  225. package/dist/images/icons-social-media/svg/social-media/chain-negative.svg +0 -1
  226. package/dist/images/icons-social-media/svg/social-media/chain.svg +0 -1
  227. package/dist/images/icons-social-media/svg/social-media/email-color.svg +0 -1
  228. package/dist/images/icons-social-media/svg/social-media/email-negative.svg +0 -1
  229. package/dist/images/icons-social-media/svg/social-media/email.svg +0 -1
  230. package/dist/images/icons-social-media/svg/social-media/facebook-color.svg +0 -1
  231. package/dist/images/icons-social-media/svg/social-media/facebook-negative.svg +0 -1
  232. package/dist/images/icons-social-media/svg/social-media/facebook.svg +0 -1
  233. package/dist/images/icons-social-media/svg/social-media/flickr-color.svg +0 -1
  234. package/dist/images/icons-social-media/svg/social-media/flickr-negative.svg +0 -1
  235. package/dist/images/icons-social-media/svg/social-media/flickr.svg +0 -1
  236. package/dist/images/icons-social-media/svg/social-media/foursquare-color.svg +0 -1
  237. package/dist/images/icons-social-media/svg/social-media/foursquare-negative.svg +0 -1
  238. package/dist/images/icons-social-media/svg/social-media/foursquare.svg +0 -1
  239. package/dist/images/icons-social-media/svg/social-media/gmail-color.svg +0 -1
  240. package/dist/images/icons-social-media/svg/social-media/instagram-color.svg +0 -1
  241. package/dist/images/icons-social-media/svg/social-media/instagram-negative.svg +0 -1
  242. package/dist/images/icons-social-media/svg/social-media/instagram.svg +0 -1
  243. package/dist/images/icons-social-media/svg/social-media/linkedin-color.svg +0 -1
  244. package/dist/images/icons-social-media/svg/social-media/linkedin-negative.svg +0 -1
  245. package/dist/images/icons-social-media/svg/social-media/linkedin.svg +0 -1
  246. package/dist/images/icons-social-media/svg/social-media/mastodon-color.svg +0 -1
  247. package/dist/images/icons-social-media/svg/social-media/mastodon-negative.svg +0 -1
  248. package/dist/images/icons-social-media/svg/social-media/mastodon.svg +0 -1
  249. package/dist/images/icons-social-media/svg/social-media/messenger-color.svg +0 -1
  250. package/dist/images/icons-social-media/svg/social-media/messenger-negative.svg +0 -1
  251. package/dist/images/icons-social-media/svg/social-media/messenger.svg +0 -1
  252. package/dist/images/icons-social-media/svg/social-media/pinterest-color.svg +0 -1
  253. package/dist/images/icons-social-media/svg/social-media/pinterest-negative.svg +0 -1
  254. package/dist/images/icons-social-media/svg/social-media/pinterest.svg +0 -1
  255. package/dist/images/icons-social-media/svg/social-media/qzone-color.svg +0 -1
  256. package/dist/images/icons-social-media/svg/social-media/qzone-negative.svg +0 -1
  257. package/dist/images/icons-social-media/svg/social-media/qzone.svg +0 -1
  258. package/dist/images/icons-social-media/svg/social-media/reddit-color.svg +0 -1
  259. package/dist/images/icons-social-media/svg/social-media/reddit-negative.svg +0 -1
  260. package/dist/images/icons-social-media/svg/social-media/reddit.svg +0 -1
  261. package/dist/images/icons-social-media/svg/social-media/rss-color.svg +0 -1
  262. package/dist/images/icons-social-media/svg/social-media/rss-negative.svg +0 -1
  263. package/dist/images/icons-social-media/svg/social-media/rss.svg +0 -1
  264. package/dist/images/icons-social-media/svg/social-media/skype-color.svg +0 -1
  265. package/dist/images/icons-social-media/svg/social-media/skype-negative.svg +0 -1
  266. package/dist/images/icons-social-media/svg/social-media/skype.svg +0 -1
  267. package/dist/images/icons-social-media/svg/social-media/sms-color.svg +0 -1
  268. package/dist/images/icons-social-media/svg/social-media/sms-negative.svg +0 -1
  269. package/dist/images/icons-social-media/svg/social-media/sms.svg +0 -1
  270. package/dist/images/icons-social-media/svg/social-media/spotify-color.svg +0 -1
  271. package/dist/images/icons-social-media/svg/social-media/spotify-negative.svg +0 -1
  272. package/dist/images/icons-social-media/svg/social-media/spotify.svg +0 -1
  273. package/dist/images/icons-social-media/svg/social-media/telegram-color.svg +0 -1
  274. package/dist/images/icons-social-media/svg/social-media/telegram-negative.svg +0 -1
  275. package/dist/images/icons-social-media/svg/social-media/telegram.svg +0 -1
  276. package/dist/images/icons-social-media/svg/social-media/threads-color.svg +0 -1
  277. package/dist/images/icons-social-media/svg/social-media/threads-negative.svg +0 -1
  278. package/dist/images/icons-social-media/svg/social-media/threads.svg +0 -1
  279. package/dist/images/icons-social-media/svg/social-media/twitter-color.svg +0 -1
  280. package/dist/images/icons-social-media/svg/social-media/twitter-negative.svg +0 -1
  281. package/dist/images/icons-social-media/svg/social-media/twitter.svg +0 -1
  282. package/dist/images/icons-social-media/svg/social-media/typepad-color.svg +0 -1
  283. package/dist/images/icons-social-media/svg/social-media/typepad-negative.svg +0 -1
  284. package/dist/images/icons-social-media/svg/social-media/typepad.svg +0 -1
  285. package/dist/images/icons-social-media/svg/social-media/vimeo-color.svg +0 -1
  286. package/dist/images/icons-social-media/svg/social-media/vimeo-negative.svg +0 -1
  287. package/dist/images/icons-social-media/svg/social-media/vimeo.svg +0 -1
  288. package/dist/images/icons-social-media/svg/social-media/weibo-color.svg +0 -1
  289. package/dist/images/icons-social-media/svg/social-media/weibo-negative.svg +0 -1
  290. package/dist/images/icons-social-media/svg/social-media/weibo.svg +0 -1
  291. package/dist/images/icons-social-media/svg/social-media/whatsapp-color.svg +0 -1
  292. package/dist/images/icons-social-media/svg/social-media/whatsapp-negative.svg +0 -1
  293. package/dist/images/icons-social-media/svg/social-media/whatsapp.svg +0 -1
  294. package/dist/images/icons-social-media/svg/social-media/yahoomail-color.svg +0 -1
  295. package/dist/images/icons-social-media/svg/social-media/yahoomail-negative.svg +0 -1
  296. package/dist/images/icons-social-media/svg/social-media/yahoomail.svg +0 -1
  297. package/dist/images/icons-social-media/svg/social-media/yammer-color.svg +0 -1
  298. package/dist/images/icons-social-media/svg/social-media/yammer-negative.svg +0 -1
  299. package/dist/images/icons-social-media/svg/social-media/yammer.svg +0 -1
  300. package/dist/images/icons-social-media/svg/social-media/youtube-color.svg +0 -1
  301. package/dist/images/icons-social-media/svg/social-media/youtube-negative.svg +0 -1
  302. package/dist/images/icons-social-media/svg/social-media/youtube.svg +0 -1
  303. package/dist/styles/optional/ecl-rtl.css +0 -1
@@ -1,24 +1,24 @@
1
- /* @ecl/preset-ec - 5.0.0-alpha.2 Built on 2025-01-31T08:08:43.405Z */
2
- Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){for(var t=this;t;){if(t.matches(e))return t;t=t.parentElement}return null});var e=function(e,t){return void 0===t&&(t=document),[].slice.call(t.querySelectorAll(e))},t=function(e,t){return void 0===t&&(t=document),t.querySelector(e)};class i{constructor(){this.events=new Map}on(e,t){this.events.has(e)||this.events.set(e,[]),this.events.get(e).push(t)}trigger(e,t){var i=this.events.get(e);i&&i.forEach((e=>{e(t)}))}getCallback(e){return this.events.get(e)||[]}}class s{static autoInit(e,t){var i=(void 0===t?{}:t).ACCORDION,n=new s(e,void 0===i?{}:i);return n.init(),e.ECLAccordion=n,n}constructor(e,t){var s=void 0===t?{}:t,n=s.toggleSelector,l=void 0===n?"[data-ecl-accordion-toggle]":n,a=s.iconSelector,r=void 0===a?"[data-ecl-accordion-icon]":a,o=s.attachClickListener,h=void 0===o||o;if(this.supportedEvents=["onToggle"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.toggleSelector=l,this.iconSelector=r,this.attachClickListener=h,this.toggles=null,this.forceClose=!1,this.target=null,this.handleClickOnToggle=this.handleClickOnToggle.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.toggles=e(this.toggleSelector,this.element),this.attachClickListener&&this.toggles&&this.toggles.forEach((e=>{e.addEventListener("click",(()=>this.handleClickOnToggle(e)))})),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachClickListener&&this.toggles&&this.toggles.forEach((e=>{e.replaceWith(e.cloneNode(!0))})),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnToggle(e){var i=!1,s=t("#"+e.getAttribute("aria-controls"),this.element);if(!s)throw new TypeError("Target has to be provided for accordion (aria-controls)");var n=!0===this.forceClose||"true"===e.getAttribute("aria-expanded");e.setAttribute("aria-expanded",n?"false":"true"),n?s.hidden=!0:(s.hidden=!1,i=!0);var l={item:s,isOpening:i};this.trigger("onToggle",l)}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=Array(t);i<t;i++)s[i]=e[i];return s}function l(e,t,i,s,n,l,a){try{var r=e[l](a),o=r.value}catch(e){return void i(e)}r.done?t(o):Promise.resolve(o).then(s,n)}function a(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var r=0;function o(e){return"__private_"+r+++"_"+e}function h(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},c.apply(null,arguments)}function d(){d=function(){return t};var e,t={},i=Object.prototype,s=i.hasOwnProperty,n=Object.defineProperty||function(e,t,i){e[t]=i.value},l="function"==typeof Symbol?Symbol:{},a=l.iterator||"@@iterator",r=l.asyncIterator||"@@asyncIterator",o=l.toStringTag||"@@toStringTag";function h(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,i){return e[t]=i}}function c(e,t,i,s){var l=t&&t.prototype instanceof f?t:f,a=Object.create(l.prototype),r=new P(s||[]);return n(a,"_invoke",{value:A(e,i,r)}),a}function u(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var m="suspendedStart",p="suspendedYield",v="executing",g="completed",b={};function f(){}function y(){}function L(){}var E={};h(E,a,(function(){return this}));var C=Object.getPrototypeOf,w=C&&C(C(I([])));w&&w!==i&&s.call(w,a)&&(E=w);var k=L.prototype=f.prototype=Object.create(E);function S(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(n,l,a,r){var o=u(e[n],e,l);if("throw"!==o.type){var h=o.arg,c=h.value;return c&&"object"==typeof c&&s.call(c,"__await")?t.resolve(c.__await).then((function(e){i("next",e,a,r)}),(function(e){i("throw",e,a,r)})):t.resolve(c).then((function(e){h.value=e,a(h)}),(function(e){return i("throw",e,a,r)}))}r(o.arg)}var l;n(this,"_invoke",{value:function(e,s){function n(){return new t((function(t,n){i(e,s,t,n)}))}return l=l?l.then(n,n):n()}})}function A(t,i,s){var n=m;return function(l,a){if(n===v)throw Error("Generator is already running");if(n===g){if("throw"===l)throw a;return{value:e,done:!0}}for(s.method=l,s.arg=a;;){var r=s.delegate;if(r){var o=_(r,s);if(o){if(o===b)continue;return o}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(n===m)throw n=g,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);n=v;var h=u(t,i,s);if("normal"===h.type){if(n=s.done?g:p,h.arg===b)continue;return{value:h.arg,done:s.done}}"throw"===h.type&&(n=g,s.method="throw",s.arg=h.arg)}}}function _(t,i){var s=i.method,n=t.iterator[s];if(n===e)return i.delegate=null,"throw"===s&&t.iterator.return&&(i.method="return",i.arg=e,_(t,i),"throw"===i.method)||"return"!==s&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+s+"' method")),b;var l=u(n,t.iterator,i.arg);if("throw"===l.type)return i.method="throw",i.arg=l.arg,i.delegate=null,b;var a=l.arg;return a?a.done?(i[t.resultName]=a.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=e),i.delegate=null,b):a:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,b)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function I(t){if(t||""===t){var i=t[a];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,l=function i(){for(;++n<t.length;)if(s.call(t,n))return i.value=t[n],i.done=!1,i;return i.value=e,i.done=!0,i};return l.next=l}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=L,n(k,"constructor",{value:L,configurable:!0}),n(L,"constructor",{value:y,configurable:!0}),y.displayName=h(L,o,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,L):(e.__proto__=L,h(e,o,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},S(x.prototype),h(x.prototype,r,(function(){return this})),t.AsyncIterator=x,t.async=function(e,i,s,n,l){void 0===l&&(l=Promise);var a=new x(c(e,i,s,n),l);return t.isGeneratorFunction(i)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(k),h(k,o,"Generator"),h(k,a,(function(){return this})),h(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),i=[];for(var s in t)i.push(s);return i.reverse(),function e(){for(;i.length;){var s=i.pop();if(s in t)return e.value=s,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var i in this)"t"===i.charAt(0)&&s.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var i=this;function n(s,n){return r.type="throw",r.arg=t,i.next=s,n&&(i.method="next",i.arg=e),!!n}for(var l=this.tryEntries.length-1;l>=0;--l){var a=this.tryEntries[l],r=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var o=s.call(a,"catchLoc"),h=s.call(a,"finallyLoc");if(o&&h){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!h)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var l=n;break}}l&&("break"===e||"continue"===e)&&l.tryLoc<=t&&t<=l.finallyLoc&&(l=null);var a=l?l.completion:{};return a.type=e,a.arg=t,l?(this.method="next",this.next=l.finallyLoc,b):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),T(i),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var s=i.completion;if("throw"===s.type){var n=s.arg;T(i)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,i,s){return this.delegate={iterator:I(t),resultName:i,nextLoc:s},"next"===this.method&&(this.arg=e),b}},t}var u=["root"];class m{static autoInit(e,t){var i=(void 0===t?{}:t).BANNER,s=new m(e,void 0===i?{}:i);return s.init(),e.ECLBanner=s,s}constructor(e,s){var n=void 0===s?{}:s,l=n.bannerContainer,a=void 0===l?"[data-ecl-banner-container]":l,r=n.bannerFooter,o=void 0===r?"[data-ecl-banner-footer]":r,h=n.bannerVPadding,c=void 0===h?"8":h,d=n.bannerPicture,u=void 0===d?"[data-ecl-banner-image]":d,m=n.bannerVideo,p=void 0===m?"[data-ecl-banner-video]":m,v=n.bannerPlay,g=void 0===v?"[data-ecl-banner-play]":v,b=n.bannerPause,f=void 0===b?"[data-ecl-banner-pause]":b,y=n.breakpoint,L=void 0===y?"996":y,E=n.attachResizeListener,C=void 0===E||E,w=n.maxIterations,k=void 0===w?10:w;if(this.supportedEvents=["onCtaClick","onPlayClick","onPauseClick"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.bannerVPadding=c,this.resizeTimer=null,this.bannerContainer=t(a,this.element),this.bannerFooter=t(o,this.element),this.bannerPicture=t(u,this.element),this.bannerVideo=t(p,this.element),this.bannerPlay=t(g,this.element),this.bannerPause=t(f,this.element),this.bannerImage=!!this.bannerPicture&&t("img",this.bannerPicture),this.bannerCTA=!!this.bannerPicture&&t(".ecl-banner__cta",this.element),this.breakpoint=L,this.attachResizeListener=C,this.maxIterations=k,this.setBannerHeight=this.setBannerHeight.bind(this),this.checkViewport=this.checkViewport.bind(this),this.resetBannerHeight=this.resetBannerHeight.bind(this),this.handleResize=this.handleResize.bind(this),this.waitForAspectRatioToBeDefined=this.waitForAspectRatioToBeDefined.bind(this),this.setHeight=this.setHeight.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.defaultRatio=()=>this.element.classList.contains("ecl-banner--xs")?"6/1":this.element.classList.contains("ecl-banner--s")?"5/1":this.element.classList.contains("ecl-banner--l")?"3/1":"4/1",this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.bannerCTA&&this.bannerCTA.addEventListener("click",(e=>this.handleCtaClick(e))),this.bannerPlay&&(this.bannerPlay.addEventListener("click",(e=>this.handlePlayClick(e))),this.bannerPlay.style.display="none"),this.bannerPause&&(this.bannerPause.addEventListener("click",(e=>this.handlePauseClick(e))),this.bannerPause.style.display="flex"),this.checkViewport(),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}waitForAspectRatioToBeDefined(){this.attemptCounter=(this.attemptCounter||0)+1;var e="";this.bannerVideo?this.bannerVideo.videoWidth>0&&(e=this.defaultRatio()):this.bannerImage&&(e=getComputedStyle(this.bannerImage).getPropertyValue("--css-aspect-ratio")),(void 0===e||""===e)&&this.maxIterations>this.attemptCounter?setTimeout((()=>this.waitForAspectRatioToBeDefined()),100):this.setHeight(e)}setHeight(e){if(this.bannerContainer){var t=this.bannerContainer.offsetHeight+2*parseInt(this.bannerVPadding,10),i=parseInt(getComputedStyle(this.element).getPropertyValue("width"),10),s=e.split("/").map(Number),n=s[0];t>i*s[1]/n?(this.bannerImage&&(this.bannerImage.style.aspectRatio="auto"),this.bannerVideo&&(this.bannerVideo.style.aspectRatio="auto"),this.element.style.height=t+"px"):this.resetBannerHeight()}this.bannerFooter&&this.element.style.setProperty("--banner-footer-height",this.bannerFooter.offsetHeight+"px")}setBannerHeight(){this.bannerImage||this.bannerVideo?this.waitForAspectRatioToBeDefined():this.setHeight(this.defaultRatio())}resetBannerHeight(){if(this.bannerImage){var e=getComputedStyle(this.bannerImage);this.bannerImage.style.aspectRatio=e.getPropertyValue("--css-aspect-ratio")}this.bannerVideo&&(this.bannerVideo.style.aspectRatio=this.defaultRatio()),this.element.style.height="auto",this.bannerFooter&&this.element.style.setProperty("--banner-footer-height",this.bannerFooter.offsetHeight+"px")}checkViewport(){window.innerWidth>this.breakpoint?this.setBannerHeight():this.resetBannerHeight()}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{this.checkViewport()}),200)}handleCtaClick(e){var t=null,i=e.target.closest("a");i&&(t=i.getAttribute("href"));var s={item:this.bannerCTA,target:t||e.target};this.trigger("onCtaClick",s)}handlePlayClick(){this.bannerVideo&&this.bannerVideo.play(),this.bannerPlay.style.display="none",this.bannerPause&&(this.bannerPause.style.display="flex",this.bannerPause.focus());var e={item:this.bannerPlay};this.trigger("onPlayClick",e)}handlePauseClick(){this.bannerVideo&&this.bannerVideo.pause(),this.bannerPause.style.display="none",this.bannerPlay&&(this.bannerPlay.style.display="flex",this.bannerPlay.focus());var e={item:this.bannerPause};this.trigger("onPauseClick",e)}destroy(){this.resetBannerHeight(),this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.bannerCTA&&this.bannerCTA.removeEventListener("click",this.handleCtaClick),this.bannerPlay&&this.bannerPlay.removeEventListener("click",this.handlePlayClick),this.bannerPause&&this.bannerPause.removeEventListener("click",this.handlePauseClick)}}class p{static autoInit(e,t){var i=(void 0===t?{}:t).CAROUSEL,s=new p(e,void 0===i?{}:i);return s.init(),e.ECLCarousel=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.playSelector,n=void 0===s?".ecl-carousel__play":s,l=i.pauseSelector,a=void 0===l?".ecl-carousel__pause":l,r=i.containerClass,o=void 0===r?".ecl-carousel__container":r,h=i.slidesClass,c=void 0===h?".ecl-carousel__slides":h,d=i.slideClass,u=void 0===d?".ecl-carousel__slide":d,m=i.currentSlideClass,p=void 0===m?".ecl-carousel__current":m,v=i.navigationItemsClass,g=void 0===v?".ecl-carousel__navigation-item":v,b=i.controlsClass,f=void 0===b?".ecl-carousel__controls":b,y=i.attachClickListener,L=void 0===y||y,E=i.attachResizeListener,C=void 0===E||E;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.playSelector=n,this.pauseSelector=a,this.containerClass=o,this.slidesClass=c,this.slideClass=u,this.currentSlideClass=p,this.navigationItemsClass=g,this.controlsClass=f,this.attachClickListener=L,this.attachResizeListener=C,this.container=null,this.slides=null,this.btnPlay=null,this.btnPause=null,this.index=1,this.total=0,this.allowShift=!0,this.activeNav=null,this.autoPlay=null,this.autoPlayInterval=null,this.hoverAutoPlay=null,this.resizeTimer=null,this.posX1=0,this.posX2=0,this.posInitial=0,this.posFinal=0,this.threshold=80,this.navigationItems=null,this.navigation=null,this.controls=null,this.direction="ltr",this.cloneFirstSLide=null,this.cloneLastSLide=null,this.executionCount=0,this.maxExecutions=5,this.slideWidth=0,this.handleAutoPlay=this.handleAutoPlay.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.shiftSlide=this.shiftSlide.bind(this),this.checkIndex=this.checkIndex.bind(this),this.moveSlides=this.moveSlides.bind(this),this.handleResize=this.handleResize.bind(this),this.dragStart=this.dragStart.bind(this),this.dragEnd=this.dragEnd.bind(this),this.dragAction=this.dragAction.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyboardOnPlay=this.handleKeyboardOnPlay.bind(this),this.handleKeyboardOnBullets=this.handleKeyboardOnBullets.bind(this),this.checkBannerHeights=this.checkBannerHeights.bind(this),this.resetBannerHeights=this.resetBannerHeights.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.element.style.opacity=0,this.btnPlay=t(this.playSelector,this.element),this.btnPause=t(this.pauseSelector,this.element),this.slidesContainer=t(this.slidesClass,this.element),this.container=t(this.containerClass,this.element),this.navigation=t(".ecl-carousel__navigation",this.element),this.navigationItems=e(this.navigationItemsClass,this.element),this.controls=t(this.controlsClass,this.element),this.currentSlide=t(this.currentSlideClass,this.element),this.direction=getComputedStyle(this.element).direction,this.slides=e(this.slideClass,this.element),this.total=this.slides.length,this.total<=1)return this.controls&&(this.controls.style.display="none"),this.slidesContainer&&(this.slidesContainer.style.display="block"),!1;var i=this.slides[0],s=this.slides[this.slides.length-1];this.cloneFirstSlide=i.cloneNode(!0),this.cloneLastSlide=s.cloneNode(!0),this.slidesContainer.appendChild(this.cloneFirstSlide),this.slidesContainer.insertBefore(this.cloneLastSlide,i);var n=new ECL.Banner(this.cloneFirstSlide.firstElementChild),l=new ECL.Banner(this.cloneLastSlide.firstElementChild);return n.init(),l.init(),this.slides=e(this.slideClass,this.element),this.handleResize(),this.navigationItems&&this.navigationItems.forEach(((e,t)=>{e.addEventListener("click",this.shiftSlide.bind(this,t+1,!0))})),this.navigation&&this.navigation.addEventListener("keydown",this.handleKeyboardOnBullets),this.attachClickListener&&this.btnPlay&&this.btnPause&&(this.btnPlay.addEventListener("click",this.handleAutoPlay),this.btnPause.addEventListener("click",this.handleAutoPlay)),this.btnPlay&&this.btnPlay.addEventListener("keydown",this.handleKeyboardOnPlay),this.slidesContainer&&(this.slidesContainer.addEventListener("mouseover",this.handleMouseOver),this.slidesContainer.addEventListener("mouseout",this.handleMouseOut),this.slidesContainer.addEventListener("touchstart",this.dragStart),this.slidesContainer.addEventListener("touchend",this.dragEnd),this.slidesContainer.addEventListener("touchmove",this.dragAction),this.slidesContainer.addEventListener("transitionend",this.checkIndex)),this.container&&this.container.addEventListener("focus",this.handleFocus,!0),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this),this}destroy(){this.cloneFirstSLide&&this.cloneLastSLide&&(this.cloneFirstSLide.remove(),this.cloneLastSLide.remove()),this.btnPlay&&this.btnPlay.replaceWith(this.btnPlay.cloneNode(!0)),this.btnPause&&this.btnPause.replaceWith(this.btnPause.cloneNode(!0)),this.slidesContainer&&(this.slidesContainer.removeEventListener("mouseover",this.handleMouseOver),this.slidesContainer.removeEventListener("mouseout",this.handleMouseOut),this.slidesContainer.removeEventListener("touchstart",this.dragStart),this.slidesContainer.removeEventListener("touchend",this.dragEnd),this.slidesContainer.removeEventListener("touchmove",this.dragAction),this.slidesContainer.removeEventListener("transitionend",this.checkIndex)),this.container&&this.container.removeEventListener("focus",this.handleFocus,!0),this.navigationItems&&this.navigationItems.forEach((e=>{e.replaceWith(e.cloneNode(!0))})),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.autoPlayInterval&&(clearInterval(this.autoPlayInterval),this.autoPlay=null),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}checkBannerHeights(){if(this.executionCount+=1,this.executionCount>this.maxExecutions)return clearInterval(this.intervalId),void(this.executionCount=0);var e=this.slides.map((e=>{var i=t(".ecl-banner",e),s=ECL.components.get(i),n=s.defaultRatio();s.setHeight(n);var l=parseInt(i.style.getPropertyValue("--banner-footer-height"),10)||0,a=parseInt(i.style.height,10),r=a+l;return"auto"===i.style.height?0:Number.isNaN(a)||100===a?1:r})).filter((e=>void 0!==e)),i=Math.max(...e);(e.length===this.slides.length&&0===i||i>1)&&(clearInterval(this.intervalId),i>0&&(this.executionCount=0,this.slides.forEach((e=>{var s=null,n=null,l=t(".ecl-banner",e);if(l){s=t("img",l),n=t("video",l);var a=parseInt(l.style.getPropertyValue("--banner-footer-height"),10)||0,r=i-a;l.style.height=r+"px"}s&&(s.style.aspectRatio="auto"),n&&(n.style.aspectRatio="auto")}))))}resetBannerHeights(){this.slides.forEach((e=>{var i=t(".ecl-banner",e),s=null,n=null,l=null;i&&(i.style.height="",s=t("img",i),n=t("video",i),l=t(".ecl-banner__credit",i),s&&(s.style.aspectRatio=""),n&&(n.style.aspectRatio=""),l&&setTimeout((()=>{i.style.setProperty("--banner-footer-height",l.offsetHeight+"px")}),100))}))}dragStart(e){e=e||window.event,this.posInitial=this.slidesContainer.offsetLeft,"touchstart"===e.type&&(this.posX1=e.touches[0].clientX)}dragAction(e){"touchmove"===(e=e||window.event).type&&(e.preventDefault(),this.posX2=this.posX1-e.touches[0].clientX,this.posX1=e.touches[0].clientX),this.slidesContainer.style.left=this.slidesContainer.offsetLeft-this.posX2+"px"}dragEnd(){this.posFinal=this.slidesContainer.offsetLeft,this.posFinal-this.posInitial<-this.threshold?this.shiftSlide("next",!0):this.posFinal-this.posInitial>this.threshold?this.shiftSlide("prev",!0):this.slidesContainer.style.left=this.posInitial+"px"}shiftSlide(e,t){this.allowShift&&(this.index="number"==typeof e?e:"next"===e?this.index+1:this.index-1,this.moveSlides(!0)),t&&this.autoPlay&&this.handleAutoPlay(),this.allowShift=!1}moveSlides(e){var t=this.slideWidth*this.index;this.slidesContainer.style.transitionDuration=e?"0.4s":"0s","rtl"===this.direction?this.slidesContainer.style.right="-"+t+"px":this.slidesContainer.style.left="-"+t+"px"}checkIndex(e){e&&"left"!==e.propertyName||(0===this.index&&(this.index=this.total),this.index===this.total+1&&(this.index=1),this.moveSlides(!1),this.currentSlide&&(this.currentSlide.textContent=this.index),this.slides&&this.slides.forEach(((e,i)=>{var s=t(".ecl-link--cta",e);this.index===i?(e.removeAttribute("inert","true"),s&&s.removeAttribute("tabindex",-1)):(e.setAttribute("inert","true"),s&&s.setAttribute("tabindex",-1))})),this.navigationItems&&this.navigationItems.forEach(((e,t)=>{this.index===t+1?(e.setAttribute("aria-current","true"),e.removeAttribute("tabindex",-1)):(e.removeAttribute("aria-current","true"),e.setAttribute("tabindex",-1))})),this.allowShift=!0)}handleAutoPlay(){if(this.autoPlay){clearInterval(this.autoPlayInterval),this.autoPlay=!1;var e=document.activeElement===this.btnPause;this.btnPlay.style.display="flex",this.btnPause.style.display="none",e&&this.btnPlay.focus()}else{this.autoPlayInterval=setInterval((()=>{this.shiftSlide("next")}),5e3),this.autoPlay=!0;var t=document.activeElement===this.btnPlay;this.btnPlay.style.display="none",this.btnPause.style.display="flex",t&&this.btnPause.focus()}}handleMouseOver(){return this.hoverAutoPlay=this.autoPlay,this.hoverAutoPlay&&this.handleAutoPlay(),this}handleMouseOut(){return this.hoverAutoPlay&&this.handleAutoPlay(),this}handleResize(){var e=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);clearInterval(this.intervalId),clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{e>=998?this.intervalId=setInterval(this.checkBannerHeights,100):this.resetBannerHeights(),this.slideWidth=this.slides[0].scrollWidth,this.checkIndex(),setTimeout((()=>{this.element.style.opacity=1}),250)}),250),e>=1140&&e<=1260?this.container.classList.add("ecl-carousel-container--padded"):this.container.classList.remove("ecl-carousel-container--padded"),(e<=768&&this.autoPlay||e>768&&null===this.autoPlay)&&this.handleAutoPlay()}handleKeyboardOnPlay(e){if("Tab"!==e.key||!e.shiftKey)switch(e.key){case"Tab":case"ArrowRight":e.preventDefault(),this.activeNav=t(this.navigationItemsClass+'[aria-current="true"]'),this.activeNav&&this.activeNav.focus(),this.autoPlay&&this.handleAutoPlay()}}handleKeyboardOnBullets(e){var t=document.activeElement;switch(e.key){case"ArrowRight":t.nextSibling&&(e.preventDefault(),this.shiftSlide("next",!0),setTimeout((()=>t.nextSibling.focus()),400));break;case"ArrowLeft":t.previousSibling?(this.shiftSlide("prev",!0),setTimeout((()=>t.previousSibling.focus()),400)):this.btnPlay.focus()}}handleFocus(e){var t=e.target;return t&&t.contains(document.activeElement)&&this.autoPlay&&this.handleAutoPlay(),this}}class v{static autoInit(e,t){var i=(void 0===t?{}:t).CATEGORY_FILTER,s=new v(e,void 0===i?{}:i);return s.init(),e.ECLCategoryFilter=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.itemSelector,n=void 0===s?".ecl-category-filter__item":s,l=i.parentItemSelector,a=void 0===l?"ecl-category-filter__item--has-children":l,r=i.listSelector,o=void 0===r?".ecl-category-filter__list":r,h=i.attachClickListener,c=void 0===h||h;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.itemSelector=n,this.parentItemSelector=a,this.listSelector=o,this.attachClickListener=c,this.items=null,this.handleClickExpand=this.handleClickExpand.bind(this),this.expandParents=this.expandParents.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.items=e(this.itemSelector,this.element);var t={preventDefault:()=>null};this.attachClickListener&&this.items&&this.items.forEach((e=>{e.addEventListener("click",this.handleClickExpand),e.getAttribute("aria-current")&&(t.target=e,this.handleClickExpand(t),this.expandParents.call(this,e))})),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.attachClickListener&&this.items&&this.items.forEach((e=>{e.removeEventListener("click",this.handleClickExpand,!1)})),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}expandParents(e){var t;if(e){var i={preventDefault:()=>null},s=null==(t=e.closest(this.listSelector))?void 0:t.previousElementSibling;s&&s.classList.contains(this.parentItemSelector)&&(i.target=s,this.handleClickExpand(i),this.expandParents.call(this,s))}}handleClickExpand(e){var t=e.target.closest(this.itemSelector),i="function"==typeof e.stopPropagation;i&&this.items.forEach((e=>{e===t?e.setAttribute("aria-current",!0):e.removeAttribute("aria-current")}));var s=t.getAttribute("aria-expanded");s&&"true"===s?(e.preventDefault(),t.setAttribute("aria-expanded","false"),t.parentElement.classList.remove("ecl-category-filter__list-item--open")):s&&"false"===s&&(e.preventDefault(),t.setAttribute("aria-expanded","true"),t.parentElement.classList.add("ecl-category-filter__list-item--open")),s&&i&&t.classList.contains("ecl-category-filter__item--level-1")&&this.items.forEach((e=>{e!==t&&(e.parentElement.classList.remove("ecl-category-filter__list-item--open"),e.classList.contains(this.parentItemSelector)&&e.setAttribute("aria-expanded","false"))}))}}class g{static autoInit(e,t){var i=(void 0===t?{}:t).DATEPICKER,s=new g(e,void 0===i?{}:i);return s.init(),e.ECLDatepicker=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.format,n=void 0===s?"":s,l=i.theme,a=void 0===l?"ecl-datepicker-theme":l,r=i.yearRange,o=void 0===r?40:r,h=i.reposition,c=void 0!==h&&h,d=i.attachResizeListener,u=void 0===d||d,m=i.i18n,p=void 0===m?{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"]}:m,v=i.showDaysInNextAndPreviousMonths,g=void 0===v||v,b=i.enableSelectionDaysInNextAndPreviousMonths,f=void 0===b||b;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.picker=null,this.resizeTimer=null,this.pikadayEl=null,this.format=n,this.theme=a,this.yearRange=o,this.i18n=p,this.showDaysInNextAndPreviousMonths=g,this.enableSelectionDaysInNextAndPreviousMonths=f,this.reposition=c,this.direction="ltr",this.attachResizeListener=u,this.handleResize=this.handleResize.bind(this)}init(){if(void 0===window.Pikaday)throw new TypeError("Pikaday is not available. Make sure to include Pikaday in your project if you want to use the ECL datepicker");if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.direction=getComputedStyle(this.element).direction,this.attachResizeListener&&window.addEventListener("resize",this.handleResize),g.resizeLogic=e=>{this.pikadayEl=e;var t=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),i=getComputedStyle(e).direction,s=e.getBoundingClientRect();if("rtl"===i){var n=t-s.right;e.style.left=t<768?n+"px":"auto"}else{var l=s.left;e.style.right=t<768?l+"px":"auto"}};var e={field:this.element,yearRange:this.yearRange,firstDay:1,i18n:this.i18n,theme:this.theme,reposition:this.reposition,isRTL:"rtl"===this.direction,position:"rtl"===this.direction?"bottom right":"bottom left",showDaysInNextAndPreviousMonths:this.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:this.enableSelectionDaysInNextAndPreviousMonths};return""!==this.format?e.format=this.format:e.toString=e=>("0"+e.getDate()).slice(-2)+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+e.getFullYear(),this.picker=new Pikaday(c({},e,{parse(t,i){if(!e.format){var s=t.split("-").map(Number),n=s[0],l=s[1],a=s[2];return new Date(a<100?2e3+a:a,l-1,n)}if("undefined"!=typeof moment&&""!==t){var r=moment(t,i,!1);if(r.isValid())return r.toDate()}return t},onOpen(){g.resizeLogic(this.el)}})),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this),this.picker}destroy(){this.picker&&(this.picker.destroy(),this.picker=null),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{this.pikadayEl&&g.resizeLogic(this.pikadayEl)}),150)}}class b{static autoInit(e,t){var i=(void 0===t?{}:t).BREADCRUMB,s=new b(e,void 0===i?{}:i);return s.init(),e.ECLBreadcrumb=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.ellipsisButtonSelector,n=void 0===s?"[data-ecl-breadcrumb-ellipsis-button]":s,l=i.ellipsisSelector,a=void 0===l?"[data-ecl-breadcrumb-ellipsis]":l,r=i.segmentSelector,o=void 0===r?"[data-ecl-breadcrumb-item]":r,h=i.expandableItemsSelector,c=void 0===h?'[data-ecl-breadcrumb-item="expandable"]':h,d=i.staticItemsSelector,u=void 0===d?'[data-ecl-breadcrumb-item="static"]':d,m=i.onPartialExpand,p=void 0===m?null:m,v=i.onFullExpand,g=void 0===v?null:v,b=i.attachClickListener,f=void 0===b||b,y=i.attachResizeListener,L=void 0===y||y;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.ellipsisButtonSelector=n,this.ellipsisSelector=a,this.segmentSelector=o,this.expandableItemsSelector=c,this.staticItemsSelector=u,this.onPartialExpand=p,this.onFullExpand=g,this.attachClickListener=f,this.attachResizeListener=L,this.ellipsisButton=null,this.itemsElements=null,this.staticElements=null,this.expandableElements=null,this.resizeTimer=null,this.handleClickOnEllipsis=this.handleClickOnEllipsis.bind(this),this.handleResize=this.handleResize.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.ellipsisButton=t(this.ellipsisButtonSelector,this.element),this.attachClickListener&&this.ellipsisButton&&this.ellipsisButton.addEventListener("click",this.handleClickOnEllipsis),this.itemsElements=e(this.segmentSelector,this.element),this.staticElements=e(this.staticItemsSelector,this.element),this.expandableElements=e(this.expandableItemsSelector,this.element),this.check(),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.attachClickListener&&this.ellipsisButton&&this.ellipsisButton.removeEventListener("click",this.handleClickOnEllipsis),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),this.element.classList.remove("ecl-breadcrumb--wrap"),ECL.components.delete(this.element))}handleClickOnEllipsis(){return this.handleFullExpand()}check(){var e,t=this;return(e=d().mark((function e(){var i;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.computeVisibilityMap();case 2:if(i=e.sent){e.next=5;break}return e.abrupt("return");case 5:!0===i.expanded?t.handleFullExpand():t.handlePartialExpand(i);case 6:case"end":return e.stop()}}),e)})),function(){var t=this,i=arguments;return new Promise((function(s,n){var a=e.apply(t,i);function r(e){l(a,s,n,r,o,"next",e)}function o(e){l(a,s,n,r,o,"throw",e)}r(void 0)}))})()}hideEllipsis(){var e=t(this.ellipsisSelector,this.element);e&&e.setAttribute("aria-hidden","true")}showAllItems(){this.expandableElements.forEach((e=>e.setAttribute("aria-hidden","false")))}handlePartialExpand(e){if(e){this.element.classList.add("ecl-breadcrumb--collapsed");var i=e.isItemVisible;if(i&&Array.isArray(i))if(this.onPartialExpand)this.onPartialExpand(i);else if(Math.floor(this.element.getBoundingClientRect().width)>767){var s=t(this.ellipsisSelector,this.element);s&&s.setAttribute("aria-hidden","false"),this.expandableElements.forEach(((e,t)=>{e.setAttribute("aria-hidden",i[t]?"false":"true")}))}else this.expandableElements.forEach((e=>{e.setAttribute("aria-hidden","true")}))}}handleFullExpand(){this.element.classList.remove("ecl-breadcrumb--collapsed"),this.element.classList.add("ecl-breadcrumb--wrap"),this.onFullExpand?this.onFullExpand():(this.hideEllipsis(),this.showAllItems())}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{this.check()}),200)}computeVisibilityMap(){return new Promise((e=>{if(this.expandableElements&&0!==this.expandableElements.length){var i=Math.floor(this.element.getBoundingClientRect().width);setTimeout((()=>{if(1.1*this.itemsElements.map((e=>{var t=e.getBoundingClientRect().width;return 0===t&&(e.style.display="inline-flex",t=e.getBoundingClientRect().width,e.style.cssText=""),t})).reduce(((e,t)=>e+t))<=i)e({expanded:!0});else{var s=t(this.ellipsisSelector,this.element).getBoundingClientRect().width+this.staticElements.reduce(((e,t)=>e+t.getBoundingClientRect().width),0);if(s>=i)e({expanded:!1,isItemVisible:[...this.expandableElements.map((()=>!1))]});else{var n=0,l=!0,a=[...this.expandableElements].reverse().map((e=>{if(!l)return!1;var t=(n+=e.getBoundingClientRect().width)+s<=i;return t||(l=!1),t})).reverse();e({expanded:!1,isItemVisible:a})}}}),150)}else e({expanded:!0})}))}}class f{static autoInit(e,t){var i=(void 0===t?{}:t).CONTENT_BLOCK,s=new f(e,void 0===i?{}:i);return s.init(),e.ECLContentBlock=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.targetSelector,n=void 0===s?"[data-ecl-picture-link]":s,l=i.titleSelector,a=void 0===l?"[data-ecl-title-link]":l,r=i.attachClickListener,o=void 0===r||r,h=i.maxIterations,c=void 0===h?1:h,d=i.withTitleAttr,u=void 0!==d&&d;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.targetSelector=n,this.titleSelector=a,this.attachClickListener=o,this.maxIterations=c,this.withTitleAttr=u,this.linkTo=this.linkTo.bind(this),this.findElementInCommonAncestor=this.findElementInCommonAncestor.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.picture=this.findElementInCommonAncestor(this.element,this.targetSelector,this.maxIterations),this.picture){if(this.title=t(this.titleSelector,this.element),this.linkEl=!!this.title&&t("a",this.title),this.linkEl){this.picture.style.cursor="pointer";var e=t("img",this.picture);e&&this.withTitleAttr&&(e.title=this.constructor.convertToFullURL(this.linkEl.getAttribute("href"))),this.attachClickListener&&this.picture.addEventListener("click",this.linkTo)}this.element.setAttribute("data-ecl-auto-initialized",!0),ECL.components.set(this.element,this)}}linkTo(){this.linkEl&&this.linkEl.click()}findElementInCommonAncestor(e,i,s){var n=t(i,e);return n||(e.classList.contains("ecl-card__body")&&(s+=1),e===document.documentElement||s<=0?null:this.findElementInCommonAncestor(e.parentElement,i,s-1))}static convertToFullURL(e){if(e.startsWith("http://")||e.startsWith("https://"))return e;var t=new URL(window.location.href);return new URL(e,t).href}destroy(){this.attachClickListener&&this.picture&&this.picture.removeEventListener("click",this.linkto),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}}class y{static autoInit(e,t){var i=(void 0===t?{}:t).DESCRIPTION_LIST,s=new y(e,void 0===i?{}:i);return s.init(),e.ECLDescriptionList=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.listsSelector,n=void 0===s?"[data-ecl-description-list-collapsible]":s,l=i.visibleItemsSelector,a=void 0===l?"data-ecl-description-list-visible-items":l,r=i.moreItemLabelSelector,o=void 0===r?"data-ecl-description-list-more-label":r,h=i.attachClickListener,c=void 0===h||h;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.moreItemLabelSelector=o,this.listsSelector=n,this.attachClickListener=c,this.visibleItemsSelector=a,this.moreItemLabel=null,this.lists=null,this.handleClickOnMore=this.handleClickOnMore.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.moreItemLabel=this.element.getAttribute(this.moreItemLabelSelector),this.visibleItems=this.element.getAttribute(this.visibleItemsSelector),this.lists=e(this.listsSelector,this.element),this.lists[0]&&this.visibleItems>0&&this.moreItemLabel&&(this.lists.forEach((t=>{if(t.children&&t.children.length>this.visibleItems){var i=document.createElement("li");i.classList.add("ecl-description-list__see_more");var s=document.createElement("a");s.classList.add("ecl-link","ecl-link--standalone"),s.href="#",s.innerHTML=this.moreItemLabel,i.appendChild(s),t.appendChild(i),this.showHide(e(".ecl-description-list__definition-item",t)),this.attachClickListener&&s.addEventListener("click",this.handleClickOnMore)}})),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this))}showHide(e){if(e)for(var t=Array.from(e),i="ecl-description-list__definition-item",s=i+"--hidden",n=i+"--last-visible",l=0;l<t.length;l+=1){var a=t[l];l<this.visibleItems?(a.classList.remove(s),a.classList.remove(n)):l>=this.visibleItems&&a.classList.add(s),l===this.visibleItems-1?a.classList.add(n):a.classList.remove(n)}}destroy(){if(this.attachClickListener&&this.visibleItems>0){var t=e(".ecl-description-list__see_more");t[0]&&t.forEach((e=>{e.removeEventListener("click",this.handleClickOnMore)}))}this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnMore(e){e.preventDefault();var t=e.target.parentNode,i=t.parentNode;this.element.contains(i)&&(Array.from(i.children).forEach((e=>{e.classList.remove("ecl-description-list__definition-item--hidden"),e.classList.remove("ecl-description-list__definition-item--last-visible")})),t.remove())}}class L{static autoInit(e,t){var i=(void 0===t?{}:t).EXPANDABLE,s=new L(e,void 0===i?{}:i);return s.init(),e.ECLExpandable=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.toggleSelector,l=void 0===n?"[data-ecl-expandable-toggle]":n,a=s.labelSelector,r=void 0===a?"[data-ecl-label]":a,o=s.labelExpanded,h=void 0===o?"data-ecl-label-expanded":o,c=s.labelCollapsed,d=void 0===c?"data-ecl-label-collapsed":c,u=s.attachClickListener,m=void 0===u||u;if(this.supportedEvents=["onToggle"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.toggleSelector=l,this.labelSelector=r,this.labelExpanded=h,this.labelCollapsed=d,this.attachClickListener=m,this.toggle=null,this.forceClose=!1,this.target=null,this.label=null,this.handleClickOnToggle=this.handleClickOnToggle.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.toggle=t(this.toggleSelector,this.element),this.target=document.querySelector("#"+this.toggle.getAttribute("aria-controls")),this.label=t(this.labelSelector,this.element),!this.target)throw new TypeError("Target has to be provided for expandable (aria-controls)");this.attachClickListener&&this.toggle&&this.toggle.addEventListener("click",this.handleClickOnToggle),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachClickListener&&this.toggle&&this.toggle.removeEventListener("click",this.handleClickOnToggle),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnToggle(e){var t=!0===this.forceClose||"true"===this.toggle.getAttribute("aria-expanded");this.toggle.setAttribute("aria-expanded",t?"false":"true"),this.target.hidden=!!t,this.label&&!t&&this.toggle.hasAttribute(this.labelExpanded)?this.label.innerHTML=this.toggle.getAttribute(this.labelExpanded):this.label&&t&&this.toggle.hasAttribute(this.labelCollapsed)&&(this.label.innerHTML=this.toggle.getAttribute(this.labelCollapsed));var i={expanded:!t,e:e};return this.trigger("onToggle",i),this}}class E{static autoInit(e,t){var i=(void 0===t?{}:t).FILE_DOWNLOAD,s=new E(e,void 0===i?{}:i);return s.init(),e.ECLFileDownload=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.translationToggleSelector,n=void 0===s?"[data-ecl-file-translation-toggle]":s,l=i.translationContainerSelector,a=void 0===l?"[data-ecl-file-translation-container]":l,r=i.attachClickListener,o=void 0===r||r;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.translationToggleSelector=n,this.translationContainerSelector=a,this.attachClickListener=o,this.translationToggle=null,this.translationContainer=null,this.handleClickOnToggle=this.handleClickOnToggle.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.translationToggle=t(this.translationToggleSelector,this.element),this.translationContainer=t(this.translationContainerSelector,this.element),this.attachClickListener&&this.translationToggle&&this.translationToggle.addEventListener("click",this.handleClickOnToggle),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.attachClickListener&&this.translationToggle&&this.translationToggle.removeEventListener("click",this.handleClickOnToggle),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnToggle(e){return e.preventDefault(),"true"===this.translationToggle.getAttribute("aria-expanded")?this.translationToggle.setAttribute("aria-expanded","false"):this.translationToggle.setAttribute("aria-expanded","true"),this}}class C{static autoInit(e,t){var i=(void 0===t?{}:t).FILE_UPLOAD,s=new C(e,void 0===i?{}:i);return s.init(),e.ECLFileUpload=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.groupSelector,l=void 0===n?"[data-ecl-file-upload-group]":n,a=s.buttonSelector,r=void 0===a?"[data-ecl-file-upload-button]":a,o=s.listSelector,h=void 0===o?"[data-ecl-file-upload-list]":o,c=s.labelChoose,d=void 0===c?"data-ecl-file-upload-label-choose":c,u=s.labelReplace,m=void 0===u?"data-ecl-file-upload-label-replace":u,p=s.attachChangeListener,v=void 0===p||p;if(this.supportedEvents=["onSelection"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.groupSelector=l,this.buttonSelector=r,this.listSelector=h,this.labelChoose=d,this.labelReplace=m,this.attachChangeListener=v,this.fileUploadGroup=null,this.fileUploadInput=null,this.fileUploadButton=null,this.fileUploadList=null,this.handleChange=this.handleChange.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.fileUploadGroup=this.element.closest(this.groupSelector),this.fileUploadInput=this.element,this.fileUploadButton=t(this.buttonSelector,this.fileUploadGroup),this.fileUploadList=t(this.listSelector,this.fileUploadGroup),this.attachChangeListener&&this.fileUploadInput&&this.fileUploadInput.addEventListener("change",this.handleChange),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachChangeListener&&this.fileUploadInput&&this.fileUploadInput.removeEventListener("change",this.handleChange),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleChange(e){if("files"in e.target){var t="";Array.prototype.forEach.call(e.target.files,(e=>{var i=function(e,t){if(0===e)return"0 Bytes";var i=t,s=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,s)).toFixed(i))+" "+["Bytes","kB","MB","GB","TB","PB","EB","ZB","YB"][s]}(e.size,1),s=e.name.split(".").pop();t+='<li class="ecl-file-upload__item">\n <span class="ecl-file-upload__item-name">'+e.name+'</span>\n <span class="ecl-file-upload__item-meta">('+i+" - "+s+")</span>\n </li>"})),this.fileUploadList.innerHTML=t,this.fileUploadButton.hasAttribute(this.labelReplace)&&(this.fileUploadButton.innerHTML=this.fileUploadButton.getAttribute(this.labelReplace));var i={files:e.target.files,event:e};this.trigger("onSelection",i)}else this.fileUploadButton.hasAttribute(this.labelChoose)&&(this.fileUploadButton.innerHTML=this.fileUploadButton.getAttribute(this.labelChoose))}}
1
+ /* @ecl/preset-ec - 5.0.0-alpha.21 Built on 2025-11-20T10:15:10.328Z */
2
+ Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){for(var t=this;t;){if(t.matches(e))return t;t=t.parentElement}return null});var e=function(e,t){return void 0===t&&(t=document),[].slice.call(t.querySelectorAll(e))},t=function(e,t){return void 0===t&&(t=document),t.querySelector(e)};class i{constructor(){this.events=new Map}on(e,t){this.events.has(e)||this.events.set(e,[]),this.events.get(e).push(t)}trigger(e,t){var i=this.events.get(e);i&&i.forEach(e=>{e(t)})}getCallback(e){return this.events.get(e)||[]}}class s{static autoInit(e,t){var i=(void 0===t?{}:t).ACCORDION,n=new s(e,void 0===i?{}:i);return n.init(),e.ECLAccordion=n,n}constructor(e,t){var s=void 0===t?{}:t,n=s.toggleSelector,a=void 0===n?"[data-ecl-accordion-toggle]":n,l=s.iconSelector,r=void 0===l?"[data-ecl-accordion-icon]":l,o=s.attachClickListener,h=void 0===o||o;if(this.supportedEvents=["onToggle"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.toggleSelector=a,this.iconSelector=r,this.attachClickListener=h,this.toggles=null,this.forceClose=!1,this.target=null,this.handleClickOnToggle=this.handleClickOnToggle.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.toggles=e(this.toggleSelector,this.element),this.attachClickListener&&this.toggles&&this.toggles.forEach(e=>{e.addEventListener("click",()=>this.handleClickOnToggle(e))}),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachClickListener&&this.toggles&&this.toggles.forEach(e=>{e.replaceWith(e.cloneNode(!0))}),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnToggle(e){var i=!1,s=t("#"+e.getAttribute("aria-controls"),this.element);if(!s)throw new TypeError("Target has to be provided for accordion (aria-controls)");var n=!0===this.forceClose||"true"===e.getAttribute("aria-expanded");e.setAttribute("aria-expanded",n?"false":"true"),n?s.hidden=!0:(s.hidden=!1,i=!0);var a={item:s,isOpening:i};this.trigger("onToggle",a)}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=Array(t);i<t;i++)s[i]=e[i];return s}function a(e,t,i,s,n,a,l){try{var r=e[a](l),o=r.value}catch(e){return void i(e)}r.done?t(o):Promise.resolve(o).then(s,n)}function l(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var r=0;function o(e){return"__private_"+r+++"_"+e}function h(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e))||t){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},c.apply(null,arguments)}function d(){
3
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
4
+ var e,t,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",n=i.toStringTag||"@@toStringTag";function a(i,s,n,a){var o=s&&s.prototype instanceof r?s:r,h=Object.create(o.prototype);return u(h,"_invoke",function(i,s,n){var a,r,o,h=0,c=n||[],d=!1,u={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,i){return a=t,r=0,o=e,u.n=i,l}};function m(i,s){for(r=i,o=s,t=0;!d&&h&&!n&&t<c.length;t++){var n,a=c[t],m=u.p,p=a[2];i>3?(n=p===s)&&(o=a[(r=a[4])?5:(r=3,3)],a[4]=a[5]=e):a[0]<=m&&((n=i<2&&m<a[1])?(r=0,u.v=s,u.n=a[1]):m<p&&(n=i<3||a[0]>s||s>p)&&(a[4]=i,a[5]=s,u.n=p,r=0))}if(n||i>1)return l;throw d=!0,s}return function(n,c,p){if(h>1)throw TypeError("Generator is already running");for(d&&1===c&&m(c,p),r=c,o=p;(t=r<2?e:o)||!d;){a||(r?r<3?(r>1&&(u.n=-1),m(r,o)):u.n=o:u.v=o);try{if(h=2,a){if(r||(n="next"),t=a[n]){if(!(t=t.call(a,o)))throw TypeError("iterator result is not an object");if(!t.done)return t;o=t.value,r<2&&(r=0)}else 1===r&&(t=a.return)&&t.call(a),r<2&&(o=TypeError("The iterator does not provide a '"+n+"' method"),r=1);a=e}else if((t=(d=u.n<0)?o:i.call(s,u))!==l)break}catch(t){a=e,r=1,o=t}finally{h=1}}return{value:t,done:d}}}(i,n,a),!0),h}var l={};function r(){}function o(){}function h(){}t=Object.getPrototypeOf;var c=[][s]?t(t([][s]())):(u(t={},s,function(){return this}),t),m=h.prototype=r.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,u(e,n,"GeneratorFunction")),e.prototype=Object.create(m),e}return o.prototype=h,u(m,"constructor",h),u(h,"constructor",o),o.displayName="GeneratorFunction",u(h,n,"GeneratorFunction"),u(m),u(m,n,"Generator"),u(m,s,function(){return this}),u(m,"toString",function(){return"[object Generator]"}),(d=function(){return{w:a,m:p}})()}function u(e,t,i,s){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}u=function(e,t,i,s){function a(t,i){u(e,t,function(e){return this._invoke(t,i,e)})}t?n?n(e,t,{value:i,enumerable:!s,configurable:!s,writable:!s}):e[t]=i:(a("next",0),a("throw",1),a("return",2))},u(e,t,i,s)}var m=["root"];class p{static autoInit(e,t){var i=(void 0===t?{}:t).BANNER,s=new p(e,void 0===i?{}:i);return s.init(),e.ECLBanner=s,s}constructor(e,s){var n=void 0===s?{}:s,a=n.bannerContainer,l=void 0===a?"[data-ecl-banner-container]":a,r=n.bannerFooter,o=void 0===r?"[data-ecl-banner-footer]":r,h=n.bannerVPadding,c=void 0===h?"8":h,d=n.bannerPicture,u=void 0===d?"[data-ecl-banner-image]":d,m=n.bannerVideo,p=void 0===m?"[data-ecl-banner-video]":m,v=n.bannerPlay,g=void 0===v?"[data-ecl-banner-play]":v,b=n.bannerPause,f=void 0===b?"[data-ecl-banner-pause]":b,y=n.breakpoint,L=void 0===y?"996":y,C=n.attachResizeListener,E=void 0===C||C,k=n.maxIterations,w=void 0===k?10:k;if(this.supportedEvents=["onCtaClick","onPlayClick","onPauseClick"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.bannerVPadding=c,this.resizeTimer=null,this.bannerContainer=t(l,this.element),this.bannerFooter=t(o,this.element),this.bannerPicture=t(u,this.element),this.bannerVideo=t(p,this.element),this.bannerPlay=t(g,this.element),this.bannerPause=t(f,this.element),this.bannerImage=!!this.bannerPicture&&t("img",this.bannerPicture),this.bannerCTA=!!this.bannerPicture&&t(".ecl-banner__cta",this.element),this.breakpoint=L,this.attachResizeListener=E,this.maxIterations=w,this.setBannerHeight=this.setBannerHeight.bind(this),this.checkViewport=this.checkViewport.bind(this),this.resetBannerHeight=this.resetBannerHeight.bind(this),this.handleResize=this.handleResize.bind(this),this.waitForAspectRatioToBeDefined=this.waitForAspectRatioToBeDefined.bind(this),this.setHeight=this.setHeight.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.defaultRatio=()=>this.element.classList.contains("ecl-banner--xs")?"6/1":this.element.classList.contains("ecl-banner--s")?"5/1":this.element.classList.contains("ecl-banner--l")?"3/1":"4/1",this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.bannerCTA&&this.bannerCTA.addEventListener("click",e=>this.handleCtaClick(e)),this.bannerPlay&&(this.bannerPlay.addEventListener("click",e=>this.handlePlayClick(e)),this.bannerPlay.style.display="none"),this.bannerPause&&(this.bannerPause.addEventListener("click",e=>this.handlePauseClick(e)),this.bannerPause.style.display="flex"),this.checkViewport(),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}waitForAspectRatioToBeDefined(){this.attemptCounter=(this.attemptCounter||0)+1;var e=getComputedStyle(this.element).getPropertyValue("--css-aspect-ratio");(void 0===e||""===e)&&this.maxIterations>this.attemptCounter?setTimeout(()=>this.waitForAspectRatioToBeDefined(),100):this.setHeight(e)}setHeight(e){if(this.bannerContainer){var t=this.bannerContainer.offsetHeight+2*parseInt(this.bannerVPadding,10),i=parseInt(getComputedStyle(this.element).getPropertyValue("width"),10),s=e.split("/").map(Number),n=s[0];t>i*s[1]/n?(this.element.style.aspectRatio="auto",this.element.style.height=t+"px"):this.resetBannerHeight()}this.bannerFooter&&this.element.style.setProperty("--banner-footer-height",this.bannerFooter.offsetHeight+"px")}setBannerHeight(){this.bannerImage||this.bannerVideo?this.waitForAspectRatioToBeDefined():this.setHeight(this.defaultRatio())}resetBannerHeight(){this.element.style.removeProperty("aspect-ratio"),this.element.style.height="auto",this.bannerFooter&&this.element.style.setProperty("--banner-footer-height",this.bannerFooter.offsetHeight+"px")}checkViewport(){window.innerWidth>this.breakpoint?this.setBannerHeight():this.resetBannerHeight()}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.checkViewport()},200)}handleCtaClick(e){var t=null,i=e.target.closest("a");i&&(t=i.getAttribute("href"));var s={item:this.bannerCTA,target:t||e.target};this.trigger("onCtaClick",s)}handlePlayClick(){this.bannerVideo&&this.bannerVideo.play(),this.bannerPlay.style.display="none",this.bannerPause&&(this.bannerPause.style.display="flex",this.bannerPause.focus());var e={item:this.bannerPlay};this.trigger("onPlayClick",e)}handlePauseClick(){this.bannerVideo&&this.bannerVideo.pause(),this.bannerPause.style.display="none",this.bannerPlay&&(this.bannerPlay.style.display="flex",this.bannerPlay.focus());var e={item:this.bannerPause};this.trigger("onPauseClick",e)}destroy(){this.resetBannerHeight(),this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.bannerCTA&&this.bannerCTA.removeEventListener("click",this.handleCtaClick),this.bannerPlay&&this.bannerPlay.removeEventListener("click",this.handlePlayClick),this.bannerPause&&this.bannerPause.removeEventListener("click",this.handlePauseClick)}}class v{static autoInit(e,t){var i=(void 0===t?{}:t).CAROUSEL,s=new v(e,void 0===i?{}:i);return s.init(),e.ECLCarousel=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.playSelector,n=void 0===s?".ecl-carousel__play":s,a=i.pauseSelector,l=void 0===a?".ecl-carousel__pause":a,r=i.containerClass,o=void 0===r?".ecl-carousel__container":r,h=i.slidesClass,c=void 0===h?".ecl-carousel__slides":h,d=i.slideClass,u=void 0===d?".ecl-carousel__slide":d,m=i.currentSlideClass,p=void 0===m?".ecl-carousel__current":m,v=i.navigationItemsClass,g=void 0===v?".ecl-carousel__navigation-item":v,b=i.controlsClass,f=void 0===b?".ecl-carousel__controls":b,y=i.attachClickListener,L=void 0===y||y,C=i.attachResizeListener,E=void 0===C||C;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.playSelector=n,this.pauseSelector=l,this.containerClass=o,this.slidesClass=c,this.slideClass=u,this.currentSlideClass=p,this.navigationItemsClass=g,this.controlsClass=f,this.attachClickListener=L,this.attachResizeListener=E,this.container=null,this.slides=null,this.btnPlay=null,this.btnPause=null,this.index=1,this.total=0,this.allowShift=!0,this.activeNav=null,this.autoPlay=null,this.autoPlayInterval=null,this.hoverAutoPlay=null,this.resizeTimer=null,this.posX1=0,this.posX2=0,this.posInitial=0,this.posFinal=0,this.threshold=80,this.navigationItems=null,this.navigation=null,this.controls=null,this.direction="ltr",this.cloneFirstSLide=null,this.cloneLastSLide=null,this.executionCount=0,this.maxExecutions=5,this.slideWidth=0,this.handleAutoPlay=this.handleAutoPlay.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.shiftSlide=this.shiftSlide.bind(this),this.checkIndex=this.checkIndex.bind(this),this.moveSlides=this.moveSlides.bind(this),this.handleResize=this.handleResize.bind(this),this.dragStart=this.dragStart.bind(this),this.dragEnd=this.dragEnd.bind(this),this.dragAction=this.dragAction.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyboardOnPlay=this.handleKeyboardOnPlay.bind(this),this.handleKeyboardOnBullets=this.handleKeyboardOnBullets.bind(this),this.checkBannerHeights=this.checkBannerHeights.bind(this),this.resetBannerHeights=this.resetBannerHeights.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.element.style.opacity=0,this.btnPlay=t(this.playSelector,this.element),this.btnPause=t(this.pauseSelector,this.element),this.slidesContainer=t(this.slidesClass,this.element),this.container=t(this.containerClass,this.element),this.navigation=t(".ecl-carousel__navigation",this.element),this.navigationItems=e(this.navigationItemsClass,this.element),this.controls=t(this.controlsClass,this.element),this.currentSlide=t(this.currentSlideClass,this.element),this.slides=e(this.slideClass,this.element),this.total=this.slides.length,this.total<=1)return this.controls&&(this.controls.style.display="none"),this.slidesContainer&&(this.slidesContainer.style.display="block"),!1;var i=this.slides[0],s=this.slides[this.slides.length-1];this.cloneFirstSlide=i.cloneNode(!0),this.cloneLastSlide=s.cloneNode(!0),this.slidesContainer.appendChild(this.cloneFirstSlide),this.slidesContainer.insertBefore(this.cloneLastSlide,i);var n=new ECL.Banner(this.cloneFirstSlide.firstElementChild),a=new ECL.Banner(this.cloneLastSlide.firstElementChild);return n.init(),a.init(),this.slides=e(this.slideClass,this.element),this.handleResize(),this.navigationItems&&this.navigationItems.forEach((e,t)=>{e.addEventListener("click",this.shiftSlide.bind(this,t+1,!0))}),this.navigation&&this.navigation.addEventListener("keydown",this.handleKeyboardOnBullets),this.attachClickListener&&this.btnPlay&&this.btnPause&&(this.btnPlay.addEventListener("click",this.handleAutoPlay),this.btnPause.addEventListener("click",this.handleAutoPlay)),this.btnPlay&&this.btnPlay.addEventListener("keydown",this.handleKeyboardOnPlay),this.slidesContainer&&(this.slidesContainer.addEventListener("mouseover",this.handleMouseOver),this.slidesContainer.addEventListener("mouseout",this.handleMouseOut),this.slidesContainer.addEventListener("touchstart",this.dragStart),this.slidesContainer.addEventListener("touchend",this.dragEnd),this.slidesContainer.addEventListener("touchmove",this.dragAction),this.slidesContainer.addEventListener("transitionend",this.checkIndex)),this.container&&this.container.addEventListener("focus",this.handleFocus,!0),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this),this}destroy(){this.cloneFirstSLide&&this.cloneLastSLide&&(this.cloneFirstSLide.remove(),this.cloneLastSLide.remove()),this.btnPlay&&this.btnPlay.replaceWith(this.btnPlay.cloneNode(!0)),this.btnPause&&this.btnPause.replaceWith(this.btnPause.cloneNode(!0)),this.slidesContainer&&(this.slidesContainer.removeEventListener("mouseover",this.handleMouseOver),this.slidesContainer.removeEventListener("mouseout",this.handleMouseOut),this.slidesContainer.removeEventListener("touchstart",this.dragStart),this.slidesContainer.removeEventListener("touchend",this.dragEnd),this.slidesContainer.removeEventListener("touchmove",this.dragAction),this.slidesContainer.removeEventListener("transitionend",this.checkIndex)),this.container&&this.container.removeEventListener("focus",this.handleFocus,!0),this.navigationItems&&this.navigationItems.forEach(e=>{e.replaceWith(e.cloneNode(!0))}),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.autoPlayInterval&&(clearInterval(this.autoPlayInterval),this.autoPlay=null),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}checkBannerHeights(){if(this.executionCount+=1,this.executionCount>this.maxExecutions)return clearInterval(this.intervalId),void(this.executionCount=0);var e=this.slides.map(e=>{var i=t(".ecl-banner",e),s=ECL.components.get(i),n=s.defaultRatio();s.setHeight(n);var a=parseInt(i.style.getPropertyValue("--banner-footer-height"),10)||0,l=parseInt(i.style.height,10),r=l+a;return"auto"===i.style.height?i.offsetHeight:Number.isNaN(l)||100===l?1:r}).filter(e=>void 0!==e),i=Math.max(...e);e.length===this.slides.length&&i>1&&(clearInterval(this.intervalId),this.executionCount=0,this.slides.forEach(e=>{var s=null,n=null,a=t(".ecl-banner",e);if(a){s=t("img",a),n=t("video",a);var l=parseInt(a.style.getPropertyValue("--banner-footer-height"),10)||0,r=i-l;a.style.height=r+"px",a.style.aspectRatio="auto"}s&&(s.style.aspectRatio="auto"),n&&(n.style.aspectRatio="auto")}))}resetBannerHeights(){this.slides.forEach(e=>{var i=t(".ecl-banner",e),s=null,n=null,a=null;i&&(i.style.height="",s=t("img",i),n=t("video",i),a=t(".ecl-banner__credit",i),s&&(s.style.aspectRatio=""),n&&(n.style.aspectRatio=""),a&&setTimeout(()=>{i.style.setProperty("--banner-footer-height",a.offsetHeight+"px")},100))})}dragStart(e){e=e||window.event,this.posInitial=this.slidesContainer.offsetLeft,"touchstart"===e.type&&(this.posX1=e.touches[0].clientX,this.posY1=e.touches[0].clientY,this.allowShift=!1)}dragAction(e){if("touchmove"===(e=e||window.event).type){var t=e.touches[0].clientX-this.posX1,i=e.touches[0].clientY-this.posY1;!this.allowShift&&Math.abs(t)>Math.abs(i)&&(this.allowShift=!0),this.allowShift&&(e.preventDefault(),this.posX2=this.posX1-e.touches[0].clientX,this.posX1=e.touches[0].clientX,this.slidesContainer.style.left=this.slidesContainer.offsetLeft-this.posX2+"px")}}dragEnd(){this.allowShift&&(this.posFinal=this.slidesContainer.offsetLeft,this.posFinal-this.posInitial<-this.threshold?this.shiftSlide("next",!0):this.posFinal-this.posInitial>this.threshold?this.shiftSlide("prev",!0):this.slidesContainer.style.left=this.posInitial+"px",this.allowShift=!1)}shiftSlide(e,t){this.allowShift&&(this.index="number"==typeof e?e:"next"===e?this.index+1:this.index-1,this.moveSlides(!0)),t&&this.autoPlay&&this.handleAutoPlay(),this.allowShift=!1}moveSlides(e){var t=this.slideWidth*this.index;this.slidesContainer.style.transitionDuration=e?"0.4s":"0s",this.direction=getComputedStyle(this.element).direction,"rtl"===this.direction?this.slidesContainer.style.right="-"+t+"px":this.slidesContainer.style.left="-"+t+"px"}checkIndex(e){e&&"left"!==e.propertyName||(0===this.index&&(this.index=this.total),this.index===this.total+1&&(this.index=1),this.moveSlides(!1),this.currentSlide&&(this.currentSlide.textContent=this.index),this.slides&&this.slides.forEach((e,i)=>{var s=t(".ecl-link--primary-highlight",e);this.index===i?(e.removeAttribute("inert","true"),s&&s.removeAttribute("tabindex",-1)):(e.setAttribute("inert","true"),s&&s.setAttribute("tabindex",-1))}),this.navigationItems&&this.navigationItems.forEach((e,t)=>{this.index===t+1?(e.setAttribute("aria-current","true"),e.removeAttribute("tabindex",-1)):(e.removeAttribute("aria-current","true"),e.setAttribute("tabindex",-1))}),this.allowShift=!0)}handleAutoPlay(){if(this.autoPlay){clearInterval(this.autoPlayInterval),this.autoPlay=!1;var e=document.activeElement===this.btnPause;this.btnPlay.style.display="flex",this.btnPause.style.display="none",e&&this.btnPlay.focus()}else{this.autoPlayInterval=setInterval(()=>{this.shiftSlide("next")},5e3),this.autoPlay=!0;var t=document.activeElement===this.btnPlay;this.btnPlay.style.display="none",this.btnPause.style.display="flex",t&&this.btnPause.focus()}}handleMouseOver(){return this.hoverAutoPlay=this.autoPlay,this.hoverAutoPlay&&this.handleAutoPlay(),this}handleMouseOut(){return this.hoverAutoPlay&&this.handleAutoPlay(),this}handleResize(){var e=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);clearInterval(this.intervalId),clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{e>=1140?this.intervalId=setInterval(this.checkBannerHeights,100):this.resetBannerHeights(),this.slideWidth=this.slides[0].scrollWidth,this.checkIndex(),setTimeout(()=>{this.element.style.opacity=1},250)},250),e>=1140&&e<=1260?this.container.classList.add("ecl-carousel-container--padded"):this.container.classList.remove("ecl-carousel-container--padded"),(e<=768&&this.autoPlay||e>768&&null===this.autoPlay)&&this.handleAutoPlay()}handleKeyboardOnPlay(e){if("Tab"!==e.key||!e.shiftKey)switch(e.key){case"Tab":case"ArrowRight":e.preventDefault(),this.activeNav=t(this.navigationItemsClass+'[aria-current="true"]'),this.activeNav&&this.activeNav.focus(),this.autoPlay&&this.handleAutoPlay()}}handleKeyboardOnBullets(e){var t=document.activeElement;switch(e.key){case"ArrowRight":t.nextSibling&&(e.preventDefault(),this.shiftSlide("next",!0),setTimeout(()=>t.nextSibling.focus(),400));break;case"ArrowLeft":t.previousSibling?(this.shiftSlide("prev",!0),setTimeout(()=>t.previousSibling.focus(),400)):this.btnPlay.focus()}}handleFocus(e){var t=e.target;return t&&t.contains(document.activeElement)&&this.autoPlay&&this.handleAutoPlay(),this}}class g{static autoInit(e,t){var i=(void 0===t?{}:t).CATEGORY_FILTER,s=new g(e,void 0===i?{}:i);return s.init(),e.ECLCategoryFilter=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.itemSelector,n=void 0===s?".ecl-category-filter__item":s,a=i.parentItemSelector,l=void 0===a?"ecl-category-filter__item--has-children":a,r=i.listSelector,o=void 0===r?".ecl-category-filter__list":r,h=i.attachClickListener,c=void 0===h||h;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.itemSelector=n,this.parentItemSelector=l,this.listSelector=o,this.attachClickListener=c,this.items=null,this.handleClickExpand=this.handleClickExpand.bind(this),this.expandParents=this.expandParents.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.items=e(this.itemSelector,this.element);var t={preventDefault:()=>null};this.attachClickListener&&this.items&&this.items.forEach(e=>{e.addEventListener("click",this.handleClickExpand),e.getAttribute("aria-current")&&(t.target=e,this.handleClickExpand(t),this.expandParents(e))}),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.attachClickListener&&this.items&&this.items.forEach(e=>{e.removeEventListener("click",this.handleClickExpand,!1)}),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}expandParents(e){var t;if(e){var i={preventDefault:()=>null},s=null==(t=e.closest(this.listSelector))?void 0:t.previousElementSibling;s&&s.classList.contains(this.parentItemSelector)&&(i.target=s,this.handleClickExpand(i),this.expandParents(s))}}handleClickExpand(e){var t=e.target.closest(this.itemSelector),i="function"==typeof e.stopPropagation;i&&this.items.forEach(e=>{e===t?e.setAttribute("aria-current",!0):e.removeAttribute("aria-current")});var s=t.getAttribute("aria-expanded");s&&"true"===s?(e.preventDefault(),t.setAttribute("aria-expanded","false"),t.parentElement.classList.remove("ecl-category-filter__list-item--open")):s&&"false"===s&&(e.preventDefault(),t.setAttribute("aria-expanded","true"),t.parentElement.classList.add("ecl-category-filter__list-item--open")),s&&i&&t.classList.contains("ecl-category-filter__item--level-1")&&this.items.forEach(e=>{e!==t&&(e.parentElement.classList.remove("ecl-category-filter__list-item--open"),e.classList.contains(this.parentItemSelector)&&e.setAttribute("aria-expanded","false"))})}}class b{static autoInit(e,t){var i=(void 0===t?{}:t).DATEPICKER,s=new b(e,void 0===i?{}:i);return s.init(),e.ECLDatepicker=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.format,n=void 0===s?"":s,a=i.theme,l=void 0===a?"ecl-datepicker-theme":a,r=i.yearRange,o=void 0===r?40:r,h=i.reposition,c=void 0!==h&&h,d=i.attachResizeListener,u=void 0===d||d,m=i.i18n,p=void 0===m?{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"]}:m,v=i.showDaysInNextAndPreviousMonths,g=void 0===v||v,b=i.enableSelectionDaysInNextAndPreviousMonths,f=void 0===b||b;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.picker=null,this.resizeTimer=null,this.pikadayEl=null,this.format=n,this.theme=l,this.yearRange=o,this.i18n=p,this.showDaysInNextAndPreviousMonths=g,this.enableSelectionDaysInNextAndPreviousMonths=f,this.reposition=c,this.direction="ltr",this.attachResizeListener=u,this.handleResize=this.handleResize.bind(this)}init(){if(void 0===window.Pikaday)throw new TypeError("Pikaday is not available. Make sure to include Pikaday in your project if you want to use the ECL datepicker");if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.direction=getComputedStyle(this.element).direction,this.attachResizeListener&&window.addEventListener("resize",this.handleResize),b.resizeLogic=e=>{this.pikadayEl=e;var t=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),i=getComputedStyle(e).direction,s=e.getBoundingClientRect();if("rtl"===i){var n=t-s.right;e.style.left=t<768?n+"px":"auto"}else{var a=s.left;e.style.right=t<768?a+"px":"auto"}};var e={field:this.element,yearRange:this.yearRange,firstDay:1,i18n:this.i18n,theme:this.theme,reposition:this.reposition,isRTL:"rtl"===this.direction,position:"rtl"===this.direction?"bottom right":"bottom left",showDaysInNextAndPreviousMonths:this.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:this.enableSelectionDaysInNextAndPreviousMonths};return""!==this.format?e.format=this.format:e.toString=e=>("0"+e.getDate()).slice(-2)+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+e.getFullYear(),this.picker=new Pikaday(c({},e,{parse(t,i){if(!e.format){var s=t.split("-").map(Number),n=s[0],a=s[1],l=s[2];return new Date(l<100?2e3+l:l,a-1,n)}if("undefined"!=typeof moment&&""!==t){var r=moment(t,i,!1);if(r.isValid())return r.toDate()}return t},onOpen(){b.resizeLogic(this.el)}})),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this),this.picker}destroy(){this.picker&&(this.picker.destroy(),this.picker=null),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.pikadayEl&&b.resizeLogic(this.pikadayEl)},150)}}class f{static autoInit(e,t){var i=(void 0===t?{}:t).BREADCRUMB,s=new f(e,void 0===i?{}:i);return s.init(),e.ECLBreadcrumb=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.ellipsisButtonSelector,n=void 0===s?"[data-ecl-breadcrumb-ellipsis-button]":s,a=i.ellipsisSelector,l=void 0===a?"[data-ecl-breadcrumb-ellipsis]":a,r=i.segmentSelector,o=void 0===r?"[data-ecl-breadcrumb-item]":r,h=i.expandableItemsSelector,c=void 0===h?'[data-ecl-breadcrumb-item="expandable"]':h,d=i.staticItemsSelector,u=void 0===d?'[data-ecl-breadcrumb-item="static"]':d,m=i.onPartialExpand,p=void 0===m?null:m,v=i.onFullExpand,g=void 0===v?null:v,b=i.attachClickListener,f=void 0===b||b,y=i.attachResizeListener,L=void 0===y||y;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.ellipsisButtonSelector=n,this.ellipsisSelector=l,this.segmentSelector=o,this.expandableItemsSelector=c,this.staticItemsSelector=u,this.onPartialExpand=p,this.onFullExpand=g,this.attachClickListener=f,this.attachResizeListener=L,this.ellipsisButton=null,this.itemsElements=null,this.staticElements=null,this.expandableElements=null,this.resizeTimer=null,this.breakpoint=995,this.handleClickOnEllipsis=this.handleClickOnEllipsis.bind(this),this.handleResize=this.handleResize.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.ellipsisButton=t(this.ellipsisButtonSelector,this.element),this.attachClickListener&&this.ellipsisButton&&this.ellipsisButton.addEventListener("click",this.handleClickOnEllipsis),this.itemsElements=e(this.segmentSelector,this.element),this.staticElements=e(this.staticItemsSelector,this.element),this.expandableElements=e(this.expandableItemsSelector,this.element),this.check(),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.attachClickListener&&this.ellipsisButton&&this.ellipsisButton.removeEventListener("click",this.handleClickOnEllipsis),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),this.element.classList.remove("ecl-breadcrumb--wrap"),ECL.components.delete(this.element))}handleClickOnEllipsis(){return this.handleFullExpand()}check(){var e,t=this;return(e=d().m(function e(){var i;return d().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,t.computeVisibilityMap();case 1:if(i=e.v){e.n=2;break}return e.a(2);case 2:!0===i.expanded&&Math.floor(t.element.getBoundingClientRect().width)>t.breakpoint?t.handleFullExpand():t.handlePartialExpand(i);case 3:return e.a(2)}},e)}),function(){var t=this,i=arguments;return new Promise(function(s,n){var l=e.apply(t,i);function r(e){a(l,s,n,r,o,"next",e)}function o(e){a(l,s,n,r,o,"throw",e)}r(void 0)})})()}hideEllipsis(){var e=t(this.ellipsisSelector,this.element);e&&e.setAttribute("aria-hidden","true")}showAllItems(){this.expandableElements.forEach(e=>e.setAttribute("aria-hidden","false"))}handlePartialExpand(e){if(Math.floor(this.element.getBoundingClientRect().width)<=this.breakpoint)this.expandableElements.forEach(e=>{e.setAttribute("aria-hidden","true")});else if(e){this.element.classList.add("ecl-breadcrumb--collapsed");var i=e.isItemVisible;if(i&&Array.isArray(i))if(this.onPartialExpand)this.onPartialExpand(i);else{var s=t(this.ellipsisSelector,this.element);s&&s.setAttribute("aria-hidden","false"),this.expandableElements.forEach((e,t)=>{e.setAttribute("aria-hidden",i[t]?"false":"true")})}}}handleFullExpand(){this.element.classList.remove("ecl-breadcrumb--collapsed"),this.element.classList.add("ecl-breadcrumb--wrap"),this.onFullExpand?this.onFullExpand():(this.hideEllipsis(),this.showAllItems())}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.check()},200)}computeVisibilityMap(){return new Promise(e=>{if(this.expandableElements&&0!==this.expandableElements.length){var i=Math.floor(this.element.getBoundingClientRect().width);setTimeout(()=>{if(1.1*this.itemsElements.map(e=>{var t=e.getBoundingClientRect().width;return 0===t&&(e.style.display="inline-flex",t=e.getBoundingClientRect().width,e.style.cssText=""),t}).reduce((e,t)=>e+t)<=i)e({expanded:!0});else{var s=t(this.ellipsisSelector,this.element).getBoundingClientRect().width+this.staticElements.reduce((e,t)=>e+t.getBoundingClientRect().width,0);if(s>=i)e({expanded:!1,isItemVisible:[...this.expandableElements.map(()=>!1)]});else{var n=0,a=!0,l=[...this.expandableElements].reverse().map(e=>{if(!a)return!1;var t=(n+=e.getBoundingClientRect().width)+s<=i;return t||(a=!1),t}).reverse();e({expanded:!1,isItemVisible:l})}}},150)}else e({expanded:!0})})}}class y{static autoInit(e,t){var i=(void 0===t?{}:t).CONTENT_BLOCK,s=new y(e,void 0===i?{}:i);return s.init(),e.ECLContentBlock=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.targetSelector,n=void 0===s?"[data-ecl-picture-link]":s,a=i.titleSelector,l=void 0===a?"[data-ecl-title-link]":a,r=i.attachClickListener,o=void 0===r||r,h=i.maxIterations,c=void 0===h?1:h,d=i.withTitleAttr,u=void 0!==d&&d;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.targetSelector=n,this.titleSelector=l,this.attachClickListener=o,this.maxIterations=c,this.withTitleAttr=u,this.linkTo=this.linkTo.bind(this),this.findElementInCommonAncestor=this.findElementInCommonAncestor.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.picture=this.findElementInCommonAncestor(this.element,this.targetSelector,this.maxIterations),this.picture){if(this.titleLink=t(this.titleSelector,this.element),this.titleLink){this.picture.style.cursor="pointer";var e=t("img",this.picture);e&&this.withTitleAttr&&(e.title=this.constructor.convertToFullURL(this.titleLink.getAttribute("href"))),this.attachClickListener&&this.picture.addEventListener("click",this.linkTo)}this.element.setAttribute("data-ecl-auto-initialized",!0),ECL.components.set(this.element,this)}}linkTo(){this.titleLink&&this.titleLink.click()}findElementInCommonAncestor(e,i,s){var n=t(i,e);return n||(e.classList.contains("ecl-card__body")&&(s+=1),e===document.documentElement||s<=0?null:this.findElementInCommonAncestor(e.parentElement,i,s-1))}static convertToFullURL(e){if(e.startsWith("http://")||e.startsWith("https://"))return e;var t=new URL(window.location.href);return new URL(e,t).href}destroy(){this.attachClickListener&&this.picture&&this.picture.removeEventListener("click",this.linkto),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}}class L{static autoInit(e,t){var i=(void 0===t?{}:t).DESCRIPTION_LIST,s=new L(e,void 0===i?{}:i);return s.init(),e.ECLDescriptionList=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.listsSelector,n=void 0===s?"[data-ecl-description-list-collapsible]":s,a=i.visibleItemsSelector,l=void 0===a?"data-ecl-description-list-visible-items":a,r=i.moreItemLabelSelector,o=void 0===r?"data-ecl-description-list-more-label":r,h=i.attachClickListener,c=void 0===h||h;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.moreItemLabelSelector=o,this.listsSelector=n,this.attachClickListener=c,this.visibleItemsSelector=l,this.moreItemLabel=null,this.lists=null,this.handleClickOnMore=this.handleClickOnMore.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.moreItemLabel=this.element.getAttribute(this.moreItemLabelSelector),this.visibleItems=this.element.getAttribute(this.visibleItemsSelector),this.lists=e(this.listsSelector,this.element),this.lists[0]&&this.visibleItems>0&&this.moreItemLabel&&(this.lists.forEach(t=>{if(t.children&&t.children.length>this.visibleItems){var i=document.createElement("li");i.classList.add("ecl-description-list__see_more");var s=document.createElement("a");s.classList.add("ecl-link","ecl-link--standalone"),s.href="#",s.innerHTML=this.moreItemLabel,i.appendChild(s),t.appendChild(i),this.showHide(e(".ecl-description-list__definition-item",t)),this.attachClickListener&&s.addEventListener("click",this.handleClickOnMore)}}),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this))}showHide(e){if(e)for(var t=Array.from(e),i="ecl-description-list__definition-item",s=i+"--hidden",n=i+"--last-visible",a=0;a<t.length;a+=1){var l=t[a];a<this.visibleItems?(l.classList.remove(s),l.classList.remove(n)):a>=this.visibleItems&&l.classList.add(s),a===this.visibleItems-1?l.classList.add(n):l.classList.remove(n)}}destroy(){if(this.attachClickListener&&this.visibleItems>0){var t=e(".ecl-description-list__see_more");t[0]&&t.forEach(e=>{e.removeEventListener("click",this.handleClickOnMore)})}this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnMore(e){e.preventDefault();var t=e.target.parentNode,i=t.parentNode;this.element.contains(i)&&(Array.from(i.children).forEach(e=>{e.classList.remove("ecl-description-list__definition-item--hidden"),e.classList.remove("ecl-description-list__definition-item--last-visible")}),t.remove())}}class C{static autoInit(e,t){var i=(void 0===t?{}:t).EXPANDABLE,s=new C(e,void 0===i?{}:i);return s.init(),e.ECLExpandable=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.toggleSelector,a=void 0===n?"[data-ecl-expandable-toggle]":n,l=s.labelSelector,r=void 0===l?"[data-ecl-label]":l,o=s.labelExpanded,h=void 0===o?"data-ecl-label-expanded":o,c=s.labelCollapsed,d=void 0===c?"data-ecl-label-collapsed":c,u=s.attachClickListener,m=void 0===u||u;if(this.supportedEvents=["onToggle"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.toggleSelector=a,this.labelSelector=r,this.labelExpanded=h,this.labelCollapsed=d,this.attachClickListener=m,this.toggle=null,this.forceClose=!1,this.target=null,this.label=null,this.handleClickOnToggle=this.handleClickOnToggle.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.toggle=t(this.toggleSelector,this.element),this.target=document.querySelector("#"+this.toggle.getAttribute("aria-controls")),this.label=t(this.labelSelector,this.element),!this.target)throw new TypeError("Target has to be provided for expandable (aria-controls)");this.attachClickListener&&this.toggle&&this.toggle.addEventListener("click",this.handleClickOnToggle),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachClickListener&&this.toggle&&this.toggle.removeEventListener("click",this.handleClickOnToggle),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnToggle(e){var t=!0===this.forceClose||"true"===this.toggle.getAttribute("aria-expanded");this.toggle.setAttribute("aria-expanded",t?"false":"true"),this.target.hidden=!!t,this.label&&!t&&this.toggle.hasAttribute(this.labelExpanded)?this.label.innerHTML=this.toggle.getAttribute(this.labelExpanded):this.label&&t&&this.toggle.hasAttribute(this.labelCollapsed)&&(this.label.innerHTML=this.toggle.getAttribute(this.labelCollapsed));var i={expanded:!t,e:e};return this.trigger("onToggle",i),this}}class E{static autoInit(e,t){var i=(void 0===t?{}:t).FILE_DOWNLOAD,s=new E(e,void 0===i?{}:i);return s.init(),e.ECLFileDownload=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.translationToggleSelector,n=void 0===s?"[data-ecl-file-translation-toggle]":s,a=i.translationContainerSelector,l=void 0===a?"[data-ecl-file-translation-container]":a,r=i.attachClickListener,o=void 0===r||r;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.translationToggleSelector=n,this.translationContainerSelector=l,this.attachClickListener=o,this.translationToggle=null,this.translationContainer=null,this.handleClickOnToggle=this.handleClickOnToggle.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.translationToggle=t(this.translationToggleSelector,this.element),this.translationContainer=t(this.translationContainerSelector,this.element),this.attachClickListener&&this.translationToggle&&this.translationToggle.addEventListener("click",this.handleClickOnToggle),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.attachClickListener&&this.translationToggle&&this.translationToggle.removeEventListener("click",this.handleClickOnToggle),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnToggle(e){return e.preventDefault(),"true"===this.translationToggle.getAttribute("aria-expanded")?this.translationToggle.setAttribute("aria-expanded","false"):this.translationToggle.setAttribute("aria-expanded","true"),this}}class k{static autoInit(e,t){var i=(void 0===t?{}:t).FILE_UPLOAD,s=new k(e,void 0===i?{}:i);return s.init(),e.ECLFileUpload=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.groupSelector,a=void 0===n?"[data-ecl-file-upload-group]":n,l=s.buttonSelector,r=void 0===l?"[data-ecl-file-upload-button]":l,o=s.listSelector,h=void 0===o?"[data-ecl-file-upload-list]":o,c=s.labelChoose,d=void 0===c?"data-ecl-file-upload-label-choose":c,u=s.labelReplace,m=void 0===u?"data-ecl-file-upload-label-replace":u,p=s.attachChangeListener,v=void 0===p||p;if(this.supportedEvents=["onSelection"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.groupSelector=a,this.buttonSelector=r,this.listSelector=h,this.labelChoose=d,this.labelReplace=m,this.attachChangeListener=v,this.fileUploadGroup=null,this.fileUploadInput=null,this.fileUploadButton=null,this.fileUploadList=null,this.handleChange=this.handleChange.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.fileUploadGroup=this.element.closest(this.groupSelector),this.fileUploadInput=this.element,this.fileUploadButton=t(this.buttonSelector,this.fileUploadGroup),this.fileUploadList=t(this.listSelector,this.fileUploadGroup),this.attachChangeListener&&this.fileUploadInput&&this.fileUploadInput.addEventListener("change",this.handleChange),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachChangeListener&&this.fileUploadInput&&this.fileUploadInput.removeEventListener("change",this.handleChange),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleChange(e){if("files"in e.target){var t="";Array.prototype.forEach.call(e.target.files,e=>{var i=function(e,t){if(0===e)return"0 Bytes";var i=t,s=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,s)).toFixed(i))+" "+["Bytes","kB","MB","GB","TB","PB","EB","ZB","YB"][s]}(e.size,1),s=e.name.split(".").pop();t+='<li class="ecl-file-upload__item">\n <span class="ecl-file-upload__item-name">'+e.name+'</span>\n <span class="ecl-file-upload__item-meta">('+i+" - "+s+")</span>\n </li>"}),this.fileUploadList.innerHTML=t,this.fileUploadButton.hasAttribute(this.labelReplace)&&(this.fileUploadButton.innerHTML=this.fileUploadButton.getAttribute(this.labelReplace));var i={files:e.target.files,event:e};this.trigger("onSelection",i)}else this.fileUploadButton.hasAttribute(this.labelChoose)&&(this.fileUploadButton.innerHTML=this.fileUploadButton.getAttribute(this.labelChoose))}}
3
5
  /*!
4
6
  * tabbable 6.2.0
5
7
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
6
- */var w=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],k=w.join(","),S="undefined"==typeof Element,x=S?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,A=!S&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},_=function e(t,i){var s;void 0===i&&(i=!0);var n=null==t||null===(s=t.getAttribute)||void 0===s?void 0:s.call(t,"inert");return""===n||"true"===n||i&&t&&e(t.parentNode)},O=function(e,t,i){if(_(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(k));return t&&x.call(e,k)&&s.unshift(e),s=s.filter(i)},T=function e(t,i,s){for(var n=[],l=Array.from(t);l.length;){var a=l.shift();if(!_(a,!1))if("SLOT"===a.tagName){var r=a.assignedElements(),o=e(r.length?r:a.children,!0,s);s.flatten?n.push.apply(n,o):n.push({scopeParent:a,candidates:o})}else{x.call(a,k)&&s.filter(a)&&(i||!t.includes(a))&&n.push(a);var h=a.shadowRoot||"function"==typeof s.getShadowRoot&&s.getShadowRoot(a),c=!_(h,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(a));if(h&&c){var d=e(!0===h?a.children:h.children,!0,s);s.flatten?n.push.apply(n,d):n.push({scopeParent:a,candidates:d})}else l.unshift.apply(l,a.children)}}return n},P=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},I=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,i=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===i||"true"===i}(e))&&!P(e)?0:e.tabIndex},N=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},M=function(e){return"INPUT"===e.tagName},D=function(e){return function(e){return M(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,i=e.form||A(e),s=function(e){return i.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=s(window.CSS.escape(e.name));else try{t=s(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var n=function(e,t){for(var i=0;i<e.length;i++)if(e[i].checked&&e[i].form===t)return e[i]}(t,e.form);return!n||n===e}(e)},R=function(e){var t=e.getBoundingClientRect(),i=t.width,s=t.height;return 0===i&&0===s},B=function(e,t){var i=t.displayCheck,s=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=x.call(e,"details>summary:first-of-type")?e.parentElement:e;if(x.call(n,"details:not([open]) *"))return!0;if(i&&"full"!==i&&"legacy-full"!==i){if("non-zero-area"===i)return R(e)}else{if("function"==typeof s){for(var l=e;e;){var a=e.parentElement,r=A(e);if(a&&!a.shadowRoot&&!0===s(a))return R(e);e=e.assignedSlot?e.assignedSlot:a||r===e.ownerDocument?a:r.host}e=l}if(function(e){var t,i,s,n,l=e&&A(e),a=null===(t=l)||void 0===t?void 0:t.host,r=!1;if(l&&l!==e)for(r=!!(null!==(i=a)&&void 0!==i&&null!==(s=i.ownerDocument)&&void 0!==s&&s.contains(a)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!r&&a;){var o,h,c;r=!(null===(h=a=null===(o=l=A(a))||void 0===o?void 0:o.host)||void 0===h||null===(c=h.ownerDocument)||void 0===c||!c.contains(a))}return r}(e))return!e.getClientRects().length;if("legacy-full"!==i)return!0}return!1},z=function(e,t){return!(t.disabled||_(t)||function(e){return M(e)&&"hidden"===e.type}(t)||B(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var i=0;i<t.children.length;i++){var s=t.children.item(i);if("LEGEND"===s.tagName)return!!x.call(t,"fieldset[disabled] *")||!s.contains(e)}return!0}t=t.parentElement}return!1}(t))},F=function(e,t){return!(D(t)||I(t)<0||!z(e,t))},H=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},K=function e(t){var i=[],s=[];return t.forEach((function(t,n){var l=!!t.scopeParent,a=l?t.scopeParent:t,r=function(e,t){var i=I(e);return i<0&&t&&!P(e)?0:i}(a,l),o=l?e(t.candidates):a;0===r?l?i.push.apply(i,o):i.push(a):s.push({documentOrder:n,tabIndex:r,item:t,isScope:l,content:o})})),s.sort(N).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(i)},V=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==x.call(e,k)&&F(t,e)},G=w.concat("iframe").join(","),W=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==x.call(e,G)&&z(t,e)};
8
+ */var w=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],S=w.join(","),A="undefined"==typeof Element,_=A?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,O=!A&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},x=function e(t,i){var s;void 0===i&&(i=!0);var n=null==t||null===(s=t.getAttribute)||void 0===s?void 0:s.call(t,"inert");return""===n||"true"===n||i&&t&&e(t.parentNode)},T=function(e,t,i){if(x(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(S));return t&&_.call(e,S)&&s.unshift(e),s=s.filter(i)},P=function e(t,i,s){for(var n=[],a=Array.from(t);a.length;){var l=a.shift();if(!x(l,!1))if("SLOT"===l.tagName){var r=l.assignedElements(),o=e(r.length?r:l.children,!0,s);s.flatten?n.push.apply(n,o):n.push({scopeParent:l,candidates:o})}else{_.call(l,S)&&s.filter(l)&&(i||!t.includes(l))&&n.push(l);var h=l.shadowRoot||"function"==typeof s.getShadowRoot&&s.getShadowRoot(l),c=!x(h,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(l));if(h&&c){var d=e(!0===h?l.children:h.children,!0,s);s.flatten?n.push.apply(n,d):n.push({scopeParent:l,candidates:d})}else a.unshift.apply(a,l.children)}}return n},M=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},I=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,i=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===i||"true"===i}(e))&&!M(e)?0:e.tabIndex},N=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},B=function(e){return"INPUT"===e.tagName},R=function(e){return function(e){return B(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,i=e.form||O(e),s=function(e){return i.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=s(window.CSS.escape(e.name));else try{t=s(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var n=function(e,t){for(var i=0;i<e.length;i++)if(e[i].checked&&e[i].form===t)return e[i]}(t,e.form);return!n||n===e}(e)},D=function(e){var t=e.getBoundingClientRect(),i=t.width,s=t.height;return 0===i&&0===s},F=function(e,t){var i=t.displayCheck,s=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=_.call(e,"details>summary:first-of-type")?e.parentElement:e;if(_.call(n,"details:not([open]) *"))return!0;if(i&&"full"!==i&&"legacy-full"!==i){if("non-zero-area"===i)return D(e)}else{if("function"==typeof s){for(var a=e;e;){var l=e.parentElement,r=O(e);if(l&&!l.shadowRoot&&!0===s(l))return D(e);e=e.assignedSlot?e.assignedSlot:l||r===e.ownerDocument?l:r.host}e=a}if(function(e){var t,i,s,n,a=e&&O(e),l=null===(t=a)||void 0===t?void 0:t.host,r=!1;if(a&&a!==e)for(r=!!(null!==(i=l)&&void 0!==i&&null!==(s=i.ownerDocument)&&void 0!==s&&s.contains(l)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!r&&l;){var o,h,c;r=!(null===(h=l=null===(o=a=O(l))||void 0===o?void 0:o.host)||void 0===h||null===(c=h.ownerDocument)||void 0===c||!c.contains(l))}return r}(e))return!e.getClientRects().length;if("legacy-full"!==i)return!0}return!1},z=function(e,t){return!(t.disabled||x(t)||function(e){return B(e)&&"hidden"===e.type}(t)||F(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var i=0;i<t.children.length;i++){var s=t.children.item(i);if("LEGEND"===s.tagName)return!!_.call(t,"fieldset[disabled] *")||!s.contains(e)}return!0}t=t.parentElement}return!1}(t))},H=function(e,t){return!(R(t)||I(t)<0||!z(e,t))},K=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},V=function e(t){var i=[],s=[];return t.forEach(function(t,n){var a=!!t.scopeParent,l=a?t.scopeParent:t,r=function(e,t){var i=I(e);return i<0&&t&&!M(e)?0:i}(l,a),o=a?e(t.candidates):l;0===r?a?i.push.apply(i,o):i.push(l):s.push({documentOrder:n,tabIndex:r,item:t,isScope:a,content:o})}),s.sort(N).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(i)},G=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==_.call(e,S)&&H(t,e)},W=w.concat("iframe").join(","),U=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==_.call(e,W)&&z(t,e)};
7
9
  /*!
8
- * focus-trap 7.6.4
10
+ * focus-trap 7.6.5
9
11
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
10
12
  */
11
- function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=Array(t);i<t;i++)s[i]=e[i];return s}function j(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function q(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function Y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?q(Object(i),!0).forEach((function(t){j(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):q(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function X(e){return function(e){if(Array.isArray(e))return U(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?U(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var $=function(e,t){if(e.length>0){var i=e[e.length-1];i!==t&&i._setPausedState(!0)}var s=e.indexOf(t);-1===s||e.splice(s,1),e.push(t)},Q=function(e,t){var i=e.indexOf(t);-1!==i&&e.splice(i,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)},Z=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},J=function(e){return Z(e)&&!e.shiftKey},ee=function(e){return Z(e)&&e.shiftKey},te=function(e){return setTimeout(e,0)},ie=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return"function"==typeof e?e.apply(void 0,i):e},se=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},ne=[],le=function(e,t){var i,s=(null==t?void 0:t.document)||document,n=(null==t?void 0:t.trapStack)||ne,l=Y({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:J,isKeyBackward:ee},t),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},r=function(e,t,i){return e&&void 0!==e[t]?e[t]:l[i||t]},o=function(e,t){var i="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return a.containerGroups.findIndex((function(t){var s=t.container,n=t.tabbableNodes;return s.contains(e)||(null==i?void 0:i.includes(s))||n.find((function(t){return t===e}))}))},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.hasFallback,n=void 0!==i&&i,a=t.params,r=void 0===a?[]:a,o=l[e];if("function"==typeof o&&(o=o.apply(void 0,X(r))),!0===o&&(o=void 0),!o){if(void 0===o||!1===o)return o;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var h=o;if("string"==typeof o){try{h=s.querySelector(o)}catch(t){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(t.message,'"'))}if(!h&&!n)throw new Error("`".concat(e,"` as selector refers to no known node"))}return h},c=function(){var e=h("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!W(e,l.tabbableOptions))if(o(s.activeElement)>=0)e=s.activeElement;else{var t=a.tabbableGroups[0];e=t&&t.firstTabbableNode||h("fallbackFocus")}else null===e&&(e=h("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(a.containerGroups=a.containers.map((function(e){var t=function(e,t){var i;return i=(t=t||{}).getShadowRoot?T([e],t.includeContainer,{filter:F.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:H}):O(e,t.includeContainer,F.bind(null,t)),K(i)}(e,l.tabbableOptions),i=function(e,t){return(t=t||{}).getShadowRoot?T([e],t.includeContainer,{filter:z.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):O(e,t.includeContainer,z.bind(null,t))}(e,l.tabbableOptions),s=t.length>0?t[0]:void 0,n=t.length>0?t[t.length-1]:void 0,a=i.find((function(e){return V(e)})),r=i.slice().reverse().find((function(e){return V(e)})),o=!!t.find((function(e){return I(e)>0}));return{container:e,tabbableNodes:t,focusableNodes:i,posTabIndexesFound:o,firstTabbableNode:s,lastTabbableNode:n,firstDomTabbableNode:a,lastDomTabbableNode:r,nextTabbableNode:function(e){var s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.indexOf(e);return n<0?s?i.slice(i.indexOf(e)+1).find((function(e){return V(e)})):i.slice(0,i.indexOf(e)).reverse().find((function(e){return V(e)})):t[n+(s?1:-1)]}}})),a.tabbableGroups=a.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),a.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find((function(e){return e.posTabIndexesFound}))&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},u=function(e){var t=e.activeElement;if(t)return t.shadowRoot&&null!==t.shadowRoot.activeElement?u(t.shadowRoot):t},m=function(e){!1!==e&&e!==u(document)&&(e&&e.focus?(e.focus({preventScroll:!!l.preventScroll}),a.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):m(c()))},p=function(e){var t=h("setReturnFocus",{params:[e]});return t||!1!==t&&e},v=function(e){var t=e.target,i=e.event,s=e.isBackward,n=void 0!==s&&s;t=t||se(i),d();var r=null;if(a.tabbableGroups.length>0){var c=o(t,i),u=c>=0?a.containerGroups[c]:void 0;if(c<0)r=n?a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:a.tabbableGroups[0].firstTabbableNode;else if(n){var m=a.tabbableGroups.findIndex((function(e){var i=e.firstTabbableNode;return t===i}));if(m<0&&(u.container===t||W(t,l.tabbableOptions)&&!V(t,l.tabbableOptions)&&!u.nextTabbableNode(t,!1))&&(m=c),m>=0){var p=0===m?a.tabbableGroups.length-1:m-1,v=a.tabbableGroups[p];r=I(t)>=0?v.lastTabbableNode:v.lastDomTabbableNode}else Z(i)||(r=u.nextTabbableNode(t,!1))}else{var g=a.tabbableGroups.findIndex((function(e){var i=e.lastTabbableNode;return t===i}));if(g<0&&(u.container===t||W(t,l.tabbableOptions)&&!V(t,l.tabbableOptions)&&!u.nextTabbableNode(t))&&(g=c),g>=0){var b=g===a.tabbableGroups.length-1?0:g+1,f=a.tabbableGroups[b];r=I(t)>=0?f.firstTabbableNode:f.firstDomTabbableNode}else Z(i)||(r=u.nextTabbableNode(t))}}else r=h("fallbackFocus");return r},g=function(e){var t=se(e);o(t,e)>=0||(ie(l.clickOutsideDeactivates,e)?i.deactivate({returnFocus:l.returnFocusOnDeactivate}):ie(l.allowOutsideClick,e)||e.preventDefault())},b=function(e){var t=se(e),i=o(t,e)>=0;if(i||t instanceof Document)i&&(a.mostRecentlyFocusedNode=t);else{var s;e.stopImmediatePropagation();var n=!0;if(a.mostRecentlyFocusedNode)if(I(a.mostRecentlyFocusedNode)>0){var r=o(a.mostRecentlyFocusedNode),h=a.containerGroups[r].tabbableNodes;if(h.length>0){var d=h.findIndex((function(e){return e===a.mostRecentlyFocusedNode}));d>=0&&(l.isKeyForward(a.recentNavEvent)?d+1<h.length&&(s=h[d+1],n=!1):d-1>=0&&(s=h[d-1],n=!1))}}else a.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return I(e)>0}))}))||(n=!1);else n=!1;n&&(s=v({target:a.mostRecentlyFocusedNode,isBackward:l.isKeyBackward(a.recentNavEvent)})),m(s||(a.mostRecentlyFocusedNode||c()))}a.recentNavEvent=void 0},f=function(e){(l.isKeyForward(e)||l.isKeyBackward(e))&&function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];a.recentNavEvent=e;var i=v({event:e,isBackward:t});i&&(Z(e)&&e.preventDefault(),m(i))}(e,l.isKeyBackward(e))},y=function(e){var t;"Escape"!==(null==(t=e)?void 0:t.key)&&"Esc"!==(null==t?void 0:t.key)&&27!==(null==t?void 0:t.keyCode)||!1===ie(l.escapeDeactivates,e)||(e.preventDefault(),i.deactivate())},L=function(e){var t=se(e);o(t,e)>=0||ie(l.clickOutsideDeactivates,e)||ie(l.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},E=function(){if(a.active)return $(n,i),a.delayInitialFocusTimer=l.delayInitialFocus?te((function(){m(c())})):m(c()),s.addEventListener("focusin",b,!0),s.addEventListener("mousedown",g,{capture:!0,passive:!1}),s.addEventListener("touchstart",g,{capture:!0,passive:!1}),s.addEventListener("click",L,{capture:!0,passive:!1}),s.addEventListener("keydown",f,{capture:!0,passive:!1}),s.addEventListener("keydown",y),i},C=function(){if(a.active)return s.removeEventListener("focusin",b,!0),s.removeEventListener("mousedown",g,!0),s.removeEventListener("touchstart",g,!0),s.removeEventListener("click",L,!0),s.removeEventListener("keydown",f,!0),s.removeEventListener("keydown",y),i},w="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===a.mostRecentlyFocusedNode}))}))&&m(c())})):void 0,k=function(){w&&(w.disconnect(),a.active&&!a.paused&&a.containers.map((function(e){w.observe(e,{subtree:!0,childList:!0})})))};return i={get active(){return a.active},get paused(){return a.paused},activate:function(e){if(a.active)return this;var t=r(e,"onActivate"),i=r(e,"onPostActivate"),n=r(e,"checkCanFocusTrap");n||d(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=s.activeElement,null==t||t();var l=function(){n&&d(),E(),k(),null==i||i()};return n?(n(a.containers.concat()).then(l,l),this):(l(),this)},deactivate:function(e){if(!a.active)return this;var t=Y({onDeactivate:l.onDeactivate,onPostDeactivate:l.onPostDeactivate,checkCanReturnFocus:l.checkCanReturnFocus},e);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,C(),a.active=!1,a.paused=!1,k(),Q(n,i);var s=r(t,"onDeactivate"),o=r(t,"onPostDeactivate"),h=r(t,"checkCanReturnFocus"),c=r(t,"returnFocus","returnFocusOnDeactivate");null==s||s();var d=function(){te((function(){c&&m(p(a.nodeFocusedBeforeActivation)),null==o||o()}))};return c&&h?(h(p(a.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(e){return a.active?(a.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return a.active?(a.manuallyPaused=!1,n[n.length-1]!==this?this:this._setPausedState(!1,e)):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return a.containers=t.map((function(e){return"string"==typeof e?s.querySelector(e):e})),a.active&&d(),k(),this}},Object.defineProperties(i,{_isManuallyPaused:{value:function(){return a.manuallyPaused}},_setPausedState:{value:function(e,t){if(a.paused===e)return this;if(a.paused=e,e){var i=r(t,"onPause"),s=r(t,"onPostPause");null==i||i(),C(),k(),null==s||s()}else{var n=r(t,"onUnpause"),l=r(t,"onPostUnpause");null==n||n(),d(),E(),k(),null==l||l()}return this}}}),i.updateContainerElements(e),i};class ae{static autoInit(e,t){var i=(void 0===t?{}:t).GALLERY,s=new ae(e,void 0===i?{}:i);return s.init(),e.ECLGallery=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.expandableSelector,n=void 0===s?"data-ecl-gallery-not-expandable":s,l=i.galleryItemSelector,a=void 0===l?"[data-ecl-gallery-item]":l,r=i.descriptionSelector,o=void 0===r?"[data-ecl-gallery-description]":r,h=i.titleSelector,c=void 0===h?"[data-ecl-gallery-title]":h,d=i.noOverlaySelector,u=void 0===d?"data-ecl-gallery-no-overlay":d,m=i.itemsLimitSelector,p=void 0===m?"data-ecl-gallery-visible-items":m,v=i.closeButtonSelector,g=void 0===v?"[data-ecl-gallery-close]":v,b=i.viewAllSelector,f=void 0===b?"[data-ecl-gallery-all]":b,y=i.viewAllLabelSelector,L=void 0===y?"data-ecl-gallery-collapsed-label":y,E=i.viewAllExpandedLabelSelector,C=void 0===E?"data-ecl-gallery-expanded-label":E,w=i.countSelector,k=void 0===w?"[data-ecl-gallery-count]":w,S=i.overlaySelector,x=void 0===S?"[data-ecl-gallery-overlay]":S,A=i.overlayHeaderSelector,_=void 0===A?"[data-ecl-gallery-overlay-header]":A,O=i.overlayFooterSelector,T=void 0===O?"[data-ecl-gallery-overlay-footer]":O,P=i.overlayMediaSelector,I=void 0===P?"[data-ecl-gallery-overlay-media]":P,N=i.overlayCounterCurrentSelector,M=void 0===N?"[data-ecl-gallery-overlay-counter-current]":N,D=i.overlayCounterMaxSelector,R=void 0===D?"[data-ecl-gallery-overlay-counter-max]":D,B=i.overlayDownloadSelector,z=void 0===B?"[data-ecl-gallery-overlay-download]":B,F=i.overlayShareSelector,H=void 0===F?"[data-ecl-gallery-overlay-share]":F,K=i.overlayDescriptionSelector,V=void 0===K?"[data-ecl-gallery-overlay-description]":K,G=i.overlayPreviousSelector,W=void 0===G?"[data-ecl-gallery-overlay-previous]":G,U=i.overlayNextSelector,j=void 0===U?"[data-ecl-gallery-overlay-next]":U,q=i.videoTitleSelector,Y=void 0===q?"data-ecl-gallery-item-video-title":q,X=i.attachClickListener,$=void 0===X||X,Q=i.attachKeyListener,Z=void 0===Q||Q,J=i.attachResizeListener,ee=void 0===J||J;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.galleryItemSelector=a,this.descriptionSelector=o,this.titleSelector=c,this.closeButtonSelector=g,this.viewAllSelector=f,this.countSelector=k,this.itemsLimitSelector=p,this.overlaySelector=x,this.noOverlaySelector=u,this.overlayHeaderSelector=_,this.overlayFooterSelector=T,this.overlayMediaSelector=I,this.overlayCounterCurrentSelector=M,this.overlayCounterMaxSelector=R,this.overlayDownloadSelector=z,this.overlayShareSelector=H,this.overlayDescriptionSelector=V,this.overlayPreviousSelector=W,this.overlayNextSelector=j,this.attachClickListener=$,this.attachKeyListener=Z,this.attachResizeListener=ee,this.viewAllLabelSelector=L,this.viewAllExpandedLabelSelector=C,this.expandableSelector=n,this.videoTitleSelector=Y,this.galleryItems=null,this.closeButton=null,this.viewAll=null,this.count=null,this.overlay=null,this.overlayHeader=null,this.overlayFooter=null,this.overlayMedia=null,this.overlayCounterCurrent=null,this.overlayCounterMax=null,this.overlayDownload=null,this.overlayShare=null,this.overlayDescription=null,this.overlayPrevious=null,this.overlayNext=null,this.selectedItem=null,this.focusTrap=null,this.isDesktop=!1,this.resizeTimer=null,this.visibleItems=0,this.breakpointMd=768,this.breakpointLg=996,this.imageHeight=185,this.imageHeightBig=260,this.iframeResize=this.iframeResize.bind(this),this.handleClickOnCloseButton=this.handleClickOnCloseButton.bind(this),this.handleClickOnViewAll=this.handleClickOnViewAll.bind(this),this.handleClickOnItem=this.handleClickOnItem.bind(this),this.preventClickOnItem=this.preventClickOnItem.bind(this),this.handleKeyPressOnItem=this.handleKeyPressOnItem.bind(this),this.handleClickOnPreviousButton=this.handleClickOnPreviousButton.bind(this),this.handleClickOnNextButton=this.handleClickOnNextButton.bind(this),this.handleKeyboard=this.handleKeyboard.bind(this),this.handleResize=this.handleResize.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.expandable=!this.element.hasAttribute(this.expandableSelector),this.visibleItems=this.element.getAttribute(this.itemsLimitSelector),this.galleryItems=e(this.galleryItemSelector,this.element),this.closeButton=t(this.closeButtonSelector,this.element),this.noOverlay=this.element.hasAttribute(this.noOverlaySelector),this.expandable&&(this.viewAll=t(this.viewAllSelector,this.element),this.viewAllLabel=this.viewAll.getAttribute(this.viewAllLabelSelector)||this.viewAll.innerText,this.viewAllLabelExpanded=this.viewAll.getAttribute(this.viewAllExpandedLabelSelector)||this.viewAllLabel),this.count=t(this.countSelector,this.element),this.attachClickListener&&this.viewAll&&this.viewAll.addEventListener("click",this.handleClickOnViewAll),this.noOverlay?this.galleryItems.forEach((e=>{e.classList.add("ecl-gallery__item__link--frozen"),e.addEventListener("click",this.preventClickOnItem)})):(this.overlay=t(this.overlaySelector,this.element),this.overlayHeader=t(this.overlayHeaderSelector,this.overlay),this.overlayFooter=t(this.overlayFooterSelector,this.overlay),this.overlayMedia=t(this.overlayMediaSelector,this.overlay),this.overlayCounterCurrent=t(this.overlayCounterCurrentSelector,this.overlay),this.overlayCounterMax=t(this.overlayCounterMaxSelector,this.overlay),this.overlayDownload=t(this.overlayDownloadSelector,this.overlay),this.overlayShare=t(this.overlayShareSelector,this.overlay),this.overlayDescription=t(this.overlayDescriptionSelector,this.overlay),this.overlayPrevious=t(this.overlayPreviousSelector,this.overlay),this.overlayNext=t(this.overlayNextSelector,this.overlay),this.focusTrap=le(this.overlay,{escapeDeactivates:!1,returnFocusOnDeactivate:!1}),this.isDialogSupported=!0,window.HTMLDialogElement||(this.isDialogSupported=!1),this.attachClickListener&&this.closeButton&&this.closeButton.addEventListener("click",this.handleClickOnCloseButton),this.attachClickListener&&this.galleryItems&&this.galleryItems.forEach((e=>{this.attachClickListener&&e.addEventListener("click",this.handleClickOnItem),this.attachKeyListener&&e.addEventListener("keyup",this.handleKeyPressOnItem)})),this.attachClickListener&&this.overlayPrevious&&this.overlayPrevious.addEventListener("click",this.handleClickOnPreviousButton),this.attachClickListener&&this.overlayNext&&this.overlayNext.addEventListener("click",this.handleClickOnNextButton),!this.isDialogSupported&&this.attachKeyListener&&this.overlay&&this.overlay.addEventListener("keyup",this.handleKeyboard),this.isDialogSupported&&this.overlay&&this.overlay.addEventListener("close",this.handleClickOnCloseButton)),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.expandable&&(this.checkScreen(),this.hideItems()),this.galleryItems.forEach(((e,t)=>{e.setAttribute("data-ecl-gallery-item-id",t)})),this.count&&(this.count.innerHTML=this.galleryItems.length),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.attachClickListener&&this.closeButton&&this.closeButton.removeEventListener("click",this.handleClickOnCloseButton),this.attachClickListener&&this.viewAll&&this.viewAll.removeEventListener("click",this.handleClickOnViewAll),this.attachClickListener&&this.galleryItems&&this.galleryItems.forEach((e=>{e.removeEventListener("click",this.handleClickOnItem)})),this.attachClickListener&&this.overlayPrevious&&this.overlayPrevious.removeEventListener("click",this.handleClickOnPreviousButton),this.attachClickListener&&this.overlayNext&&this.overlayNext.removeEventListener("click",this.handleClickOnNextButton),!this.isDialogSupported&&this.attachKeyListener&&this.overlay&&this.overlay.removeEventListener("keyup",this.handleKeyboard),this.isDialogSupported&&this.overlay&&this.overlay.removeEventListener("close",this.handleClickOnCloseButton),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}checkScreen(){window.innerWidth>this.breakpointMd?this.isDesktop=!0:this.isDesktop=!1,window.innerWidth>this.breakpointLg&&(this.isLarge=!0)}iframeResize(e){if(!e&&this.overlay&&(e=t("iframe",this.overlay)),e){var i=window.innerWidth;setTimeout((()=>{var t=this.overlay.clientHeight-this.overlayHeader.clientHeight-this.overlayFooter.clientHeight;i>t?(e.setAttribute("height",t+"px"),16*t/9>i?e.setAttribute("width",i-.05*i+"px"):e.setAttribute("width",16*t/9+"px")):(e.setAttribute("width",i+"px"),4*i/3>t?e.setAttribute("height",t-.05*t+"px"):e.setAttribute("height",4*i/3+"px"))}),0)}}hideItems(e){if(void 0===e&&(e=0),this.viewAll&&!this.viewAll.expanded){if(this.isDesktop){var t=[];return this.galleryItems.forEach(((i,s)=>{i.parentNode.classList.remove("ecl-gallery__item--hidden"),s>=Number(this.visibleItems)+Number(e)&&(t=[...t,s])})),void t.forEach((e=>{this.galleryItems[e].parentNode.classList.add("ecl-gallery__item--hidden")}))}this.galleryItems.forEach(((t,i)=>{i>2+Number(e)?t.parentNode.classList.add("ecl-gallery__item--hidden"):t.parentNode.classList.remove("ecl-gallery__item--hidden")}))}}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{this.checkScreen(),this.hideItems(),this.iframeResize()}),200)}updateOverlay(i){this.selectedItem=i;var s=i.getAttribute("data-ecl-gallery-item-embed-src"),n=i.getAttribute("data-ecl-gallery-item-embed-audio"),l=t("video",i),a=null;if(null!=s){(a=document.createElement("div")).classList.add("ecl-gallery__slider-embed");var r=document.createElement("div");r.classList.add("ecl-gallery__slider-embed-audio"),n&&(r.innerHTML=n);var o=new URL(s),h=document.createElement("iframe");h.setAttribute("src",o),h.setAttribute("frameBorder","0");var c=i.getAttribute(this.videoTitleSelector);c&&h.setAttribute("title",c),this.overlayMedia&&(n&&a.appendChild(r),a.appendChild(h),this.overlayMedia.innerHTML="",this.overlayMedia.appendChild(a)),this.iframeResize(h)}else if(null!=l){(a=document.createElement("video")).setAttribute("poster",l.poster),a.setAttribute("controls","controls"),a.classList.add("ecl-gallery__slider-video");var d=i.getAttribute(this.videoTitleSelector);d&&a.setAttribute("aria-label",d),this.overlayMedia&&(this.overlayMedia.innerHTML="",this.overlayMedia.appendChild(a)),e("source",l).forEach((e=>{var t=document.createElement("source");t.setAttribute("src",e.getAttribute("src")),t.setAttribute("type",e.getAttribute("type")),a.appendChild(t)})),e("track",l).forEach((e=>{var t=document.createElement("track");t.setAttribute("src",e.getAttribute("src")),t.setAttribute("kind",e.getAttribute("kind")),t.setAttribute("srclang",e.getAttribute("srcLang")),t.setAttribute("label",e.getAttribute("label")),a.appendChild(t)})),a.load()}else{var u=t(".ecl-gallery__picture",i),m=t("img",u);u?(m.classList.remove("ecl-gallery__image"),a=u.cloneNode(!0)):((a=document.createElement("img")).setAttribute("src",m.getAttribute("src")),a.setAttribute("alt",m.getAttribute("alt"))),a.classList.add("ecl-gallery__slider-image"),this.overlayMedia&&(this.overlayMedia.innerHTML="",this.overlayMedia.appendChild(a))}var p=i.getAttribute("id");this.overlayCounterCurrent.innerHTML=+i.getAttribute("data-ecl-gallery-item-id")+1,this.overlayCounterMax.innerHTML=this.galleryItems.length;var v=document.createElement("div");v.classList.add("ecl-gallery__detail-actions-mobile"),null!==this.overlayDownload&&null===s?(this.overlayDownload.href=this.selectedItem.href,p&&this.overlayDownload.setAttribute("aria-describedby",p+"-title"),this.overlayDownload.hidden=!1,v.appendChild(this.overlayDownload.cloneNode(!0))):null!==this.overlayDownload&&(this.overlayDownload.hidden=!0);var g=this.selectedItem.getAttribute("data-ecl-gallery-item-share");null!=g?(this.overlayShare.href=g,p&&this.overlayShare.setAttribute("aria-describedby",p+"-title"),this.overlayShare.hidden=!1,v.appendChild(this.overlayShare.cloneNode(!0))):this.overlayShare.hidden=!0;var b=t(this.descriptionSelector,i);b&&(this.overlayDescription.innerHTML=b.innerHTML),v.childNodes.length>0&&this.overlayDescription.prepend(v)}handleKeyboard(e){"Escape"!==e.key&&"Esc"!==e.key||this.handleClickOnCloseButton()}handleClickOnCloseButton(){this.isDialogSupported?this.overlay.close():this.overlay.removeAttribute("open");var e=t("iframe",this.overlayMedia);e&&e.remove();var i=t("video",this.overlayMedia);i&&i.pause(),this.focusTrap.deactivate(),this.galleryItems.forEach((e=>{var i=t("img",e);i&&i.classList.add("ecl-gallery__image")})),this.selectedItem.focus(),document.body.classList.remove("ecl-u-disablescroll")}handleKeyPressOnItem(e){32===e.keyCode&&this.handleClickOnItem(e)}handleClickOnViewAll(e){if(e.preventDefault(),this.viewAll)if(this.viewAll.expanded)delete this.viewAll.expanded,this.checkScreen(),this.hideItems(),this.viewAll.textContent=this.viewAllLabel;else{this.viewAll.expanded=!0,this.viewAll.textContent=this.viewAllLabelExpanded;var t=this.galleryItems.filter((e=>e.parentNode.classList.contains("ecl-gallery__item--hidden")));t.length>0&&(t.forEach((e=>{e.parentNode.classList.remove("ecl-gallery__item--hidden")})),t[0].focus())}}handleClickOnItem(e){e.preventDefault(),document.body.classList.add("ecl-u-disablescroll"),this.isDialogSupported?this.overlay.showModal():this.overlay.setAttribute("open",""),this.updateOverlay(e.currentTarget),this.focusTrap.activate()}preventClickOnItem(e){e.preventDefault(),e.stopPropagation()}handleClickOnPreviousButton(){var e=+this.selectedItem.getAttribute("data-ecl-gallery-item-id")-1;e<0&&(e=this.galleryItems.length-1);var i=t("video",this.selectedItem);return i&&i.pause(),this.updateOverlay(this.galleryItems[e]),this.selectedItem=this.galleryItems[e],this}handleClickOnNextButton(){var e=+this.selectedItem.getAttribute("data-ecl-gallery-item-id")+1;e>=this.galleryItems.length&&(e=0);var i=t("video",this.selectedItem);return i&&i.pause(),this.updateOverlay(this.galleryItems[e]),this.selectedItem=this.galleryItems[e],this}}class re{static autoInit(e,t){var i=(void 0===t?{}:t).INDICATOR,s=new re(e,void 0===i?{}:i);return s.init(),e.ECLIndicator=s,s}constructor(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.value=0,this.increment=this.increment.bind(this),this.decrement=this.decrement.bind(this),this.getValue=this.getValue.bind(this),this.setValue=this.setValue.bind(this),this.clearValue=this.clearValue.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.getValue(),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element)}getValue(){""===this.element.innerHTML.trim()?this.value="":this.value=parseInt(this.element.innerHTML,10)}increment(e){return void 0===e&&(e=1),""!==this.value&&!Number.isNaN(this.value)&&(this.value+=e,this.element.innerHTML=this.value,!0)}decrement(e){return void 0===e&&(e=1),""!==this.value&&!Number.isNaN(this.value)&&(this.value-=e,this.element.innerHTML=this.value,!0)}setValue(e){return!Number.isNaN(e)&&(this.value=e,this.element.innerHTML=this.value,!0)}clearValue(){this.value="",this.element.innerHTML=this.value}}var oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function he(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ce,de={exports:{}};
13
+ function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=Array(t);i<t;i++)s[i]=e[i];return s}function q(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t);if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function X(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function Y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?X(Object(i),!0).forEach(function(t){q(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):X(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function Q(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?j(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Z=function(e,t){if(e.length>0){var i=e[e.length-1];i!==t&&i._setPausedState(!0)}var s=e.indexOf(t);-1===s||e.splice(s,1),e.push(t)},J=function(e,t){var i=e.indexOf(t);-1!==i&&e.splice(i,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)},$=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},ee=function(e){return $(e)&&!e.shiftKey},te=function(e){return $(e)&&e.shiftKey},ie=function(e){return setTimeout(e,0)},se=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return"function"==typeof e?e.apply(void 0,i):e},ne=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},ae=[],le=function(e,t){var i,s=(null==t?void 0:t.document)||document,n=(null==t?void 0:t.trapStack)||ae,a=Y({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:ee,isKeyBackward:te},t),l={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},r=function(e,t,i){return e&&void 0!==e[t]?e[t]:a[i||t]},o=function(e,t){var i="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return l.containerGroups.findIndex(function(t){var s=t.container,n=t.tabbableNodes;return s.contains(e)||(null==i?void 0:i.includes(s))||n.find(function(t){return t===e})})},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.hasFallback,n=void 0!==i&&i,l=t.params,r=void 0===l?[]:l,o=a[e];if("function"==typeof o&&(o=o.apply(void 0,Q(r))),!0===o&&(o=void 0),!o){if(void 0===o||!1===o)return o;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var h=o;if("string"==typeof o){try{h=s.querySelector(o)}catch(t){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(t.message,'"'))}if(!h&&!n)throw new Error("`".concat(e,"` as selector refers to no known node"))}return h},c=function(){var e=h("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!U(e,a.tabbableOptions))if(o(s.activeElement)>=0)e=s.activeElement;else{var t=l.tabbableGroups[0];e=t&&t.firstTabbableNode||h("fallbackFocus")}else null===e&&(e=h("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(l.containerGroups=l.containers.map(function(e){var t=function(e,t){var i;return i=(t=t||{}).getShadowRoot?P([e],t.includeContainer,{filter:H.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:K}):T(e,t.includeContainer,H.bind(null,t)),V(i)}(e,a.tabbableOptions),i=function(e,t){return(t=t||{}).getShadowRoot?P([e],t.includeContainer,{filter:z.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):T(e,t.includeContainer,z.bind(null,t))}(e,a.tabbableOptions),s=t.length>0?t[0]:void 0,n=t.length>0?t[t.length-1]:void 0,l=i.find(function(e){return G(e)}),r=i.slice().reverse().find(function(e){return G(e)}),o=!!t.find(function(e){return I(e)>0});return{container:e,tabbableNodes:t,focusableNodes:i,posTabIndexesFound:o,firstTabbableNode:s,lastTabbableNode:n,firstDomTabbableNode:l,lastDomTabbableNode:r,nextTabbableNode:function(e){var s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.indexOf(e);return n<0?s?i.slice(i.indexOf(e)+1).find(function(e){return G(e)}):i.slice(0,i.indexOf(e)).reverse().find(function(e){return G(e)}):t[n+(s?1:-1)]}}}),l.tabbableGroups=l.containerGroups.filter(function(e){return e.tabbableNodes.length>0}),l.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(l.containerGroups.find(function(e){return e.posTabIndexesFound})&&l.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},u=function(e){var t=e.activeElement;if(t)return t.shadowRoot&&null!==t.shadowRoot.activeElement?u(t.shadowRoot):t},m=function(e){!1!==e&&e!==u(document)&&(e&&e.focus?(e.focus({preventScroll:!!a.preventScroll}),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):m(c()))},p=function(e){var t=h("setReturnFocus",{params:[e]});return t||!1!==t&&e},v=function(e){var t=e.target,i=e.event,s=e.isBackward,n=void 0!==s&&s;t=t||ne(i),d();var r=null;if(l.tabbableGroups.length>0){var c=o(t,i),u=c>=0?l.containerGroups[c]:void 0;if(c<0)r=n?l.tabbableGroups[l.tabbableGroups.length-1].lastTabbableNode:l.tabbableGroups[0].firstTabbableNode;else if(n){var m=l.tabbableGroups.findIndex(function(e){var i=e.firstTabbableNode;return t===i});if(m<0&&(u.container===t||U(t,a.tabbableOptions)&&!G(t,a.tabbableOptions)&&!u.nextTabbableNode(t,!1))&&(m=c),m>=0){var p=0===m?l.tabbableGroups.length-1:m-1,v=l.tabbableGroups[p];r=I(t)>=0?v.lastTabbableNode:v.lastDomTabbableNode}else $(i)||(r=u.nextTabbableNode(t,!1))}else{var g=l.tabbableGroups.findIndex(function(e){var i=e.lastTabbableNode;return t===i});if(g<0&&(u.container===t||U(t,a.tabbableOptions)&&!G(t,a.tabbableOptions)&&!u.nextTabbableNode(t))&&(g=c),g>=0){var b=g===l.tabbableGroups.length-1?0:g+1,f=l.tabbableGroups[b];r=I(t)>=0?f.firstTabbableNode:f.firstDomTabbableNode}else $(i)||(r=u.nextTabbableNode(t))}}else r=h("fallbackFocus");return r},g=function(e){var t=ne(e);o(t,e)>=0||(se(a.clickOutsideDeactivates,e)?i.deactivate({returnFocus:a.returnFocusOnDeactivate}):se(a.allowOutsideClick,e)||e.preventDefault())},b=function(e){var t=ne(e),i=o(t,e)>=0;if(i||t instanceof Document)i&&(l.mostRecentlyFocusedNode=t);else{var s;e.stopImmediatePropagation();var n=!0;if(l.mostRecentlyFocusedNode)if(I(l.mostRecentlyFocusedNode)>0){var r=o(l.mostRecentlyFocusedNode),h=l.containerGroups[r].tabbableNodes;if(h.length>0){var d=h.findIndex(function(e){return e===l.mostRecentlyFocusedNode});d>=0&&(a.isKeyForward(l.recentNavEvent)?d+1<h.length&&(s=h[d+1],n=!1):d-1>=0&&(s=h[d-1],n=!1))}}else l.containerGroups.some(function(e){return e.tabbableNodes.some(function(e){return I(e)>0})})||(n=!1);else n=!1;n&&(s=v({target:l.mostRecentlyFocusedNode,isBackward:a.isKeyBackward(l.recentNavEvent)})),m(s||(l.mostRecentlyFocusedNode||c()))}l.recentNavEvent=void 0},f=function(e){(a.isKeyForward(e)||a.isKeyBackward(e))&&function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];l.recentNavEvent=e;var i=v({event:e,isBackward:t});i&&($(e)&&e.preventDefault(),m(i))}(e,a.isKeyBackward(e))},y=function(e){var t;"Escape"!==(null==(t=e)?void 0:t.key)&&"Esc"!==(null==t?void 0:t.key)&&27!==(null==t?void 0:t.keyCode)||!1===se(a.escapeDeactivates,e)||(e.preventDefault(),i.deactivate())},L=function(e){var t=ne(e);o(t,e)>=0||se(a.clickOutsideDeactivates,e)||se(a.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},C=function(){if(l.active)return Z(n,i),l.delayInitialFocusTimer=a.delayInitialFocus?ie(function(){m(c())}):m(c()),s.addEventListener("focusin",b,!0),s.addEventListener("mousedown",g,{capture:!0,passive:!1}),s.addEventListener("touchstart",g,{capture:!0,passive:!1}),s.addEventListener("click",L,{capture:!0,passive:!1}),s.addEventListener("keydown",f,{capture:!0,passive:!1}),s.addEventListener("keydown",y),i},E=function(){if(l.active)return s.removeEventListener("focusin",b,!0),s.removeEventListener("mousedown",g,!0),s.removeEventListener("touchstart",g,!0),s.removeEventListener("click",L,!0),s.removeEventListener("keydown",f,!0),s.removeEventListener("keydown",y),i},k="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver(function(e){e.some(function(e){return Array.from(e.removedNodes).some(function(e){return e===l.mostRecentlyFocusedNode})})&&m(c())}):void 0,w=function(){k&&(k.disconnect(),l.active&&!l.paused&&l.containers.map(function(e){k.observe(e,{subtree:!0,childList:!0})}))};return i={get active(){return l.active},get paused(){return l.paused},activate:function(e){if(l.active)return this;var t=r(e,"onActivate"),i=r(e,"onPostActivate"),n=r(e,"checkCanFocusTrap");n||d(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=u(s),null==t||t();var a=function(){n&&d(),C(),w(),null==i||i()};return n?(n(l.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(e){if(!l.active)return this;var t=Y({onDeactivate:a.onDeactivate,onPostDeactivate:a.onPostDeactivate,checkCanReturnFocus:a.checkCanReturnFocus},e);clearTimeout(l.delayInitialFocusTimer),l.delayInitialFocusTimer=void 0,E(),l.active=!1,l.paused=!1,w(),J(n,i);var s=r(t,"onDeactivate"),o=r(t,"onPostDeactivate"),h=r(t,"checkCanReturnFocus"),c=r(t,"returnFocus","returnFocusOnDeactivate");null==s||s();var d=function(){ie(function(){c&&m(p(l.nodeFocusedBeforeActivation)),null==o||o()})};return c&&h?(h(p(l.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(e){return l.active?(l.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return l.active?(l.manuallyPaused=!1,n[n.length-1]!==this?this:this._setPausedState(!1,e)):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return l.containers=t.map(function(e){return"string"==typeof e?s.querySelector(e):e}),l.active&&d(),w(),this}},Object.defineProperties(i,{_isManuallyPaused:{value:function(){return l.manuallyPaused}},_setPausedState:{value:function(e,t){if(l.paused===e)return this;if(l.paused=e,e){var i=r(t,"onPause"),s=r(t,"onPostPause");null==i||i(),E(),w(),null==s||s()}else{var n=r(t,"onUnpause"),a=r(t,"onPostUnpause");null==n||n(),d(),C(),w(),null==a||a()}return this}}}),i.updateContainerElements(e),i};class re{static autoInit(e,t){var i=(void 0===t?{}:t).GALLERY,s=new re(e,void 0===i?{}:i);return s.init(),e.ECLGallery=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.expandableSelector,n=void 0===s?"data-ecl-gallery-not-expandable":s,a=i.galleryItemSelector,l=void 0===a?"[data-ecl-gallery-item]":a,r=i.descriptionSelector,o=void 0===r?"[data-ecl-gallery-description]":r,h=i.titleSelector,c=void 0===h?"[data-ecl-gallery-title]":h,d=i.noOverlaySelector,u=void 0===d?"data-ecl-gallery-no-overlay":d,m=i.itemsLimitSelector,p=void 0===m?"data-ecl-gallery-visible-items":m,v=i.closeButtonSelector,g=void 0===v?"[data-ecl-gallery-close]":v,b=i.viewAllSelector,f=void 0===b?"[data-ecl-gallery-all]":b,y=i.viewAllLabelSelector,L=void 0===y?"data-ecl-gallery-collapsed-label":y,C=i.viewAllExpandedLabelSelector,E=void 0===C?"data-ecl-gallery-expanded-label":C,k=i.countSelector,w=void 0===k?"[data-ecl-gallery-count]":k,S=i.overlaySelector,A=void 0===S?"[data-ecl-gallery-overlay]":S,_=i.overlayHeaderSelector,O=void 0===_?"[data-ecl-gallery-overlay-header]":_,x=i.overlayFooterSelector,T=void 0===x?"[data-ecl-gallery-overlay-footer]":x,P=i.overlayMediaSelector,M=void 0===P?"[data-ecl-gallery-overlay-media]":P,I=i.overlayCounterCurrentSelector,N=void 0===I?"[data-ecl-gallery-overlay-counter-current]":I,B=i.overlayCounterMaxSelector,R=void 0===B?"[data-ecl-gallery-overlay-counter-max]":B,D=i.overlayDownloadSelector,F=void 0===D?"[data-ecl-gallery-overlay-download]":D,z=i.overlayShareSelector,H=void 0===z?"[data-ecl-gallery-overlay-share]":z,K=i.overlayDescriptionSelector,V=void 0===K?"[data-ecl-gallery-overlay-description]":K,G=i.overlayPreviousSelector,W=void 0===G?"[data-ecl-gallery-overlay-previous]":G,U=i.overlayNextSelector,j=void 0===U?"[data-ecl-gallery-overlay-next]":U,q=i.videoTitleSelector,X=void 0===q?"data-ecl-gallery-item-video-title":q,Y=i.attachClickListener,Q=void 0===Y||Y,Z=i.attachKeyListener,J=void 0===Z||Z,$=i.attachResizeListener,ee=void 0===$||$;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.galleryItemSelector=l,this.descriptionSelector=o,this.titleSelector=c,this.closeButtonSelector=g,this.viewAllSelector=f,this.countSelector=w,this.itemsLimitSelector=p,this.overlaySelector=A,this.noOverlaySelector=u,this.overlayHeaderSelector=O,this.overlayFooterSelector=T,this.overlayMediaSelector=M,this.overlayCounterCurrentSelector=N,this.overlayCounterMaxSelector=R,this.overlayDownloadSelector=F,this.overlayShareSelector=H,this.overlayDescriptionSelector=V,this.overlayPreviousSelector=W,this.overlayNextSelector=j,this.attachClickListener=Q,this.attachKeyListener=J,this.attachResizeListener=ee,this.viewAllLabelSelector=L,this.viewAllExpandedLabelSelector=E,this.expandableSelector=n,this.videoTitleSelector=X,this.galleryItems=null,this.closeButton=null,this.viewAll=null,this.count=null,this.overlay=null,this.overlayHeader=null,this.overlayFooter=null,this.overlayMedia=null,this.overlayCounterCurrent=null,this.overlayCounterMax=null,this.overlayDownload=null,this.overlayShare=null,this.overlayDescription=null,this.overlayPrevious=null,this.overlayNext=null,this.selectedItem=null,this.focusTrap=null,this.isDesktop=!1,this.resizeTimer=null,this.visibleItems=0,this.breakpointMd=768,this.breakpointLg=996,this.imageHeight=185,this.imageHeightBig=260,this.iframeResize=this.iframeResize.bind(this),this.handleClickOnCloseButton=this.handleClickOnCloseButton.bind(this),this.handleClickOnViewAll=this.handleClickOnViewAll.bind(this),this.handleClickOnItem=this.handleClickOnItem.bind(this),this.preventClickOnItem=this.preventClickOnItem.bind(this),this.handleKeyPressOnItem=this.handleKeyPressOnItem.bind(this),this.handleClickOnPreviousButton=this.handleClickOnPreviousButton.bind(this),this.handleClickOnNextButton=this.handleClickOnNextButton.bind(this),this.handleKeyboard=this.handleKeyboard.bind(this),this.handleResize=this.handleResize.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.expandable=!this.element.hasAttribute(this.expandableSelector),this.visibleItems=this.element.getAttribute(this.itemsLimitSelector),this.galleryItems=e(this.galleryItemSelector,this.element),this.closeButton=t(this.closeButtonSelector,this.element),this.noOverlay=this.element.hasAttribute(this.noOverlaySelector),this.expandable&&(this.viewAll=t(this.viewAllSelector,this.element),this.viewAllLabel=this.viewAll.getAttribute(this.viewAllLabelSelector)||this.viewAll.innerText,this.viewAllLabelExpanded=this.viewAll.getAttribute(this.viewAllExpandedLabelSelector)||this.viewAllLabel),this.count=t(this.countSelector,this.element),this.attachClickListener&&this.viewAll&&this.viewAll.addEventListener("click",this.handleClickOnViewAll),this.noOverlay?this.galleryItems.forEach(e=>{e.classList.add("ecl-gallery__item__link--frozen"),e.addEventListener("click",this.preventClickOnItem)}):(this.overlay=t(this.overlaySelector,this.element),this.overlayHeader=t(this.overlayHeaderSelector,this.overlay),this.overlayFooter=t(this.overlayFooterSelector,this.overlay),this.overlayMedia=t(this.overlayMediaSelector,this.overlay),this.overlayCounterCurrent=t(this.overlayCounterCurrentSelector,this.overlay),this.overlayCounterMax=t(this.overlayCounterMaxSelector,this.overlay),this.overlayDownload=t(this.overlayDownloadSelector,this.overlay),this.overlayShare=t(this.overlayShareSelector,this.overlay),this.overlayDescription=t(this.overlayDescriptionSelector,this.overlay),this.overlayPrevious=t(this.overlayPreviousSelector,this.overlay),this.overlayNext=t(this.overlayNextSelector,this.overlay),this.focusTrap=le(this.overlay,{escapeDeactivates:!1,returnFocusOnDeactivate:!1}),this.isDialogSupported=!0,window.HTMLDialogElement||(this.isDialogSupported=!1),this.attachClickListener&&this.closeButton&&this.closeButton.addEventListener("click",this.handleClickOnCloseButton),this.attachClickListener&&this.galleryItems&&this.galleryItems.forEach(e=>{this.attachClickListener&&e.addEventListener("click",this.handleClickOnItem),this.attachKeyListener&&e.addEventListener("keyup",this.handleKeyPressOnItem)}),this.attachClickListener&&this.overlayPrevious&&this.overlayPrevious.addEventListener("click",this.handleClickOnPreviousButton),this.attachClickListener&&this.overlayNext&&this.overlayNext.addEventListener("click",this.handleClickOnNextButton),!this.isDialogSupported&&this.attachKeyListener&&this.overlay&&this.overlay.addEventListener("keyup",this.handleKeyboard),this.isDialogSupported&&this.overlay&&this.overlay.addEventListener("close",this.handleClickOnCloseButton)),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.expandable&&(this.checkScreen(),this.hideItems()),this.galleryItems.forEach((e,t)=>{e.setAttribute("data-ecl-gallery-item-id",t)}),this.count&&(this.count.innerHTML=this.galleryItems.length),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.attachClickListener&&this.closeButton&&this.closeButton.removeEventListener("click",this.handleClickOnCloseButton),this.attachClickListener&&this.viewAll&&this.viewAll.removeEventListener("click",this.handleClickOnViewAll),this.attachClickListener&&this.galleryItems&&this.galleryItems.forEach(e=>{e.removeEventListener("click",this.handleClickOnItem)}),this.attachClickListener&&this.overlayPrevious&&this.overlayPrevious.removeEventListener("click",this.handleClickOnPreviousButton),this.attachClickListener&&this.overlayNext&&this.overlayNext.removeEventListener("click",this.handleClickOnNextButton),!this.isDialogSupported&&this.attachKeyListener&&this.overlay&&this.overlay.removeEventListener("keyup",this.handleKeyboard),this.isDialogSupported&&this.overlay&&this.overlay.removeEventListener("close",this.handleClickOnCloseButton),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}checkScreen(){window.innerWidth>this.breakpointMd?this.isDesktop=!0:this.isDesktop=!1,window.innerWidth>this.breakpointLg&&(this.isLarge=!0)}iframeResize(e){if(!e&&this.overlay&&(e=t("iframe",this.overlay)),e){var i=window.innerWidth;setTimeout(()=>{var t=this.overlay.clientHeight-this.overlayHeader.clientHeight-this.overlayFooter.clientHeight;i>t?(e.setAttribute("height",t+"px"),16*t/9>i?e.setAttribute("width",i-.05*i+"px"):e.setAttribute("width",16*t/9+"px")):(e.setAttribute("width",i+"px"),4*i/3>t?e.setAttribute("height",t-.05*t+"px"):e.setAttribute("height",4*i/3+"px"))},0)}}hideItems(e){if(void 0===e&&(e=0),this.viewAll&&!this.viewAll.expanded){if(this.isDesktop){var t=[];return this.galleryItems.forEach((i,s)=>{i.parentNode.classList.remove("ecl-gallery__item--hidden"),s>=Number(this.visibleItems)+Number(e)&&(t=[...t,s])}),void t.forEach(e=>{this.galleryItems[e].parentNode.classList.add("ecl-gallery__item--hidden")})}this.galleryItems.forEach((t,i)=>{i>2+Number(e)?t.parentNode.classList.add("ecl-gallery__item--hidden"):t.parentNode.classList.remove("ecl-gallery__item--hidden")})}}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.checkScreen(),this.hideItems(),this.iframeResize()},200)}updateOverlay(i){this.selectedItem=i;var s=i.getAttribute("data-ecl-gallery-item-embed-src"),n=i.getAttribute("data-ecl-gallery-item-embed-audio"),a=t("video",i),l=null;if(null!=s){(l=document.createElement("div")).classList.add("ecl-gallery__slider-embed");var r=document.createElement("div");r.classList.add("ecl-gallery__slider-embed-audio"),n&&(r.innerHTML=n);var o=new URL(s),h=document.createElement("iframe");h.setAttribute("src",o),h.setAttribute("frameBorder","0");var c=i.getAttribute(this.videoTitleSelector);c&&h.setAttribute("title",c),this.overlayMedia&&(n&&l.appendChild(r),l.appendChild(h),this.overlayMedia.innerHTML="",this.overlayMedia.appendChild(l)),this.iframeResize(h)}else if(null!=a){(l=document.createElement("video")).setAttribute("poster",a.poster),l.setAttribute("controls","controls"),l.classList.add("ecl-gallery__slider-video");var d=i.getAttribute(this.videoTitleSelector);d&&l.setAttribute("aria-label",d),this.overlayMedia&&(this.overlayMedia.innerHTML="",this.overlayMedia.appendChild(l)),e("source",a).forEach(e=>{var t=document.createElement("source");t.setAttribute("src",e.getAttribute("src")),t.setAttribute("type",e.getAttribute("type")),l.appendChild(t)}),e("track",a).forEach(e=>{var t=document.createElement("track");t.setAttribute("src",e.getAttribute("src")),t.setAttribute("kind",e.getAttribute("kind")),t.setAttribute("srclang",e.getAttribute("srcLang")),t.setAttribute("label",e.getAttribute("label")),l.appendChild(t)}),l.load()}else{var u=t(".ecl-gallery__picture",i),m=t("img",u);u?(m.classList.remove("ecl-gallery__image"),l=u.cloneNode(!0)):((l=document.createElement("img")).setAttribute("src",m.getAttribute("src")),l.setAttribute("alt",m.getAttribute("alt"))),l.classList.add("ecl-gallery__slider-image"),this.overlayMedia&&(this.overlayMedia.innerHTML="",this.overlayMedia.appendChild(l))}var p=i.getAttribute("id");this.overlayCounterCurrent.innerHTML=+i.getAttribute("data-ecl-gallery-item-id")+1,this.overlayCounterMax.innerHTML=this.galleryItems.length;var v=document.createElement("div");v.classList.add("ecl-gallery__detail-actions-mobile"),null!==this.overlayDownload&&null===s?(this.overlayDownload.href=this.selectedItem.href,p&&this.overlayDownload.setAttribute("aria-describedby",p+"-title"),this.overlayDownload.hidden=!1,v.appendChild(this.overlayDownload.cloneNode(!0))):null!==this.overlayDownload&&(this.overlayDownload.hidden=!0);var g=this.selectedItem.getAttribute("data-ecl-gallery-item-share");null!=g?(this.overlayShare.href=g,p&&this.overlayShare.setAttribute("aria-describedby",p+"-title"),this.overlayShare.hidden=!1,v.appendChild(this.overlayShare.cloneNode(!0))):this.overlayShare.hidden=!0;var b=t(this.descriptionSelector,i);b&&(this.overlayDescription.innerHTML=b.innerHTML),v.childNodes.length>0&&this.overlayDescription.prepend(v)}handleKeyboard(e){"Escape"!==e.key&&"Esc"!==e.key||this.handleClickOnCloseButton()}handleClickOnCloseButton(){this.isDialogSupported?this.overlay.close():this.overlay.removeAttribute("open");var e=t("iframe",this.overlayMedia);e&&e.remove();var i=t("video",this.overlayMedia);i&&i.pause(),this.focusTrap.deactivate(),this.galleryItems.forEach(e=>{var i=t("img",e);i&&i.classList.add("ecl-gallery__image")}),this.selectedItem.focus(),document.body.classList.remove("ecl-u-disablescroll")}handleKeyPressOnItem(e){32===e.keyCode&&this.handleClickOnItem(e)}handleClickOnViewAll(e){if(e.preventDefault(),this.viewAll)if(this.viewAll.expanded)delete this.viewAll.expanded,this.checkScreen(),this.hideItems(),this.viewAll.textContent=this.viewAllLabel;else{this.viewAll.expanded=!0,this.viewAll.textContent=this.viewAllLabelExpanded;var t=this.galleryItems.filter(e=>e.parentNode.classList.contains("ecl-gallery__item--hidden"));t.length>0&&(t.forEach(e=>{e.parentNode.classList.remove("ecl-gallery__item--hidden")}),t[0].focus())}}handleClickOnItem(e){e.preventDefault(),document.body.classList.add("ecl-u-disablescroll"),this.isDialogSupported?this.overlay.showModal():this.overlay.setAttribute("open",""),this.updateOverlay(e.currentTarget),this.focusTrap.activate()}preventClickOnItem(e){e.preventDefault(),e.stopPropagation()}handleClickOnPreviousButton(){var e=+this.selectedItem.getAttribute("data-ecl-gallery-item-id")-1;e<0&&(e=this.galleryItems.length-1);var i=t("video",this.selectedItem);return i&&i.pause(),this.updateOverlay(this.galleryItems[e]),this.selectedItem=this.galleryItems[e],this}handleClickOnNextButton(){var e=+this.selectedItem.getAttribute("data-ecl-gallery-item-id")+1;e>=this.galleryItems.length&&(e=0);var i=t("video",this.selectedItem);return i&&i.pause(),this.updateOverlay(this.galleryItems[e]),this.selectedItem=this.galleryItems[e],this}}class oe{static autoInit(e,t){var i=(void 0===t?{}:t).INDICATOR,s=new oe(e,void 0===i?{}:i);return s.init(),e.ECLIndicator=s,s}constructor(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.value=0,this.increment=this.increment.bind(this),this.decrement=this.decrement.bind(this),this.getValue=this.getValue.bind(this),this.setValue=this.setValue.bind(this),this.clearValue=this.clearValue.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.getValue(),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element)}getValue(){""===this.element.innerHTML.trim()?this.value="":this.value=parseInt(this.element.innerHTML,10)}increment(e){return void 0===e&&(e=1),""!==this.value&&!Number.isNaN(this.value)&&(this.value+=e,this.element.innerHTML=this.value,!0)}decrement(e){return void 0===e&&(e=1),""!==this.value&&!Number.isNaN(this.value)&&(this.value-=e,this.element.innerHTML=this.value,!0)}setValue(e){return!Number.isNaN(e)&&(this.value=e,this.element.innerHTML=this.value,!0)}clearValue(){this.value="",this.element.innerHTML=this.value}}var he="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ce(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var de,ue={exports:{}};
12
14
  /*!
13
15
  * Stickyfill – `position: sticky` polyfill
14
16
  * v. 2.1.0 | https://github.com/wilddeer/stickyfill
15
17
  * MIT License
16
- */var ue,me,pe=(ce||(ce=1,ue=de,function(e,t){var i,s=function(){function e(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,i,s){return i&&e(t.prototype,i),s&&e(t,s),t}}(),n=!1,l=void 0!==e;l&&e.getComputedStyle?(i=t.createElement("div"),["","-webkit-","-moz-","-ms-"].some((function(e){try{i.style.position=e+"sticky"}catch(e){}return""!=i.style.position}))&&(n=!0)):n=!0;var a=!1,r="undefined"!=typeof ShadowRoot,o={top:null,left:null},h=[];function c(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}function d(e){return parseFloat(e)||0}function u(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t}var m=function(){function i(e){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),!(e instanceof HTMLElement))throw new Error("First argument must be HTMLElement");if(h.some((function(t){return t._node===e})))throw new Error("Stickyfill is already applied to this node");this._node=e,this._stickyMode=null,this._active=!1,h.push(this),this.refresh()}return s(i,[{key:"refresh",value:function(){if(!n&&!this._removed){this._active&&this._deactivate();var i=this._node,s=getComputedStyle(i),l={position:s.position,top:s.top,display:s.display,marginTop:s.marginTop,marginBottom:s.marginBottom,marginLeft:s.marginLeft,marginRight:s.marginRight,cssFloat:s.cssFloat};if(!isNaN(parseFloat(l.top))&&"table-cell"!=l.display&&"none"!=l.display){this._active=!0;var a=i.style.position;"sticky"!=s.position&&"-webkit-sticky"!=s.position||(i.style.position="static");var o=i.parentNode,h=r&&o instanceof ShadowRoot?o.host:o,m=i.getBoundingClientRect(),p=h.getBoundingClientRect(),v=getComputedStyle(h);this._parent={node:h,styles:{position:h.style.position},offsetHeight:h.offsetHeight},this._offsetToWindow={left:m.left,right:t.documentElement.clientWidth-m.right},this._offsetToParent={top:m.top-p.top-d(v.borderTopWidth),left:m.left-p.left-d(v.borderLeftWidth),right:-m.right+p.right-d(v.borderRightWidth)},this._styles={position:a,top:i.style.top,bottom:i.style.bottom,left:i.style.left,right:i.style.right,width:i.style.width,marginTop:i.style.marginTop,marginLeft:i.style.marginLeft,marginRight:i.style.marginRight};var g=d(l.top);this._limits={start:m.top+e.pageYOffset-g,end:p.top+e.pageYOffset+h.offsetHeight-d(v.borderBottomWidth)-i.offsetHeight-g-d(l.marginBottom)};var b=v.position;"absolute"!=b&&"relative"!=b&&(h.style.position="relative"),this._recalcPosition();var f=this._clone={};f.node=t.createElement("div"),c(f.node.style,{width:m.right-m.left+"px",height:m.bottom-m.top+"px",marginTop:l.marginTop,marginBottom:l.marginBottom,marginLeft:l.marginLeft,marginRight:l.marginRight,cssFloat:l.cssFloat,padding:0,border:0,borderSpacing:0,fontSize:"1em",position:"static"}),o.insertBefore(f.node,i),f.docOffsetTop=u(f.node)}}}},{key:"_recalcPosition",value:function(){if(this._active&&!this._removed){var e=o.top<=this._limits.start?"start":o.top>=this._limits.end?"end":"middle";if(this._stickyMode!=e){switch(e){case"start":c(this._node.style,{position:"absolute",left:this._offsetToParent.left+"px",right:this._offsetToParent.right+"px",top:this._offsetToParent.top+"px",bottom:"auto",width:"auto",marginLeft:0,marginRight:0,marginTop:0});break;case"middle":c(this._node.style,{position:"fixed",left:this._offsetToWindow.left+"px",right:this._offsetToWindow.right+"px",top:this._styles.top,bottom:"auto",width:"auto",marginLeft:0,marginRight:0,marginTop:0});break;case"end":c(this._node.style,{position:"absolute",left:this._offsetToParent.left+"px",right:this._offsetToParent.right+"px",top:"auto",bottom:0,width:"auto",marginLeft:0,marginRight:0})}this._stickyMode=e}}}},{key:"_fastCheck",value:function(){this._active&&!this._removed&&(Math.abs(u(this._clone.node)-this._clone.docOffsetTop)>1||Math.abs(this._parent.node.offsetHeight-this._parent.offsetHeight)>1)&&this.refresh()}},{key:"_deactivate",value:function(){var e=this;this._active&&!this._removed&&(this._clone.node.parentNode.removeChild(this._clone.node),delete this._clone,c(this._node.style,this._styles),delete this._styles,h.some((function(t){return t!==e&&t._parent&&t._parent.node===e._parent.node}))||c(this._parent.node.style,this._parent.styles),delete this._parent,this._stickyMode=null,this._active=!1,delete this._offsetToWindow,delete this._offsetToParent,delete this._limits)}},{key:"remove",value:function(){var e=this;this._deactivate(),h.some((function(t,i){if(t._node===e._node)return h.splice(i,1),!0})),this._removed=!0}}]),i}(),p={stickies:h,Sticky:m,forceSticky:function(){n=!1,v(),this.refreshAll()},addOne:function(e){if(!(e instanceof HTMLElement)){if(!e.length||!e[0])return;e=e[0]}for(var t=0;t<h.length;t++)if(h[t]._node===e)return h[t];return new m(e)},add:function(e){if(e instanceof HTMLElement&&(e=[e]),e.length){for(var t=[],i=function(i){var s=e[i];return s instanceof HTMLElement?h.some((function(e){if(e._node===s)return t.push(e),!0}))?"continue":void t.push(new m(s)):(t.push(void 0),"continue")},s=0;s<e.length;s++)i(s);return t}},refreshAll:function(){h.forEach((function(e){return e.refresh()}))},removeOne:function(e){if(!(e instanceof HTMLElement)){if(!e.length||!e[0])return;e=e[0]}h.some((function(t){if(t._node===e)return t.remove(),!0}))},remove:function(e){if(e instanceof HTMLElement&&(e=[e]),e.length)for(var t=function(t){var i=e[t];h.some((function(e){if(e._node===i)return e.remove(),!0}))},i=0;i<e.length;i++)t(i)},removeAll:function(){for(;h.length;)h[0].remove()}};function v(){if(!a){a=!0,l(),e.addEventListener("scroll",l),e.addEventListener("resize",p.refreshAll),e.addEventListener("orientationchange",p.refreshAll);var i=void 0,s=void 0,n=void 0;"hidden"in t?(s="hidden",n="visibilitychange"):"webkitHidden"in t&&(s="webkitHidden",n="webkitvisibilitychange"),n?(t[s]||r(),t.addEventListener(n,(function(){t[s]?clearInterval(i):r()}))):r()}function l(){e.pageXOffset!=o.left?(o.top=e.pageYOffset,o.left=e.pageXOffset,p.refreshAll()):e.pageYOffset!=o.top&&(o.top=e.pageYOffset,o.left=e.pageXOffset,h.forEach((function(e){return e._recalcPosition()})))}function r(){i=setInterval((function(){h.forEach((function(e){return e._fastCheck()}))}),500)}}n||v(),ue.exports?ue.exports=p:l&&(e.Stickyfill=p)}(window,document)),de.exports),ve=he(pe),ge={exports:{}},be=ge.exports;var fe=(me||(me=1,function(e){var t;Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(this))return null;do{if(t.matches(e))return t;t=t.parentElement}while(null!==t);return null}),function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}e.prototype=window.Event.prototype,window.CustomEvent=e}(),t=void 0!==oe?oe:"undefined"!=typeof window?window:be,e.exports=function(e){var t={navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:0,reflow:!1,events:!0},i=function(){var e={};return Array.prototype.forEach.call(arguments,(function(t){for(var i in t){if(!t.hasOwnProperty(i))return;e[i]=t[i]}})),e},s=function(e,t,i){if(i.settings.events){var s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(s)}},n=function(e){var t=0;if(e.offsetParent)for(;e;)t+=e.offsetTop,e=e.offsetParent;return t>=0?t:0},l=function(e){e&&e.sort((function(e,t){return n(e.content)<n(t.content)?-1:1}))},a=function(e){return"function"==typeof e.offset?parseFloat(e.offset()):parseFloat(e.offset)},r=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},o=function(t,i,s){var n=t.getBoundingClientRect(),l=a(i);return s?parseInt(n.bottom,10)<(e.innerHeight||document.documentElement.clientHeight):parseInt(n.top,10)<=l},h=function(){return e.innerHeight+e.pageYOffset>=r()},c=function(e,t){return!(!h()||!o(e.content,t,!0))},d=function(e,t){var i=e[e.length-1];if(c(i,t))return i;for(var s=e.length-1;s>=0;s--)if(o(e[s].content,t))return e[s]},u=function(e,t){if(t.nested&&e.parentNode){var i=e.parentNode.closest("li");i&&(i.classList.remove(t.nestedClass),u(i,t))}},m=function(e,t){if(e){var i=e.nav.closest("li");i&&(i.classList.remove(t.navClass),e.content.classList.remove(t.contentClass),u(i,t),s("gumshoeDeactivate",i,{link:e.nav,content:e.content,settings:t}))}},p=function(e,t){if(t.nested){var i=e.parentNode.closest("li");i&&(i.classList.add(t.nestedClass),p(i,t))}},v=function(e,t){if(e){var i=e.nav.closest("li");i&&(i.classList.add(t.navClass),e.content.classList.add(t.contentClass),p(i,t),s("gumshoeActivate",i,{link:e.nav,content:e.content,settings:t}))}};return function(s,n){var a,r,o,h,c,u={setup:function(){a=document.querySelectorAll(s),r=[],Array.prototype.forEach.call(a,(function(e){var t=document.getElementById(decodeURIComponent(e.hash.substr(1)));t&&r.push({nav:e,content:t})})),l(r)},detect:function(){var e=d(r,c);e?o&&e.content===o.content||(m(o,c),v(e,c),o=e):o&&(m(o,c),o=null)}},p=function(t){h&&e.cancelAnimationFrame(h),h=e.requestAnimationFrame(u.detect)},g=function(t){h&&e.cancelAnimationFrame(h),h=e.requestAnimationFrame((function(){l(r),u.detect()}))};return u.destroy=function(){o&&m(o,c),e.removeEventListener("scroll",p,!1),c.reflow&&e.removeEventListener("resize",g,!1),r=null,a=null,o=null,h=null,c=null},c=i(t,n||{}),u.setup(),u.detect(),e.addEventListener("scroll",p,!1),c.reflow&&e.addEventListener("resize",g,!1),u}}(t)}(ge)),ge.exports),ye=he(fe);class Le{static autoInit(e,t){var i=(void 0===t?{}:t).INPAGE_NAVIGATION,s=new Le(e,void 0===i?{}:i);return s.init(),e.ECLInpageNavigation=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.stickySelector,l=void 0===n?"[data-ecl-inpage-navigation]":n,a=s.containerSelector,r=void 0===a?"[data-ecl-inpage-navigation-container]":a,o=s.inPageList,h=void 0===o?"[data-ecl-inpage-navigation-list]":o,c=s.spySelector,d=void 0===c?"[data-ecl-inpage-navigation-link]":c,u=s.toggleSelector,m=void 0===u?"[data-ecl-inpage-navigation-trigger]":u,p=s.linksSelector,v=void 0===p?"[data-ecl-inpage-navigation-link]":p,g=s.spyActiveContainer,b=void 0===g?"ecl-inpage-navigation--visible":g,f=s.spyOffset,y=void 0===f?20:f,L=s.spyClass,E=void 0===L?"ecl-inpage-navigation__item--active":L,C=s.spyTrigger,w=void 0===C?"[data-ecl-inpage-navigation-trigger-current]":C,k=s.attachClickListener,S=void 0===k||k,x=s.attachResizeListener,A=void 0===x||x,_=s.attachScrollListener,O=void 0===_||_,T=s.attachKeyListener,P=void 0===T||T,I=s.contentClass,N=void 0===I?"inpage-navigation__heading--active":I;if(this.supportedEvents=["onToggle","onClick"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.attachClickListener=S,this.attachKeyListener=P,this.attachResizeListener=A,this.attachScrollListener=O,this.stickySelector=l,this.containerSelector=r,this.toggleSelector=m,this.linksSelector=v,this.inPageList=h,this.spyActiveContainer=b,this.spySelector=d,this.spyOffset=y,this.spyClass=E,this.spyTrigger=w,this.contentClass=N,this.gumshoe=null,this.observer=null,this.stickyObserver=null,this.isExpanded=!1,this.toggleElement=null,this.navLinks=null,this.resizeTimer=null,this.handleClickOnToggler=this.handleClickOnToggler.bind(this),this.handleClickOnLink=this.handleClickOnLink.bind(this),this.handleKeyboard=this.handleKeyboard.bind(this),this.initScrollSpy=this.initScrollSpy.bind(this),this.initObserver=this.initObserver.bind(this),this.activateScrollSpy=this.activateScrollSpy.bind(this),this.deactivateScrollSpy=this.deactivateScrollSpy.bind(this),this.destroySticky=this.destroySticky.bind(this),this.destroyScrollSpy=this.destroyScrollSpy.bind(this),this.destroyObserver=this.destroyObserver.bind(this),this.openList=this.openList.bind(this),this.closeList=this.closeList.bind(this),this.setListHeight=this.setListHeight.bind(this),this.handleResize=this.handleResize.bind(this)}initSticky(){this.stickyInstance=new ve.Sticky(this.element)}destroySticky(){this.stickyInstance&&this.stickyInstance.remove()}initScrollSpy(){if(this.gumshoe=new ye(this.spySelector,{navClass:this.spyClass,contentClass:this.contentClass,offset:this.spyOffset,reflow:!0}),document.addEventListener("gumshoeActivate",this.activateScrollSpy,!1),document.addEventListener("gumshoeDeactivate",this.deactivateScrollSpy,!1),"IntersectionObserver"in window){var e=t(this.containerSelector);if(e){var i=0,s=0,n=!1;this.stickyObserver=new IntersectionObserver((e=>{if(e&&e[0]){var t=e[0],l=t.boundingClientRect.y,a=t.intersectionRatio,r=t.isIntersecting;if(!n)return n=!0,i=l,void(s=a);l<i?a>s&&r||this.element.classList.remove(this.spyActiveContainer):l>i&&r&&a>s&&this.element.classList.add(this.spyActiveContainer),i=l,s=a}}),{root:null}),this.stickyObserver.observe(e)}}}activateScrollSpy(e){var i=t(this.spyTrigger);this.element.classList.add(this.spyActiveContainer),i.textContent=e.detail.content.textContent}deactivateScrollSpy(){var e=t(this.spyTrigger);this.element.classList.remove(this.spyActiveContainer),e.innerHTML=""}destroyScrollSpy(){this.stickyObserver&&this.stickyObserver.disconnect(),document.removeEventListener("gumshoeActivate",this.activateScrollSpy,!1),document.removeEventListener("gumshoeDeactivate",this.deactivateScrollSpy,!1),this.gumshoe.destroy()}initObserver(){if("MutationObserver"in window){var i=this;this.observer=new MutationObserver((s=>{var n=t(".ecl-col-l-9"),l=t("[data-ecl-inpage-navigation-list]");s.forEach((t=>{t&&t.target&&t.target.classList&&!t.target.classList.contains("ecl-inpage-navigation__trigger-current")&&(t.addedNodes.length>0&&[].slice.call(t.addedNodes).forEach((t=>{if("H2"===t.tagName&&t.id){var i=e("h2[id]",n).findIndex((e=>e.id===t.id)),s=l.childNodes[i-1].cloneNode(!0);s.childNodes[0].textContent=t.textContent,s.childNodes[0].href="#"+t.id,l.childNodes[i-1].after(s)}})),t.removedNodes.length>0&&[].slice.call(t.removedNodes).forEach((e=>{"H2"===e.tagName&&e.id&&l.childNodes.forEach((t=>{-1!==t.childNodes[0].href.indexOf(e.id)&&t.remove()}))})),i.update())}))})),this.observer.observe(document,{subtree:!0,childList:!0})}}destroyObserver(){this.observer&&this.observer.disconnect()}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.toggleElement=t(this.toggleSelector,this.element),this.navLinks=e(this.linksSelector,this.element),this.currentList=t(this.inPageList,this.element),this.direction=getComputedStyle(this.element).direction,"rtl"===this.direction&&this.element.classList.add("ecl-inpage-navigation--rtl"),this.setListHeight(),this.initSticky(this.element),this.initScrollSpy(),this.initObserver(),this.focusTrap=le(this.element,{onActivate:()=>this.openList(),onDeactivate:()=>this.closeList()}),this.attachClickListener&&this.toggleElement&&this.toggleElement.addEventListener("click",this.handleClickOnToggler),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.attachScrollListener&&window.addEventListener("scroll",this.handleResize),this.attachClickListener&&this.navLinks&&(this.navLinks.forEach((e=>e.addEventListener("click",this.handleClickOnLink))),this.element.addEventListener("keydown",this.handleShiftTab),this.toggleElement.addEventListener("click",this.handleClickOnToggler)),document.addEventListener("keydown",this.handleKeyboard),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}update(){this.gumshoe.setup()}openList(){this.currentList.classList.add("ecl-inpage-navigation__list--visible"),this.toggleElement.setAttribute("aria-expanded","true")}closeList(){this.currentList.classList.remove("ecl-inpage-navigation__list--visible"),this.toggleElement.setAttribute("aria-expanded","false")}setListHeight(){var e=window.innerHeight,i=window.innerWidth,s=t(".ecl-inpage-navigation__title",this.element),n=0;setTimeout((()=>{if(i<996){var t=this.toggleElement.parentElement;t&&(n=t.getBoundingClientRect().bottom+parseFloat(window.getComputedStyle(t).marginBottom))}else n=s?s.getBoundingClientRect().bottom:this.element.getBoundingClientRect().top;var l=e-n;l>0&&(this.currentList.style.maxHeight=l+"px")}),100)}handleClickOnToggler(e){e.preventDefault(),this.toggleElement&&(this.isExpanded="true"===this.toggleElement.getAttribute("aria-expanded"),this.toggleElement.setAttribute("aria-expanded",this.isExpanded?"false":"true"),this.isExpanded?this.focusTrap.deactivate():(this.setListHeight(),this.focusTrap.activate(),this.navLinks&&this.navLinks.length>0&&this.navLinks[0].focus()),this.trigger("onToggle",{isExpanded:this.isExpanded}))}handleClickOnLink(e){var i=e.target.href,s=null;if(i){var n=i.split("#")[1];n&&(s=t("#"+n,document))}this.focusTrap.deactivate();var l={target:s||i,e:e};this.trigger("onClick",l)}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{this.setListHeight()}),100)}handleKeyboard(e){var i=e.target;if("ArrowUp"===e.key)if(e.preventDefault(),i===this.navLinks[0])this.handleClickOnToggler(e);else{var s=i.parentElement.previousSibling;if(s&&s.classList.contains("ecl-inpage-navigation__item")){var n=t(this.linksSelector,s);n&&n.focus()}}if("ArrowDown"===e.key)if(e.preventDefault(),i===this.toggleElement)this.handleClickOnToggler(e);else{var l=i.parentElement.nextSibling;if(l&&l.classList.contains("ecl-inpage-navigation__item")){var a=t(this.linksSelector,l);a&&a.focus()}}}destroy(){this.attachClickListener&&this.toggleElement&&this.toggleElement.removeEventListener("click",this.handleClickOnToggler),this.attachClickListener&&this.navLinks&&this.navLinks.forEach((e=>e.removeEventListener("click",this.handleClickOnLink))),this.attachKeyListener&&document.removeEventListener("keydown",this.handleKeyboard),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.destroyScrollSpy(),this.destroySticky(),this.destroyObserver(),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}}class Ee{static autoInit(e,t){var i=(void 0===t?{}:t).MEDIA_CONTAINER,s=new Ee(e,void 0===i?{}:i);return s.init(),e.ECLMediaContainer=s,s}constructor(e,s){var n=void 0===s?{}:s,l=n.iframeSelector,a=void 0===l?"iframe":l,r=n.useAutomaticRatio,o=void 0===r||r,h=n.videoTitleSelector,c=void 0===h?"data-ecl-media-container-video-title":h,d=n.videoPlay,u=void 0===d?"[data-ecl-media-container-play]":d,m=n.videoPause,p=void 0===m?"[data-ecl-media-container-pause]":m,v=n.mediaVideo,g=void 0===v?"[data-ecl-media-container-video]":v;if(this.supportedEvents=["onPlayClick","onPauseClick"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.iframeSelector=a,this.useAutomaticRatio=o,this.videoTitleSelector=c,this.mediaVideo=t(g,this.element),this.videoPlay=t(u,this.element),this.videoPause=t(p,this.element),this.iframe=null,this.videoTitle="",this.calculateRatio=this.calculateRatio.bind(this),this.handleParameters=this.handleParameters.bind(this),this.handlePauseClick=this.handlePauseClick.bind(this),this.handlePlayClick=this.handlePlayClick.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.videoTitle=this.element.getAttribute(this.videoTitleSelector);var e=t(".ecl-media-container__media",this.element);e&&!/ecl-media-container__media--ratio/.test(e.className)&&(this.iframe=t(this.iframeSelector,this.element),this.iframe&&(this.handleParameters(),this.useAutomaticRatio&&this.calculateRatio())),this.videoPlay&&(this.videoPlay.addEventListener("click",(e=>this.handlePlayClick(e))),this.videoPlay.style.display="none"),this.videoPause&&(this.videoPause.addEventListener("click",(e=>this.handlePauseClick(e))),this.videoPause.style.display="flex"),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element)),this.videoPlay&&(this.videoPlay.removeEventListener("click",this.handlePlayClick),this.videoPlay.style.display="none"),this.videoPause&&(this.videoPause.remveEventListener("click",this.handlePauseClick),this.videoPause.style.display="flex")}handleParameters(){var e=new URL(this.iframe.src);e.host.includes("youtube")&&(this.iframe.src=e),this.videoTitle&&this.iframe.setAttribute("title",this.videoTitle)}calculateRatio(){var e=this.iframe.width,t=this.iframe.height;e&&t||(e=this.iframe.offsetWidth,t=this.iframe.offsetHeight),this.iframe.style.aspectRatio=e+"/"+t}handlePlayClick(e){this.mediaVideo&&this.mediaVideo.play(),this.videoPlay.style.display="none",this.videoPause&&(this.videoPause.style.display="flex",this.videoPause.focus());var t=c({},e,{status:"Playing"});this.trigger("onPlayClick",t)}handlePauseClick(e){this.mediaVideo&&this.mediaVideo.pause(),this.videoPause.style.display="none",this.videoPlay&&(this.videoPlay.style.display="flex",this.videoPlay.focus());var t=c({},e,{status:"Paused"});this.trigger("onPauseClick",t)}}var Ce,we={exports:{}};var ke=(Ce||(Ce=1,we.exports=function(e){var t={};function i(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,s){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:s})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}([function(e,t,i){var s={MOBILE:"mobile",TABLET:"tablet",SMART_TV:"smarttv",CONSOLE:"console",WEARABLE:"wearable",BROWSER:void 0};e.exports={BROWSER_TYPES:{CHROME:"Chrome",FIREFOX:"Firefox",OPERA:"Opera",YANDEX:"Yandex",SAFARI:"Safari",INTERNET_EXPLORER:"Internet Explorer",EDGE:"Edge",CHROMIUM:"Chromium",IE:"IE",MOBILE_SAFARI:"Mobile Safari",EDGE_CHROMIUM:"Edge Chromium"},DEVICE_TYPES:s,OS_TYPES:{IOS:"iOS",ANDROID:"Android",WINDOWS_PHONE:"Windows Phone",WINDOWS:"Windows",MAC_OS:"Mac OS"},defaultData:{isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1}}},function(e,t,i){var s,n=i(2),l=i(0),a=l.BROWSER_TYPES,r=l.OS_TYPES,o=l.DEVICE_TYPES,h=i(4),c=h.checkType,d=h.broPayload,u=h.mobilePayload,m=h.wearPayload,p=h.consolePayload,v=h.stvPayload,g=h.getNavigatorInstance,b=h.isIOS13Check,f=new n,y=f.getBrowser(),L=f.getDevice(),E=f.getEngine(),C=f.getOS(),w=f.getUA(),k=a.CHROME,S=a.CHROMIUM,x=a.IE,A=a.INTERNET_EXPLORER,_=a.OPERA,O=a.FIREFOX,T=a.SAFARI,P=a.EDGE,I=a.YANDEX,N=a.MOBILE_SAFARI,M=o.MOBILE,D=o.TABLET,R=o.SMART_TV,B=o.BROWSER,z=o.WEARABLE,F=o.CONSOLE,H=r.ANDROID,K=r.WINDOWS_PHONE,V=r.IOS,G=r.WINDOWS,W=r.MAC_OS,U=function(){return C.name===r.WINDOWS&&"10"===C.version&&"string"==typeof w&&-1!==w.indexOf("Edg/")},j=function(){return y.name===P},q=function(){return b("iPad")},Y=L.type===R,X=L.type===F,$=L.type===z,Q=y.name===N||q(),Z=y.name===S,J=function(){switch(L.type){case M:case D:return!0;default:return!1}}()||q(),ee=L.type===M,te=L.type===D||q(),ie=L.type===B,se=C.name===H,ne=C.name===K,le=C.name===V||q(),ae=y.name===k,re=y.name===O,oe=y.name===T||y.name===N,he=y.name===_,ce=y.name===A||y.name===x,de=C.version?C.version:"none",ue=C.name?C.name:"none",me=y.major,pe=y.version,ve=y.name,ge=L.vendor?L.vendor:"none",be=L.model?L.model:"none",fe=E.name,ye=E.version,Le=w,Ee=j()||U(),Ce=y.name===I,we=L.type,ke=(s=g())&&(/iPad|iPhone|iPod/.test(s.platform)||"MacIntel"===s.platform&&s.maxTouchPoints>1)&&!window.MSStream,Se=q(),xe=b("iPhone"),Ae=b("iPod"),_e=function(){var e=g(),t=e&&e.userAgent.toLowerCase();return"string"==typeof t&&/electron/.test(t)}(),Oe=U(),Te=j(),Pe=C.name===G,Ie=C.name===W,Ne=c(L.type);e.exports={deviceDetect:function(){var e=Ne.isBrowser,t=Ne.isMobile,i=Ne.isTablet,s=Ne.isSmartTV,n=Ne.isConsole,l=Ne.isWearable;return e?d(e,y,E,C,w):s?v(s,E,C,w):n?p(n,E,C,w):t||i?u(Ne,L,C,w):l?m(l,E,C,w):void 0},isSmartTV:Y,isConsole:X,isWearable:$,isMobileSafari:Q,isChromium:Z,isMobile:J,isMobileOnly:ee,isTablet:te,isBrowser:ie,isAndroid:se,isWinPhone:ne,isIOS:le,isChrome:ae,isFirefox:re,isSafari:oe,isOpera:he,isIE:ce,osVersion:de,osName:ue,fullBrowserVersion:me,browserVersion:pe,browserName:ve,mobileVendor:ge,mobileModel:be,engineName:fe,engineVersion:ye,getUA:Le,isEdge:Ee,isYandex:Ce,deviceType:we,isIOS13:ke,isIPad13:Se,isIPhone13:xe,isIPod13:Ae,isElectron:_e,isEdgeChromium:Oe,isLegacyEdge:Te,isWindows:Pe,isMacOs:Ie}},function(e,t,i){var s;
18
+ */var me,pe,ve=(de||(de=1,me=ue,function(e,t){var i,s=function(){function e(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,i,s){return i&&e(t.prototype,i),s&&e(t,s),t}}(),n=!1,a=void 0!==e;a&&e.getComputedStyle?(i=t.createElement("div"),["","-webkit-","-moz-","-ms-"].some(function(e){try{i.style.position=e+"sticky"}catch(e){}return""!=i.style.position})&&(n=!0)):n=!0;var l=!1,r="undefined"!=typeof ShadowRoot,o={top:null,left:null},h=[];function c(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}function d(e){return parseFloat(e)||0}function u(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t}var m=function(){function i(e){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),!(e instanceof HTMLElement))throw new Error("First argument must be HTMLElement");if(h.some(function(t){return t._node===e}))throw new Error("Stickyfill is already applied to this node");this._node=e,this._stickyMode=null,this._active=!1,h.push(this),this.refresh()}return s(i,[{key:"refresh",value:function(){if(!n&&!this._removed){this._active&&this._deactivate();var i=this._node,s=getComputedStyle(i),a={position:s.position,top:s.top,display:s.display,marginTop:s.marginTop,marginBottom:s.marginBottom,marginLeft:s.marginLeft,marginRight:s.marginRight,cssFloat:s.cssFloat};if(!isNaN(parseFloat(a.top))&&"table-cell"!=a.display&&"none"!=a.display){this._active=!0;var l=i.style.position;"sticky"!=s.position&&"-webkit-sticky"!=s.position||(i.style.position="static");var o=i.parentNode,h=r&&o instanceof ShadowRoot?o.host:o,m=i.getBoundingClientRect(),p=h.getBoundingClientRect(),v=getComputedStyle(h);this._parent={node:h,styles:{position:h.style.position},offsetHeight:h.offsetHeight},this._offsetToWindow={left:m.left,right:t.documentElement.clientWidth-m.right},this._offsetToParent={top:m.top-p.top-d(v.borderTopWidth),left:m.left-p.left-d(v.borderLeftWidth),right:-m.right+p.right-d(v.borderRightWidth)},this._styles={position:l,top:i.style.top,bottom:i.style.bottom,left:i.style.left,right:i.style.right,width:i.style.width,marginTop:i.style.marginTop,marginLeft:i.style.marginLeft,marginRight:i.style.marginRight};var g=d(a.top);this._limits={start:m.top+e.pageYOffset-g,end:p.top+e.pageYOffset+h.offsetHeight-d(v.borderBottomWidth)-i.offsetHeight-g-d(a.marginBottom)};var b=v.position;"absolute"!=b&&"relative"!=b&&(h.style.position="relative"),this._recalcPosition();var f=this._clone={};f.node=t.createElement("div"),c(f.node.style,{width:m.right-m.left+"px",height:m.bottom-m.top+"px",marginTop:a.marginTop,marginBottom:a.marginBottom,marginLeft:a.marginLeft,marginRight:a.marginRight,cssFloat:a.cssFloat,padding:0,border:0,borderSpacing:0,fontSize:"1em",position:"static"}),o.insertBefore(f.node,i),f.docOffsetTop=u(f.node)}}}},{key:"_recalcPosition",value:function(){if(this._active&&!this._removed){var e=o.top<=this._limits.start?"start":o.top>=this._limits.end?"end":"middle";if(this._stickyMode!=e){switch(e){case"start":c(this._node.style,{position:"absolute",left:this._offsetToParent.left+"px",right:this._offsetToParent.right+"px",top:this._offsetToParent.top+"px",bottom:"auto",width:"auto",marginLeft:0,marginRight:0,marginTop:0});break;case"middle":c(this._node.style,{position:"fixed",left:this._offsetToWindow.left+"px",right:this._offsetToWindow.right+"px",top:this._styles.top,bottom:"auto",width:"auto",marginLeft:0,marginRight:0,marginTop:0});break;case"end":c(this._node.style,{position:"absolute",left:this._offsetToParent.left+"px",right:this._offsetToParent.right+"px",top:"auto",bottom:0,width:"auto",marginLeft:0,marginRight:0})}this._stickyMode=e}}}},{key:"_fastCheck",value:function(){this._active&&!this._removed&&(Math.abs(u(this._clone.node)-this._clone.docOffsetTop)>1||Math.abs(this._parent.node.offsetHeight-this._parent.offsetHeight)>1)&&this.refresh()}},{key:"_deactivate",value:function(){var e=this;this._active&&!this._removed&&(this._clone.node.parentNode.removeChild(this._clone.node),delete this._clone,c(this._node.style,this._styles),delete this._styles,h.some(function(t){return t!==e&&t._parent&&t._parent.node===e._parent.node})||c(this._parent.node.style,this._parent.styles),delete this._parent,this._stickyMode=null,this._active=!1,delete this._offsetToWindow,delete this._offsetToParent,delete this._limits)}},{key:"remove",value:function(){var e=this;this._deactivate(),h.some(function(t,i){if(t._node===e._node)return h.splice(i,1),!0}),this._removed=!0}}]),i}(),p={stickies:h,Sticky:m,forceSticky:function(){n=!1,v(),this.refreshAll()},addOne:function(e){if(!(e instanceof HTMLElement)){if(!e.length||!e[0])return;e=e[0]}for(var t=0;t<h.length;t++)if(h[t]._node===e)return h[t];return new m(e)},add:function(e){if(e instanceof HTMLElement&&(e=[e]),e.length){for(var t=[],i=function(i){var s=e[i];return s instanceof HTMLElement?h.some(function(e){if(e._node===s)return t.push(e),!0})?"continue":void t.push(new m(s)):(t.push(void 0),"continue")},s=0;s<e.length;s++)i(s);return t}},refreshAll:function(){h.forEach(function(e){return e.refresh()})},removeOne:function(e){if(!(e instanceof HTMLElement)){if(!e.length||!e[0])return;e=e[0]}h.some(function(t){if(t._node===e)return t.remove(),!0})},remove:function(e){if(e instanceof HTMLElement&&(e=[e]),e.length)for(var t=function(t){var i=e[t];h.some(function(e){if(e._node===i)return e.remove(),!0})},i=0;i<e.length;i++)t(i)},removeAll:function(){for(;h.length;)h[0].remove()}};function v(){if(!l){l=!0,a(),e.addEventListener("scroll",a),e.addEventListener("resize",p.refreshAll),e.addEventListener("orientationchange",p.refreshAll);var i=void 0,s=void 0,n=void 0;"hidden"in t?(s="hidden",n="visibilitychange"):"webkitHidden"in t&&(s="webkitHidden",n="webkitvisibilitychange"),n?(t[s]||r(),t.addEventListener(n,function(){t[s]?clearInterval(i):r()})):r()}function a(){e.pageXOffset!=o.left?(o.top=e.pageYOffset,o.left=e.pageXOffset,p.refreshAll()):e.pageYOffset!=o.top&&(o.top=e.pageYOffset,o.left=e.pageXOffset,h.forEach(function(e){return e._recalcPosition()}))}function r(){i=setInterval(function(){h.forEach(function(e){return e._fastCheck()})},500)}}n||v(),me.exports?me.exports=p:a&&(e.Stickyfill=p)}(window,document)),ue.exports),ge=ce(ve),be={exports:{}},fe=be.exports;var ye=(pe||(pe=1,function(e){var t;Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(this))return null;do{if(t.matches(e))return t;t=t.parentElement}while(null!==t);return null}),function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}e.prototype=window.Event.prototype,window.CustomEvent=e}(),t=void 0!==he?he:"undefined"!=typeof window?window:fe,e.exports=function(e){var t={navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:0,reflow:!1,events:!0},i=function(){var e={};return Array.prototype.forEach.call(arguments,function(t){for(var i in t){if(!t.hasOwnProperty(i))return;e[i]=t[i]}}),e},s=function(e,t,i){if(i.settings.events){var s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(s)}},n=function(e){var t=0;if(e.offsetParent)for(;e;)t+=e.offsetTop,e=e.offsetParent;return t>=0?t:0},a=function(e){e&&e.sort(function(e,t){return n(e.content)<n(t.content)?-1:1})},l=function(e){return"function"==typeof e.offset?parseFloat(e.offset()):parseFloat(e.offset)},r=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},o=function(t,i,s){var n=t.getBoundingClientRect(),a=l(i);return s?parseInt(n.bottom,10)<(e.innerHeight||document.documentElement.clientHeight):parseInt(n.top,10)<=a},h=function(){return e.innerHeight+e.pageYOffset>=r()},c=function(e,t){return!(!h()||!o(e.content,t,!0))},d=function(e,t){var i=e[e.length-1];if(c(i,t))return i;for(var s=e.length-1;s>=0;s--)if(o(e[s].content,t))return e[s]},u=function(e,t){if(t.nested&&e.parentNode){var i=e.parentNode.closest("li");i&&(i.classList.remove(t.nestedClass),u(i,t))}},m=function(e,t){if(e){var i=e.nav.closest("li");i&&(i.classList.remove(t.navClass),e.content.classList.remove(t.contentClass),u(i,t),s("gumshoeDeactivate",i,{link:e.nav,content:e.content,settings:t}))}},p=function(e,t){if(t.nested){var i=e.parentNode.closest("li");i&&(i.classList.add(t.nestedClass),p(i,t))}},v=function(e,t){if(e){var i=e.nav.closest("li");i&&(i.classList.add(t.navClass),e.content.classList.add(t.contentClass),p(i,t),s("gumshoeActivate",i,{link:e.nav,content:e.content,settings:t}))}};return function(s,n){var l,r,o,h,c,u={setup:function(){l=document.querySelectorAll(s),r=[],Array.prototype.forEach.call(l,function(e){var t=document.getElementById(decodeURIComponent(e.hash.substr(1)));t&&r.push({nav:e,content:t})}),a(r)},detect:function(){var e=d(r,c);e?o&&e.content===o.content||(m(o,c),v(e,c),o=e):o&&(m(o,c),o=null)}},p=function(t){h&&e.cancelAnimationFrame(h),h=e.requestAnimationFrame(u.detect)},g=function(t){h&&e.cancelAnimationFrame(h),h=e.requestAnimationFrame(function(){a(r),u.detect()})};return u.destroy=function(){o&&m(o,c),e.removeEventListener("scroll",p,!1),c.reflow&&e.removeEventListener("resize",g,!1),r=null,l=null,o=null,h=null,c=null},c=i(t,n||{}),u.setup(),u.detect(),e.addEventListener("scroll",p,!1),c.reflow&&e.addEventListener("resize",g,!1),u}}(t)}(be)),be.exports),Le=ce(ye);class Ce{static autoInit(e,t){var i=(void 0===t?{}:t).INPAGE_NAVIGATION,s=new Ce(e,void 0===i?{}:i);return s.init(),e.ECLInpageNavigation=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.stickySelector,a=void 0===n?"[data-ecl-inpage-navigation]":n,l=s.containerSelector,r=void 0===l?"[data-ecl-inpage-navigation-container]":l,o=s.inPageList,h=void 0===o?"[data-ecl-inpage-navigation-list]":o,c=s.spySelector,d=void 0===c?"[data-ecl-inpage-navigation-link]":c,u=s.toggleSelector,m=void 0===u?"[data-ecl-inpage-navigation-trigger]":u,p=s.linksSelector,v=void 0===p?"[data-ecl-inpage-navigation-link]":p,g=s.spyActiveContainer,b=void 0===g?"ecl-inpage-navigation--visible":g,f=s.spyOffset,y=void 0===f?20:f,L=s.spyClass,C=void 0===L?"ecl-inpage-navigation__item--active":L,E=s.spyTrigger,k=void 0===E?"[data-ecl-inpage-navigation-trigger-current]":E,w=s.attachClickListener,S=void 0===w||w,A=s.attachResizeListener,_=void 0===A||A,O=s.attachScrollListener,x=void 0===O||O,T=s.attachKeyListener,P=void 0===T||T,M=s.contentClass,I=void 0===M?"inpage-navigation__heading--active":M;if(this.supportedEvents=["onToggle","onClick"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.attachClickListener=S,this.attachKeyListener=P,this.attachResizeListener=_,this.attachScrollListener=x,this.stickySelector=a,this.containerSelector=r,this.toggleSelector=m,this.linksSelector=v,this.inPageList=h,this.spyActiveContainer=b,this.spySelector=d,this.spyOffset=y,this.spyClass=C,this.spyTrigger=k,this.contentClass=I,this.gumshoe=null,this.observer=null,this.stickyObserver=null,this.isExpanded=!1,this.toggleElement=null,this.navLinks=null,this.resizeTimer=null,this.handleClickOnToggler=this.handleClickOnToggler.bind(this),this.handleClickOnLink=this.handleClickOnLink.bind(this),this.handleKeyboard=this.handleKeyboard.bind(this),this.initScrollSpy=this.initScrollSpy.bind(this),this.initObserver=this.initObserver.bind(this),this.activateScrollSpy=this.activateScrollSpy.bind(this),this.deactivateScrollSpy=this.deactivateScrollSpy.bind(this),this.destroySticky=this.destroySticky.bind(this),this.destroyScrollSpy=this.destroyScrollSpy.bind(this),this.destroyObserver=this.destroyObserver.bind(this),this.openList=this.openList.bind(this),this.closeList=this.closeList.bind(this),this.setListHeight=this.setListHeight.bind(this),this.handleResize=this.handleResize.bind(this)}initSticky(){this.stickyInstance=new ge.Sticky(this.element)}destroySticky(){this.stickyInstance&&this.stickyInstance.remove()}initScrollSpy(){if(this.gumshoe=new Le(this.spySelector,{navClass:this.spyClass,contentClass:this.contentClass,offset:this.spyOffset,reflow:!0}),document.addEventListener("gumshoeActivate",this.activateScrollSpy,!1),document.addEventListener("gumshoeDeactivate",this.deactivateScrollSpy,!1),"IntersectionObserver"in window){var e=t(this.containerSelector);if(e){var i=0,s=0,n=!1;this.stickyObserver=new IntersectionObserver(e=>{if(e&&e[0]){var t=e[0],a=t.boundingClientRect.y,l=t.intersectionRatio,r=t.isIntersecting;if(!n)return n=!0,i=a,void(s=l);a<i?l>s&&r||this.element.classList.remove(this.spyActiveContainer):a>i&&r&&l>s&&this.element.classList.add(this.spyActiveContainer),i=a,s=l}},{root:null}),this.stickyObserver.observe(e)}}}activateScrollSpy(e){var i=t(this.spyTrigger);this.element.classList.add(this.spyActiveContainer),i.textContent=e.detail.content.textContent}deactivateScrollSpy(){var e=t(this.spyTrigger);this.element.classList.remove(this.spyActiveContainer),e.innerHTML=""}destroyScrollSpy(){this.stickyObserver&&this.stickyObserver.disconnect(),document.removeEventListener("gumshoeActivate",this.activateScrollSpy,!1),document.removeEventListener("gumshoeDeactivate",this.deactivateScrollSpy,!1),this.gumshoe.destroy()}initObserver(){if("MutationObserver"in window){var i=this;this.observer=new MutationObserver(s=>{var n=t(".ecl-col-l-9"),a=t("[data-ecl-inpage-navigation-list]");s.forEach(t=>{t&&t.target&&t.target.classList&&!t.target.classList.contains("ecl-inpage-navigation__trigger-current")&&(t.addedNodes.length>0&&[].slice.call(t.addedNodes).forEach(t=>{if("H2"===t.tagName&&t.id){var i=e("h2[id]",n).findIndex(e=>e.id===t.id),s=a.childNodes[i-1].cloneNode(!0);s.childNodes[0].textContent=t.textContent,s.childNodes[0].href="#"+t.id,a.childNodes[i-1].after(s)}}),t.removedNodes.length>0&&[].slice.call(t.removedNodes).forEach(e=>{"H2"===e.tagName&&e.id&&a.childNodes.forEach(t=>{-1!==t.childNodes[0].href.indexOf(e.id)&&t.remove()})}),i.update())})}),this.observer.observe(document,{subtree:!0,childList:!0})}}destroyObserver(){this.observer&&this.observer.disconnect()}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.toggleElement=t(this.toggleSelector,this.element),this.navLinks=e(this.linksSelector,this.element),this.currentList=t(this.inPageList,this.element),this.direction=getComputedStyle(this.element).direction,"rtl"===this.direction&&this.element.classList.add("ecl-inpage-navigation--rtl"),this.setListHeight(),this.initSticky(this.element),this.initScrollSpy(),this.initObserver(),this.focusTrap=le(this.element,{onActivate:()=>this.openList(),onDeactivate:()=>this.closeList()}),this.attachClickListener&&this.toggleElement&&this.toggleElement.addEventListener("click",this.handleClickOnToggler),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.attachScrollListener&&window.addEventListener("scroll",this.handleResize),this.attachClickListener&&this.navLinks&&(this.navLinks.forEach(e=>e.addEventListener("click",this.handleClickOnLink)),this.element.addEventListener("keydown",this.handleShiftTab),this.toggleElement.addEventListener("click",this.handleClickOnToggler)),document.addEventListener("keydown",this.handleKeyboard),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}update(){this.gumshoe.setup()}openList(){this.currentList.classList.add("ecl-inpage-navigation__list--visible"),this.toggleElement.setAttribute("aria-expanded","true")}closeList(){this.currentList.classList.remove("ecl-inpage-navigation__list--visible"),this.toggleElement.setAttribute("aria-expanded","false")}setListHeight(){var e=window.innerHeight,i=window.innerWidth,s=t(".ecl-inpage-navigation__title",this.element),n=0;setTimeout(()=>{if(i<996){var t=this.toggleElement.parentElement;t&&(n=t.getBoundingClientRect().bottom+parseFloat(window.getComputedStyle(t).marginBottom))}else n=s?s.getBoundingClientRect().bottom:this.element.getBoundingClientRect().top;var a=e-n;a>0&&(this.currentList.style.maxHeight=a+"px")},100)}handleClickOnToggler(e){e.preventDefault(),this.toggleElement&&(this.isExpanded="true"===this.toggleElement.getAttribute("aria-expanded"),this.toggleElement.setAttribute("aria-expanded",this.isExpanded?"false":"true"),this.isExpanded?this.focusTrap.deactivate():(this.setListHeight(),this.focusTrap.activate(),this.navLinks&&this.navLinks.length>0&&this.navLinks[0].focus()),this.trigger("onToggle",{isExpanded:this.isExpanded}))}handleClickOnLink(e){var i=e.target.href,s=null;if(i){var n=i.split("#")[1];n&&(s=t("#"+n,document))}this.focusTrap.deactivate();var a={target:s||i,e:e};this.trigger("onClick",a)}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.setListHeight()},100)}handleKeyboard(e){var i=e.target;if("ArrowUp"===e.key)if(e.preventDefault(),i===this.navLinks[0])this.handleClickOnToggler(e);else{var s=i.parentElement.previousSibling;if(s&&s.classList.contains("ecl-inpage-navigation__item")){var n=t(this.linksSelector,s);n&&n.focus()}}if("ArrowDown"===e.key)if(e.preventDefault(),i===this.toggleElement)this.handleClickOnToggler(e);else{var a=i.parentElement.nextSibling;if(a&&a.classList.contains("ecl-inpage-navigation__item")){var l=t(this.linksSelector,a);l&&l.focus()}}}destroy(){this.attachClickListener&&this.toggleElement&&this.toggleElement.removeEventListener("click",this.handleClickOnToggler),this.attachClickListener&&this.navLinks&&this.navLinks.forEach(e=>e.removeEventListener("click",this.handleClickOnLink)),this.attachKeyListener&&document.removeEventListener("keydown",this.handleKeyboard),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.destroyScrollSpy(),this.destroySticky(),this.destroyObserver(),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}}class Ee{static autoInit(e,t){var i=(void 0===t?{}:t).MEDIA_CONTAINER,s=new Ee(e,void 0===i?{}:i);return s.init(),e.ECLMediaContainer=s,s}constructor(e,s){var n=void 0===s?{}:s,a=n.iframeSelector,l=void 0===a?"iframe":a,r=n.useAutomaticRatio,o=void 0===r||r,h=n.videoTitleSelector,c=void 0===h?"data-ecl-media-container-video-title":h,d=n.videoPlay,u=void 0===d?"[data-ecl-media-container-play]":d,m=n.videoPause,p=void 0===m?"[data-ecl-media-container-pause]":m,v=n.mediaVideo,g=void 0===v?"[data-ecl-media-container-video]":v;if(this.supportedEvents=["onPlayClick","onPauseClick"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.iframeSelector=l,this.useAutomaticRatio=o,this.videoTitleSelector=c,this.mediaVideo=t(g,this.element),this.videoPlay=t(u,this.element),this.videoPause=t(p,this.element),this.iframe=null,this.videoTitle="",this.calculateRatio=this.calculateRatio.bind(this),this.handleParameters=this.handleParameters.bind(this),this.handlePauseClick=this.handlePauseClick.bind(this),this.handlePlayClick=this.handlePlayClick.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.videoTitle=this.element.getAttribute(this.videoTitleSelector);var e=t(".ecl-media-container__media",this.element);e&&!/ecl-media-container__media--ratio/.test(e.className)&&(this.iframe=t(this.iframeSelector,this.element),this.iframe&&(this.handleParameters(),this.useAutomaticRatio&&this.calculateRatio())),this.videoPlay&&(this.videoPlay.addEventListener("click",e=>this.handlePlayClick(e)),this.videoPlay.style.display="none"),this.videoPause&&(this.videoPause.addEventListener("click",e=>this.handlePauseClick(e)),this.videoPause.style.display="flex"),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element)),this.videoPlay&&(this.videoPlay.removeEventListener("click",this.handlePlayClick),this.videoPlay.style.display="none"),this.videoPause&&(this.videoPause.remveEventListener("click",this.handlePauseClick),this.videoPause.style.display="flex")}handleParameters(){var e=new URL(this.iframe.src);e.host.includes("youtube")&&(this.iframe.src=e),this.videoTitle&&this.iframe.setAttribute("title",this.videoTitle)}calculateRatio(){var e=this.iframe.width,t=this.iframe.height;e&&t||(e=this.iframe.offsetWidth,t=this.iframe.offsetHeight),this.iframe.style.aspectRatio=e+"/"+t}handlePlayClick(e){this.mediaVideo&&this.mediaVideo.play(),this.videoPlay.style.display="none",this.videoPause&&(this.videoPause.style.display="flex",this.videoPause.focus());var t=c({},e,{status:"Playing"});this.trigger("onPlayClick",t)}handlePauseClick(e){this.mediaVideo&&this.mediaVideo.pause(),this.videoPause.style.display="none",this.videoPlay&&(this.videoPlay.style.display="flex",this.videoPlay.focus());var t=c({},e,{status:"Paused"});this.trigger("onPauseClick",t)}}var ke={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},we={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Se={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},Ae={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},_e={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class Oe{static getFirstMatch(e,t){var i=t.match(e);return i&&i.length>0&&i[1]||""}static getSecondMatch(e,t){var i=t.match(e);return i&&i.length>1&&i[2]||""}static matchAndReturnConst(e,t,i){if(e.test(t))return i}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){var t=e.split(".").splice(0,2).map(e=>parseInt(e,10)||0);if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){var t=e.split(".").splice(0,2).map(e=>parseInt(e,10)||0);if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,i){void 0===i&&(i=!1);var s=Oe.getVersionPrecision(e),n=Oe.getVersionPrecision(t),a=Math.max(s,n),l=0,r=Oe.map([e,t],e=>{var t=a-Oe.getVersionPrecision(e),i=e+new Array(t+1).join(".0");return Oe.map(i.split("."),e=>new Array(20-e.length).join("0")+e).reverse()});for(i&&(l=a-Math.min(s,n)),a-=1;a>=l;){if(r[0][a]>r[1][a])return 1;if(r[0][a]===r[1][a]){if(a===l)return 0;a-=1}else if(r[0][a]<r[1][a])return-1}}static map(e,t){var i,s=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)s.push(t(e[i]));return s}static find(e,t){var i,s;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,s=e.length;i<s;i+=1){var n=e[i];if(t(n,i))return n}}static assign(e){for(var t,i,s=e,n=arguments.length,a=new Array(n>1?n-1:0),l=1;l<n;l++)a[l-1]=arguments[l];if(Object.assign)return Object.assign(e,...a);var r=function(){var e=a[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(t=>{s[t]=e[t]})};for(t=0,i=a.length;t<i;t+=1)r();return e}static getBrowserAlias(e){return ke[e]}static getBrowserTypeByAlias(e){return we[e]||""}}var xe,Te=/version\/(\d+(\.?_?\d+)+)/i,Pe=[{test:[/googlebot/i],describe(e){var t={name:"Googlebot"},i=Oe.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/opera/i],describe(e){var t={name:"Opera"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opr\/|opios/i],describe(e){var t={name:"Opera"},i=Oe.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe(e){var t={name:"Samsung Internet for Android"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe(e){var t={name:"NAVER Whale Browser"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/PaleMoon/i],describe(e){var t={name:"Pale Moon"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe(e){var t={name:"MZ Browser"},i=Oe.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/focus/i],describe(e){var t={name:"Focus"},i=Oe.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/swing/i],describe(e){var t={name:"Swing"},i=Oe.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/coast/i],describe(e){var t={name:"Opera Coast"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){var t={name:"Opera Touch"},i=Oe.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe(e){var t={name:"Yandex Browser"},i=Oe.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe(e){var t={name:"UC Browser"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe(e){var t={name:"Maxthon"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe(e){var t={name:"Epiphany"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe(e){var t={name:"Puffin"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe(e){var t={name:"Sleipnir"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe(e){var t={name:"K-Meleon"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe(e){var t={name:"WeChat"},i=Oe.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=Oe.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe(e){var t={name:"Internet Explorer"},i=Oe.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe(e){var t={name:"Microsoft Edge"},i=Oe.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe(e){var t={name:"Microsoft Edge"},i=Oe.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe(e){var t={name:"Vivaldi"},i=Oe.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe(e){var t={name:"SeaMonkey"},i=Oe.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe(e){var t={name:"Sailfish"},i=Oe.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe(e){var t={name:"Amazon Silk"},i=Oe.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe(e){var t={name:"PhantomJS"},i=Oe.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe(e){var t={name:"SlimerJS"},i=Oe.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){var t={name:"BlackBerry"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe(e){var t={name:"WebOS Browser"},i=Oe.getFirstMatch(Te,e)||Oe.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe(e){var t={name:"Bada"},i=Oe.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe(e){var t={name:"Tizen"},i=Oe.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe(e){var t={name:"QupZilla"},i=Oe.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){var t={name:"Firefox"},i=Oe.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe(e){var t={name:"Electron"},i=Oe.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MiuiBrowser/i],describe(e){var t={name:"Miui"},i=Oe.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/chromium/i],describe(e){var t={name:"Chromium"},i=Oe.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe(e){var t={name:"Chrome"},i=Oe.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe(e){var t={name:"Google Search"},i=Oe.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe(e){var t={name:"Android Browser"},i=Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/playstation 4/i],describe(e){var t={name:"PlayStation 4"},i=Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/safari|applewebkit/i],describe(e){var t={name:"Safari"},i=Oe.getFirstMatch(Te,e);return i&&(t.version=i),t}},{test:[/.*/i],describe(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:Oe.getFirstMatch(t,e),version:Oe.getSecondMatch(t,e)}}}],Me=[{test:[/Roku\/DVP/],describe(e){var t=Oe.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Ae.Roku,version:t}}},{test:[/windows phone/i],describe(e){var t=Oe.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Ae.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){var t=Oe.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),i=Oe.getWindowsVersionName(t);return{name:Ae.Windows,version:t,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){var t={name:Ae.iOS},i=Oe.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},{test:[/macintosh/i],describe(e){var t=Oe.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=Oe.getMacOSVersionName(t),s={name:Ae.MacOS,version:t};return i&&(s.versionName=i),s}},{test:[/(ipod|iphone|ipad)/i],describe(e){var t=Oe.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Ae.iOS,version:t}}},{test(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe(e){var t=Oe.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=Oe.getAndroidVersionName(t),s={name:Ae.Android,version:t};return i&&(s.versionName=i),s}},{test:[/(web|hpw)[o0]s/i],describe(e){var t=Oe.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:Ae.WebOS};return t&&t.length&&(i.version=t),i}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){var t=Oe.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Oe.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Oe.getFirstMatch(/\bbb(\d+)/i,e);return{name:Ae.BlackBerry,version:t}}},{test:[/bada/i],describe(e){var t=Oe.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Ae.Bada,version:t}}},{test:[/tizen/i],describe(e){var t=Oe.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Ae.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:Ae.Linux})},{test:[/CrOS/],describe:()=>({name:Ae.ChromeOS})},{test:[/PlayStation 4/],describe(e){var t=Oe.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Ae.PlayStation4,version:t}}}],Ie=[{test:[/googlebot/i],describe:()=>({type:Se.bot,vendor:"Google"})},{test:[/huawei/i],describe(e){var t=Oe.getFirstMatch(/(can-l01)/i,e)&&"Nova",i={type:Se.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:Se.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:Se.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:Se.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:Se.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:Se.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:Se.tablet})},{test(e){var t=e.test(/ipod|iphone/i),i=e.test(/like (ipod|iphone)/i);return t&&!i},describe(e){var t=Oe.getFirstMatch(/(ipod|iphone)/i,e);return{type:Se.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:Se.mobile,vendor:"Nexus"})},{test:[/Nokia/i],describe(e){var t=Oe.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),i={type:Se.mobile,vendor:"Nokia"};return t&&(i.model=t),i}},{test:[/[^-]mobi/i],describe:()=>({type:Se.mobile})},{test:e=>"blackberry"===e.getBrowserName(!0),describe:()=>({type:Se.mobile,vendor:"BlackBerry"})},{test:e=>"bada"===e.getBrowserName(!0),describe:()=>({type:Se.mobile})},{test:e=>"windows phone"===e.getBrowserName(),describe:()=>({type:Se.mobile,vendor:"Microsoft"})},{test(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:()=>({type:Se.tablet})},{test:e=>"android"===e.getOSName(!0),describe:()=>({type:Se.mobile})},{test:e=>"macos"===e.getOSName(!0),describe:()=>({type:Se.desktop,vendor:"Apple"})},{test:e=>"windows"===e.getOSName(!0),describe:()=>({type:Se.desktop})},{test:e=>"linux"===e.getOSName(!0),describe:()=>({type:Se.desktop})},{test:e=>"playstation 4"===e.getOSName(!0),describe:()=>({type:Se.tv})},{test:e=>"roku"===e.getOSName(!0),describe:()=>({type:Se.tv})}],Ne=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:_e.Blink};var t=Oe.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:_e.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){var t={name:_e.Trident},i=Oe.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:e=>e.test(/presto/i),describe(e){var t={name:_e.Presto},i=Oe.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test(e){var t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe(e){var t={name:_e.Gecko},i=Oe.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:_e.Blink})},{test:[/(apple)?webkit/i],describe(e){var t={name:_e.WebKit},i=Oe.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];class Be{constructor(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};var e=Oe.find(Pe,e=>{if("function"==typeof e.test)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};var e=Oe.find(Me,e=>{if("function"==typeof e.test)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};var e=Oe.find(Ie,e=>{if("function"==typeof e.test)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};var e=Oe.find(Ne,e=>{if("function"==typeof e.test)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Oe.assign({},this.parsedResult)}satisfies(e){var t={},i=0,s={},n=0;if(Object.keys(e).forEach(a=>{var l=e[a];"string"==typeof l?(s[a]=l,n+=1):"object"==typeof l&&(t[a]=l,i+=1)}),i>0){var a=Object.keys(t),l=Oe.find(a,e=>this.isOS(e));if(l){var r=this.satisfies(t[l]);if(void 0!==r)return r}var o=Oe.find(a,e=>this.isPlatform(e));if(o){var h=this.satisfies(t[o]);if(void 0!==h)return h}}if(n>0){var c=Object.keys(s),d=Oe.find(c,e=>this.isBrowser(e,!0));if(void 0!==d)return this.compareVersion(s[d])}}isBrowser(e,t){void 0===t&&(t=!1);var i=this.getBrowserName().toLowerCase(),s=e.toLowerCase(),n=Oe.getBrowserTypeByAlias(s);return t&&n&&(s=n.toLowerCase()),s===i}compareVersion(e){var t=[0],i=e,s=!1,n=this.getBrowserVersion();if("string"==typeof n)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(s=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(s=!0,i=e.substr(1)),t.indexOf(Oe.compareVersions(n,i,s))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e){return void 0===e&&(e=[]),e.some(e=>this.is(e))}}
17
19
  /*!
18
- * UAParser.js v0.7.18
19
- * Lightweight JavaScript-based User-Agent string parser
20
- * https://github.com/faisalman/ua-parser-js
21
- *
22
- * Copyright © 2012-2016 Faisal Salman <fyzlman@gmail.com>
23
- * Dual licensed under GPLv2 or MIT
24
- */!function(n,l){var a="function",r="undefined",o="object",h="model",c="name",d="type",u="vendor",m="version",p="architecture",v="console",g="mobile",b="tablet",f="smarttv",y="wearable",L={extend:function(e,t){var i={};for(var s in e)t[s]&&t[s].length%2==0?i[s]=t[s].concat(e[s]):i[s]=e[s];return i},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:l},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},E={rgx:function(e,t){for(var i,s,n,r,h,c,d=0;d<t.length&&!h;){var u=t[d],m=t[d+1];for(i=s=0;i<u.length&&!h;)if(h=u[i++].exec(e))for(n=0;n<m.length;n++)c=h[++s],typeof(r=m[n])===o&&r.length>0?2==r.length?typeof r[1]==a?this[r[0]]=r[1].call(this,c):this[r[0]]=r[1]:3==r.length?typeof r[1]!==a||r[1].exec&&r[1].test?this[r[0]]=c?c.replace(r[1],r[2]):l:this[r[0]]=c?r[1].call(this,c,r[2]):l:4==r.length&&(this[r[0]]=c?r[3].call(this,c.replace(r[1],r[2])):l):this[r]=c||l;d+=2}},str:function(e,t){for(var i in t)if(typeof t[i]===o&&t[i].length>0){for(var s=0;s<t[i].length;s++)if(L.has(t[i][s],e))return"?"===i?l:i}else if(L.has(t[i],e))return"?"===i?l:i;return e}},C={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},w={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[c,m],[/(opios)[\/\s]+([\w\.]+)/i],[[c,"Opera Mini"],m],[/\s(opr)\/([\w\.]+)/i],[[c,"Opera"],m],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark)\/([\w\.-]+)/i],[c,m],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[c,"IE"],m],[/(edge|edgios|edgea)\/((\d+)?[\w\.]+)/i],[[c,"Edge"],m],[/(yabrowser)\/([\w\.]+)/i],[[c,"Yandex"],m],[/(puffin)\/([\w\.]+)/i],[[c,"Puffin"],m],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[c,"UCBrowser"],m],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],m],[/(micromessenger)\/([\w\.]+)/i],[[c,"WeChat"],m],[/(qqbrowserlite)\/([\w\.]+)/i],[c,m],[/(QQ)\/([\d\.]+)/i],[c,m],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[c,m],[/(BIDUBrowser)[\/\s]?([\w\.]+)/i],[c,m],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[c,m],[/(MetaSr)[\/\s]?([\w\.]+)/i],[c],[/(LBBROWSER)/i],[c],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[m,[c,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[m,[c,"Facebook"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[m,[c,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[c,/(.+)/,"$1 WebView"],m],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[c,/(.+(?:g|us))(.+)/,"$1 $2"],m],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[m,[c,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[c,m],[/(dolfin)\/([\w\.]+)/i],[[c,"Dolphin"],m],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[c,"Chrome"],m],[/(coast)\/([\w\.]+)/i],[[c,"Opera Coast"],m],[/fxios\/([\w\.-]+)/i],[m,[c,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[m,[c,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[m,c],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[c,"GSA"],m],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[c,[m,E.str,C.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[c,m],[/(navigator|netscape)\/([\w\.-]+)/i],[[c,"Netscape"],m],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[c,m]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,L.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[p,/ower/,"",L.lowerize]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[p,L.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[h,u,[d,b]],[/applecoremedia\/[\w\.]+ \((ipad)/],[h,[u,"Apple"],[d,b]],[/(apple\s{0,1}tv)/i],[[h,"Apple TV"],[u,"Apple"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[u,h,[d,b]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[h,[u,"Amazon"],[d,b]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[h,E.str,C.device.amazon.model],[u,"Amazon"],[d,g]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[h,u,[d,g]],[/\((ip[honed|\s\w*]+);/i],[h,[u,"Apple"],[d,g]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[u,h,[d,g]],[/\(bb10;\s(\w+)/i],[h,[u,"BlackBerry"],[d,g]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i],[h,[u,"Asus"],[d,b]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[u,"Sony"],[h,"Xperia Tablet"],[d,b]],[/android.+\s([c-g]\d{4}|so[-l]\w+)\sbuild\//i],[h,[u,"Sony"],[d,g]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[u,h,[d,v]],[/android.+;\s(shield)\sbuild/i],[h,[u,"Nvidia"],[d,v]],[/(playstation\s[34portablevi]+)/i],[h,[u,"Sony"],[d,v]],[/(sprint\s(\w+))/i],[[u,E.str,C.device.sprint.vendor],[h,E.str,C.device.sprint.model],[d,g]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[u,h,[d,b]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[u,[h,/_/g," "],[d,g]],[/(nexus\s9)/i],[h,[u,"HTC"],[d,b]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p)/i],[h,[u,"Huawei"],[d,g]],[/(microsoft);\s(lumia[\s\w]+)/i],[u,h,[d,g]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[h,[u,"Microsoft"],[d,v]],[/(kin\.[onetw]{3})/i],[[h,/\./g," "],[u,"Microsoft"],[d,g]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[h,[u,"Motorola"],[d,g]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[h,[u,"Motorola"],[d,b]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[u,L.trim],[h,L.trim],[d,f]],[/hbbtv.+maple;(\d+)/i],[[h,/^/,"SmartTV"],[u,"Samsung"],[d,f]],[/\(dtv[\);].+(aquos)/i],[h,[u,"Sharp"],[d,f]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[u,"Samsung"],h,[d,b]],[/smart-tv.+(samsung)/i],[u,[d,f],h],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[u,"Samsung"],h,[d,g]],[/sie-(\w*)/i],[h,[u,"Siemens"],[d,g]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[u,"Nokia"],h,[d,g]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[h,[u,"Acer"],[d,b]],[/android.+([vl]k\-?\d{3})\s+build/i],[h,[u,"LG"],[d,b]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[u,"LG"],h,[d,b]],[/(lg) netcast\.tv/i],[u,h,[d,f]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[h,[u,"LG"],[d,g]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[h,[u,"Lenovo"],[d,b]],[/linux;.+((jolla));/i],[u,h,[d,g]],[/((pebble))app\/[\d\.]+\s/i],[u,h,[d,y]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[u,h,[d,g]],[/crkey/i],[[h,"Chromecast"],[u,"Google"]],[/android.+;\s(glass)\s\d/i],[h,[u,"Google"],[d,y]],[/android.+;\s(pixel c)\s/i],[h,[u,"Google"],[d,b]],[/android.+;\s(pixel xl|pixel)\s/i],[h,[u,"Google"],[d,g]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[h,/_/g," "],[u,"Xiaomi"],[d,g]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[h,/_/g," "],[u,"Xiaomi"],[d,b]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[h,[u,"Meizu"],[d,b]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})\s+build/i],[h,[u,"OnePlus"],[d,g]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[h,[u,"RCA"],[d,b]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[h,[u,"Dell"],[d,b]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[h,[u,"Verizon"],[d,b]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[u,"Barnes & Noble"],h,[d,b]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[h,[u,"NuVision"],[d,b]],[/android.+;\s(k88)\sbuild/i],[h,[u,"ZTE"],[d,b]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[h,[u,"Swiss"],[d,g]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[h,[u,"Swiss"],[d,b]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[h,[u,"Zeki"],[d,b]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[u,"Dragon Touch"],h,[d,b]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[h,[u,"Insignia"],[d,b]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[h,[u,"NextBook"],[d,b]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[u,"Voice"],h,[d,g]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[u,"LvTel"],h,[d,g]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[h,[u,"Envizen"],[d,b]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[u,h,[d,b]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[h,[u,"MachSpeed"],[d,b]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[u,h,[d,b]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[h,[u,"Rotor"],[d,b]],[/android.+(KS(.+))\s+build/i],[h,[u,"Amazon"],[d,b]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[u,h,[d,b]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[d,L.lowerize],u,h],[/(android[\w\.\s\-]{0,9});.+build/i],[h,[u,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[m,[c,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[c,m],[/rv\:([\w\.]{1,9}).+(gecko)/i],[m,c]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[c,m],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[c,[m,E.str,C.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[c,"Windows"],[m,E.str,C.os.windows.version]],[/\((bb)(10);/i],[[c,"BlackBerry"],m],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]*)/i,/linux;.+(sailfish);/i],[c,m],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[c,"Symbian"],m],[/\((series40);/i],[c],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[c,"Firefox OS"],m],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[c,m],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[c,"Chromium OS"],m],[/(sunos)\s?([\w\.\d]*)/i],[[c,"Solaris"],m],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[c,m],[/(haiku)\s(\w+)/i],[c,m],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[m,/_/g,"."],[c,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[c,"Mac OS"],[m,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]*)/i],[c,m]]},k=function(e,t){if("object"==typeof e&&(t=e,e=l),!(this instanceof k))return new k(e,t).getResult();var i=e||(n&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),s=t?L.extend(w,t):w;return this.getBrowser=function(){var e={name:l,version:l};return E.rgx.call(e,i,s.browser),e.major=L.major(e.version),e},this.getCPU=function(){var e={architecture:l};return E.rgx.call(e,i,s.cpu),e},this.getDevice=function(){var e={vendor:l,model:l,type:l};return E.rgx.call(e,i,s.device),e},this.getEngine=function(){var e={name:l,version:l};return E.rgx.call(e,i,s.engine),e},this.getOS=function(){var e={name:l,version:l};return E.rgx.call(e,i,s.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=e,this},this};k.VERSION="0.7.18",k.BROWSER={NAME:c,MAJOR:"major",VERSION:m},k.CPU={ARCHITECTURE:p},k.DEVICE={MODEL:h,VENDOR:u,TYPE:d,CONSOLE:v,MOBILE:g,SMARTTV:f,TABLET:b,WEARABLE:y,EMBEDDED:"embedded"},k.ENGINE={NAME:c,VERSION:m},k.OS={NAME:c,VERSION:m},typeof t!==r?(typeof e!==r&&e.exports&&(t=e.exports=k),t.UAParser=k):i(3)?(s=function(){return k}.call(t,i,t,e))===l||(e.exports=s):n&&(n.UAParser=k);var S=n&&(n.jQuery||n.Zepto);if(typeof S!==r){var x=new k;S.ua=x.getResult(),S.ua.get=function(){return x.getUA()},S.ua.set=function(e){x.setUA(e);var t=x.getResult();for(var i in t)S.ua[i]=t[i]}}}("object"==typeof window?window:this)},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},n=i(0),l=n.DEVICE_TYPES,a=n.defaultData,r=t.getNavigatorInstance=function(){return!("undefined"==typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},o=t.isIOS13Check=function(e){var t=r();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)};e.exports={checkType:function(e){switch(e){case l.MOBILE:return{isMobile:!0};case l.TABLET:return{isTablet:!0};case l.SMART_TV:return{isSmartTV:!0};case l.CONSOLE:return{isConsole:!0};case l.WEARABLE:return{isWearable:!0};case l.BROWSER:return{isBrowser:!0};default:return a}},broPayload:function(e,t,i,s,n){return{isBrowser:e,browserMajorVersion:t.major,browserFullVersion:t.version,browserName:t.name,engineName:i.name||!1,engineVersion:i.version,osName:s.name,osVersion:s.version,userAgent:n}},mobilePayload:function(e,t,i,n){return s({},e,{vendor:t.vendor,model:t.model,os:i.name,osVersion:i.version,ua:n})},stvPayload:function(e,t,i,s){return{isSmartTV:e,engineName:t.name,engineVersion:t.version,osName:i.name,osVersion:i.version,userAgent:s}},consolePayload:function(e,t,i,s){return{isConsole:e,engineName:t.name,engineVersion:t.version,osName:i.name,osVersion:i.version,userAgent:s}},wearPayload:function(e,t,i,s){return{isWearable:e,engineName:t.name,engineVersion:t.version,osName:i.name,osVersion:i.version,userAgent:s}},getNavigatorInstance:r,isIOS13Check:o}}])),we.exports),Se=he(ke);class xe{static autoInit(e,t){var i=(void 0===t?{}:t).MEGA_MENU,s=new xe(e,void 0===i?{}:i);return s.init(),e.ECLMegaMenu=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.openSelector,l=void 0===n?"[data-ecl-mega-menu-open]":n,a=s.backSelector,r=void 0===a?"[data-ecl-mega-menu-back]":a,o=s.innerSelector,h=void 0===o?"[data-ecl-mega-menu-inner]":o,c=s.itemSelector,d=void 0===c?"[data-ecl-mega-menu-item]":c,u=s.linkSelector,m=void 0===u?"[data-ecl-mega-menu-link]":u,p=s.subLinkSelector,v=void 0===p?"[data-ecl-mega-menu-sublink]":p,g=s.megaSelector,b=void 0===g?"[data-ecl-mega-menu-mega]":g,f=s.containerSelector,y=void 0===f?"[data-ecl-has-container]":f,L=s.subItemSelector,E=void 0===L?"[data-ecl-mega-menu-subitem]":L,C=s.featuredAttribute,w=void 0===C?"[data-ecl-mega-menu-featured]":C,k=s.featuredLinkAttribute,S=void 0===k?"[data-ecl-mega-menu-featured-link]":k,x=s.labelOpenAttribute,A=void 0===x?"data-ecl-mega-menu-label-open":x,_=s.labelCloseAttribute,O=void 0===_?"data-ecl-mega-menu-label-close":_,T=s.attachClickListener,P=void 0===T||T,I=s.attachFocusListener,N=void 0===I||I,M=s.attachKeyListener,D=void 0===M||M,R=s.attachResizeListener,B=void 0===R||R;if(this.supportedEvents=["onOpen","onClose"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.openSelector=l,this.backSelector=r,this.innerSelector=h,this.itemSelector=d,this.linkSelector=m,this.subLinkSelector=v,this.megaSelector=b,this.subItemSelector=E,this.containerSelector=y,this.labelOpenAttribute=A,this.labelCloseAttribute=O,this.attachClickListener=P,this.attachFocusListener=N,this.attachKeyListener=D,this.attachResizeListener=B,this.featuredAttribute=w,this.featuredLinkAttribute=S,this.direction="ltr",this.open=null,this.toggleLabel=null,this.back=null,this.backItemLevel1=null,this.backItemLevel2=null,this.inner=null,this.items=null,this.links=null,this.isOpen=!1,this.resizeTimer=null,this.wrappers=null,this.isKeyEvent=!1,this.isDesktop=!1,this.isLarge=!1,this.lastVisibleItem=null,this.menuOverlay=null,this.currentItem=null,this.totalItemsWidth=0,this.breakpointL=996,this.openPanel={num:0,item:{}},this.infoLinks=null,this.seeAllLinks=null,this.featuredLinks=null,this.handleClickOnOpen=this.handleClickOnOpen.bind(this),this.handleClickOnClose=this.handleClickOnClose.bind(this),this.handleClickOnToggle=this.handleClickOnToggle.bind(this),this.handleClickOnBack=this.handleClickOnBack.bind(this),this.handleClickGlobal=this.handleClickGlobal.bind(this),this.handleClickOnItem=this.handleClickOnItem.bind(this),this.handleClickOnSubitem=this.handleClickOnSubitem.bind(this),this.handleFocusOut=this.handleFocusOut.bind(this),this.handleKeyboard=this.handleKeyboard.bind(this),this.handleKeyboardGlobal=this.handleKeyboardGlobal.bind(this),this.handleResize=this.handleResize.bind(this),this.useDesktopDisplay=this.useDesktopDisplay.bind(this),this.closeOpenDropdown=this.closeOpenDropdown.bind(this),this.checkDropdownHeight=this.checkDropdownHeight.bind(this),this.positionMenuOverlay=this.positionMenuOverlay.bind(this),this.resetStyles=this.resetStyles.bind(this),this.handleFirstPanel=this.handleFirstPanel.bind(this),this.handleSecondPanel=this.handleSecondPanel.bind(this),this.disableScroll=this.disableScroll.bind(this),this.enableScroll=this.enableScroll.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.open=t(this.openSelector,this.element),this.back=t(this.backSelector,this.element),this.inner=t(this.innerSelector,this.element),this.btnPrevious=t(this.buttonPreviousSelector,this.element),this.btnNext=t(this.buttonNextSelector,this.element),this.items=e(this.itemSelector,this.element),this.subItems=e(this.subItemSelector,this.element),this.links=e(this.linkSelector,this.element),this.header=t(".ecl-site-header",document),this.headerBanner=t(".ecl-site-header__banner",document),this.wrappers=e(".ecl-mega-menu__wrapper",this.element),this.headerNotification=t(".ecl-site-header__notification",document),this.toggleLabel=t(".ecl-button__label",this.open),this.menuOverlay=t(".ecl-mega-menu__overlay",this.element),this.isDesktop=this.useDesktopDisplay(),this.attachClickListener&&(this.open&&this.open.addEventListener("click",this.handleClickOnToggle),this.back&&(this.back.addEventListener("click",this.handleClickOnBack),this.back.addEventListener("keyup",this.handleKeyboard)),this.attachClickListener&&document.addEventListener("click",this.handleClickGlobal)),this.links&&this.links.forEach((e=>{this.attachFocusListener&&e.addEventListener("focusout",this.handleFocusOut),this.attachKeyListener&&e.addEventListener("keyup",this.handleKeyboard)})),this.subItems&&this.subItems.forEach((e=>{var i=t(".ecl-mega-menu__sublink",e);this.attachKeyListener&&i&&(i.addEventListener("click",this.handleClickOnSubitem),i.addEventListener("keyup",this.handleKeyboard)),this.attachFocusListener&&i&&i.addEventListener("focusout",this.handleFocusOut)})),this.infoLinks=e(".ecl-mega-menu__info-link a",this.element),this.infoLinks.length>0&&this.infoLinks.forEach((e=>{this.attachKeyListener&&e.addEventListener("keyup",this.handleKeyboard),this.attachFocusListener&&e.addEventListener("blur",this.handleFocusOut)})),this.seeAllLinks=e(".ecl-mega-menu__see-all a",this.element),this.seeAllLinks.length>0&&this.seeAllLinks.forEach((e=>{this.attachKeyListener&&e.addEventListener("keyup",this.handleKeyboard),this.attachFocusListener&&e.addEventListener("blur",this.handleFocusOut)})),this.featuredLinks=e(this.featuredLinkAttribute,this.element),this.featuredLinks.length>0&&this.attachFocusListener&&this.featuredLinks.forEach((e=>{e.addEventListener("blur",this.handleFocusOut)})),this.attachKeyListener&&document.addEventListener("keyup",this.handleKeyboardGlobal),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.items&&this.items.forEach((e=>{if(this.totalItemsWidth+=e.offsetWidth,e.hasAttribute("data-ecl-has-children")||e.hasAttribute("data-ecl-has-container")){var i=t(this.linkSelector,e);this.attachClickListener&&i&&i.addEventListener("click",this.handleClickOnItem)}})),this.focusTrap=le(this.element,{onActivate:()=>this.element.classList.add("ecl-mega-menu-trap-is-active"),onDeactivate:()=>this.element.classList.remove("ecl-mega-menu-trap-is-active")}),this.handleResize(),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachClickListener&&(this.open&&this.open.removeEventListener("click",this.handleClickOnToggle),this.back&&this.back.removeEventListener("click",this.handleClickOnBack),this.attachClickListener&&document.removeEventListener("click",this.handleClickGlobal)),this.links&&this.links.forEach((e=>{this.attachClickListener&&e.removeEventListener("click",this.handleClickOnItem),this.attachFocusListener&&e.removeEventListener("focusout",this.handleFocusOut),this.attachKeyListener&&e.removeEventListener("keyup",this.handleKeyboard)})),this.subItems&&this.subItems.forEach((e=>{var i=t(".ecl-mega-menu__sublink",e);this.attachKeyListener&&i&&i.removeEventListener("keyup",this.handleKeyboard),this.attachClickListener&&i&&i.removeEventListener("click",this.handleClickOnSubitem),this.attachFocusListener&&i&&i.removeEventListener("focusout",this.handleFocusOut)})),this.infoLinks&&this.infoLinks.forEach((e=>{this.attachFocusListener&&e.removeEventListener("blur",this.handleFocusOut),this.attachKeyListener&&e.removeEventListener("keyup",this.handleKeyboard)})),this.seeAllLinks&&this.seeAllLinks.forEach((e=>{this.attachFocusListener&&e.removeEventListener("blur",this.handleFocusOut),this.attachKeyListener&&e.removeEventListener("keyup",this.handleKeyboard)})),this.featuredLinks&&this.attachFocusListener&&this.featuredLinks.forEach((e=>{e.removeEventListener("blur",this.handleFocusOut)})),this.attachKeyListener&&document.removeEventListener("keyup",this.handleKeyboardGlobal),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.closeOpenDropdown(),this.enableScroll(),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}disableScroll(){document.body.classList.add("ecl-mega-menu-prevent-scroll")}enableScroll(){document.body.classList.remove("ecl-mega-menu-prevent-scroll")}useDesktopDisplay(){return!Se.isMobileOnly&&(Se.isTablet?(this.element.classList.add("ecl-mega-menu--forced-mobile"),!1):!(window.innerWidth<this.breakpointL)&&(this.element.classList.remove("ecl-mega-menu--forced-mobile"),!0))}resetStyles(i,s){var n=e(".ecl-mega-menu__info",this.element),l=e(".ecl-mega-menu__sublist",this.element);if(l&&"mobile"===i){if(e(".ecl-mega-menu__item > .ecl-mega-menu__wrapper > .ecl-container > [data-ecl-mega-menu-mega]",this.element).forEach((e=>{e.style.height=""})),this.wrappers&&this.wrappers.forEach((e=>{e.style.top="",e.style.height=""})),this.openPanel.num>0&&this.header&&(this.headerBanner&&(this.headerBanner.style.display="none"),this.headerNotification&&(this.headerNotification.style.display="none")),2===this.openPanel.num){var a=t(".ecl-mega-menu__subitem--expanded",this.element);a&&a.firstChild.classList.add("ecl-mega-menu__parent-link");var r=this.openPanel.item;r.parentNode.childNodes.forEach((e=>{e!==r&&(e.style.display="none")}))}}else if(l&&"desktop"===i&&!s){l.forEach((e=>{e.classList.remove("ecl-mega-menu__sublist--scrollable"),e.childNodes.forEach((e=>{e.style.display=""}))})),n.forEach((e=>{e.style.top=""}));var o=[],h=t(".ecl-mega-menu__subitem--expanded",this.element);h&&(h.firstElementChild.classList.remove("ecl-mega-menu__parent-link"),o.push(h));var c=t(".ecl-mega-menu__item--expanded",this.element);c&&o.push(c),o.length>0?o.forEach((e=>{this.checkDropdownHeight(e)})):(this.element.setAttribute("aria-expanded","false"),this.element.removeAttribute("data-expanded"),this.open.setAttribute("aria-expanded","false"),this.enableScroll())}else if("desktop"===i&&s){var d=t(".ecl-mega-menu__subitem--expanded",this.element);d&&d.firstElementChild.classList.remove("ecl-mega-menu__parent-link"),n.forEach((e=>{e.style.height=""}))}"desktop"===i&&this.header&&(this.headerBanner&&(this.headerBanner.style.display="flex"),this.headerNotification&&(this.headerNotification.style.display="flex"))}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{var e=window.innerWidth;void 0!==this.prevScreenWidth&&((this.prevScreenWidth<=this.breakpointL&&e>this.breakpointL||this.prevScreenWidth>this.breakpointL&&e<=this.breakpointL)&&this.resetStyles(e>this.breakpointL?"desktop":"mobile"),this.prevScreenWidth>1140&&e>996&&this.resetStyles("desktop",!0));this.isDesktop=this.useDesktopDisplay(),this.isLarge=window.innerWidth>1140,this.prevScreenWidth=e,this.element.classList.remove("ecl-mega-menu--forced-mobile"),this.direction=getComputedStyle(this.element).direction,"rtl"===this.direction?this.element.classList.add("ecl-mega-menu--rtl"):this.element.classList.remove("ecl-mega-menu--rtl");var i=t(".ecl-mega-menu__item--expanded",this.element);i&&this.isDesktop&&this.checkDropdownHeight(i),this.positionMenuOverlay()}),200)}checkDropdownHeight(i,s){void 0===s&&(s=!0);var n=t(".ecl-mega-menu__info",i),l=t(".ecl-mega-menu__mega",i);l&&this.isDesktop&&s&&(l.style.opacity=0),n&&this.isDesktop&&s&&(n.style.opacity=0),setTimeout((()=>{var s=window.innerHeight,a=0;if(this.isDesktop){var r=[],o=0,h=null,c=null,d=0,u=0,m=0;if(n&&(n.style.height="",a=n.scrollHeight+16),n&&this.isLarge?r.push(a):n&&this.isDesktop&&(d=a,u=a,m=a),l){l.style.height="";var p=l.getBoundingClientRect().top,v=t(".ecl-mega-menu__sublist",l);if(v){var g=v.children;g.length>0&&(Array.from(g).forEach((e=>{d+=e.getBoundingClientRect().height})),r.push(d))}else{if(i.classList.contains("ecl-mega-menu__item--has-container")){var b=t(".ecl-mega-menu__mega-container",i);if(b)return b.firstElementChild.style.height=s-p+"px",void(l.style.opacity=1)}}}var f=t(".ecl-mega-menu__subitem--expanded",i);if(f&&(h=t(".ecl-mega-menu__mega--level-2",f))){h.style.height="";var y=e(""+this.subItemSelector,h);y.length>0&&y.forEach((e=>{u+=e.getBoundingClientRect().height})),r.push(u),(c=t(".ecl-mega-menu__featured",f))&&(Array.from(c.firstElementChild.children).forEach((e=>{var t=window.getComputedStyle(e),i=parseFloat(t.marginTop)+parseFloat(t.marginBottom);m+=e.offsetHeight+i})),r.push(m))}var L=Math.max(...r),E=this.inner.getBoundingClientRect().bottom,C=.7*(window.innerHeight-E);o=L>C?C:L;var w=t(".ecl-mega-menu__wrapper",i);w&&(w.style.height=o+"px"),l&&this.isLarge?l.style.height=o+"px":l&&n&&this.isDesktop&&(l.style.height=o-a+"px"),n&&this.isLarge&&(n.style.height=o+"px"),h&&this.isLarge?h.style.height=o+"px":h&&this.isDesktop&&(h.style.height=o-a+"px"),c&&this.isLarge?c.style.height=o+"px":c&&this.isDesktop&&(c.style.height=o-a+"px")}l&&this.isDesktop&&(l.style.opacity=1),n&&this.isDesktop&&(n.style.opacity=1)}),100)}positionMenuOverlay(){var e=0;this.isDesktop?setTimeout((()=>{var e=t(".ecl-site-header",document);if(e){var i=e.getBoundingClientRect().bottom,s=t(this.itemSelector,this.element).getBoundingClientRect().height;this.wrappers&&this.wrappers.forEach((e=>{e.style.top=s+"px"})),this.menuOverlay&&(this.menuOverlay.style.top=i+"px")}else{var n=this.element.getBoundingClientRect().bottom;this.menuOverlay&&(this.menuOverlay.style.top=n+"px")}}),0):setTimeout((()=>{if(this.header){var i=this.header.getBoundingClientRect(),s=Math.round(i.bottom);this.menuOverlay&&(this.menuOverlay.style.top=s+"px"),this.inner&&(this.inner.style.top=s+"px");var n=t(".ecl-mega-menu__item--expanded",this.element);if(n){var l=t(".ecl-mega-menu__sublist",n);if(l&&1===this.openPanel.num){var a=t(".ecl-mega-menu__info",n);if(a){var r=a.getBoundingClientRect().bottom;e=window.innerHeight-r-16,l.classList.add("ecl-mega-menu__sublist--scrollable"),l.style.height=e+"px"}}else l&&(l.classList.remove("ecl-mega-menu__sublist--scrollable"),l.style.height="")}if(2===this.openPanel.num){var o=t(".ecl-mega-menu__subitem--expanded",this.element);if(o){var h=t(".ecl-mega-menu__mega--level-2",o);if(h){var c=h.getBoundingClientRect().top;e=window.innerHeight-c,h.style.height=e+"px"}}}this.wrappers&&this.wrappers.forEach((e=>{e.style.top="",e.style.height=""}))}}),0)}handleKeyboard(i){var s=i.target,n=s.classList,l=this.element.getAttribute("aria-expanded");if("Escape"===i.key||"Esc"===i.key)return document.activeElement===s&&s.blur(),void("false"===l&&this.closeOpenDropdown());if(n.contains("ecl-mega-menu__info-link")&&("ArrowUp"===i.key&&(this.isDesktop?t(".ecl-mega-menu__item--expanded button",this.element).focus():this.back&&!this.isDesktop&&this.back.focus()),"ArrowDown"!==i.key&&"ArrowRight"!==i.key||s.parentElement.parentElement.nextSibling.firstChild.firstChild.firstChild.focus()),n.contains("ecl-mega-menu__parent-link")){if("ArrowUp"===i.key)return void t(".ecl-mega-menu__back",this.element).focus();if("ArrowDown"===i.key)return void i.target.nextSibling.firstElementChild.firstElementChild.firstChild.focus()}if(s.parentElement.classList.contains("ecl-mega-menu__see-all")&&("ArrowUp"===i.key&&s.parentElement.previousSibling.firstChild.focus(),"ArrowDown"===i.key)){var a=s.parentElement.parentElement.nextSibling;if(a){var r=e(["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),a);r.length>0&&r[0].focus()}}if(n.contains("ecl-mega-menu__back")){if("ArrowDown"===i.key){i.preventDefault();var o=t('[aria-expanded="true"]',s.parentElement.nextSibling);if(o){var h=t(".ecl-mega-menu__subitem--expanded",o.parentElement);if(h){var c=t(".ecl-mega-menu__parent-link",h);c&&c.focus()}else{var d=t(".ecl-mega-menu__info-link",o.parentElement);d?d.focus():t(".ecl-mega-menu__subitem:first-child .ecl-mega-menu__sublink",o.parentElement).focus()}}}"ArrowUp"===i.key&&this.open.focus()}if(n.contains("ecl-mega-menu__link")){if("ArrowLeft"===i.key||"ArrowUp"===i.key){i.preventDefault();var u=s.previousSibling;if(u&&u.classList.contains("ecl-mega-menu__link"))return void u.focus();if(u=s.parentElement.previousSibling){var m=t(".ecl-mega-menu__link",u);if(m)return void m.focus()}}if("ArrowRight"===i.key||"ArrowDown"===i.key){if(i.preventDefault(),"true"===s.parentElement.getAttribute("aria-expanded")&&"ArrowDown"===i.key){var p=t(".ecl-mega-menu__info-link",s.parentElement);if(p)return void p.focus()}var v=s.parentElement.nextSibling;if(v){var g=t(".ecl-mega-menu__link",v);if(g)return void g.focus()}}}if(n.contains("ecl-mega-menu__sublink")){if("ArrowDown"===i.key){i.preventDefault();var b=s.parentElement.nextSibling,f="";if(b&&(!(f=t(".ecl-mega-menu__sublink",b))&&b.classList.contains("ecl-mega-menu__spacer")&&(f=b.nextSibling.firstElementChild),f))return void f.focus()}if("ArrowUp"===i.key){i.preventDefault();var y=s.parentElement.previousSibling;if(y){var L=t(".ecl-mega-menu__sublink",y);L&&L.focus()}else{var E=t(".ecl-mega-menu__info-link",s.parentElement.parentElement.parentElement.previousSibling);if(E)E.focus();else if(2===this.openPanel.num){var C=i.target.closest(".ecl-mega-menu__mega").previousSibling;C&&C.focus()}else this.back&&this.back.focus()}}}"ArrowRight"===i.key&&("true"===s.parentElement.getAttribute("aria-expanded")&&(i.preventDefault(),s.nextSibling.firstElementChild.firstChild.firstChild.focus()))}handleKeyboardGlobal(e){"Escape"!==e.key&&"Esc"!==e.key||this.isOpen&&this.closeOpenDropdown(!0)}handleClickOnOpen(e){if(this.isOpen)this.handleClickOnClose(e);else{e.preventDefault(),this.disableScroll(),this.element.setAttribute("aria-expanded","true"),this.element.classList.add("ecl-mega-menu--start-panel"),this.element.classList.remove("ecl-mega-menu--one-panel","ecl-mega-menu--two-panels"),this.open.setAttribute("aria-expanded","true"),this.inner.setAttribute("aria-hidden","false"),this.isOpen=!0,this.header&&this.header.classList.add("ecl-site-header--open-menu","ecl-site-header--open-menu-start");var t=this.element.getAttribute(this.labelCloseAttribute);this.toggleLabel&&t&&(this.toggleLabel.innerHTML=t),this.positionMenuOverlay(),this.links.length>0&&this.links[0].focus(),this.trigger("onOpen",e)}}handleClickOnClose(e){"true"===this.element.getAttribute("aria-expanded")?(this.focusTrap.deactivate(),this.closeOpenDropdown(),this.trigger("onClose",e)):this.handleClickOnOpen(e)}handleClickOnToggle(e){e.preventDefault(),this.isOpen?this.handleClickOnClose(e):this.handleClickOnOpen(e)}handleClickOnBack(){e(".ecl-mega-menu__info",this.element).forEach((e=>{e.style.top=""}));var i=t(".ecl-mega-menu__subitem--expanded",this.element);if(i){this.element.classList.remove("ecl-mega-menu--two-panels","ecl-mega-menu--start-panel"),this.element.classList.add("ecl-mega-menu--one-panel"),i.setAttribute("aria-expanded","false"),i.classList.remove("ecl-mega-menu__subitem--expanded","ecl-mega-menu__subitem--current");var s=t(this.subLinkSelector,i);s.setAttribute("aria-expanded","false"),s.classList.remove("ecl-mega-menu__parent-link");var n=i.parentElement.childNodes;n&&n.forEach((e=>{e.style.display=""})),this.header&&this.header.classList.remove("ecl-site-header--open-menu-start"),this.backItemLevel2&&this.backItemLevel2.firstElementChild.focus(),this.openPanel.num=1}else this.header&&(this.headerBanner&&(this.headerBanner.style.display="flex"),this.headerNotification&&(this.headerNotification.style.display="flex")),this.inner.classList.remove("ecl-mega-menu__inner--expanded"),this.element.classList.remove("ecl-mega-menu--one-panel"),this.items.forEach((e=>{e.classList.remove("ecl-mega-menu__item--expanded","ecl-mega-menu__item--current"),t(this.linkSelector,e).setAttribute("aria-expanded","false")})),this.backItemLevel1?this.backItemLevel1.firstElementChild.focus():this.items[0].firstElementChild.focus(),this.openPanel.num=0,this.header&&this.header.classList.add("ecl-site-header--open-menu-start"),this.positionMenuOverlay();this.trigger("onBack",{level:i?2:1})}handleFirstPanel(e,i){switch(i){case"expand":this.inner.classList.add("ecl-mega-menu__inner--expanded"),this.positionMenuOverlay(),this.checkDropdownHeight(e),this.element.setAttribute("data-expanded",!0),this.element.setAttribute("aria-expanded","true"),this.element.classList.add("ecl-mega-menu--one-panel"),this.element.classList.remove("ecl-mega-menu--start-panel"),this.open.setAttribute("aria-expanded","true"),this.header&&(this.header.classList.add("ecl-site-header--open-menu"),this.header.classList.remove("ecl-site-header--open-menu-start"),this.isDesktop||(this.headerBanner&&(this.headerBanner.style.display="none"),this.headerNotification&&(this.headerNotification.style.display="none"))),this.disableScroll(),this.isOpen=!0,this.items.forEach((i=>{var s=t(this.linkSelector,i);s&&s.hasAttribute("aria-expanded")&&(i===e?(i.classList.add("ecl-mega-menu__item--expanded","ecl-mega-menu__item--current"),s.setAttribute("aria-expanded","true"),this.backItemLevel1=i):(s.setAttribute("aria-expanded","false"),i.classList.remove("ecl-mega-menu__item--current","ecl-mega-menu__item--expanded")))})),!this.isDesktop&&this.back&&this.back.focus(),this.openPanel={num:1,item:e};var s={panel:1,item:e};if(this.trigger("OnOpenPanel",s),this.isDesktop){var n=t(".ecl-mega-menu__sublist",e);if(n){var l=Array.from(n.children).find((e=>{var t;return null==(t=e.firstElementChild)?void 0:t.hasAttribute("aria-expanded")}));l&&this.handleSecondPanel(l,"expand",!0)}}break;case"collapse":this.closeOpenDropdown()}}handleSecondPanel(e,i,s){void 0===s&&(s=!1);var n,l=t(".ecl-mega-menu__info",e.closest(".ecl-container"));switch(i){case"expand":this.element.classList.remove("ecl-mega-menu--one-panel","ecl-mega-menu--start-panel"),this.element.classList.add("ecl-mega-menu--two-panels"),this.subItems.forEach((i=>{var s=t(this.subLinkSelector,i);i===e?(s&&s.hasAttribute("aria-expanded")&&(s.setAttribute("aria-expanded","true"),this.isDesktop||(s.classList.add("ecl-mega-menu__parent-link"),this.back&&this.back.focus()),i.classList.add("ecl-mega-menu__subitem--expanded")),i.classList.add("ecl-mega-menu__subitem--current"),this.backItemLevel2=i):(s&&s.hasAttribute("aria-expanded")&&(s.setAttribute("aria-expanded","false"),s.classList.remove("ecl-mega-menu__parent-link"),i.classList.remove("ecl-mega-menu__subitem--expanded")),i.classList.remove("ecl-mega-menu__subitem--current"))})),this.openPanel={num:2,item:e},n=e.parentNode.childNodes,this.isDesktop?n.forEach((t=>{t!==e&&(t.style.display="")})):n.forEach((t=>{t!==e&&(t.style.display="none")})),this.positionMenuOverlay(),s||this.checkDropdownHeight(e.closest(".ecl-mega-menu__item"),!1);var a={panel:2,item:e};this.trigger("OnOpenPanel",a);break;case"collapse":this.element.classList.remove("ecl-mega-menu--two-panels"),this.openPanel={num:1},t(this.subLinkSelector,e).setAttribute("aria-expanded","false"),e.classList.remove("ecl-mega-menu__subitem--expanded","ecl-mega-menu__subitem--current"),l&&(l.style.top="")}}handleClickOnItem(e){var i=!1,s=e.target.closest("li"),n=t(".ecl-mega-menu__mega-container-scrollable",s);if(n&&(i=n.contains(e.target)),!e.target.classList.contains("ecl-mega-menu__mega-container-scrollable")&&!i){this.trigger("onItemClick",{item:s,event:e});var l=s.firstElementChild.getAttribute("aria-expanded");if(l&&s.classList.contains("ecl-mega-menu__item"))if(e.preventDefault(),e.stopPropagation(),this.isDesktop)"true"===l?this.handleFirstPanel(s,"collapse"):(this.closeOpenDropdown(),this.handleFirstPanel(s,"expand"));else this.handleFirstPanel(s,"expand")}}handleClickOnSubitem(e){var i=e.target.closest(this.subItemSelector);if(i&&i.firstElementChild.hasAttribute("aria-expanded")){if(t(".ecl-mega-menu__parent-link",i))return;e.preventDefault(),e.stopPropagation(),"true"===i.firstElementChild.getAttribute("aria-expanded")?this.handleSecondPanel(i,"collapse"):this.handleSecondPanel(i,"expand")}}closeOpenDropdown(i){void 0===i&&(i=!1),this.header&&(this.header.classList.remove("ecl-site-header--open-menu","ecl-site-header--open-menu-start"),this.headerBanner&&(this.headerBanner.style.display="flex"),this.headerNotification&&(this.headerNotification.style.display="flex")),this.enableScroll(),this.element.setAttribute("aria-expanded","false"),this.element.removeAttribute("data-expanded"),this.element.classList.remove("ecl-mega-menu--start-panel","ecl-mega-menu--two-panels","ecl-mega-menu--one-panel"),this.open.setAttribute("aria-expanded","false"),this.inner.classList.remove("ecl-mega-menu__inner--expanded"),e("[data-ecl-mega-menu-mega]",this.element).forEach((e=>{e.style.height="",e.style.top="",e.style.opacity=""})),this.wrappers&&this.wrappers.forEach((e=>{e.style=""}));var s=!1;this.items.forEach((e=>{e.classList.remove("ecl-mega-menu__item--current");var i=t(this.linkSelector,e);"true"===i.getAttribute("aria-expanded")&&(e.classList.remove("ecl-mega-menu__item--expanded"),i.setAttribute("aria-expanded","false"),s=i)})),this.subItems.forEach((e=>{e.classList.remove("ecl-mega-menu__subitem--current"),e.style.display="";var i=t(this.subLinkSelector,e);i&&i.hasAttribute("aria-expanded")&&(e.classList.remove("ecl-mega-menu__subitem--expanded"),e.style.display="",i.setAttribute("aria-expanded","false"),i.classList.remove("ecl-mega-menu__parent-link"))}));var n=e(".ecl-mega-menu__sublist");n&&n.forEach((e=>{e.classList.remove("ecl-mega-menu__sublist--no-border",".ecl-mega-menu__sublist--scrollable")}));var l=this.element.getAttribute(this.labelOpenAttribute);this.toggleLabel&&l&&(this.toggleLabel.innerHTML=l),this.openPanel={num:0,item:!1},this.focusTrap.deactivate(),!this.isDesktop&&this.open&&i?this.open.focus():this.isDesktop&&s&&i&&s.focus(),this.trigger("onFocusTrapToggle",{active:!1}),this.isOpen=!1}handleFocusOut(e){var t=e.target;if("true"===this.element.getAttribute("aria-expanded")&&!this.isDesktop&&!t.parentElement.nextSibling){var i=e.relatedTarget;this.element.contains(i)||(this.focusTrap.activate(),this.trigger("onFocusTrapToggle",{active:!0,lastFocusedEl:t.parentElement}))}}handleClickGlobal(e){e.target.classList.contains("ecl-mega-menu__mega-container-scrollable")||!e.target.classList.contains("ecl-mega-menu__overlay")&&this.element.contains(e.target)||!this.isOpen||this.closeOpenDropdown()}}class Ae{static autoInit(e,t){var i=(void 0===t?{}:t).MENU,s=new Ae(e,void 0===i?{}:i);return s.init(),e.ECLMenu=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.openSelector,l=void 0===n?"[data-ecl-menu-open]":n,a=s.closeSelector,r=void 0===a?"[data-ecl-menu-close]":a,o=s.backSelector,h=void 0===o?"[data-ecl-menu-back]":o,c=s.innerSelector,d=void 0===c?"[data-ecl-menu-inner]":c,u=s.listSelector,m=void 0===u?"[data-ecl-menu-list]":u,p=s.itemSelector,v=void 0===p?"[data-ecl-menu-item]":p,g=s.linkSelector,b=void 0===g?"[data-ecl-menu-link]":g,f=s.buttonPreviousSelector,y=void 0===f?"[data-ecl-menu-items-previous]":f,L=s.buttonNextSelector,E=void 0===L?"[data-ecl-menu-items-next]":L,C=s.caretSelector,w=void 0===C?"[data-ecl-menu-caret]":C,k=s.megaSelector,S=void 0===k?"[data-ecl-menu-mega]":k,x=s.subItemSelector,A=void 0===x?"[data-ecl-menu-subitem]":x,_=s.maxLines,O=void 0===_?2:_,T=s.maxLinesAttribute,P=void 0===T?"data-ecl-menu-max-lines":T,I=s.labelOpenAttribute,N=void 0===I?"data-ecl-menu-label-open":I,M=s.labelCloseAttribute,D=void 0===M?"data-ecl-menu-label-close":M,R=s.attachClickListener,B=void 0===R||R,z=s.attachTouchListener,F=void 0===z||z,H=s.attachHoverListener,K=void 0===H||H,V=s.attachFocusListener,G=void 0===V||V,W=s.attachKeyListener,U=void 0===W||W,j=s.attachResizeListener,q=void 0===j||j,Y=s.onCloseCallback,X=void 0===Y?null:Y,$=s.onOpenCallback,Q=void 0===$?null:$;if(this.supportedEvents=["onOpen","onClose"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.openSelector=l,this.closeSelector=r,this.backSelector=h,this.innerSelector=d,this.listSelector=m,this.itemSelector=v,this.linkSelector=b,this.buttonPreviousSelector=y,this.buttonNextSelector=E,this.caretSelector=w,this.megaSelector=S,this.subItemSelector=A,this.maxLines=O,this.maxLinesAttribute=P,this.labelOpenAttribute=N,this.labelCloseAttribute=D,this.attachClickListener=B,this.attachTouchListener=F,this.attachHoverListener=K,this.attachFocusListener=G,this.attachKeyListener=U,this.attachResizeListener=q,this.onOpenCallback=Q,this.onCloseCallback=X,this.direction="ltr",this.open=null,this.close=null,this.toggleLabel=null,this.back=null,this.backItem=null,this.inner=null,this.itemsList=null,this.items=null,this.links=null,this.btnPrevious=null,this.btnNext=null,this.isOpen=!1,this.resizeTimer=null,this.isKeyEvent=!1,this.isDesktop=!1,this.hasOverflow=!1,this.offsetLeft=0,this.lastVisibleItem=null,this.currentItem=null,this.totalItemsWidth=0,this.breakpointL=996,this.windowWidth=null,this.ignorehover=!1,this.handleClickOnOpen=this.handleClickOnOpen.bind(this),this.handleClickOnClose=this.handleClickOnClose.bind(this),this.handleClickOnToggle=this.handleClickOnToggle.bind(this),this.handleClickOnBack=this.handleClickOnBack.bind(this),this.handleClickOnNextItems=this.handleClickOnNextItems.bind(this),this.handleClickOnPreviousItems=this.handleClickOnPreviousItems.bind(this),this.handleClickOnCaret=this.handleClickOnCaret.bind(this),this.handleClickGlobal=this.handleClickGlobal.bind(this),this.openItem=this.openItem.bind(this),this.closeItem=this.closeItem.bind(this),this.handleTouchOnCaret=this.handleTouchOnCaret.bind(this),this.handleHoverOnItem=this.handleHoverOnItem.bind(this),this.handleHoverOffItem=this.handleHoverOffItem.bind(this),this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyboard=this.handleKeyboard.bind(this),this.handleKeyboardGlobal=this.handleKeyboardGlobal.bind(this),this.handleResize=this.handleResize.bind(this),this.useDesktopDisplay=this.useDesktopDisplay.bind(this),this.checkMenuOverflow=this.checkMenuOverflow.bind(this),this.checkMenuItem=this.checkMenuItem.bind(this),this.checkMegaMenu=this.checkMegaMenu.bind(this),this.closeOpenDropdown=this.closeOpenDropdown.bind(this),this.positionMenuOverlay=this.positionMenuOverlay.bind(this),this.disableScroll=this.disableScroll.bind(this),this.enableScroll=this.enableScroll.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.direction=getComputedStyle(this.element).direction,this.open=t(this.openSelector,this.element),this.close=t(this.closeSelector,this.element),this.toggleLabel=t(".ecl-button__label",this.open),this.back=t(this.backSelector,this.element),this.inner=t(this.innerSelector,this.element),this.itemsList=t(this.listSelector,this.element),this.btnPrevious=t(this.buttonPreviousSelector,this.element),this.btnNext=t(this.buttonNextSelector,this.element),this.items=e(this.itemSelector,this.element),this.subItems=e(this.subItemSelector,this.element),this.links=e(this.linkSelector,this.element),this.carets=e(this.caretSelector,this.element);var i=this.element.getAttribute(this.maxLinesAttribute);i&&(this.maxLines=i),this.isDesktop=this.useDesktopDisplay(),this.attachClickListener&&(this.open&&this.open.addEventListener("click",this.handleClickOnToggle),this.close&&this.close.addEventListener("click",this.handleClickOnClose),this.back&&this.back.addEventListener("click",this.handleClickOnBack),this.btnPrevious&&this.btnPrevious.addEventListener("click",this.handleClickOnPreviousItems),this.btnNext&&this.btnNext.addEventListener("click",this.handleClickOnNextItems),this.attachClickListener&&document.addEventListener("click",this.handleClickGlobal)),this.links&&this.links.forEach((e=>{this.attachFocusListener&&(e.addEventListener("focusin",this.closeOpenDropdown),e.addEventListener("focusin",this.handleFocusIn)),this.attachKeyListener&&e.addEventListener("keyup",this.handleKeyboard)})),this.carets&&this.carets.forEach((e=>{this.attachFocusListener&&e.addEventListener("focusin",this.handleFocusIn),this.attachKeyListener&&e.addEventListener("keyup",this.handleKeyboard),this.attachClickListener&&e.addEventListener("click",this.handleClickOnCaret),e.parentElement.hasAttribute("data-ecl-has-children")&&this.attachTouchListener&&e.addEventListener("touchstart",this.handleTouchOnCaret)})),this.subItems&&this.subItems.forEach((e=>{var i=t(".ecl-menu__sublink",e);this.attachKeyListener&&i&&i.addEventListener("keyup",this.handleKeyboard)})),this.attachKeyListener&&document.addEventListener("keyup",this.handleKeyboardGlobal),this.attachResizeListener&&(this.windowWidth=window.innerWidth,window.addEventListener("resize",this.handleResize)),this.items&&this.items.forEach((e=>{this.checkMenuItem(e),this.totalItemsWidth+=e.offsetWidth,e.hasAttribute("data-ecl-has-children")&&this.attachHoverListener&&(e.addEventListener("mouseover",this.handleHoverOnItem),e.addEventListener("mouseout",this.handleHoverOffItem))})),this.positionMenuOverlay(),this.checkMenuOverflow(),this.currentItem&&("false"===this.currentItem.getAttribute("data-ecl-menu-item-visible")?this.btnNext.classList.add("ecl-menu__item--current"):this.btnPrevious.classList.add("ecl-menu__item--current")),this.focusTrap=le(this.element,{onActivate:()=>this.element.classList.add("trap-is-active"),onDeactivate:()=>this.element.classList.remove("trap-is-active")}),"rtl"===this.direction&&this.element.classList.add("ecl-menu--rtl"),setTimeout((()=>{this.element.classList.add("ecl-menu--transition")}),500),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachClickListener&&(this.open&&this.open.removeEventListener("click",this.handleClickOnToggle),this.close&&this.close.removeEventListener("click",this.handleClickOnClose),this.back&&this.back.removeEventListener("click",this.handleClickOnBack),this.btnPrevious&&this.btnPrevious.removeEventListener("click",this.handleClickOnPreviousItems),this.btnNext&&this.btnNext.removeEventListener("click",this.handleClickOnNextItems),this.attachClickListener&&document.removeEventListener("click",this.handleClickGlobal)),this.attachKeyListener&&this.carets&&this.carets.forEach((e=>{e.removeEventListener("keyup",this.handleKeyboard)})),this.items&&this.isDesktop&&this.items.forEach((e=>{e.hasAttribute("data-ecl-has-children")&&this.attachHoverListener&&(e.removeEventListener("mouseover",this.handleHoverOnItem),e.removeEventListener("mouseout",this.handleHoverOffItem))})),this.links&&this.links.forEach((e=>{this.attachFocusListener&&(e.removeEventListener("focusin",this.closeOpenDropdown),e.removeEventListener("focusin",this.handleFocusIn)),this.attachKeyListener&&e.removeEventListener("keyup",this.handleKeyboard)})),this.carets&&this.carets.forEach((e=>{this.attachFocusListener&&e.removeEventListener("focusin",this.handleFocusIn),this.attachKeyListener&&e.removeEventListener("keyup",this.handleKeyboard),this.attachClickListener&&e.removeEventListener("click",this.handleClickOnCaret)})),this.subItems&&this.subItems.forEach((e=>{var i=t(".ecl-menu__sublink",e);this.attachKeyListener&&i&&i.removeEventListener("keyup",this.handleKeyboard)})),this.attachKeyListener&&document.removeEventListener("keyup",this.handleKeyboardGlobal),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}disableScroll(){document.body.classList.add("no-scroll")}enableScroll(){document.body.classList.remove("no-scroll")}useDesktopDisplay(){return!Se.isMobileOnly&&(Se.isTablet?(this.element.classList.add("ecl-menu--forced-mobile"),!1):!(window.innerWidth<this.breakpointL)&&(this.element.classList.remove("ecl-menu--forced-mobile"),!0))}handleResize(){window.innerWidth!==this.windowWidth&&(document.documentElement.scrollTop=0,document.body.scrollTop=0,this.element.classList.remove("ecl-menu--transition"),"rtl"===this.direction?this.element.classList.add("ecl-menu--rtl"):this.element.classList.remove("ecl-menu--rtl"),clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{this.element.classList.remove("ecl-menu--forced-mobile"),this.isDesktop=this.useDesktopDisplay(),this.isDesktop&&this.focusTrap.deactivate(),this.totalItemsWidth=0,this.items&&this.items.forEach((e=>{this.checkMenuItem(e),this.totalItemsWidth+=e.offsetWidth})),this.checkMenuOverflow(),this.positionMenuOverlay(),this.element.classList.add("ecl-menu--transition"),this.windowWidth=window.innerWidth}),200))}positionMenuOverlay(){var e=t(".ecl-menu__overlay",this.element);this.isDesktop?(this.enableScroll(),this.inner&&(this.inner.style.top=""),e&&(e.style.top="")):(this.isOpen&&this.disableScroll(),setTimeout((()=>{var i=t(".ecl-site-header__header",document);if(i){var s=i.getBoundingClientRect(),n=Math.round(s.bottom);e&&(e.style.top=n+"px"),this.inner&&(this.inner.style.top=n+"px")}}),500))}checkMenuOverflow(){if(this.itemsList||(this.itemsList=t(".ecl-menu__list",this.element)),this.itemsList&&this.inner&&this.btnNext&&this.btnPrevious&&this.items){if(this.hasOverflow=this.totalItemsWidth>this.inner.offsetWidth+16,!this.hasOverflow||!this.isDesktop)return this.btnPrevious&&(this.btnPrevious.style.display="none"),this.btnNext&&(this.btnNext.style.display="none"),this.itemsList&&(this.itemsList.style.left="0"),this.inner&&this.inner.classList.remove("ecl-menu__inner--has-overflow"),this.offsetLeft=0,this.totalItemsWidth=0,void(this.lastVisibleItem=null);this.inner&&this.inner.classList.add("ecl-menu__inner--has-overflow"),this.items&&this.items.forEach((e=>{e.removeAttribute("data-ecl-menu-item-visible")})),0===this.offsetLeft?(this.btnNext.style.display="flex","rtl"===this.direction?this.items.every((e=>e.getBoundingClientRect().left<this.itemsList.getBoundingClientRect().left?(this.lastVisibleItem=e,!1):(e.setAttribute("data-ecl-menu-item-visible",!0),!0))):this.items.every((e=>e.getBoundingClientRect().right>this.itemsList.getBoundingClientRect().right?(this.lastVisibleItem=e,!1):(e.setAttribute("data-ecl-menu-item-visible",!0),!0)))):"rtl"===this.direction?this.items.forEach((e=>{e.getBoundingClientRect().right<=this.inner.getBoundingClientRect().right&&e.setAttribute("data-ecl-menu-item-visible",!0)})):this.items.forEach((e=>{e.getBoundingClientRect().left>=this.inner.getBoundingClientRect().left&&e.setAttribute("data-ecl-menu-item-visible",!0)}))}}checkMenuItem(e){var i=t(this.linkSelector,e);if(e.classList.contains("ecl-menu__item--current")&&(this.currentItem=e),this.isDesktop){if(!(this.maxLines<1)){e.style.alignItems="flex-start";for(var s=i.offsetWidth,n=window.getComputedStyle(i),l=parseInt(n.lineHeight,10)*this.maxLines+parseInt(n.paddingTop,10)+parseInt(n.paddingBottom,10);i.offsetHeight>l&&(i.style.width=(s+=1)+"px",!(s>1e3)););e.style.alignItems="unset"}}else i.style.width="auto"}checkMegaMenu(i){var s=t(this.megaSelector,i);if(s&&this.inner){var n=e(this.subItemSelector,s);if(n.length<5)i.classList.add("ecl-menu__item--col1");else if(n.length<9)i.classList.add("ecl-menu__item--col2");else{if(!(n.length<13))return i.classList.add("ecl-menu__item--full"),void("rtl"===this.direction?s.style.right=this.offsetLeft+"px":s.style.left=this.offsetLeft+"px");i.classList.add("ecl-menu__item--col3")}var l=s.getBoundingClientRect(),a=this.inner.getBoundingClientRect(),r=i.getBoundingClientRect(),o=l.width,h=a.width;r.left-a.left+o>h?s.classList.add("ecl-menu__mega--rtl"):s.classList.remove("ecl-menu__mega--rtl")}}handleKeyboard(e){var i=e.target,s=i.classList,n=this.element.getAttribute("aria-expanded"),l=i.closest(this.itemSelector);if("Escape"!==e.key&&"Esc"!==e.key){if(s.contains("ecl-menu__button-caret")&&"false"===n&&"ArrowDown"===e.key){e.preventDefault();var a=t(".ecl-menu__sublink:first-of-type",l);if(a)return this.handleHoverOnItem(e),void a.focus()}if(s.contains("ecl-menu__link")||s.contains("ecl-menu__button-caret")){if("ArrowLeft"===e.key||"ArrowUp"===e.key){e.preventDefault();var r=i.previousSibling;if(r&&r.classList.contains("ecl-menu__link"))return void r.focus();if(r=i.parentElement.previousSibling){var o=r.classList.contains("ecl-menu__item--has-children")?".ecl-menu__button-caret":".ecl-menu__link",h=t(o,r);if(h)return void h.focus()}}if("ArrowRight"===e.key||"ArrowDown"===e.key){e.preventDefault();var c=i.nextSibling;if(c&&c.classList.contains("ecl-menu__button-caret"))return void c.focus();if(c=i.parentElement.nextSibling){var d=t(".ecl-menu__link",c);d&&d.focus()}}}if(s.contains("ecl-menu__sublink")){if("ArrowDown"===e.key){var u=i.parentElement.nextSibling;if(u){var m=t(".ecl-menu__sublink",u);if(m)return void m.focus()}}if("ArrowUp"===e.key){var p=i.parentElement.previousSibling;if(p){var v=t(".ecl-menu__sublink",p);v&&v.focus()}else{var g=t(this.itemSelector+'[aria-expanded="true"] '+this.caretSelector,this.element);g&&g.focus()}}}}else if(document.activeElement===i&&i.blur(),"false"===n){var b=t(".ecl-menu__button-caret",l);b&&b.focus(),this.closeOpenDropdown()}}handleKeyboardGlobal(e){var t=this.element.getAttribute("aria-expanded");"Escape"!==e.key&&"Esc"!==e.key||("true"===t&&this.handleClickOnClose(),this.items.forEach((e=>{e.setAttribute("aria-expanded","false")})),this.carets.forEach((e=>{e.setAttribute("aria-expanded","false")})))}handleClickOnOpen(e){e.preventDefault(),this.element.setAttribute("aria-expanded","true"),this.inner.setAttribute("aria-hidden","false"),this.disableScroll(),this.open.setAttribute("aria-expanded","true"),this.isOpen=!0,this.focusTrap.activate();var t=this.element.getAttribute(this.labelCloseAttribute);return this.toggleLabel&&t&&(this.toggleLabel.innerHTML=t),this.links.length>0&&this.links[0].focus(),this.trigger("onOpen",e),this}handleClickOnClose(e){this.element.setAttribute("aria-expanded","false"),this.inner.classList.remove("ecl-menu__inner--expanded"),this.inner.setAttribute("aria-hidden","true"),this.open.setAttribute("aria-expanded","false"),this.items.forEach((e=>{e.classList.remove("ecl-menu__item--expanded"),e.setAttribute("aria-expanded","false")}));var t=this.element.getAttribute(this.labelOpenAttribute);return this.toggleLabel&&t&&(this.toggleLabel.innerHTML=t),this.enableScroll(),this.focusTrap.deactivate(),this.isOpen=!1,this.trigger("onClose",e),this}handleClickOnToggle(e){e.preventDefault(),this.isOpen?this.handleClickOnClose(e):this.handleClickOnOpen(e)}handleClickOnBack(){if(this.inner.classList.remove("ecl-menu__inner--expanded"),this.items.forEach((e=>{e.classList.remove("ecl-menu__item--expanded"),e.setAttribute("aria-expanded","false")})),this.backItem){var e=t(this.caretSelector,this.backItem);e&&e.focus()}return this}handleClickOnPreviousItems(){this.itemsList&&this.btnNext&&(this.offsetLeft=0,"rtl"===this.direction?(this.itemsList.style.right="0",this.itemsList.style.left="auto"):(this.itemsList.style.left="0",this.itemsList.style.right="auto"),this.btnPrevious.style.display="none",this.btnNext.style.display="flex",this.items&&this.items.forEach((e=>{this.checkMenuItem(e),e.toggleAttribute("data-ecl-menu-item-visible")})))}handleClickOnNextItems(){this.itemsList&&this.items&&this.btnPrevious&&this.lastVisibleItem&&(this.btnPrevious.style.display="flex",this.btnNext.style.display="none","rtl"===this.direction?(this.offsetLeft=this.itemsList.getBoundingClientRect().right-this.lastVisibleItem.getBoundingClientRect().right-this.btnPrevious.offsetWidth,this.itemsList.style.right="-"+this.offsetLeft+"px",this.itemsList.style.left="auto"):(this.offsetLeft=this.lastVisibleItem.getBoundingClientRect().left-this.itemsList.getBoundingClientRect().left-this.btnPrevious.offsetWidth,this.itemsList.style.left="-"+this.offsetLeft+"px",this.itemsList.style.right="auto"),this.items&&this.items.forEach((e=>{this.checkMenuItem(e),e.toggleAttribute("data-ecl-menu-item-visible")})))}handleClickOnCaret(e){var i=this.element.getAttribute("aria-expanded"),s=e.target.closest(this.itemSelector);if("false"!==i){this.inner.classList.add("ecl-menu__inner--expanded"),this.items.forEach((e=>{e===s?(e.classList.add("ecl-menu__item--expanded"),e.setAttribute("aria-expanded","true"),this.backItem=e):(e.classList.remove("ecl-menu__item--expanded"),e.setAttribute("aria-expanded","false"))})),this.checkMegaMenu(s);var n=t(".ecl-menu__subitem:first-of-type .ecl-menu__sublink",s);n&&n.focus(),this.ignorehover=!1}else"true"===s.getAttribute("aria-expanded")?this.closeItem(e):this.openItem(e)}openItem(e){var i=e.target.closest(this.itemSelector);this.hasOverflow&&!i.hasAttribute("data-ecl-menu-item-visible")||(this.items.forEach((e=>{var s=t(this.caretSelector,e);e===i?(e.setAttribute("aria-expanded","true"),s&&s.setAttribute("aria-expanded","true")):(e.setAttribute("aria-expanded","false"),s&&(s.setAttribute("aria-expanded","false"),s.blur()))})),this.checkMegaMenu(i))}closeItem(e){var i=e.target.closest(this.itemSelector);i.setAttribute("aria-expanded","false");var s=t(this.caretSelector,i);return s&&s.setAttribute("aria-expanded","false"),this}handleTouchOnCaret(){this.ignorehover=!0}handleHoverOnItem(e){this.ignorehover||this.openItem(e)}handleHoverOffItem(e){this.ignorehover||this.closeItem(e)}closeOpenDropdown(){var e=t(this.itemSelector+"[aria-expanded='true']",this.element);if(e){e.setAttribute("aria-expanded","false");var i=t(this.caretSelector,e);i&&i.setAttribute("aria-expanded","false")}}handleFocusIn(e){var t=e.target;this.isDesktop&&this.hasOverflow&&(t.closest("[data-ecl-menu-item]").hasAttribute("data-ecl-menu-item-visible")||(0===this.offsetLeft?this.handleClickOnNextItems():this.handleClickOnPreviousItems()))}handleClickGlobal(e){this.isOpen&&(this.inner.contains(e.target)||this.open.contains(e.target)||this.handleClickOnClose(e))}}class _e{static autoInit(e,t){var i=(void 0===t?{}:t).MODAL,s=new _e(e,void 0===i?{}:i);return s.init(),e.ECLModal=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.toggleSelector,n=void 0===s?"":s,l=i.closeSelector,a=void 0===l?"[data-ecl-modal-close]":l,r=i.scrollSelector,o=void 0===r?"[data-ecl-modal-scroll]":r,h=i.attachClickListener,c=void 0===h||h,d=i.attachKeyListener,u=void 0===d||d;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.toggleSelector=n,this.closeSelector=a,this.scrollSelector=o,this.attachClickListener=c,this.attachKeyListener=u,this.toggle=null,this.close=null,this.scroll=null,this.focusTrap=null,this.openModal=this.openModal.bind(this),this.closeModal=this.closeModal.bind(this),this.handleClickOnToggle=this.handleClickOnToggle.bind(this),this.handleKeyboardGlobal=this.handleKeyboardGlobal.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.attachKeyListener&&document.addEventListener("keyup",this.handleKeyboardGlobal),""===this.toggleSelector&&(this.toggleSelector="#"+this.element.getAttribute("data-ecl-modal-toggle")),this.toggle=document.querySelector(this.toggleSelector),this.toggle&&(this.toggle.setAttribute("aria-controls",this.element.id),this.toggle.getAttribute("aria-haspopup")||this.toggle.setAttribute("aria-haspopup","dialog")),this.close=e(this.closeSelector,this.element),this.scroll=t(this.scrollSelector,this.element),this.focusTrap=le(this.element),this.isDialogSupported=!0,window.HTMLDialogElement||(this.isDialogSupported=!1),this.toggle&&this.attachClickListener&&this.toggle.addEventListener("click",this.handleClickOnToggle),this.close&&this.attachClickListener&&this.close.forEach((e=>{e.addEventListener("click",this.closeModal)})),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.toggle&&this.attachClickListener&&this.toggle.removeEventListener("click",this.handleClickOnToggle),this.attachKeyListener&&document.removeEventListener("keyup",this.handleKeyboardGlobal),this.close&&this.attachClickListener&&this.close.forEach((e=>{e.removeEventListener("click",this.closeModal)})),this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element)}checkScroll(){this.scroll&&(this.scroll.parentNode.classList.remove("ecl-modal__body--has-scroll"),this.scroll.scrollHeight>this.scroll.clientHeight&&this.scroll.parentNode.classList.add("ecl-modal__body--has-scroll"))}handleClickOnToggle(e){e.preventDefault(),"true"===this.toggle.getAttribute("aria-expanded")?this.closeModal():this.openModal()}openModal(){this.isDialogSupported?this.element.showModal():this.element.setAttribute("open",""),this.checkScroll(),this.focusTrap.activate()}closeModal(){this.isDialogSupported?this.element.close():this.element.removeAttribute("open"),this.focusTrap.active&&this.focusTrap.deactivate()}handleKeyboardGlobal(e){"Escape"!==e.key&&"Esc"!==e.key||this.closeModal()}}class Oe{static autoInit(e,t){var i=(void 0===t?{}:t).NEWS_TICKER,s=new Oe(e,void 0===i?{}:i);return s.init(),e.ECLNewsTicker=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.playSelector,n=void 0===s?"[data-ecl-news-ticker-play]":s,l=i.pauseSelector,a=void 0===l?"[data-ecl-news-ticker-pause]":l,r=i.prevSelector,o=void 0===r?"[data-ecl-news-ticker-prev]":r,h=i.nextSelector,c=void 0===h?"[data-ecl-news-ticker-next]":h,d=i.containerClass,u=void 0===d?".ecl-news-ticker__container":d,m=i.contentClass,p=void 0===m?".ecl-news-ticker__content":m,v=i.slidesClass,g=void 0===v?".ecl-news-ticker__slides":v,b=i.slideClass,f=void 0===b?".ecl-news-ticker__slide":b,y=i.currentSlideClass,L=void 0===y?".ecl-news-ticker__counter--current":y,E=i.controlsClass,C=void 0===E?".ecl-news-ticker__controls":E,w=i.attachClickListener,k=void 0===w||w,S=i.attachResizeListener,x=void 0===S||S;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.playSelector=n,this.pauseSelector=a,this.prevSelector=o,this.nextSelector=c,this.containerClass=u,this.contentClass=p,this.slidesClass=g,this.slideClass=f,this.currentSlideClass=L,this.controlsClass=C,this.attachClickListener=k,this.attachResizeListener=x,this.container=null,this.content=null,this.slides=null,this.btnPlay=null,this.btnPause=null,this.btnPrev=null,this.btnNext=null,this.index=1,this.total=0,this.allowShift=!0,this.autoPlay=null,this.autoPlayInterval=null,this.hoverAutoPlay=null,this.resizeTimer=null,this.cloneFirstSLide=null,this.cloneLastSLide=null,this.resizeTimer=null,this.handleAutoPlay=this.handleAutoPlay.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.shiftSlide=this.shiftSlide.bind(this),this.checkIndex=this.checkIndex.bind(this),this.moveSlides=this.moveSlides.bind(this),this.handleResize=this.handleResize.bind(this),this.handleFocus=this.handleFocus.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.btnPlay=t(this.playSelector,this.element),this.btnPause=t(this.pauseSelector,this.element),this.btnPrev=t(this.prevSelector,this.element),this.btnNext=t(this.nextSelector,this.element),this.slidesContainer=t(this.slidesClass,this.element),this.container=t(this.containerClass,this.element),this.content=t(this.contentClass,this.element),this.controls=t(this.controlsClass,this.element),this.slides=e(this.slideClass,this.element),this.total=this.slides.length,this.total<=1&&this.controls)return this.content.style.height="auto",this.controls.style.display="none",!1;var i=this.slides[0],s=this.slides[this.slides.length-1];return this.cloneFirstSLide=i.cloneNode(!0),this.cloneLastSLide=s.cloneNode(!0),this.slidesContainer.appendChild(this.cloneFirstSLide),this.slidesContainer.insertBefore(this.cloneLastSLide,i),this.slides=e(this.slideClass,this.element),this.handleResize(),this.handleAutoPlay(),this.attachClickListener&&this.btnPlay&&this.btnPause&&(this.btnPlay.addEventListener("click",this.handleAutoPlay),this.btnPause.addEventListener("click",this.handleAutoPlay)),this.attachClickListener&&this.btnNext&&this.btnNext.addEventListener("click",this.shiftSlide.bind(this,1,!0)),this.attachClickListener&&this.btnPrev&&this.btnPrev.addEventListener("click",this.shiftSlide.bind(this,-1,!0)),this.slidesContainer&&(this.slidesContainer.addEventListener("transitionend",this.checkIndex),this.slidesContainer.addEventListener("mouseover",this.handleMouseOver),this.slidesContainer.addEventListener("mouseout",this.handleMouseOut)),this.container&&this.container.addEventListener("focus",this.handleFocus,!0),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this),this}destroy(){this.cloneFirstSLide&&this.cloneLastSLide&&(this.cloneFirstSLide.remove(),this.cloneLastSLide.remove()),this.btnPlay&&this.btnPlay.replaceWith(this.btnPlay.cloneNode(!0)),this.btnPause&&this.btnPause.replaceWith(this.btnPause.cloneNode(!0)),this.btnNext&&this.btnNext.replaceWith(this.btnNext.cloneNode(!0)),this.btnPrev&&this.btnPrev.replaceWith(this.btnPrev.cloneNode(!0)),this.slidesContainer&&(this.slidesContainer.removeEventListener("transitionend",this.checkIndex),this.slidesContainer.removeEventListener("mouseover",this.handleMouseOver),this.slidesContainer.removeEventListener("mouseout",this.handleMouseOut)),this.container&&this.container.removeEventListener("focus",this.handleFocus,!0),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.autoPlayInterval&&(clearInterval(this.autoPlayInterval),this.autoPlay=null),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}shiftSlide(e,t){this.allowShift&&(this.index=1===e?this.index+1:this.index-1,this.moveSlides(!0)),t&&this.autoPlay&&this.handleAutoPlay(),this.allowShift=!1}moveSlides(e){var t=this.slides[this.index].offsetTop,i=this.slides[this.index].offsetHeight;this.content.style.height=i+"px",this.slidesContainer.style.transitionDuration=e?"0.4s":"1ms",this.slidesContainer.style.transform="translate3d(0px, -"+t+"px, 0px)"}checkIndex(){0===this.index&&(this.index=this.total,this.moveSlides(!1)),this.index===this.total+1&&(this.index=1,this.moveSlides(!1)),t(this.currentSlideClass,this.element).textContent=this.index,this.slides&&this.slides.forEach(((e,i)=>{var s=t(".ecl-link",e);this.index===i?(e.removeAttribute("inert","true"),s&&s.removeAttribute("tabindex",-1)):(e.setAttribute("inert","true"),s&&s.setAttribute("tabindex",-1))})),this.allowShift=!0}handleAutoPlay(){if(this.autoPlay){clearInterval(this.autoPlayInterval),this.autoPlay=!1;var e=document.activeElement===this.btnPause;this.btnPlay.style.display="flex",this.btnPause.style.display="none",e&&this.btnPlay.focus()}else{this.autoPlayInterval=setInterval((()=>{this.shiftSlide(1)}),5e3),this.autoPlay=!0;var t=document.activeElement===this.btnPlay;this.btnPlay.style.display="none",this.btnPause.style.display="flex",t&&this.btnPause.focus()}}handleMouseOver(){return this.hoverAutoPlay=this.autoPlay,this.hoverAutoPlay&&this.handleAutoPlay(),this}handleMouseOut(){return this.hoverAutoPlay&&this.handleAutoPlay(),this}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{this.moveSlides(!1)}),100)}handleFocus(e){var t=e.target;return t&&t.contains(document.activeElement)&&this.autoPlay&&this.handleAutoPlay(),this}}class Te{static autoInit(e,t){var i=(void 0===t?{}:t).NOTIFICATION,s=new Te(e,void 0===i?{}:i);return s.init(),e.ECLNotification=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.closeSelector,l=void 0===n?"[data-ecl-notification-close]":n,a=s.attachClickListener,r=void 0===a||a;if(this.supportedEvents=["onClose"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.closeSelector=l,this.attachClickListener=r,this.close=null,this.handleClickOnClose=this.handleClickOnClose.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.close=t(this.closeSelector,this.element),this.attachClickListener&&this.close&&this.close.addEventListener("click",this.handleClickOnClose),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachClickListener&&this.close&&this.close.removeEventListener("click",this.handleClickOnClose),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnClose(e){return this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.trigger("onClose",e),this}}class Pe{static autoInit(e,t){var i=(void 0===t?{}:t).POPOVER,s=new Pe(e,void 0===i?{}:i);return s.init(),e.ECLPopover=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.toggleSelector,n=void 0===s?"[data-ecl-popover-toggle]":s,l=i.closeSelector,a=void 0===l?"[data-ecl-popover-close]":l,r=i.attachClickListener,o=void 0===r||r,h=i.attachKeyListener,c=void 0===h||h;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.toggleSelector=n,this.closeSelector=a,this.attachClickListener=o,this.attachKeyListener=c,this.toggle=null,this.close=null,this.target=null,this.container=null,this.resizeTimer=null,this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.positionPopover=this.positionPopover.bind(this),this.handleClickOnToggle=this.handleClickOnToggle.bind(this),this.handleKeyboardGlobal=this.handleKeyboardGlobal.bind(this),this.handleClickGlobal=this.handleClickGlobal.bind(this),this.checkPosition=this.checkPosition.bind(this),this.resetStyles=this.resetStyles.bind(this),this.POPOVER_CLASSES={TOP:"ecl-popover--top",BOTTOM:"ecl-popover--bottom",LEFT:"ecl-popover--left",RIGHT:"ecl-popover--right",PUSH_TOP:"ecl-popover--push-top",PUSH_BOTTOM:"ecl-popover--push-bottom",PUSH_LEFT:"ecl-popover--push-left",PUSH_RIGHT:"ecl-popover--push-right"}}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.toggle=t(this.toggleSelector,this.element),this.close=t(this.closeSelector,this.element),this.container=t(".ecl-popover__container",this.element),this.attachKeyListener&&document.addEventListener("keyup",this.handleKeyboardGlobal),this.attachClickListener&&(document.addEventListener("click",this.handleClickGlobal),this.close&&this.close.addEventListener("click",this.handleClickOnToggle)),this.target=document.querySelector("#"+this.toggle.getAttribute("aria-controls")),!this.target)throw new TypeError("Target has to be provided for popover (aria-controls)");window.addEventListener("resize",this.checkPosition),document.addEventListener("scroll",this.checkPosition),this.attachClickListener&&this.toggle&&this.toggle.addEventListener("click",this.handleClickOnToggle),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.attachClickListener&&this.toggle&&this.toggle.removeEventListener("click",this.handleClickOnToggle),this.attachClickListener&&this.close&&this.close.removeEventListener("click",this.handleClickOnToggle),window.removeEventListener("resize",this.checkPosition),document.removeEventListener("scroll",this.checkPosition),this.attachKeyListener&&document.removeEventListener("keyup",this.handleKeyboardGlobal),this.attachClickListener&&document.removeEventListener("click",this.handleClickGlobal),"true"===this.toggle.getAttribute("aria-expanded")&&this.closePopover(),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnToggle(e){e.preventDefault(),"true"===this.toggle.getAttribute("aria-expanded")?this.closePopover():(this.openPopover(),this.positionPopover())}openPopover(){this.toggle.setAttribute("aria-expanded","true"),this.target.hidden=!1}closePopover(){this.toggle.setAttribute("aria-expanded","false"),this.resetStyles(),this.target.hidden=!0}resetStyles(){Object.keys(this.POPOVER_CLASSES).forEach((e=>{Object.prototype.hasOwnProperty.call(this.POPOVER_CLASSES,e)&&this.element.classList.remove(this.POPOVER_CLASSES[e])})),this.target.style.setProperty("--ecl-popover-position",""),this.container.style.left="",this.container.style.right="",this.container.style.top="",this.container.style.bottom="",this.container.style.transform="",this.target.firstElementChild.width=""}positionPopover(){this.resetStyles();var e=this.toggle.getBoundingClientRect(),t=window.innerHeight,i=window.innerWidth,s=e.top,n=t-e.bottom,l=e.left,a=i-e.right,r="";r=s>n&&s>l&&s>a?"top":n>l&&n>a?"bottom":l>a?"left":"right",this.element.classList.add("ecl-popover--"+r),this.handlePushClass(i,t,r);var o=this.target.firstElementChild,h=window.getComputedStyle(o),c=parseInt(h.getPropertyValue("max-width"),10),d=parseInt(h.getPropertyValue("min-width"),10),u=2*parseInt(h.getPropertyValue("padding-left"),10),m="";"left"===r||"right"===r?m=.9*("left"===r?l:a):m=.9*(i-(this.toggle.getBoundingClientRect().right-this.toggle.getBoundingClientRect().left)/2+this.target.offsetWidth/2);o.style.width=c+u<m?c+"px":m<d+u?d+"px":m-u+"px"}handlePushClass(e,t,i){var s=this.toggle.getBoundingClientRect(),n=this.target.getBoundingClientRect();"left"===i||"right"===i?n.top<0?(this.element.classList.add(this.POPOVER_CLASSES.PUSH_TOP),this.container.style.top="-"+Math.round(s.top)+"px",this.container.style.bottom="",this.container.style.transform=""):n.bottom>t&&(this.element.classList.add(this.POPOVER_CLASSES.PUSH_BOTTOM),this.container.style.bottom="-"+Math.round(t-(s.bottom+8))+"px",this.container.style.top="",this.container.style.transform=""):(n.left<0&&(this.element.classList.add(this.POPOVER_CLASSES.PUSH_LEFT),this.container.style.left="-"+s.left+"px",this.container.style.right="auto",this.container.style.transform="none"),n.right>e&&(this.element.classList.add(this.POPOVER_CLASSES.PUSH_RIGHT),this.container.style.right="-"+(e-s.right)+"px",this.container.style.left="auto",this.container.style.transform="none")),this.handleArrowPosition(i)}handleArrowPosition(e){var t=this.toggle.getBoundingClientRect(),i=this.target.getBoundingClientRect();"left"===e||"right"===e?this.element.classList.contains(this.POPOVER_CLASSES.PUSH_BOTTOM)?this.target.style.setProperty("--ecl-popover-position",Math.round(t.top-i.top+t.height/2)+"px"):this.element.classList.contains(this.POPOVER_CLASSES.PUSH_TOP)&&this.target.style.setProperty("--ecl-popover-position",Math.round(i.top+t.top+t.height/2)+"px"):this.element.classList.contains(this.POPOVER_CLASSES.PUSH_RIGHT)?this.target.style.setProperty("--ecl-popover-position",Math.round(i.right-(t.right-t.width/2))+"px"):this.element.classList.contains(this.POPOVER_CLASSES.PUSH_LEFT)&&this.target.style.setProperty("--ecl-popover-position",Math.round(i.left+t.left+t.width/2)+"px")}checkPosition(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{"true"===this.toggle.getAttribute("aria-expanded")&&this.positionPopover()}),200)}handleKeyboardGlobal(e){this.target&&("Escape"!==e.key&&"Esc"!==e.key||this.closePopover())}handleClickGlobal(e){this.target&&"true"===this.toggle.getAttribute("aria-expanded")&&(this.target.contains(e.target)||this.toggle.contains(e.target)||this.closePopover())}}class Ie{static autoInit(e,t){var i=(void 0===t?{}:t).RANGE,s=new Ie(e,void 0===i?{}:i);return s.init(),e.ECLRange=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.rangeInputSelector,n=void 0===s?"[data-ecl-range-input]":s,l=i.currentValueSelector,a=void 0===l?"[data-ecl-range-value-current]":l,r=i.bubbleSelector,o=void 0===r?"[data-ecl-range-bubble]":r,h=i.attachChangeListener,c=void 0===h||h,d=i.attachHoverListener,u=void 0===d||d;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.rangeInputSelector=n,this.currentValueSelector=a,this.bubbleSelector=o,this.attachChangeListener=c,this.attachHoverListener=u,this.rangeInput=null,this.currentValue=null,this.bubble=null,this.direction="ltr",this.placeBubble=this.placeBubble.bind(this),this.handleChange=this.handleChange.bind(this),this.handleHoverOn=this.handleHoverOn.bind(this),this.handleHoverOff=this.handleHoverOff.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.rangeInput=t(this.rangeInputSelector,this.element),this.currentValue=e(this.currentValueSelector,this.element),this.bubble=t(this.bubbleSelector,this.element),this.rangeInput&&this.currentValue&&(this.currentValue.forEach((e=>{e.innerHTML=this.rangeInput.value})),this.attachChangeListener&&this.rangeInput.addEventListener("input",this.handleChange),this.attachHoverListener&&(this.rangeInput.addEventListener("mouseover",this.handleHoverOn),this.rangeInput.addEventListener("mouseout",this.handleHoverOff))),this.direction=getComputedStyle(this.element).direction,this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.rangeInput&&this.currentValue&&(this.attachChangeListener&&this.rangeInput.removeEventListener("input",this.handleChange),this.attachHoverListener&&(this.rangeInput.removeEventListener("mouseover",this.handleHoverOn),this.rangeInput.removeEventListener("mouseout",this.handleHoverOff))),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}placeBubble(){var e=this.bubble.offsetWidth/2,t=this.rangeInput.getBoundingClientRect(),i=t.width/2,s=(this.rangeInput.value-this.rangeInput.min)/(this.rangeInput.max-this.rangeInput.min)*t.width,n=8*((s-i)/i),l=0;l="rtl"===this.direction?t.right-s-e+n:t.left+s-e-n,this.bubble.style.left=l+"px"}handleHoverOn(){this.bubble.classList.add("ecl-range__bubble--visible"),this.placeBubble()}handleHoverOff(){this.bubble.classList.remove("ecl-range__bubble--visible")}handleChange(){this.currentValue.forEach((e=>{e.innerHTML=this.rangeInput.value})),this.placeBubble()}}var Ne,Me=o("createSvgIcon"),De=o("createCheckbox"),Re=o("createSelectIcon"),Be=o("checkCheckbox"),ze=o("generateRandomId"),Fe=o("updateSelectionsCount"),He=o("handleOptgroup"),Ke=o("updateCurrentValue"),Ve=o("moveFocus");class Ge{static autoInit(e,t){void 0===t&&(t={});var i=new Ge(e,t);return i.init(),e.ECLSelect=i,i}constructor(e,s){var n=void 0===s?{}:s,l=n.defaultText,a=void 0===l?"":l,r=n.searchText,o=void 0===r?"":r,h=n.selectAllText,c=void 0===h?"":h,d=n.noResultsText,u=void 0===d?"":d,m=n.selectMultipleSelector,p=void 0===m?"[data-ecl-select-multiple]":m,v=n.defaultTextAttribute,g=void 0===v?"data-ecl-select-default":v,b=n.searchTextAttribute,f=void 0===b?"data-ecl-select-search":b,y=n.selectAllTextAttribute,L=void 0===y?"data-ecl-select-all":y,E=n.noResultsTextAttribute,C=void 0===E?"data-ecl-select-no-results":E,w=n.closeLabelAttribute,k=void 0===w?"data-ecl-select-close":w,S=n.clearAllLabelAttribute,x=void 0===S?"data-ecl-select-clear-all":S,A=n.selectMultiplesSelectionCountSelector,_=void 0===A?"ecl-select-multiple-selections-counter":A,O=n.closeButtonLabel,T=void 0===O?"":O,P=n.clearAllButtonLabel,I=void 0===P?"":P;if(Object.defineProperty(this,Ve,{value:qe}),Object.defineProperty(this,Ke,{value:je}),Object.defineProperty(this,He,{value:Ue}),Object.defineProperty(this,Fe,{value:We}),this.supportedEvents=["onToggle","onSelection","onSelectAll","onReset","onSearch"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.selectMultipleSelector=p,this.selectMultiplesSelectionCountSelector=_,this.defaultTextAttribute=g,this.searchTextAttribute=f,this.selectAllTextAttribute=L,this.noResultsTextAttribute=C,this.defaultText=a,this.searchText=o,this.selectAllText=c,this.noResultsText=u,this.clearAllButtonLabel=I,this.closeButtonLabel=T,this.closeLabelAttribute=k,this.clearAllLabelAttribute=x,this.input=null,this.search=null,this.checkboxes=null,this.select=null,this.selectAll=null,this.selectIcon=null,this.textDefault=null,this.textSearch=null,this.textSelectAll=null,this.textNoResults=null,this.selectMultiple=null,this.inputContainer=null,this.optionsContainer=null,this.visibleOptions=null,this.searchContainer=null,this.countSelections=null,this.form=null,this.formGroup=null,this.label=null,this.helper=null,this.invalid=null,this.selectMultipleId=null,this.multiple=t(this.selectMultipleSelector,this.element.parentNode)||!1,this.isOpen=!1,this.handleToggle=this.handleToggle.bind(this),this.handleClickOption=this.handleClickOption.bind(this),this.handleClickSelectAll=this.handleClickSelectAll.bind(this),this.handleEsc=this.handleEsc.bind(this),this.handleFocusout=this.handleFocusout.bind(this),this.handleSearch=this.handleSearch.bind(this),this.handleClickOutside=this.handleClickOutside.bind(this),this.resetForm=this.resetForm.bind(this),this.handleClickOnClearAll=this.handleClickOnClearAll.bind(this),this.handleKeyboardOnSelect=this.handleKeyboardOnSelect.bind(this),this.handleKeyboardOnSelectAll=this.handleKeyboardOnSelectAll.bind(this),this.handleKeyboardOnSearch=this.handleKeyboardOnSearch.bind(this),this.handleKeyboardOnOptions=this.handleKeyboardOnOptions.bind(this),this.handleKeyboardOnOption=this.handleKeyboardOnOption.bind(this),this.handleKeyboardOnClearAll=this.handleKeyboardOnClearAll.bind(this),this.handleKeyboardOnClose=this.handleKeyboardOnClose.bind(this),this.setCurrentValue=this.setCurrentValue.bind(this),this.update=this.update.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.select=this.element,this.multiple){var e=Array.from(this.select.parentElement.classList);this.textDefault=this.defaultText||this.element.getAttribute(this.defaultTextAttribute),this.textSearch=this.searchText||this.element.getAttribute(this.searchTextAttribute),this.textSelectAll=this.selectAllText||this.element.getAttribute(this.selectAllTextAttribute),this.textNoResults=this.noResultsText||this.element.getAttribute(this.noResultsTextAttribute),this.closeButtonLabel=this.closeButtonLabel||this.element.getAttribute(this.closeLabelAttribute),this.clearAllButtonLabel=this.clearAllButtonLabel||this.element.getAttribute(this.clearAllLabelAttribute),this.selectMultipleId=this.element.id||"select-multiple-"+a(Ge,ze)[ze](4),this.element.id=this.selectMultipleId,this.formGroup=this.element.closest(".ecl-form-group"),this.formGroup&&(this.formGroup.setAttribute("role","application"),this.label=t(".ecl-form-label",this.formGroup),this.helper=t(".ecl-help-block",this.formGroup),this.invalid=t(".ecl-feedback-message",this.formGroup)),this.select.setAttribute("tabindex","-1"),this.selectMultiple=document.createElement("div"),this.selectMultiple.classList.add("ecl-select__multiple"),this.selectMultiple.addEventListener("focusout",this.handleFocusout),this.inputContainer=document.createElement("div"),this.inputContainer.classList.add(...e),this.selectMultiple.appendChild(this.inputContainer),this.input=document.createElement("button"),this.input.classList.add("ecl-select","ecl-select__multiple-toggle"),this.input.setAttribute("type","button"),this.input.setAttribute("aria-controls",this.selectMultipleId+"-dropdown"),this.input.setAttribute("id",this.selectMultipleId+"-toggle"),this.input.setAttribute("aria-expanded",!1),e.find((e=>e.includes("disabled")))&&this.input.setAttribute("disabled",!0),this.label&&(this.label.setAttribute("for",this.selectMultipleId+"-toggle"),this.input.setAttribute("aria-labelledby",this.label.id));var i="";if(this.helper&&(i=this.helper.id),this.invalid&&(i=i?i+" "+this.invalid.id:this.invalid.id),i&&this.input.setAttribute("aria-describedby",i),this.input.addEventListener("keydown",this.handleKeyboardOnSelect),this.input.addEventListener("click",this.handleToggle),this.selectionCount=document.createElement("div"),this.selectionCount.classList.add(this.selectMultiplesSelectionCountSelector),this.selectionCountText=document.createElement("span"),this.selectionCount.appendChild(this.selectionCountText),this.inputContainer.appendChild(this.selectionCount),this.inputContainer.appendChild(this.input),this.inputContainer.appendChild(a(Ge,Re)[Re]()),this.searchContainer=document.createElement("div"),this.searchContainer.style.display="none",this.searchContainer.classList.add("ecl-select__multiple-dropdown",...e),this.searchContainer.setAttribute("id",this.selectMultipleId+"-dropdown"),this.selectMultiple.appendChild(this.searchContainer),this.textSearch&&(this.search=document.createElement("input"),this.search.classList.add("ecl-text-input"),this.search.setAttribute("type","search"),this.search.setAttribute("placeholder",this.textSearch||""),this.search.addEventListener("keyup",this.handleSearch),this.search.addEventListener("search",this.handleSearch),this.search.addEventListener("keydown",this.handleKeyboardOnSearch),this.searchContainer.appendChild(this.search)),this.textSelectAll){var s=Array.from(this.select.options).filter((e=>!e.disabled)).length;this.selectAll=a(Ge,De)[De]({id:"all-"+a(Ge,ze)[ze](4),text:this.textSelectAll+" ("+s+")",extraClass:"ecl-select__multiple-all"},this.selectMultipleId),this.selectAll.addEventListener("click",this.handleClickSelectAll),this.selectAll.addEventListener("keypress",this.handleClickSelectAll),this.selectAll.addEventListener("change",this.handleClickSelectAll),this.searchContainer.appendChild(this.selectAll)}this.optionsContainer=document.createElement("div"),this.optionsContainer.classList.add("ecl-select__multiple-options"),this.optionsContainer.setAttribute("aria-live","polite"),this.searchContainer.appendChild(this.optionsContainer),(this.clearAllButtonLabel||this.closeButtonLabel)&&(this.dropDownToolbar=document.createElement("div"),this.dropDownToolbar.classList.add("ecl-select-multiple-toolbar"),this.closeButtonLabel&&(this.closeButton=document.createElement("button"),this.closeButton.textContent=this.closeButtonLabel,this.closeButton.classList.add("ecl-button","ecl-button--primary"),this.closeButton.addEventListener("click",this.handleEsc),this.closeButton.addEventListener("keydown",this.handleKeyboardOnClose),this.dropDownToolbar&&(this.dropDownToolbar.appendChild(this.closeButton),this.searchContainer.appendChild(this.dropDownToolbar),this.dropDownToolbar.style.display="none")),this.clearAllButtonLabel&&(this.clearAllButton=document.createElement("button"),this.clearAllButton.textContent=this.clearAllButtonLabel,this.clearAllButton.classList.add("ecl-button","ecl-button--secondary"),this.clearAllButton.addEventListener("click",this.handleClickOnClearAll),this.clearAllButton.addEventListener("keydown",this.handleKeyboardOnClearAll),this.dropDownToolbar.appendChild(this.clearAllButton))),this.selectAll&&this.selectAll.addEventListener("keydown",this.handleKeyboardOnSelectAll),this.optionsContainer.addEventListener("keydown",this.handleKeyboardOnOptions),this.select.options&&this.select.options.length>0?this.checkboxes=Array.from(this.select.options).map((e=>{var i="",s="";if("OPTGROUP"===e.parentNode.tagName)if(t('fieldset[data-ecl-multiple-group="'+e.parentNode.getAttribute("label")+'"]',this.optionsContainer))i=t('fieldset[data-ecl-multiple-group="'+e.parentNode.getAttribute("label")+'"]',this.optionsContainer);else{i=document.createElement("fieldset");var n=document.createElement("legend");n.classList.add("ecl-select__multiple-group__title"),n.innerHTML=e.parentNode.getAttribute("label"),i.appendChild(n),i.setAttribute("data-ecl-multiple-group",e.parentNode.getAttribute("label")),i.classList.add("ecl-select__multiple-group"),this.optionsContainer.appendChild(i)}return e.selected&&(a(this,Fe)[Fe](1),this.dropDownToolbar&&(this.dropDownToolbar.style.display="flex")),(s=a(Ge,De)[De]({id:e.value,text:e.text,disabled:e.disabled,selected:e.selected},this.selectMultipleId)).setAttribute("data-visible",!0),s.classList.contains("ecl-checkbox--disabled")||(s.addEventListener("click",this.handleClickOption),s.addEventListener("keydown",this.handleKeyboardOnOption)),i?i.appendChild(s):this.optionsContainer.appendChild(s),s})):this.checkboxes=[],this.visibleOptions=this.checkboxes,this.select.parentNode.parentNode.insertBefore(this.selectMultiple,this.select.parentNode.nextSibling),this.select.parentNode.classList.add("ecl-select__container--hidden"),a(this,Ke)[Ke](),this.form=this.element.closest("form"),this.form&&this.form.addEventListener("reset",this.resetForm),document.addEventListener("click",this.handleClickOutside)}else a(this,He)[He](),this.select.addEventListener("keydown",this.handleKeyboardOnSelect);this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}update(e){a(this,Ke)[Ke](),a(this,Fe)[Fe](e)}setCurrentValue(e,t){if(void 0===t&&(t="replace"),"replace"!==t&&"add"!==t)throw new Error('Invalid operation mode. Use "replace" or "add".');var i="string"==typeof e?[e]:e;Array.from(this.select.options).forEach((e=>{"replace"===t&&(e.selected=!1),(i.includes(e.value)||i.includes(e.label))&&(e.selected=!0)})),this.update()}handleToggle(e){if(e&&e.preventDefault(),this.input.classList.toggle("ecl-select--active"),"none"===this.searchContainer.style.display?(this.searchContainer.style.display="block",this.input.setAttribute("aria-expanded",!0),this.isOpen=!0):(this.searchContainer.style.display="none",this.input.setAttribute("aria-expanded",!1),this.isOpen=!1),e){var t={opened:this.isOpen,e:e};this.trigger("onToggle",t)}}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.input.removeEventListener("keydown",this.handleKeyboardOnSelect),this.multiple&&(document.removeEventListener("click",this.handleClickOutside),this.selectMultiple.removeEventListener("focusout",this.handleFocusout),this.input.removeEventListener("click",this.handleToggle),this.search&&(this.search.removeEventListener("keyup",this.handleSearch),this.search.removeEventListener("keydown",this.handleKeyboardOnSearch)),this.selectAll&&(this.selectAll.removeEventListener("click",this.handleClickSelectAll),this.selectAll.removeEventListener("keypress",this.handleClickSelectAll),this.selectAll.removeEventListener("keydown",this.handleKeyboardOnSelectAll)),this.optionsContainer.removeEventListener("keydown",this.handleKeyboardOnOptions),this.checkboxes.forEach((e=>{e.removeEventListener("click",this.handleClickSelectAll),e.removeEventListener("click",this.handleClickOption),e.removeEventListener("keydown",this.handleKeyboardOnOption)})),this.closeButton&&(this.closeButton.removeEventListener("click",this.handleEsc),this.closeButton.removeEventListener("keydown",this.handleKeyboardOnClose)),this.clearAllButton&&(this.clearAllButton.removeEventListener("click",this.handleClickOnClearAll),this.clearAllButton.removeEventListener("keydown",this.handleKeyboardOnClearAll)),this.selectMultiple&&this.selectMultiple.remove(),this.select.parentNode.classList.remove("ecl-select__container--hidden")),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOption(e){e.preventDefault(),a(Ge,Be)[Be](e);var t=e.target.closest(".ecl-checkbox");Array.from(this.select.options).forEach((e=>{e.text===t.getAttribute("data-select-multiple-value")&&(e.getAttribute("selected")||e.selected?(e.selected=!1,this.selectAll&&(this.selectAll.querySelector("input").checked=!1)):e.selected=!0)})),this.update()}handleClickSelectAll(e){if(e.preventDefault(),this.selectAll&&!this.selectAll.querySelector("input").disabled){var t=a(Ge,Be)[Be](e),i=Array.from(this.select.options).filter((e=>!e.disabled));Array.from(this.searchContainer.querySelectorAll('[data-visible="true"]')).filter((e=>!e.querySelector("input").disabled)).forEach((e=>{e.querySelector("input").checked=t;var s=i.find((t=>t.text===e.getAttribute("data-select-multiple-value")));s&&(s.selected=!!t)})),this.update(),this.trigger("onSelectAll",{selected:i})}}handleFocusout(e){e.relatedTarget&&this.selectMultiple&&!this.selectMultiple.contains(e.relatedTarget)&&"block"===this.searchContainer.style.display?(this.searchContainer.style.display="none",this.input.classList.remove("ecl-select--active"),this.input.setAttribute("aria-expanded",!1)):!e.relatedTarget||this.selectMultiple||this.select.parentNode.contains(e.relatedTarget)||this.select.blur()}handleSearch(e){var i=this.optionsContainer.offsetHeight;this.visibleOptions=[];var s=e.target.value.toLowerCase(),n={};i>0&&(this.optionsContainer.style.height=i+"px"),this.checkboxes.forEach((e=>{if(e.getAttribute("data-select-multiple-value").toLocaleLowerCase().includes(s)){e.setAttribute("data-visible",!0),e.style.display="flex";var t=e.querySelector(".ecl-checkbox__label-text");t.textContent=t.textContent.replace(".cls-1{fill:none}",""),s&&(t.innerHTML=t.textContent.replace(new RegExp(s+"(?!([^<]+)?<)","gi"),"<b>$&</b>")),this.visibleOptions.push(e)}else e.removeAttribute("data-visible"),e.style.display="none"}));var l=this.visibleOptions.filter((e=>e.querySelector("input").checked));!this.selectAll||0!==this.visibleOptions.length&&this.visibleOptions.length===l.length?this.selectAll&&(this.selectAll.querySelector("input").checked=!0):this.selectAll.querySelector("input").checked=!1;for(var a,r=this.searchContainer.querySelector(".ecl-select__multiple-no-results"),o=h(this.optionsContainer.getElementsByClassName("ecl-select__multiple-group"));!(a=o()).done;){var c=a.value;c.style.display="none",[...c.children].filter((e=>e.classList.contains("ecl-checkbox"))).forEach((e=>{e.hasAttribute("data-visible")&&(e.closest(".ecl-select__multiple-group").style.display="block")}))}if(0!==this.visibleOptions.length||r)this.visibleOptions.length>0&&null!==r&&r.parentNode.removeChild(r);else{var d=document.createElement("div"),u=document.createElement("span");d.classList.add("ecl-select__multiple-no-results"),u.innerHTML=this.textNoResults,d.appendChild(u),this.optionsContainer.appendChild(d)}(0===s.length?(this.checkboxes.forEach((e=>{e.setAttribute("data-visible",!0),e.style.display="flex"})),this.selectAll&&(this.selectAll.classList.remove("ecl-checkbox--disabled"),this.selectAll.querySelector("input").disabled=!1)):0!==s.length&&this.selectAll&&(this.selectAll.classList.add("ecl-checkbox--disabled"),this.selectAll.querySelector("input").disabled=!0),this.visibleOptions.length>0)?n={results:this.visibleOptions.map((e=>{var i=null,s=t(".ecl-checkbox__label-text",e);return s&&(i=s.innerHTML.replace(/<\/?b>/g,"")),i||""})),text:e.target.value.toLowerCase()}:n={results:"none",text:e.target.value.toLowerCase()};this.trigger("onSearch",n)}handleClickOutside(e){e.target&&this.selectMultiple&&!this.selectMultiple.contains(e.target)&&"block"===this.searchContainer.style.display&&(this.searchContainer.style.display="none",this.input.classList.remove("ecl-select--active"),this.input.setAttribute("aria-expanded",!1))}handleKeyboardOnSelect(e){switch(e.key){case"Escape":e.preventDefault(),this.handleEsc(e);break;case" ":case"Enter":this.multiple&&(e.preventDefault(),this.handleToggle(e),this.search?this.search.focus():this.selectAll?this.selectAll.firstChild.focus():this.checkboxes[0].firstChild.focus());break;case"ArrowDown":this.multiple&&(e.preventDefault(),this.isOpen||this.handleToggle(e),this.search?this.search.focus():this.selectAll?this.selectAll.firstChild.focus():this.checkboxes[0].firstChild.focus())}}handleKeyboardOnSelectAll(e){switch(e.key){case"Escape":e.preventDefault(),this.handleEsc(e);break;case"ArrowDown":e.preventDefault(),this.visibleOptions.length>0?this.visibleOptions[0].querySelector("input").focus():this.input.focus();break;case"ArrowUp":e.preventDefault(),this.search?this.search.focus():(this.input.focus(),this.handleToggle(e));break;case"Tab":e.preventDefault(),e.shiftKey?this.search&&this.search.focus():this.visibleOptions.length>0?this.visibleOptions[0].querySelector("input").focus():this.input.focus()}}handleKeyboardOnOptions(e){switch(e.key){case"Escape":e.preventDefault(),this.handleEsc(e);break;case"ArrowDown":e.preventDefault(),a(this,Ve)[Ve]("down");break;case"ArrowUp":e.preventDefault(),a(this,Ve)[Ve]("up");break;case"Tab":e.preventDefault(),e.shiftKey?a(this,Ve)[Ve]("up"):a(this,Ve)[Ve]("down")}}handleKeyboardOnSearch(e){switch(e.key){case"Escape":e.preventDefault(),this.handleEsc(e);break;case"ArrowDown":e.preventDefault(),!this.selectAll||this.selectAll.querySelector("input").disabled?this.visibleOptions.length>0?this.visibleOptions[0].querySelector("input").focus():this.input.focus():this.selectAll.querySelector("input").focus();break;case"ArrowUp":e.preventDefault(),this.input.focus(),this.handleToggle(e)}}handleKeyboardOnOption(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClickOption(e))}handleKeyboardOnClearAll(e){switch(e.preventDefault(),e.key){case"Enter":case" ":this.handleClickOnClearAll(e),this.trigger("onReset",e),this.input.focus();break;case"ArrowDown":this.input.focus();break;case"ArrowUp":this.closeButton?this.closeButton.focus():this.visibleOptions.length>0?this.visibleOptions[this.visibleOptions.length-1].querySelector("input").focus():this.search?this.search.focus():(this.input.focus(),this.handleToggle(e));break;case"Tab":e.shiftKey?this.closeButton?this.closeButton.focus():this.visibleOptions.length>0?this.visibleOptions[this.visibleOptions.length-1].querySelector("input").focus():this.search?this.search.focus():(this.input.focus(),this.handleToggle(e)):(this.input.focus(),this.handleToggle(e))}}handleKeyboardOnClose(e){switch(e.preventDefault(),e.key){case"Enter":case" ":this.handleEsc(e),this.input.focus();break;case"ArrowUp":this.visibleOptions.length>0?this.visibleOptions[this.visibleOptions.length-1].querySelector("input").focus():(this.input.focus(),this.handleToggle(e));break;case"ArrowDown":this.clearAllButton?this.clearAllButton.focus():(this.input.focus(),this.handleToggle(e));break;case"Tab":e.shiftKey?this.visibleOptions.length>0?this.visibleOptions[this.visibleOptions.length-1].querySelector("input").focus():(this.input.focus(),this.handleToggle(e)):this.clearAllButton?this.clearAllButton.focus():(this.input.focus(),this.handleToggle(e))}}handleEsc(e){this.multiple?(e.preventDefault(),this.searchContainer.style.display="none",this.input.setAttribute("aria-expanded",!1),this.input.blur(),this.input.classList.remove("ecl-select--active")):this.select.classList.remove("ecl-select--active")}handleClickOnClearAll(e){e.preventDefault(),Array.from(this.select.options).forEach((e=>{this.selectMultiple.querySelector('[data-select-multiple-value="'+e.text+'"]').querySelector(".ecl-checkbox__input").checked=!1,e.selected=!1})),this.selectAll&&(this.selectAll.querySelector(".ecl-checkbox__input").checked=!1),this.update(0),this.trigger("onReset",e)}resetForm(){this.multiple&&setTimeout((()=>{Array.from(this.select.options).forEach((e=>{this.selectMultiple.querySelector('[data-select-multiple-value="'+e.text+'"]').querySelector(".ecl-checkbox__input").checked?e.selected=!0:e.selected=!1})),this.update(0)}),10)}}function We(e){var t=0;e>0?this.selectionCount.querySelector("span").innerHTML+=e:t=Array.from(this.select.options).filter((e=>e.selected)).length,t>0?(this.selectionCount.querySelector("span").innerHTML=t,this.selectionCount.classList.add("ecl-select-multiple-selections-counter--visible"),this.dropDownToolbar&&(this.dropDownToolbar.style.display="flex")):(this.selectionCount.classList.remove("ecl-select-multiple-selections-counter--visible"),this.dropDownToolbar&&(this.dropDownToolbar.style.display="none")),t>=100&&this.selectionCount.classList.add("ecl-select-multiple-selections-counter--xxl")}function Ue(){Array.from(this.select.options).forEach((e=>{if("OPTGROUP"===e.parentNode.tagName){var t=e.parentNode.getAttribute("label"),i=e.getAttribute("label")||e.textContent;t&&i&&e.setAttribute("aria-label",i+" - "+t)}}))}function je(){var e=Array.from(this.select.options).filter((e=>e.selected)).map((e=>e.text)).join(", ");this.input.innerHTML=e||this.textDefault||"",""!==e&&this.label?this.label.setAttribute("aria-label",this.label.innerText+" "+e):""===e&&this.label&&this.label.removeAttribute("aria-label"),this.trigger("onSelection",{selected:e}),this.select.dispatchEvent(new window.Event("change",{bubbles:!0}))}function qe(e){var t=document.activeElement,i=t.parentElement.parentElement.classList.contains("ecl-select__multiple-group")?Array.from(t.parentElement.parentElement.parentElement.querySelectorAll(".ecl-checkbox__input")):Array.from(t.parentElement.parentElement.querySelectorAll(".ecl-checkbox__input")),s=i.indexOf(t);if("down"===e){var n=i.splice(s+1,i.length).filter((e=>!e.disabled&&"none"!==e.parentElement.style.display));n.length>0?n[0].focus():this.dropDownToolbar&&"flex"===this.dropDownToolbar.style.display&&this.dropDownToolbar.firstChild.focus()}else{var l=i.splice(0,s).filter((e=>!e.disabled&&"none"!==e.parentElement.style.display));l.length>0?l[l.length-1].focus():(this.optionsContainer.scrollTop=0,this.selectAll&&!this.selectAll.querySelector("input").disabled?this.selectAll.querySelector("input").focus():this.search?this.search.focus():(this.input.focus(),this.handleToggle()))}}Ne=Ge,Object.defineProperty(Ge,ze,{value:function(e){return Math.random().toString(36).substr(2,e)}}),Object.defineProperty(Ge,Be,{value:function(e){var t=e.target.closest(".ecl-checkbox").querySelector("input");return t.checked=!t.checked,t.checked}}),Object.defineProperty(Ge,Re,{value:function(){var e=document.createElement("div");e.classList.add("ecl-select__icon");var t=document.createElement("button");t.classList.add("ecl-button","ecl-button--ghost","ecl-button--icon-only"),t.setAttribute("tabindex","-1");var i=document.createElement("span");i.classList.add("ecl-button__container");var s=document.createElement("span");s.classList.add("ecl-button__label"),s.textContent="Toggle dropdown",i.appendChild(s);var n=a(Ne,Me)[Me]('<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path fill-rule="evenodd" d="m45 30.12-2.73 2.82-18.24-18.36L5.73 33 3 30.18 24.03 9z" clip-rule="evenodd"/></svg>',"ecl-icon ecl-icon--xs ecl-icon--rotate-180");return i.appendChild(n),t.appendChild(i),e.appendChild(t),e}}),Object.defineProperty(Ge,De,{value:function(e,t){if(!e||!t)return"";var i=e.id,s=e.text,n=e.disabled,l=e.selected,r=e.extraClass;if(!i||!s)return"";var o=document.createElement("div"),h=document.createElement("input"),c=document.createElement("label"),d=document.createElement("span"),u=document.createElement("span");return r&&o.classList.add(r),l&&h.setAttribute("checked",!0),n&&(o.classList.add("ecl-checkbox--disabled"),d.classList.add("ecl-checkbox__box--disabled"),h.setAttribute("disabled",n)),o.classList.add("ecl-checkbox"),o.setAttribute("data-select-multiple-value",s),h.classList.add("ecl-checkbox__input"),h.setAttribute("type","checkbox"),h.setAttribute("id",t+"-"+i),h.setAttribute("name",t+"-"+i),o.appendChild(h),c.classList.add("ecl-checkbox__label"),c.setAttribute("for",t+"-"+i),d.classList.add("ecl-checkbox__box"),d.setAttribute("aria-hidden",!0),d.appendChild(a(Ne,Me)[Me]('<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path fill-rule="evenodd" d="M19.53 36.69 6 23.19l2.13-2.13 11.4 11.4L39.99 12l2.13 2.13z"/></svg>',"ecl-icon ecl-icon--s ecl-checkbox__icon")),c.appendChild(d),u.classList.add("ecl-checkbox__label-text"),u.innerHTML=s,c.appendChild(u),o.appendChild(c),o}}),Object.defineProperty(Ge,Me,{value:function(e,t){var i=document.createElement("div");i.innerHTML=e;var s=i.children[0];return s.removeAttribute("height"),s.removeAttribute("width"),s.setAttribute("focusable",!1),s.setAttribute("aria-hidden",!0),s.setAttribute("class",t),s}});class Ye{static autoInit(e,t){var i=(void 0===t?{}:t).SITE_HEADER_CORE,s=new Ye(e,void 0===i?{}:i);return s.init(),e.ECLSiteHeader=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.containerSelector,n=void 0===s?"[data-ecl-site-header-top]":s,l=i.languageLinkSelector,a=void 0===l?"[data-ecl-language-selector]":l,r=i.languageListOverlaySelector,o=void 0===r?"[data-ecl-language-list-overlay]":r,h=i.languageListEuSelector,c=void 0===h?"[data-ecl-language-list-eu]":h,d=i.languageListNonEuSelector,u=void 0===d?"[data-ecl-language-list-non-eu]":d,m=i.languageListContentSelector,p=void 0===m?"[data-ecl-language-list-content]":m,v=i.closeOverlaySelector,g=void 0===v?"[data-ecl-language-list-close]":v,b=i.searchToggleSelector,f=void 0===b?"[data-ecl-search-toggle]":b,y=i.searchFormSelector,L=void 0===y?"[data-ecl-search-form]":y,E=i.loginToggleSelector,C=void 0===E?"[data-ecl-login-toggle]":E,w=i.loginBoxSelector,k=void 0===w?"[data-ecl-login-box]":w,S=i.notificationSelector,x=void 0===S?"[data-ecl-site-header-notification]":S,A=i.attachClickListener,_=void 0===A||A,O=i.attachKeyListener,T=void 0===O||O,P=i.attachResizeListener,I=void 0===P||P,N=i.tabletBreakpoint,M=void 0===N?768:N;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.containerSelector=n,this.languageLinkSelector=a,this.languageListOverlaySelector=o,this.languageListEuSelector=c,this.languageListNonEuSelector=u,this.languageListContentSelector=p,this.closeOverlaySelector=g,this.searchToggleSelector=f,this.searchFormSelector=L,this.loginToggleSelector=C,this.notificationSelector=x,this.loginBoxSelector=k,this.attachClickListener=_,this.attachKeyListener=T,this.attachResizeListener=I,this.tabletBreakpoint=M,this.languageMaxColumnItems=8,this.languageLink=null,this.languageListOverlay=null,this.languageListEu=null,this.languageListNonEu=null,this.languageListContent=null,this.close=null,this.focusTrap=null,this.searchToggle=null,this.searchForm=null,this.loginToggle=null,this.loginBox=null,this.resizeTimer=null,this.direction=null,this.notificationContainer=null,this.openOverlay=this.openOverlay.bind(this),this.closeOverlay=this.closeOverlay.bind(this),this.toggleOverlay=this.toggleOverlay.bind(this),this.toggleSearch=this.toggleSearch.bind(this),this.toggleLogin=this.toggleLogin.bind(this),this.setLoginArrow=this.setLoginArrow.bind(this),this.setSearchArrow=this.setSearchArrow.bind(this),this.handleKeyboardLanguage=this.handleKeyboardLanguage.bind(this),this.handleKeyboardGlobal=this.handleKeyboardGlobal.bind(this),this.handleClickGlobal=this.handleClickGlobal.bind(this),this.handleResize=this.handleResize.bind(this),this.setLanguageListHeight=this.setLanguageListHeight.bind(this),this.handleNotificationClose=this.handleNotificationClose.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.arrowSize="0.5rem",this.attachKeyListener&&document.addEventListener("keyup",this.handleKeyboardGlobal),this.attachClickListener&&document.addEventListener("click",this.handleClickGlobal),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.container=t(this.containerSelector),this.languageLink=t(this.languageLinkSelector),this.languageListOverlay=t(this.languageListOverlaySelector),this.languageListEu=t(this.languageListEuSelector),this.languageListNonEu=t(this.languageListNonEuSelector),this.languageListContent=t(this.languageListContentSelector),this.close=t(this.closeOverlaySelector),this.notification=t(this.notificationSelector),this.direction=getComputedStyle(this.element).direction,"rtl"===this.direction&&this.element.classList.add("ecl-site-header--rtl"),this.focusTrap=le(this.languageListOverlay,{onDeactivate:this.closeOverlay,allowOutsideClick:!0}),this.attachClickListener&&this.languageLink&&this.languageLink.addEventListener("click",this.toggleOverlay),this.attachClickListener&&this.close&&this.close.addEventListener("click",this.toggleOverlay),this.attachKeyListener&&this.languageLink&&this.languageLink.addEventListener("keydown",this.handleKeyboardLanguage),this.searchToggle=t(this.searchToggleSelector),this.searchForm=t(this.searchFormSelector),this.attachClickListener&&this.searchToggle&&this.searchToggle.addEventListener("click",this.toggleSearch),this.loginToggle=t(this.loginToggleSelector),this.loginBox=t(this.loginBoxSelector),this.attachClickListener&&this.loginToggle&&this.loginToggle.addEventListener("click",this.toggleLogin),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this),this.notification&&(this.notificationContainer=this.notification.closest(".ecl-site-header__notification"),setTimeout((()=>{var e=ECL.components.get(this.notification);e&&e.on("onClose",this.handleNotificationClose)}),0))}destroy(){this.attachClickListener&&this.languageLink&&this.languageLink.removeEventListener("click",this.toggleOverlay),this.focusTrap&&this.focusTrap.deactivate(),this.attachKeyListener&&this.languageLink&&this.languageLink.removeEventListener("keydown",this.handleKeyboardLanguage),this.attachClickListener&&this.close&&this.close.removeEventListener("click",this.toggleOverlay),this.attachClickListener&&this.searchToggle&&this.searchToggle.removeEventListener("click",this.toggleSearch),this.attachClickListener&&this.loginToggle&&this.loginToggle.removeEventListener("click",this.toggleLogin),this.attachKeyListener&&document.removeEventListener("keyup",this.handleKeyboardGlobal),this.attachClickListener&&document.removeEventListener("click",this.handleClickGlobal),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),this.element.classList.remove("ecl-site-header--rtl"),ECL.components.delete(this.element))}updateOverlay(){var t=1,i=1;if(this.languageListEu){var s=e(".ecl-site-header__language-item",this.languageListEu);(t=Math.ceil(s.length/this.languageMaxColumnItems))>1&&this.languageListEu.classList.add("ecl-site-header__language-category--"+t+"-col")}if(this.languageListNonEu){var n=e(".ecl-site-header__language-item",this.languageListNonEu);(i=Math.ceil(n.length/this.languageMaxColumnItems))>1&&this.languageListNonEu.classList.add("ecl-site-header__language-category--"+i+"-col")}this.languageListEu?this.languageListEu.parentNode.classList.remove("ecl-site-header__language-content--stack"):this.languageListNonEu&&this.languageListNonEu.parentNode.classList.remove("ecl-site-header__language-content--stack");var l=this.languageListOverlay.getBoundingClientRect(),a=this.container.getBoundingClientRect();l.width>a.width&&(this.languageListEu?this.languageListEu.parentNode.classList.add("ecl-site-header__language-content--stack"):this.languageListNonEu&&this.languageListNonEu.parentNode.classList.add("ecl-site-header__language-content--stack"),this.languageListNonEu&&(this.languageListNonEu.classList.remove("ecl-site-header__language-category--"+i+"-col"),this.languageListNonEu.classList.add("ecl-site-header__language-category--"+Math.max(t,i)+"-col"))),this.languageListOverlay.classList.remove("ecl-site-header__language-container--push-right","ecl-site-header__language-container--push-left"),this.languageListOverlay.classList.remove("ecl-site-header__language-container--full"),this.languageListOverlay.style.removeProperty("--ecl-language-arrow-position"),this.languageListOverlay.style.removeProperty("right"),this.languageListOverlay.style.removeProperty("left"),l=this.languageListOverlay.getBoundingClientRect();var r=window.innerWidth,o=this.languageLink.getBoundingClientRect();if("ltr"===this.direction&&l.right>r){this.languageListOverlay.classList.add("ecl-site-header__language-container--push-right"),this.languageListOverlay.style.setProperty("right","calc(-"+a.right+"px + "+o.right+"px)");var h=a.right-o.right+o.width/2;this.languageListOverlay.style.setProperty("--ecl-language-arrow-position","calc("+h+"px - "+this.arrowSize+")")}else if("rtl"===this.direction&&l.left<0){this.languageListOverlay.classList.add("ecl-site-header__language-container--push-left"),this.languageListOverlay.style.setProperty("left","calc(-"+o.left+"px + "+a.left+"px)");var c=o.right-a.left-o.width/2;this.languageListOverlay.style.setProperty("--ecl-language-arrow-position",c+"px")}if(window.innerWidth<this.tabletBreakpoint){this.languageListOverlay.classList.add("ecl-site-header__language-container--full"),this.languageListOverlay.style.removeProperty("right");var d=l.right-o.right+o.width/2;this.languageListOverlay.style.setProperty("--ecl-language-arrow-position","calc("+d+"px - "+this.arrowSize+")")}this.loginBox&&this.loginBox.classList.contains("ecl-site-header__login-box--active")&&this.setLoginArrow(),this.searchForm&&this.searchForm.classList.contains("ecl-site-header__search--active")&&this.setSearchArrow()}handleNotificationClose(){this.notificationContainer&&this.notificationContainer.remove()}setLanguageListHeight(){var e=window.innerHeight;if(this.languageListContent){var t=e-this.languageListContent.getBoundingClientRect().top;t>0&&(this.languageListContent.style.maxHeight=t+"px")}}openOverlay(){this.languageListOverlay.hidden=!1,this.languageListOverlay.setAttribute("aria-modal","true"),this.languageLink.setAttribute("aria-expanded","true"),this.setLanguageListHeight()}closeOverlay(){this.languageListOverlay.hidden=!0,this.languageListOverlay.removeAttribute("aria-modal"),this.languageLink.setAttribute("aria-expanded","false")}toggleOverlay(e){this.languageListOverlay&&this.focusTrap&&(e.preventDefault(),this.languageListOverlay.hasAttribute("hidden")?(this.openOverlay(),this.updateOverlay(),this.focusTrap.activate()):this.focusTrap.deactivate())}handleResize(){this.languageListOverlay&&!this.languageListOverlay.hasAttribute("hidden")&&(this.loginBox&&this.loginBox.classList.contains("ecl-site-header__login-box--active")||this.searchForm&&this.searchForm.classList.contains("ecl-site-header__search--active"))&&(clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{this.updateOverlay()}),200))}handleKeyboardLanguage(e){32!==e.keyCode&&"Enter"!==e.key||this.toggleOverlay(e)}toggleSearch(e){if(this.searchForm){e.preventDefault();var t="true"===this.searchToggle.getAttribute("aria-expanded");this.loginToggle&&"true"===this.loginToggle.getAttribute("aria-expanded")&&this.toggleLogin(e),this.searchToggle.setAttribute("aria-expanded",t?"false":"true"),t?this.searchForm.classList.remove("ecl-site-header__search--active"):(this.searchForm.classList.add("ecl-site-header__search--active"),this.setSearchArrow())}}setLoginArrow(){if(0===this.loginBox.getBoundingClientRect().x){var e=this.loginToggle.getBoundingClientRect(),t=window.innerWidth-e.right+e.width/2;this.loginBox.style.setProperty("--ecl-login-arrow-position","calc("+t+"px - "+this.arrowSize+")")}}setSearchArrow(){if(0===this.searchForm.getBoundingClientRect().x){var e=this.searchToggle.getBoundingClientRect(),t=window.innerWidth-e.right+e.width/2;this.searchForm.style.setProperty("--ecl-search-arrow-position","calc("+t+"px - "+this.arrowSize+")")}}toggleLogin(e){if(this.loginBox){e.preventDefault();var t="true"===this.loginToggle.getAttribute("aria-expanded");this.searchToggle&&"true"===this.searchToggle.getAttribute("aria-expanded")&&this.toggleSearch(e),this.loginToggle.setAttribute("aria-expanded",t?"false":"true"),t?this.loginBox.classList.remove("ecl-site-header__login-box--active"):(this.loginBox.classList.add("ecl-site-header__login-box--active"),this.setLoginArrow())}}handleKeyboardGlobal(e){if(this.languageLink){var t=this.languageLink.getAttribute("aria-expanded");"Escape"!==e.key&&"Esc"!==e.key||"true"===t&&this.toggleOverlay(e)}}handleClickGlobal(e){if(this.languageLink||this.searchToggle||this.loginToggle){var t=this.languageLink&&this.languageLink.getAttribute("aria-expanded"),i=this.loginToggle&&"true"===this.loginToggle.getAttribute("aria-expanded"),s=this.searchToggle&&"true"===this.searchToggle.getAttribute("aria-expanded");"true"===t&&(this.languageListOverlay.contains(e.target)||this.languageLink.contains(e.target)||this.toggleOverlay(e)),i&&(this.loginBox.contains(e.target)||this.loginToggle.contains(e.target)||this.toggleLogin(e)),s&&(this.searchForm.contains(e.target)||this.searchToggle.contains(e.target)||this.toggleSearch(e))}}}class Xe{static autoInit(e,t){var i=(void 0===t?{}:t).TABLE,s=new Xe(e,void 0===i?{}:i);return s.init(),e.ECLTable=s,s}constructor(i,s){var n=void 0===s?{}:s,l=n.sortSelector,a=void 0===l?"[data-ecl-table-sort-toggle]":l,r=n.sortLabelSelector,o=void 0===r?"data-ecl-table-sort-label":r;if(this.handleClickOnSort=i=>s=>{s.preventDefault();for(var n=i.closest("table"),l=t("tbody",n),a=i.getAttribute("aria-sort"),r=0,o=i.previousElementSibling;o;)r+=o.getAttribute("colspan")?Number(o.getAttribute("colspan")):1,o=o.previousElementSibling;var h,c;"descending"===a?([...e("tr",l)].forEach(((e,i)=>{var s=t("[data-ecl-table-order='"+i+"']",l);l.appendChild(s)})),a=null):([...e("tr",l)].sort((h=r,c="ascending"!==a,(e,t)=>{return i=(c?e:t).children[h].textContent,s=(c?t:e).children[h].textContent,""===i||""===s||Number.isNaN(+i)||Number.isNaN(+s)?i.toString().localeCompare(s):i-s;var i,s})).forEach((e=>l.appendChild(e))),a="ascending"===a?"descending":"ascending"),this.sortHeadings.forEach((e=>{a&&e===i?e.setAttribute("aria-sort",a):e.removeAttribute("aria-sort")}))},!i||i.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=i,this.sortSelector=a,this.sortLabelSelector=o,this.sortHeadings=null,this.handleClickOnSort=this.handleClickOnSort.bind(this)}static createSortIcon(e){var t=document.createElement("span");t.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path fill-rule="evenodd" d="m12 33 12-15 12 15z"/></svg>';var i=t.children[0];return i.removeAttribute("height"),i.removeAttribute("width"),i.setAttribute("focusable",!1),i.setAttribute("aria-hidden",!0),i.setAttribute("class","ecl-table__icon ecl-icon ecl-icon--xs "+e),i}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.sortHeadings=e(this.sortSelector,this.element),this.sortHeadings&&this.sortHeadings.forEach((e=>{var t=document.createElement("button");t.classList.add("ecl-table__arrow"),this.element.hasAttribute(this.sortLabelSelector)&&t.setAttribute("aria-label",this.element.getAttribute(this.sortLabelSelector)),t.appendChild(Xe.createSortIcon("ecl-table__icon-up")),t.appendChild(Xe.createSortIcon("ecl-table__icon-down")),e.appendChild(t),e.addEventListener("click",(t=>this.handleClickOnSort(e)(t)))}));var i=t("tbody",this.element);[...e("tr",i)].forEach(((e,t)=>{e.setAttribute("data-ecl-table-order",t)})),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.sortHeadings&&this.sortHeadings.forEach((e=>{e.removeEventListener("click",(t=>this.handleClickOnSort(e)(t)))})),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}}class $e{static autoInit(e,t){var i=(void 0===t?{}:t).TABS,s=new $e(e,void 0===i?{}:i);return s.init(),e.ECLTabs=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.containerSelector,l=void 0===n?".ecl-tabs__container":n,a=s.listSelector,r=void 0===a?".ecl-tabs__list":a,o=s.listItemsSelector,h=void 0===o?".ecl-tabs__item:not(.ecl-tabs__item--more)":o,c=s.moreItemSelector,d=void 0===c?".ecl-tabs__item--more":c,u=s.moreButtonSelector,m=void 0===u?".ecl-tabs__toggle":u,p=s.moreLabelSelector,v=void 0===p?".ecl-tabs__toggle .ecl-button__label":p,g=s.prevSelector,b=void 0===g?".ecl-tabs__prev":g,f=s.nextSelector,y=void 0===f?".ecl-tabs__next":f,L=s.attachClickListener,E=void 0===L||L,C=s.attachResizeListener,w=void 0===C||C;if(this.supportedEvents=["onToggle"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.containerSelector=l,this.listSelector=r,this.listItemsSelector=h,this.moreItemSelector=d,this.moreButtonSelector=m,this.moreLabelSelector=v,this.prevSelector=b,this.nextSelector=y,this.attachClickListener=E,this.attachResizeListener=w,this.container=null,this.list=null,this.listItems=null,this.moreItem=null,this.moreButton=null,this.moreButtonActive=!1,this.moreLabel=null,this.moreLabelValue=null,this.dropdown=null,this.dropdownList=null,this.dropdownItems=null,this.allowShift=!0,this.buttonNextSize=0,this.index=0,this.total=0,this.tabsKey=[],this.firstTab=null,this.lastTab=null,this.direction="ltr",this.isMobile=!1,this.resizeTimer=null,this.handleClickOnToggle=this.handleClickOnToggle.bind(this),this.handleResize=this.handleResize.bind(this),this.closeMoreDropdown=this.closeMoreDropdown.bind(this),this.shiftTabs=this.shiftTabs.bind(this),this.handleKeyboardOnTabs=this.handleKeyboardOnTabs.bind(this),this.moveFocus=this.moveFocus.bind(this),this.arrowFocusToTab=this.arrowFocusToTab.bind(this),this.tabsKeyEvents=this.tabsKeyEvents.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.container=t(this.containerSelector,this.element),this.list=t(this.listSelector,this.element),this.listItems=e(this.listItemsSelector,this.element),this.moreItem=t(this.moreItemSelector,this.element),this.moreButton=t(this.moreButtonSelector,this.element),this.moreLabel=t(this.moreLabelSelector,this.element),this.moreLabelValue=this.moreLabel.innerText,this.btnPrev=t(this.prevSelector,this.element),this.btnNext=t(this.nextSelector,this.element),this.total=this.listItems.length,this.moreButton&&(this.dropdown=document.createElement("div"),this.dropdown.classList.add("ecl-tabs__dropdown"),this.dropdownList=document.createElement("div"),this.dropdownList.classList.add("ecl-tabs__dropdown-list"),this.listItems.forEach((e=>{this.dropdownList.appendChild(e.cloneNode(!0))})),this.dropdown.appendChild(this.dropdownList),this.moreItem.appendChild(this.dropdown),this.dropdownItems=e(".ecl-tabs__dropdown .ecl-tabs__item",this.element)),this.btnNext&&(this.buttonNextSize=this.btnNext.getBoundingClientRect().width),this.handleResize(),this.attachClickListener&&this.moreButton&&this.moreButton.addEventListener("click",this.handleClickOnToggle),this.attachClickListener&&document&&this.moreButton&&document.addEventListener("click",this.closeMoreDropdown),this.attachClickListener&&this.btnNext&&this.btnNext.addEventListener("click",this.shiftTabs.bind(this,"next",!0)),this.attachClickListener&&this.btnPrev&&this.btnPrev.addEventListener("click",this.shiftTabs.bind(this,"prev",!0)),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.dropdown&&this.dropdown.remove(),this.moreButton&&(this.moreLabel.textContent=this.moreLabelValue,this.moreButton.replaceWith(this.moreButton.cloneNode(!0))),this.btnNext&&this.btnNext.replaceWith(this.btnNext.cloneNode(!0)),this.btnPrev&&this.btnPrev.replaceWith(this.btnPrev.cloneNode(!0)),this.attachClickListener&&document&&this.moreButton&&document.removeEventListener("click",this.closeMoreDropdown),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.tabsKey&&this.tabsKey.forEach((e=>{e.addEventListener("keydown",this.handleKeyboardOnTabs)})),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}shiftTabs(e){this.index="next"===e?this.index+1:this.index-1,this.index>=1?(this.btnPrev.style.display="flex",this.container.classList.add("ecl-tabs__container--left")):(this.btnPrev.style.display="none",this.container.classList.remove("ecl-tabs__container--left")),this.index>=this.total-1?(this.btnNext.style.display="none",this.container.classList.remove("ecl-tabs__container--right")):(this.btnNext.style.display="flex",this.container.classList.add("ecl-tabs__container--right"));var t=0;this.direction=getComputedStyle(this.element).direction,t="rtl"===this.direction?Math.ceil(this.list.offsetWidth-this.listItems[this.index].offsetLeft-this.listItems[this.index].offsetWidth):Math.ceil(this.listItems[this.index].offsetLeft);var i=Math.ceil(this.list.getBoundingClientRect().width-this.element.getBoundingClientRect().width);t>i&&(this.btnNext.style.display="none",this.container.classList.remove("ecl-tabs__container--right"),t=i),this.list.style.transitionDuration="0.4s","rtl"===this.direction?this.list.style.transform="translate3d("+t+"px, 0px, 0px)":this.list.style.transform="translate3d(-"+t+"px, 0px, 0px)"}handleClickOnToggle(e){this.dropdown.classList.toggle("ecl-tabs__dropdown--show"),this.moreButton.setAttribute("aria-expanded",this.dropdown.classList.contains("ecl-tabs__dropdown--show")),this.trigger("onToggle",e)}set onToggle(e){this.onToggleCallback=e}get onToggle(){return this.onToggleCallback}handleResize(){"none"===window.getComputedStyle(this.moreButton).display&&this.closeMoreDropdown(this),clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{if(this.list.style.transform="translate3d(0px, 0px, 0px)",Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<=480){this.isMobile=!0,this.index=1,this.list.style.transitionDuration="0.4s",this.shiftTabs(this.index),this.moreItem&&this.moreItem.classList.add("ecl-tabs__item--hidden"),this.moreButton&&this.moreButton.classList.add("ecl-tabs__toggle--hidden");var e=0;return this.listItems.forEach((t=>{t.classList.remove("ecl-tabs__item--hidden"),e+=Math.ceil(t.getBoundingClientRect().width)})),this.list.style.width=e+"px",this.btnNext.style.display="flex",this.container.classList.add("ecl-tabs__container--right"),this.btnPrev.style.display="none",this.container.classList.remove("ecl-tabs__container--left"),void this.tabsKeyEvents()}this.isMobile=!1,this.btnNext.style.display="none",this.container.classList.remove("ecl-tabs__container--right"),this.btnPrev.style.display="none",this.container.classList.remove("ecl-tabs__container--left"),this.list.style.width="auto";var t=this.moreButton.getBoundingClientRect().width+25,i=[],s=this.list.getBoundingClientRect().width;this.moreButtonActive=!1,this.listItems.forEach(((e,n)=>{e.classList.remove("ecl-tabs__item--hidden"),s>=t+e.getBoundingClientRect().width&&!i.includes(n-1)?t+=e.getBoundingClientRect().width:(e.classList.add("ecl-tabs__item--hidden"),e.childNodes[0].classList.contains("ecl-tabs__link--active")&&(this.moreButtonActive=!0),i.push(n))})),this.moreButtonActive?this.moreButton.classList.add("ecl-tabs__toggle--active"):this.moreButton.classList.remove("ecl-tabs__toggle--active"),i.length?(this.moreItem.classList.remove("ecl-tabs__item--hidden"),this.moreButton.classList.remove("ecl-tabs__toggle--hidden"),this.moreLabel.textContent=this.moreLabelValue.replace("%d",i.length),this.dropdownItems.forEach(((e,t)=>{i.includes(t)?e.classList.remove("ecl-tabs__item--hidden"):e.classList.add("ecl-tabs__item--hidden")}))):(this.moreItem.classList.add("ecl-tabs__item--hidden"),this.moreButton.classList.add("ecl-tabs__toggle--hidden")),this.tabsKeyEvents()}),100)}tabsKeyEvents(){this.tabsKey=[],this.listItems.forEach(((e,i,s)=>{var n=null;if(e.classList.contains("ecl-tabs__item--hidden")){var l=this.dropdownItems[i];n=t(".ecl-tabs__link",l)}else n=t(".ecl-tabs__link",e);n.addEventListener("keydown",this.handleKeyboardOnTabs),this.tabsKey.push(n),0===i&&(this.firstTab=n),i===s.length-1&&(this.lastTab=n)}))}closeMoreDropdown(e){for(var t=e.target;t;){if(t===this.moreButton)return;t=t.parentNode}this.moreButton.setAttribute("aria-expanded",!1),this.dropdown.classList.remove("ecl-tabs__dropdown--show")}handleKeyboardOnTabs(e){var t=e.currentTarget;switch(e.key){case"ArrowLeft":case"ArrowUp":this.arrowFocusToTab(t,"prev");break;case"ArrowRight":case"ArrowDown":this.arrowFocusToTab(t,"next");break;case"Home":this.moveFocus(this.firstTab);break;case"End":this.moveFocus(this.lastTab)}}moveFocus(e){e.closest(".ecl-tabs__dropdown")?(this.moreButton.setAttribute("aria-expanded",!0),this.dropdown.classList.add("ecl-tabs__dropdown--show")):(this.moreButton.setAttribute("aria-expanded",!1),this.dropdown.classList.remove("ecl-tabs__dropdown--show")),e.focus()}arrowFocusToTab(e,t){var i=this.tabsKey.indexOf(e);i="next"===t?i+1:i-1;var s="next"===t?this.firstTab:this.lastTab,n="next"===t?this.lastTab:this.firstTab;this.isMobile?e!==n&&(this.moveFocus(this.tabsKey[i]),this.shiftTabs(t)):e===n?this.moveFocus(s):this.moveFocus(this.tabsKey[i])}}class Qe{static autoInit(e,t){var i=(void 0===t?{}:t).TIMELINE,s=new Qe(e,void 0===i?{}:i);return s.init(),e.ECLTimeline=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.buttonSelector,n=void 0===s?"[data-ecl-timeline-button]":s,l=i.labelSelector,a=void 0===l?"[data-ecl-label]":l,r=i.labelExpanded,o=void 0===r?"data-ecl-label-expanded":r,h=i.labelCollapsed,c=void 0===h?"data-ecl-label-collapsed":h,d=i.attachClickListener,u=void 0===d||d;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.buttonSelector=n,this.labelSelector=a,this.labelExpanded=o,this.labelCollapsed=c,this.attachClickListener=u,this.button=null,this.label=null,this.handleClickOnButton=this.handleClickOnButton.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.button=t(this.buttonSelector,this.element),this.label=t(this.labelSelector,this.element),this.attachClickListener&&this.button&&this.button.addEventListener("click",this.handleClickOnButton),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.attachClickListener&&this.button&&this.button.removeEventListener("click",this.handleClickOnButton),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnButton(){var e="true"===this.button.getAttribute("aria-expanded");if(this.button.setAttribute("aria-expanded",e?"false":"true"),e)this.element.removeAttribute("data-ecl-timeline-expanded"),this.button.blur(),this.button.focus();else{this.element.setAttribute("data-ecl-timeline-expanded","true");var i=t(".ecl-timeline__item--collapsed",this.element);i&&(i.setAttribute("tabindex","-1"),i.focus({focusVisible:!1}),i.removeAttribute("tabindex"))}return this.label&&!e&&this.button.hasAttribute(this.labelExpanded)?this.label.innerHTML=this.button.getAttribute(this.labelExpanded):this.label&&e&&this.button.hasAttribute(this.labelCollapsed)&&(this.label.innerHTML=this.button.getAttribute(this.labelCollapsed)),this}}var Ze={autoInit:function(t){var i=void 0===t?{}:t,s=i.root,n=void 0===s?document:s,l=function(e,t){if(null==e)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;i[s]=e[s]}return i}(i,u);if(!ECL)throw new TypeError("Called autoInit but ECL is not present");var a=e("[data-ecl-auto-init]",n),r=()=>{a.filter((e=>"true"!==e.getAttribute("data-ecl-auto-initialized"))).forEach((e=>{var t=e.getAttribute("data-ecl-auto-init");if(!t)throw new TypeError("(ecl-auto-init) "+t+" data-ecl-auto-init is empty");var i=ECL[t];if("function"!=typeof i)throw new TypeError("(ecl-auto-init) Could not find '"+t+"'");if("function"!=typeof i.autoInit)throw new TypeError("(ecl-auto-init) Could not find autoInit for '"+t+"'");i.autoInit(e,l)}))};return r(),{update:()=>r(),destroy:()=>{ECL.components&&ECL.components.forEach(((e,t)=>{e.destroy&&(e.destroy(),ECL.components.delete(t))}))}}},Accordion:s,Banner:m,Carousel:p,CategoryFilter:v,Datepicker:g,Breadcrumb:b,ContentBlock:f,DescriptionList:y,Expandable:L,FileDownload:E,FileUpload:C,Gallery:ae,Indicator:re,InpageNavigation:Le,MediaContainer:Ee,MegaMenu:xe,Menu:Ae,Modal:_e,NewsTicker:Oe,Notification:Te,Popover:Pe,Range:Ie,Select:Ge,SiteHeader:Ye,Tabs:$e,Table:Xe,Timeline:Qe};"undefined"!=typeof globalThis?globalThis.ECL=Ze:"undefined"!=typeof window&&(window.ECL=Ze);export{Ze as ECL};ECL.version="5.0.0-alpha.2";
20
+ * Bowser - a browser detector
21
+ * https://github.com/lancedikson/bowser
22
+ * MIT License | (c) Dustin Diaz 2012-2015
23
+ * MIT License | (c) Denis Demchenko 2015-2019
24
+ */class Re{static getParser(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new Be(e,t)}static parse(e){return new Be(e).getResult()}static get BROWSER_MAP(){return we}static get ENGINE_MAP(){return _e}static get OS_MAP(){return Ae}static get PLATFORMS_MAP(){return Se}}class De{static autoInit(e,t){var i=(void 0===t?{}:t).MEGA_MENU,s=new De(e,void 0===i?{}:i);return s.init(),e.ECLMegaMenu=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.openSelector,a=void 0===n?"[data-ecl-mega-menu-open]":n,l=s.backSelector,r=void 0===l?"[data-ecl-mega-menu-back]":l,o=s.innerSelector,h=void 0===o?"[data-ecl-mega-menu-inner]":o,c=s.itemSelector,d=void 0===c?"[data-ecl-mega-menu-item]":c,u=s.linkSelector,m=void 0===u?"[data-ecl-mega-menu-link]":u,p=s.subLinkSelector,v=void 0===p?"[data-ecl-mega-menu-sublink]":p,g=s.megaSelector,b=void 0===g?"[data-ecl-mega-menu-mega]":g,f=s.containerSelector,y=void 0===f?"[data-ecl-has-container]":f,L=s.subItemSelector,C=void 0===L?"[data-ecl-mega-menu-subitem]":L,E=s.featuredAttribute,k=void 0===E?"[data-ecl-mega-menu-featured]":E,w=s.featuredLinkAttribute,S=void 0===w?"[data-ecl-mega-menu-featured-link]":w,A=s.labelOpenAttribute,_=void 0===A?"data-ecl-mega-menu-label-open":A,O=s.labelCloseAttribute,x=void 0===O?"data-ecl-mega-menu-label-close":O,T=s.attachClickListener,P=void 0===T||T,M=s.attachFocusListener,I=void 0===M||M,N=s.attachKeyListener,B=void 0===N||N,R=s.attachResizeListener,D=void 0===R||R;if(this.supportedEvents=["onOpen","onClose"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.openSelector=a,this.backSelector=r,this.innerSelector=h,this.itemSelector=d,this.linkSelector=m,this.subLinkSelector=v,this.megaSelector=b,this.subItemSelector=C,this.containerSelector=y,this.labelOpenAttribute=_,this.labelCloseAttribute=x,this.attachClickListener=P,this.attachFocusListener=I,this.attachKeyListener=B,this.attachResizeListener=D,this.featuredAttribute=k,this.featuredLinkAttribute=S,this.direction="ltr",this.open=null,this.toggleLabel=null,this.back=null,this.backItemLevel1=null,this.backItemLevel2=null,this.inner=null,this.items=null,this.links=null,this.isOpen=!1,this.resizeTimer=null,this.wrappers=null,this.isKeyEvent=!1,this.isDesktop=!1,this.isLarge=!1,this.lastVisibleItem=null,this.menuOverlay=null,this.currentItem=null,this.totalItemsWidth=0,this.breakpointL=1140,this.openPanel={num:0,item:{}},this.infoLinks=null,this.seeAllLinks=null,this.featuredLinks=null,this.handleClickOnOpen=this.handleClickOnOpen.bind(this),this.handleClickOnClose=this.handleClickOnClose.bind(this),this.handleClickOnToggle=this.handleClickOnToggle.bind(this),this.handleClickOnBack=this.handleClickOnBack.bind(this),this.handleClickGlobal=this.handleClickGlobal.bind(this),this.handleClickOnItem=this.handleClickOnItem.bind(this),this.handleClickOnSubitem=this.handleClickOnSubitem.bind(this),this.handleFocusOut=this.handleFocusOut.bind(this),this.handleKeyboard=this.handleKeyboard.bind(this),this.handleKeyboardGlobal=this.handleKeyboardGlobal.bind(this),this.handleResize=this.handleResize.bind(this),this.useDesktopDisplay=this.useDesktopDisplay.bind(this),this.closeOpenDropdown=this.closeOpenDropdown.bind(this),this.checkDropdownHeight=this.checkDropdownHeight.bind(this),this.positionMenuOverlay=this.positionMenuOverlay.bind(this),this.resetStyles=this.resetStyles.bind(this),this.handleFirstPanel=this.handleFirstPanel.bind(this),this.handleSecondPanel=this.handleSecondPanel.bind(this),this.disableScroll=this.disableScroll.bind(this),this.enableScroll=this.enableScroll.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.open=t(this.openSelector,this.element),this.back=t(this.backSelector,this.element),this.inner=t(this.innerSelector,this.element),this.btnPrevious=t(this.buttonPreviousSelector,this.element),this.btnNext=t(this.buttonNextSelector,this.element),this.items=e(this.itemSelector,this.element),this.subItems=e(this.subItemSelector,this.element),this.links=e(this.linkSelector,this.element),this.header=t(".ecl-site-header",document),this.headerBanner=t(".ecl-site-header__banner",document),this.wrappers=e(".ecl-mega-menu__wrapper",this.element),this.headerNotification=t(".ecl-site-header__notification",document),this.toggleLabel=t(".ecl-button__label",this.open),this.menuOverlay=t(".ecl-mega-menu__overlay",this.element),this.isDesktop=this.useDesktopDisplay(),this.attachClickListener&&(this.open&&this.open.addEventListener("click",this.handleClickOnToggle),this.back&&(this.back.addEventListener("click",this.handleClickOnBack),this.back.addEventListener("keyup",this.handleKeyboard)),this.attachClickListener&&document.addEventListener("click",this.handleClickGlobal)),this.links&&this.links.forEach(e=>{this.attachFocusListener&&e.addEventListener("focusout",this.handleFocusOut),this.attachKeyListener&&e.addEventListener("keyup",this.handleKeyboard)}),this.subItems&&this.subItems.forEach(e=>{var i=t(".ecl-mega-menu__sublink",e);this.attachKeyListener&&i&&(i.addEventListener("click",this.handleClickOnSubitem),i.addEventListener("keyup",this.handleKeyboard)),this.attachFocusListener&&i&&i.addEventListener("focusout",this.handleFocusOut)}),this.infoLinks=e(".ecl-mega-menu__info-link a",this.element),this.infoLinks.length>0&&this.infoLinks.forEach(e=>{this.attachKeyListener&&e.addEventListener("keyup",this.handleKeyboard),this.attachFocusListener&&e.addEventListener("blur",this.handleFocusOut)}),this.seeAllLinks=e(".ecl-mega-menu__see-all a",this.element),this.seeAllLinks.length>0&&this.seeAllLinks.forEach(e=>{this.attachKeyListener&&e.addEventListener("keyup",this.handleKeyboard),this.attachFocusListener&&e.addEventListener("blur",this.handleFocusOut)}),this.featuredLinks=e(this.featuredLinkAttribute,this.element),this.featuredLinks.length>0&&this.attachFocusListener&&this.featuredLinks.forEach(e=>{e.addEventListener("blur",this.handleFocusOut)}),this.attachKeyListener&&document.addEventListener("keyup",this.handleKeyboardGlobal),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.items&&this.items.forEach(e=>{if(this.totalItemsWidth+=e.offsetWidth,e.hasAttribute("data-ecl-has-children")||e.hasAttribute("data-ecl-has-container")){var i=t(this.linkSelector,e);this.attachClickListener&&i&&i.addEventListener("click",this.handleClickOnItem)}}),this.focusTrap=le(this.element,{onActivate:()=>this.element.classList.add("ecl-mega-menu-trap-is-active"),onDeactivate:()=>this.element.classList.remove("ecl-mega-menu-trap-is-active")}),this.handleResize(),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachClickListener&&(this.open&&this.open.removeEventListener("click",this.handleClickOnToggle),this.back&&this.back.removeEventListener("click",this.handleClickOnBack),document.removeEventListener("click",this.handleClickGlobal)),this.links&&this.links.forEach(e=>{this.attachClickListener&&e.removeEventListener("click",this.handleClickOnItem),this.attachFocusListener&&e.removeEventListener("focusout",this.handleFocusOut),this.attachKeyListener&&e.removeEventListener("keyup",this.handleKeyboard)}),this.subItems&&this.subItems.forEach(e=>{var i=t(".ecl-mega-menu__sublink",e);this.attachKeyListener&&i&&i.removeEventListener("keyup",this.handleKeyboard),this.attachClickListener&&i&&i.removeEventListener("click",this.handleClickOnSubitem),this.attachFocusListener&&i&&i.removeEventListener("focusout",this.handleFocusOut)}),this.infoLinks&&this.infoLinks.forEach(e=>{this.attachFocusListener&&e.removeEventListener("blur",this.handleFocusOut),this.attachKeyListener&&e.removeEventListener("keyup",this.handleKeyboard)}),this.seeAllLinks&&this.seeAllLinks.forEach(e=>{this.attachFocusListener&&e.removeEventListener("blur",this.handleFocusOut),this.attachKeyListener&&e.removeEventListener("keyup",this.handleKeyboard)}),this.featuredLinks&&this.attachFocusListener&&this.featuredLinks.forEach(e=>{e.removeEventListener("blur",this.handleFocusOut)}),this.attachKeyListener&&document.removeEventListener("keyup",this.handleKeyboardGlobal),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.closeOpenDropdown(),this.enableScroll(),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}disableScroll(){document.body.classList.add("ecl-mega-menu-prevent-scroll")}enableScroll(){document.body.classList.remove("ecl-mega-menu-prevent-scroll")}useDesktopDisplay(){var e=Re.getParser(window.navigator.userAgent),t="mobile"===e.getPlatformType(),i="tablet"===e.getPlatformType();return!t&&(i?(this.element.classList.add("ecl-mega-menu--forced-mobile"),!1):!(window.innerWidth<this.breakpointL)&&(this.element.classList.remove("ecl-mega-menu--forced-mobile"),!0))}resetStyles(i,s){var n=e(".ecl-mega-menu__info",this.element),a=e(".ecl-mega-menu__sublist",this.element);if(a&&"mobile"===i){var l=e("[data-ecl-mega-menu-mega]",this.element),r=e("[data-ecl-mega-menu-featured]",this.element);if(r.length&&l.push(...r),l.forEach(e=>{e.style.height=""}),a.length&&a.forEach(e=>{e.style.height=""}),this.wrappers&&this.wrappers.forEach(e=>{e.style.top="",e.style.height=""}),this.openPanel.num>0&&this.header&&(this.headerBanner&&(this.headerBanner.style.display="none"),this.headerNotification&&(this.headerNotification.style.display="none")),2===this.openPanel.num){var o=t(".ecl-mega-menu__subitem--expanded",this.element);o&&o.firstChild.classList.add("ecl-mega-menu__parent-link");var h=this.openPanel.item;h.parentNode.childNodes.forEach(e=>{e!==h&&(e.style.display="none")})}}else if(a&&"desktop"===i&&!s){a.forEach(e=>{e.classList.remove("ecl-mega-menu__sublist--scrollable"),e.childNodes.forEach(e=>{e.style.display=""})}),n.forEach(e=>{e.style.top=""});var c=[],d=t(".ecl-mega-menu__subitem--expanded",this.element);d&&(d.firstElementChild.classList.remove("ecl-mega-menu__parent-link"),c.push(d));var u=t(".ecl-mega-menu__item--expanded",this.element);u&&c.push(u),c.length>0?c.forEach(e=>{this.checkDropdownHeight(e)}):(this.element.removeAttribute("data-expanded"),this.open.setAttribute("aria-expanded","false"),this.enableScroll())}else if("desktop"===i&&s){var m=t(".ecl-mega-menu__subitem--expanded",this.element);m&&m.firstElementChild.classList.remove("ecl-mega-menu__parent-link"),n.forEach(e=>{e.style.height=""})}"desktop"===i&&this.header&&(this.headerBanner&&(this.headerBanner.style.display=""),this.headerNotification&&(this.headerNotification.style.display=""))}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{var e=window.innerWidth;void 0!==this.prevScreenWidth&&((this.prevScreenWidth<=this.breakpointL&&e>this.breakpointL||this.prevScreenWidth>this.breakpointL&&e<=this.breakpointL)&&this.resetStyles(e>this.breakpointL?"desktop":"mobile"),this.prevScreenWidth>=1368&&e>=1140&&this.resetStyles("desktop",!0));this.isDesktop=this.useDesktopDisplay(),this.isLarge=window.innerWidth>=1368,this.prevScreenWidth=e,this.element.classList.remove("ecl-mega-menu--forced-mobile"),this.direction=getComputedStyle(this.element).direction,"rtl"===this.direction?this.element.classList.add("ecl-mega-menu--rtl"):this.element.classList.remove("ecl-mega-menu--rtl");var i=t(".ecl-mega-menu__item--expanded",this.element);i&&this.isDesktop&&this.checkDropdownHeight(i),this.positionMenuOverlay()},200)}checkDropdownHeight(i,s){void 0===s&&(s=!0);var n=t(".ecl-mega-menu__info",i),a=t(".ecl-mega-menu__mega",i),l=t(".ecl-mega-menu__subitem--expanded",i),r=null;l&&(r=t(".ecl-mega-menu__mega--level-2",l)),a&&this.isDesktop&&s&&(a.style.opacity=0),n&&this.isDesktop&&s&&(n.style.opacity=0),r&&this.isDesktop&&s&&(r.opacity=0),setTimeout(()=>{var s=window.innerHeight,o=0;if(this.isDesktop){var h=[],c=0,d=null,u=null,m=0,p=0,v=0,g=0;if(n&&(n.style.height="",o=n.scrollHeight+16),n&&this.isLarge?h.push(o):n&&this.isDesktop&&(m=o,p=o,v=o,g=o),a){a.style.height="";var b=a.getBoundingClientRect().top,f=t(".ecl-mega-menu__sublist",a);if(f){var y=f.children;y.length>0&&(Array.from(y).forEach(e=>{m+=e.getBoundingClientRect().height}),h.push(m))}else{if(i.classList.contains("ecl-mega-menu__item--has-container")){var L=t(".ecl-mega-menu__mega-container",i);if(L)return L.firstElementChild.style.height=s-b+"px",void(a.style.opacity=1)}}(u=t(":scope > .ecl-mega-menu__featured",a))&&(Array.from(u.firstElementChild.children).forEach(e=>{var t=window.getComputedStyle(e),i=parseFloat(t.marginTop)+parseFloat(t.marginBottom);g+=e.offsetHeight+i}),g+=8,h.push(g))}if(r){r.style.height="";var C=e(""+this.subItemSelector,r);C.length>0&&C.forEach(e=>{p+=e.getBoundingClientRect().height}),h.push(p),(d=t(".ecl-mega-menu__featured",l))&&(Array.from(d.firstElementChild.children).forEach(e=>{var t=window.getComputedStyle(e),i=parseFloat(t.marginTop)+parseFloat(t.marginBottom);v+=e.offsetHeight+i}),v+=5,h.push(v))}var E=Math.max(...h),k=this.inner.getBoundingClientRect().bottom,w=.7*(window.innerHeight-k),S=parseFloat(window.getComputedStyle(t(".ecl-mega-menu__wrapper")).minHeight)||0;(c=E>w?w:E)<S&&(c=S);var A=t(".ecl-mega-menu__wrapper",i);A&&(A.style.height=c+"px"),a&&this.isLarge?a.style.height=c+"px":a&&n&&this.isDesktop&&(a.style.height=c-o+"px"),n&&this.isLarge&&(n.style.height=c+"px"),r&&this.isLarge?r.style.height=c+"px":r&&this.isDesktop&&(r.style.height=c-o+"px"),u&&this.isLarge?u.style.height=c+"px":u&&this.isDesktop&&(u.style.height=c-o+"px"),d&&this.isLarge?d.style.height=c+"px":d&&this.isDesktop&&(d.style.height=c-o+"px")}a&&this.isDesktop&&(a.style.opacity=1),n&&this.isDesktop&&(n.style.opacity=1),r&&this.isDesktop&&(r.style.opacity=1)},100)}positionMenuOverlay(){var e=0;this.isDesktop?setTimeout(()=>{var e=t(".ecl-site-header",document);if(e){var i=e.getBoundingClientRect().bottom,s=t(this.itemSelector,this.element).getBoundingClientRect().height;this.wrappers&&this.wrappers.forEach(e=>{e.style.top=s+"px"}),this.menuOverlay&&(this.menuOverlay.style.top=i+"px")}else{var n=this.element.getBoundingClientRect().bottom;this.menuOverlay&&(this.menuOverlay.style.top=n+"px")}},0):setTimeout(()=>{if(this.header){var i=this.header.getBoundingClientRect(),s=Math.round(i.bottom);this.menuOverlay&&(this.menuOverlay.style.top=s+"px"),this.inner&&(this.inner.style.top=s+"px");var n=t(".ecl-mega-menu__item--expanded",this.element);if(n){var a=t(".ecl-mega-menu__mega--has-featured",n),l=t(".ecl-mega-menu__info",n);if(l&&1===this.openPanel.num){var r=l.getBoundingClientRect().bottom;e=window.innerHeight-r-16}if(a){var o=a.getBoundingClientRect().top;e=e||window.innerHeight-o,a.style.height=e+"px"}else{var h=t(".ecl-mega-menu__sublist",n);if(h&&1===this.openPanel.num){var c=h.getBoundingClientRect().top;h.classList.add("ecl-mega-menu__sublist--scrollable"),e=e||window.innerHeight-c,h.style.height=e+"px"}else h&&(h.classList.remove("ecl-mega-menu__sublist--scrollable"),h.style.height="");if(2===this.openPanel.num){var d=t(".ecl-mega-menu__subitem--expanded",this.element);if(d){var u=t(".ecl-mega-menu__mega--level-2",d);if(u){var m=u.getBoundingClientRect().top;e=window.innerHeight-m,u.style.height=e+"px"}}}this.wrappers&&this.wrappers.forEach(e=>{e.style.top="",e.style.height=""})}}}},0)}handleKeyboard(i){var s=i.target,n=s.classList,a=this.element.getAttribute("data-expanded");if("Escape"===i.key||"Esc"===i.key)return document.activeElement===s&&s.blur(),void(a||this.closeOpenDropdown());if(n.contains("ecl-mega-menu__info-link")&&("ArrowUp"===i.key&&(this.isDesktop?t(".ecl-mega-menu__item--expanded button",this.element).focus():this.back&&!this.isDesktop&&this.back.focus()),"ArrowDown"!==i.key&&"ArrowRight"!==i.key||s.parentElement.parentElement.nextSibling.firstChild.firstChild.firstChild.focus()),n.contains("ecl-mega-menu__parent-link")){if("ArrowUp"===i.key)return void t(".ecl-mega-menu__back",this.element).focus();if("ArrowDown"===i.key)return void i.target.nextSibling.firstElementChild.firstElementChild.firstChild.focus()}if(s.parentElement.classList.contains("ecl-mega-menu__see-all")&&("ArrowUp"===i.key&&s.parentElement.previousSibling.firstChild.focus(),"ArrowDown"===i.key)){var l=s.parentElement.parentElement.nextSibling;if(l){var r=e(["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),l);r.length>0&&r[0].focus()}}if(n.contains("ecl-mega-menu__back")){if("ArrowDown"===i.key){i.preventDefault();var o=t('[aria-expanded="true"]',s.parentElement.nextSibling);if(o){var h=t(".ecl-mega-menu__subitem--expanded",o.parentElement);if(h){var c=t(".ecl-mega-menu__parent-link",h);c&&c.focus()}else{var d=t(".ecl-mega-menu__info-link",o.parentElement);d?d.focus():t(".ecl-mega-menu__subitem:first-child .ecl-mega-menu__sublink",o.parentElement).focus()}}}"ArrowUp"===i.key&&this.open.focus()}if(n.contains("ecl-mega-menu__link")){if("ArrowLeft"===i.key||"ArrowUp"===i.key){i.preventDefault();var u=s.previousSibling;if(u&&u.classList.contains("ecl-mega-menu__link"))return void u.focus();if(u=s.parentElement.previousSibling){var m=t(".ecl-mega-menu__link",u);if(m)return void m.focus()}}if("ArrowRight"===i.key||"ArrowDown"===i.key){if(i.preventDefault(),"true"===s.parentElement.getAttribute("aria-expanded")&&"ArrowDown"===i.key){var p=t(".ecl-mega-menu__info-link",s.parentElement);if(p)return void p.focus()}var v=s.parentElement.nextSibling;if(v){var g=t(".ecl-mega-menu__link",v);if(g)return void g.focus()}}}if(n.contains("ecl-mega-menu__sublink")){if("ArrowDown"===i.key){i.preventDefault();var b=s.parentElement.nextSibling,f="";if(b&&(!(f=t(".ecl-mega-menu__sublink",b))&&b.classList.contains("ecl-mega-menu__spacer")&&(f=b.nextSibling.firstElementChild),f))return void f.focus()}if("ArrowUp"===i.key){i.preventDefault();var y=s.parentElement.previousSibling;if(y){var L=t(".ecl-mega-menu__sublink",y);L&&L.focus()}else{var C=t(".ecl-mega-menu__info-link",s.parentElement.parentElement.parentElement.previousSibling);if(C)C.focus();else if(2===this.openPanel.num){var E=i.target.closest(".ecl-mega-menu__mega").previousSibling;E&&E.focus()}else this.back&&this.back.focus()}}}"ArrowRight"===i.key&&("true"===s.parentElement.getAttribute("aria-expanded")&&(i.preventDefault(),s.nextSibling.firstElementChild.firstChild.firstChild.focus()))}handleKeyboardGlobal(e){"Escape"!==e.key&&"Esc"!==e.key||this.isOpen&&this.closeOpenDropdown(!0)}handleClickOnOpen(e){if(this.isOpen)this.handleClickOnClose(e);else{e.preventDefault(),this.disableScroll(),this.element.setAttribute("data-expanded",!0),this.element.classList.add("ecl-mega-menu--start-panel"),this.element.classList.remove("ecl-mega-menu--one-panel","ecl-mega-menu--two-panels"),this.open.setAttribute("aria-expanded","true"),this.inner.setAttribute("aria-hidden","false"),this.isOpen=!0,this.header&&this.header.classList.add("ecl-site-header--open-menu","ecl-site-header--open-menu-start");var t=this.element.getAttribute(this.labelCloseAttribute);this.toggleLabel&&t&&(this.toggleLabel.innerHTML=t),this.positionMenuOverlay(),this.links.length>0&&this.links[0].focus(),this.trigger("onOpen",e)}}handleClickOnClose(e){this.element.getAttribute("data-expanded")?(this.focusTrap.deactivate(),this.closeOpenDropdown(),this.trigger("onClose",e)):this.handleClickOnOpen(e)}handleClickOnToggle(e){e.preventDefault(),this.isOpen?this.handleClickOnClose(e):this.handleClickOnOpen(e)}handleClickOnBack(){e(".ecl-mega-menu__info",this.element).forEach(e=>{e.style.top=""});var i=t(".ecl-mega-menu__subitem--expanded",this.element);if(i){this.element.classList.remove("ecl-mega-menu--two-panels","ecl-mega-menu--start-panel"),this.element.classList.add("ecl-mega-menu--one-panel"),this.element.classList.remove("ecl-mega-menu--has-secondary-featured"),i.setAttribute("aria-expanded","false"),i.classList.remove("ecl-mega-menu__subitem--expanded","ecl-mega-menu__subitem--current");var s=t(this.subLinkSelector,i);s.setAttribute("aria-expanded","false"),s.classList.remove("ecl-mega-menu__parent-link");var n=i.parentElement.childNodes;n&&n.forEach(e=>{e.style.display=""}),this.header&&this.header.classList.remove("ecl-site-header--open-menu-start"),this.backItemLevel2&&this.backItemLevel2.firstElementChild.focus(),this.openPanel.num=1}else this.header&&(this.headerBanner&&(this.headerBanner.style.display=""),this.headerNotification&&(this.headerNotification.style.display="")),this.inner.classList.remove("ecl-mega-menu__inner--expanded"),this.element.classList.remove("ecl-mega-menu--one-panel"),this.items.forEach(e=>{e.classList.remove("ecl-mega-menu__item--expanded","ecl-mega-menu__item--current"),t(this.linkSelector,e).setAttribute("aria-expanded","false")}),this.backItemLevel1?this.backItemLevel1.firstElementChild.focus():this.items[0].firstElementChild.focus(),this.openPanel.num=0,this.header&&this.header.classList.add("ecl-site-header--open-menu-start");this.positionMenuOverlay(),this.trigger("onBack",{level:i?2:1})}handleFirstPanel(e,i){switch(i){case"expand":this.inner.classList.add("ecl-mega-menu__inner--expanded"),this.positionMenuOverlay(),this.checkDropdownHeight(e),this.element.setAttribute("data-expanded",!0),this.element.classList.add("ecl-mega-menu--one-panel"),this.element.classList.remove("ecl-mega-menu--start-panel"),this.open.setAttribute("aria-expanded","true"),this.header&&(this.header.classList.add("ecl-site-header--open-menu"),this.header.classList.remove("ecl-site-header--open-menu-start"),this.isDesktop||(this.headerBanner&&(this.headerBanner.style.display="none"),this.headerNotification&&(this.headerNotification.style.display="none"))),this.disableScroll(),this.isOpen=!0,this.items.forEach(i=>{var s=t(this.linkSelector,i);s&&s.hasAttribute("aria-expanded")&&(i===e?(i.classList.add("ecl-mega-menu__item--expanded","ecl-mega-menu__item--current"),s.setAttribute("aria-expanded","true"),this.backItemLevel1=i):(s.setAttribute("aria-expanded","false"),i.classList.remove("ecl-mega-menu__item--current","ecl-mega-menu__item--expanded")))}),!this.isDesktop&&this.back&&this.back.focus(),this.openPanel={num:1,item:e};var s={panel:1,item:e};this.trigger("OnOpenPanel",s);break;case"collapse":this.closeOpenDropdown()}}handleSecondPanel(e,i){var s,n=t(".ecl-mega-menu__info",e.closest(".ecl-container"));switch(i){case"expand":this.element.classList.remove("ecl-mega-menu--one-panel","ecl-mega-menu--start-panel"),this.element.classList.add("ecl-mega-menu--two-panels"),this.subItems.forEach(i=>{var s=t(this.subLinkSelector,i);if(i===e){if(s&&s.hasAttribute("aria-expanded")){s.setAttribute("aria-expanded","true");var n=t(".ecl-mega-menu__mega",i);this.isDesktop?n.style.opacity=0:(s.classList.add("ecl-mega-menu__parent-link"),this.back&&this.back.focus()),i.classList.add("ecl-mega-menu__subitem--expanded")}i.classList.add("ecl-mega-menu__subitem--current"),t(".ecl-mega-menu__featured",i)?this.element.classList.add("ecl-mega-menu--has-secondary-featured"):this.element.classList.remove("ecl-mega-menu--has-secondary-featured"),this.backItemLevel2=i}else s&&s.hasAttribute("aria-expanded")&&(s.setAttribute("aria-expanded","false"),s.classList.remove("ecl-mega-menu__parent-link"),i.classList.remove("ecl-mega-menu__subitem--expanded")),i.classList.remove("ecl-mega-menu__subitem--current")}),this.openPanel={num:2,item:e},s=e.parentNode.childNodes,this.isDesktop?s.forEach(t=>{t!==e&&(t.style.display="")}):s.forEach(t=>{t!==e&&(t.style.display="none")}),this.positionMenuOverlay(),this.checkDropdownHeight(e.closest(".ecl-mega-menu__item"),!1);var a={panel:2,item:e};this.trigger("OnOpenPanel",a);break;case"collapse":this.element.classList.remove("ecl-mega-menu--two-panels"),this.element.classList.remove("ecl-mega-menu--has-secondary-featured"),this.openPanel={num:1},t(this.subLinkSelector,e).setAttribute("aria-expanded","false"),e.classList.remove("ecl-mega-menu__subitem--expanded","ecl-mega-menu__subitem--current"),n&&(n.style.top=""),this.positionMenuOverlay(),this.checkDropdownHeight(e.closest(".ecl-mega-menu__item"),!1)}}handleClickOnItem(e){var i=!1,s=e.target.closest("li"),n=t(".ecl-mega-menu__mega-container-scrollable",s);if(n&&(i=n.contains(e.target)),!e.target.classList.contains("ecl-mega-menu__mega-container-scrollable")&&!i){this.trigger("onItemClick",{item:s,event:e});var a=s.firstElementChild.getAttribute("aria-expanded");if(a&&s.classList.contains("ecl-mega-menu__item"))if(e.preventDefault(),e.stopPropagation(),this.isDesktop)"true"===a?this.handleFirstPanel(s,"collapse"):(this.closeOpenDropdown(),this.handleFirstPanel(s,"expand"));else this.handleFirstPanel(s,"expand")}}handleClickOnSubitem(e){var i=e.target.closest(this.subItemSelector);if(i&&i.firstElementChild.hasAttribute("aria-expanded")){if(t(".ecl-mega-menu__parent-link",i))return;e.preventDefault(),e.stopPropagation(),"true"===i.firstElementChild.getAttribute("aria-expanded")?this.handleSecondPanel(i,"collapse"):this.handleSecondPanel(i,"expand")}}closeOpenDropdown(i){void 0===i&&(i=!1),this.element.classList.remove("ecl-mega-menu--has-secondary-featured"),this.header&&(this.header.classList.remove("ecl-site-header--open-menu","ecl-site-header--open-menu-start"),this.headerBanner&&(this.headerBanner.style.display=""),this.headerNotification&&(this.headerNotification.style.display="")),this.enableScroll(),this.element.removeAttribute("data-expanded"),this.element.classList.remove("ecl-mega-menu--start-panel","ecl-mega-menu--two-panels","ecl-mega-menu--one-panel"),this.open.setAttribute("aria-expanded","false"),this.inner.classList.remove("ecl-mega-menu__inner--expanded"),e("[data-ecl-mega-menu-mega]",this.element).forEach(e=>{e.style.height="",e.style.top="",e.style.opacity=""}),this.wrappers&&this.wrappers.forEach(e=>{e.style=""});var s=!1;this.items.forEach(e=>{e.classList.remove("ecl-mega-menu__item--current");var i=t(this.linkSelector,e);"true"===i.getAttribute("aria-expanded")&&(e.classList.remove("ecl-mega-menu__item--expanded"),i.setAttribute("aria-expanded","false"),s=i)}),this.subItems.forEach(e=>{e.classList.remove("ecl-mega-menu__subitem--current"),e.style.display="";var i=t(this.subLinkSelector,e);i&&i.hasAttribute("aria-expanded")&&(e.classList.remove("ecl-mega-menu__subitem--expanded"),e.style.display="",i.setAttribute("aria-expanded","false"),i.classList.remove("ecl-mega-menu__parent-link"))});var n=e(".ecl-mega-menu__sublist");n&&n.forEach(e=>{e.classList.remove("ecl-mega-menu__sublist--no-border","ecl-mega-menu__sublist--scrollable")});var a=this.element.getAttribute(this.labelOpenAttribute);this.toggleLabel&&a&&(this.toggleLabel.innerHTML=a),this.openPanel={num:0,item:!1},this.focusTrap.deactivate(),!this.isDesktop&&this.open&&i?this.open.focus():this.isDesktop&&s&&i&&s.focus(),this.trigger("onFocusTrapToggle",{active:!1}),this.isOpen=!1}handleFocusOut(e){var t=e.target;if(this.element.getAttribute("data-expanded")&&!this.isDesktop&&!t.parentElement.nextSibling){var i=e.relatedTarget;this.element.contains(i)||(this.focusTrap.activate(),this.trigger("onFocusTrapToggle",{active:!0,lastFocusedEl:t.parentElement}))}}handleClickGlobal(e){e.target.classList.contains("ecl-mega-menu__mega-container-scrollable")||!e.target.classList.contains("ecl-mega-menu__overlay")&&this.element.contains(e.target)||!this.isOpen||this.closeOpenDropdown()}}class Fe{static autoInit(e,t){var i=(void 0===t?{}:t).MENU,s=new Fe(e,void 0===i?{}:i);return s.init(),e.ECLMenu=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.openSelector,a=void 0===n?"[data-ecl-menu-open]":n,l=s.closeSelector,r=void 0===l?"[data-ecl-menu-close]":l,o=s.backSelector,h=void 0===o?"[data-ecl-menu-back]":o,c=s.innerSelector,d=void 0===c?"[data-ecl-menu-inner]":c,u=s.listSelector,m=void 0===u?"[data-ecl-menu-list]":u,p=s.itemSelector,v=void 0===p?"[data-ecl-menu-item]":p,g=s.linkSelector,b=void 0===g?"[data-ecl-menu-link]":g,f=s.buttonPreviousSelector,y=void 0===f?"[data-ecl-menu-items-previous]":f,L=s.buttonNextSelector,C=void 0===L?"[data-ecl-menu-items-next]":L,E=s.caretSelector,k=void 0===E?"[data-ecl-menu-caret]":E,w=s.megaSelector,S=void 0===w?"[data-ecl-menu-mega]":w,A=s.subItemSelector,_=void 0===A?"[data-ecl-menu-subitem]":A,O=s.maxLines,x=void 0===O?2:O,T=s.maxLinesAttribute,P=void 0===T?"data-ecl-menu-max-lines":T,M=s.labelOpenAttribute,I=void 0===M?"data-ecl-menu-label-open":M,N=s.labelCloseAttribute,B=void 0===N?"data-ecl-menu-label-close":N,R=s.attachClickListener,D=void 0===R||R,F=s.attachTouchListener,z=void 0===F||F,H=s.attachHoverListener,K=void 0===H||H,V=s.attachFocusListener,G=void 0===V||V,W=s.attachKeyListener,U=void 0===W||W,j=s.attachResizeListener,q=void 0===j||j,X=s.onCloseCallback,Y=void 0===X?null:X,Q=s.onOpenCallback,Z=void 0===Q?null:Q;if(this.supportedEvents=["onOpen","onClose"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.openSelector=a,this.closeSelector=r,this.backSelector=h,this.innerSelector=d,this.listSelector=m,this.itemSelector=v,this.linkSelector=b,this.buttonPreviousSelector=y,this.buttonNextSelector=C,this.caretSelector=k,this.megaSelector=S,this.subItemSelector=_,this.maxLines=x,this.maxLinesAttribute=P,this.labelOpenAttribute=I,this.labelCloseAttribute=B,this.attachClickListener=D,this.attachTouchListener=z,this.attachHoverListener=K,this.attachFocusListener=G,this.attachKeyListener=U,this.attachResizeListener=q,this.onOpenCallback=Z,this.onCloseCallback=Y,this.direction="ltr",this.open=null,this.close=null,this.toggleLabel=null,this.back=null,this.backItem=null,this.inner=null,this.itemsList=null,this.items=null,this.links=null,this.btnPrevious=null,this.btnNext=null,this.isOpen=!1,this.resizeTimer=null,this.isKeyEvent=!1,this.isDesktop=!1,this.hasOverflow=!1,this.offsetLeft=0,this.lastVisibleItem=null,this.currentItem=null,this.totalItemsWidth=0,this.breakpointL=1140,this.windowWidth=null,this.ignorehover=!1,this.handleClickOnOpen=this.handleClickOnOpen.bind(this),this.handleClickOnClose=this.handleClickOnClose.bind(this),this.handleClickOnToggle=this.handleClickOnToggle.bind(this),this.handleClickOnBack=this.handleClickOnBack.bind(this),this.handleClickOnNextItems=this.handleClickOnNextItems.bind(this),this.handleClickOnPreviousItems=this.handleClickOnPreviousItems.bind(this),this.handleClickOnCaret=this.handleClickOnCaret.bind(this),this.handleClickGlobal=this.handleClickGlobal.bind(this),this.openItem=this.openItem.bind(this),this.closeItem=this.closeItem.bind(this),this.handleTouchOnCaret=this.handleTouchOnCaret.bind(this),this.handleHoverOnItem=this.handleHoverOnItem.bind(this),this.handleHoverOffItem=this.handleHoverOffItem.bind(this),this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyboard=this.handleKeyboard.bind(this),this.handleKeyboardGlobal=this.handleKeyboardGlobal.bind(this),this.handleResize=this.handleResize.bind(this),this.useDesktopDisplay=this.useDesktopDisplay.bind(this),this.checkMenuOverflow=this.checkMenuOverflow.bind(this),this.checkMenuItem=this.checkMenuItem.bind(this),this.checkMegaMenu=this.checkMegaMenu.bind(this),this.closeOpenDropdown=this.closeOpenDropdown.bind(this),this.positionMenuOverlay=this.positionMenuOverlay.bind(this),this.disableScroll=this.disableScroll.bind(this),this.enableScroll=this.enableScroll.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.direction=getComputedStyle(this.element).direction,this.open=t(this.openSelector,this.element),this.close=t(this.closeSelector,this.element),this.toggleLabel=t(".ecl-button__label",this.open),this.back=t(this.backSelector,this.element),this.inner=t(this.innerSelector,this.element),this.itemsList=t(this.listSelector,this.element),this.btnPrevious=t(this.buttonPreviousSelector,this.element),this.btnNext=t(this.buttonNextSelector,this.element),this.items=e(this.itemSelector,this.element),this.subItems=e(this.subItemSelector,this.element),this.links=e(this.linkSelector,this.element),this.carets=e(this.caretSelector,this.element);var i=this.element.getAttribute(this.maxLinesAttribute);i&&(this.maxLines=i),this.isDesktop=this.useDesktopDisplay(),this.attachClickListener&&(this.open&&this.open.addEventListener("click",this.handleClickOnToggle),this.close&&this.close.addEventListener("click",this.handleClickOnClose),this.back&&this.back.addEventListener("click",this.handleClickOnBack),this.btnPrevious&&this.btnPrevious.addEventListener("click",this.handleClickOnPreviousItems),this.btnNext&&this.btnNext.addEventListener("click",this.handleClickOnNextItems),this.attachClickListener&&document.addEventListener("click",this.handleClickGlobal)),this.links&&this.links.forEach(e=>{this.attachFocusListener&&(e.addEventListener("focusin",this.closeOpenDropdown),e.addEventListener("focusin",this.handleFocusIn)),this.attachKeyListener&&e.addEventListener("keyup",this.handleKeyboard)}),this.carets&&this.carets.forEach(e=>{this.attachFocusListener&&e.addEventListener("focusin",this.handleFocusIn),this.attachKeyListener&&e.addEventListener("keyup",this.handleKeyboard),this.attachClickListener&&e.addEventListener("click",this.handleClickOnCaret),e.parentElement.hasAttribute("data-ecl-has-children")&&this.attachTouchListener&&e.addEventListener("touchstart",this.handleTouchOnCaret)}),this.subItems&&this.subItems.forEach(e=>{var i=t(".ecl-menu__sublink",e);this.attachKeyListener&&i&&i.addEventListener("keyup",this.handleKeyboard)}),this.attachKeyListener&&document.addEventListener("keyup",this.handleKeyboardGlobal),this.attachResizeListener&&(this.windowWidth=window.innerWidth,window.addEventListener("resize",this.handleResize)),this.items&&this.items.forEach(e=>{this.checkMenuItem(e),this.totalItemsWidth+=e.offsetWidth,e.hasAttribute("data-ecl-has-children")&&this.attachHoverListener&&(e.addEventListener("mouseover",this.handleHoverOnItem),e.addEventListener("mouseout",this.handleHoverOffItem))}),this.positionMenuOverlay(),this.checkMenuOverflow(),this.currentItem&&("false"===this.currentItem.getAttribute("data-ecl-menu-item-visible")?this.btnNext.classList.add("ecl-menu__item--current"):this.btnPrevious.classList.add("ecl-menu__item--current")),this.focusTrap=le(this.element,{clickOutsideDeactivates:!0,onActivate:()=>this.element.classList.add("trap-is-active"),onDeactivate:()=>this.element.classList.remove("trap-is-active")}),"rtl"===this.direction&&this.element.classList.add("ecl-menu--rtl"),setTimeout(()=>{this.element.classList.add("ecl-menu--transition")},500),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachClickListener&&(this.open&&this.open.removeEventListener("click",this.handleClickOnToggle),this.close&&this.close.removeEventListener("click",this.handleClickOnClose),this.back&&this.back.removeEventListener("click",this.handleClickOnBack),this.btnPrevious&&this.btnPrevious.removeEventListener("click",this.handleClickOnPreviousItems),this.btnNext&&this.btnNext.removeEventListener("click",this.handleClickOnNextItems),this.attachClickListener&&document.removeEventListener("click",this.handleClickGlobal)),this.attachKeyListener&&this.carets&&this.carets.forEach(e=>{e.removeEventListener("keyup",this.handleKeyboard)}),this.items&&this.isDesktop&&this.items.forEach(e=>{e.hasAttribute("data-ecl-has-children")&&this.attachHoverListener&&(e.removeEventListener("mouseover",this.handleHoverOnItem),e.removeEventListener("mouseout",this.handleHoverOffItem))}),this.links&&this.links.forEach(e=>{this.attachFocusListener&&(e.removeEventListener("focusin",this.closeOpenDropdown),e.removeEventListener("focusin",this.handleFocusIn)),this.attachKeyListener&&e.removeEventListener("keyup",this.handleKeyboard)}),this.carets&&this.carets.forEach(e=>{this.attachFocusListener&&e.removeEventListener("focusin",this.handleFocusIn),this.attachKeyListener&&e.removeEventListener("keyup",this.handleKeyboard),this.attachClickListener&&e.removeEventListener("click",this.handleClickOnCaret)}),this.subItems&&this.subItems.forEach(e=>{var i=t(".ecl-menu__sublink",e);this.attachKeyListener&&i&&i.removeEventListener("keyup",this.handleKeyboard)}),this.attachKeyListener&&document.removeEventListener("keyup",this.handleKeyboardGlobal),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}disableScroll(){document.body.classList.add("no-scroll")}enableScroll(){document.body.classList.remove("no-scroll")}useDesktopDisplay(){var e=Re.getParser(window.navigator.userAgent),t="mobile"===e.getPlatformType(),i="tablet"===e.getPlatformType();return!t&&(i?(this.element.classList.add("ecl-menu--forced-mobile"),!1):!(window.innerWidth<this.breakpointL)&&(this.element.classList.remove("ecl-menu--forced-mobile"),!0))}handleResize(){window.innerWidth!==this.windowWidth&&(document.documentElement.scrollTop=0,document.body.scrollTop=0,this.element.classList.remove("ecl-menu--transition"),"rtl"===this.direction?this.element.classList.add("ecl-menu--rtl"):this.element.classList.remove("ecl-menu--rtl"),clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.element.classList.remove("ecl-menu--forced-mobile"),this.isDesktop=this.useDesktopDisplay(),this.isDesktop&&this.focusTrap.deactivate(),this.totalItemsWidth=0,this.items&&this.items.forEach(e=>{this.checkMenuItem(e),this.totalItemsWidth+=e.offsetWidth}),this.checkMenuOverflow(),this.positionMenuOverlay(),this.element.classList.add("ecl-menu--transition"),this.windowWidth=window.innerWidth},200))}positionMenuOverlay(){var e=t(".ecl-menu__overlay",this.element);this.isDesktop?(this.enableScroll(),this.inner&&(this.inner.style.top=""),e&&(e.style.top="")):(this.isOpen&&this.disableScroll(),setTimeout(()=>{var i=t(".ecl-site-header__header",document);if(i){var s=i.getBoundingClientRect(),n=Math.round(s.bottom);e&&(e.style.top=n+"px"),this.inner&&(this.inner.style.top=n+"px")}},500))}checkMenuOverflow(){if(this.itemsList||(this.itemsList=t(".ecl-menu__list",this.element)),this.itemsList&&this.inner&&this.btnNext&&this.btnPrevious&&this.items){if(this.hasOverflow=this.totalItemsWidth>this.inner.offsetWidth+16,!this.hasOverflow||!this.isDesktop)return this.btnPrevious&&(this.btnPrevious.style.display="none"),this.btnNext&&(this.btnNext.style.display="none"),this.itemsList&&(this.itemsList.style.left="0"),this.inner&&this.inner.classList.remove("ecl-menu__inner--has-overflow"),this.offsetLeft=0,this.totalItemsWidth=0,void(this.lastVisibleItem=null);this.inner&&this.inner.classList.add("ecl-menu__inner--has-overflow"),this.items&&this.items.forEach(e=>{e.removeAttribute("data-ecl-menu-item-visible")}),0===this.offsetLeft?(this.btnNext.style.display="flex","rtl"===this.direction?this.items.every(e=>e.getBoundingClientRect().left<this.itemsList.getBoundingClientRect().left?(this.lastVisibleItem=e,!1):(e.setAttribute("data-ecl-menu-item-visible",!0),!0)):this.items.every(e=>e.getBoundingClientRect().right>this.itemsList.getBoundingClientRect().right?(this.lastVisibleItem=e,!1):(e.setAttribute("data-ecl-menu-item-visible",!0),!0))):"rtl"===this.direction?this.items.forEach(e=>{e.getBoundingClientRect().right<=this.inner.getBoundingClientRect().right&&e.setAttribute("data-ecl-menu-item-visible",!0)}):this.items.forEach(e=>{e.getBoundingClientRect().left>=this.inner.getBoundingClientRect().left&&e.setAttribute("data-ecl-menu-item-visible",!0)})}}checkMenuItem(e){var i=t(this.linkSelector,e);if(e.classList.contains("ecl-menu__item--current")&&(this.currentItem=e),this.isDesktop){if(!(this.maxLines<1)){e.style.alignItems="flex-start";for(var s=i.offsetWidth,n=window.getComputedStyle(i),a=parseInt(n.lineHeight,10)*this.maxLines+parseInt(n.paddingTop,10)+parseInt(n.paddingBottom,10);i.offsetHeight>a&&(i.style.width=(s+=1)+"px",!(s>1e3)););e.style.alignItems="unset"}}else i.style.width="auto"}checkMegaMenu(i){var s=t(this.megaSelector,i);if(s&&this.inner){var n=e(this.subItemSelector,s);if(n.length<5)i.classList.add("ecl-menu__item--col1");else if(n.length<9)i.classList.add("ecl-menu__item--col2");else{if(!(n.length<13))return i.classList.add("ecl-menu__item--full"),void("rtl"===this.direction?s.style.right=this.offsetLeft+"px":s.style.left=this.offsetLeft+"px");i.classList.add("ecl-menu__item--col3")}var a=s.getBoundingClientRect(),l=this.inner.getBoundingClientRect(),r=i.getBoundingClientRect(),o=a.width,h=l.width;r.left-l.left+o>h?s.classList.add("ecl-menu__mega--rtl"):s.classList.remove("ecl-menu__mega--rtl")}}handleKeyboard(e){var i=e.target,s=i.classList,n=this.element.getAttribute("data-expanded"),a=i.closest(this.itemSelector);if("Escape"!==e.key&&"Esc"!==e.key){if(s.contains("ecl-menu__button-caret")&&"false"===n&&"ArrowDown"===e.key){e.preventDefault();var l=t(".ecl-menu__sublink:first-of-type",a);if(l)return this.handleHoverOnItem(e),void l.focus()}if(s.contains("ecl-menu__link")||s.contains("ecl-menu__button-caret")){if("ArrowLeft"===e.key||"ArrowUp"===e.key){e.preventDefault();var r=i.previousSibling;if(r&&r.classList.contains("ecl-menu__link"))return void r.focus();if(r=i.parentElement.previousSibling){var o=r.classList.contains("ecl-menu__item--has-children")?".ecl-menu__button-caret":".ecl-menu__link",h=t(o,r);if(h)return void h.focus()}}if("ArrowRight"===e.key||"ArrowDown"===e.key){e.preventDefault();var c=i.nextSibling;if(c&&c.classList.contains("ecl-menu__button-caret"))return void c.focus();if(c=i.parentElement.nextSibling){var d=t(".ecl-menu__link",c);d&&d.focus()}}}if(s.contains("ecl-menu__sublink")){if("ArrowDown"===e.key){var u=i.parentElement.nextSibling;if(u){var m=t(".ecl-menu__sublink",u);if(m)return void m.focus()}}if("ArrowUp"===e.key){var p=i.parentElement.previousSibling;if(p){var v=t(".ecl-menu__sublink",p);v&&v.focus()}else{var g=t(this.itemSelector+'[aria-expanded="true"] '+this.caretSelector,this.element);g&&g.focus()}}}}else if(document.activeElement===i&&i.blur(),!n){var b=t(".ecl-menu__button-caret",a);b&&b.focus(),this.closeOpenDropdown()}}handleKeyboardGlobal(e){var t=this.element.getAttribute("data-expanded");"Escape"!==e.key&&"Esc"!==e.key||(t&&this.handleClickOnClose(),this.items.forEach(e=>{e.setAttribute("aria-expanded","false")}),this.carets.forEach(e=>{e.setAttribute("aria-expanded","false")}))}handleClickOnOpen(e){e.preventDefault(),this.element.setAttribute("data-expanded",!0),this.inner.setAttribute("aria-hidden","false"),this.disableScroll(),this.open.setAttribute("aria-expanded","true"),this.isOpen=!0,this.focusTrap.activate();var t=this.element.getAttribute(this.labelCloseAttribute);return this.toggleLabel&&t&&(this.toggleLabel.innerHTML=t),this.links.length>0&&this.links[0].focus(),this.trigger("onOpen",e),this}handleClickOnClose(e){this.element.removeAttribute("data-expanded"),this.inner.classList.remove("ecl-menu__inner--expanded"),this.inner.setAttribute("aria-hidden","true"),this.open.setAttribute("aria-expanded","false"),this.items.forEach(e=>{e.classList.remove("ecl-menu__item--expanded"),e.setAttribute("aria-expanded","false")});var t=this.element.getAttribute(this.labelOpenAttribute);return this.toggleLabel&&t&&(this.toggleLabel.innerHTML=t),this.enableScroll(),this.focusTrap.deactivate(),this.isOpen=!1,this.trigger("onClose",e),this}handleClickOnToggle(e){e.preventDefault(),this.isOpen?this.handleClickOnClose(e):this.handleClickOnOpen(e)}handleClickOnBack(){if(this.inner.classList.remove("ecl-menu__inner--expanded"),this.items.forEach(e=>{e.classList.remove("ecl-menu__item--expanded"),e.setAttribute("aria-expanded","false")}),this.backItem){var e=t(this.caretSelector,this.backItem);e&&e.focus()}return this}handleClickOnPreviousItems(){this.itemsList&&this.btnNext&&(this.offsetLeft=0,"rtl"===this.direction?(this.itemsList.style.right="0",this.itemsList.style.left="auto"):(this.itemsList.style.left="0",this.itemsList.style.right="auto"),this.btnPrevious.style.display="none",this.btnNext.style.display="flex",this.items&&this.items.forEach(e=>{this.checkMenuItem(e),e.toggleAttribute("data-ecl-menu-item-visible")}))}handleClickOnNextItems(){this.itemsList&&this.items&&this.btnPrevious&&this.lastVisibleItem&&(this.btnPrevious.style.display="flex",this.btnNext.style.display="none","rtl"===this.direction?(this.offsetLeft=this.itemsList.getBoundingClientRect().right-this.lastVisibleItem.getBoundingClientRect().right-this.btnPrevious.offsetWidth,this.itemsList.style.right="-"+this.offsetLeft+"px",this.itemsList.style.left="auto"):(this.offsetLeft=this.lastVisibleItem.getBoundingClientRect().left-this.itemsList.getBoundingClientRect().left-this.btnPrevious.offsetWidth,this.itemsList.style.left="-"+this.offsetLeft+"px",this.itemsList.style.right="auto"),this.items&&this.items.forEach(e=>{this.checkMenuItem(e),e.toggleAttribute("data-ecl-menu-item-visible")}))}handleClickOnCaret(e){var i=this.element.getAttribute("data-expanded"),s=e.target.closest(this.itemSelector);if(i){this.inner.classList.add("ecl-menu__inner--expanded"),this.items.forEach(e=>{e===s?(e.classList.add("ecl-menu__item--expanded"),e.setAttribute("aria-expanded","true"),this.backItem=e):(e.classList.remove("ecl-menu__item--expanded"),e.setAttribute("aria-expanded","false"))}),this.checkMegaMenu(s);var n=t(".ecl-menu__subitem:first-of-type .ecl-menu__sublink",s);n&&n.focus(),this.ignorehover=!1}else"true"===s.getAttribute("aria-expanded")?this.closeItem(e):this.openItem(e)}openItem(e){var i=e.target.closest(this.itemSelector);this.hasOverflow&&!i.hasAttribute("data-ecl-menu-item-visible")||(this.items.forEach(e=>{var s=t(this.caretSelector,e);e===i?(e.setAttribute("aria-expanded","true"),s&&s.setAttribute("aria-expanded","true")):(e.setAttribute("aria-expanded","false"),s&&(s.setAttribute("aria-expanded","false"),s.blur()))}),this.checkMegaMenu(i))}closeItem(e){var i=e.target.closest(this.itemSelector);i.setAttribute("aria-expanded","false");var s=t(this.caretSelector,i);return s&&s.setAttribute("aria-expanded","false"),this}handleTouchOnCaret(){this.ignorehover=!0}handleHoverOnItem(e){this.ignorehover||this.openItem(e)}handleHoverOffItem(e){this.ignorehover||this.closeItem(e)}closeOpenDropdown(){var e=t(this.itemSelector+"[aria-expanded='true']",this.element);if(e){e.setAttribute("aria-expanded","false");var i=t(this.caretSelector,e);i&&i.setAttribute("aria-expanded","false")}}handleFocusIn(e){var t=e.target;this.isDesktop&&this.hasOverflow&&(t.closest("[data-ecl-menu-item]").hasAttribute("data-ecl-menu-item-visible")||(0===this.offsetLeft?this.handleClickOnNextItems():this.handleClickOnPreviousItems()))}handleClickGlobal(e){this.isOpen&&(this.inner.contains(e.target)||this.open.contains(e.target)||this.handleClickOnClose(e))}}class ze{static autoInit(e,t){var i=(void 0===t?{}:t).MODAL,s=new ze(e,void 0===i?{}:i);return s.init(),e.ECLModal=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.toggleSelector,n=void 0===s?"":s,a=i.closeSelector,l=void 0===a?"[data-ecl-modal-close]":a,r=i.scrollSelector,o=void 0===r?"[data-ecl-modal-scroll]":r,h=i.attachClickListener,c=void 0===h||h,d=i.attachKeyListener,u=void 0===d||d;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.toggleSelector=n,this.closeSelector=l,this.scrollSelector=o,this.attachClickListener=c,this.attachKeyListener=u,this.toggle=null,this.close=null,this.scroll=null,this.focusTrap=null,this.openModal=this.openModal.bind(this),this.closeModal=this.closeModal.bind(this),this.handleClickOnToggle=this.handleClickOnToggle.bind(this),this.handleKeyboardGlobal=this.handleKeyboardGlobal.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.attachKeyListener&&document.addEventListener("keyup",this.handleKeyboardGlobal),""===this.toggleSelector&&(this.toggleSelector="#"+this.element.getAttribute("data-ecl-modal-toggle")),this.toggle=document.querySelector(this.toggleSelector),this.toggle&&(this.toggle.setAttribute("aria-controls",this.element.id),this.toggle.getAttribute("aria-haspopup")||this.toggle.setAttribute("aria-haspopup","dialog")),this.close=e(this.closeSelector,this.element),this.scroll=t(this.scrollSelector,this.element),this.focusTrap=le(this.element),this.isDialogSupported=!0,window.HTMLDialogElement||(this.isDialogSupported=!1),this.toggle&&this.attachClickListener&&this.toggle.addEventListener("click",this.handleClickOnToggle),this.close&&this.attachClickListener&&this.close.forEach(e=>{e.addEventListener("click",this.closeModal)}),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.toggle&&this.attachClickListener&&this.toggle.removeEventListener("click",this.handleClickOnToggle),this.attachKeyListener&&document.removeEventListener("keyup",this.handleKeyboardGlobal),this.close&&this.attachClickListener&&this.close.forEach(e=>{e.removeEventListener("click",this.closeModal)}),this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element)}checkScroll(){this.scroll&&(this.scroll.parentNode.classList.remove("ecl-modal__body--has-scroll"),this.scroll.scrollHeight>this.scroll.clientHeight&&this.scroll.parentNode.classList.add("ecl-modal__body--has-scroll"))}handleClickOnToggle(e){e.preventDefault(),"true"===this.toggle.getAttribute("aria-expanded")?this.closeModal():this.openModal()}openModal(){this.isDialogSupported?this.element.showModal():this.element.setAttribute("open",""),this.checkScroll(),this.focusTrap.activate()}closeModal(){this.isDialogSupported?this.element.close():this.element.removeAttribute("open"),this.focusTrap.active&&this.focusTrap.deactivate()}handleKeyboardGlobal(e){"Escape"!==e.key&&"Esc"!==e.key||this.closeModal()}}class He{static autoInit(e,t){var i=(void 0===t?{}:t).NEWS_TICKER,s=new He(e,void 0===i?{}:i);return s.init(),e.ECLNewsTicker=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.playSelector,n=void 0===s?"[data-ecl-news-ticker-play]":s,a=i.pauseSelector,l=void 0===a?"[data-ecl-news-ticker-pause]":a,r=i.prevSelector,o=void 0===r?"[data-ecl-news-ticker-prev]":r,h=i.nextSelector,c=void 0===h?"[data-ecl-news-ticker-next]":h,d=i.containerClass,u=void 0===d?".ecl-news-ticker__container":d,m=i.contentClass,p=void 0===m?".ecl-news-ticker__content":m,v=i.slidesClass,g=void 0===v?".ecl-news-ticker__slides":v,b=i.slideClass,f=void 0===b?".ecl-news-ticker__slide":b,y=i.currentSlideClass,L=void 0===y?".ecl-news-ticker__counter--current":y,C=i.controlsClass,E=void 0===C?".ecl-news-ticker__controls":C,k=i.attachClickListener,w=void 0===k||k,S=i.attachResizeListener,A=void 0===S||S;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.playSelector=n,this.pauseSelector=l,this.prevSelector=o,this.nextSelector=c,this.containerClass=u,this.contentClass=p,this.slidesClass=g,this.slideClass=f,this.currentSlideClass=L,this.controlsClass=E,this.attachClickListener=w,this.attachResizeListener=A,this.container=null,this.content=null,this.slides=null,this.btnPlay=null,this.btnPause=null,this.btnPrev=null,this.btnNext=null,this.index=1,this.total=0,this.allowShift=!0,this.autoPlay=null,this.autoPlayInterval=null,this.hoverAutoPlay=null,this.resizeTimer=null,this.cloneFirstSLide=null,this.cloneLastSLide=null,this.resizeTimer=null,this.handleAutoPlay=this.handleAutoPlay.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.shiftSlide=this.shiftSlide.bind(this),this.checkIndex=this.checkIndex.bind(this),this.moveSlides=this.moveSlides.bind(this),this.handleResize=this.handleResize.bind(this),this.handleFocus=this.handleFocus.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.btnPlay=t(this.playSelector,this.element),this.btnPause=t(this.pauseSelector,this.element),this.btnPrev=t(this.prevSelector,this.element),this.btnNext=t(this.nextSelector,this.element),this.slidesContainer=t(this.slidesClass,this.element),this.container=t(this.containerClass,this.element),this.content=t(this.contentClass,this.element),this.controls=t(this.controlsClass,this.element),this.slides=e(this.slideClass,this.element),this.total=this.slides.length,this.total<=1&&this.controls)return this.content.style.height="auto",this.controls.style.display="none",!1;var i=this.slides[0],s=this.slides[this.slides.length-1];return this.cloneFirstSLide=i.cloneNode(!0),this.cloneLastSLide=s.cloneNode(!0),this.slidesContainer.appendChild(this.cloneFirstSLide),this.slidesContainer.insertBefore(this.cloneLastSLide,i),this.slides=e(this.slideClass,this.element),this.handleResize(),this.handleAutoPlay(),this.attachClickListener&&this.btnPlay&&this.btnPause&&(this.btnPlay.addEventListener("click",this.handleAutoPlay),this.btnPause.addEventListener("click",this.handleAutoPlay)),this.attachClickListener&&this.btnNext&&this.btnNext.addEventListener("click",this.shiftSlide.bind(this,1,!0)),this.attachClickListener&&this.btnPrev&&this.btnPrev.addEventListener("click",this.shiftSlide.bind(this,-1,!0)),this.slidesContainer&&(this.slidesContainer.addEventListener("transitionend",this.checkIndex),this.slidesContainer.addEventListener("mouseover",this.handleMouseOver),this.slidesContainer.addEventListener("mouseout",this.handleMouseOut)),this.container&&this.container.addEventListener("focus",this.handleFocus,!0),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this),this}destroy(){this.cloneFirstSLide&&this.cloneLastSLide&&(this.cloneFirstSLide.remove(),this.cloneLastSLide.remove()),this.btnPlay&&this.btnPlay.replaceWith(this.btnPlay.cloneNode(!0)),this.btnPause&&this.btnPause.replaceWith(this.btnPause.cloneNode(!0)),this.btnNext&&this.btnNext.replaceWith(this.btnNext.cloneNode(!0)),this.btnPrev&&this.btnPrev.replaceWith(this.btnPrev.cloneNode(!0)),this.slidesContainer&&(this.slidesContainer.removeEventListener("transitionend",this.checkIndex),this.slidesContainer.removeEventListener("mouseover",this.handleMouseOver),this.slidesContainer.removeEventListener("mouseout",this.handleMouseOut)),this.container&&this.container.removeEventListener("focus",this.handleFocus,!0),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.autoPlayInterval&&(clearInterval(this.autoPlayInterval),this.autoPlay=null),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}shiftSlide(e,t){this.allowShift&&(this.index=1===e?this.index+1:this.index-1,this.moveSlides(!0)),t&&this.autoPlay&&this.handleAutoPlay(),this.allowShift=!1}moveSlides(e){var t=this.slides[this.index].offsetTop,i=Math.floor(this.slides[this.index].getBoundingClientRect().height);this.content.style.height=i+"px",this.slidesContainer.style.transitionDuration=e?"0.4s":"1ms",this.slidesContainer.style.transform="translate3d(0px, -"+t+"px, 0px)"}checkIndex(){0===this.index&&(this.index=this.total,this.moveSlides(!1)),this.index===this.total+1&&(this.index=1,this.moveSlides(!1)),t(this.currentSlideClass,this.element).textContent=this.index,this.slides&&this.slides.forEach((e,i)=>{var s=t(".ecl-link",e);this.index===i?(e.removeAttribute("inert","true"),s&&s.removeAttribute("tabindex",-1)):(e.setAttribute("inert","true"),s&&s.setAttribute("tabindex",-1))}),this.allowShift=!0}handleAutoPlay(){if(this.autoPlay){clearInterval(this.autoPlayInterval),this.autoPlay=!1;var e=document.activeElement===this.btnPause;this.btnPlay.style.display="flex",this.btnPause.style.display="none",e&&this.btnPlay.focus()}else{this.autoPlayInterval=setInterval(()=>{this.shiftSlide(1)},5e3),this.autoPlay=!0;var t=document.activeElement===this.btnPlay;this.btnPlay.style.display="none",this.btnPause.style.display="flex",t&&this.btnPause.focus()}}handleMouseOver(){return this.hoverAutoPlay=this.autoPlay,this.hoverAutoPlay&&this.handleAutoPlay(),this}handleMouseOut(){return this.hoverAutoPlay&&this.handleAutoPlay(),this}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.moveSlides(!1)},100)}handleFocus(e){var t=e.target;return t&&t.contains(document.activeElement)&&this.autoPlay&&this.handleAutoPlay(),this}}class Ke{static autoInit(e,t){var i=(void 0===t?{}:t).NOTIFICATION,s=new Ke(e,void 0===i?{}:i);return s.init(),e.ECLNotification=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.closeSelector,a=void 0===n?"[data-ecl-notification-close]":n,l=s.attachClickListener,r=void 0===l||l;if(this.supportedEvents=["onClose"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.closeSelector=a,this.attachClickListener=r,this.close=null,this.handleClickOnClose=this.handleClickOnClose.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.close=t(this.closeSelector,this.element),this.attachClickListener&&this.close&&this.close.addEventListener("click",this.handleClickOnClose),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachClickListener&&this.close&&this.close.removeEventListener("click",this.handleClickOnClose),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnClose(e){return this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.trigger("onClose",e),this}}class Ve{static autoInit(e,t){var i=(void 0===t?{}:t).PAGEHEADEREXPANDABLE,s=new Ve(e,void 0===i?{}:i);return s.init(),e.ECLPageHeaderExpandable=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.headerSelector,a=void 0===n?"[data-ecl-page-header-expandable-header]":n,l=s.toggleSelector,r=void 0===l?"[data-ecl-page-header-expandable-toggle]":l,o=s.linkSelector,h=void 0===o?"[data-ecl-page-header-expandable-header-link]":o,c=s.attachClickListener,d=void 0===c||c;if(this.supportedEvents=["onToggle"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.toggleSelector=r,this.headerSelector=a,this.linkSelector=h,this.attachClickListener=d,this.toggle=null,this.target=null,this.header=null,this.handleClickOnHeader=this.handleClickOnHeader.bind(this),this.handleClickOnToggle=this.handleClickOnToggle.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.toggle=t(this.toggleSelector,this.element),this.header=t(this.headerSelector,this.element),this.target=document.querySelector("#"+this.toggle.getAttribute("aria-controls")),!this.target)throw new TypeError("Target has to be provided. (aria-controls)");this.attachClickListener&&this.toggle&&this.toggle.addEventListener("click",this.handleClickOnToggle),this.attachClickListener&&this.header&&this.header.addEventListener("click",this.handleClickOnHeader),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachClickListener&&this.toggle&&this.toggle.removeEventListener("click",this.handleClickOnToggle),this.attachClickListener&&this.header&&this.toggle.removeEventListener("click",this.handleClickOnHeader),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnHeader(e){e.target.closest(this.toggleSelector+", "+this.linkSelector)||this.handleClickOnToggle(e)}handleClickOnToggle(e){var t="true"===this.toggle.getAttribute("aria-expanded");this.toggle.setAttribute("aria-expanded",t?"false":"true"),this.target.hidden=!!t;var i={expanded:!t,e:e};this.trigger("onToggle",i)}}class Ge{static autoInit(e,t){var i=(void 0===t?{}:t).POPOVER,s=new Ge(e,void 0===i?{}:i);return s.init(),e.ECLPopover=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.toggleSelector,a=void 0===n?"[data-ecl-popover-toggle]":n,l=s.closeSelector,r=void 0===l?"[data-ecl-popover-close]":l,o=s.attachClickListener,h=void 0===o||o,c=s.attachKeyListener,d=void 0===c||c;if(this.supportedEvents=["onOpen","onClose"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.toggleSelector=a,this.closeSelector=r,this.attachClickListener=h,this.attachKeyListener=d,this.toggle=null,this.close=null,this.target=null,this.container=null,this.resizeTimer=null,this.scrollableParent=null,this.toggleRect=null,this.scrollable=null,this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.positionPopover=this.positionPopover.bind(this),this.handleClickOnToggle=this.handleClickOnToggle.bind(this),this.handleKeyboardGlobal=this.handleKeyboardGlobal.bind(this),this.handleClickGlobal=this.handleClickGlobal.bind(this),this.checkPosition=this.checkPosition.bind(this),this.resetStyles=this.resetStyles.bind(this),this.getClosestScrollableParent=this.getClosestScrollableParent.bind(this),this.calculateAvailableSpace=this.calculateAvailableSpace.bind(this),this.POPOVER_CLASSES={TOP:"ecl-popover--top",BOTTOM:"ecl-popover--bottom",LEFT:"ecl-popover--left",RIGHT:"ecl-popover--right",PUSH_TOP:"ecl-popover--push-top",PUSH_BOTTOM:"ecl-popover--push-bottom",PUSH_LEFT:"ecl-popover--push-left",PUSH_RIGHT:"ecl-popover--push-right"}}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.toggle=t(this.toggleSelector,this.element),this.close=t(this.closeSelector,this.element),this.container=t(".ecl-popover__container",this.element),this.scrollableParent=this.getClosestScrollableParent(this.toggle),this.attachKeyListener&&document.addEventListener("keyup",this.handleKeyboardGlobal),this.attachClickListener&&(document.addEventListener("click",this.handleClickGlobal),this.close&&this.close.addEventListener("click",this.handleClickOnToggle)),this.target=document.querySelector("#"+this.toggle.getAttribute("aria-controls")),!this.target)throw new TypeError("Target has to be provided for popover (aria-controls)");this.scrollable=this.target.firstElementChild,window.addEventListener("resize",this.checkPosition),document.addEventListener("scroll",this.checkPosition),this.attachClickListener&&this.toggle&&this.toggle.addEventListener("click",this.handleClickOnToggle),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.attachClickListener&&this.toggle&&this.toggle.removeEventListener("click",this.handleClickOnToggle),this.attachClickListener&&this.close&&this.close.removeEventListener("click",this.handleClickOnToggle),window.removeEventListener("resize",this.checkPosition),document.removeEventListener("scroll",this.checkPosition),this.attachKeyListener&&document.removeEventListener("keyup",this.handleKeyboardGlobal),this.attachClickListener&&document.removeEventListener("click",this.handleClickGlobal),"true"===this.toggle.getAttribute("aria-expanded")&&this.closePopover(),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnToggle(e){e.preventDefault(),"true"===this.toggle.getAttribute("aria-expanded")?this.closePopover(e):(this.openPopover(e),this.positionPopover())}openPopover(e){this.toggle.setAttribute("aria-expanded","true"),this.target.hidden=!1,this.trigger("onOpen",{event:e,target:this.target})}closePopover(e){this.toggle.setAttribute("aria-expanded","false"),this.resetStyles(),this.target.hidden=!0,this.trigger("onClose",{event:e,target:this.target})}getClosestScrollableParent(e){for(var t=e.parentElement;t;){var i=getComputedStyle(t),s=i.overflowY,n=i.overflowX,a=("auto"===s||"scroll"===s)&&t.scrollHeight>t.clientHeight,l=("auto"===n||"scroll"===n)&&t.scrollWidth>t.clientWidth;if(a||l)return t;t=t.parentElement}return document.body}calculateAvailableSpace(e,t){void 0===t&&(t=null),this.toggleRect=e.getBoundingClientRect();var i=t?t.getBoundingClientRect():{top:0,left:0,right:window.innerWidth,bottom:window.innerHeight},s=i.right-i.left,n=i.bottom-i.top,a=Math.max(0,window.innerHeight-i.bottom),l=Math.max(0,window.innerHeight-this.toggleRect.bottom),r=Math.max(0,l-a),o=Math.max(0,i.top),h=Math.max(0,this.toggleRect.top),c=Math.max(0,h-o),d=Math.max(0,window.innerWidth-i.right),u=Math.max(0,window.innerWidth-this.toggleRect.right),m=Math.max(0,u-d),p=Math.max(0,i.left),v=Math.max(0,this.toggleRect.left);return{containerWidth:s,containerHeight:n,spaceTop:c,spaceBottom:r,spaceLeft:Math.max(0,v-p),spaceRight:m}}resetStyles(){Object.keys(this.POPOVER_CLASSES).forEach(e=>{Object.prototype.hasOwnProperty.call(this.POPOVER_CLASSES,e)&&this.element.classList.remove(this.POPOVER_CLASSES[e])}),this.target.style.setProperty("--ecl-popover-position",""),this.container.style.left="",this.container.style.right="",this.container.style.top="",this.container.style.bottom="",this.container.style.transform="",this.scrollable.style.width=""}positionPopover(){this.resetStyles();var e=this.calculateAvailableSpace(this.toggle,this.scrollableParent),t=e.containerWidth,i=e.spaceTop,s=e.spaceBottom,n=e.spaceLeft,a=e.spaceRight,l="";l=i>s&&i>n&&i>a?"top":s>n&&s>a?"bottom":n>a?"left":"right",this.element.classList.add("ecl-popover--"+l);var r,o=window.getComputedStyle(this.scrollable),h=parseInt(o.getPropertyValue("max-width"),10),c=parseInt(o.getPropertyValue("min-width"),10),d=2*parseInt(o.getPropertyValue("padding-left"),10),u=.9*Math.max(n,a);r=h+d<u||"left"!==l&&"right"!==l&&t>h?h:u<c+d?c:"left"===l||"right"===l?u-d:2*(u-d),this.scrollable.style.width=r+"px",this.handlePushClass(l)}handlePushClass(e){requestAnimationFrame(()=>{var t=this.target.getBoundingClientRect(),i=this.scrollableParent.getBoundingClientRect(),s=i.bottom>window.innerHeight?0:window.innerHeight-i.bottom,n=i.top>window.innerHeight?0:i.top,a=i.left>t.left,l=i.right<t.right,r=t.top<n,o=s>window.innerHeight-t.bottom;"left"===e||"right"===e?(r&&(this.element.classList.add(this.POPOVER_CLASSES.PUSH_TOP),this.container.style.top="-"+Math.round(this.toggleRect.top)+"px",this.container.style.bottom="",this.container.style.transform=""),o&&(this.element.classList.add(this.POPOVER_CLASSES.PUSH_BOTTOM),this.container.style.bottom="-"+(window.innerHeight-this.toggleRect.bottom-s)+"px",this.container.style.top="",this.container.style.transform="")):(a&&(this.element.classList.add(this.POPOVER_CLASSES.PUSH_LEFT),this.container.style.left="-"+(this.toggleRect.left-i.left-8)+"px",this.container.style.right="auto"),l&&(this.element.classList.add(this.POPOVER_CLASSES.PUSH_RIGHT),this.container.style.right="-"+(i.right-this.toggleRect.right-8)+"px",this.container.style.left="auto")),this.handleArrowPosition(e)})}handleArrowPosition(e){var t=this.target.getBoundingClientRect();"left"===e||"right"===e?this.element.classList.contains(this.POPOVER_CLASSES.PUSH_BOTTOM)?this.target.style.setProperty("--ecl-popover-position",Math.round(this.toggleRect.top-t.top+this.toggleRect.height/2)+"px"):this.element.classList.contains(this.POPOVER_CLASSES.PUSH_TOP)&&this.target.style.setProperty("--ecl-popover-position",Math.round(t.top+this.toggleRect.top+this.toggleRect.height/2)+"px"):this.element.classList.contains(this.POPOVER_CLASSES.PUSH_RIGHT)?this.target.style.setProperty("--ecl-popover-position",Math.round(t.right-(this.toggleRect.right-this.toggleRect.width/2))+"px"):this.element.classList.contains(this.POPOVER_CLASSES.PUSH_LEFT)&&this.target.style.setProperty("--ecl-popover-position",Math.round(this.toggleRect.left-t.left+this.toggleRect.width/2)+"px")}checkPosition(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{"true"===this.toggle.getAttribute("aria-expanded")&&this.positionPopover()},200)}handleKeyboardGlobal(e){this.target&&("Escape"!==e.key&&"Esc"!==e.key||this.closePopover())}handleClickGlobal(e){this.target&&"true"===this.toggle.getAttribute("aria-expanded")&&(this.target.contains(e.target)||this.toggle.contains(e.target)||this.closePopover())}}class We{static autoInit(e,t){var i=(void 0===t?{}:t).RANGE,s=new We(e,void 0===i?{}:i);return s.init(),e.ECLRange=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.rangeInputSelector,n=void 0===s?"[data-ecl-range-input]":s,a=i.currentValueSelector,l=void 0===a?"[data-ecl-range-value-current]":a,r=i.bubbleSelector,o=void 0===r?"[data-ecl-range-bubble]":r,h=i.attachChangeListener,c=void 0===h||h,d=i.attachHoverListener,u=void 0===d||d;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.rangeInputSelector=n,this.currentValueSelector=l,this.bubbleSelector=o,this.attachChangeListener=c,this.attachHoverListener=u,this.rangeInput=null,this.currentValue=null,this.bubble=null,this.direction="ltr",this.placeBubble=this.placeBubble.bind(this),this.handleChange=this.handleChange.bind(this),this.handleHoverOn=this.handleHoverOn.bind(this),this.handleHoverOff=this.handleHoverOff.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.rangeInput=t(this.rangeInputSelector,this.element),this.currentValue=e(this.currentValueSelector,this.element),this.bubble=t(this.bubbleSelector,this.element),this.rangeInput&&this.currentValue&&(this.currentValue.forEach(e=>{e.innerHTML=this.rangeInput.value}),this.attachChangeListener&&this.rangeInput.addEventListener("input",this.handleChange),this.attachHoverListener&&(this.rangeInput.addEventListener("mouseover",this.handleHoverOn),this.rangeInput.addEventListener("mouseout",this.handleHoverOff))),this.direction=getComputedStyle(this.element).direction,this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.rangeInput&&this.currentValue&&(this.attachChangeListener&&this.rangeInput.removeEventListener("input",this.handleChange),this.attachHoverListener&&(this.rangeInput.removeEventListener("mouseover",this.handleHoverOn),this.rangeInput.removeEventListener("mouseout",this.handleHoverOff))),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}placeBubble(){var e=this.bubble.offsetWidth/2,t=this.rangeInput.getBoundingClientRect(),i=t.width/2,s=(this.rangeInput.value-this.rangeInput.min)/(this.rangeInput.max-this.rangeInput.min)*t.width,n=8*((s-i)/i),a=0;a="rtl"===this.direction?t.right-s-e+n:t.left+s-e-n,this.bubble.style.left=a+"px"}handleHoverOn(){this.bubble.classList.add("ecl-range__bubble--visible"),this.placeBubble()}handleHoverOff(){this.bubble.classList.remove("ecl-range__bubble--visible")}handleChange(){this.currentValue.forEach(e=>{e.innerHTML=this.rangeInput.value}),this.placeBubble()}}var Ue=o("createSvgIcon"),je=o("createCheckbox"),qe=o("createSelectIcon"),Xe=o("checkCheckbox"),Ye=o("generateRandomId"),Qe=o("updateSelectionsCount"),Ze=o("handleOptgroup"),Je=o("updateCurrentValue"),$e=o("moveFocus");class et{static autoInit(e,t){void 0===t&&(t={});var i=new et(e,t);return i.init(),e.ECLSelect=i,i}constructor(e,s){var n=void 0===s?{}:s,a=n.defaultText,l=void 0===a?"":a,r=n.searchText,o=void 0===r?"":r,h=n.selectAllText,c=void 0===h?"":h,d=n.noResultsText,u=void 0===d?"":d,m=n.selectMultipleSelector,p=void 0===m?"[data-ecl-select-multiple]":m,v=n.defaultTextAttribute,g=void 0===v?"data-ecl-select-default":v,b=n.searchTextAttribute,f=void 0===b?"data-ecl-select-search":b,y=n.selectAllTextAttribute,L=void 0===y?"data-ecl-select-all":y,C=n.noResultsTextAttribute,E=void 0===C?"data-ecl-select-no-results":C,k=n.closeLabelAttribute,w=void 0===k?"data-ecl-select-close":k,S=n.clearAllLabelAttribute,A=void 0===S?"data-ecl-select-clear-all":S,_=n.selectMultiplesSelectionCountSelector,O=void 0===_?"ecl-select-multiple-selections-counter":_,x=n.closeButtonLabel,T=void 0===x?"":x,P=n.clearAllButtonLabel,M=void 0===P?"":P;if(Object.defineProperty(this,$e,{value:nt}),Object.defineProperty(this,Je,{value:st}),Object.defineProperty(this,Ze,{value:it}),Object.defineProperty(this,Qe,{value:tt}),this.supportedEvents=["onToggle","onSelection","onSelectAll","onReset","onSearch"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.selectMultipleSelector=p,this.selectMultiplesSelectionCountSelector=O,this.defaultTextAttribute=g,this.searchTextAttribute=f,this.selectAllTextAttribute=L,this.noResultsTextAttribute=E,this.defaultText=l,this.searchText=o,this.selectAllText=c,this.noResultsText=u,this.clearAllButtonLabel=M,this.closeButtonLabel=T,this.closeLabelAttribute=w,this.clearAllLabelAttribute=A,this.input=null,this.search=null,this.checkboxes=null,this.select=null,this.selectAll=null,this.selectIcon=null,this.textDefault=null,this.textSearch=null,this.textSelectAll=null,this.textNoResults=null,this.selectMultiple=null,this.inputContainer=null,this.optionsContainer=null,this.visibleOptions=null,this.searchContainer=null,this.countSelections=null,this.form=null,this.formGroup=null,this.label=null,this.helper=null,this.invalid=null,this.selectMultipleId=null,this.multiple=t(this.selectMultipleSelector,this.element.parentNode)||!1,this.isOpen=!1,this.handleToggle=this.handleToggle.bind(this),this.handleClickOption=this.handleClickOption.bind(this),this.handleClickSelectAll=this.handleClickSelectAll.bind(this),this.handleEsc=this.handleEsc.bind(this),this.handleFocusout=this.handleFocusout.bind(this),this.handleSearch=this.handleSearch.bind(this),this.handleClickOutside=this.handleClickOutside.bind(this),this.resetForm=this.resetForm.bind(this),this.handleClickOnClearAll=this.handleClickOnClearAll.bind(this),this.handleKeyboardOnSelect=this.handleKeyboardOnSelect.bind(this),this.handleKeyboardOnSelectAll=this.handleKeyboardOnSelectAll.bind(this),this.handleKeyboardOnSearch=this.handleKeyboardOnSearch.bind(this),this.handleKeyboardOnOptions=this.handleKeyboardOnOptions.bind(this),this.handleKeyboardOnOption=this.handleKeyboardOnOption.bind(this),this.handleKeyboardOnClearAll=this.handleKeyboardOnClearAll.bind(this),this.handleKeyboardOnClose=this.handleKeyboardOnClose.bind(this),this.setCurrentValue=this.setCurrentValue.bind(this),this.update=this.update.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");if(ECL.components=ECL.components||new Map,this.select=this.element,this.multiple){var e=Array.from(this.select.parentElement.classList);this.textDefault=this.defaultText||this.element.getAttribute(this.defaultTextAttribute),this.textSearch=this.searchText||this.element.getAttribute(this.searchTextAttribute),this.textSelectAll=this.selectAllText||this.element.getAttribute(this.selectAllTextAttribute),this.textNoResults=this.noResultsText||this.element.getAttribute(this.noResultsTextAttribute),this.closeButtonLabel=this.closeButtonLabel||this.element.getAttribute(this.closeLabelAttribute),this.clearAllButtonLabel=this.clearAllButtonLabel||this.element.getAttribute(this.clearAllLabelAttribute),this.selectMultipleId=this.element.id||"select-multiple-"+l(et,Ye)[Ye](4),this.element.id=this.selectMultipleId,this.formGroup=this.element.closest(".ecl-form-group"),this.formGroup&&(this.label=t(".ecl-form-label",this.formGroup),this.helper=t(".ecl-help-block",this.formGroup),this.invalid=t(".ecl-feedback-message",this.formGroup)),this.select.setAttribute("tabindex","-1"),this.selectMultiple=document.createElement("div"),this.selectMultiple.classList.add("ecl-select__multiple"),this.selectMultiple.addEventListener("focusout",this.handleFocusout),this.inputContainer=document.createElement("div"),this.inputContainer.classList.add(...e),this.selectMultiple.appendChild(this.inputContainer),this.input=document.createElement("button"),this.input.classList.add("ecl-select","ecl-select__multiple-toggle"),this.input.setAttribute("type","button"),this.input.setAttribute("aria-controls",this.selectMultipleId+"-dropdown"),this.input.setAttribute("id",this.selectMultipleId+"-toggle"),this.input.setAttribute("aria-expanded",!1),e.find(e=>e.includes("disabled"))&&this.input.setAttribute("disabled",!0),this.label&&this.input.setAttribute("aria-labelledby",this.label.id+" "+this.input.id);var i="";if(this.helper&&(i=this.helper.id),this.invalid&&(i=i?i+" "+this.invalid.id:this.invalid.id),i&&this.input.setAttribute("aria-describedby",i),this.input.addEventListener("keydown",this.handleKeyboardOnSelect),this.input.addEventListener("click",this.handleToggle),this.selectionCount=document.createElement("div"),this.selectionCount.classList.add(this.selectMultiplesSelectionCountSelector),this.selectionCountText=document.createElement("span"),this.selectionCount.appendChild(this.selectionCountText),this.inputContainer.appendChild(this.selectionCount),this.inputContainer.appendChild(this.input),this.inputContainer.appendChild(l(et,qe)[qe]()),this.searchContainer=document.createElement("div"),this.searchContainer.style.display="none",this.searchContainer.classList.add("ecl-select__multiple-dropdown",...e),this.searchContainer.setAttribute("id",this.selectMultipleId+"-dropdown"),this.selectMultiple.appendChild(this.searchContainer),this.textSearch&&(this.search=document.createElement("input"),this.search.classList.add("ecl-text-input"),this.search.setAttribute("type","search"),this.search.setAttribute("placeholder",this.textSearch||""),this.search.addEventListener("keyup",this.handleSearch),this.search.addEventListener("search",this.handleSearch),this.search.addEventListener("keydown",this.handleKeyboardOnSearch),this.searchContainer.appendChild(this.search)),this.textSelectAll){var s=Array.from(this.select.options).filter(e=>!e.disabled).length;this.selectAll=l(et,je)[je]({id:"all-"+l(et,Ye)[Ye](4),text:this.textSelectAll+" ("+s+")",extraClass:"ecl-select__multiple-all"},this.selectMultipleId),this.selectAll.addEventListener("click",this.handleClickSelectAll),this.selectAll.addEventListener("keypress",this.handleClickSelectAll),this.selectAll.addEventListener("change",this.handleClickSelectAll),this.searchContainer.appendChild(this.selectAll)}this.optionsContainer=document.createElement("div"),this.optionsContainer.classList.add("ecl-select__multiple-options"),this.optionsContainer.setAttribute("aria-live","polite"),this.searchContainer.appendChild(this.optionsContainer),(this.clearAllButtonLabel||this.closeButtonLabel)&&(this.dropDownToolbar=document.createElement("div"),this.dropDownToolbar.classList.add("ecl-select-multiple-toolbar"),this.closeButtonLabel&&(this.closeButton=document.createElement("button"),this.closeButton.textContent=this.closeButtonLabel,this.closeButton.classList.add("ecl-button","ecl-button--primary"),this.closeButton.addEventListener("click",this.handleEsc),this.closeButton.addEventListener("keydown",this.handleKeyboardOnClose),this.dropDownToolbar&&(this.dropDownToolbar.appendChild(this.closeButton),this.searchContainer.appendChild(this.dropDownToolbar),this.dropDownToolbar.style.display="none")),this.clearAllButtonLabel&&(this.clearAllButton=document.createElement("button"),this.clearAllButton.textContent=this.clearAllButtonLabel,this.clearAllButton.classList.add("ecl-button","ecl-button--secondary"),this.clearAllButton.addEventListener("click",this.handleClickOnClearAll),this.clearAllButton.addEventListener("keydown",this.handleKeyboardOnClearAll),this.dropDownToolbar.appendChild(this.clearAllButton))),this.selectAll&&this.selectAll.addEventListener("keydown",this.handleKeyboardOnSelectAll),this.optionsContainer.addEventListener("keydown",this.handleKeyboardOnOptions),this.select.options&&this.select.options.length>0?this.checkboxes=Array.from(this.select.options).map(e=>{var i="",s="";if("OPTGROUP"===e.parentNode.tagName)if(t('fieldset[data-ecl-multiple-group="'+e.parentNode.getAttribute("label")+'"]',this.optionsContainer))i=t('fieldset[data-ecl-multiple-group="'+e.parentNode.getAttribute("label")+'"]',this.optionsContainer);else{i=document.createElement("fieldset");var n=document.createElement("legend");n.classList.add("ecl-select__multiple-group__title"),n.innerHTML=e.parentNode.getAttribute("label"),i.appendChild(n),i.setAttribute("data-ecl-multiple-group",e.parentNode.getAttribute("label")),i.classList.add("ecl-select__multiple-group"),this.optionsContainer.appendChild(i)}return e.selected&&(l(this,Qe)[Qe](),this.dropDownToolbar&&(this.dropDownToolbar.style.display="flex")),(s=l(et,je)[je]({id:e.value,text:e.text,disabled:e.disabled,selected:e.selected},this.selectMultipleId)).setAttribute("data-visible",!0),s.classList.contains("ecl-checkbox--disabled")||(s.addEventListener("click",this.handleClickOption),s.addEventListener("keydown",this.handleKeyboardOnOption)),i?i.appendChild(s):this.optionsContainer.appendChild(s),s}):this.checkboxes=[],this.visibleOptions=this.checkboxes,this.select.parentNode.parentNode.insertBefore(this.selectMultiple,this.select.parentNode.nextSibling),this.select.parentNode.classList.add("ecl-select__container--hidden"),l(this,Je)[Je](),this.form=this.element.closest("form"),this.form&&this.form.addEventListener("reset",this.resetForm),document.addEventListener("click",this.handleClickOutside)}else l(this,Ze)[Ze](),this.select.addEventListener("keydown",this.handleKeyboardOnSelect);this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}update(){l(this,Je)[Je](),l(this,Qe)[Qe]()}setCurrentValue(e,t){if(void 0===t&&(t="replace"),"replace"!==t&&"add"!==t)throw new Error('Invalid operation mode. Use "replace" or "add".');var i="string"==typeof e?[e]:e;Array.from(this.select.options).forEach(e=>{"replace"===t&&(e.selected=!1),(i.includes(e.value)||i.includes(e.label))&&(e.selected=!0)}),this.update()}handleToggle(e){if(e&&e.preventDefault(),this.input.classList.toggle("ecl-select--active"),"none"===this.searchContainer.style.display?(this.searchContainer.style.display="block",this.input.setAttribute("aria-expanded",!0),this.isOpen=!0):(this.searchContainer.style.display="none",this.input.setAttribute("aria-expanded",!1),this.isOpen=!1),e){var t={opened:this.isOpen,e:e};this.trigger("onToggle",t)}}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.input.removeEventListener("keydown",this.handleKeyboardOnSelect),this.multiple&&(document.removeEventListener("click",this.handleClickOutside),this.selectMultiple.removeEventListener("focusout",this.handleFocusout),this.input.removeEventListener("click",this.handleToggle),this.search&&(this.search.removeEventListener("keyup",this.handleSearch),this.search.removeEventListener("keydown",this.handleKeyboardOnSearch)),this.selectAll&&(this.selectAll.removeEventListener("click",this.handleClickSelectAll),this.selectAll.removeEventListener("keypress",this.handleClickSelectAll),this.selectAll.removeEventListener("keydown",this.handleKeyboardOnSelectAll)),this.optionsContainer.removeEventListener("keydown",this.handleKeyboardOnOptions),this.checkboxes.forEach(e=>{e.removeEventListener("click",this.handleClickSelectAll),e.removeEventListener("click",this.handleClickOption),e.removeEventListener("keydown",this.handleKeyboardOnOption)}),this.closeButton&&(this.closeButton.removeEventListener("click",this.handleEsc),this.closeButton.removeEventListener("keydown",this.handleKeyboardOnClose)),this.clearAllButton&&(this.clearAllButton.removeEventListener("click",this.handleClickOnClearAll),this.clearAllButton.removeEventListener("keydown",this.handleKeyboardOnClearAll)),this.selectMultiple&&this.selectMultiple.remove(),this.select.parentNode.classList.remove("ecl-select__container--hidden")),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOption(e){e.preventDefault(),l(et,Xe)[Xe](e);var t=e.target.closest(".ecl-checkbox");Array.from(this.select.options).forEach(e=>{e.text===t.getAttribute("data-select-multiple-value")&&(e.selected?(e.selected=!1,e.removeAttribute("selected"),this.selectAll&&(this.selectAll.querySelector("input").checked=!1)):(e.selected=!0,e.setAttribute("selected","true")))}),this.update()}handleClickSelectAll(e){if(e.preventDefault(),this.selectAll&&!this.selectAll.querySelector("input").disabled){var t=l(et,Xe)[Xe](e),i=Array.from(this.select.options).filter(e=>!e.disabled);Array.from(this.searchContainer.querySelectorAll('[data-visible="true"]')).filter(e=>!e.querySelector("input").disabled).forEach(e=>{e.querySelector("input").checked=t;var s=i.find(t=>t.text===e.getAttribute("data-select-multiple-value"));s&&(s.selected=!!t)}),this.update(),this.trigger("onSelectAll",{selected:i})}}handleFocusout(e){e.relatedTarget&&this.selectMultiple&&!this.selectMultiple.contains(e.relatedTarget)&&"block"===this.searchContainer.style.display?(this.searchContainer.style.display="none",this.input.classList.remove("ecl-select--active"),this.input.setAttribute("aria-expanded",!1)):!e.relatedTarget||this.selectMultiple||this.select.parentNode.contains(e.relatedTarget)||this.select.blur()}handleSearch(e){var i=this.optionsContainer.offsetHeight;this.visibleOptions=[];var s=e.target.value.toLowerCase(),n={};i>0&&(this.optionsContainer.style.height=i+"px"),this.checkboxes.forEach(e=>{if(e.getAttribute("data-select-multiple-value").toLocaleLowerCase().includes(s)){e.setAttribute("data-visible",!0),e.style.display="flex";var t=e.querySelector(".ecl-checkbox__label-text");t.textContent=t.textContent.replace(".cls-1{fill:none}",""),s&&(t.innerHTML=t.textContent.replace(new RegExp(s+"(?!([^<]+)?<)","gi"),"<b>$&</b>")),this.visibleOptions.push(e)}else e.removeAttribute("data-visible"),e.style.display="none"});var a=this.visibleOptions.filter(e=>e.querySelector("input").checked);!this.selectAll||0!==this.visibleOptions.length&&this.visibleOptions.length===a.length?this.selectAll&&(this.selectAll.querySelector("input").checked=!0):this.selectAll.querySelector("input").checked=!1;for(var l,r=this.searchContainer.querySelector(".ecl-select__multiple-no-results"),o=h(this.optionsContainer.getElementsByClassName("ecl-select__multiple-group"));!(l=o()).done;){var c=l.value;c.style.display="none",[...c.children].filter(e=>e.classList.contains("ecl-checkbox")).forEach(e=>{e.hasAttribute("data-visible")&&(e.closest(".ecl-select__multiple-group").style.display="block")})}if(0!==this.visibleOptions.length||r)this.visibleOptions.length>0&&null!==r&&r.parentNode.removeChild(r);else{var d=document.createElement("div"),u=document.createElement("span");d.classList.add("ecl-select__multiple-no-results"),u.innerHTML=this.textNoResults,d.appendChild(u),this.optionsContainer.appendChild(d)}(0===s.length?(this.checkboxes.forEach(e=>{e.setAttribute("data-visible",!0),e.style.display="flex"}),this.selectAll&&(this.selectAll.classList.remove("ecl-checkbox--disabled"),this.selectAll.querySelector("input").disabled=!1)):0!==s.length&&this.selectAll&&(this.selectAll.classList.add("ecl-checkbox--disabled"),this.selectAll.querySelector("input").disabled=!0),this.visibleOptions.length>0)?n={results:this.visibleOptions.map(e=>{var i=null,s=t(".ecl-checkbox__label-text",e);return s&&(i=s.innerHTML.replace(/<\/?b>/g,"")),i||""}),text:e.target.value.toLowerCase()}:n={results:"none",text:e.target.value.toLowerCase()};this.trigger("onSearch",n)}handleClickOutside(e){e.target&&this.selectMultiple&&!this.selectMultiple.contains(e.target)&&"block"===this.searchContainer.style.display&&(this.searchContainer.style.display="none",this.input.classList.remove("ecl-select--active"),this.input.setAttribute("aria-expanded",!1))}handleKeyboardOnSelect(e){switch(e.key){case"Escape":e.preventDefault(),this.handleEsc(e);break;case" ":case"Enter":this.multiple&&(e.preventDefault(),this.handleToggle(e),this.search?this.search.focus():this.selectAll?this.selectAll.firstChild.focus():this.checkboxes[0].firstChild.focus());break;case"ArrowDown":this.multiple&&(e.preventDefault(),this.isOpen||this.handleToggle(e),this.search?this.search.focus():this.selectAll?this.selectAll.firstChild.focus():this.checkboxes[0].firstChild.focus())}}handleKeyboardOnSelectAll(e){switch(e.key){case"Escape":e.preventDefault(),this.handleEsc(e);break;case"ArrowDown":e.preventDefault(),this.visibleOptions.length>0?this.visibleOptions[0].querySelector("input").focus():this.input.focus();break;case"ArrowUp":e.preventDefault(),this.search?this.search.focus():(this.input.focus(),this.handleToggle(e));break;case"Tab":e.preventDefault(),e.shiftKey?this.search&&this.search.focus():this.visibleOptions.length>0?this.visibleOptions[0].querySelector("input").focus():this.input.focus()}}handleKeyboardOnOptions(e){switch(e.key){case"Escape":e.preventDefault(),this.handleEsc(e);break;case"ArrowDown":e.preventDefault(),l(this,$e)[$e]("down");break;case"ArrowUp":e.preventDefault(),l(this,$e)[$e]("up");break;case"Tab":e.preventDefault(),e.shiftKey?l(this,$e)[$e]("up"):l(this,$e)[$e]("down")}}handleKeyboardOnSearch(e){switch(e.key){case"Escape":e.preventDefault(),this.handleEsc(e);break;case"ArrowDown":e.preventDefault(),!this.selectAll||this.selectAll.querySelector("input").disabled?this.visibleOptions.length>0?this.visibleOptions[0].querySelector("input").focus():this.input.focus():this.selectAll.querySelector("input").focus();break;case"ArrowUp":e.preventDefault(),this.input.focus(),this.handleToggle(e)}}handleKeyboardOnOption(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClickOption(e))}handleKeyboardOnClearAll(e){switch(e.preventDefault(),e.key){case"Enter":case" ":this.handleClickOnClearAll(e),this.trigger("onReset",e),this.input.focus();break;case"ArrowDown":this.input.focus();break;case"ArrowUp":this.closeButton?this.closeButton.focus():this.visibleOptions.length>0?this.visibleOptions[this.visibleOptions.length-1].querySelector("input").focus():this.search?this.search.focus():(this.input.focus(),this.handleToggle(e));break;case"Tab":e.shiftKey?this.closeButton?this.closeButton.focus():this.visibleOptions.length>0?this.visibleOptions[this.visibleOptions.length-1].querySelector("input").focus():this.search?this.search.focus():(this.input.focus(),this.handleToggle(e)):(this.input.focus(),this.handleToggle(e))}}handleKeyboardOnClose(e){switch(e.preventDefault(),e.key){case"Enter":case" ":this.handleEsc(e),this.input.focus();break;case"ArrowUp":this.visibleOptions.length>0?this.visibleOptions[this.visibleOptions.length-1].querySelector("input").focus():(this.input.focus(),this.handleToggle(e));break;case"ArrowDown":this.clearAllButton?this.clearAllButton.focus():(this.input.focus(),this.handleToggle(e));break;case"Tab":e.shiftKey?this.visibleOptions.length>0?this.visibleOptions[this.visibleOptions.length-1].querySelector("input").focus():(this.input.focus(),this.handleToggle(e)):this.clearAllButton?this.clearAllButton.focus():(this.input.focus(),this.handleToggle(e))}}handleEsc(e){this.multiple?(e.preventDefault(),this.searchContainer.style.display="none",this.input.setAttribute("aria-expanded",!1),this.input.blur(),this.input.classList.remove("ecl-select--active")):this.select.classList.remove("ecl-select--active")}handleClickOnClearAll(e){e.preventDefault(),Array.from(this.select.options).forEach(e=>{this.selectMultiple.querySelector('[data-select-multiple-value="'+e.text+'"]').querySelector(".ecl-checkbox__input").checked=!1,e.selected=!1}),this.selectAll&&(this.selectAll.querySelector(".ecl-checkbox__input").checked=!1),this.update(),this.trigger("onReset",e)}resetForm(){this.multiple&&setTimeout(()=>{Array.from(this.select.options).forEach(e=>{this.selectMultiple.querySelector('[data-select-multiple-value="'+e.text+'"]').querySelector(".ecl-checkbox__input").checked?e.selected=!0:e.selected=!1}),this.update(0)},10)}}function tt(){var e=Array.from(this.select.options).filter(e=>e.selected).length;e>0?(this.selectionCount.querySelector("span").innerHTML=e,this.selectionCount.classList.add("ecl-select-multiple-selections-counter--visible"),this.dropDownToolbar&&(this.dropDownToolbar.style.display="flex")):(this.selectionCount.classList.remove("ecl-select-multiple-selections-counter--visible"),this.dropDownToolbar&&(this.dropDownToolbar.style.display="none")),e>=100&&this.selectionCount.classList.add("ecl-select-multiple-selections-counter--xxl")}function it(){Array.from(this.select.options).forEach(e=>{if("OPTGROUP"===e.parentNode.tagName){var t=e.parentNode.getAttribute("label"),i=e.getAttribute("label")||e.textContent;t&&i&&e.setAttribute("aria-label",i+" - "+t)}})}function st(){var e=Array.from(this.select.options).filter(e=>e.selected).map(e=>e.text).join("|");this.input.innerHTML=e||this.textDefault||"",""!==e&&this.label?this.label.setAttribute("aria-label",this.label.innerText+" "+e):""===e&&this.label&&this.label.removeAttribute("aria-label"),this.trigger("onSelection",{selected:e}),this.select.dispatchEvent(new window.Event("change",{bubbles:!0}))}function nt(e){var t=document.activeElement,i=t.parentElement.parentElement.classList.contains("ecl-select__multiple-group")?Array.from(t.parentElement.parentElement.parentElement.querySelectorAll(".ecl-checkbox__input")):Array.from(t.parentElement.parentElement.querySelectorAll(".ecl-checkbox__input")),s=i.indexOf(t);if("down"===e){var n=i.splice(s+1,i.length).filter(e=>!e.disabled&&"none"!==e.parentElement.style.display);n.length>0?n[0].focus():this.dropDownToolbar&&"flex"===this.dropDownToolbar.style.display&&this.dropDownToolbar.firstChild.focus()}else{var a=i.splice(0,s).filter(e=>!e.disabled&&"none"!==e.parentElement.style.display);a.length>0?a[a.length-1].focus():(this.optionsContainer.scrollTop=0,this.selectAll&&!this.selectAll.querySelector("input").disabled?this.selectAll.querySelector("input").focus():this.search?this.search.focus():(this.input.focus(),this.handleToggle()))}}xe=et,Object.defineProperty(et,Ye,{value:function(e){return Math.random().toString(36).substr(2,e)}}),Object.defineProperty(et,Xe,{value:function(e){var t=e.target.closest(".ecl-checkbox").querySelector("input");return t.checked=!t.checked,t.checked}}),Object.defineProperty(et,qe,{value:function(){var e=document.createElement("div");e.classList.add("ecl-select__icon");var t=document.createElement("button");t.classList.add("ecl-button","ecl-button--tertiary","ecl-button--icon-only"),t.setAttribute("tabindex","-1");var i=document.createElement("span");i.classList.add("ecl-button__container");var s=document.createElement("span");s.classList.add("ecl-button__label"),s.textContent="Toggle dropdown",i.appendChild(s);var n=l(xe,Ue)[Ue]("corner-arrow","ecl-icon ecl-icon--xs ecl-icon--rotate-180");return i.appendChild(n),t.appendChild(i),e.appendChild(t),e}}),Object.defineProperty(et,je,{value:function(e,t){if(!e||!t)return"";var i=e.id,s=e.text,n=e.disabled,a=e.selected,r=e.extraClass;if(!i||!s)return"";var o=document.createElement("div"),h=document.createElement("input"),c=document.createElement("label"),d=document.createElement("span"),u=document.createElement("span");return r&&o.classList.add(r),a&&(h.checked=!0),n&&(o.classList.add("ecl-checkbox--disabled"),d.classList.add("ecl-checkbox__box--disabled"),h.setAttribute("disabled",n)),o.classList.add("ecl-checkbox"),o.setAttribute("data-select-multiple-value",s),h.classList.add("ecl-checkbox__input"),h.setAttribute("type","checkbox"),h.setAttribute("id",t+"-"+i),h.setAttribute("name",t+"-"+i),o.appendChild(h),c.classList.add("ecl-checkbox__label"),c.setAttribute("for",t+"-"+i),d.classList.add("ecl-checkbox__box"),d.setAttribute("aria-hidden",!0),d.appendChild(l(xe,Ue)[Ue]("check","ecl-icon ecl-icon--s ecl-checkbox__icon")),c.appendChild(d),u.classList.add("ecl-checkbox__label-text"),u.innerHTML=s,c.appendChild(u),o.appendChild(c),o}}),Object.defineProperty(et,Ue,{value:function(e,t){var i=document.createElement("span");return i.setAttribute("class","wt-icon--"+e+" "+t),i}});class at{static autoInit(e,t){var i=(void 0===t?{}:t).SITE_HEADER_CORE,s=new at(e,void 0===i?{}:i);return s.init(),e.ECLSiteHeader=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.containerSelector,n=void 0===s?"[data-ecl-site-header-top]":s,a=i.languageLinkSelector,l=void 0===a?"[data-ecl-language-selector]":a,r=i.languageListOverlaySelector,o=void 0===r?"[data-ecl-language-list-overlay]":r,h=i.languageListEuSelector,c=void 0===h?"[data-ecl-language-list-eu]":h,d=i.languageListNonEuSelector,u=void 0===d?"[data-ecl-language-list-non-eu]":d,m=i.languageListContentSelector,p=void 0===m?"[data-ecl-language-list-content]":m,v=i.closeOverlaySelector,g=void 0===v?"[data-ecl-language-list-close]":v,b=i.searchToggleSelector,f=void 0===b?"[data-ecl-search-toggle]":b,y=i.searchFormSelector,L=void 0===y?"[data-ecl-search-form]":y,C=i.loginToggleSelector,E=void 0===C?"[data-ecl-login-toggle]":C,k=i.loginBoxSelector,w=void 0===k?"[data-ecl-login-box]":k,S=i.notificationSelector,A=void 0===S?"[data-ecl-site-header-notification]":S,_=i.attachClickListener,O=void 0===_||_,x=i.attachKeyListener,T=void 0===x||x,P=i.attachResizeListener,M=void 0===P||P,I=i.tabletBreakpoint,N=void 0===I?768:I,B=i.customActionToggleSelector,R=void 0===B?"[data-ecl-custom-action]":B,D=i.customActionOverlaySelector,F=void 0===D?"[data-ecl-custom-action-overlay]":D,z=i.customActionCloseSelector,H=void 0===z?"[data-ecl-custom-action-close]":z;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.containerSelector=n,this.languageLinkSelector=l,this.languageListOverlaySelector=o,this.languageListEuSelector=c,this.languageListNonEuSelector=u,this.languageListContentSelector=p,this.closeOverlaySelector=g,this.searchToggleSelector=f,this.searchFormSelector=L,this.loginToggleSelector=E,this.notificationSelector=A,this.loginBoxSelector=w,this.attachClickListener=O,this.attachKeyListener=T,this.attachResizeListener=M,this.tabletBreakpoint=N,this.customActionToggleSelector=R,this.customActionOverlaySelector=F,this.customActionCloseSelector=H,this.languageMaxColumnItems=8,this.languageLink=null,this.languageListOverlay=null,this.languageListEu=null,this.languageListNonEu=null,this.languageListContent=null,this.close=null,this.focusTrap=null,this.searchToggle=null,this.searchForm=null,this.loginToggle=null,this.loginBox=null,this.resizeTimer=null,this.direction=null,this.notificationContainer=null,this.customActionToggle=null,this.customActionOverlay=null,this.customActionClose=null,this.customActionFocusTrap=null,this.openOverlay=this.openOverlay.bind(this),this.closeOverlay=this.closeOverlay.bind(this),this.toggleOverlay=this.toggleOverlay.bind(this),this.toggleSearch=this.toggleSearch.bind(this),this.toggleLogin=this.toggleLogin.bind(this),this.setLoginArrow=this.setLoginArrow.bind(this),this.setSearchArrow=this.setSearchArrow.bind(this),this.handleKeyboardLanguage=this.handleKeyboardLanguage.bind(this),this.handleKeyboardGlobal=this.handleKeyboardGlobal.bind(this),this.handleClickGlobal=this.handleClickGlobal.bind(this),this.handleResize=this.handleResize.bind(this),this.setLanguageListHeight=this.setLanguageListHeight.bind(this),this.handleNotificationClose=this.handleNotificationClose.bind(this),this.openCustomAction=this.openCustomAction.bind(this),this.closeCustomAction=this.closeCustomAction.bind(this),this.toggleCustomAction=this.toggleCustomAction.bind(this),this.handleKeyboardCustomAction=this.handleKeyboardCustomAction.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.arrowSize="0.5rem",this.attachKeyListener&&document.addEventListener("keyup",this.handleKeyboardGlobal),this.attachClickListener&&document.addEventListener("click",this.handleClickGlobal),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.container=t(this.containerSelector),this.languageLink=t(this.languageLinkSelector),this.languageListOverlay=t(this.languageListOverlaySelector),this.languageListEu=t(this.languageListEuSelector),this.languageListNonEu=t(this.languageListNonEuSelector),this.languageListContent=t(this.languageListContentSelector),this.close=t(this.closeOverlaySelector),this.notification=t(this.notificationSelector),this.direction=getComputedStyle(this.element).direction,"rtl"===this.direction&&this.element.classList.add("ecl-site-header--rtl"),this.languageListOverlay&&(this.focusTrap=le(this.languageListOverlay,{onDeactivate:this.closeOverlay,allowOutsideClick:!0})),this.attachClickListener&&this.languageLink&&this.languageLink.addEventListener("click",this.toggleOverlay),this.attachClickListener&&this.close&&this.close.addEventListener("click",this.toggleOverlay),this.attachKeyListener&&this.languageLink&&this.languageLink.addEventListener("keydown",this.handleKeyboardLanguage),this.searchToggle=t(this.searchToggleSelector),this.searchForm=t(this.searchFormSelector),this.attachClickListener&&this.searchToggle&&this.searchToggle.addEventListener("click",this.toggleSearch),this.loginToggle=t(this.loginToggleSelector),this.loginBox=t(this.loginBoxSelector),this.attachClickListener&&this.loginToggle&&this.loginToggle.addEventListener("click",this.toggleLogin),this.customActionToggle=t(this.customActionToggleSelector),this.customActionOverlay=t(this.customActionOverlaySelector),this.customActionClose=t(this.customActionCloseSelector),this.customActionOverlay&&(this.customActionFocusTrap=le(this.customActionOverlay,{onDeactivate:this.closeCustomAction,allowOutsideClick:!0})),this.attachClickListener&&this.customActionToggle&&this.customActionToggle.addEventListener("click",this.toggleCustomAction),this.attachClickListener&&this.customActionClose&&this.customActionClose.addEventListener("click",this.toggleCustomAction),this.attachKeyListener&&this.customActionToggle&&this.customActionToggle.addEventListener("keydown",this.handleKeyboardCustomAction),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this),this.notification&&(this.notificationContainer=this.notification.closest(".ecl-site-header__notification"),setTimeout(()=>{var e=ECL.components.get(this.notification);e&&e.on("onClose",this.handleNotificationClose)},0))}destroy(){this.attachClickListener&&this.languageLink&&this.languageLink.removeEventListener("click",this.toggleOverlay),this.focusTrap&&this.focusTrap.deactivate(),this.attachKeyListener&&this.languageLink&&this.languageLink.removeEventListener("keydown",this.handleKeyboardLanguage),this.attachClickListener&&this.close&&this.close.removeEventListener("click",this.toggleOverlay),this.attachClickListener&&this.searchToggle&&this.searchToggle.removeEventListener("click",this.toggleSearch),this.attachClickListener&&this.loginToggle&&this.loginToggle.removeEventListener("click",this.toggleLogin),this.attachClickListener&&this.customActionToggle&&this.customActionToggle.removeEventListener("click",this.toggleCustomAction),this.customActionFocusTrap&&this.customActionFocusTrap.deactivate(),this.attachKeyListener&&this.customActionToggle&&this.customActionToggle.removeEventListener("keydown",this.handleKeyboardCustomAction),this.attachClickListener&&this.customActionClose&&this.customActionClose.removeEventListener("click",this.toggleCustomAction),this.attachKeyListener&&document.removeEventListener("keyup",this.handleKeyboardGlobal),this.attachClickListener&&document.removeEventListener("click",this.handleClickGlobal),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),this.element.classList.remove("ecl-site-header--rtl"),ECL.components.delete(this.element))}updateOverlayPosition(t,i,s){if(void 0===s&&(s="--ecl-overlay-arrow-position"),t&&i&&this.container){if(t===this.languageListOverlay){if(this.languageListEu){var n=e(".ecl-site-header__language-item",this.languageListEu),a=Math.ceil(n.length/this.languageMaxColumnItems);a>1&&this.languageListEu.classList.add("ecl-site-header__language-category--"+a+"-col")}if(this.languageListNonEu){var l=e(".ecl-site-header__language-item",this.languageListNonEu),r=Math.ceil(l.length/this.languageMaxColumnItems);r>1&&this.languageListNonEu.classList.add("ecl-site-header__language-category--"+r+"-col")}this.languageListEu?this.languageListEu.parentNode.classList.remove("ecl-site-header__language-content--stack"):this.languageListNonEu&&this.languageListNonEu.parentNode.classList.remove("ecl-site-header__language-content--stack")}t.classList.remove("ecl-site-header__language-container--push-right","ecl-site-header__language-container--push-left","ecl-site-header__language-container--full"),t.style.removeProperty(s),t.style.removeProperty("right"),t.style.removeProperty("left");var o=t.getBoundingClientRect(),h=this.container.getBoundingClientRect(),c=window.innerWidth,d=i.getBoundingClientRect();if(t===this.languageListOverlay&&o.width>h.width&&(this.languageListEu?this.languageListEu.parentNode.classList.add("ecl-site-header__language-content--stack"):this.languageListNonEu&&this.languageListNonEu.parentNode.classList.add("ecl-site-header__language-content--stack")),window.innerWidth<this.tabletBreakpoint){t.classList.add("ecl-site-header__language-container--full");var u=(o=t.getBoundingClientRect()).right-d.right+d.width/2;t.style.setProperty(s,"calc("+u+"px - "+this.arrowSize+")")}else if("ltr"===this.direction&&o.right>c){t.classList.add("ecl-site-header__language-container--push-right"),t.style.setProperty("right","calc(-"+h.right+"px + "+d.right+"px)");var m=h.right-d.right+d.width/2;t.style.setProperty(s,"calc("+m+"px - "+this.arrowSize+")")}else if("rtl"===this.direction&&o.left<0){t.classList.add("ecl-site-header__language-container--push-left"),t.style.setProperty("left","calc(-"+d.left+"px + "+h.left+"px)");var p=d.right-h.left-d.width/2;t.style.setProperty(s,p+"px")}}}updateOverlay(){this.languageListOverlay&&this.languageLink&&this.updateOverlayPosition(this.languageListOverlay,this.languageLink)}handleNotificationClose(){this.notificationContainer&&this.notificationContainer.remove()}setLanguageListHeight(){var e=window.innerHeight;if(this.languageListContent){var t=e-this.languageListContent.getBoundingClientRect().top;t>0&&(this.languageListContent.style.maxHeight=t+"px")}}openOverlay(){this.languageListOverlay.hidden=!1,this.languageListOverlay.setAttribute("aria-modal","true"),this.languageLink.setAttribute("aria-expanded","true"),this.setLanguageListHeight()}closeOverlay(){this.languageListOverlay.hidden=!0,this.languageListOverlay.removeAttribute("aria-modal"),this.languageLink.setAttribute("aria-expanded","false")}toggleOverlay(e){this.languageListOverlay&&this.focusTrap&&(e.preventDefault(),this.languageListOverlay.hasAttribute("hidden")?(this.openOverlay(),this.updateOverlayPosition(this.languageListOverlay,this.languageLink),this.focusTrap.activate()):this.focusTrap.deactivate())}toggleSearch(e){if(this.searchForm){e.preventDefault();var t="true"===this.searchToggle.getAttribute("aria-expanded");this.loginToggle&&"true"===this.loginToggle.getAttribute("aria-expanded")&&this.toggleLogin(e),this.searchToggle.setAttribute("aria-expanded",t?"false":"true"),t?this.searchForm.classList.remove("ecl-site-header__search--active"):(this.searchForm.classList.add("ecl-site-header__search--active"),this.setSearchArrow())}}setLoginArrow(){if(0===this.loginBox.getBoundingClientRect().x){var e=this.loginToggle.getBoundingClientRect(),t=document.documentElement.clientWidth-e.right+e.width/2;this.loginBox.style.setProperty("--ecl-login-arrow-position","calc("+t+"px - "+this.arrowSize+")")}}setSearchArrow(){if(0===this.searchForm.getBoundingClientRect().x){var e=this.searchToggle.getBoundingClientRect(),t=document.documentElement.clientWidth-e.right+e.width/2;this.searchForm.style.setProperty("--ecl-search-arrow-position","calc("+t+"px - "+this.arrowSize+")")}}toggleLogin(e){if(this.loginBox){e.preventDefault();var t="true"===this.loginToggle.getAttribute("aria-expanded");this.searchToggle&&"true"===this.searchToggle.getAttribute("aria-expanded")&&this.toggleSearch(e),this.loginToggle.setAttribute("aria-expanded",t?"false":"true"),t?this.loginBox.classList.remove("ecl-site-header__login-box--active"):(this.loginBox.classList.add("ecl-site-header__login-box--active"),this.setLoginArrow())}}handleKeyboardLanguage(e){32!==e.keyCode&&"Enter"!==e.key||this.toggleOverlay(e)}handleKeyboardGlobal(e){if(this.languageLink){var t=this.languageLink.getAttribute("aria-expanded");"Escape"!==e.key&&"Esc"!==e.key||("true"===t&&this.toggleOverlay(e),this.customActionToggle&&"true"===this.customActionToggle.getAttribute("aria-expanded")&&this.toggleCustomAction(e))}}handleClickGlobal(e){if(this.languageLink||this.searchToggle||this.loginToggle){var t=this.languageLink&&this.languageLink.getAttribute("aria-expanded"),i=this.loginToggle&&"true"===this.loginToggle.getAttribute("aria-expanded"),s=this.searchToggle&&"true"===this.searchToggle.getAttribute("aria-expanded");"true"===t&&(this.languageListOverlay.contains(e.target)||this.languageLink.contains(e.target)||this.toggleOverlay(e)),i&&(this.loginBox.contains(e.target)||this.loginToggle.contains(e.target)||this.toggleLogin(e)),s&&(this.searchForm.contains(e.target)||this.searchToggle.contains(e.target)||this.toggleSearch(e)),this.customActionToggle&&"true"===this.customActionToggle.getAttribute("aria-expanded")&&(this.customActionOverlay.contains(e.target)||this.customActionToggle.contains(e.target)||this.toggleCustomAction(e))}}handleResize(){this.resizeTimer&&clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.languageListOverlay&&!this.languageListOverlay.hasAttribute("hidden")&&this.updateOverlayPosition(this.languageListOverlay,this.languageLink),this.customActionOverlay&&!this.customActionOverlay.hasAttribute("hidden")&&this.updateOverlayPosition(this.customActionOverlay,this.customActionToggle,"--ecl-overlay-arrow-position"),this.loginBox&&this.loginBox.classList.contains("ecl-site-header__login-box--active")&&this.setLoginArrow(),this.searchForm&&this.searchForm.classList.contains("ecl-site-header__search--active")&&this.setSearchArrow()},200)}openCustomAction(){this.customActionOverlay&&(this.customActionOverlay.hidden=!1,this.customActionOverlay.setAttribute("aria-modal","true"),this.customActionToggle.setAttribute("aria-expanded","true"))}closeCustomAction(){this.customActionOverlay&&(this.customActionOverlay.hidden=!0,this.customActionOverlay.removeAttribute("aria-modal"),this.customActionToggle.setAttribute("aria-expanded","false"))}toggleCustomAction(e){this.customActionOverlay&&this.customActionFocusTrap&&(e.preventDefault(),this.customActionOverlay.hasAttribute("hidden")?(this.openCustomAction(),this.updateOverlayPosition(this.customActionOverlay,this.customActionToggle,"--ecl-overlay-arrow-position"),this.customActionFocusTrap.activate()):this.customActionFocusTrap.deactivate())}handleKeyboardCustomAction(e){32!==e.keyCode&&"Enter"!==e.key||this.toggleCustomAction(e)}}class lt{static autoInit(e,t){var i=(void 0===t?{}:t).TABLE,s=new lt(e,void 0===i?{}:i);return s.init(),e.ECLTable=s,s}constructor(i,s){var n=void 0===s?{}:s,a=n.sortSelector,l=void 0===a?"[data-ecl-table-sort-toggle]":a,r=n.sortLabelSelector,o=void 0===r?"data-ecl-table-sort-label":r;if(this.handleClickOnSort=i=>s=>{s.preventDefault();for(var n=i.closest("table"),a=t("tbody",n),l=i.getAttribute("aria-sort"),r=0,o=i.previousElementSibling;o;)r+=o.getAttribute("colspan")?Number(o.getAttribute("colspan")):1,o=o.previousElementSibling;var h,c;"descending"===l?([...e("tr",a)].forEach((e,i)=>{var s=t("[data-ecl-table-order='"+i+"']",a);a.appendChild(s)}),l=null):([...e("tr",a)].sort((h=r,c="ascending"!==l,(e,t)=>{return i=(c?e:t).children[h].textContent,s=(c?t:e).children[h].textContent,""===i||""===s||Number.isNaN(+i)||Number.isNaN(+s)?i.toString().localeCompare(s):i-s;var i,s})).forEach(e=>a.appendChild(e)),l="ascending"===l?"descending":"ascending"),this.sortHeadings.forEach(e=>{l&&e===i?e.setAttribute("aria-sort",l):e.removeAttribute("aria-sort")})},!i||i.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=i,this.sortSelector=l,this.sortLabelSelector=o,this.sortHeadings=null,this.handleClickOnSort=this.handleClickOnSort.bind(this)}static createSortIcon(e){var t=document.createElement("span");return t.setAttribute("class","wt-icon--solid-arrow ecl-table__icon ecl-icon--xs "+e),t}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.sortHeadings=e(this.sortSelector,this.element),this.sortHeadings&&this.sortHeadings.forEach(e=>{var t=document.createElement("button");t.classList.add("ecl-table__arrow"),this.element.hasAttribute(this.sortLabelSelector)&&t.setAttribute("aria-label",this.element.getAttribute(this.sortLabelSelector)),t.appendChild(lt.createSortIcon("ecl-table__icon-up")),t.appendChild(lt.createSortIcon("ecl-table__icon-down")),e.appendChild(t),e.addEventListener("click",t=>this.handleClickOnSort(e)(t))});var i=t("tbody",this.element);[...e("tr",i)].forEach((e,t)=>{e.setAttribute("data-ecl-table-order",t)}),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.sortHeadings&&this.sortHeadings.forEach(e=>{e.removeEventListener("click",t=>this.handleClickOnSort(e)(t))}),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}}class rt{static autoInit(e,t){var i=(void 0===t?{}:t).TABS,s=new rt(e,void 0===i?{}:i);return s.init(),e.ECLTabs=s,s}constructor(e,t){var s=void 0===t?{}:t,n=s.containerSelector,a=void 0===n?".ecl-tabs__container":n,l=s.listSelector,r=void 0===l?".ecl-tabs__list":l,o=s.listItemsSelector,h=void 0===o?".ecl-tabs__item:not(.ecl-tabs__item--more)":o,c=s.moreItemSelector,d=void 0===c?".ecl-tabs__item--more":c,u=s.moreButtonSelector,m=void 0===u?".ecl-tabs__toggle":u,p=s.moreLabelSelector,v=void 0===p?".ecl-tabs__toggle .ecl-button__label":p,g=s.prevSelector,b=void 0===g?".ecl-tabs__prev":g,f=s.nextSelector,y=void 0===f?".ecl-tabs__next":f,L=s.attachClickListener,C=void 0===L||L,E=s.attachResizeListener,k=void 0===E||E;if(this.supportedEvents=["onToggle"],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.eventManager=new i,this.containerSelector=a,this.listSelector=r,this.listItemsSelector=h,this.moreItemSelector=d,this.moreButtonSelector=m,this.moreLabelSelector=v,this.prevSelector=b,this.nextSelector=y,this.attachClickListener=C,this.attachResizeListener=k,this.container=null,this.list=null,this.listItems=null,this.moreItem=null,this.moreButton=null,this.moreButtonActive=!1,this.moreLabel=null,this.moreLabelValue=null,this.dropdown=null,this.dropdownList=null,this.dropdownItems=null,this.allowShift=!0,this.buttonNextSize=0,this.index=0,this.total=0,this.tabsKey=[],this.firstTab=null,this.lastTab=null,this.direction="ltr",this.isMobile=!1,this.resizeTimer=null,this.handleClickOnToggle=this.handleClickOnToggle.bind(this),this.handleResize=this.handleResize.bind(this),this.closeMoreDropdown=this.closeMoreDropdown.bind(this),this.shiftTabs=this.shiftTabs.bind(this),this.handleKeyboardOnTabs=this.handleKeyboardOnTabs.bind(this),this.moveFocus=this.moveFocus.bind(this),this.arrowFocusToTab=this.arrowFocusToTab.bind(this),this.tabsKeyEvents=this.tabsKeyEvents.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.container=t(this.containerSelector,this.element),this.list=t(this.listSelector,this.element),this.listItems=e(this.listItemsSelector,this.element),this.moreItem=t(this.moreItemSelector,this.element),this.moreButton=t(this.moreButtonSelector,this.element),this.moreLabel=t(this.moreLabelSelector,this.element),this.moreLabelValue=this.moreLabel.innerText,this.btnPrev=t(this.prevSelector,this.element),this.btnNext=t(this.nextSelector,this.element),this.total=this.listItems.length,this.moreButton&&(this.dropdown=document.createElement("div"),this.dropdown.classList.add("ecl-tabs__dropdown"),this.dropdownList=document.createElement("div"),this.dropdownList.classList.add("ecl-tabs__dropdown-list"),this.listItems.forEach(e=>{this.dropdownList.appendChild(e.cloneNode(!0))}),this.dropdown.appendChild(this.dropdownList),this.moreItem.appendChild(this.dropdown),this.dropdownItems=e(".ecl-tabs__dropdown .ecl-tabs__item",this.element)),this.btnNext&&(this.buttonNextSize=this.btnNext.getBoundingClientRect().width),this.handleResize(),this.attachClickListener&&this.moreButton&&this.moreButton.addEventListener("click",this.handleClickOnToggle),this.attachClickListener&&document&&this.moreButton&&document.addEventListener("click",this.closeMoreDropdown),this.attachClickListener&&this.btnNext&&this.btnNext.addEventListener("click",this.shiftTabs.bind(this,"next",!0)),this.attachClickListener&&this.btnPrev&&this.btnPrev.addEventListener("click",this.shiftTabs.bind(this,"prev",!0)),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}on(e,t){this.eventManager.on(e,t)}trigger(e,t){this.eventManager.trigger(e,t)}destroy(){this.dropdown&&this.dropdown.remove(),this.moreButton&&(this.moreLabel.textContent=this.moreLabelValue,this.moreButton.replaceWith(this.moreButton.cloneNode(!0))),this.btnNext&&this.btnNext.replaceWith(this.btnNext.cloneNode(!0)),this.btnPrev&&this.btnPrev.replaceWith(this.btnPrev.cloneNode(!0)),this.attachClickListener&&document&&this.moreButton&&document.removeEventListener("click",this.closeMoreDropdown),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.tabsKey&&this.tabsKey.forEach(e=>{e.addEventListener("keydown",this.handleKeyboardOnTabs)}),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}shiftTabs(e){this.index="next"===e?this.index+1:this.index-1,this.index>=1?(this.btnPrev.style.display="flex",this.container.classList.add("ecl-tabs__container--left")):(this.btnPrev.style.display="none",this.container.classList.remove("ecl-tabs__container--left")),this.index>=this.total-1?(this.btnNext.style.display="none",this.container.classList.remove("ecl-tabs__container--right")):(this.btnNext.style.display="flex",this.container.classList.add("ecl-tabs__container--right"));var t=0;this.direction=getComputedStyle(this.element).direction,t="rtl"===this.direction?Math.ceil(this.list.offsetWidth-this.listItems[this.index].offsetLeft-this.listItems[this.index].offsetWidth):Math.ceil(this.listItems[this.index].offsetLeft);var i=Math.ceil(this.list.getBoundingClientRect().width-this.element.getBoundingClientRect().width);t>i&&(this.btnNext.style.display="none",this.container.classList.remove("ecl-tabs__container--right"),t=i),this.list.style.transitionDuration="0.4s","rtl"===this.direction?this.list.style.transform="translate3d("+t+"px, 0px, 0px)":this.list.style.transform="translate3d(-"+t+"px, 0px, 0px)"}handleClickOnToggle(e){this.dropdown.classList.toggle("ecl-tabs__dropdown--show"),this.moreButton.setAttribute("aria-expanded",this.dropdown.classList.contains("ecl-tabs__dropdown--show")),this.trigger("onToggle",e)}set onToggle(e){this.onToggleCallback=e}get onToggle(){return this.onToggleCallback}handleResize(){"none"===window.getComputedStyle(this.moreButton).display&&this.closeMoreDropdown(this),clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{if(this.list.style.transform="translate3d(0px, 0px, 0px)",Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<=480){this.isMobile=!0,this.index=1,this.list.style.transitionDuration="0.4s",this.shiftTabs(this.index),this.moreItem&&this.moreItem.classList.add("ecl-tabs__item--hidden"),this.moreButton&&this.moreButton.classList.add("ecl-tabs__toggle--hidden");var e=0;return this.listItems.forEach(t=>{t.classList.remove("ecl-tabs__item--hidden"),e+=Math.ceil(t.getBoundingClientRect().width)}),this.list.style.width=e+"px",this.btnNext.style.display="flex",this.container.classList.add("ecl-tabs__container--right"),this.btnPrev.style.display="none",this.container.classList.remove("ecl-tabs__container--left"),void this.tabsKeyEvents()}this.isMobile=!1,this.btnNext.style.display="none",this.container.classList.remove("ecl-tabs__container--right"),this.btnPrev.style.display="none",this.container.classList.remove("ecl-tabs__container--left"),this.list.style.width="auto";var t=this.moreButton.getBoundingClientRect().width+25,i=[],s=this.list.getBoundingClientRect().width;this.moreButtonActive=!1,this.listItems.forEach((e,n)=>{e.classList.remove("ecl-tabs__item--hidden"),s>=t+e.getBoundingClientRect().width&&!i.includes(n-1)?t+=e.getBoundingClientRect().width:(e.classList.add("ecl-tabs__item--hidden"),e.childNodes[0].classList.contains("ecl-tabs__link--active")&&(this.moreButtonActive=!0),i.push(n))}),this.moreButtonActive?this.moreButton.classList.add("ecl-tabs__toggle--active"):this.moreButton.classList.remove("ecl-tabs__toggle--active"),i.length?(this.moreItem.classList.remove("ecl-tabs__item--hidden"),this.moreButton.classList.remove("ecl-tabs__toggle--hidden"),this.moreLabel.textContent=this.moreLabelValue.replace("%d",i.length),this.dropdownItems.forEach((e,t)=>{i.includes(t)?e.classList.remove("ecl-tabs__item--hidden"):e.classList.add("ecl-tabs__item--hidden")})):(this.moreItem.classList.add("ecl-tabs__item--hidden"),this.moreButton.classList.add("ecl-tabs__toggle--hidden")),this.tabsKeyEvents()},100)}tabsKeyEvents(){this.tabsKey=[],this.listItems.forEach((e,i,s)=>{var n=null;if(e.classList.contains("ecl-tabs__item--hidden")){var a=this.dropdownItems[i];n=t(".ecl-tabs__link",a)}else n=t(".ecl-tabs__link",e);n.addEventListener("keydown",this.handleKeyboardOnTabs),this.tabsKey.push(n),0===i&&(this.firstTab=n),i===s.length-1&&(this.lastTab=n)})}closeMoreDropdown(e){for(var t=e.target;t;){if(t===this.moreButton)return;t=t.parentNode}this.moreButton.setAttribute("aria-expanded",!1),this.dropdown.classList.remove("ecl-tabs__dropdown--show")}handleKeyboardOnTabs(e){var t=e.currentTarget;switch(e.key){case"ArrowLeft":case"ArrowUp":this.arrowFocusToTab(t,"prev");break;case"ArrowRight":case"ArrowDown":this.arrowFocusToTab(t,"next");break;case"Home":this.moveFocus(this.firstTab);break;case"End":this.moveFocus(this.lastTab)}}moveFocus(e){e.closest(".ecl-tabs__dropdown")?(this.moreButton.setAttribute("aria-expanded",!0),this.dropdown.classList.add("ecl-tabs__dropdown--show")):(this.moreButton.setAttribute("aria-expanded",!1),this.dropdown.classList.remove("ecl-tabs__dropdown--show")),e.focus()}arrowFocusToTab(e,t){var i=this.tabsKey.indexOf(e);i="next"===t?i+1:i-1;var s="next"===t?this.firstTab:this.lastTab,n="next"===t?this.lastTab:this.firstTab;this.isMobile?e!==n&&(this.moveFocus(this.tabsKey[i]),this.shiftTabs(t)):e===n?this.moveFocus(s):this.moveFocus(this.tabsKey[i])}}class ot{static autoInit(e,t){var i=(void 0===t?{}:t).TIMELINE,s=new ot(e,void 0===i?{}:i);return s.init(),e.ECLTimeline=s,s}constructor(e,t){var i=void 0===t?{}:t,s=i.buttonSelector,n=void 0===s?"[data-ecl-timeline-button]":s,a=i.labelSelector,l=void 0===a?"[data-ecl-label]":a,r=i.labelExpanded,o=void 0===r?"data-ecl-label-expanded":r,h=i.labelCollapsed,c=void 0===h?"data-ecl-label-collapsed":h,d=i.attachClickListener,u=void 0===d||d,m=i.attachResizeListener,p=void 0===m||m;if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");this.element=e,this.buttonSelector=n,this.labelSelector=l,this.labelExpanded=o,this.labelCollapsed=c,this.attachClickListener=u,this.attachResizeListener=p,this.button=null,this.label=null,this.timelineItems=null,this.resizeTimer=null,this.handleClickOnButton=this.handleClickOnButton.bind(this),this.handleResize=this.handleResize.bind(this)}init(){if(!ECL)throw new TypeError("Called init but ECL is not present");ECL.components=ECL.components||new Map,this.button=t(this.buttonSelector,this.element),this.timelineItems=e(".ecl-timeline__item",this.element),this.label=t(this.labelSelector,this.element),this.attachClickListener&&this.button&&this.button.addEventListener("click",this.handleClickOnButton),this.attachResizeListener&&window.addEventListener("resize",this.handleResize),setTimeout(()=>{this.adjustLabelHeights()},100),this.element.setAttribute("data-ecl-auto-initialized","true"),ECL.components.set(this.element,this)}destroy(){this.attachClickListener&&this.button&&this.button.removeEventListener("click",this.handleClickOnButton),this.attachResizeListener&&window.removeEventListener("resize",this.handleResize),this.resizeTimer&&clearTimeout(this.resizeTimer),this.element&&(this.element.removeAttribute("data-ecl-auto-initialized"),ECL.components.delete(this.element))}handleClickOnButton(){var e="true"===this.button.getAttribute("aria-expanded");if(this.button.setAttribute("aria-expanded",e?"false":"true"),e)this.element.removeAttribute("data-ecl-timeline-expanded"),this.button.blur(),this.button.focus();else{this.element.setAttribute("data-ecl-timeline-expanded","true");var i=t(".ecl-timeline__item--collapsed",this.element);i&&(i.setAttribute("tabindex","-1"),i.focus({focusVisible:!1}),i.removeAttribute("tabindex"))}return this.label&&!e&&this.button.hasAttribute(this.labelExpanded)?this.label.innerHTML=this.button.getAttribute(this.labelExpanded):this.label&&e&&this.button.hasAttribute(this.labelCollapsed)&&(this.label.innerHTML=this.button.getAttribute(this.labelCollapsed)),this.adjustLabelHeights(),this}handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.adjustLabelHeights()},250)}adjustLabelHeights(){this.timelineItems&&this.timelineItems.forEach(e=>{var i=t(".ecl-timeline__label",e),s=t(".ecl-timeline__title",e),n=t(".ecl-timeline__content",e);if(e.style.removeProperty("--ecl-timeline-label-height"),i&&!s&&!n){var a=i.getBoundingClientRect().height;e.style.setProperty("--ecl-timeline-label-height",a+"px")}})}}var ht={autoInit:function(t){var i=void 0===t?{}:t,s=i.root,n=void 0===s?document:s,a=function(e,t){if(null==e)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;i[s]=e[s]}return i}(i,m);if(!ECL)throw new TypeError("Called autoInit but ECL is not present");var l=e("[data-ecl-auto-init]",n),r=()=>{l.filter(e=>"true"!==e.getAttribute("data-ecl-auto-initialized")).forEach(e=>{var t=e.getAttribute("data-ecl-auto-init");if(!t)throw new TypeError("(ecl-auto-init) "+t+" data-ecl-auto-init is empty");var i=ECL[t];if("function"!=typeof i)throw new TypeError("(ecl-auto-init) Could not find '"+t+"'");if("function"!=typeof i.autoInit)throw new TypeError("(ecl-auto-init) Could not find autoInit for '"+t+"'");i.autoInit(e,a)})};return r(),{update:()=>r(),destroy:()=>{ECL.components&&ECL.components.forEach((e,t)=>{e.destroy&&(e.destroy(),ECL.components.delete(t))})}}},Accordion:s,Banner:p,Carousel:v,CategoryFilter:g,Datepicker:b,Breadcrumb:f,ContentBlock:y,DescriptionList:L,Expandable:C,FileDownload:E,FileUpload:k,Gallery:re,Indicator:oe,InpageNavigation:Ce,MediaContainer:Ee,MegaMenu:De,Menu:Fe,Modal:ze,NewsTicker:He,Notification:Ke,PageHeaderExpandable:Ve,Popover:Ge,Range:We,Select:et,SiteHeader:at,Tabs:rt,Table:lt,Timeline:ot};"undefined"!=typeof globalThis?globalThis.ECL=ht:"undefined"!=typeof window&&(window.ECL=ht);export{ht as ECL};ECL.version="5.0.0-alpha.21";