@swisspost/internet-header 1.7.3 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/dist/cjs/{index-0f01e1a4.js → index-1dad2dbc.js} +14 -2
  2. package/dist/cjs/index-1dad2dbc.js.map +1 -0
  3. package/dist/cjs/{klp-widget.controller-5dc378ef.js → klp-widget.controller-847b6688.js} +3 -6
  4. package/dist/cjs/klp-widget.controller-847b6688.js.map +1 -0
  5. package/dist/cjs/{language.service-4954855f.js → language.service-bde3928b.js} +2 -2
  6. package/dist/cjs/{language.service-4954855f.js.map → language.service-bde3928b.js.map} +1 -1
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/loader.cjs.js.map +1 -1
  9. package/dist/cjs/post-klp-login-widget.cjs.entry.js +13 -10
  10. package/dist/cjs/post-klp-login-widget.cjs.entry.js.map +1 -1
  11. package/dist/cjs/post-language-switch.cjs.entry.js +6 -6
  12. package/dist/cjs/post-language-switch.cjs.entry.js.map +1 -1
  13. package/dist/cjs/post-logo.cjs.entry.js +3 -3
  14. package/dist/cjs/post-logo.cjs.entry.js.map +1 -1
  15. package/dist/cjs/post-main-navigation.cjs.entry.js +6 -6
  16. package/dist/cjs/post-main-navigation.cjs.entry.js.map +1 -1
  17. package/dist/cjs/post-meta-navigation.cjs.entry.js +3 -3
  18. package/dist/cjs/post-meta-navigation.cjs.entry.js.map +1 -1
  19. package/dist/cjs/post-search.cjs.entry.js +34 -18
  20. package/dist/cjs/post-search.cjs.entry.js.map +1 -1
  21. package/dist/cjs/post-skiplinks.cjs.entry.js +4 -4
  22. package/dist/cjs/{store-9d562808.js → store-28ab134c.js} +2 -2
  23. package/dist/cjs/{store-9d562808.js.map → store-28ab134c.js.map} +1 -1
  24. package/dist/cjs/{svg-icon.component-f4cd45b0.js → svg-icon.component-feee07b0.js} +2 -2
  25. package/dist/cjs/{svg-icon.component-f4cd45b0.js.map → svg-icon.component-feee07b0.js.map} +1 -1
  26. package/dist/cjs/{svg-sprite.component-e4b163ae.js → svg-sprite.component-45439f54.js} +6 -3
  27. package/dist/cjs/svg-sprite.component-45439f54.js.map +1 -0
  28. package/dist/cjs/swisspost-internet-breadcrumbs.cjs.entry.js +6 -6
  29. package/dist/cjs/swisspost-internet-breadcrumbs.cjs.entry.js.map +1 -1
  30. package/dist/cjs/swisspost-internet-footer.cjs.entry.js +4 -4
  31. package/dist/cjs/swisspost-internet-footer.cjs.entry.js.map +1 -1
  32. package/dist/cjs/swisspost-internet-header.cjs.entry.js +16 -14
  33. package/dist/cjs/swisspost-internet-header.cjs.entry.js.map +1 -1
  34. package/dist/cjs/swisspost-internet-header.cjs.js +2 -2
  35. package/dist/cjs/swisspost-internet-header.cjs.js.map +1 -1
  36. package/dist/collection/assets/config/test-configuration.json +2 -2
  37. package/dist/collection/assets/js/klp-login-widget.js +2 -5
  38. package/dist/collection/collection-manifest.json +1 -1
  39. package/dist/collection/components/post-internet-breadcrumbs/post-internet-breadcrumbs.css +21 -2
  40. package/dist/collection/components/post-internet-footer/post-internet-footer.css +21 -2
  41. package/dist/collection/components/post-internet-header/post-internet-header.css +22 -3
  42. package/dist/collection/components/post-internet-header/post-internet-header.js +2 -0
  43. package/dist/collection/components/post-internet-header/post-internet-header.js.map +1 -1
  44. package/dist/collection/components/post-klp-login-widget/post-klp-login-widget.css +64 -8
  45. package/dist/collection/components/post-klp-login-widget/post-klp-login-widget.js +9 -6
  46. package/dist/collection/components/post-klp-login-widget/post-klp-login-widget.js.map +1 -1
  47. package/dist/collection/components/post-language-switch/post-language-switch.css +23 -2
  48. package/dist/collection/components/post-logo/post-logo.css +21 -2
  49. package/dist/collection/components/post-main-navigation/post-main-navigation.css +21 -2
  50. package/dist/collection/components/post-meta-navigation/post-meta-navigation.css +21 -2
  51. package/dist/collection/components/post-search/post-search.css +34 -2
  52. package/dist/collection/components/post-search/post-search.js +26 -11
  53. package/dist/collection/components/post-search/post-search.js.map +1 -1
  54. package/dist/collection/models/general.model.js.map +1 -1
  55. package/dist/collection/models/header.model.js.map +1 -1
  56. package/dist/collection/services/search/coveo.service.js +3 -2
  57. package/dist/collection/services/search/coveo.service.js.map +1 -1
  58. package/dist/collection/utils/svg-sprite.component.js +1 -1
  59. package/dist/collection/utils/svg-sprite.component.js.map +1 -1
  60. package/dist/components/klp-widget.controller.js +2 -5
  61. package/dist/components/klp-widget.controller.js.map +1 -1
  62. package/dist/components/post-klp-login-widget2.js +10 -7
  63. package/dist/components/post-klp-login-widget2.js.map +1 -1
  64. package/dist/components/post-language-switch2.js +1 -1
  65. package/dist/components/post-language-switch2.js.map +1 -1
  66. package/dist/components/post-logo2.js +1 -1
  67. package/dist/components/post-logo2.js.map +1 -1
  68. package/dist/components/post-main-navigation2.js +1 -1
  69. package/dist/components/post-main-navigation2.js.map +1 -1
  70. package/dist/components/post-meta-navigation2.js +1 -1
  71. package/dist/components/post-meta-navigation2.js.map +1 -1
  72. package/dist/components/post-search2.js +30 -14
  73. package/dist/components/post-search2.js.map +1 -1
  74. package/dist/components/store.js.map +1 -1
  75. package/dist/components/svg-sprite.component.js +4 -1
  76. package/dist/components/svg-sprite.component.js.map +1 -1
  77. package/dist/components/swisspost-internet-breadcrumbs.js +1 -1
  78. package/dist/components/swisspost-internet-breadcrumbs.js.map +1 -1
  79. package/dist/components/swisspost-internet-footer.js +1 -1
  80. package/dist/components/swisspost-internet-footer.js.map +1 -1
  81. package/dist/components/swisspost-internet-header.js +11 -9
  82. package/dist/components/swisspost-internet-header.js.map +1 -1
  83. package/dist/esm/{index-2aa4bc9f.js → index-d01ac670.js} +14 -2
  84. package/dist/esm/index-d01ac670.js.map +1 -0
  85. package/dist/esm/{klp-widget.controller-5b2b7ce7.js → klp-widget.controller-a3fe87ef.js} +3 -6
  86. package/dist/esm/klp-widget.controller-a3fe87ef.js.map +1 -0
  87. package/dist/esm/{language.service-c0f81273.js → language.service-fb4baac0.js} +2 -2
  88. package/dist/esm/{language.service-c0f81273.js.map → language.service-fb4baac0.js.map} +1 -1
  89. package/dist/esm/loader.js +3 -3
  90. package/dist/esm/loader.js.map +1 -1
  91. package/dist/esm/post-klp-login-widget.entry.js +13 -10
  92. package/dist/esm/post-klp-login-widget.entry.js.map +1 -1
  93. package/dist/esm/post-language-switch.entry.js +6 -6
  94. package/dist/esm/post-language-switch.entry.js.map +1 -1
  95. package/dist/esm/post-logo.entry.js +3 -3
  96. package/dist/esm/post-logo.entry.js.map +1 -1
  97. package/dist/esm/post-main-navigation.entry.js +6 -6
  98. package/dist/esm/post-main-navigation.entry.js.map +1 -1
  99. package/dist/esm/post-meta-navigation.entry.js +3 -3
  100. package/dist/esm/post-meta-navigation.entry.js.map +1 -1
  101. package/dist/esm/post-search.entry.js +34 -18
  102. package/dist/esm/post-search.entry.js.map +1 -1
  103. package/dist/esm/post-skiplinks.entry.js +4 -4
  104. package/dist/esm/{store-d5165a8f.js → store-b7ee7d0a.js} +2 -2
  105. package/dist/esm/{store-d5165a8f.js.map → store-b7ee7d0a.js.map} +1 -1
  106. package/dist/esm/{svg-icon.component-02f233c7.js → svg-icon.component-556960e5.js} +2 -2
  107. package/dist/esm/{svg-icon.component-02f233c7.js.map → svg-icon.component-556960e5.js.map} +1 -1
  108. package/dist/esm/{svg-sprite.component-1f13a769.js → svg-sprite.component-7b47ac16.js} +6 -3
  109. package/dist/esm/svg-sprite.component-7b47ac16.js.map +1 -0
  110. package/dist/esm/swisspost-internet-breadcrumbs.entry.js +6 -6
  111. package/dist/esm/swisspost-internet-breadcrumbs.entry.js.map +1 -1
  112. package/dist/esm/swisspost-internet-footer.entry.js +4 -4
  113. package/dist/esm/swisspost-internet-footer.entry.js.map +1 -1
  114. package/dist/esm/swisspost-internet-header.entry.js +16 -14
  115. package/dist/esm/swisspost-internet-header.entry.js.map +1 -1
  116. package/dist/esm/swisspost-internet-header.js +3 -3
  117. package/dist/esm/swisspost-internet-header.js.map +1 -1
  118. package/dist/esm-es5/{index-2aa4bc9f.js → index-d01ac670.js} +2 -2
  119. package/dist/esm-es5/index-d01ac670.js.map +1 -0
  120. package/dist/esm-es5/{klp-widget.controller-5b2b7ce7.js → klp-widget.controller-a3fe87ef.js} +2 -2
  121. package/dist/esm-es5/{klp-widget.controller-5b2b7ce7.js.map → klp-widget.controller-a3fe87ef.js.map} +1 -1
  122. package/dist/esm-es5/{language.service-c0f81273.js → language.service-fb4baac0.js} +2 -2
  123. package/dist/esm-es5/loader.js +1 -1
  124. package/dist/esm-es5/loader.js.map +1 -1
  125. package/dist/esm-es5/post-klp-login-widget.entry.js +1 -1
  126. package/dist/esm-es5/post-klp-login-widget.entry.js.map +1 -1
  127. package/dist/esm-es5/post-language-switch.entry.js +1 -1
  128. package/dist/esm-es5/post-language-switch.entry.js.map +1 -1
  129. package/dist/esm-es5/post-logo.entry.js +1 -1
  130. package/dist/esm-es5/post-logo.entry.js.map +1 -1
  131. package/dist/esm-es5/post-main-navigation.entry.js +1 -1
  132. package/dist/esm-es5/post-main-navigation.entry.js.map +1 -1
  133. package/dist/esm-es5/post-meta-navigation.entry.js +1 -1
  134. package/dist/esm-es5/post-meta-navigation.entry.js.map +1 -1
  135. package/dist/esm-es5/post-search.entry.js +1 -1
  136. package/dist/esm-es5/post-search.entry.js.map +1 -1
  137. package/dist/esm-es5/post-skiplinks.entry.js +1 -1
  138. package/dist/esm-es5/{store-d5165a8f.js → store-b7ee7d0a.js} +2 -2
  139. package/dist/esm-es5/{store-d5165a8f.js.map → store-b7ee7d0a.js.map} +1 -1
  140. package/dist/esm-es5/{svg-icon.component-02f233c7.js → svg-icon.component-556960e5.js} +2 -2
  141. package/dist/esm-es5/{svg-sprite.component-1f13a769.js → svg-sprite.component-7b47ac16.js} +2 -2
  142. package/dist/esm-es5/{svg-sprite.component-1f13a769.js.map → svg-sprite.component-7b47ac16.js.map} +1 -1
  143. package/dist/esm-es5/swisspost-internet-breadcrumbs.entry.js +2 -2
  144. package/dist/esm-es5/swisspost-internet-breadcrumbs.entry.js.map +1 -1
  145. package/dist/esm-es5/swisspost-internet-footer.entry.js +1 -1
  146. package/dist/esm-es5/swisspost-internet-footer.entry.js.map +1 -1
  147. package/dist/esm-es5/swisspost-internet-header.entry.js +1 -1
  148. package/dist/esm-es5/swisspost-internet-header.entry.js.map +1 -1
  149. package/dist/esm-es5/swisspost-internet-header.js +1 -1
  150. package/dist/esm-es5/swisspost-internet-header.js.map +1 -1
  151. package/dist/swisspost-internet-header/assets/config/test-configuration.json +2 -2
  152. package/dist/swisspost-internet-header/p-04a697d8.entry.js +2 -0
  153. package/dist/swisspost-internet-header/{p-c96ad7d6.entry.js.map → p-04a697d8.entry.js.map} +1 -1
  154. package/dist/swisspost-internet-header/{p-65e18d30.system.js → p-17569f26.system.js} +2 -2
  155. package/dist/swisspost-internet-header/{p-65e18d30.system.js.map → p-17569f26.system.js.map} +1 -1
  156. package/dist/swisspost-internet-header/p-23ada4b2.system.entry.js +2 -0
  157. package/dist/swisspost-internet-header/p-23ada4b2.system.entry.js.map +1 -0
  158. package/dist/swisspost-internet-header/{p-8564ffa5.js → p-262889ce.js} +2 -2
  159. package/dist/swisspost-internet-header/{p-8564ffa5.js.map → p-262889ce.js.map} +1 -1
  160. package/dist/swisspost-internet-header/p-277d98e5.js +3 -0
  161. package/dist/swisspost-internet-header/p-277d98e5.js.map +1 -0
  162. package/dist/swisspost-internet-header/p-40b8486f.system.entry.js +2 -0
  163. package/dist/swisspost-internet-header/{p-04cf4eeb.system.entry.js.map → p-40b8486f.system.entry.js.map} +1 -1
  164. package/dist/swisspost-internet-header/p-5ee11538.system.entry.js +2 -0
  165. package/dist/swisspost-internet-header/{p-c9cf2e49.system.entry.js.map → p-5ee11538.system.entry.js.map} +1 -1
  166. package/dist/swisspost-internet-header/{p-25872a84.system.entry.js → p-64146100.system.entry.js} +2 -2
  167. package/dist/swisspost-internet-header/{p-25872a84.system.entry.js.map → p-64146100.system.entry.js.map} +1 -1
  168. package/dist/swisspost-internet-header/{p-b7feee8d.js → p-671daad9.js} +2 -2
  169. package/dist/swisspost-internet-header/{p-b7feee8d.js.map → p-671daad9.js.map} +1 -1
  170. package/dist/swisspost-internet-header/p-6cf0efa5.entry.js +2 -0
  171. package/dist/swisspost-internet-header/p-6cf0efa5.entry.js.map +1 -0
  172. package/dist/swisspost-internet-header/p-70dbaddd.system.entry.js +2 -0
  173. package/dist/swisspost-internet-header/p-70dbaddd.system.entry.js.map +1 -0
  174. package/dist/swisspost-internet-header/{p-600247ef.system.entry.js → p-721f7bc8.system.entry.js} +3 -3
  175. package/dist/swisspost-internet-header/{p-600247ef.system.entry.js.map → p-721f7bc8.system.entry.js.map} +1 -1
  176. package/dist/swisspost-internet-header/{p-0af4e3e8.entry.js → p-73dc1b8d.entry.js} +2 -2
  177. package/dist/swisspost-internet-header/{p-0af4e3e8.entry.js.map → p-73dc1b8d.entry.js.map} +1 -1
  178. package/dist/swisspost-internet-header/{p-77394e93.system.js → p-766e7efe.system.js} +2 -2
  179. package/dist/swisspost-internet-header/p-7bd03c0e.entry.js +2 -0
  180. package/dist/swisspost-internet-header/p-7bd03c0e.entry.js.map +1 -0
  181. package/dist/swisspost-internet-header/{p-99eafc12.js → p-7c5dd474.js} +2 -2
  182. package/dist/swisspost-internet-header/p-82ed11a2.system.js +3 -0
  183. package/dist/swisspost-internet-header/p-82ed11a2.system.js.map +1 -0
  184. package/dist/swisspost-internet-header/{p-f70ab166.system.js → p-89660ad0.system.js} +2 -2
  185. package/dist/swisspost-internet-header/{p-f70ab166.system.js.map → p-89660ad0.system.js.map} +1 -1
  186. package/dist/swisspost-internet-header/p-9d66cee7.entry.js +2 -0
  187. package/dist/swisspost-internet-header/{p-809e69c8.entry.js.map → p-9d66cee7.entry.js.map} +1 -1
  188. package/dist/swisspost-internet-header/{p-9a8f9281.js → p-9df5e826.js} +2 -2
  189. package/dist/swisspost-internet-header/{p-9a8f9281.js.map → p-9df5e826.js.map} +1 -1
  190. package/dist/swisspost-internet-header/{p-53670adf.system.js → p-b450a1dd.system.js} +2 -2
  191. package/dist/swisspost-internet-header/{p-53670adf.system.js.map → p-b450a1dd.system.js.map} +1 -1
  192. package/dist/swisspost-internet-header/{p-70805f8f.system.js → p-b96be594.system.js} +2 -2
  193. package/dist/swisspost-internet-header/{p-70805f8f.system.js.map → p-b96be594.system.js.map} +1 -1
  194. package/dist/swisspost-internet-header/{p-eef407b0.system.entry.js → p-bb4a21d4.system.entry.js} +2 -2
  195. package/dist/swisspost-internet-header/{p-5ecd4ac6.entry.js → p-ce17d5d5.entry.js} +2 -2
  196. package/dist/swisspost-internet-header/p-e1cd2707.entry.js +2 -0
  197. package/dist/swisspost-internet-header/{p-7d4ecdb6.entry.js.map → p-e1cd2707.entry.js.map} +1 -1
  198. package/dist/swisspost-internet-header/p-e2ebcd9e.system.entry.js +2 -0
  199. package/dist/swisspost-internet-header/p-e2ebcd9e.system.entry.js.map +1 -0
  200. package/dist/swisspost-internet-header/p-ed24b95e.entry.js +2 -0
  201. package/dist/swisspost-internet-header/p-ed24b95e.entry.js.map +1 -0
  202. package/dist/swisspost-internet-header/{p-31a1433d.entry.js → p-efbf519d.entry.js} +3 -3
  203. package/dist/swisspost-internet-header/{p-31a1433d.entry.js.map → p-efbf519d.entry.js.map} +1 -1
  204. package/dist/swisspost-internet-header/p-f008f2cf.system.entry.js +2 -0
  205. package/dist/swisspost-internet-header/p-f008f2cf.system.entry.js.map +1 -0
  206. package/dist/swisspost-internet-header/{p-ce02164e.system.js → p-f36167f1.system.js} +2 -2
  207. package/dist/swisspost-internet-header/p-fa2fbe50.entry.js +2 -0
  208. package/dist/swisspost-internet-header/p-fa2fbe50.entry.js.map +1 -0
  209. package/dist/swisspost-internet-header/p-fab3d98b.js +2 -0
  210. package/dist/swisspost-internet-header/p-fbc11f39.system.entry.js +2 -0
  211. package/dist/swisspost-internet-header/{p-1a2a0045.system.entry.js.map → p-fbc11f39.system.entry.js.map} +1 -1
  212. package/dist/swisspost-internet-header/swisspost-internet-header.css +1 -1
  213. package/dist/swisspost-internet-header/swisspost-internet-header.esm.js +1 -1
  214. package/dist/swisspost-internet-header/swisspost-internet-header.esm.js.map +1 -1
  215. package/dist/swisspost-internet-header/swisspost-internet-header.js +1 -1
  216. package/dist/types/components/post-search/post-search.d.ts +1 -0
  217. package/dist/types/models/general.model.d.ts +9 -0
  218. package/dist/types/models/header.model.d.ts +1 -0
  219. package/dist/types/stencil-public-runtime.d.ts +2 -0
  220. package/package.json +8 -8
  221. package/readme.md +1 -1
  222. package/dist/cjs/index-0f01e1a4.js.map +0 -1
  223. package/dist/cjs/klp-widget.controller-5dc378ef.js.map +0 -1
  224. package/dist/cjs/svg-sprite.component-e4b163ae.js.map +0 -1
  225. package/dist/esm/index-2aa4bc9f.js.map +0 -1
  226. package/dist/esm/klp-widget.controller-5b2b7ce7.js.map +0 -1
  227. package/dist/esm/svg-sprite.component-1f13a769.js.map +0 -1
  228. package/dist/esm-es5/index-2aa4bc9f.js.map +0 -1
  229. package/dist/swisspost-internet-header/p-02019f0d.entry.js +0 -2
  230. package/dist/swisspost-internet-header/p-02019f0d.entry.js.map +0 -1
  231. package/dist/swisspost-internet-header/p-04cf4eeb.system.entry.js +0 -2
  232. package/dist/swisspost-internet-header/p-1a2a0045.system.entry.js +0 -2
  233. package/dist/swisspost-internet-header/p-34205e78.entry.js +0 -2
  234. package/dist/swisspost-internet-header/p-34205e78.entry.js.map +0 -1
  235. package/dist/swisspost-internet-header/p-4c66f64c.system.entry.js +0 -2
  236. package/dist/swisspost-internet-header/p-4c66f64c.system.entry.js.map +0 -1
  237. package/dist/swisspost-internet-header/p-7d4ecdb6.entry.js +0 -2
  238. package/dist/swisspost-internet-header/p-809e69c8.entry.js +0 -2
  239. package/dist/swisspost-internet-header/p-981fab9d.system.entry.js +0 -2
  240. package/dist/swisspost-internet-header/p-981fab9d.system.entry.js.map +0 -1
  241. package/dist/swisspost-internet-header/p-98767123.entry.js +0 -2
  242. package/dist/swisspost-internet-header/p-98767123.entry.js.map +0 -1
  243. package/dist/swisspost-internet-header/p-a1e11213.entry.js +0 -2
  244. package/dist/swisspost-internet-header/p-a1e11213.entry.js.map +0 -1
  245. package/dist/swisspost-internet-header/p-af44cf85.system.entry.js +0 -2
  246. package/dist/swisspost-internet-header/p-af44cf85.system.entry.js.map +0 -1
  247. package/dist/swisspost-internet-header/p-c96ad7d6.entry.js +0 -2
  248. package/dist/swisspost-internet-header/p-c9cf2e49.system.entry.js +0 -2
  249. package/dist/swisspost-internet-header/p-d8b954a1.js +0 -3
  250. package/dist/swisspost-internet-header/p-d8b954a1.js.map +0 -1
  251. package/dist/swisspost-internet-header/p-e415699e.system.entry.js +0 -2
  252. package/dist/swisspost-internet-header/p-e415699e.system.entry.js.map +0 -1
  253. package/dist/swisspost-internet-header/p-e75bba89.js +0 -2
  254. package/dist/swisspost-internet-header/p-f5935384.system.js +0 -3
  255. package/dist/swisspost-internet-header/p-f5935384.system.js.map +0 -1
  256. /package/dist/esm-es5/{language.service-c0f81273.js.map → language.service-fb4baac0.js.map} +0 -0
  257. /package/dist/esm-es5/{svg-icon.component-02f233c7.js.map → svg-icon.component-556960e5.js.map} +0 -0
  258. /package/dist/swisspost-internet-header/{p-77394e93.system.js.map → p-766e7efe.system.js.map} +0 -0
  259. /package/dist/swisspost-internet-header/{p-99eafc12.js.map → p-7c5dd474.js.map} +0 -0
  260. /package/dist/swisspost-internet-header/{p-eef407b0.system.entry.js.map → p-bb4a21d4.system.entry.js.map} +0 -0
  261. /package/dist/swisspost-internet-header/{p-5ecd4ac6.entry.js.map → p-ce17d5d5.entry.js.map} +0 -0
  262. /package/dist/swisspost-internet-header/{p-ce02164e.system.js.map → p-f36167f1.system.js.map} +0 -0
  263. /package/dist/swisspost-internet-header/{p-e75bba89.js.map → p-fab3d98b.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"swisspost-internet-header.entry.cjs.js","mappings":";;;;;;;;;;;;;AAGA;;;;;;AAMO,MAAM,eAAe,GAAG,CAC7B,MAAuB,EACvB,eAAgC;;EAGhC,IA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B,EAAE,CAAC,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EACrD,eAAe,EAAE,CAAC,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EACjD,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,IAE9BA,QAACI,eAAE,IAAC,SAAS,EAAE,oBAAoB,KAAK,IAAI,IAC1CJ,kCAAsB,WAAW,EAAC,UAAU,IAC1CA,QAACI,eAAE,IAAC,SAAS,EAAE,oBAAoB,KAAK,IAAI,IAC1CJ,kCACE,EAAE,EAAC,6BAA6B,EAChC,IAAI,EAAC,MAAM,GACW,CACrB,CACgB,CACpB,CACgB,EACvBA,iBAAK,KAAK,EAAC,0BAA0B,IACnCA,QAACI,eAAE,IAAC,SAAS,EAAE,IAAI,CAAC,MAAM,KAAK,KAAK,IAClCJ,yBAAa,iBAAiB,EAAE,CAAC,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,GAAgB,CAC/E,EACLA,QAACI,eAAE,IAAC,SAAS,EAAE,CAAC,CAAC,WAAW,IAC1BJ,uCACEA,kBAAM,IAAI,EAAC,cAAc,GAAQ,CACX,CACrB,EACLA,QAACI,eAAE,IAAC,SAAS,EAAE,oBAAoB,KAAK,KAAK,IAAI,oBAAoB,KAAK,IAAI,IAC5EJ,kCACE,EAAE,EAAC,8BAA8B,EACjC,iBAAiB,EAAE,CAAC,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EACrD,IAAI,EAAC,UAAU,GACO,CACrB,EACLA,kBAAM,IAAI,EAAC,MAAM,GAAQ,CACrB,CACF,CACC,CACJ,EACP;GACH;;;;;;;;;;;;;;;;;","names":["getUserLang","persistLanguageChoice","uniqueId","state","throttle","debounce","dispose","h","Host","SvgSprite","translate","If","SvgIcon"],"sources":["./src/services/route.service.ts","./src/services/config.service.ts","./src/components/post-internet-header/post-internet-header.scss?tag=swisspost-internet-header&encapsulation=shadow","./src/components/post-internet-header/post-internet-header.tsx"],"sourcesContent":["import { ActiveRouteProp } from '../models/general.model';\nimport { NavMainEntity, MainNavScoreList } from '../models/header.model';\n\n/**\n * Activate the current route based on the config and the match mode\n * @param config Main Navigation Config\n * @param activeRouteProp Match mode\n * @returns Modified Main Navigation Config\n */\nexport const markActiveRoute = (\n config: NavMainEntity[],\n activeRouteProp: ActiveRouteProp,\n): NavMainEntity[] => {\n // Don't highlight any route\n if (activeRouteProp === false) {\n return config;\n }\n\n // Set compare URL and check if activeRouteProp is valid\n let compareUrl: URL;\n config = resetOverrideConfig(config);\n\n if (activeRouteProp === 'auto' || activeRouteProp === 'exact') {\n // Check if an active route is already configured, set override to that and return\n if (hasActivePortalRoute(config)) {\n return resetActiveStateToPortalConfig(config);\n }\n\n compareUrl = new URL(window.location.href);\n } else {\n try {\n compareUrl = new URL(activeRouteProp, document.location.origin);\n } catch (error) {\n console.warn(\n `Active Route: ${activeRouteProp} is not a valid URL. Navigation highlighting has been disabled.`,\n );\n return config;\n }\n }\n\n const scoreList = compileScoreList(config, compareUrl, activeRouteProp);\n\n if (scoreList.length === 0) {\n // No match found or already active links defined\n return config;\n }\n\n const winnerPair = scoreList[0];\n winnerPair.main.isActiveOverride = true;\n if (winnerPair.sub) winnerPair.sub.isActiveOverride = true;\n\n return config;\n};\n\n/**\n * Check if the portal config set any active route\n * @param config Main navigation config\n * @returns True if portal set any route as active\n */\nexport const hasActivePortalRoute = (config: NavMainEntity[]): boolean => {\n return config.filter(nav => nav.isActive).length > 0;\n};\n\nexport const resetActiveStateToPortalConfig = (config: NavMainEntity[]): NavMainEntity[] => {\n return config.map(nav => ({\n ...nav,\n isActiveOverride: nav.isActive,\n flyout: nav.flyout.map(flyout => ({\n ...flyout,\n linkList: flyout.linkList.map(link => ({ ...link, isActiveOverride: link.isActive })),\n })),\n }));\n};\n\nconst resetOverrideConfig = (config: NavMainEntity[]): NavMainEntity[] => {\n return config.map(nav => ({\n ...nav,\n isActiveOverride: false,\n flyout: nav.flyout.map(flyout => ({\n ...flyout,\n linkList: flyout.linkList.map(link => ({ ...link, isActiveOverride: false })),\n })),\n }));\n};\n\n/**\n * Compile a list of scores based on the map mode, sorted in descending order\n * @param config Main Nav Config\n * @param compareUrl Current Browser URL or a custom URL\n * @param activeRouteProp Match mode\n * @returns A list of scored URLs if any matched\n */\nexport const compileScoreList = (\n config: NavMainEntity[],\n compareUrl: URL,\n activeRouteProp: ActiveRouteProp,\n): MainNavScoreList => {\n // Flag to check if the Portal set any active links or if there are any exact matches\n let hadAnyActiveLink = false;\n const scoreList: MainNavScoreList = [];\n\n config\n .filter(mainNav => !hadAnyActiveLink && mainNav)\n .forEach(mainNav => {\n try {\n const score = compareRoutes(\n compareUrl,\n new URL(mainNav.url),\n activeRouteProp as 'auto' | 'exact',\n );\n\n hadAnyActiveLink = updateScoreList(\n scoreList,\n score,\n { main: mainNav, score },\n hadAnyActiveLink,\n );\n } catch {\n // Not a valid url, continue\n }\n\n // Loop through flyout links 2nd level\n mainNav.flyout.forEach(flyout => {\n flyout.linkList?.forEach(linklist => {\n // Don't override if any link is already active\n if (linklist.isActive && (activeRouteProp === 'auto' || activeRouteProp === 'exact')) {\n hadAnyActiveLink = true;\n return;\n }\n\n try {\n const url = new URL(linklist.url);\n const score = compareRoutes(compareUrl, url, activeRouteProp as 'auto' | 'exact');\n\n hadAnyActiveLink = updateScoreList(\n scoreList,\n score,\n { main: mainNav, sub: linklist, score },\n hadAnyActiveLink,\n );\n } catch {\n // Not a valid URL, continue\n }\n });\n });\n });\n\n return scoreList.sort((a, b) => b.score - a.score);\n};\n\n/**\n * Update score list\n */\nfunction updateScoreList(\n scoreList: MainNavScoreList,\n score: number,\n scoreListItem: any,\n hadAnyActiveLink: boolean,\n) {\n let hadActiveLink = hadAnyActiveLink;\n\n if (score > 0) {\n if (score === Infinity) hadActiveLink = true;\n // Push score\n scoreList.push(scoreListItem);\n }\n\n return hadActiveLink;\n}\n\n/**\n * Compare two URLs for similarity based on a match mode\n * @param baseUrl Browser URL\n * @param compareUrl Navigatgion URL\n * @param matchMode exact or auto matching\n * @returns Score\n */\nexport const compareRoutes = (\n baseUrl: URL,\n compareUrl: URL,\n matchMode?: 'auto' | 'exact',\n): number => {\n // One url is not defined or they don't share the same orign\n if (!baseUrl || !compareUrl || baseUrl.origin !== compareUrl.origin) {\n return 0;\n }\n\n const baseUrlPath = baseUrl.pathname.toLocaleLowerCase();\n const compareUrlPath = compareUrl.pathname.toLocaleLowerCase();\n\n // Exact match, origin and pathname are the same\n if (baseUrlPath === compareUrlPath) {\n return Infinity;\n }\n\n // The basepath is longer than the comparison, a match is impossible\n if (baseUrl.pathname.length < compareUrl.pathname.length) {\n return 0;\n }\n\n if (matchMode === 'auto') {\n const baseSegments = [\n baseUrl.origin.toLocaleLowerCase(),\n ...baseUrlPath.split('/').filter(x => !!x),\n ];\n const compareSegments = [\n compareUrl.origin.toLocaleLowerCase(),\n ...compareUrlPath.split('/').filter(x => !!x),\n ];\n\n const score = getSimilarityScore(baseSegments, compareSegments);\n\n // If only some segments match, but not the whole smaller array, it's not a match\n return Math.min(baseSegments.length, compareSegments.length) === score ? score : 0;\n }\n\n return 0;\n};\n\n/**\n * Check how many items in an array match\n * @param a Base array\n * @param b Compare array\n * @returns Score\n */\nexport const getSimilarityScore = (a: string[], b: string[]): number => {\n if (!a?.length || !b?.length) {\n return 0;\n }\n\n let i = 0;\n for (; i < Math.min(a.length, b.length); i++) {\n if (a[i] !== b[i]) {\n return 0;\n }\n }\n\n return i;\n};\n","import {\n Environment,\n IPortalConfig,\n ILocalizedConfig,\n ICustomConfig,\n ILocalizedCustomConfig,\n LocalizedConfigParameters,\n} from '../models/general.model';\nimport { NavMainEntity } from '../models/header.model';\nimport { getUserLang, persistLanguageChoice } from './language.service';\nimport { uniqueId } from '../utils/utils';\nimport { markActiveRoute } from './route.service';\n\n// Prevent double requests\nlet request: Promise<IPortalConfig> | null = null;\n\n// Cache the original os flyout to use it for updates\nlet osFlyoutCache: NavMainEntity | null = null;\n\nconst getPPMConfig = (): ILocalizedConfig | null => {\n const ppmConfigScript = document.querySelector('#PPM_HEADER_DATA');\n\n if (ppmConfigScript?.textContent) {\n return JSON.parse(ppmConfigScript.textContent);\n }\n\n return null;\n};\n\n/**\n * Get a localized config object\n *\n * @param projectId String identifying the project\n * @param language [optional] Preferred language\n * @returns Localized config object\n */\nexport const getLocalizedConfig = async ({\n projectId,\n environment,\n language,\n cookieKey,\n localStorageKey,\n activeRouteProp,\n localizedCustomConfig,\n osFlyoutOverrides,\n}: LocalizedConfigParameters): Promise<ILocalizedConfig> => {\n const ppmConfig = getPPMConfig();\n let localizedConfig: ILocalizedConfig;\n let config: IPortalConfig | null = null;\n let lang: string | undefined;\n\n if (ppmConfig) {\n localizedConfig = ppmConfig;\n lang = document.documentElement.lang;\n } else {\n if (!request) {\n request = fetchConfig(projectId, environment);\n }\n\n config = await request;\n lang = getUserLang(Object.keys(config), language, localStorageKey, cookieKey);\n\n if (lang === undefined) {\n throw new Error('Internet Header: unable to determine current language');\n }\n\n // Clone config for more predictable state updates\n localizedConfig = { ...config[lang] };\n }\n\n // Merge custom config with portal config\n if (localizedCustomConfig) {\n const header = localizedCustomConfig?.header?.navMain\n ? {\n ...localizedConfig.header,\n navMain: [...localizedConfig.header.navMain, ...localizedCustomConfig.header.navMain],\n }\n : localizedConfig.header;\n localizedConfig = {\n ...localizedConfig,\n header,\n };\n }\n\n // Add entries to flyout_os\n if (osFlyoutOverrides)\n localizedConfig.header.navMain = mergeOsFlyoutOverrides(localizedConfig, osFlyoutOverrides);\n\n // Mark active route\n if (activeRouteProp)\n localizedConfig.header.navMain = markActiveRoute(\n localizedConfig.header.navMain,\n activeRouteProp,\n );\n\n setMainNavigationIds(localizedConfig?.header?.navMain);\n\n // Set the new language choice\n persistLanguageChoice(lang, cookieKey, localStorageKey);\n\n return localizedConfig;\n};\n\n/**\n * Merge portal config with custom os flyout overrides\n * @param config Localized config\n * @param osFlyoutOverrides Overrides for the flyout\n * @returns Merged localized config\n */\nexport const mergeOsFlyoutOverrides = (\n config: ILocalizedConfig,\n osFlyoutOverrides: NavMainEntity,\n): NavMainEntity[] => {\n if (!osFlyoutOverrides) return config.header.navMain;\n\n return config.header.navMain.map(mainNav => {\n if (mainNav.id !== 'flyout_os') return mainNav;\n\n if (osFlyoutCache === null) {\n osFlyoutCache = JSON.parse(JSON.stringify(mainNav)) as NavMainEntity;\n }\n\n const mainNavText = osFlyoutOverrides.text ?? osFlyoutCache.text;\n const mainNavTitle = osFlyoutOverrides.title ?? osFlyoutCache.title;\n\n if (\n !osFlyoutCache.flyout ||\n osFlyoutCache.flyout.length === 0 ||\n !osFlyoutOverrides.flyout ||\n osFlyoutOverrides.flyout.length === 0\n )\n return {\n ...mainNav,\n title: mainNavTitle,\n text: mainNavText,\n };\n\n // Add entries for os flyout columns without overriding existing config\n const mainNavFlyout = [\n ...osFlyoutCache.flyout.map((col, index) => {\n const overrides = osFlyoutOverrides.flyout[index];\n const title = overrides.title ?? col.title;\n\n const linkList = overrides.linkList ? osFlyoutOverrides.flyout[index].linkList : [];\n\n return {\n title,\n linkList: [...col.linkList, ...linkList],\n };\n }),\n ...osFlyoutOverrides.flyout.slice(osFlyoutCache.flyout.length),\n ];\n\n return {\n ...mainNav,\n text: mainNavText,\n title: mainNavTitle,\n flyout: mainNavFlyout,\n } as NavMainEntity;\n });\n};\n\n/**\n * Fetch the general config based on project id\n *\n * @returns Promise for Post Portal general config\n */\nexport const fetchConfig = async (\n projectId: string,\n environment: Environment,\n): Promise<IPortalConfig> => {\n // Check if project id is sanitized\n if (!isValidProjectId(projectId)) {\n throw new Error(`Internet Header: invalid project id \"${projectId}\"`);\n }\n\n if (projectId === 'test') {\n environment = 'int01';\n }\n\n let url = generateConfigUrl(projectId, environment);\n\n // Get the config if cache is invalid\n try {\n const res = await fetch(url);\n return (await res.json()) as IPortalConfig;\n } catch (error) {\n throw new Error(`Internet Header: fetching config failed. ${error.message}`);\n }\n};\n\n/**\n * Generate an URL with all necessary query params to get the configuration.\n * Project id \"test\" will return a test configuration\n * @param projectId string\n * @param environment int01, int02 or prod\n * @returns URL pointing to the project config\n */\nexport const generateConfigUrl = (projectId: string, environment: Environment): string => {\n if (projectId === 'test') return 'assets/config/test-configuration.json';\n\n const parsedEnvironment = environment.toLowerCase();\n const isProd = parsedEnvironment === 'prod';\n const host = `https://${isProd ? 'www' : 'int'}.post.ch`;\n try {\n // Use URL to validate the generated URL\n return new URL(\n `${host}/api/headerjs/Json?serviceid=${encodeURIComponent(projectId)}${\n !isProd ? '&environment=' + parsedEnvironment : ''\n }`,\n ).toString();\n } catch (error) {\n throw new Error(`Internet Header: Config URL is invalid.`);\n }\n};\n\n/**\n * Check if project id contains only URL safe characters\n *\n * @param projectId Project Id string\n * @returns The valid project id\n */\nexport const isValidProjectId = (projectId: string): boolean => {\n return projectId !== '' && projectId.length > 0 && /^[a-zA-Z][\\w-]*[a-zA-Z0-9]$/.test(projectId);\n};\n\n/**\n * Get the localized config object from a custom config\n *\n * @param config String or json object of the custom config\n * @param language Specific language\n * @returns Localized custom config object\n */\nexport const getLocalizedCustomConfig = (\n config: string | ICustomConfig,\n language: string,\n): ILocalizedCustomConfig | undefined => {\n let customConfig: ICustomConfig;\n try {\n customConfig = typeof config === 'string' ? JSON.parse(config) : config;\n } catch (error) {\n throw new Error(\n `Internet Header: Custom config is invalid. Make sure your custom config contains valid JSON syntax and matches the definition. `,\n );\n }\n let localizedCustomConfig: ILocalizedCustomConfig | undefined = customConfig[language];\n if (localizedCustomConfig?.header?.navMain)\n setMainNavigationIds(localizedCustomConfig.header.navMain);\n return localizedCustomConfig;\n};\n\n/**\n * Check if mobile header styles are applied or not\n * @returns True if browser is smaller than 1024px\n */\nexport const isMobile = () => window.innerWidth < 1024;\n\n/**\n * Set unique ID's on main navigation entities but conserve flyout_os to be able to\n * identify the online-service flyout, which can be configured by osFlyoutOverrides\n */\nexport const setMainNavigationIds = (navMainEntities: NavMainEntity[]): void => {\n navMainEntities.forEach(navMainEntity => {\n navMainEntity.id = navMainEntity.id === 'flyout_os' ? navMainEntity.id : uniqueId('main-nav-');\n });\n};\n","@use '@swisspost/design-system-styles/variables/color';\n@use '../../utils/utils.scss';\n@use '../../utils/mixins.scss';\n\n:host {\n display: block;\n position: relative;\n font-size: 1rem;\n font-weight: 300;\n z-index: var(--header-z-index, 10);\n\n --header-height: 3.5rem; // 56px\n --meta-header-height: 0px; // Not visible on mobile\n --language-dropdown-margin-top: 0px;\n\n @include mixins.min(lg) {\n --meta-header-height: 3rem; // 48px\n --header-height: 4rem; // 64px\n }\n\n @include mixins.min(xl) {\n --header-height: 4.5rem; // 72px\n }\n}\n\n// Set height to 0 if meta is never visible\n:host([meta='false']) {\n --meta-header-height: 0px;\n // Compensation for header border-bottom, when language dropdown is displayed within main navigation controls\n --language-dropdown-margin-top: 1px;\n}\n\n// Support different kinds of stickyness modes\n// Works only in combination with setting header heights dynamically\n@supports (position: sticky) {\n // If stickyness is none, simply apply no styles, all others are sticky\n :host(:not(.stickyness-none)) {\n position: sticky;\n }\n\n // Everything is always sticky\n :host(.stickyness-full) {\n top: 0;\n }\n\n // Only main nav is sticky\n :host(.stickyness-main) {\n top: calc(var(--meta-header-height, 0px) * -1);\n }\n\n // Hide everything\n :host(.stickyness-minimal) {\n top: calc((var(--header-height, 0px) + var(--meta-header-height, 0px)) * -1);\n transition: top 200ms ease-in;\n }\n\n // Show main when scrolling up or any of the menus are open\n :host(.stickyness-minimal.scrolling-up),\n :host(.stickyness-minimal.dropdown-open) {\n top: calc(var(--meta-header-height, 0px) * -1);\n transition: top 200ms ease-out;\n }\n}\n\n.post-internet-header {\n border-bottom: 1px solid color.$gray-10;\n background-color: white;\n}\n\n.main-navigation-container {\n display: flex;\n\n & > .main-navigation-controls {\n flex: 0 0 auto;\n }\n}\n\n.main-navigation {\n display: flex;\n}\n\n.sub-navigation-container {\n position: absolute;\n top: 100%;\n left: 0;\n width: 100%;\n display: flex;\n background: white;\n visibility: hidden;\n}\n\n.main-navigation-item:hover .sub-navigation-container {\n visibility: visible;\n}\n\n.main-navigation-controls {\n display: flex;\n margin-left: auto;\n\n @include mixins.max(lg) {\n font-weight: 400;\n }\n\n @include mixins.min(lg) {\n font-size: 1.0625rem;\n }\n\n & > * {\n border-left: 1px solid color.$gray-10;\n }\n}\n\n.menu-button {\n display: flex;\n align-items: center;\n padding: 0 calc(1rem - 1px);\n font-weight: 300;\n cursor: pointer;\n border-left: 1px solid color.$gray-10;\n order: 1; /* Display on the far right because of tab order */\n\n @include mixins.min(lg) {\n display: none;\n }\n\n .visually-hidden {\n @include mixins.between(rg, lg) {\n @include mixins.reset-visually-hidden();\n\n margin-right: 0.5rem;\n }\n }\n\n svg {\n width: 1.5rem;\n height: 1.5rem;\n }\n}\n\n.full-width {\n .wide-container {\n max-width: none;\n }\n}\n","import {\n Component,\n Host,\n Element,\n h,\n State,\n Prop,\n Watch,\n Listen,\n EventEmitter,\n Event,\n Method,\n} from '@stencil/core';\nimport { debounce, throttle } from 'throttle-debounce';\nimport {\n getLocalizedConfig,\n getLocalizedCustomConfig,\n isValidProjectId,\n} from '../../services/config.service';\nimport { state, dispose } from '../../data/store';\nimport { DropdownElement, DropdownEvent, NavMainEntity } from '../../models/header.model';\nimport { SvgSprite } from '../../utils/svg-sprite.component';\nimport { SvgIcon } from '../../utils/svg-icon.component';\nimport { StickynessOptions } from '../../models/implementor.model';\nimport { ActiveRouteProp, Environment, ICustomConfig } from '../../models/general.model';\nimport { IAvailableLanguage } from '../../models/language.model';\nimport { translate } from '../../services/language.service';\nimport { If } from '../../utils/if.component';\nimport packageJson from '../../../package.json';\n\n@Component({\n tag: 'swisspost-internet-header',\n styleUrl: 'post-internet-header.scss',\n shadow: true,\n})\nexport class PostInternetHeader {\n /**\n * Your project id, previously passed as query string parameter serviceId.\n */\n @Prop() project: string;\n\n /**\n * Sticky behaviour of the header.\n */\n @Prop() stickyness: StickynessOptions = 'minimal';\n\n /**\n * Initial language to be used. Overrides automatic language detection.\n */\n @Prop() language?: string;\n\n /**\n * Toggle the meta navigation.\n */\n @Prop() meta: boolean = true;\n\n /**\n * Toggle the login link (when logged out) or the user widget (when logged in).\n */\n @Prop() login: boolean = true;\n\n /**\n * Toggle the search button.\n */\n @Prop() search: boolean = true;\n\n /**\n * Toggle skiplinks. They help keyboard users to quickly jump to important sections of the page.\n */\n @Prop() skiplinks: boolean = true;\n\n /**\n * DEPRECATED!: Define a proxy URL for the config fetch request. Will be removed in the next major version\n */\n @Prop() configProxy?: string;\n\n /**\n * Target environment. Choose 'int01' for local testing.\n */\n @Prop() environment: Environment = 'prod';\n\n /**\n * Override the language switch links with custom URLs. Helpful when your application contains sub-pages and you\n * would like to stay on subpages when the user changes language.\n */\n @Prop() languageSwitchOverrides?: string | IAvailableLanguage[];\n\n /**\n * Customize the header config loaded from the post portal.\n */\n @Prop() customConfig?: string | ICustomConfig;\n\n /**\n * The header uses this cookie to set the language. Disables automatic language detection.\n */\n @Prop() languageCookieKey?: string;\n\n /**\n * The header uses this local storage key to set the language. Disables automatic language selection.\n */\n @Prop() languageLocalStorageKey?: string = 'swisspost-internet-header-language';\n\n /**\n * Set the currently activated route. If there is a link matching this URL in the header, it will be highlighted.\n * Will also highlight partly matching URLs. When set to auto, will use current location.href for comparison.\n */\n @Prop() activeRoute?: 'auto' | false | string = 'auto';\n\n /**\n * Online Services only: Add custom links to the special online service navigation entry\n */\n @Prop() osFlyoutOverrides?: string | NavMainEntity;\n\n /**\n * Displays the header at full width for full-screen applications\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * Fires when the header has been rendered to the page.\n */\n @Event() headerLoaded: EventEmitter<void>;\n\n @State() activeFlyout: string | null = null;\n @State() activeDropdownElement: DropdownElement | null = null;\n @Element() host: HTMLElement;\n\n /**\n * Get the currently set language as a two letter string (\"de\", \"fr\" \"it\" or \"en\")\n * @returns string\n */\n @Method()\n async getCurrentLanguage(): Promise<'de' | 'fr' | 'it' | 'en' | string> {\n return state.currentLanguage ?? 'de';\n }\n\n private mainNav?: HTMLPostMainNavigationElement;\n private lastScrollTop = window.scrollY || document.documentElement.scrollTop;\n private throttledScroll: throttle<() => void>;\n private debouncedResize: debounce<() => void>;\n private lastWindowWidth: number = window.innerWidth;\n\n constructor() {\n if (this.project === undefined || this.project === '' || !isValidProjectId(this.project)) {\n throw new Error(\n `Internet Header project key is \"${this.project}\". Please provide a valid project key.`,\n );\n }\n }\n\n connectedCallback() {\n this.throttledScroll = throttle(300, () => this.handleScrollEvent());\n this.debouncedResize = debounce(200, () => this.handleResize());\n window.addEventListener('scroll', this.throttledScroll, { passive: true });\n window.addEventListener('resize', this.debouncedResize, { passive: true });\n }\n\n disconnectedCallback() {\n window.removeEventListener('scroll', this.throttledScroll);\n window.removeEventListener('resize', this.debouncedResize);\n\n // Reset the store to its original state\n dispose();\n }\n\n async componentWillLoad() {\n // Wait for the config to arrive, then render the header\n try {\n state.projectId = this.project;\n state.environment = this.environment;\n if (this.language !== undefined) state.currentLanguage = this.language;\n state.languageSwitchOverrides =\n typeof this.languageSwitchOverrides === 'string'\n ? JSON.parse(this.languageSwitchOverrides)\n : this.languageSwitchOverrides;\n state.osFlyoutOverrides =\n typeof this.osFlyoutOverrides === 'string'\n ? JSON.parse(this.osFlyoutOverrides)\n : this.osFlyoutOverrides;\n\n if (this.customConfig !== undefined && state.currentLanguage !== null) {\n state.localizedCustomConfig = getLocalizedCustomConfig(\n this.customConfig,\n state.currentLanguage,\n );\n }\n\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n } catch (error) {\n console.error(error);\n }\n }\n\n componentDidLoad() {\n window.requestAnimationFrame(() => {\n this.handleResize();\n this.headerLoaded.emit();\n this.host.classList.add('header-loaded');\n });\n }\n\n @Watch('language')\n async handleLanguageChange(newValue: string) {\n state.currentLanguage = newValue;\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: newValue,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n if (this.customConfig)\n state.localizedCustomConfig = getLocalizedCustomConfig(this.customConfig, newValue);\n }\n\n @Watch('languageSwitchOverrides')\n handleAvailableLanguagesChage(newValue: string | IAvailableLanguage[]) {\n state.languageSwitchOverrides = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;\n }\n\n @Watch('osFlyoutOverrides')\n async handleOsFlyoutOverrides(newValue: string | NavMainEntity) {\n state.osFlyoutOverrides = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n }\n\n @Watch('activeRoute')\n async handleActiveRouteChange(newValue: string | ActiveRouteProp) {\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: newValue,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n }\n\n @Watch('customConfig')\n async handleCustomConfigChange(newValue: string | ICustomConfig) {\n if (this.language === undefined) return;\n const localizedCustomConfig = getLocalizedCustomConfig(newValue, this.language);\n state.localizedCustomConfig = localizedCustomConfig;\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n }\n\n @Watch('search')\n handleSearchChange(newValue: boolean) {\n state.search = newValue;\n }\n\n @Watch('login')\n handleLoginChange(newValue: boolean) {\n state.login = newValue;\n }\n\n @Watch('meta')\n handleMetaChange(newValue: boolean) {\n state.meta = newValue;\n }\n\n @Listen('languageChanged')\n handleLanguageChangeEvent(event: CustomEvent<string>) {\n this.handleLanguageChange(event.detail);\n }\n\n private handleClickOutsideBound = this.handleClickOutside.bind(this);\n\n private handleClickOutside(event: Event) {\n // Close active dropdown element on click outside of it\n if (this.activeDropdownElement && !event.composedPath().includes(this.activeDropdownElement)) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n }\n\n private handleKeyUp(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n if (this.activeDropdownElement) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n if (this.activeFlyout !== null && this.mainNav) {\n this.mainNav.toggleDropdown(false);\n }\n }\n }\n\n private handleScrollEvent() {\n // Credits: \"https://github.com/qeremy/so/blob/master/so.dom.js#L426\"\n const st = window.scrollY || document.documentElement.scrollTop;\n\n // Toggle class without re-rendering the component if stickyness is minimal\n // the other stickyness modes do not need the class\n if (this.stickyness === 'minimal') {\n this.host.classList.toggle('scrolling-up', st <= this.lastScrollTop);\n }\n\n // For Mobile or negative scrolling\n this.lastScrollTop = st <= 0 ? 0 : st;\n }\n\n private handleResize() {\n // Close main navigation dropdown if size changed to bigger than 1024px (search dropdown will be kept open)\n if (this.isMainNavOpen() && this.lastWindowWidth < 1024 && window.innerWidth >= 1024) {\n this.activeDropdownElement?.toggleDropdown(false);\n }\n\n this.lastWindowWidth = window.innerWidth;\n }\n\n /**\n * Close open dropdown menus if another is being opened\n *\n * @param event Dropdown toggled event\n * @returns void\n */\n private handleDropdownToggled(event: CustomEvent<DropdownEvent>) {\n if (!event.detail.open && this.activeDropdownElement !== event.detail.element) {\n // Some dropdown got closed programmatically (possibly by this function). To prevent\n // a circle or an outdated state, we'll not handle this event\n return;\n }\n\n if (event.detail.open === true) {\n if (this.activeDropdownElement) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n\n this.activeDropdownElement = event.detail.element;\n\n if (window.innerWidth >= 1024) {\n // Add event listener to close active dropdown element on click outsite of it\n // Also adds 10ms delay in case of an external interaction:\n // Some button on the page calls toggleDropdown() -> dropdown opens\n // Click event bubbles to the window, this.handleClickOutsideBound closes dropdown again\n window.setTimeout(() => {\n window.addEventListener('click', this.handleClickOutsideBound);\n }, 10);\n }\n\n if (this.activeFlyout !== null && this.mainNav) {\n this.mainNav.setActiveFlyout(null);\n }\n } else {\n this.activeDropdownElement = null;\n\n // Remove event listener as it is not needed if no dropdown element is active\n window.removeEventListener('click', this.handleClickOutsideBound);\n }\n }\n\n /**\n * Close open dropdowns if the flyout is being opened\n * @param event Flyout toggle event\n */\n private handleFlyoutToggled(event: CustomEvent<string | null>) {\n this.activeFlyout = event.detail;\n\n if (this.activeDropdownElement && event.detail && !this.isMainNavOpen()) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n }\n\n private toggleMobileDropdown() {\n this.mainNav?.toggleDropdown();\n }\n\n private isMainNavOpen() {\n return (\n this.activeDropdownElement && this.activeDropdownElement.tagName === 'POST-MAIN-NAVIGATION'\n );\n }\n\n render() {\n if (!state.localizedConfig?.header) {\n console.error(new Error('Internet Header: Config cannot be loaded'));\n return;\n }\n\n const config = state.localizedConfig;\n const renderMetaNavigation =\n this.meta &&\n config.header.navMeta !== undefined &&\n config.header.navMeta?.filter(meta => !meta.isHomeLink).length > 0;\n const renderLogin =\n (this.login ?? !config.header.isLoginWidgetHidden) && config.header.loginWidgetOptions;\n const renderLanguageSwitch = config.header.navLang.length > 1;\n\n return (\n <Host\n class={`stickyness-${this.stickyness} ${\n this.activeDropdownElement || this.activeFlyout ? 'dropdown-open' : ''\n }`}\n data-version={packageJson.version}\n onKeyup={(e: KeyboardEvent) => this.handleKeyUp(e)}\n >\n <header class={`post-internet-header${this.fullWidth ? ' full-width' : ''}`}>\n <SvgSprite />\n <h1 class=\"visually-hidden\">{translate('Navigate on post.ch')}</h1>\n <If condition={this.skiplinks === true}>\n <post-skiplinks></post-skiplinks>\n </If>\n <If condition={renderMetaNavigation === true}>\n <post-meta-navigation\n orientation=\"horizontal\"\n class=\"hidden-lg\"\n full-width={this.fullWidth}\n >\n <If condition={renderLanguageSwitch === true}>\n <post-language-switch\n id=\"post-language-switch-desktop\"\n mode=\"dropdown\"\n onDropdownToggled={e => this.handleDropdownToggled(e)}\n ></post-language-switch>\n </If>\n </post-meta-navigation>\n </If>\n <div class=\"main-navigation-container wide-container\">\n <post-logo></post-logo>\n <button\n class=\"menu-button nav-link\"\n onClick={() => this.toggleMobileDropdown()}\n aria-haspopup=\"menu\"\n aria-controls=\"post-internet-header-main-navigation\"\n aria-expanded={this.activeDropdownElement ? 'true' : 'false'}\n >\n <span class=\"menu-button-text visually-hidden\">{config.header.mobileMenu.text}</span>\n <SvgIcon name={this.isMainNavOpen() ? 'pi-close' : 'pi-menu'}></SvgIcon>\n </button>\n <post-main-navigation\n onDropdownToggled={e => this.handleDropdownToggled(e)}\n onFlyoutToggled={e => this.handleFlyoutToggled(e)}\n ref={el => (this.mainNav = el)}\n >\n <If condition={renderMetaNavigation === true}>\n <post-meta-navigation orientation=\"vertical\">\n <If condition={renderLanguageSwitch === true}>\n <post-language-switch\n id=\"post-language-switch-mobile\"\n mode=\"list\"\n ></post-language-switch>\n </If>\n </post-meta-navigation>\n </If>\n </post-main-navigation>\n <div class=\"main-navigation-controls\">\n <If condition={this.search !== false}>\n <post-search onDropdownToggled={e => this.handleDropdownToggled(e)}></post-search>\n </If>\n <If condition={!!renderLogin}>\n <post-klp-login-widget>\n <slot name=\"login-widget\"></slot>\n </post-klp-login-widget>\n </If>\n <If condition={renderMetaNavigation === false && renderLanguageSwitch === true}>\n <post-language-switch\n id=\"post-language-switch-no-meta\"\n onDropdownToggled={e => this.handleDropdownToggled(e)}\n mode=\"dropdown\"\n ></post-language-switch>\n </If>\n <slot name=\"main\"></slot>\n </div>\n </div>\n </header>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"swisspost-internet-header.entry.cjs.js","mappings":";;;;;;;;;;;;;AAGA;;;;;;AAMO,MAAM,eAAe,GAAG,CAC7B,MAAuB,EACvB,eAAgC;;EAGhC,IAAI,eAAe,KAAK,KAAK,EAAE;IAC7B,OAAO,MAAM,CAAC;GACf;;EAGD,IAAI,UAAe,CAAC;EACpB,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;EAErC,IAAI,eAAe,KAAK,MAAM,IAAI,eAAe,KAAK,OAAO,EAAE;;IAE7D,IAAI,oBAAoB,CAAC,MAAM,CAAC,EAAE;MAChC,OAAO,8BAA8B,CAAC,MAAM,CAAC,CAAC;KAC/C;IAED,UAAU,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;GAC5C;OAAM;IACL,IAAI;MACF,UAAU,GAAG,IAAI,GAAG,CAAC,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;KACjE;IAAC,OAAO,KAAK,EAAE;MACd,OAAO,CAAC,IAAI,CACV,iBAAiB,eAAe,iEAAiE,CAClG,CAAC;MACF,OAAO,MAAM,CAAC;KACf;GACF;EAED,MAAM,SAAS,GAAG,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;EAExE,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;;IAE1B,OAAO,MAAM,CAAC;GACf;EAED,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;EAChC,UAAU,CAAC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;EACxC,IAAI,UAAU,CAAC,GAAG;IAAE,UAAU,CAAC,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC;EAE3D,OAAO,MAA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CAAC,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EACrD,IAAI,EAAC,UAAU,GACO,CACrB,EACLA,kBAAM,IAAI,EAAC,MAAM,GAAQ,CACrB,CACF,CACC,CACJ,EACP;GACH;;;;;;;;;;;;;;;;;","names":["getUserLang","persistLanguageChoice","uniqueId","state","throttle","debounce","dispose","h","Host","SvgSprite","translate","If","SvgIcon"],"sources":["./src/services/route.service.ts","./src/services/config.service.ts","./src/components/post-internet-header/post-internet-header.scss?tag=swisspost-internet-header&encapsulation=shadow","./src/components/post-internet-header/post-internet-header.tsx"],"sourcesContent":["import { ActiveRouteProp } from '../models/general.model';\nimport { NavMainEntity, MainNavScoreList } from '../models/header.model';\n\n/**\n * Activate the current route based on the config and the match mode\n * @param config Main Navigation Config\n * @param activeRouteProp Match mode\n * @returns Modified Main Navigation Config\n */\nexport const markActiveRoute = (\n config: NavMainEntity[],\n activeRouteProp: ActiveRouteProp,\n): NavMainEntity[] => {\n // Don't highlight any route\n if (activeRouteProp === false) {\n return config;\n }\n\n // Set compare URL and check if activeRouteProp is valid\n let compareUrl: URL;\n config = resetOverrideConfig(config);\n\n if (activeRouteProp === 'auto' || activeRouteProp === 'exact') {\n // Check if an active route is already configured, set override to that and return\n if (hasActivePortalRoute(config)) {\n return resetActiveStateToPortalConfig(config);\n }\n\n compareUrl = new URL(window.location.href);\n } else {\n try {\n compareUrl = new URL(activeRouteProp, document.location.origin);\n } catch (error) {\n console.warn(\n `Active Route: ${activeRouteProp} is not a valid URL. Navigation highlighting has been disabled.`,\n );\n return config;\n }\n }\n\n const scoreList = compileScoreList(config, compareUrl, activeRouteProp);\n\n if (scoreList.length === 0) {\n // No match found or already active links defined\n return config;\n }\n\n const winnerPair = scoreList[0];\n winnerPair.main.isActiveOverride = true;\n if (winnerPair.sub) winnerPair.sub.isActiveOverride = true;\n\n return config;\n};\n\n/**\n * Check if the portal config set any active route\n * @param config Main navigation config\n * @returns True if portal set any route as active\n */\nexport const hasActivePortalRoute = (config: NavMainEntity[]): boolean => {\n return config.filter(nav => nav.isActive).length > 0;\n};\n\nexport const resetActiveStateToPortalConfig = (config: NavMainEntity[]): NavMainEntity[] => {\n return config.map(nav => ({\n ...nav,\n isActiveOverride: nav.isActive,\n flyout: nav.flyout.map(flyout => ({\n ...flyout,\n linkList: flyout.linkList.map(link => ({ ...link, isActiveOverride: link.isActive })),\n })),\n }));\n};\n\nconst resetOverrideConfig = (config: NavMainEntity[]): NavMainEntity[] => {\n return config.map(nav => ({\n ...nav,\n isActiveOverride: false,\n flyout: nav.flyout.map(flyout => ({\n ...flyout,\n linkList: flyout.linkList.map(link => ({ ...link, isActiveOverride: false })),\n })),\n }));\n};\n\n/**\n * Compile a list of scores based on the map mode, sorted in descending order\n * @param config Main Nav Config\n * @param compareUrl Current Browser URL or a custom URL\n * @param activeRouteProp Match mode\n * @returns A list of scored URLs if any matched\n */\nexport const compileScoreList = (\n config: NavMainEntity[],\n compareUrl: URL,\n activeRouteProp: ActiveRouteProp,\n): MainNavScoreList => {\n // Flag to check if the Portal set any active links or if there are any exact matches\n let hadAnyActiveLink = false;\n const scoreList: MainNavScoreList = [];\n\n config\n .filter(mainNav => !hadAnyActiveLink && mainNav)\n .forEach(mainNav => {\n try {\n const score = compareRoutes(\n compareUrl,\n new URL(mainNav.url),\n activeRouteProp as 'auto' | 'exact',\n );\n\n hadAnyActiveLink = updateScoreList(\n scoreList,\n score,\n { main: mainNav, score },\n hadAnyActiveLink,\n );\n } catch {\n // Not a valid url, continue\n }\n\n // Loop through flyout links 2nd level\n mainNav.flyout.forEach(flyout => {\n flyout.linkList?.forEach(linklist => {\n // Don't override if any link is already active\n if (linklist.isActive && (activeRouteProp === 'auto' || activeRouteProp === 'exact')) {\n hadAnyActiveLink = true;\n return;\n }\n\n try {\n const url = new URL(linklist.url);\n const score = compareRoutes(compareUrl, url, activeRouteProp as 'auto' | 'exact');\n\n hadAnyActiveLink = updateScoreList(\n scoreList,\n score,\n { main: mainNav, sub: linklist, score },\n hadAnyActiveLink,\n );\n } catch {\n // Not a valid URL, continue\n }\n });\n });\n });\n\n return scoreList.sort((a, b) => b.score - a.score);\n};\n\n/**\n * Update score list\n */\nfunction updateScoreList(\n scoreList: MainNavScoreList,\n score: number,\n scoreListItem: any,\n hadAnyActiveLink: boolean,\n) {\n let hadActiveLink = hadAnyActiveLink;\n\n if (score > 0) {\n if (score === Infinity) hadActiveLink = true;\n // Push score\n scoreList.push(scoreListItem);\n }\n\n return hadActiveLink;\n}\n\n/**\n * Compare two URLs for similarity based on a match mode\n * @param baseUrl Browser URL\n * @param compareUrl Navigatgion URL\n * @param matchMode exact or auto matching\n * @returns Score\n */\nexport const compareRoutes = (\n baseUrl: URL,\n compareUrl: URL,\n matchMode?: 'auto' | 'exact',\n): number => {\n // One url is not defined or they don't share the same orign\n if (!baseUrl || !compareUrl || baseUrl.origin !== compareUrl.origin) {\n return 0;\n }\n\n const baseUrlPath = baseUrl.pathname.toLocaleLowerCase();\n const compareUrlPath = compareUrl.pathname.toLocaleLowerCase();\n\n // Exact match, origin and pathname are the same\n if (baseUrlPath === compareUrlPath) {\n return Infinity;\n }\n\n // The basepath is longer than the comparison, a match is impossible\n if (baseUrl.pathname.length < compareUrl.pathname.length) {\n return 0;\n }\n\n if (matchMode === 'auto') {\n const baseSegments = [\n baseUrl.origin.toLocaleLowerCase(),\n ...baseUrlPath.split('/').filter(x => !!x),\n ];\n const compareSegments = [\n compareUrl.origin.toLocaleLowerCase(),\n ...compareUrlPath.split('/').filter(x => !!x),\n ];\n\n const score = getSimilarityScore(baseSegments, compareSegments);\n\n // If only some segments match, but not the whole smaller array, it's not a match\n return Math.min(baseSegments.length, compareSegments.length) === score ? score : 0;\n }\n\n return 0;\n};\n\n/**\n * Check how many items in an array match\n * @param a Base array\n * @param b Compare array\n * @returns Score\n */\nexport const getSimilarityScore = (a: string[], b: string[]): number => {\n if (!a?.length || !b?.length) {\n return 0;\n }\n\n let i = 0;\n for (; i < Math.min(a.length, b.length); i++) {\n if (a[i] !== b[i]) {\n return 0;\n }\n }\n\n return i;\n};\n","import {\n Environment,\n IPortalConfig,\n ILocalizedConfig,\n ICustomConfig,\n ILocalizedCustomConfig,\n LocalizedConfigParameters,\n} from '../models/general.model';\nimport { NavMainEntity } from '../models/header.model';\nimport { getUserLang, persistLanguageChoice } from './language.service';\nimport { uniqueId } from '../utils/utils';\nimport { markActiveRoute } from './route.service';\n\n// Prevent double requests\nlet request: Promise<IPortalConfig> | null = null;\n\n// Cache the original os flyout to use it for updates\nlet osFlyoutCache: NavMainEntity | null = null;\n\nconst getPPMConfig = (): ILocalizedConfig | null => {\n const ppmConfigScript = document.querySelector('#PPM_HEADER_DATA');\n\n if (ppmConfigScript?.textContent) {\n return JSON.parse(ppmConfigScript.textContent);\n }\n\n return null;\n};\n\n/**\n * Get a localized config object\n *\n * @param projectId String identifying the project\n * @param language [optional] Preferred language\n * @returns Localized config object\n */\nexport const getLocalizedConfig = async ({\n projectId,\n environment,\n language,\n cookieKey,\n localStorageKey,\n activeRouteProp,\n localizedCustomConfig,\n osFlyoutOverrides,\n}: LocalizedConfigParameters): Promise<ILocalizedConfig> => {\n const ppmConfig = getPPMConfig();\n let localizedConfig: ILocalizedConfig;\n let config: IPortalConfig | null = null;\n let lang: string | undefined;\n\n if (ppmConfig) {\n localizedConfig = ppmConfig;\n lang = document.documentElement.lang;\n } else {\n if (!request) {\n request = fetchConfig(projectId, environment);\n }\n\n config = await request;\n lang = getUserLang(Object.keys(config), language, localStorageKey, cookieKey);\n\n if (lang === undefined) {\n throw new Error('Internet Header: unable to determine current language');\n }\n\n // Clone config for more predictable state updates\n localizedConfig = { ...config[lang] };\n }\n\n // Merge custom config with portal config\n if (localizedCustomConfig) {\n const header = localizedCustomConfig?.header?.navMain\n ? {\n ...localizedConfig.header,\n navMain: [...localizedConfig.header.navMain, ...localizedCustomConfig.header.navMain],\n }\n : localizedConfig.header;\n localizedConfig = {\n ...localizedConfig,\n header,\n };\n }\n\n // Add entries to flyout_os\n if (osFlyoutOverrides)\n localizedConfig.header.navMain = mergeOsFlyoutOverrides(localizedConfig, osFlyoutOverrides);\n\n // Mark active route\n if (activeRouteProp)\n localizedConfig.header.navMain = markActiveRoute(\n localizedConfig.header.navMain,\n activeRouteProp,\n );\n\n setMainNavigationIds(localizedConfig?.header?.navMain);\n\n // Set the new language choice\n persistLanguageChoice(lang, cookieKey, localStorageKey);\n\n return localizedConfig;\n};\n\n/**\n * Merge portal config with custom os flyout overrides\n * @param config Localized config\n * @param osFlyoutOverrides Overrides for the flyout\n * @returns Merged localized config\n */\nexport const mergeOsFlyoutOverrides = (\n config: ILocalizedConfig,\n osFlyoutOverrides: NavMainEntity,\n): NavMainEntity[] => {\n if (!osFlyoutOverrides) return config.header.navMain;\n\n return config.header.navMain.map(mainNav => {\n if (mainNav.id !== 'flyout_os') return mainNav;\n\n if (osFlyoutCache === null) {\n osFlyoutCache = JSON.parse(JSON.stringify(mainNav)) as NavMainEntity;\n }\n\n const mainNavText = osFlyoutOverrides.text ?? osFlyoutCache.text;\n const mainNavTitle = osFlyoutOverrides.title ?? osFlyoutCache.title;\n\n if (\n !osFlyoutCache.flyout ||\n osFlyoutCache.flyout.length === 0 ||\n !osFlyoutOverrides.flyout ||\n osFlyoutOverrides.flyout.length === 0\n )\n return {\n ...mainNav,\n title: mainNavTitle,\n text: mainNavText,\n };\n\n // Add entries for os flyout columns without overriding existing config\n const mainNavFlyout = [\n ...osFlyoutCache.flyout.map((col, index) => {\n const overrides = osFlyoutOverrides.flyout[index];\n const title = overrides.title ?? col.title;\n\n const linkList = overrides.linkList ? osFlyoutOverrides.flyout[index].linkList : [];\n\n return {\n title,\n linkList: [...col.linkList, ...linkList],\n };\n }),\n ...osFlyoutOverrides.flyout.slice(osFlyoutCache.flyout.length),\n ];\n\n return {\n ...mainNav,\n text: mainNavText,\n title: mainNavTitle,\n flyout: mainNavFlyout,\n } as NavMainEntity;\n });\n};\n\n/**\n * Fetch the general config based on project id\n *\n * @returns Promise for Post Portal general config\n */\nexport const fetchConfig = async (\n projectId: string,\n environment: Environment,\n): Promise<IPortalConfig> => {\n // Check if project id is sanitized\n if (!isValidProjectId(projectId)) {\n throw new Error(`Internet Header: invalid project id \"${projectId}\"`);\n }\n\n if (projectId === 'test') {\n environment = 'int01';\n }\n\n let url = generateConfigUrl(projectId, environment);\n\n // Get the config if cache is invalid\n try {\n const res = await fetch(url);\n return (await res.json()) as IPortalConfig;\n } catch (error) {\n throw new Error(`Internet Header: fetching config failed. ${error.message}`);\n }\n};\n\n/**\n * Generate an URL with all necessary query params to get the configuration.\n * Project id \"test\" will return a test configuration\n * @param projectId string\n * @param environment int01, int02 or prod\n * @returns URL pointing to the project config\n */\nexport const generateConfigUrl = (projectId: string, environment: Environment): string => {\n if (projectId === 'test') return 'assets/config/test-configuration.json';\n\n const parsedEnvironment = environment.toLowerCase();\n const isProd = parsedEnvironment === 'prod';\n const host = `https://${isProd ? 'www' : 'int'}.post.ch`;\n try {\n // Use URL to validate the generated URL\n return new URL(\n `${host}/api/headerjs/Json?serviceid=${encodeURIComponent(projectId)}${\n !isProd ? '&environment=' + parsedEnvironment : ''\n }`,\n ).toString();\n } catch (error) {\n throw new Error(`Internet Header: Config URL is invalid.`);\n }\n};\n\n/**\n * Check if project id contains only URL safe characters\n *\n * @param projectId Project Id string\n * @returns The valid project id\n */\nexport const isValidProjectId = (projectId: string): boolean => {\n return projectId !== '' && projectId.length > 0 && /^[a-zA-Z][\\w-]*[a-zA-Z0-9]$/.test(projectId);\n};\n\n/**\n * Get the localized config object from a custom config\n *\n * @param config String or json object of the custom config\n * @param language Specific language\n * @returns Localized custom config object\n */\nexport const getLocalizedCustomConfig = (\n config: string | ICustomConfig,\n language: string,\n): ILocalizedCustomConfig | undefined => {\n let customConfig: ICustomConfig;\n try {\n customConfig = typeof config === 'string' ? JSON.parse(config) : config;\n } catch (error) {\n throw new Error(\n `Internet Header: Custom config is invalid. Make sure your custom config contains valid JSON syntax and matches the definition. `,\n );\n }\n let localizedCustomConfig: ILocalizedCustomConfig | undefined = customConfig[language];\n if (localizedCustomConfig?.header?.navMain)\n setMainNavigationIds(localizedCustomConfig.header.navMain);\n return localizedCustomConfig;\n};\n\n/**\n * Check if mobile header styles are applied or not\n * @returns True if browser is smaller than 1024px\n */\nexport const isMobile = () => window.innerWidth < 1024;\n\n/**\n * Set unique ID's on main navigation entities but conserve flyout_os to be able to\n * identify the online-service flyout, which can be configured by osFlyoutOverrides\n */\nexport const setMainNavigationIds = (navMainEntities: NavMainEntity[]): void => {\n navMainEntities.forEach(navMainEntity => {\n navMainEntity.id = navMainEntity.id === 'flyout_os' ? navMainEntity.id : uniqueId('main-nav-');\n });\n};\n","@use '@swisspost/design-system-styles/variables/color';\n@use '../../utils/utils.scss';\n@use '../../utils/mixins.scss';\n\n:host {\n display: block;\n position: relative;\n font-size: 1rem;\n font-weight: 300;\n z-index: var(--header-z-index, 10);\n\n --header-height: 3.5rem; // 56px\n --meta-header-height: 0px; // Not visible on mobile\n --language-dropdown-margin-top: 0px;\n\n @include mixins.min(lg) {\n --meta-header-height: 3rem; // 48px\n --header-height: 4rem; // 64px\n }\n\n @include mixins.min(xl) {\n --header-height: 4.5rem; // 72px\n }\n}\n\n// Set height to 0 if meta is never visible\n:host([meta='false']) {\n --meta-header-height: 0px;\n // Compensation for header border-bottom, when language dropdown is displayed within main navigation controls\n --language-dropdown-margin-top: 1px;\n}\n\n// Support different kinds of stickyness modes\n// Works only in combination with setting header heights dynamically\n@supports (position: sticky) {\n // If stickyness is none, simply apply no styles, all others are sticky\n :host(:not(.stickyness-none)) {\n position: sticky;\n }\n\n // Everything is always sticky\n :host(.stickyness-full) {\n top: 0;\n }\n\n // Only main nav is sticky\n :host(.stickyness-main) {\n top: calc(var(--meta-header-height, 0px) * -1);\n }\n\n // Hide everything\n :host(.stickyness-minimal) {\n top: calc((var(--header-height, 0px) + var(--meta-header-height, 0px) + 1px) * -1);\n transition: top 200ms ease-in;\n }\n\n // Show main when scrolling up or any of the menus are open\n :host(.stickyness-minimal.scrolling-up),\n :host(.stickyness-minimal.dropdown-open) {\n top: calc(var(--meta-header-height, 0px) * -1);\n transition: top 200ms ease-out;\n }\n}\n\n.post-internet-header {\n border-bottom: 1px solid color.$gray-10;\n background-color: white;\n}\n\n.main-navigation-container {\n display: flex;\n\n & > .main-navigation-controls {\n flex: 0 0 auto;\n }\n}\n\n.main-navigation {\n display: flex;\n}\n\n.sub-navigation-container {\n position: absolute;\n top: 100%;\n left: 0;\n width: 100%;\n display: flex;\n background: white;\n visibility: hidden;\n}\n\n.main-navigation-item:hover .sub-navigation-container {\n visibility: visible;\n}\n\n.main-navigation-controls {\n display: flex;\n margin-left: auto;\n\n @include mixins.max(lg) {\n font-weight: 400;\n }\n\n @include mixins.min(lg) {\n font-size: 1.0625rem;\n }\n\n & > * {\n border-left: 1px solid color.$gray-10;\n }\n}\n\n.menu-button {\n display: flex;\n align-items: center;\n padding: 0 calc(1rem - 1px);\n font-weight: 300;\n cursor: pointer;\n border-left: 1px solid color.$gray-10;\n order: 1; /* Display on the far right because of tab order */\n\n @include mixins.min(lg) {\n display: none;\n }\n\n .visually-hidden {\n @include mixins.between(rg, lg) {\n @include mixins.reset-visually-hidden();\n\n margin-right: 0.5rem;\n }\n }\n\n svg {\n width: 1.5rem;\n height: 1.5rem;\n }\n}\n\n.full-width {\n .wide-container {\n max-width: none;\n }\n}\n","import {\n Component,\n Host,\n Element,\n h,\n State,\n Prop,\n Watch,\n Listen,\n EventEmitter,\n Event,\n Method,\n} from '@stencil/core';\nimport { debounce, throttle } from 'throttle-debounce';\nimport {\n getLocalizedConfig,\n getLocalizedCustomConfig,\n isValidProjectId,\n} from '../../services/config.service';\nimport { state, dispose } from '../../data/store';\nimport { DropdownElement, DropdownEvent, NavMainEntity } from '../../models/header.model';\nimport { SvgSprite } from '../../utils/svg-sprite.component';\nimport { SvgIcon } from '../../utils/svg-icon.component';\nimport { StickynessOptions } from '../../models/implementor.model';\nimport { ActiveRouteProp, Environment, ICustomConfig } from '../../models/general.model';\nimport { IAvailableLanguage } from '../../models/language.model';\nimport { translate } from '../../services/language.service';\nimport { If } from '../../utils/if.component';\nimport packageJson from '../../../package.json';\n\n@Component({\n tag: 'swisspost-internet-header',\n styleUrl: 'post-internet-header.scss',\n shadow: true,\n})\nexport class PostInternetHeader {\n /**\n * Your project id, previously passed as query string parameter serviceId.\n */\n @Prop() project: string;\n\n /**\n * Sticky behaviour of the header.\n */\n @Prop() stickyness: StickynessOptions = 'minimal';\n\n /**\n * Initial language to be used. Overrides automatic language detection.\n */\n @Prop() language?: string;\n\n /**\n * Toggle the meta navigation.\n */\n @Prop() meta: boolean = true;\n\n /**\n * Toggle the login link (when logged out) or the user widget (when logged in).\n */\n @Prop() login: boolean = true;\n\n /**\n * Toggle the search button.\n */\n @Prop() search: boolean = true;\n\n /**\n * Toggle skiplinks. They help keyboard users to quickly jump to important sections of the page.\n */\n @Prop() skiplinks: boolean = true;\n\n /**\n * DEPRECATED!: Define a proxy URL for the config fetch request. Will be removed in the next major version\n */\n @Prop() configProxy?: string;\n\n /**\n * Target environment. Choose 'int01' for local testing.\n */\n @Prop() environment: Environment = 'prod';\n\n /**\n * Override the language switch links with custom URLs. Helpful when your application contains sub-pages and you\n * would like to stay on subpages when the user changes language.\n */\n @Prop() languageSwitchOverrides?: string | IAvailableLanguage[];\n\n /**\n * Customize the header config loaded from the post portal.\n */\n @Prop() customConfig?: string | ICustomConfig;\n\n /**\n * The header uses this cookie to set the language. Disables automatic language detection.\n */\n @Prop() languageCookieKey?: string;\n\n /**\n * The header uses this local storage key to set the language. Disables automatic language selection.\n */\n @Prop() languageLocalStorageKey?: string = 'swisspost-internet-header-language';\n\n /**\n * Set the currently activated route. If there is a link matching this URL in the header, it will be highlighted.\n * Will also highlight partly matching URLs. When set to auto, will use current location.href for comparison.\n */\n @Prop() activeRoute?: 'auto' | false | string = 'auto';\n\n /**\n * Online Services only: Add custom links to the special online service navigation entry\n */\n @Prop() osFlyoutOverrides?: string | NavMainEntity;\n\n /**\n * Displays the header at full width for full-screen applications\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * Fires when the header has been rendered to the page.\n */\n @Event() headerLoaded: EventEmitter<void>;\n\n @State() activeFlyout: string | null = null;\n @State() activeDropdownElement: DropdownElement | null = null;\n @Element() host: HTMLElement;\n\n /**\n * Get the currently set language as a two letter string (\"de\", \"fr\" \"it\" or \"en\")\n * @returns string\n */\n @Method()\n async getCurrentLanguage(): Promise<'de' | 'fr' | 'it' | 'en' | string> {\n return state.currentLanguage ?? 'de';\n }\n\n private mainNav?: HTMLPostMainNavigationElement;\n private lastScrollTop = window.scrollY || document.documentElement.scrollTop;\n private throttledScroll: throttle<() => void>;\n private debouncedResize: debounce<() => void>;\n private lastWindowWidth: number = window.innerWidth;\n\n constructor() {\n if (this.project === undefined || this.project === '' || !isValidProjectId(this.project)) {\n throw new Error(\n `Internet Header project key is \"${this.project}\". Please provide a valid project key.`,\n );\n }\n }\n\n connectedCallback() {\n this.throttledScroll = throttle(300, () => this.handleScrollEvent());\n this.debouncedResize = debounce(200, () => this.handleResize());\n window.addEventListener('scroll', this.throttledScroll, { passive: true });\n window.addEventListener('resize', this.debouncedResize, { passive: true });\n }\n\n disconnectedCallback() {\n window.removeEventListener('scroll', this.throttledScroll);\n window.removeEventListener('resize', this.debouncedResize);\n\n // Reset the store to its original state\n dispose();\n }\n\n async componentWillLoad() {\n // Wait for the config to arrive, then render the header\n try {\n state.projectId = this.project;\n state.environment = this.environment;\n if (this.language !== undefined) state.currentLanguage = this.language;\n state.languageSwitchOverrides =\n typeof this.languageSwitchOverrides === 'string'\n ? JSON.parse(this.languageSwitchOverrides)\n : this.languageSwitchOverrides;\n state.osFlyoutOverrides =\n typeof this.osFlyoutOverrides === 'string'\n ? JSON.parse(this.osFlyoutOverrides)\n : this.osFlyoutOverrides;\n\n if (this.customConfig !== undefined && state.currentLanguage !== null) {\n state.localizedCustomConfig = getLocalizedCustomConfig(\n this.customConfig,\n state.currentLanguage,\n );\n }\n\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n } catch (error) {\n console.error(error);\n }\n }\n\n componentDidLoad() {\n window.requestAnimationFrame(() => {\n this.handleResize();\n this.headerLoaded.emit();\n this.host.classList.add('header-loaded');\n });\n\n if (this.stickyness === 'full')\n console.warn('Internet Header: The stickyness=\"full\" option is deprecated.');\n }\n\n @Watch('language')\n async handleLanguageChange(newValue: string) {\n state.currentLanguage = newValue;\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: newValue,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n if (this.customConfig)\n state.localizedCustomConfig = getLocalizedCustomConfig(this.customConfig, newValue);\n }\n\n @Watch('languageSwitchOverrides')\n handleAvailableLanguagesChage(newValue: string | IAvailableLanguage[]) {\n state.languageSwitchOverrides = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;\n }\n\n @Watch('osFlyoutOverrides')\n async handleOsFlyoutOverrides(newValue: string | NavMainEntity) {\n state.osFlyoutOverrides = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n }\n\n @Watch('activeRoute')\n async handleActiveRouteChange(newValue: string | ActiveRouteProp) {\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: newValue,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n }\n\n @Watch('customConfig')\n async handleCustomConfigChange(newValue: string | ICustomConfig) {\n if (this.language === undefined) return;\n const localizedCustomConfig = getLocalizedCustomConfig(newValue, this.language);\n state.localizedCustomConfig = localizedCustomConfig;\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n }\n\n @Watch('search')\n handleSearchChange(newValue: boolean) {\n state.search = newValue;\n }\n\n @Watch('login')\n handleLoginChange(newValue: boolean) {\n state.login = newValue;\n }\n\n @Watch('meta')\n handleMetaChange(newValue: boolean) {\n state.meta = newValue;\n }\n\n @Listen('languageChanged')\n handleLanguageChangeEvent(event: CustomEvent<string>) {\n this.handleLanguageChange(event.detail);\n }\n\n private handleClickOutsideBound = this.handleClickOutside.bind(this);\n\n private handleClickOutside(event: Event) {\n // Close active dropdown element on click outside of it\n if (this.activeDropdownElement && !event.composedPath().includes(this.activeDropdownElement)) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n }\n\n private handleKeyUp(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n if (this.activeDropdownElement) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n if (this.activeFlyout !== null && this.mainNav) {\n this.mainNav.toggleDropdown(false);\n }\n }\n }\n\n private handleScrollEvent() {\n // Credits: \"https://github.com/qeremy/so/blob/master/so.dom.js#L426\"\n const st = window.scrollY || document.documentElement.scrollTop;\n\n // Toggle class without re-rendering the component if stickyness is minimal\n // the other stickyness modes do not need the class\n if (this.stickyness === 'minimal') {\n this.host.classList.toggle('scrolling-up', st <= this.lastScrollTop);\n }\n\n // For Mobile or negative scrolling\n this.lastScrollTop = st <= 0 ? 0 : st;\n }\n\n private handleResize() {\n // Close main navigation dropdown if size changed to bigger than 1024px (search dropdown will be kept open)\n if (this.isMainNavOpen() && this.lastWindowWidth < 1024 && window.innerWidth >= 1024) {\n this.activeDropdownElement?.toggleDropdown(false);\n }\n\n this.lastWindowWidth = window.innerWidth;\n }\n\n /**\n * Close open dropdown menus if another is being opened\n *\n * @param event Dropdown toggled event\n * @returns void\n */\n private handleDropdownToggled(event: CustomEvent<DropdownEvent>) {\n if (!event.detail.open && this.activeDropdownElement !== event.detail.element) {\n // Some dropdown got closed programmatically (possibly by this function). To prevent\n // a circle or an outdated state, we'll not handle this event\n return;\n }\n\n if (event.detail.open === true) {\n if (this.activeDropdownElement) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n\n this.activeDropdownElement = event.detail.element;\n\n if (window.innerWidth >= 1024) {\n // Add event listener to close active dropdown element on click outsite of it\n // Also adds 10ms delay in case of an external interaction:\n // Some button on the page calls toggleDropdown() -> dropdown opens\n // Click event bubbles to the window, this.handleClickOutsideBound closes dropdown again\n window.setTimeout(() => {\n window.addEventListener('click', this.handleClickOutsideBound);\n }, 10);\n }\n\n if (this.activeFlyout !== null && this.mainNav) {\n this.mainNav.setActiveFlyout(null);\n }\n } else {\n this.activeDropdownElement = null;\n\n // Remove event listener as it is not needed if no dropdown element is active\n window.removeEventListener('click', this.handleClickOutsideBound);\n }\n }\n\n /**\n * Close open dropdowns if the flyout is being opened\n * @param event Flyout toggle event\n */\n private handleFlyoutToggled(event: CustomEvent<string | null>) {\n this.activeFlyout = event.detail;\n\n if (this.activeDropdownElement && event.detail && !this.isMainNavOpen()) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n }\n\n private toggleMobileDropdown() {\n this.mainNav?.toggleDropdown();\n }\n\n private isMainNavOpen() {\n return (\n this.activeDropdownElement && this.activeDropdownElement.tagName === 'POST-MAIN-NAVIGATION'\n );\n }\n\n render() {\n if (!state.localizedConfig?.header) {\n console.error(new Error('Internet Header: Config cannot be loaded'));\n return;\n }\n\n const config = state.localizedConfig;\n const renderMetaNavigation =\n this.meta &&\n config.header.navMeta !== undefined &&\n config.header.navMeta?.filter(meta => !meta.isHomeLink).length > 0;\n const renderLogin =\n (this.login ?? !config.header.isLoginWidgetHidden) && config.header.loginWidgetOptions;\n const renderLanguageSwitch = config.header.navLang.length > 1;\n\n return (\n <Host\n class={`stickyness-${this.stickyness} ${\n this.activeDropdownElement || this.activeFlyout ? 'dropdown-open' : ''\n }`}\n data-version={packageJson.version}\n onKeyup={(e: KeyboardEvent) => this.handleKeyUp(e)}\n >\n <header class={`post-internet-header${this.fullWidth ? ' full-width' : ''}`}>\n <SvgSprite />\n <h1 class=\"visually-hidden\">{translate('Navigate on post.ch')}</h1>\n <If condition={this.skiplinks === true}>\n <post-skiplinks></post-skiplinks>\n </If>\n <If condition={renderMetaNavigation === true}>\n <post-meta-navigation\n orientation=\"horizontal\"\n class=\"hidden-lg\"\n full-width={this.fullWidth}\n >\n <If condition={renderLanguageSwitch === true}>\n <post-language-switch\n id=\"post-language-switch-desktop\"\n mode=\"dropdown\"\n onDropdownToggled={e => this.handleDropdownToggled(e)}\n ></post-language-switch>\n </If>\n </post-meta-navigation>\n </If>\n <div class=\"main-navigation-container wide-container\">\n <post-logo></post-logo>\n <button\n class=\"menu-button nav-link\"\n onClick={() => this.toggleMobileDropdown()}\n aria-haspopup=\"menu\"\n aria-controls=\"post-internet-header-main-navigation\"\n aria-expanded={this.activeDropdownElement ? 'true' : 'false'}\n >\n <span class=\"menu-button-text visually-hidden\">{config.header.mobileMenu.text}</span>\n <SvgIcon name={this.isMainNavOpen() ? 'pi-close' : 'pi-menu'}></SvgIcon>\n </button>\n <post-main-navigation\n onDropdownToggled={e => this.handleDropdownToggled(e)}\n onFlyoutToggled={e => this.handleFlyoutToggled(e)}\n ref={el => (this.mainNav = el)}\n >\n <If condition={renderMetaNavigation === true}>\n <post-meta-navigation orientation=\"vertical\">\n <If condition={renderLanguageSwitch === true}>\n <post-language-switch\n id=\"post-language-switch-mobile\"\n mode=\"list\"\n ></post-language-switch>\n </If>\n </post-meta-navigation>\n </If>\n </post-main-navigation>\n <div class=\"main-navigation-controls\">\n <If condition={this.search !== false}>\n <post-search onDropdownToggled={e => this.handleDropdownToggled(e)}></post-search>\n </If>\n <If condition={!!renderLogin}>\n <post-klp-login-widget>\n <slot name=\"login-widget\"></slot>\n </post-klp-login-widget>\n </If>\n <If condition={renderMetaNavigation === false && renderLanguageSwitch === true}>\n <post-language-switch\n id=\"post-language-switch-no-meta\"\n onDropdownToggled={e => this.handleDropdownToggled(e)}\n mode=\"dropdown\"\n ></post-language-switch>\n </If>\n <slot name=\"main\"></slot>\n </div>\n </div>\n </header>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0f01e1a4.js');
5
+ const index = require('./index-1dad2dbc.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Browser v3.3.1 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v3.4.0 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchBrowser = () => {
11
11
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('swisspost-internet-header.cjs.js', document.baseURI).href));
@@ -1 +1 @@
1
- {"file":"swisspost-internet-header.cjs.js","mappings":";;;;;;AAAA;AACA;AACA;AAiBA,MAAM,YAAY,GAAG,MAAM;AAkC3B,IAAI,MAAM,UAAU,GAAG,2NAAe,CAAC;AACvC,IAAI,MAAM,IAAI,GAAiE,EAAE,CAAC;AAgBlF;AACA,IAAI,IAAuB,UAAU,KAAK,EAAE,EAAE;AAC9C,QAAQ,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AAC1D;AACA;AACA,KAaK;AACL,IAAI,OAAOA,oBAAc,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;;ACtFD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI;AAE/B,EAAE,OAAOC,mBAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC;;;;","names":["promiseResolve","bootstrapLazy"],"sources":["../../node_modules/.pnpm/@stencil+core@3.3.1/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.3.1 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"version":3}
1
+ {"file":"swisspost-internet-header.cjs.js","mappings":";;;;;;AAAA;AACA;AACA;AAiBA,MAAM,YAAY,GAAG,MAAM;AAkC3B,IAAI,MAAM,UAAU,GAAG,2NAAe,CAAC;AACvC,IAAI,MAAM,IAAI,GAAiE,EAAE,CAAC;AAgBlF;AACA,IAAI,IAAuB,UAAU,KAAK,EAAE,EAAE;AAC9C,QAAQ,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AAC1D;AACA;AACA,KAaK;AACL,IAAI,OAAOA,oBAAc,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;;ACtFD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI;AAE/B,EAAE,OAAOC,mBAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC;;;;","names":["promiseResolve","bootstrapLazy"],"sources":["../../node_modules/.pnpm/@stencil+core@3.4.0/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.4.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"version":3}
@@ -4,7 +4,7 @@
4
4
  "asWebComponent": true,
5
5
  "isHeaderResponsive": true,
6
6
  "isLoginWidgetHidden": true,
7
- "showJobsLoginWidget": false,
7
+ "showJobsLoginWidget": true,
8
8
  "icons": {
9
9
  "backArrowIcon": {
10
10
  "name": "3024_arrow-left",
@@ -59,7 +59,7 @@
59
59
  "autoLoginURL": "https://post.ch/idp/?app=loginwidget"
60
60
  }
61
61
  },
62
- "loginWidgetId": "test",
62
+ "loginWidgetId": "jobsLoginWidget",
63
63
  "logo": {
64
64
  "logoLink": "https://post.ch/de/",
65
65
  "logoLinkTitle": "Die Post - zur Startseite",
@@ -1014,9 +1014,7 @@ const vertx = window.vertx || {};
1014
1014
  .find('#' + id)
1015
1015
  .html(
1016
1016
  '<div class="klp-widget-anonymous"><div class="klp-widget-anonymous__wrapper">' +
1017
- '<a tabindex="' +
1018
- tabIndex('sign-in') +
1019
- '" ' +
1017
+ '<a ' +
1020
1018
  accessKey('sign-in') +
1021
1019
  ' title="' +
1022
1020
  text('sign-in') +
@@ -1243,7 +1241,7 @@ const vertx = window.vertx || {};
1243
1241
  '</li>';
1244
1242
  }
1245
1243
  return (
1246
- '<div class="klp-widget-authenticated-menu" id="authenticated-menu" data-dropdown-toggler="klp-widget__user">' +
1244
+ '<div class="klp-widget-authenticated-menu" id="authenticated-menu" data-dropdown-toggler="klp-widget__user" style="display: none">' +
1247
1245
  '<ul>' +
1248
1246
  menuList +
1249
1247
  changeCompanyEntry +
@@ -1510,7 +1508,6 @@ const vertx = window.vertx || {};
1510
1508
  }
1511
1509
  document.dispatchEvent(new CustomEvent('wepploginwidget_widget_ready'));
1512
1510
  measureWidgetShowsUp();
1513
- selectFromShadowDom().find('.klp-widget-authenticated-session-link').click();
1514
1511
  }
1515
1512
 
1516
1513
  function init() {
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "compiler": {
15
15
  "name": "@stencil/core",
16
- "version": "3.3.1",
16
+ "version": "3.4.0",
17
17
  "typescriptVersion": "5.0.4"
18
18
  },
19
19
  "collections": [],
@@ -2099,18 +2099,39 @@
2099
2099
  font-weight: 700;
2100
2100
  src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Bold.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Bold.woff") format("woff");
2101
2101
  }
2102
+ @font-face {
2103
+ font-display: swap;
2104
+ font-family: "Frutiger Neue For Post";
2105
+ font-weight: 700;
2106
+ font-style: italic;
2107
+ src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-BdIt.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-BdIt.woff") format("woff");
2108
+ }
2102
2109
  @font-face {
2103
2110
  font-display: swap;
2104
2111
  font-family: "Frutiger Neue For Post";
2105
2112
  font-weight: 400;
2106
2113
  src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Rg.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Rg.woff") format("woff");
2107
2114
  }
2115
+ @font-face {
2116
+ font-display: swap;
2117
+ font-family: "Frutiger Neue For Post";
2118
+ font-weight: 400;
2119
+ font-style: italic;
2120
+ src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-It.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-It.woff") format("woff");
2121
+ }
2108
2122
  @font-face {
2109
2123
  font-display: swap;
2110
2124
  font-family: "Frutiger Neue For Post";
2111
2125
  font-weight: 300;
2112
2126
  src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Lt.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Lt.woff") format("woff");
2113
2127
  }
2128
+ @font-face {
2129
+ font-display: swap;
2130
+ font-family: "Frutiger Neue For Post";
2131
+ font-weight: 300;
2132
+ font-style: italic;
2133
+ src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-LtIt.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-LtIt.woff") format("woff");
2134
+ }
2114
2135
  .visually-hidden {
2115
2136
  position: absolute;
2116
2137
  width: 1px;
@@ -2197,8 +2218,6 @@ a:is(:focus-visible, :focus-within, .pretend-focus),
2197
2218
  button:is(:focus-visible, :focus-within, .pretend-focus) {
2198
2219
  outline: 2px solid var(--post-contrast-color);
2199
2220
  border-radius: 3px;
2200
- position: relative;
2201
- z-index: 1;
2202
2221
  }
2203
2222
 
2204
2223
  img,
@@ -1908,18 +1908,39 @@
1908
1908
  font-weight: 700;
1909
1909
  src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Bold.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Bold.woff") format("woff");
1910
1910
  }
1911
+ @font-face {
1912
+ font-display: swap;
1913
+ font-family: "Frutiger Neue For Post";
1914
+ font-weight: 700;
1915
+ font-style: italic;
1916
+ src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-BdIt.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-BdIt.woff") format("woff");
1917
+ }
1911
1918
  @font-face {
1912
1919
  font-display: swap;
1913
1920
  font-family: "Frutiger Neue For Post";
1914
1921
  font-weight: 400;
1915
1922
  src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Rg.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Rg.woff") format("woff");
1916
1923
  }
1924
+ @font-face {
1925
+ font-display: swap;
1926
+ font-family: "Frutiger Neue For Post";
1927
+ font-weight: 400;
1928
+ font-style: italic;
1929
+ src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-It.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-It.woff") format("woff");
1930
+ }
1917
1931
  @font-face {
1918
1932
  font-display: swap;
1919
1933
  font-family: "Frutiger Neue For Post";
1920
1934
  font-weight: 300;
1921
1935
  src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Lt.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Lt.woff") format("woff");
1922
1936
  }
1937
+ @font-face {
1938
+ font-display: swap;
1939
+ font-family: "Frutiger Neue For Post";
1940
+ font-weight: 300;
1941
+ font-style: italic;
1942
+ src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-LtIt.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-LtIt.woff") format("woff");
1943
+ }
1923
1944
  .visually-hidden {
1924
1945
  position: absolute;
1925
1946
  width: 1px;
@@ -2006,8 +2027,6 @@ a:is(:focus-visible, :focus-within, .pretend-focus),
2006
2027
  button:is(:focus-visible, :focus-within, .pretend-focus) {
2007
2028
  outline: 2px solid var(--post-contrast-color);
2008
2029
  border-radius: 3px;
2009
- position: relative;
2010
- z-index: 1;
2011
2030
  }
2012
2031
 
2013
2032
  img,
@@ -11,18 +11,39 @@
11
11
  font-weight: 700;
12
12
  src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Bold.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Bold.woff") format("woff");
13
13
  }
14
+ @font-face {
15
+ font-display: swap;
16
+ font-family: "Frutiger Neue For Post";
17
+ font-weight: 700;
18
+ font-style: italic;
19
+ src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-BdIt.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-BdIt.woff") format("woff");
20
+ }
14
21
  @font-face {
15
22
  font-display: swap;
16
23
  font-family: "Frutiger Neue For Post";
17
24
  font-weight: 400;
18
25
  src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Rg.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Rg.woff") format("woff");
19
26
  }
27
+ @font-face {
28
+ font-display: swap;
29
+ font-family: "Frutiger Neue For Post";
30
+ font-weight: 400;
31
+ font-style: italic;
32
+ src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-It.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-It.woff") format("woff");
33
+ }
20
34
  @font-face {
21
35
  font-display: swap;
22
36
  font-family: "Frutiger Neue For Post";
23
37
  font-weight: 300;
24
38
  src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Lt.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Lt.woff") format("woff");
25
39
  }
40
+ @font-face {
41
+ font-display: swap;
42
+ font-family: "Frutiger Neue For Post";
43
+ font-weight: 300;
44
+ font-style: italic;
45
+ src: url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-LtIt.woff2") format("woff2"), url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-LtIt.woff") format("woff");
46
+ }
26
47
  .visually-hidden {
27
48
  position: absolute;
28
49
  width: 1px;
@@ -109,8 +130,6 @@ a:is(:focus-visible, :focus-within, .pretend-focus),
109
130
  button:is(:focus-visible, :focus-within, .pretend-focus) {
110
131
  outline: 2px solid var(--post-contrast-color);
111
132
  border-radius: 3px;
112
- position: relative;
113
- z-index: 1;
114
133
  }
115
134
 
116
135
  img,
@@ -266,7 +285,7 @@ svg {
266
285
  top: calc(var(--meta-header-height, 0px) * -1);
267
286
  }
268
287
  :host(.stickyness-minimal) {
269
- top: calc((var(--header-height, 0px) + var(--meta-header-height, 0px)) * -1);
288
+ top: calc((var(--header-height, 0px) + var(--meta-header-height, 0px) + 1px) * -1);
270
289
  transition: top 200ms ease-in;
271
290
  }
272
291
  :host(.stickyness-minimal.scrolling-up),
@@ -93,6 +93,8 @@ export class PostInternetHeader {
93
93
  this.headerLoaded.emit();
94
94
  this.host.classList.add('header-loaded');
95
95
  });
96
+ if (this.stickyness === 'full')
97
+ console.warn('Internet Header: The stickyness="full" option is deprecated.');
96
98
  }
97
99
  async handleLanguageChange(newValue) {
98
100
  state.currentLanguage = newValue;