@swisspost/internet-header 1.14.4 → 1.14.5

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 (53) hide show
  1. package/dist/cjs/index-ecd8c9bb.js +4 -4
  2. package/dist/cjs/index.cjs.js +2 -2
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{post-logo.cjs.entry.js → post-header-logo.cjs.entry.js} +2 -2
  5. package/dist/cjs/{post-internet-header-0993cf8a.js → post-internet-header-6aa7c957.js} +11 -11
  6. package/dist/cjs/{post-logo-83dbcda0.js → post-logo-c7b8f044.js} +2 -2
  7. package/dist/cjs/swisspost-internet-header.cjs.entry.js +1 -1
  8. package/dist/cjs/swisspost-internet-header.cjs.js +1 -1
  9. package/dist/collection/components/post-internet-header/post-internet-header.css +1 -1
  10. package/dist/collection/components/post-internet-header/post-internet-header.js +1 -1
  11. package/dist/collection/components/post-logo/post-logo.js +1 -1
  12. package/dist/components/index.js +3 -3
  13. package/dist/components/{post-logo.d.ts → post-header-logo.d.ts} +4 -4
  14. package/dist/components/post-header-logo.js +6 -0
  15. package/dist/components/post-logo.js +35 -4
  16. package/dist/components/swisspost-internet-header.js +18 -18
  17. package/dist/docs.json +28 -28
  18. package/dist/esm/index-bb0e68fd.js +4 -4
  19. package/dist/esm/index.js +2 -2
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/post-header-logo.entry.js +3 -0
  22. package/dist/esm/{post-internet-header-671cd619.js → post-internet-header-4c890716.js} +11 -11
  23. package/dist/esm/{post-logo-366ed138.js → post-logo-a10a7614.js} +2 -2
  24. package/dist/esm/swisspost-internet-header.entry.js +1 -1
  25. package/dist/esm/swisspost-internet-header.js +1 -1
  26. package/dist/esm-es5/index-bb0e68fd.js +1 -1
  27. package/dist/esm-es5/index.js +1 -1
  28. package/dist/esm-es5/loader.js +1 -1
  29. package/dist/esm-es5/post-header-logo.entry.js +1 -0
  30. package/dist/esm-es5/{post-internet-header-671cd619.js → post-internet-header-4c890716.js} +1 -1
  31. package/dist/esm-es5/{post-logo-366ed138.js → post-logo-a10a7614.js} +1 -1
  32. package/dist/esm-es5/swisspost-internet-header.entry.js +1 -1
  33. package/dist/esm-es5/swisspost-internet-header.js +1 -1
  34. package/dist/swisspost-internet-header/index.esm.js +1 -1
  35. package/dist/swisspost-internet-header/{p-5bdc0fce.system.entry.js → p-132b1973.system.entry.js} +1 -1
  36. package/dist/swisspost-internet-header/{p-6f9aca24.entry.js → p-299d7534.entry.js} +1 -1
  37. package/dist/swisspost-internet-header/{p-ee61bd68.js → p-442dda65.js} +1 -1
  38. package/dist/swisspost-internet-header/p-695fe962.system.js +1 -1
  39. package/dist/swisspost-internet-header/p-6f9b276e.entry.js +1 -0
  40. package/dist/swisspost-internet-header/{p-2ced9f59.system.js → p-934cf432.system.js} +1 -1
  41. package/dist/swisspost-internet-header/{p-2398bfbf.system.js → p-c4957ff7.system.js} +1 -1
  42. package/dist/swisspost-internet-header/p-c76ce6e7.system.entry.js +1 -0
  43. package/dist/swisspost-internet-header/swisspost-internet-header.esm.js +1 -1
  44. package/dist/types/components/post-logo/post-logo.d.ts +1 -1
  45. package/dist/types/components.d.ts +13 -13
  46. package/package.json +9 -9
  47. package/dist/components/post-logo2.js +0 -37
  48. package/dist/esm/post-logo.entry.js +0 -3
  49. package/dist/esm-es5/post-logo.entry.js +0 -1
  50. package/dist/swisspost-internet-header/p-3ab58011.entry.js +0 -1
  51. package/dist/swisspost-internet-header/p-4e4670a6.system.entry.js +0 -1
  52. /package/dist/swisspost-internet-header/{p-abd7dbc8.js → p-8f8d8912.js} +0 -0
  53. /package/dist/swisspost-internet-header/{p-793de0f0.system.js → p-9730e79d.system.js} +0 -0
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,H as o,g as n}from"./p-67f6b5a8.js";import{d as s,t as a}from"./p-151d419a.js";import{g as r,p as l,t as h}from"./p-709f2c44.js";import{u as d}from"./p-a39139a9.js";import{s as c,d as g}from"./p-13453cb0.js";import{S as p}from"./p-9fee809c.js";import{S as f}from"./p-a0313d87.js";import{I as u}from"./p-840aa5c6.js";function m(t,e,i,o){let n=o;return e>0&&(e===1/0&&(n=!0),t.push(i)),n}const v=(t,e,i)=>{if(null===t||null===e||t.origin!==e.origin)return 0;const o=t.pathname.toLocaleLowerCase(),n=e.pathname.toLocaleLowerCase();if(o===n)return 1/0;if(t.pathname.length<e.pathname.length)return 0;if("auto"===i){const i=[t.origin.toLocaleLowerCase(),...o.split("/").filter((t=>null!==t&&""!==t))],s=[e.origin.toLocaleLowerCase(),...n.split("/").filter((t=>null!==t&&""!==t))],a=b(i,s);return Math.min(i.length,s.length)===a?a:0}return 0},b=(t,e)=>{if(null==t||null==e||0===t.length||0===e.length)return 0;let i=0;for(;i<Math.min(t.length,e.length);i++)if(t[i]!==e[i])return 0;return i};let w=null,y=null;const x=async({projectId:t,environment:e,language:i,cookieKey:o,localStorageKey:n,activeRouteProp:s,localizedCustomConfig:a,osFlyoutOverrides:h})=>{var d,c;const g=(()=>{const t=document.querySelector("#PPM_HEADER_DATA");return null!=(null==t?void 0:t.textContent)?JSON.parse(t.textContent):null})();let p,f,u=null;if(g)p=g,f=document.documentElement.lang;else{if(null==w&&(w=O(t,e)),u=await w,f=r(Object.keys(u),i,n,o),void 0===f)throw new Error("Internet Header: unable to determine current language");p=Object.assign({},u[f])}if(a){const t=(null===(d=null==a?void 0:a.header)||void 0===d?void 0:d.navMain)?Object.assign(Object.assign({},p.header),{navMain:[...p.header.navMain,...a.header.navMain]}):p.header;p=Object.assign(Object.assign({},p),{header:t})}return h&&(p.header.navMain=k(p,h)),null!=s&&(p.header.navMain=((t,e)=>{if(!1===e)return t;let i;if(t=(t=>t.map((t=>Object.assign(Object.assign({},t),{isActiveOverride:!1,flyout:t.flyout.map((t=>Object.assign(Object.assign({},t),{linkList:t.linkList.map((t=>Object.assign(Object.assign({},t),{isActiveOverride:!1})))})))}))))(t),"auto"===e||"exact"===e){if((t=>t.filter((t=>t.isActive)).length>0)(t))return(t=>t.map((t=>Object.assign(Object.assign({},t),{isActiveOverride:t.isActive,flyout:t.flyout.map((t=>Object.assign(Object.assign({},t),{linkList:t.linkList.map((t=>Object.assign(Object.assign({},t),{isActiveOverride:t.isActive})))})))}))))(t);i=new URL(window.location.href)}else try{i=new URL(e,document.location.origin)}catch(i){return console.warn(`Active Route: ${e} is not a valid URL. Navigation highlighting has been disabled.`),t}const o=((t,e,i)=>{let o=!1;const n=[];return t.filter((t=>!o&&t)).forEach((t=>{try{const s=v(e,new URL(t.url),i);o=m(n,s,{main:t,score:s},o)}catch(t){}t.flyout.forEach((s=>{var a;null===(a=s.linkList)||void 0===a||a.forEach((s=>{if(!s.isActive||"auto"!==i&&"exact"!==i)try{const a=new URL(s.url),r=v(e,a,i);o=m(n,r,{main:t,sub:s,score:r},o)}catch(t){}else o=!0}))}))})),n.sort(((t,e)=>e.score-t.score))})(t,i,e);if(0===o.length)return t;const n=o[0];return n.main.isActiveOverride=!0,n.sub&&(n.sub.isActiveOverride=!0),t})(p.header.navMain,s)),N(null===(c=null==p?void 0:p.header)||void 0===c?void 0:c.navMain),l(f,o,n),p},k=(t,e)=>null==e?t.header.navMain:t.header.navMain.map((t=>{var i,o;if("flyout_os"!==t.id)return t;null===y&&(y=JSON.parse(JSON.stringify(t)));const n=null!==(i=e.text)&&void 0!==i?i:y.text,s=null!==(o=e.title)&&void 0!==o?o:y.title;if(null==y.flyout||0===y.flyout.length||null==e.flyout||0===e.flyout.length)return Object.assign(Object.assign({},t),{title:s,text:n});const a=[...y.flyout.map(((t,i)=>{var o;const n=e.flyout[i];return{title:null!==(o=n.title)&&void 0!==o?o:t.title,linkList:[...t.linkList,...null!=n.linkList?e.flyout[i].linkList:[]]}})),...e.flyout.slice(y.flyout.length)];return Object.assign(Object.assign({},t),{text:n,title:s,flyout:a})})),O=async(t,e)=>{if(!j(t))throw new Error(`Internet Header: invalid project id "${t}"`);"test"===t&&(e="int01");let i=C(t,e);try{const t=await fetch(i);return await t.json()}catch(t){throw new Error(`Internet Header: fetching config failed. ${t.message}`)}},C=(t,e)=>{if("test"===t)return"assets/config/test-configuration.json";const i=e.toLowerCase(),o="prod"===i,n=`https://${o?"www":"int"}.post.ch`;try{return new URL(`${n}/api/headerjs/Json?serviceid=${encodeURIComponent(t)}${o?"":"&environment="+i}`).toString()}catch(t){throw new Error("Internet Header: Config URL is invalid.")}},j=t=>""!==t&&t.length>0&&/^[a-zA-Z][\w-]*[a-zA-Z0-9]$/.test(t),F=(t,e)=>{var i;let o;try{o="string"==typeof t?JSON.parse(t):t}catch(t){throw new Error("Internet Header: Custom config is invalid. Make sure your custom config contains valid JSON syntax and matches the definition. ")}let n=o[e];return(null===(i=null==n?void 0:n.header)||void 0===i?void 0:i.navMain)&&N(n.header.navMain),n},N=t=>{t.forEach((t=>{t.id="flyout_os"===t.id?t.id:d("main-nav-")}))},S=t=>{if(!(t instanceof HTMLElement||t instanceof SVGElement))return!1;const e=getComputedStyle(t);return["overflow","overflow-x","overflow-y"].some((t=>{const i=e.getPropertyValue(t);return"auto"===i||"scroll"===i}))},P=t=>{let e=t.parentElement;for(;e;){if("BODY"===e.nodeName)return document;if(S(e))return e;e=e.parentElement}return document},I=(t,e)=>{const i=P(t),o=i instanceof Element?i.scrollTop:i.documentElement.scrollTop,n="full"===c.stickyness?0:o;let s,a;if(e)s=t.clientHeight-1,a=e.clientHeight;else{const e=window.getComputedStyle(t),i=parseFloat(e.getPropertyValue("font-size"));a=parseFloat(e.getPropertyValue("--meta-header-height"))*i,s=a+parseFloat(e.getPropertyValue("--header-height"))*i}let r=1;return a>0&&(r=Math.max((s-Math.max(n,0))/(s-a),1)),r.toString()},L=class{async getCurrentLanguage(){var t;return null!==(t=c.currentLanguage)&&void 0!==t?t:"de"}constructor(i){if(t(this,i),this.headerLoaded=e(this,"headerLoaded",7),this.lastScrollTop=window.scrollY||document.documentElement.scrollTop,this.lastWindowWidth=window.innerWidth,this.handleClickOutsideBound=this.handleClickOutside.bind(this),this.project=void 0,this.stickyness="minimal",this.language=void 0,this.meta=!0,this.login=!0,this.search=!0,this.skiplinks=!0,this.configProxy=void 0,this.environment="prod",this.languageSwitchOverrides=void 0,this.customConfig=void 0,this.languageCookieKey=void 0,this.languageLocalStorageKey="swisspost-internet-header-language",this.logoutUrl=void 0,this.activeRoute="auto",this.osFlyoutOverrides=void 0,this.fullWidth=!1,this.activeFlyout=null,this.activeDropdownElement=null,this.isMainSlotEmpty=!0,void 0===this.project||""===this.project||!j(this.project))throw new Error(`Internet Header project key is "${this.project}". Please provide a valid project key.`)}connectedCallback(){this.throttledScroll=a(300,(()=>this.handleScrollEvent())),this.debouncedResize=s(200,(()=>this.handleResize()))}disconnectedCallback(){this.scrollParent.removeEventListener("scroll",this.throttledScroll),this.scrollParent.removeEventListener("resize",this.debouncedResize),g()}async componentWillLoad(){this.scrollParent=P(this.host),this.scrollParent.addEventListener("scroll",this.throttledScroll,{passive:!0}),this.scrollParent.addEventListener("resize",this.debouncedResize,{passive:!0});try{if(c.projectId=this.project,c.stickyness=this.stickyness,c.environment=this.environment.toLocaleLowerCase(),void 0!==this.language&&(c.currentLanguage=this.language),c.languageSwitchOverrides="string"==typeof this.languageSwitchOverrides?JSON.parse(this.languageSwitchOverrides):this.languageSwitchOverrides,c.osFlyoutOverrides="string"==typeof this.osFlyoutOverrides?JSON.parse(this.osFlyoutOverrides):this.osFlyoutOverrides,void 0!==this.customConfig){const t=Object.keys("string"==typeof this.customConfig?JSON.parse(this.customConfig):this.customConfig),e=c.currentLanguage||r(t,this.language);c.localizedCustomConfig=F(this.customConfig,e)}c.localizedConfig=await x({projectId:this.project,environment:c.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:c.localizedCustomConfig,osFlyoutOverrides:c.osFlyoutOverrides})}catch(t){console.error(t)}}componentDidLoad(){window.requestAnimationFrame((()=>{this.handleResize(),this.headerLoaded.emit(),this.host.classList.add("header-loaded"),this.meta&&this.metaNav?this.updateLogoAnimation=((t,e)=>{const i=P(e),o=()=>{e.style.setProperty("--logo-scale",I(e,t))},n=s(150,o);return new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&t.intersectionRatio>0?(i.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",n),window.requestAnimationFrame(o)):(i.removeEventListener("scroll",o),window.removeEventListener("resize",n),window.requestAnimationFrame(o))}))}),{threshold:[0,.001]}).observe(t),o})(this.metaNav,this.host):""!==window.getComputedStyle(document.documentElement).getPropertyValue("--post-meta-header-height")&&document.documentElement.style.setProperty("--post-meta-header-height","0px")})),"full"===this.stickyness&&console.warn('Internet Header: The stickyness="full" option is deprecated.')}async handleLanguageChange(t){c.currentLanguage=t,c.localizedConfig=await x({projectId:this.project,environment:this.environment,language:t,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:c.localizedCustomConfig,osFlyoutOverrides:c.osFlyoutOverrides}),void 0!==this.customConfig&&(c.localizedCustomConfig=F(this.customConfig,t))}handleAvailableLanguagesChange(t){c.languageSwitchOverrides="string"==typeof t?JSON.parse(t):t}async handleOsFlyoutOverrides(t){c.osFlyoutOverrides="string"==typeof t?JSON.parse(t):t,c.localizedConfig=await x({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:c.localizedCustomConfig,osFlyoutOverrides:c.osFlyoutOverrides})}async handleActiveRouteChange(t){c.localizedConfig=await x({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:t,localizedCustomConfig:c.localizedCustomConfig,osFlyoutOverrides:c.osFlyoutOverrides})}async handleCustomConfigChange(t){if(void 0===this.language)return;const e=F(t,this.language);c.localizedCustomConfig=e,c.localizedConfig=await x({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:e,osFlyoutOverrides:c.osFlyoutOverrides})}handleSearchChange(t){c.search=t}handleLoginChange(t){c.login=t}handleMetaChange(t){c.meta=t}handleLanguageChangeEvent(t){this.handleLanguageChange(t.detail)}handleStickynessChange(t){c.stickyness=t,"function"==typeof this.updateLogoAnimation&&this.updateLogoAnimation()}handleClickOutside(t){this.activeDropdownElement&&!t.composedPath().includes(this.activeDropdownElement)&&this.activeDropdownElement.toggleDropdown(!1)}handleKeyUp(t){"Escape"===t.key&&(this.activeDropdownElement&&this.activeDropdownElement.toggleDropdown(!1),null!==this.activeFlyout&&this.mainNav&&this.mainNav.toggleDropdown(!1))}handleScrollEvent(){const t=this.scrollParent instanceof Document?this.scrollParent.documentElement.scrollTop:this.scrollParent.scrollTop;"minimal"===this.stickyness&&this.host.classList.toggle("scrolling-up",t<=this.lastScrollTop),this.lastScrollTop=t<=0?0:t}handleResize(){var t;this.isMainNavOpen()&&this.lastWindowWidth<1024&&window.innerWidth>=1024&&(null===(t=this.activeDropdownElement)||void 0===t||t.toggleDropdown(!1)),this.lastWindowWidth=window.innerWidth}handleDropdownToggled(t){(t.detail.open||this.activeDropdownElement===t.detail.element)&&(t.detail.open?(this.activeDropdownElement&&this.activeDropdownElement.toggleDropdown(!1),this.activeDropdownElement=t.detail.element,window.innerWidth>=1024&&window.setTimeout((()=>{window.addEventListener("click",this.handleClickOutsideBound)}),10),null!==this.activeFlyout&&this.mainNav&&this.mainNav.setActiveFlyout(null)):(this.activeDropdownElement=null,window.removeEventListener("click",this.handleClickOutsideBound)))}handleFlyoutToggled(t){this.activeFlyout=t.detail,this.activeDropdownElement&&null!==t.detail&&!this.isMainNavOpen()&&this.activeDropdownElement.toggleDropdown(!1)}toggleMobileDropdown(){var t;null===(t=this.mainNav)||void 0===t||t.toggleDropdown()}isMainNavOpen(){return this.activeDropdownElement&&"POST-MAIN-NAVIGATION"===this.activeDropdownElement.tagName}handleMainSlotChange(t){this.isMainSlotEmpty=0===t.target.assignedElements().length}render(){var t,e,n;if(!(null===(t=c.localizedConfig)||void 0===t?void 0:t.header))return void console.error(new Error("Internet Header: Config cannot be loaded"));const s=c.localizedConfig,a=this.meta&&void 0!==s.header.navMeta&&(null===(e=s.header.navMeta)||void 0===e?void 0:e.filter((t=>!t.isHomeLink)).length)>0,r=(null!==(n=this.login)&&void 0!==n?n:!s.header.isLoginWidgetHidden)&&s.header.loginWidgetOptions,l=s.header.navLang.length>1,d=a?I(this.host):"1";return i(o,{class:`stickyness-${this.stickyness} ${Boolean(this.activeDropdownElement)||Boolean(this.activeFlyout)?"dropdown-open":""}`,"data-version":"1.14.4",onKeyup:t=>this.handleKeyUp(t),style:{"--logo-scale":d}},i("header",{class:"post-internet-header"+(this.fullWidth?" full-width":"")},i(p,null),i("h1",{class:"visually-hidden"},h("Navigate on post.ch")),i(u,{condition:this.skiplinks},i("post-skiplinks",null)),i(u,{condition:a},i("post-meta-navigation",{orientation:"horizontal",class:"hidden-lg","full-width":this.fullWidth,ref:t=>this.metaNav=t},i(u,{condition:l},i("post-language-switch",{id:"post-language-switch-desktop",mode:"dropdown",onDropdownToggled:t=>this.handleDropdownToggled(t)})))),i("div",{class:"main-navigation-container wide-container"},i("post-logo",null),i("button",{class:"menu-button nav-link",onClick:()=>this.toggleMobileDropdown(),"aria-haspopup":"menu","aria-controls":"post-internet-header-main-navigation","aria-expanded":this.activeDropdownElement?"true":"false"},i("span",{class:"menu-button-text visually-hidden"},s.header.mobileMenu.text),i(f,{name:this.isMainNavOpen()?"pi-close":"pi-menu"})),i("post-main-navigation",{onDropdownToggled:t=>this.handleDropdownToggled(t),onFlyoutToggled:t=>this.handleFlyoutToggled(t),ref:t=>this.mainNav=t},i(u,{condition:a},i("post-meta-navigation",{orientation:"vertical"},i(u,{condition:l},i("post-language-switch",{id:"post-language-switch-mobile",mode:"list"}))))),i("div",{class:"main-navigation-controls"},i("div",{class:"main-navigation-custom-content"+(this.isMainSlotEmpty?" d-none":"")},i("slot",{name:"main",onSlotchange:t=>this.handleMainSlotChange(t)})),i(u,{condition:this.search},i("post-search",{onDropdownToggled:t=>this.handleDropdownToggled(t)})),i(u,{condition:!!r},i("post-klp-login-widget",{"logout-url":this.logoutUrl},i("slot",{name:"login-widget"}))),i(u,{condition:!a&&l},i("post-language-switch",{id:"post-language-switch-no-meta",onDropdownToggled:t=>this.handleDropdownToggled(t),mode:"dropdown"}))))))}get host(){return n(this)}static get watchers(){return{language:["handleLanguageChange"],languageSwitchOverrides:["handleAvailableLanguagesChange"],osFlyoutOverrides:["handleOsFlyoutOverrides"],activeRoute:["handleActiveRouteChange"],customConfig:["handleCustomConfigChange"],search:["handleSearchChange"],login:["handleLoginChange"],meta:["handleMetaChange"],stickyness:["handleStickynessChange"]}}};L.style=':host{--post-contrast-color:#000;--post-focus-color:#1976c8;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-white:#fff;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-black:#000;--post-primary:hsl(0, 0%, 20%);--post-secondary:hsl(0, 0%, 40%);--post-success:#2c871d;--post-warning:#f49e00;--post-error:#a51728;--post-info:#cce4ee;--post-success-background:#c0debb;--post-warning-background:#fce2b2;--post-error-background:#ffdade;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-black-alpha-10-rgba:rgba(0, 0, 0, 0.1);--post-black-alpha-20-rgba:rgba(0, 0, 0, 0.2);--post-black-alpha-40-rgba:rgba(0, 0, 0, 0.4);--post-black-alpha-60-rgba:rgba(0, 0, 0, 0.6);--post-black-alpha-80-rgba:rgba(0, 0, 0, 0.8);--post-white-alpha-10-rgba:rgba(255, 255, 255, 0.1);--post-white-alpha-20-rgba:rgba(255, 255, 255, 0.2);--post-white-alpha-40-rgba:rgba(255, 255, 255, 0.4);--post-white-alpha-60-rgba:rgba(255, 255, 255, 0.6);--post-white-alpha-80-rgba:rgba(255, 255, 255, 0.8);--post-yellow-rgb:255, 204, 0;--post-white-rgb:255, 255, 255;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-black-rgb:0, 0, 0;--post-primary-rgb:51, 51, 51;--post-secondary-rgb:102, 102, 102;--post-success-rgb:44, 135, 29;--post-warning-rgb:244, 158, 0;--post-error-rgb:165, 23, 40;--post-info-rgb:204, 228, 238;--post-success-background-rgb:192, 222, 187;--post-warning-background-rgb:252, 226, 178;--post-error-background-rgb:255, 218, 222;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:700;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:700;font-style:italic;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:400;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:400;font-style:italic;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:300;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:300;font-style:italic;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")}.visually-hidden{position:absolute;width:1px;height:1px;border:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0)}.btn-blank{background-color:rgba(0,0,0,0);border:none;border-radius:0;padding:0}.nav-link{outline:none;outline-offset:2px;text-decoration:none;color:rgba(0,0,0,.8);-webkit-transition:color 200ms;transition:color 200ms;background-color:rgba(0,0,0,0);-webkit-box-shadow:none;box-shadow:none;border:0;margin:0;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:.5rem}.nav-link:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.nav-link:hover,.nav-link:focus{color:#000}.nav-link:is(:focus-visible,:focus-within,.pretend-focus){z-index:1;position:relative}.nav-link>svg{width:1.4em;height:1.4em;-ms-flex-negative:0;flex-shrink:0}.nav-link>span{-ms-flex-negative:1;flex-shrink:1}.no-list{list-style:none;padding-left:0;margin-top:0;margin-bottom:0}*,:host,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host{font-family:"Frutiger Neue For Post",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}button{font:inherit;padding:0}a,button{border-radius:4px;outline:none;outline-offset:2px}a:is(:focus-visible,:focus-within,.pretend-focus),button:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color);border-radius:4px}img,svg{max-width:100%;max-height:100%}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){svg{color:currentColor;forced-color-adjust:preserve-parent-color}}.box>*:first-child{margin-top:0}.box>*:last-child{margin-bottom:0}.mirrored{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.bold{font-weight:700}.light{font-weight:300}.d-none{display:none !important}.d-flex{display:-ms-flexbox;display:flex}.d-inline-flex{display:-ms-inline-flexbox;display:inline-flex}.align-items-center{-ms-flex-align:center;align-items:center}@media (min-width: 1441px){.wide-container{margin:0 auto;max-width:1440px}}@media (max-width: 599.98px){.container{padding-right:16px;padding-left:16px}}@media (min-width: 600px)and (max-width: 1023.98px){.container{padding-right:32px;padding-left:32px}}@media (min-width: 1024px){.container{padding-right:40px;padding-left:40px}}@media (max-width: -0.02px){.hidden-xs{display:none}}@media (max-width: 399.98px){.hidden-sm{display:none}}@media (max-width: 599.98px){.hidden-rg{display:none}}@media (max-width: 779.98px){.hidden-md{display:none}}@media (max-width: 1023.98px){.hidden-lg{display:none}}@media (max-width: 1279.98px){.hidden-xl{display:none}}@media (max-width: 1439.98px){.hidden-xxl{display:none}}:host{--logo-scale:1}@media (max-width: 1023.98px){:host{--logo-scale:1 !important}}post-logo{height:var(--header-height);width:var(--header-height);-webkit-transform-origin:bottom left;transform-origin:bottom left;-webkit-transform:scale(var(--logo-scale));transform:scale(var(--logo-scale))}post-main-navigation{margin-left:calc(var(--header-height)*var(--logo-scale) - var(--header-height))}:host{display:block;position:relative;font-size:1rem;font-weight:300;z-index:var(--header-z-index, 10);--language-dropdown-margin-top:0px;--meta-header-height:var(--post-meta-header-height, 0px);--header-height:var(--post-header-height, 3.5rem)}@media (min-width: 1024px){:host{--meta-header-height:var(--post-meta-header-height, 3rem)}}@media (min-width: 1024px){:host{--header-height:var(--post-header-height, 4rem)}}@media (min-width: 1280px){:host{--header-height:var(--post-header-height, 4.5rem)}}:host([meta=false]){--meta-header-height:0px;--language-dropdown-margin-top:1px}@supports ((position: -webkit-sticky) or (position: sticky)){:host(:not(.stickyness-none)){position:-webkit-sticky;position:sticky}:host(.stickyness-full){top:0}:host(.stickyness-main){top:calc(var(--meta-header-height, 0px)*-1)}:host(.stickyness-minimal){top:calc((var(--header-height, 0px) + var(--meta-header-height, 0px) + 1px)*-1);-webkit-transition:top 200ms ease-in;transition:top 200ms ease-in}:host(.stickyness-minimal.scrolling-up),:host(.stickyness-minimal.dropdown-open){top:calc(var(--meta-header-height, 0px)*-1);--header-slide-in-transition:var(--post-header-slide-in-transition, top 200ms ease-out);-webkit-transition:var(--header-slide-in-transition);transition:var(--header-slide-in-transition)}}.post-internet-header{border-bottom:1px solid #e6e6e6;background-color:#fff}.main-navigation-container{display:-ms-flexbox;display:flex}.main-navigation-container>.main-navigation-controls{-ms-flex:0 1 auto;flex:0 1 auto}.main-navigation{display:-ms-flexbox;display:flex}.sub-navigation-container{position:absolute;top:100%;left:0;width:100%;display:-ms-flexbox;display:flex;background:#fff;visibility:hidden}.main-navigation-item:hover .sub-navigation-container{visibility:visible}.main-navigation-controls{display:-ms-flexbox;display:flex;margin-left:auto}@media (max-width: 1023.98px){.main-navigation-controls{font-weight:400}}@media (min-width: 1024px){.main-navigation-controls{font-size:1.0625rem}}.main-navigation-controls>*{border-left:1px solid #e6e6e6;-ms-flex:0 0 auto;flex:0 0 auto}.main-navigation-custom-content{max-height:var(--header-height);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-negative:1;flex-shrink:1}.menu-button{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 calc(1rem - 1px);font-weight:300;cursor:pointer;border-left:1px solid #e6e6e6;-ms-flex-order:1;order:1}@media (min-width: 1024px){.menu-button{display:none}}@media (min-width: 600px)and (max-width: 1023.98px){.menu-button .visually-hidden{position:static;width:auto;height:auto;margin:auto;overflow:visible;clip:auto;visibility:visible;margin-right:.5rem}}.menu-button svg{width:1.5rem;height:1.5rem}.full-width .wide-container{max-width:none}';export{L as P}
1
+ import{r as t,c as e,h as i,H as o,g as n}from"./p-67f6b5a8.js";import{d as s,t as a}from"./p-151d419a.js";import{g as r,p as l,t as h}from"./p-709f2c44.js";import{u as d}from"./p-a39139a9.js";import{s as c,d as g}from"./p-13453cb0.js";import{S as p}from"./p-9fee809c.js";import{S as f}from"./p-a0313d87.js";import{I as u}from"./p-840aa5c6.js";function m(t,e,i,o){let n=o;return e>0&&(e===1/0&&(n=!0),t.push(i)),n}const v=(t,e,i)=>{if(null===t||null===e||t.origin!==e.origin)return 0;const o=t.pathname.toLocaleLowerCase(),n=e.pathname.toLocaleLowerCase();if(o===n)return 1/0;if(t.pathname.length<e.pathname.length)return 0;if("auto"===i){const i=[t.origin.toLocaleLowerCase(),...o.split("/").filter((t=>null!==t&&""!==t))],s=[e.origin.toLocaleLowerCase(),...n.split("/").filter((t=>null!==t&&""!==t))],a=b(i,s);return Math.min(i.length,s.length)===a?a:0}return 0},b=(t,e)=>{if(null==t||null==e||0===t.length||0===e.length)return 0;let i=0;for(;i<Math.min(t.length,e.length);i++)if(t[i]!==e[i])return 0;return i};let w=null,y=null;const x=async({projectId:t,environment:e,language:i,cookieKey:o,localStorageKey:n,activeRouteProp:s,localizedCustomConfig:a,osFlyoutOverrides:h})=>{var d,c;const g=(()=>{const t=document.querySelector("#PPM_HEADER_DATA");return null!=(null==t?void 0:t.textContent)?JSON.parse(t.textContent):null})();let p,f,u=null;if(g)p=g,f=document.documentElement.lang;else{if(null==w&&(w=O(t,e)),u=await w,f=r(Object.keys(u),i,n,o),void 0===f)throw new Error("Internet Header: unable to determine current language");p=Object.assign({},u[f])}if(a){const t=(null===(d=null==a?void 0:a.header)||void 0===d?void 0:d.navMain)?Object.assign(Object.assign({},p.header),{navMain:[...p.header.navMain,...a.header.navMain]}):p.header;p=Object.assign(Object.assign({},p),{header:t})}return h&&(p.header.navMain=k(p,h)),null!=s&&(p.header.navMain=((t,e)=>{if(!1===e)return t;let i;if(t=(t=>t.map((t=>Object.assign(Object.assign({},t),{isActiveOverride:!1,flyout:t.flyout.map((t=>Object.assign(Object.assign({},t),{linkList:t.linkList.map((t=>Object.assign(Object.assign({},t),{isActiveOverride:!1})))})))}))))(t),"auto"===e||"exact"===e){if((t=>t.filter((t=>t.isActive)).length>0)(t))return(t=>t.map((t=>Object.assign(Object.assign({},t),{isActiveOverride:t.isActive,flyout:t.flyout.map((t=>Object.assign(Object.assign({},t),{linkList:t.linkList.map((t=>Object.assign(Object.assign({},t),{isActiveOverride:t.isActive})))})))}))))(t);i=new URL(window.location.href)}else try{i=new URL(e,document.location.origin)}catch(i){return console.warn(`Active Route: ${e} is not a valid URL. Navigation highlighting has been disabled.`),t}const o=((t,e,i)=>{let o=!1;const n=[];return t.filter((t=>!o&&t)).forEach((t=>{try{const s=v(e,new URL(t.url),i);o=m(n,s,{main:t,score:s},o)}catch(t){}t.flyout.forEach((s=>{var a;null===(a=s.linkList)||void 0===a||a.forEach((s=>{if(!s.isActive||"auto"!==i&&"exact"!==i)try{const a=new URL(s.url),r=v(e,a,i);o=m(n,r,{main:t,sub:s,score:r},o)}catch(t){}else o=!0}))}))})),n.sort(((t,e)=>e.score-t.score))})(t,i,e);if(0===o.length)return t;const n=o[0];return n.main.isActiveOverride=!0,n.sub&&(n.sub.isActiveOverride=!0),t})(p.header.navMain,s)),N(null===(c=null==p?void 0:p.header)||void 0===c?void 0:c.navMain),l(f,o,n),p},k=(t,e)=>null==e?t.header.navMain:t.header.navMain.map((t=>{var i,o;if("flyout_os"!==t.id)return t;null===y&&(y=JSON.parse(JSON.stringify(t)));const n=null!==(i=e.text)&&void 0!==i?i:y.text,s=null!==(o=e.title)&&void 0!==o?o:y.title;if(null==y.flyout||0===y.flyout.length||null==e.flyout||0===e.flyout.length)return Object.assign(Object.assign({},t),{title:s,text:n});const a=[...y.flyout.map(((t,i)=>{var o;const n=e.flyout[i];return{title:null!==(o=n.title)&&void 0!==o?o:t.title,linkList:[...t.linkList,...null!=n.linkList?e.flyout[i].linkList:[]]}})),...e.flyout.slice(y.flyout.length)];return Object.assign(Object.assign({},t),{text:n,title:s,flyout:a})})),O=async(t,e)=>{if(!j(t))throw new Error(`Internet Header: invalid project id "${t}"`);"test"===t&&(e="int01");let i=C(t,e);try{const t=await fetch(i);return await t.json()}catch(t){throw new Error(`Internet Header: fetching config failed. ${t.message}`)}},C=(t,e)=>{if("test"===t)return"assets/config/test-configuration.json";const i=e.toLowerCase(),o="prod"===i,n=`https://${o?"www":"int"}.post.ch`;try{return new URL(`${n}/api/headerjs/Json?serviceid=${encodeURIComponent(t)}${o?"":"&environment="+i}`).toString()}catch(t){throw new Error("Internet Header: Config URL is invalid.")}},j=t=>""!==t&&t.length>0&&/^[a-zA-Z][\w-]*[a-zA-Z0-9]$/.test(t),F=(t,e)=>{var i;let o;try{o="string"==typeof t?JSON.parse(t):t}catch(t){throw new Error("Internet Header: Custom config is invalid. Make sure your custom config contains valid JSON syntax and matches the definition. ")}let n=o[e];return(null===(i=null==n?void 0:n.header)||void 0===i?void 0:i.navMain)&&N(n.header.navMain),n},N=t=>{t.forEach((t=>{t.id="flyout_os"===t.id?t.id:d("main-nav-")}))},S=t=>{if(!(t instanceof HTMLElement||t instanceof SVGElement))return!1;const e=getComputedStyle(t);return["overflow","overflow-x","overflow-y"].some((t=>{const i=e.getPropertyValue(t);return"auto"===i||"scroll"===i}))},P=t=>{let e=t.parentElement;for(;e;){if("BODY"===e.nodeName)return document;if(S(e))return e;e=e.parentElement}return document},I=(t,e)=>{const i=P(t),o=i instanceof Element?i.scrollTop:i.documentElement.scrollTop,n="full"===c.stickyness?0:o;let s,a;if(e)s=t.clientHeight-1,a=e.clientHeight;else{const e=window.getComputedStyle(t),i=parseFloat(e.getPropertyValue("font-size"));a=parseFloat(e.getPropertyValue("--meta-header-height"))*i,s=a+parseFloat(e.getPropertyValue("--header-height"))*i}let r=1;return a>0&&(r=Math.max((s-Math.max(n,0))/(s-a),1)),r.toString()},L=class{async getCurrentLanguage(){var t;return null!==(t=c.currentLanguage)&&void 0!==t?t:"de"}constructor(i){if(t(this,i),this.headerLoaded=e(this,"headerLoaded",7),this.lastScrollTop=window.scrollY||document.documentElement.scrollTop,this.lastWindowWidth=window.innerWidth,this.handleClickOutsideBound=this.handleClickOutside.bind(this),this.project=void 0,this.stickyness="minimal",this.language=void 0,this.meta=!0,this.login=!0,this.search=!0,this.skiplinks=!0,this.configProxy=void 0,this.environment="prod",this.languageSwitchOverrides=void 0,this.customConfig=void 0,this.languageCookieKey=void 0,this.languageLocalStorageKey="swisspost-internet-header-language",this.logoutUrl=void 0,this.activeRoute="auto",this.osFlyoutOverrides=void 0,this.fullWidth=!1,this.activeFlyout=null,this.activeDropdownElement=null,this.isMainSlotEmpty=!0,void 0===this.project||""===this.project||!j(this.project))throw new Error(`Internet Header project key is "${this.project}". Please provide a valid project key.`)}connectedCallback(){this.throttledScroll=a(300,(()=>this.handleScrollEvent())),this.debouncedResize=s(200,(()=>this.handleResize()))}disconnectedCallback(){this.scrollParent.removeEventListener("scroll",this.throttledScroll),this.scrollParent.removeEventListener("resize",this.debouncedResize),g()}async componentWillLoad(){this.scrollParent=P(this.host),this.scrollParent.addEventListener("scroll",this.throttledScroll,{passive:!0}),this.scrollParent.addEventListener("resize",this.debouncedResize,{passive:!0});try{if(c.projectId=this.project,c.stickyness=this.stickyness,c.environment=this.environment.toLocaleLowerCase(),void 0!==this.language&&(c.currentLanguage=this.language),c.languageSwitchOverrides="string"==typeof this.languageSwitchOverrides?JSON.parse(this.languageSwitchOverrides):this.languageSwitchOverrides,c.osFlyoutOverrides="string"==typeof this.osFlyoutOverrides?JSON.parse(this.osFlyoutOverrides):this.osFlyoutOverrides,void 0!==this.customConfig){const t=Object.keys("string"==typeof this.customConfig?JSON.parse(this.customConfig):this.customConfig),e=c.currentLanguage||r(t,this.language);c.localizedCustomConfig=F(this.customConfig,e)}c.localizedConfig=await x({projectId:this.project,environment:c.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:c.localizedCustomConfig,osFlyoutOverrides:c.osFlyoutOverrides})}catch(t){console.error(t)}}componentDidLoad(){window.requestAnimationFrame((()=>{this.handleResize(),this.headerLoaded.emit(),this.host.classList.add("header-loaded"),this.meta&&this.metaNav?this.updateLogoAnimation=((t,e)=>{const i=P(e),o=()=>{e.style.setProperty("--logo-scale",I(e,t))},n=s(150,o);return new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&t.intersectionRatio>0?(i.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",n),window.requestAnimationFrame(o)):(i.removeEventListener("scroll",o),window.removeEventListener("resize",n),window.requestAnimationFrame(o))}))}),{threshold:[0,.001]}).observe(t),o})(this.metaNav,this.host):""!==window.getComputedStyle(document.documentElement).getPropertyValue("--post-meta-header-height")&&document.documentElement.style.setProperty("--post-meta-header-height","0px")})),"full"===this.stickyness&&console.warn('Internet Header: The stickyness="full" option is deprecated.')}async handleLanguageChange(t){c.currentLanguage=t,c.localizedConfig=await x({projectId:this.project,environment:this.environment,language:t,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:c.localizedCustomConfig,osFlyoutOverrides:c.osFlyoutOverrides}),void 0!==this.customConfig&&(c.localizedCustomConfig=F(this.customConfig,t))}handleAvailableLanguagesChange(t){c.languageSwitchOverrides="string"==typeof t?JSON.parse(t):t}async handleOsFlyoutOverrides(t){c.osFlyoutOverrides="string"==typeof t?JSON.parse(t):t,c.localizedConfig=await x({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:c.localizedCustomConfig,osFlyoutOverrides:c.osFlyoutOverrides})}async handleActiveRouteChange(t){c.localizedConfig=await x({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:t,localizedCustomConfig:c.localizedCustomConfig,osFlyoutOverrides:c.osFlyoutOverrides})}async handleCustomConfigChange(t){if(void 0===this.language)return;const e=F(t,this.language);c.localizedCustomConfig=e,c.localizedConfig=await x({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:e,osFlyoutOverrides:c.osFlyoutOverrides})}handleSearchChange(t){c.search=t}handleLoginChange(t){c.login=t}handleMetaChange(t){c.meta=t}handleLanguageChangeEvent(t){this.handleLanguageChange(t.detail)}handleStickynessChange(t){c.stickyness=t,"function"==typeof this.updateLogoAnimation&&this.updateLogoAnimation()}handleClickOutside(t){this.activeDropdownElement&&!t.composedPath().includes(this.activeDropdownElement)&&this.activeDropdownElement.toggleDropdown(!1)}handleKeyUp(t){"Escape"===t.key&&(this.activeDropdownElement&&this.activeDropdownElement.toggleDropdown(!1),null!==this.activeFlyout&&this.mainNav&&this.mainNav.toggleDropdown(!1))}handleScrollEvent(){const t=this.scrollParent instanceof Document?this.scrollParent.documentElement.scrollTop:this.scrollParent.scrollTop;"minimal"===this.stickyness&&this.host.classList.toggle("scrolling-up",t<=this.lastScrollTop),this.lastScrollTop=t<=0?0:t}handleResize(){var t;this.isMainNavOpen()&&this.lastWindowWidth<1024&&window.innerWidth>=1024&&(null===(t=this.activeDropdownElement)||void 0===t||t.toggleDropdown(!1)),this.lastWindowWidth=window.innerWidth}handleDropdownToggled(t){(t.detail.open||this.activeDropdownElement===t.detail.element)&&(t.detail.open?(this.activeDropdownElement&&this.activeDropdownElement.toggleDropdown(!1),this.activeDropdownElement=t.detail.element,window.innerWidth>=1024&&window.setTimeout((()=>{window.addEventListener("click",this.handleClickOutsideBound)}),10),null!==this.activeFlyout&&this.mainNav&&this.mainNav.setActiveFlyout(null)):(this.activeDropdownElement=null,window.removeEventListener("click",this.handleClickOutsideBound)))}handleFlyoutToggled(t){this.activeFlyout=t.detail,this.activeDropdownElement&&null!==t.detail&&!this.isMainNavOpen()&&this.activeDropdownElement.toggleDropdown(!1)}toggleMobileDropdown(){var t;null===(t=this.mainNav)||void 0===t||t.toggleDropdown()}isMainNavOpen(){return this.activeDropdownElement&&"POST-MAIN-NAVIGATION"===this.activeDropdownElement.tagName}handleMainSlotChange(t){this.isMainSlotEmpty=0===t.target.assignedElements().length}render(){var t,e,n;if(!(null===(t=c.localizedConfig)||void 0===t?void 0:t.header))return void console.error(new Error("Internet Header: Config cannot be loaded"));const s=c.localizedConfig,a=this.meta&&void 0!==s.header.navMeta&&(null===(e=s.header.navMeta)||void 0===e?void 0:e.filter((t=>!t.isHomeLink)).length)>0,r=(null!==(n=this.login)&&void 0!==n?n:!s.header.isLoginWidgetHidden)&&s.header.loginWidgetOptions,l=s.header.navLang.length>1,d=a?I(this.host):"1";return i(o,{class:`stickyness-${this.stickyness} ${Boolean(this.activeDropdownElement)||Boolean(this.activeFlyout)?"dropdown-open":""}`,"data-version":"1.14.5",onKeyup:t=>this.handleKeyUp(t),style:{"--logo-scale":d}},i("header",{class:"post-internet-header"+(this.fullWidth?" full-width":"")},i(p,null),i("h1",{class:"visually-hidden"},h("Navigate on post.ch")),i(u,{condition:this.skiplinks},i("post-skiplinks",null)),i(u,{condition:a},i("post-meta-navigation",{orientation:"horizontal",class:"hidden-lg","full-width":this.fullWidth,ref:t=>this.metaNav=t},i(u,{condition:l},i("post-language-switch",{id:"post-language-switch-desktop",mode:"dropdown",onDropdownToggled:t=>this.handleDropdownToggled(t)})))),i("div",{class:"main-navigation-container wide-container"},i("post-header-logo",null),i("button",{class:"menu-button nav-link",onClick:()=>this.toggleMobileDropdown(),"aria-haspopup":"menu","aria-controls":"post-internet-header-main-navigation","aria-expanded":this.activeDropdownElement?"true":"false"},i("span",{class:"menu-button-text visually-hidden"},s.header.mobileMenu.text),i(f,{name:this.isMainNavOpen()?"pi-close":"pi-menu"})),i("post-main-navigation",{onDropdownToggled:t=>this.handleDropdownToggled(t),onFlyoutToggled:t=>this.handleFlyoutToggled(t),ref:t=>this.mainNav=t},i(u,{condition:a},i("post-meta-navigation",{orientation:"vertical"},i(u,{condition:l},i("post-language-switch",{id:"post-language-switch-mobile",mode:"list"}))))),i("div",{class:"main-navigation-controls"},i("div",{class:"main-navigation-custom-content"+(this.isMainSlotEmpty?" d-none":"")},i("slot",{name:"main",onSlotchange:t=>this.handleMainSlotChange(t)})),i(u,{condition:this.search},i("post-search",{onDropdownToggled:t=>this.handleDropdownToggled(t)})),i(u,{condition:!!r},i("post-klp-login-widget",{"logout-url":this.logoutUrl},i("slot",{name:"login-widget"}))),i(u,{condition:!a&&l},i("post-language-switch",{id:"post-language-switch-no-meta",onDropdownToggled:t=>this.handleDropdownToggled(t),mode:"dropdown"}))))))}get host(){return n(this)}static get watchers(){return{language:["handleLanguageChange"],languageSwitchOverrides:["handleAvailableLanguagesChange"],osFlyoutOverrides:["handleOsFlyoutOverrides"],activeRoute:["handleActiveRouteChange"],customConfig:["handleCustomConfigChange"],search:["handleSearchChange"],login:["handleLoginChange"],meta:["handleMetaChange"],stickyness:["handleStickynessChange"]}}};L.style=':host{--post-contrast-color:#000;--post-focus-color:#1976c8;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-white:#fff;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-black:#000;--post-primary:hsl(0, 0%, 20%);--post-secondary:hsl(0, 0%, 40%);--post-success:#2c871d;--post-warning:#f49e00;--post-error:#a51728;--post-info:#cce4ee;--post-success-background:#c0debb;--post-warning-background:#fce2b2;--post-error-background:#ffdade;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-black-alpha-10-rgba:rgba(0, 0, 0, 0.1);--post-black-alpha-20-rgba:rgba(0, 0, 0, 0.2);--post-black-alpha-40-rgba:rgba(0, 0, 0, 0.4);--post-black-alpha-60-rgba:rgba(0, 0, 0, 0.6);--post-black-alpha-80-rgba:rgba(0, 0, 0, 0.8);--post-white-alpha-10-rgba:rgba(255, 255, 255, 0.1);--post-white-alpha-20-rgba:rgba(255, 255, 255, 0.2);--post-white-alpha-40-rgba:rgba(255, 255, 255, 0.4);--post-white-alpha-60-rgba:rgba(255, 255, 255, 0.6);--post-white-alpha-80-rgba:rgba(255, 255, 255, 0.8);--post-yellow-rgb:255, 204, 0;--post-white-rgb:255, 255, 255;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-black-rgb:0, 0, 0;--post-primary-rgb:51, 51, 51;--post-secondary-rgb:102, 102, 102;--post-success-rgb:44, 135, 29;--post-warning-rgb:244, 158, 0;--post-error-rgb:165, 23, 40;--post-info-rgb:204, 228, 238;--post-success-background-rgb:192, 222, 187;--post-warning-background-rgb:252, 226, 178;--post-error-background-rgb:255, 218, 222;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:700;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:700;font-style:italic;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:400;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:400;font-style:italic;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:300;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:300;font-style:italic;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")}.visually-hidden{position:absolute;width:1px;height:1px;border:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0)}.btn-blank{background-color:rgba(0,0,0,0);border:none;border-radius:0;padding:0}.nav-link{outline:none;outline-offset:2px;text-decoration:none;color:rgba(0,0,0,.8);-webkit-transition:color 200ms;transition:color 200ms;background-color:rgba(0,0,0,0);-webkit-box-shadow:none;box-shadow:none;border:0;margin:0;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:.5rem}.nav-link:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.nav-link:hover,.nav-link:focus{color:#000}.nav-link:is(:focus-visible,:focus-within,.pretend-focus){z-index:1;position:relative}.nav-link>svg{width:1.4em;height:1.4em;-ms-flex-negative:0;flex-shrink:0}.nav-link>span{-ms-flex-negative:1;flex-shrink:1}.no-list{list-style:none;padding-left:0;margin-top:0;margin-bottom:0}*,:host,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host{font-family:"Frutiger Neue For Post",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}button{font:inherit;padding:0}a,button{border-radius:4px;outline:none;outline-offset:2px}a:is(:focus-visible,:focus-within,.pretend-focus),button:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color);border-radius:4px}img,svg{max-width:100%;max-height:100%}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){svg{color:currentColor;forced-color-adjust:preserve-parent-color}}.box>*:first-child{margin-top:0}.box>*:last-child{margin-bottom:0}.mirrored{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.bold{font-weight:700}.light{font-weight:300}.d-none{display:none !important}.d-flex{display:-ms-flexbox;display:flex}.d-inline-flex{display:-ms-inline-flexbox;display:inline-flex}.align-items-center{-ms-flex-align:center;align-items:center}@media (min-width: 1441px){.wide-container{margin:0 auto;max-width:1440px}}@media (max-width: 599.98px){.container{padding-right:16px;padding-left:16px}}@media (min-width: 600px)and (max-width: 1023.98px){.container{padding-right:32px;padding-left:32px}}@media (min-width: 1024px){.container{padding-right:40px;padding-left:40px}}@media (max-width: -0.02px){.hidden-xs{display:none}}@media (max-width: 399.98px){.hidden-sm{display:none}}@media (max-width: 599.98px){.hidden-rg{display:none}}@media (max-width: 779.98px){.hidden-md{display:none}}@media (max-width: 1023.98px){.hidden-lg{display:none}}@media (max-width: 1279.98px){.hidden-xl{display:none}}@media (max-width: 1439.98px){.hidden-xxl{display:none}}:host{--logo-scale:1}@media (max-width: 1023.98px){:host{--logo-scale:1 !important}}post-header-logo{height:var(--header-height);width:var(--header-height);-webkit-transform-origin:bottom left;transform-origin:bottom left;-webkit-transform:scale(var(--logo-scale));transform:scale(var(--logo-scale))}post-main-navigation{margin-left:calc(var(--header-height)*var(--logo-scale) - var(--header-height))}:host{display:block;position:relative;font-size:1rem;font-weight:300;z-index:var(--header-z-index, 10);--language-dropdown-margin-top:0px;--meta-header-height:var(--post-meta-header-height, 0px);--header-height:var(--post-header-height, 3.5rem)}@media (min-width: 1024px){:host{--meta-header-height:var(--post-meta-header-height, 3rem)}}@media (min-width: 1024px){:host{--header-height:var(--post-header-height, 4rem)}}@media (min-width: 1280px){:host{--header-height:var(--post-header-height, 4.5rem)}}:host([meta=false]){--meta-header-height:0px;--language-dropdown-margin-top:1px}@supports ((position: -webkit-sticky) or (position: sticky)){:host(:not(.stickyness-none)){position:-webkit-sticky;position:sticky}:host(.stickyness-full){top:0}:host(.stickyness-main){top:calc(var(--meta-header-height, 0px)*-1)}:host(.stickyness-minimal){top:calc((var(--header-height, 0px) + var(--meta-header-height, 0px) + 1px)*-1);-webkit-transition:top 200ms ease-in;transition:top 200ms ease-in}:host(.stickyness-minimal.scrolling-up),:host(.stickyness-minimal.dropdown-open){top:calc(var(--meta-header-height, 0px)*-1);--header-slide-in-transition:var(--post-header-slide-in-transition, top 200ms ease-out);-webkit-transition:var(--header-slide-in-transition);transition:var(--header-slide-in-transition)}}.post-internet-header{border-bottom:1px solid #e6e6e6;background-color:#fff}.main-navigation-container{display:-ms-flexbox;display:flex}.main-navigation-container>.main-navigation-controls{-ms-flex:0 1 auto;flex:0 1 auto}.main-navigation{display:-ms-flexbox;display:flex}.sub-navigation-container{position:absolute;top:100%;left:0;width:100%;display:-ms-flexbox;display:flex;background:#fff;visibility:hidden}.main-navigation-item:hover .sub-navigation-container{visibility:visible}.main-navigation-controls{display:-ms-flexbox;display:flex;margin-left:auto}@media (max-width: 1023.98px){.main-navigation-controls{font-weight:400}}@media (min-width: 1024px){.main-navigation-controls{font-size:1.0625rem}}.main-navigation-controls>*{border-left:1px solid #e6e6e6;-ms-flex:0 0 auto;flex:0 0 auto}.main-navigation-custom-content{max-height:var(--header-height);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-negative:1;flex-shrink:1}.menu-button{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 calc(1rem - 1px);font-weight:300;cursor:pointer;border-left:1px solid #e6e6e6;-ms-flex-order:1;order:1}@media (min-width: 1024px){.menu-button{display:none}}@media (min-width: 600px)and (max-width: 1023.98px){.menu-button .visually-hidden{position:static;width:auto;height:auto;margin:auto;overflow:visible;clip:auto;visibility:visible;margin-right:.5rem}}.menu-button svg{width:1.5rem;height:1.5rem}.full-width .wide-container{max-width:none}';export{L as P}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,o){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function i(e){try{u(o.next(e))}catch(e){s(e)}}function r(e){try{u(o["throw"](e))}catch(e){s(e)}}function u(e){e.done?n(e.value):a(e.value).then(i,r)}u((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,a,s,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(e){return function(t){return u([e,t])}}function u(r){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(n=0)),n)try{if(o=1,a&&(s=r[0]&2?a["return"]:r[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,r[1])).done)return s;if(a=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;a=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){n.label=r[1];break}if(r[0]===6&&n.label<s[1]){n.label=s[1];s=r;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(r);break}if(s[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];a=0}finally{o=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-5600adca.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var n,o,a;return{setters:[function(t){n=t.p;o=t.b;e("setNonce",t.s)},function(e){a=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return n(o)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,a()];case 1:e.sent();return[2,o([["p-5bdc0fce.system",[[1,"swisspost-internet-header",{project:[1],stickyness:[1],language:[1],meta:[4],login:[4],search:[4],skiplinks:[4],configProxy:[1,"config-proxy"],environment:[1],languageSwitchOverrides:[1,"language-switch-overrides"],customConfig:[1,"custom-config"],languageCookieKey:[1,"language-cookie-key"],languageLocalStorageKey:[1,"language-local-storage-key"],logoutUrl:[1,"logout-url"],activeRoute:[8,"active-route"],osFlyoutOverrides:[1,"os-flyout-overrides"],fullWidth:[4,"full-width"],activeFlyout:[32],activeDropdownElement:[32],isMainSlotEmpty:[32],getCurrentLanguage:[64]},[[0,"languageChanged","handleLanguageChangeEvent"]],{language:["handleLanguageChange"],languageSwitchOverrides:["handleAvailableLanguagesChange"],osFlyoutOverrides:["handleOsFlyoutOverrides"],activeRoute:["handleActiveRouteChange"],customConfig:["handleCustomConfigChange"],search:["handleSearchChange"],login:["handleLoginChange"],meta:["handleMetaChange"],stickyness:["handleStickynessChange"]}]]],["p-3834b7b4.system",[[1,"swisspost-internet-breadcrumbs",{customItems:[1,"custom-items"],hideButtons:[4,"hide-buttons"],customBreadcrumbItems:[32],overlayVisible:[32],isConcatenated:[32],dropdownOpen:[32],refsReady:[32],toggleOverlayById:[64]},null,{customItems:["handleCustomConfigChange"]}]]],["p-6167a58f.system",[[1,"swisspost-internet-footer",{liveSupportEnabled:[32],cookieSettingsEnabled:[32]}]]],["p-5e6812b4.system",[[1,"post-search",{searchDropdownOpen:[32],coveoSuggestions:[32],placeSuggestions:[32],parcelSuggestion:[32],toggleDropdown:[64],setFocus:[64]}]]],["p-d0cf8862.system",[[1,"post-klp-login-widget",{logoutUrl:[1,"logout-url"],setFocus:[64]}]]],["p-b909b77e.system",[[1,"post-language-switch",{mode:[1],langSwitchOpen:[32],toggleDropdown:[64]}]]],["p-4e4670a6.system",[[1,"post-logo"]]],["p-22a39458.system",[[1,"post-main-navigation",{activeFlyout:[32],mobileMenuOpen:[32],toggleDropdown:[64],setFocus:[64],setActiveFlyout:[64]}]]],["p-f3643368.system",[[1,"post-meta-navigation",{orientation:[1],fullWidth:[4,"full-width"]}]]],["p-dcf62885.system",[[0,"post-skiplinks"]]],["p-4d5bddc5.system",[[4,"focus-trap",{active:[4],trap:[32]},null,{active:["handleActiveChange"]}]]]],t)]}}))}))}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,o){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function i(e){try{u(o.next(e))}catch(e){s(e)}}function r(e){try{u(o["throw"](e))}catch(e){s(e)}}function u(e){e.done?n(e.value):a(e.value).then(i,r)}u((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,a,s,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(e){return function(t){return u([e,t])}}function u(r){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(n=0)),n)try{if(o=1,a&&(s=r[0]&2?a["return"]:r[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,r[1])).done)return s;if(a=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;a=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){n.label=r[1];break}if(r[0]===6&&n.label<s[1]){n.label=s[1];s=r;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(r);break}if(s[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];a=0}finally{o=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-5600adca.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var n,o,a;return{setters:[function(t){n=t.p;o=t.b;e("setNonce",t.s)},function(e){a=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return n(o)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,a()];case 1:e.sent();return[2,o([["p-132b1973.system",[[1,"swisspost-internet-header",{project:[1],stickyness:[1],language:[1],meta:[4],login:[4],search:[4],skiplinks:[4],configProxy:[1,"config-proxy"],environment:[1],languageSwitchOverrides:[1,"language-switch-overrides"],customConfig:[1,"custom-config"],languageCookieKey:[1,"language-cookie-key"],languageLocalStorageKey:[1,"language-local-storage-key"],logoutUrl:[1,"logout-url"],activeRoute:[8,"active-route"],osFlyoutOverrides:[1,"os-flyout-overrides"],fullWidth:[4,"full-width"],activeFlyout:[32],activeDropdownElement:[32],isMainSlotEmpty:[32],getCurrentLanguage:[64]},[[0,"languageChanged","handleLanguageChangeEvent"]],{language:["handleLanguageChange"],languageSwitchOverrides:["handleAvailableLanguagesChange"],osFlyoutOverrides:["handleOsFlyoutOverrides"],activeRoute:["handleActiveRouteChange"],customConfig:["handleCustomConfigChange"],search:["handleSearchChange"],login:["handleLoginChange"],meta:["handleMetaChange"],stickyness:["handleStickynessChange"]}]]],["p-3834b7b4.system",[[1,"swisspost-internet-breadcrumbs",{customItems:[1,"custom-items"],hideButtons:[4,"hide-buttons"],customBreadcrumbItems:[32],overlayVisible:[32],isConcatenated:[32],dropdownOpen:[32],refsReady:[32],toggleOverlayById:[64]},null,{customItems:["handleCustomConfigChange"]}]]],["p-6167a58f.system",[[1,"swisspost-internet-footer",{liveSupportEnabled:[32],cookieSettingsEnabled:[32]}]]],["p-5e6812b4.system",[[1,"post-search",{searchDropdownOpen:[32],coveoSuggestions:[32],placeSuggestions:[32],parcelSuggestion:[32],toggleDropdown:[64],setFocus:[64]}]]],["p-c76ce6e7.system",[[1,"post-header-logo"]]],["p-d0cf8862.system",[[1,"post-klp-login-widget",{logoutUrl:[1,"logout-url"],setFocus:[64]}]]],["p-b909b77e.system",[[1,"post-language-switch",{mode:[1],langSwitchOpen:[32],toggleDropdown:[64]}]]],["p-22a39458.system",[[1,"post-main-navigation",{activeFlyout:[32],mobileMenuOpen:[32],toggleDropdown:[64],setFocus:[64],setActiveFlyout:[64]}]]],["p-f3643368.system",[[1,"post-meta-navigation",{orientation:[1],fullWidth:[4,"full-width"]}]]],["p-dcf62885.system",[[0,"post-skiplinks"]]],["p-4d5bddc5.system",[[4,"focus-trap",{active:[4],trap:[32]},null,{active:["handleActiveChange"]}]]]],t)]}}))}))}))}}}));
@@ -0,0 +1 @@
1
+ export{P as post_header_logo}from"./p-8f8d8912.js";import"./p-67f6b5a8.js";import"./p-13453cb0.js";
@@ -1 +1 @@
1
- System.register(["./p-2398bfbf.system.js","./p-9d82919a.system.js","./p-8882d096.system.js","./p-aa1d92aa.system.js","./p-577a6423.system.js","./p-52ad8934.system.js","./p-793de0f0.system.js","./p-dd441f54.system.js","./p-98e6a60a.system.js","./p-33ca3140.system.js","./p-5600adca.system.js","./p-abf306bd.system.js","./p-b62fafd2.system.js","./p-7b27bee6.system.js","./p-d7e221af.system.js","./p-f52d7dcb.system.js","./p-812782e0.system.js","./p-1fd8561a.system.js","./p-b3014611.system.js","./p-06f51515.system.js"],(function(s){"use strict";return{setters:[function(t){s("PostInternetHeader",t.P)},function(t){s("PostInternetBreadcrumbs",t.P)},function(t){s("PostInternetFooter",t.P)},function(t){s("PostSkiplinks",t.P)},function(t){s("PostMetaNavigation",t.P)},function(t){s("PostLanguageSwitch",t.P)},function(t){s("PostLogo",t.P)},function(t){s("PostMainNavigation",t.P)},function(t){s("PostSearch",t.P)},function(t){s("PostKlpLoginWidget",t.P)},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){}}}));
1
+ System.register(["./p-c4957ff7.system.js","./p-9d82919a.system.js","./p-8882d096.system.js","./p-aa1d92aa.system.js","./p-577a6423.system.js","./p-52ad8934.system.js","./p-9730e79d.system.js","./p-dd441f54.system.js","./p-98e6a60a.system.js","./p-33ca3140.system.js","./p-5600adca.system.js","./p-abf306bd.system.js","./p-b62fafd2.system.js","./p-7b27bee6.system.js","./p-d7e221af.system.js","./p-f52d7dcb.system.js","./p-812782e0.system.js","./p-1fd8561a.system.js","./p-b3014611.system.js","./p-06f51515.system.js"],(function(s){"use strict";return{setters:[function(t){s("PostInternetHeader",t.P)},function(t){s("PostInternetBreadcrumbs",t.P)},function(t){s("PostInternetFooter",t.P)},function(t){s("PostSkiplinks",t.P)},function(t){s("PostMetaNavigation",t.P)},function(t){s("PostLanguageSwitch",t.P)},function(t){s("PostLogo",t.P)},function(t){s("PostMainNavigation",t.P)},function(t){s("PostSearch",t.P)},function(t){s("PostKlpLoginWidget",t.P)},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n["throw"](t))}catch(t){o(t)}}function l(t){t.done?i(t.value):r(t.value).then(s,a)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var n=0,r=e.length,o;n<r;n++){if(o||!(n in e)){if(!o)o=Array.prototype.slice.call(e,0,n);o[n]=e[n]}}return t.concat(o||Array.prototype.slice.call(e))};System.register(["./p-5600adca.system.js","./p-abf306bd.system.js","./p-b62fafd2.system.js","./p-d7e221af.system.js","./p-7b27bee6.system.js","./p-f52d7dcb.system.js","./p-812782e0.system.js","./p-1fd8561a.system.js"],(function(t){"use strict";var e,i,n,r,o,s,a,l,u,c,f,d,h,p,g,v;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;o=t.g},function(t){s=t.d;a=t.t},function(t){l=t.g;u=t.p;c=t.t},function(t){f=t.u},function(t){d=t.s;h=t.d},function(t){p=t.S},function(t){g=t.S},function(t){v=t.I}],execute:function(){var m=this;var b=function(t,e){if(e===false){return t}var i;t=x(t);if(e==="auto"||e==="exact"){if(w(t)){return y(t)}i=new URL(window.location.href)}else{try{i=new URL(e,document.location.origin)}catch(i){console.warn("Active Route: ".concat(e," is not a valid URL. Navigation highlighting has been disabled."));return t}}var n=k(t,i,e);if(n.length===0){return t}var r=n[0];r.main.isActiveOverride=true;if(r.sub)r.sub.isActiveOverride=true;return t};var w=function(t){return t.filter((function(t){return t.isActive})).length>0};var y=function(t){return t.map((function(t){return Object.assign(Object.assign({},t),{isActiveOverride:t.isActive,flyout:t.flyout.map((function(t){return Object.assign(Object.assign({},t),{linkList:t.linkList.map((function(t){return Object.assign(Object.assign({},t),{isActiveOverride:t.isActive})}))})}))})}))};var x=function(t){return t.map((function(t){return Object.assign(Object.assign({},t),{isActiveOverride:false,flyout:t.flyout.map((function(t){return Object.assign(Object.assign({},t),{linkList:t.linkList.map((function(t){return Object.assign(Object.assign({},t),{isActiveOverride:false})}))})}))})}))};var k=function(t,e,i){var n=false;var r=[];t.filter((function(t){return!n&&t})).forEach((function(t){try{var o=_(e,new URL(t.url),i);n=j(r,o,{main:t,score:o},n)}catch(t){}t.flyout.forEach((function(o){var s;(s=o.linkList)===null||s===void 0?void 0:s.forEach((function(o){if(o.isActive&&(i==="auto"||i==="exact")){n=true;return}try{var s=new URL(o.url);var a=_(e,s,i);n=j(r,a,{main:t,sub:o,score:a},n)}catch(t){}}))}))}));return r.sort((function(t,e){return e.score-t.score}))};function j(t,e,i,n){var r=n;if(e>0){if(e===Infinity)r=true;t.push(i)}return r}var _=function(t,e,i){if(t===null||e===null||t.origin!==e.origin){return 0}var n=t.pathname.toLocaleLowerCase();var r=e.pathname.toLocaleLowerCase();if(n===r){return Infinity}if(t.pathname.length<e.pathname.length){return 0}if(i==="auto"){var o=__spreadArray([t.origin.toLocaleLowerCase()],n.split("/").filter((function(t){return t!==null&&t!==""})),true);var s=__spreadArray([e.origin.toLocaleLowerCase()],r.split("/").filter((function(t){return t!==null&&t!==""})),true);var a=O(o,s);return Math.min(o.length,s.length)===a?a:0}return 0};var O=function(t,e){if(t==null||e==null||t.length===0||e.length===0){return 0}var i=0;for(;i<Math.min(t.length,e.length);i++){if(t[i]!==e[i]){return 0}}return i};var F=null;var N=null;var P=function(){var t=document.querySelector("#PPM_HEADER_DATA");if((t===null||t===void 0?void 0:t.textContent)!=null){return JSON.parse(t.textContent)}return null};var C=function(t){return __awaiter(m,[t],void 0,(function(t){var e,i,n,r,o,s,a;var c=t.projectId,f=t.environment,d=t.language,h=t.cookieKey,p=t.localStorageKey,g=t.activeRouteProp,v=t.localizedCustomConfig,m=t.osFlyoutOverrides;return __generator(this,(function(t){switch(t.label){case 0:n=P();o=null;if(!n)return[3,1];r=n;s=document.documentElement.lang;return[3,3];case 1:if(F==null){F=S(c,f)}return[4,F];case 2:o=t.sent();s=l(Object.keys(o),d,p,h);if(s===undefined){throw new Error("Internet Header: unable to determine current language")}r=Object.assign({},o[s]);t.label=3;case 3:if(v){a=((e=v===null||v===void 0?void 0:v.header)===null||e===void 0?void 0:e.navMain)?Object.assign(Object.assign({},r.header),{navMain:__spreadArray(__spreadArray([],r.header.navMain,true),v.header.navMain,true)}):r.header;r=Object.assign(Object.assign({},r),{header:a})}if(m)r.header.navMain=A(r,m);if(g!=null)r.header.navMain=b(r.header.navMain,g);L((i=r===null||r===void 0?void 0:r.header)===null||i===void 0?void 0:i.navMain);u(s,h,p);return[2,r]}}))}))};var A=function(t,e){if(e==null)return t.header.navMain;return t.header.navMain.map((function(t){var i,n;if(t.id!=="flyout_os")return t;if(N===null){N=JSON.parse(JSON.stringify(t))}var r=(i=e.text)!==null&&i!==void 0?i:N.text;var o=(n=e.title)!==null&&n!==void 0?n:N.title;if(N.flyout==null||N.flyout.length===0||e.flyout==null||e.flyout.length===0)return Object.assign(Object.assign({},t),{title:o,text:r});var s=__spreadArray(__spreadArray([],N.flyout.map((function(t,i){var n;var r=e.flyout[i];var o=(n=r.title)!==null&&n!==void 0?n:t.title;var s=r.linkList!=null?e.flyout[i].linkList:[];return{title:o,linkList:__spreadArray(__spreadArray([],t.linkList,true),s,true)}})),true),e.flyout.slice(N.flyout.length),true);return Object.assign(Object.assign({},t),{text:r,title:o,flyout:s})}))};var S=function(t,e){return __awaiter(m,void 0,void 0,(function(){var i,n,r;return __generator(this,(function(o){switch(o.label){case 0:if(!z(t)){throw new Error('Internet Header: invalid project id "'.concat(t,'"'))}if(t==="test"){e="int01"}i=I(t,e);o.label=1;case 1:o.trys.push([1,4,,5]);return[4,fetch(i)];case 2:n=o.sent();return[4,n.json()];case 3:return[2,o.sent()];case 4:r=o.sent();throw new Error("Internet Header: fetching config failed. ".concat(r.message));case 5:return[2]}}))}))};var I=function(t,e){if(t==="test")return"assets/config/test-configuration.json";var i=e.toLowerCase();var n=i==="prod";var r="https://".concat(n?"www":"int",".post.ch");try{return new URL("".concat(r,"/api/headerjs/Json?serviceid=").concat(encodeURIComponent(t)).concat(!n?"&environment="+i:"")).toString()}catch(t){throw new Error("Internet Header: Config URL is invalid.")}};var z=function(t){return t!==""&&t.length>0&&/^[a-zA-Z][\w-]*[a-zA-Z0-9]$/.test(t)};var R=function(t,e){var i;var n;try{n=typeof t==="string"?JSON.parse(t):t}catch(t){throw new Error("Internet Header: Custom config is invalid. Make sure your custom config contains valid JSON syntax and matches the definition. ")}var r=n[e];if((i=r===null||r===void 0?void 0:r.header)===null||i===void 0?void 0:i.navMain)L(r.header.navMain);return r};var L=function(t){t.forEach((function(t){t.id=t.id==="flyout_os"?t.id:f("main-nav-")}))};var E="@swisspost/internet-header";var T="1.14.4";var W="The header for client facing applications.";var H="Swiss Post <design-system@post.ch>";var J="Apache-2.0";var K={type:"git",url:"https://github.com/swisspost/design-system.git"};var M="https://design-system.post.ch";var D={url:"https://github.com/swisspost/design-system/issues"};var U="loader/index.cjs.js";var B="loader/index.js";var G="loader/index.es2017.js";var q="loader/index.d.ts";var V="dist/collection/collection-manifest.json";var X="dist/swisspost-internet-header/swisspost-internet-header.esm.js";var Z={access:"public"};var Y=["dist/","loader/"];var $={dev:"stencil build --serve --port 9310 --watch --docs-readme --dev --config stencil.config.dev.ts",start:"stencil build --watch --docs-readme",build:"stencil build --docs-readme",clean:"rimraf www dist loader",test:"pnpm run unit",unit:"jest","unit:watch":"jest --watch",e2e:"cypress run","e2e:ci":"xvfb-run -a cypress run","e2e:watch":"cypress open",lint:"eslint src/**/*{.ts,.tsx}","lint:fix":"eslint src/**/*{.ts,.tsx} --fix",generate:"stencil generate"};var Q={"@swisspost/design-system-styles":"workspace:8.1.0","body-scroll-lock":"4.0.0-beta.0","iframe-resizer":"4.4.5",jquery:"3.7.1","throttle-debounce":"5.0.2","url-polyfill":"1.1.12"};var tt={"@babel/core":"7.24.9","@percy/cli":"1.29.0","@percy/cypress":"3.1.2","@stencil-community/eslint-plugin":"0.7.2","@stencil/core":"4.19.2","@stencil/sass":"3.0.12","@stencil/store":"2.0.16","@types/body-scroll-lock":"3.1.2","@types/iframe-resizer":"3.5.13","@types/jest":"29.5.12","@types/jquery":"3.5.30","@types/node":"20.14.12","@types/throttle-debounce":"5.0.2","babel-loader":"9.1.3",bootstrap:"5.3.3",cypress:"13.13.1","cypress-each":"1.14.0","cypress-storybook":"1.0.0",eslint:"8.57.0","eslint-plugin-react":"7.35.0","focus-trap":"7.5.4",globby:"14.0.2",jest:"29.7.0","jest-environment-jsdom":"29.7.0",rimraf:"6.0.1","rollup-plugin-node-polyfills":"0.2.1","rollup-plugin-scss":"4.0.0","rollup-plugin-visualizer":"5.12.0",sass:"1.77.8","start-server-and-test":"2.0.4","ts-jest":"29.2.3",typescript:"5.5.4"};var et=["components","web-components","header","stencil","design-system","ui","frontend"];var it={name:E,version:T,description:W,author:H,license:J,repository:K,homepage:M,bugs:D,main:U,module:B,es2017:G,types:q,collection:V,"collection:main":"dist/collection/index.js",unpkg:X,publishConfig:Z,files:Y,scripts:$,dependencies:Q,devDependencies:tt,keywords:et};var nt=function(t){if(!(t instanceof HTMLElement||t instanceof SVGElement)){return false}var e=getComputedStyle(t);return["overflow","overflow-x","overflow-y"].some((function(t){var i=e.getPropertyValue(t);return i==="auto"||i==="scroll"}))};var rt=function(t){var e=t.parentElement;while(e){if(e.nodeName==="BODY"){return document}if(nt(e)){return e}e=e.parentElement}return document};var ot=function(t,e){var i=rt(t);var n=i instanceof Element?i.scrollTop:i.documentElement.scrollTop;var r=d.stickyness==="full"?0:n;var o,s;if(e){o=t.clientHeight-1;s=e.clientHeight}else{var a=window.getComputedStyle(t);var l=parseFloat(a.getPropertyValue("font-size"));s=parseFloat(a.getPropertyValue("--meta-header-height"))*l;o=s+parseFloat(a.getPropertyValue("--header-height"))*l}var u=1;if(s>0){u=Math.max((o-Math.max(r,0))/(o-s),1)}return u.toString()};var st=function(t,e){var i=rt(e);var n=function(){e.style.setProperty("--logo-scale",ot(e,t))};var r=s(150,n);var o=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting&&t.intersectionRatio>0){i.addEventListener("scroll",n,{passive:true});window.addEventListener("resize",r);window.requestAnimationFrame(n)}else{i.removeEventListener("scroll",n);window.removeEventListener("resize",r);window.requestAnimationFrame(n)}}))}),{threshold:[0,.001]});o.observe(t);return n};var at=':host{--post-contrast-color:#000;--post-focus-color:#1976c8;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-white:#fff;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-black:#000;--post-primary:hsl(0, 0%, 20%);--post-secondary:hsl(0, 0%, 40%);--post-success:#2c871d;--post-warning:#f49e00;--post-error:#a51728;--post-info:#cce4ee;--post-success-background:#c0debb;--post-warning-background:#fce2b2;--post-error-background:#ffdade;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-black-alpha-10-rgba:rgba(0, 0, 0, 0.1);--post-black-alpha-20-rgba:rgba(0, 0, 0, 0.2);--post-black-alpha-40-rgba:rgba(0, 0, 0, 0.4);--post-black-alpha-60-rgba:rgba(0, 0, 0, 0.6);--post-black-alpha-80-rgba:rgba(0, 0, 0, 0.8);--post-white-alpha-10-rgba:rgba(255, 255, 255, 0.1);--post-white-alpha-20-rgba:rgba(255, 255, 255, 0.2);--post-white-alpha-40-rgba:rgba(255, 255, 255, 0.4);--post-white-alpha-60-rgba:rgba(255, 255, 255, 0.6);--post-white-alpha-80-rgba:rgba(255, 255, 255, 0.8);--post-yellow-rgb:255, 204, 0;--post-white-rgb:255, 255, 255;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-black-rgb:0, 0, 0;--post-primary-rgb:51, 51, 51;--post-secondary-rgb:102, 102, 102;--post-success-rgb:44, 135, 29;--post-warning-rgb:244, 158, 0;--post-error-rgb:165, 23, 40;--post-info-rgb:204, 228, 238;--post-success-background-rgb:192, 222, 187;--post-warning-background-rgb:252, 226, 178;--post-error-background-rgb:255, 218, 222;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:700;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:700;font-style:italic;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:400;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:400;font-style:italic;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:300;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:300;font-style:italic;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")}.visually-hidden{position:absolute;width:1px;height:1px;border:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0)}.btn-blank{background-color:rgba(0,0,0,0);border:none;border-radius:0;padding:0}.nav-link{outline:none;outline-offset:2px;text-decoration:none;color:rgba(0,0,0,.8);-webkit-transition:color 200ms;transition:color 200ms;background-color:rgba(0,0,0,0);-webkit-box-shadow:none;box-shadow:none;border:0;margin:0;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:.5rem}.nav-link:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.nav-link:hover,.nav-link:focus{color:#000}.nav-link:is(:focus-visible,:focus-within,.pretend-focus){z-index:1;position:relative}.nav-link>svg{width:1.4em;height:1.4em;-ms-flex-negative:0;flex-shrink:0}.nav-link>span{-ms-flex-negative:1;flex-shrink:1}.no-list{list-style:none;padding-left:0;margin-top:0;margin-bottom:0}*,:host,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host{font-family:"Frutiger Neue For Post",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}button{font:inherit;padding:0}a,button{border-radius:4px;outline:none;outline-offset:2px}a:is(:focus-visible,:focus-within,.pretend-focus),button:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color);border-radius:4px}img,svg{max-width:100%;max-height:100%}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){svg{color:currentColor;forced-color-adjust:preserve-parent-color}}.box>*:first-child{margin-top:0}.box>*:last-child{margin-bottom:0}.mirrored{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.bold{font-weight:700}.light{font-weight:300}.d-none{display:none !important}.d-flex{display:-ms-flexbox;display:flex}.d-inline-flex{display:-ms-inline-flexbox;display:inline-flex}.align-items-center{-ms-flex-align:center;align-items:center}@media (min-width: 1441px){.wide-container{margin:0 auto;max-width:1440px}}@media (max-width: 599.98px){.container{padding-right:16px;padding-left:16px}}@media (min-width: 600px)and (max-width: 1023.98px){.container{padding-right:32px;padding-left:32px}}@media (min-width: 1024px){.container{padding-right:40px;padding-left:40px}}@media (max-width: -0.02px){.hidden-xs{display:none}}@media (max-width: 399.98px){.hidden-sm{display:none}}@media (max-width: 599.98px){.hidden-rg{display:none}}@media (max-width: 779.98px){.hidden-md{display:none}}@media (max-width: 1023.98px){.hidden-lg{display:none}}@media (max-width: 1279.98px){.hidden-xl{display:none}}@media (max-width: 1439.98px){.hidden-xxl{display:none}}:host{--logo-scale:1}@media (max-width: 1023.98px){:host{--logo-scale:1 !important}}post-logo{height:var(--header-height);width:var(--header-height);-webkit-transform-origin:bottom left;transform-origin:bottom left;-webkit-transform:scale(var(--logo-scale));transform:scale(var(--logo-scale))}post-main-navigation{margin-left:calc(var(--header-height)*var(--logo-scale) - var(--header-height))}:host{display:block;position:relative;font-size:1rem;font-weight:300;z-index:var(--header-z-index, 10);--language-dropdown-margin-top:0px;--meta-header-height:var(--post-meta-header-height, 0px);--header-height:var(--post-header-height, 3.5rem)}@media (min-width: 1024px){:host{--meta-header-height:var(--post-meta-header-height, 3rem)}}@media (min-width: 1024px){:host{--header-height:var(--post-header-height, 4rem)}}@media (min-width: 1280px){:host{--header-height:var(--post-header-height, 4.5rem)}}:host([meta=false]){--meta-header-height:0px;--language-dropdown-margin-top:1px}@supports ((position: -webkit-sticky) or (position: sticky)){:host(:not(.stickyness-none)){position:-webkit-sticky;position:sticky}:host(.stickyness-full){top:0}:host(.stickyness-main){top:calc(var(--meta-header-height, 0px)*-1)}:host(.stickyness-minimal){top:calc((var(--header-height, 0px) + var(--meta-header-height, 0px) + 1px)*-1);-webkit-transition:top 200ms ease-in;transition:top 200ms ease-in}:host(.stickyness-minimal.scrolling-up),:host(.stickyness-minimal.dropdown-open){top:calc(var(--meta-header-height, 0px)*-1);--header-slide-in-transition:var(--post-header-slide-in-transition, top 200ms ease-out);-webkit-transition:var(--header-slide-in-transition);transition:var(--header-slide-in-transition)}}.post-internet-header{border-bottom:1px solid #e6e6e6;background-color:#fff}.main-navigation-container{display:-ms-flexbox;display:flex}.main-navigation-container>.main-navigation-controls{-ms-flex:0 1 auto;flex:0 1 auto}.main-navigation{display:-ms-flexbox;display:flex}.sub-navigation-container{position:absolute;top:100%;left:0;width:100%;display:-ms-flexbox;display:flex;background:#fff;visibility:hidden}.main-navigation-item:hover .sub-navigation-container{visibility:visible}.main-navigation-controls{display:-ms-flexbox;display:flex;margin-left:auto}@media (max-width: 1023.98px){.main-navigation-controls{font-weight:400}}@media (min-width: 1024px){.main-navigation-controls{font-size:1.0625rem}}.main-navigation-controls>*{border-left:1px solid #e6e6e6;-ms-flex:0 0 auto;flex:0 0 auto}.main-navigation-custom-content{max-height:var(--header-height);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-negative:1;flex-shrink:1}.menu-button{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 calc(1rem - 1px);font-weight:300;cursor:pointer;border-left:1px solid #e6e6e6;-ms-flex-order:1;order:1}@media (min-width: 1024px){.menu-button{display:none}}@media (min-width: 600px)and (max-width: 1023.98px){.menu-button .visually-hidden{position:static;width:auto;height:auto;margin:auto;overflow:visible;clip:auto;visibility:visible;margin-right:.5rem}}.menu-button svg{width:1.5rem;height:1.5rem}.full-width .wide-container{max-width:none}';var lt=at;var ut=t("P",function(){function t(t){e(this,t);this.headerLoaded=i(this,"headerLoaded",7);this.lastScrollTop=window.scrollY||document.documentElement.scrollTop;this.lastWindowWidth=window.innerWidth;this.handleClickOutsideBound=this.handleClickOutside.bind(this);this.project=undefined;this.stickyness="minimal";this.language=undefined;this.meta=true;this.login=true;this.search=true;this.skiplinks=true;this.configProxy=undefined;this.environment="prod";this.languageSwitchOverrides=undefined;this.customConfig=undefined;this.languageCookieKey=undefined;this.languageLocalStorageKey="swisspost-internet-header-language";this.logoutUrl=undefined;this.activeRoute="auto";this.osFlyoutOverrides=undefined;this.fullWidth=false;this.activeFlyout=null;this.activeDropdownElement=null;this.isMainSlotEmpty=true;if(this.project===undefined||this.project===""||!z(this.project)){throw new Error('Internet Header project key is "'.concat(this.project,'". Please provide a valid project key.'))}}t.prototype.getCurrentLanguage=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){return[2,(t=d.currentLanguage)!==null&&t!==void 0?t:"de"]}))}))};t.prototype.connectedCallback=function(){var t=this;this.throttledScroll=a(300,(function(){return t.handleScrollEvent()}));this.debouncedResize=s(200,(function(){return t.handleResize()}))};t.prototype.disconnectedCallback=function(){this.scrollParent.removeEventListener("scroll",this.throttledScroll);this.scrollParent.removeEventListener("resize",this.debouncedResize);h()};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,n;return __generator(this,(function(r){switch(r.label){case 0:this.scrollParent=rt(this.host);this.scrollParent.addEventListener("scroll",this.throttledScroll,{passive:true});this.scrollParent.addEventListener("resize",this.debouncedResize,{passive:true});r.label=1;case 1:r.trys.push([1,3,,4]);d.projectId=this.project;d.stickyness=this.stickyness;d.environment=this.environment.toLocaleLowerCase();if(this.language!==undefined)d.currentLanguage=this.language;d.languageSwitchOverrides=typeof this.languageSwitchOverrides==="string"?JSON.parse(this.languageSwitchOverrides):this.languageSwitchOverrides;d.osFlyoutOverrides=typeof this.osFlyoutOverrides==="string"?JSON.parse(this.osFlyoutOverrides):this.osFlyoutOverrides;if(this.customConfig!==undefined){t=Object.keys(typeof this.customConfig==="string"?JSON.parse(this.customConfig):this.customConfig);e=d.currentLanguage||l(t,this.language);d.localizedCustomConfig=R(this.customConfig,e)}i=d;return[4,C({projectId:this.project,environment:d.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:d.localizedCustomConfig,osFlyoutOverrides:d.osFlyoutOverrides})];case 2:i.localizedConfig=r.sent();return[3,4];case 3:n=r.sent();console.error(n);return[3,4];case 4:return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;window.requestAnimationFrame((function(){t.handleResize();t.headerLoaded.emit();t.host.classList.add("header-loaded");if(t.meta&&t.metaNav){t.updateLogoAnimation=st(t.metaNav,t.host)}else{var e=window.getComputedStyle(document.documentElement);if(e.getPropertyValue("--post-meta-header-height")!==""){document.documentElement.style.setProperty("--post-meta-header-height","0px")}}}));if(this.stickyness==="full")console.warn('Internet Header: The stickyness="full" option is deprecated.')};t.prototype.handleLanguageChange=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:d.currentLanguage=t;e=d;return[4,C({projectId:this.project,environment:this.environment,language:t,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:d.localizedCustomConfig,osFlyoutOverrides:d.osFlyoutOverrides})];case 1:e.localizedConfig=i.sent();if(this.customConfig!==undefined)d.localizedCustomConfig=R(this.customConfig,t);return[2]}}))}))};t.prototype.handleAvailableLanguagesChange=function(t){d.languageSwitchOverrides=typeof t==="string"?JSON.parse(t):t};t.prototype.handleOsFlyoutOverrides=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:d.osFlyoutOverrides=typeof t==="string"?JSON.parse(t):t;e=d;return[4,C({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:d.localizedCustomConfig,osFlyoutOverrides:d.osFlyoutOverrides})];case 1:e.localizedConfig=i.sent();return[2]}}))}))};t.prototype.handleActiveRouteChange=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:e=d;return[4,C({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:t,localizedCustomConfig:d.localizedCustomConfig,osFlyoutOverrides:d.osFlyoutOverrides})];case 1:e.localizedConfig=i.sent();return[2]}}))}))};t.prototype.handleCustomConfigChange=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){switch(n.label){case 0:if(this.language===undefined)return[2];e=R(t,this.language);d.localizedCustomConfig=e;i=d;return[4,C({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:e,osFlyoutOverrides:d.osFlyoutOverrides})];case 1:i.localizedConfig=n.sent();return[2]}}))}))};t.prototype.handleSearchChange=function(t){d.search=t};t.prototype.handleLoginChange=function(t){d.login=t};t.prototype.handleMetaChange=function(t){d.meta=t};t.prototype.handleLanguageChangeEvent=function(t){void this.handleLanguageChange(t.detail)};t.prototype.handleStickynessChange=function(t){d.stickyness=t;if(typeof this.updateLogoAnimation==="function")this.updateLogoAnimation()};t.prototype.handleClickOutside=function(t){if(this.activeDropdownElement&&!t.composedPath().includes(this.activeDropdownElement)){void this.activeDropdownElement.toggleDropdown(false)}};t.prototype.handleKeyUp=function(t){if(t.key==="Escape"){if(this.activeDropdownElement){void this.activeDropdownElement.toggleDropdown(false)}if(this.activeFlyout!==null&&this.mainNav){void this.mainNav.toggleDropdown(false)}}};t.prototype.handleScrollEvent=function(){var t=this.scrollParent instanceof Document?this.scrollParent.documentElement.scrollTop:this.scrollParent.scrollTop;if(this.stickyness==="minimal"){this.host.classList.toggle("scrolling-up",t<=this.lastScrollTop)}this.lastScrollTop=t<=0?0:t};t.prototype.handleResize=function(){var t;if(this.isMainNavOpen()&&this.lastWindowWidth<1024&&window.innerWidth>=1024){(t=this.activeDropdownElement)===null||t===void 0?void 0:t.toggleDropdown(false)}this.lastWindowWidth=window.innerWidth};t.prototype.handleDropdownToggled=function(t){var e=this;if(!t.detail.open&&this.activeDropdownElement!==t.detail.element){return}if(t.detail.open){if(this.activeDropdownElement){void this.activeDropdownElement.toggleDropdown(false)}this.activeDropdownElement=t.detail.element;if(window.innerWidth>=1024){window.setTimeout((function(){window.addEventListener("click",e.handleClickOutsideBound)}),10)}if(this.activeFlyout!==null&&this.mainNav){void this.mainNav.setActiveFlyout(null)}}else{this.activeDropdownElement=null;window.removeEventListener("click",this.handleClickOutsideBound)}};t.prototype.handleFlyoutToggled=function(t){this.activeFlyout=t.detail;if(this.activeDropdownElement&&t.detail!==null&&!this.isMainNavOpen()){void this.activeDropdownElement.toggleDropdown(false)}};t.prototype.toggleMobileDropdown=function(){var t;(t=this.mainNav)===null||t===void 0?void 0:t.toggleDropdown()};t.prototype.isMainNavOpen=function(){return this.activeDropdownElement&&this.activeDropdownElement.tagName==="POST-MAIN-NAVIGATION"};t.prototype.handleMainSlotChange=function(t){var e=t.target;this.isMainSlotEmpty=e.assignedElements().length===0};t.prototype.render=function(){var t=this;var e,i,o;if(!((e=d.localizedConfig)===null||e===void 0?void 0:e.header)){console.error(new Error("Internet Header: Config cannot be loaded"));return}var s=d.localizedConfig;var a=this.meta&&s.header.navMeta!==undefined&&((i=s.header.navMeta)===null||i===void 0?void 0:i.filter((function(t){return!t.isHomeLink})).length)>0;var l=((o=this.login)!==null&&o!==void 0?o:!s.header.isLoginWidgetHidden)&&s.header.loginWidgetOptions;var u=s.header.navLang.length>1;var f=a?ot(this.host):"1";return n(r,{class:"stickyness-".concat(this.stickyness," ").concat(Boolean(this.activeDropdownElement)||Boolean(this.activeFlyout)?"dropdown-open":""),"data-version":it.version,onKeyup:function(e){return t.handleKeyUp(e)},style:{"--logo-scale":f}},n("header",{class:"post-internet-header".concat(this.fullWidth?" full-width":"")},n(p,null),n("h1",{class:"visually-hidden"},c("Navigate on post.ch")),n(v,{condition:this.skiplinks},n("post-skiplinks",null)),n(v,{condition:a},n("post-meta-navigation",{orientation:"horizontal",class:"hidden-lg","full-width":this.fullWidth,ref:function(e){return t.metaNav=e}},n(v,{condition:u},n("post-language-switch",{id:"post-language-switch-desktop",mode:"dropdown",onDropdownToggled:function(e){return t.handleDropdownToggled(e)}})))),n("div",{class:"main-navigation-container wide-container"},n("post-logo",null),n("button",{class:"menu-button nav-link",onClick:function(){return t.toggleMobileDropdown()},"aria-haspopup":"menu","aria-controls":"post-internet-header-main-navigation","aria-expanded":this.activeDropdownElement?"true":"false"},n("span",{class:"menu-button-text visually-hidden"},s.header.mobileMenu.text),n(g,{name:this.isMainNavOpen()?"pi-close":"pi-menu"})),n("post-main-navigation",{onDropdownToggled:function(e){return t.handleDropdownToggled(e)},onFlyoutToggled:function(e){return t.handleFlyoutToggled(e)},ref:function(e){return t.mainNav=e}},n(v,{condition:a},n("post-meta-navigation",{orientation:"vertical"},n(v,{condition:u},n("post-language-switch",{id:"post-language-switch-mobile",mode:"list"}))))),n("div",{class:"main-navigation-controls"},n("div",{class:"main-navigation-custom-content".concat(this.isMainSlotEmpty?" d-none":"")},n("slot",{name:"main",onSlotchange:function(e){return t.handleMainSlotChange(e)}})),n(v,{condition:this.search},n("post-search",{onDropdownToggled:function(e){return t.handleDropdownToggled(e)}})),n(v,{condition:!!l},n("post-klp-login-widget",{"logout-url":this.logoutUrl},n("slot",{name:"login-widget"}))),n(v,{condition:!a&&u},n("post-language-switch",{id:"post-language-switch-no-meta",onDropdownToggled:function(e){return t.handleDropdownToggled(e)},mode:"dropdown"}))))))};Object.defineProperty(t.prototype,"host",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{language:["handleLanguageChange"],languageSwitchOverrides:["handleAvailableLanguagesChange"],osFlyoutOverrides:["handleOsFlyoutOverrides"],activeRoute:["handleActiveRouteChange"],customConfig:["handleCustomConfigChange"],search:["handleSearchChange"],login:["handleLoginChange"],meta:["handleMetaChange"],stickyness:["handleStickynessChange"]}},enumerable:false,configurable:true});return t}());ut.style=lt}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n["throw"](t))}catch(t){o(t)}}function l(t){t.done?i(t.value):r(t.value).then(s,a)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var n=0,r=e.length,o;n<r;n++){if(o||!(n in e)){if(!o)o=Array.prototype.slice.call(e,0,n);o[n]=e[n]}}return t.concat(o||Array.prototype.slice.call(e))};System.register(["./p-5600adca.system.js","./p-abf306bd.system.js","./p-b62fafd2.system.js","./p-d7e221af.system.js","./p-7b27bee6.system.js","./p-f52d7dcb.system.js","./p-812782e0.system.js","./p-1fd8561a.system.js"],(function(t){"use strict";var e,i,n,r,o,s,a,l,u,c,f,d,h,p,g,v;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;o=t.g},function(t){s=t.d;a=t.t},function(t){l=t.g;u=t.p;c=t.t},function(t){f=t.u},function(t){d=t.s;h=t.d},function(t){p=t.S},function(t){g=t.S},function(t){v=t.I}],execute:function(){var m=this;var b=function(t,e){if(e===false){return t}var i;t=x(t);if(e==="auto"||e==="exact"){if(w(t)){return y(t)}i=new URL(window.location.href)}else{try{i=new URL(e,document.location.origin)}catch(i){console.warn("Active Route: ".concat(e," is not a valid URL. Navigation highlighting has been disabled."));return t}}var n=k(t,i,e);if(n.length===0){return t}var r=n[0];r.main.isActiveOverride=true;if(r.sub)r.sub.isActiveOverride=true;return t};var w=function(t){return t.filter((function(t){return t.isActive})).length>0};var y=function(t){return t.map((function(t){return Object.assign(Object.assign({},t),{isActiveOverride:t.isActive,flyout:t.flyout.map((function(t){return Object.assign(Object.assign({},t),{linkList:t.linkList.map((function(t){return Object.assign(Object.assign({},t),{isActiveOverride:t.isActive})}))})}))})}))};var x=function(t){return t.map((function(t){return Object.assign(Object.assign({},t),{isActiveOverride:false,flyout:t.flyout.map((function(t){return Object.assign(Object.assign({},t),{linkList:t.linkList.map((function(t){return Object.assign(Object.assign({},t),{isActiveOverride:false})}))})}))})}))};var k=function(t,e,i){var n=false;var r=[];t.filter((function(t){return!n&&t})).forEach((function(t){try{var o=_(e,new URL(t.url),i);n=j(r,o,{main:t,score:o},n)}catch(t){}t.flyout.forEach((function(o){var s;(s=o.linkList)===null||s===void 0?void 0:s.forEach((function(o){if(o.isActive&&(i==="auto"||i==="exact")){n=true;return}try{var s=new URL(o.url);var a=_(e,s,i);n=j(r,a,{main:t,sub:o,score:a},n)}catch(t){}}))}))}));return r.sort((function(t,e){return e.score-t.score}))};function j(t,e,i,n){var r=n;if(e>0){if(e===Infinity)r=true;t.push(i)}return r}var _=function(t,e,i){if(t===null||e===null||t.origin!==e.origin){return 0}var n=t.pathname.toLocaleLowerCase();var r=e.pathname.toLocaleLowerCase();if(n===r){return Infinity}if(t.pathname.length<e.pathname.length){return 0}if(i==="auto"){var o=__spreadArray([t.origin.toLocaleLowerCase()],n.split("/").filter((function(t){return t!==null&&t!==""})),true);var s=__spreadArray([e.origin.toLocaleLowerCase()],r.split("/").filter((function(t){return t!==null&&t!==""})),true);var a=O(o,s);return Math.min(o.length,s.length)===a?a:0}return 0};var O=function(t,e){if(t==null||e==null||t.length===0||e.length===0){return 0}var i=0;for(;i<Math.min(t.length,e.length);i++){if(t[i]!==e[i]){return 0}}return i};var F=null;var N=null;var P=function(){var t=document.querySelector("#PPM_HEADER_DATA");if((t===null||t===void 0?void 0:t.textContent)!=null){return JSON.parse(t.textContent)}return null};var C=function(t){return __awaiter(m,[t],void 0,(function(t){var e,i,n,r,o,s,a;var c=t.projectId,f=t.environment,d=t.language,h=t.cookieKey,p=t.localStorageKey,g=t.activeRouteProp,v=t.localizedCustomConfig,m=t.osFlyoutOverrides;return __generator(this,(function(t){switch(t.label){case 0:n=P();o=null;if(!n)return[3,1];r=n;s=document.documentElement.lang;return[3,3];case 1:if(F==null){F=S(c,f)}return[4,F];case 2:o=t.sent();s=l(Object.keys(o),d,p,h);if(s===undefined){throw new Error("Internet Header: unable to determine current language")}r=Object.assign({},o[s]);t.label=3;case 3:if(v){a=((e=v===null||v===void 0?void 0:v.header)===null||e===void 0?void 0:e.navMain)?Object.assign(Object.assign({},r.header),{navMain:__spreadArray(__spreadArray([],r.header.navMain,true),v.header.navMain,true)}):r.header;r=Object.assign(Object.assign({},r),{header:a})}if(m)r.header.navMain=A(r,m);if(g!=null)r.header.navMain=b(r.header.navMain,g);L((i=r===null||r===void 0?void 0:r.header)===null||i===void 0?void 0:i.navMain);u(s,h,p);return[2,r]}}))}))};var A=function(t,e){if(e==null)return t.header.navMain;return t.header.navMain.map((function(t){var i,n;if(t.id!=="flyout_os")return t;if(N===null){N=JSON.parse(JSON.stringify(t))}var r=(i=e.text)!==null&&i!==void 0?i:N.text;var o=(n=e.title)!==null&&n!==void 0?n:N.title;if(N.flyout==null||N.flyout.length===0||e.flyout==null||e.flyout.length===0)return Object.assign(Object.assign({},t),{title:o,text:r});var s=__spreadArray(__spreadArray([],N.flyout.map((function(t,i){var n;var r=e.flyout[i];var o=(n=r.title)!==null&&n!==void 0?n:t.title;var s=r.linkList!=null?e.flyout[i].linkList:[];return{title:o,linkList:__spreadArray(__spreadArray([],t.linkList,true),s,true)}})),true),e.flyout.slice(N.flyout.length),true);return Object.assign(Object.assign({},t),{text:r,title:o,flyout:s})}))};var S=function(t,e){return __awaiter(m,void 0,void 0,(function(){var i,n,r;return __generator(this,(function(o){switch(o.label){case 0:if(!z(t)){throw new Error('Internet Header: invalid project id "'.concat(t,'"'))}if(t==="test"){e="int01"}i=I(t,e);o.label=1;case 1:o.trys.push([1,4,,5]);return[4,fetch(i)];case 2:n=o.sent();return[4,n.json()];case 3:return[2,o.sent()];case 4:r=o.sent();throw new Error("Internet Header: fetching config failed. ".concat(r.message));case 5:return[2]}}))}))};var I=function(t,e){if(t==="test")return"assets/config/test-configuration.json";var i=e.toLowerCase();var n=i==="prod";var r="https://".concat(n?"www":"int",".post.ch");try{return new URL("".concat(r,"/api/headerjs/Json?serviceid=").concat(encodeURIComponent(t)).concat(!n?"&environment="+i:"")).toString()}catch(t){throw new Error("Internet Header: Config URL is invalid.")}};var z=function(t){return t!==""&&t.length>0&&/^[a-zA-Z][\w-]*[a-zA-Z0-9]$/.test(t)};var R=function(t,e){var i;var n;try{n=typeof t==="string"?JSON.parse(t):t}catch(t){throw new Error("Internet Header: Custom config is invalid. Make sure your custom config contains valid JSON syntax and matches the definition. ")}var r=n[e];if((i=r===null||r===void 0?void 0:r.header)===null||i===void 0?void 0:i.navMain)L(r.header.navMain);return r};var L=function(t){t.forEach((function(t){t.id=t.id==="flyout_os"?t.id:f("main-nav-")}))};var E="@swisspost/internet-header";var T="1.14.5";var W="The header for client facing applications.";var H="Swiss Post <design-system@post.ch>";var J="Apache-2.0";var K={type:"git",url:"https://github.com/swisspost/design-system.git"};var M="https://design-system.post.ch";var D={url:"https://github.com/swisspost/design-system/issues"};var U="loader/index.cjs.js";var B="loader/index.js";var G="loader/index.es2017.js";var q="loader/index.d.ts";var V="dist/collection/collection-manifest.json";var X="dist/swisspost-internet-header/swisspost-internet-header.esm.js";var Z={access:"public"};var Y=["dist/","loader/"];var $={dev:"stencil build --serve --port 9310 --watch --docs-readme --dev --config stencil.config.dev.ts",start:"stencil build --watch --docs-readme",build:"stencil build --docs-readme",clean:"rimraf www dist loader",test:"pnpm run unit",unit:"jest","unit:watch":"jest --watch",e2e:"cypress run","e2e:ci":"xvfb-run -a cypress run","e2e:watch":"cypress open",lint:"eslint src/**/*{.ts,.tsx}","lint:fix":"eslint src/**/*{.ts,.tsx} --fix",generate:"stencil generate"};var Q={"@swisspost/design-system-styles":"workspace:8.2.0","body-scroll-lock":"4.0.0-beta.0","iframe-resizer":"4.4.5",jquery:"3.7.1","throttle-debounce":"5.0.2","url-polyfill":"1.1.12"};var tt={"@babel/core":"7.25.2","@percy/cli":"1.29.1","@percy/cypress":"3.1.2","@stencil-community/eslint-plugin":"0.8.0","@stencil/core":"4.19.2","@stencil/sass":"3.0.12","@stencil/store":"2.0.16","@types/body-scroll-lock":"3.1.2","@types/iframe-resizer":"3.5.13","@types/jest":"29.5.12","@types/jquery":"3.5.30","@types/node":"20.14.14","@types/throttle-debounce":"5.0.2","babel-loader":"9.1.3",bootstrap:"5.3.3",cypress:"13.13.2","cypress-each":"1.14.0","cypress-storybook":"1.0.0",eslint:"8.57.0","eslint-plugin-react":"7.35.0","focus-trap":"7.5.4",globby:"14.0.2",jest:"29.7.0","jest-environment-jsdom":"29.7.0",rimraf:"6.0.1","rollup-plugin-node-polyfills":"0.2.1","rollup-plugin-scss":"4.0.0","rollup-plugin-visualizer":"5.12.0",sass:"1.77.8","start-server-and-test":"2.0.5","ts-jest":"29.2.4",typescript:"5.5.4"};var et=["components","web-components","header","stencil","design-system","ui","frontend"];var it={name:E,version:T,description:W,author:H,license:J,repository:K,homepage:M,bugs:D,main:U,module:B,es2017:G,types:q,collection:V,"collection:main":"dist/collection/index.js",unpkg:X,publishConfig:Z,files:Y,scripts:$,dependencies:Q,devDependencies:tt,keywords:et};var nt=function(t){if(!(t instanceof HTMLElement||t instanceof SVGElement)){return false}var e=getComputedStyle(t);return["overflow","overflow-x","overflow-y"].some((function(t){var i=e.getPropertyValue(t);return i==="auto"||i==="scroll"}))};var rt=function(t){var e=t.parentElement;while(e){if(e.nodeName==="BODY"){return document}if(nt(e)){return e}e=e.parentElement}return document};var ot=function(t,e){var i=rt(t);var n=i instanceof Element?i.scrollTop:i.documentElement.scrollTop;var r=d.stickyness==="full"?0:n;var o,s;if(e){o=t.clientHeight-1;s=e.clientHeight}else{var a=window.getComputedStyle(t);var l=parseFloat(a.getPropertyValue("font-size"));s=parseFloat(a.getPropertyValue("--meta-header-height"))*l;o=s+parseFloat(a.getPropertyValue("--header-height"))*l}var u=1;if(s>0){u=Math.max((o-Math.max(r,0))/(o-s),1)}return u.toString()};var st=function(t,e){var i=rt(e);var n=function(){e.style.setProperty("--logo-scale",ot(e,t))};var r=s(150,n);var o=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting&&t.intersectionRatio>0){i.addEventListener("scroll",n,{passive:true});window.addEventListener("resize",r);window.requestAnimationFrame(n)}else{i.removeEventListener("scroll",n);window.removeEventListener("resize",r);window.requestAnimationFrame(n)}}))}),{threshold:[0,.001]});o.observe(t);return n};var at=':host{--post-contrast-color:#000;--post-focus-color:#1976c8;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-white:#fff;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-black:#000;--post-primary:hsl(0, 0%, 20%);--post-secondary:hsl(0, 0%, 40%);--post-success:#2c871d;--post-warning:#f49e00;--post-error:#a51728;--post-info:#cce4ee;--post-success-background:#c0debb;--post-warning-background:#fce2b2;--post-error-background:#ffdade;--post-nightblue:#004976;--post-nightblue-bright:#0076a8;--post-petrol:#006d68;--post-petrol-bright:#00968f;--post-coral:#9e2a2f;--post-coral-bright:#e03c31;--post-olive:#716135;--post-olive-bright:#aa9d2e;--post-purple:#80276c;--post-purple-bright:#c5299b;--post-aubergine:#523178;--post-aubergine-bright:#7566a0;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-black-alpha-10-rgba:rgba(0, 0, 0, 0.1);--post-black-alpha-20-rgba:rgba(0, 0, 0, 0.2);--post-black-alpha-40-rgba:rgba(0, 0, 0, 0.4);--post-black-alpha-60-rgba:rgba(0, 0, 0, 0.6);--post-black-alpha-80-rgba:rgba(0, 0, 0, 0.8);--post-white-alpha-10-rgba:rgba(255, 255, 255, 0.1);--post-white-alpha-20-rgba:rgba(255, 255, 255, 0.2);--post-white-alpha-40-rgba:rgba(255, 255, 255, 0.4);--post-white-alpha-60-rgba:rgba(255, 255, 255, 0.6);--post-white-alpha-80-rgba:rgba(255, 255, 255, 0.8);--post-yellow-rgb:255, 204, 0;--post-white-rgb:255, 255, 255;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-black-rgb:0, 0, 0;--post-primary-rgb:51, 51, 51;--post-secondary-rgb:102, 102, 102;--post-success-rgb:44, 135, 29;--post-warning-rgb:244, 158, 0;--post-error-rgb:165, 23, 40;--post-info-rgb:204, 228, 238;--post-success-background-rgb:192, 222, 187;--post-warning-background-rgb:252, 226, 178;--post-error-background-rgb:255, 218, 222;--post-nightblue-rgb:0, 73, 118;--post-nightblue-bright-rgb:0, 118, 168;--post-petrol-rgb:0, 109, 104;--post-petrol-bright-rgb:0, 150, 143;--post-coral-rgb:158, 42, 47;--post-coral-bright-rgb:224, 60, 49;--post-olive-rgb:113, 97, 53;--post-olive-bright-rgb:170, 157, 46;--post-purple-rgb:128, 39, 108;--post-purple-bright-rgb:197, 41, 155;--post-aubergine-rgb:82, 49, 120;--post-aubergine-bright-rgb:117, 102, 160}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:700;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:700;font-style:italic;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:400;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:400;font-style:italic;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:300;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")}@font-face{font-display:swap;font-family:"Frutiger Neue For Post";font-weight:300;font-style:italic;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")}.visually-hidden{position:absolute;width:1px;height:1px;border:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0)}.btn-blank{background-color:rgba(0,0,0,0);border:none;border-radius:0;padding:0}.nav-link{outline:none;outline-offset:2px;text-decoration:none;color:rgba(0,0,0,.8);-webkit-transition:color 200ms;transition:color 200ms;background-color:rgba(0,0,0,0);-webkit-box-shadow:none;box-shadow:none;border:0;margin:0;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:.5rem}.nav-link:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.nav-link:hover,.nav-link:focus{color:#000}.nav-link:is(:focus-visible,:focus-within,.pretend-focus){z-index:1;position:relative}.nav-link>svg{width:1.4em;height:1.4em;-ms-flex-negative:0;flex-shrink:0}.nav-link>span{-ms-flex-negative:1;flex-shrink:1}.no-list{list-style:none;padding-left:0;margin-top:0;margin-bottom:0}*,:host,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host{font-family:"Frutiger Neue For Post",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}button{font:inherit;padding:0}a,button{border-radius:4px;outline:none;outline-offset:2px}a:is(:focus-visible,:focus-within,.pretend-focus),button:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color);border-radius:4px}img,svg{max-width:100%;max-height:100%}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){svg{color:currentColor;forced-color-adjust:preserve-parent-color}}.box>*:first-child{margin-top:0}.box>*:last-child{margin-bottom:0}.mirrored{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.bold{font-weight:700}.light{font-weight:300}.d-none{display:none !important}.d-flex{display:-ms-flexbox;display:flex}.d-inline-flex{display:-ms-inline-flexbox;display:inline-flex}.align-items-center{-ms-flex-align:center;align-items:center}@media (min-width: 1441px){.wide-container{margin:0 auto;max-width:1440px}}@media (max-width: 599.98px){.container{padding-right:16px;padding-left:16px}}@media (min-width: 600px)and (max-width: 1023.98px){.container{padding-right:32px;padding-left:32px}}@media (min-width: 1024px){.container{padding-right:40px;padding-left:40px}}@media (max-width: -0.02px){.hidden-xs{display:none}}@media (max-width: 399.98px){.hidden-sm{display:none}}@media (max-width: 599.98px){.hidden-rg{display:none}}@media (max-width: 779.98px){.hidden-md{display:none}}@media (max-width: 1023.98px){.hidden-lg{display:none}}@media (max-width: 1279.98px){.hidden-xl{display:none}}@media (max-width: 1439.98px){.hidden-xxl{display:none}}:host{--logo-scale:1}@media (max-width: 1023.98px){:host{--logo-scale:1 !important}}post-header-logo{height:var(--header-height);width:var(--header-height);-webkit-transform-origin:bottom left;transform-origin:bottom left;-webkit-transform:scale(var(--logo-scale));transform:scale(var(--logo-scale))}post-main-navigation{margin-left:calc(var(--header-height)*var(--logo-scale) - var(--header-height))}:host{display:block;position:relative;font-size:1rem;font-weight:300;z-index:var(--header-z-index, 10);--language-dropdown-margin-top:0px;--meta-header-height:var(--post-meta-header-height, 0px);--header-height:var(--post-header-height, 3.5rem)}@media (min-width: 1024px){:host{--meta-header-height:var(--post-meta-header-height, 3rem)}}@media (min-width: 1024px){:host{--header-height:var(--post-header-height, 4rem)}}@media (min-width: 1280px){:host{--header-height:var(--post-header-height, 4.5rem)}}:host([meta=false]){--meta-header-height:0px;--language-dropdown-margin-top:1px}@supports ((position: -webkit-sticky) or (position: sticky)){:host(:not(.stickyness-none)){position:-webkit-sticky;position:sticky}:host(.stickyness-full){top:0}:host(.stickyness-main){top:calc(var(--meta-header-height, 0px)*-1)}:host(.stickyness-minimal){top:calc((var(--header-height, 0px) + var(--meta-header-height, 0px) + 1px)*-1);-webkit-transition:top 200ms ease-in;transition:top 200ms ease-in}:host(.stickyness-minimal.scrolling-up),:host(.stickyness-minimal.dropdown-open){top:calc(var(--meta-header-height, 0px)*-1);--header-slide-in-transition:var(--post-header-slide-in-transition, top 200ms ease-out);-webkit-transition:var(--header-slide-in-transition);transition:var(--header-slide-in-transition)}}.post-internet-header{border-bottom:1px solid #e6e6e6;background-color:#fff}.main-navigation-container{display:-ms-flexbox;display:flex}.main-navigation-container>.main-navigation-controls{-ms-flex:0 1 auto;flex:0 1 auto}.main-navigation{display:-ms-flexbox;display:flex}.sub-navigation-container{position:absolute;top:100%;left:0;width:100%;display:-ms-flexbox;display:flex;background:#fff;visibility:hidden}.main-navigation-item:hover .sub-navigation-container{visibility:visible}.main-navigation-controls{display:-ms-flexbox;display:flex;margin-left:auto}@media (max-width: 1023.98px){.main-navigation-controls{font-weight:400}}@media (min-width: 1024px){.main-navigation-controls{font-size:1.0625rem}}.main-navigation-controls>*{border-left:1px solid #e6e6e6;-ms-flex:0 0 auto;flex:0 0 auto}.main-navigation-custom-content{max-height:var(--header-height);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-negative:1;flex-shrink:1}.menu-button{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 calc(1rem - 1px);font-weight:300;cursor:pointer;border-left:1px solid #e6e6e6;-ms-flex-order:1;order:1}@media (min-width: 1024px){.menu-button{display:none}}@media (min-width: 600px)and (max-width: 1023.98px){.menu-button .visually-hidden{position:static;width:auto;height:auto;margin:auto;overflow:visible;clip:auto;visibility:visible;margin-right:.5rem}}.menu-button svg{width:1.5rem;height:1.5rem}.full-width .wide-container{max-width:none}';var lt=at;var ut=t("P",function(){function t(t){e(this,t);this.headerLoaded=i(this,"headerLoaded",7);this.lastScrollTop=window.scrollY||document.documentElement.scrollTop;this.lastWindowWidth=window.innerWidth;this.handleClickOutsideBound=this.handleClickOutside.bind(this);this.project=undefined;this.stickyness="minimal";this.language=undefined;this.meta=true;this.login=true;this.search=true;this.skiplinks=true;this.configProxy=undefined;this.environment="prod";this.languageSwitchOverrides=undefined;this.customConfig=undefined;this.languageCookieKey=undefined;this.languageLocalStorageKey="swisspost-internet-header-language";this.logoutUrl=undefined;this.activeRoute="auto";this.osFlyoutOverrides=undefined;this.fullWidth=false;this.activeFlyout=null;this.activeDropdownElement=null;this.isMainSlotEmpty=true;if(this.project===undefined||this.project===""||!z(this.project)){throw new Error('Internet Header project key is "'.concat(this.project,'". Please provide a valid project key.'))}}t.prototype.getCurrentLanguage=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){return[2,(t=d.currentLanguage)!==null&&t!==void 0?t:"de"]}))}))};t.prototype.connectedCallback=function(){var t=this;this.throttledScroll=a(300,(function(){return t.handleScrollEvent()}));this.debouncedResize=s(200,(function(){return t.handleResize()}))};t.prototype.disconnectedCallback=function(){this.scrollParent.removeEventListener("scroll",this.throttledScroll);this.scrollParent.removeEventListener("resize",this.debouncedResize);h()};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,n;return __generator(this,(function(r){switch(r.label){case 0:this.scrollParent=rt(this.host);this.scrollParent.addEventListener("scroll",this.throttledScroll,{passive:true});this.scrollParent.addEventListener("resize",this.debouncedResize,{passive:true});r.label=1;case 1:r.trys.push([1,3,,4]);d.projectId=this.project;d.stickyness=this.stickyness;d.environment=this.environment.toLocaleLowerCase();if(this.language!==undefined)d.currentLanguage=this.language;d.languageSwitchOverrides=typeof this.languageSwitchOverrides==="string"?JSON.parse(this.languageSwitchOverrides):this.languageSwitchOverrides;d.osFlyoutOverrides=typeof this.osFlyoutOverrides==="string"?JSON.parse(this.osFlyoutOverrides):this.osFlyoutOverrides;if(this.customConfig!==undefined){t=Object.keys(typeof this.customConfig==="string"?JSON.parse(this.customConfig):this.customConfig);e=d.currentLanguage||l(t,this.language);d.localizedCustomConfig=R(this.customConfig,e)}i=d;return[4,C({projectId:this.project,environment:d.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:d.localizedCustomConfig,osFlyoutOverrides:d.osFlyoutOverrides})];case 2:i.localizedConfig=r.sent();return[3,4];case 3:n=r.sent();console.error(n);return[3,4];case 4:return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;window.requestAnimationFrame((function(){t.handleResize();t.headerLoaded.emit();t.host.classList.add("header-loaded");if(t.meta&&t.metaNav){t.updateLogoAnimation=st(t.metaNav,t.host)}else{var e=window.getComputedStyle(document.documentElement);if(e.getPropertyValue("--post-meta-header-height")!==""){document.documentElement.style.setProperty("--post-meta-header-height","0px")}}}));if(this.stickyness==="full")console.warn('Internet Header: The stickyness="full" option is deprecated.')};t.prototype.handleLanguageChange=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:d.currentLanguage=t;e=d;return[4,C({projectId:this.project,environment:this.environment,language:t,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:d.localizedCustomConfig,osFlyoutOverrides:d.osFlyoutOverrides})];case 1:e.localizedConfig=i.sent();if(this.customConfig!==undefined)d.localizedCustomConfig=R(this.customConfig,t);return[2]}}))}))};t.prototype.handleAvailableLanguagesChange=function(t){d.languageSwitchOverrides=typeof t==="string"?JSON.parse(t):t};t.prototype.handleOsFlyoutOverrides=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:d.osFlyoutOverrides=typeof t==="string"?JSON.parse(t):t;e=d;return[4,C({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:d.localizedCustomConfig,osFlyoutOverrides:d.osFlyoutOverrides})];case 1:e.localizedConfig=i.sent();return[2]}}))}))};t.prototype.handleActiveRouteChange=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:e=d;return[4,C({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:t,localizedCustomConfig:d.localizedCustomConfig,osFlyoutOverrides:d.osFlyoutOverrides})];case 1:e.localizedConfig=i.sent();return[2]}}))}))};t.prototype.handleCustomConfigChange=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){switch(n.label){case 0:if(this.language===undefined)return[2];e=R(t,this.language);d.localizedCustomConfig=e;i=d;return[4,C({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:e,osFlyoutOverrides:d.osFlyoutOverrides})];case 1:i.localizedConfig=n.sent();return[2]}}))}))};t.prototype.handleSearchChange=function(t){d.search=t};t.prototype.handleLoginChange=function(t){d.login=t};t.prototype.handleMetaChange=function(t){d.meta=t};t.prototype.handleLanguageChangeEvent=function(t){void this.handleLanguageChange(t.detail)};t.prototype.handleStickynessChange=function(t){d.stickyness=t;if(typeof this.updateLogoAnimation==="function")this.updateLogoAnimation()};t.prototype.handleClickOutside=function(t){if(this.activeDropdownElement&&!t.composedPath().includes(this.activeDropdownElement)){void this.activeDropdownElement.toggleDropdown(false)}};t.prototype.handleKeyUp=function(t){if(t.key==="Escape"){if(this.activeDropdownElement){void this.activeDropdownElement.toggleDropdown(false)}if(this.activeFlyout!==null&&this.mainNav){void this.mainNav.toggleDropdown(false)}}};t.prototype.handleScrollEvent=function(){var t=this.scrollParent instanceof Document?this.scrollParent.documentElement.scrollTop:this.scrollParent.scrollTop;if(this.stickyness==="minimal"){this.host.classList.toggle("scrolling-up",t<=this.lastScrollTop)}this.lastScrollTop=t<=0?0:t};t.prototype.handleResize=function(){var t;if(this.isMainNavOpen()&&this.lastWindowWidth<1024&&window.innerWidth>=1024){(t=this.activeDropdownElement)===null||t===void 0?void 0:t.toggleDropdown(false)}this.lastWindowWidth=window.innerWidth};t.prototype.handleDropdownToggled=function(t){var e=this;if(!t.detail.open&&this.activeDropdownElement!==t.detail.element){return}if(t.detail.open){if(this.activeDropdownElement){void this.activeDropdownElement.toggleDropdown(false)}this.activeDropdownElement=t.detail.element;if(window.innerWidth>=1024){window.setTimeout((function(){window.addEventListener("click",e.handleClickOutsideBound)}),10)}if(this.activeFlyout!==null&&this.mainNav){void this.mainNav.setActiveFlyout(null)}}else{this.activeDropdownElement=null;window.removeEventListener("click",this.handleClickOutsideBound)}};t.prototype.handleFlyoutToggled=function(t){this.activeFlyout=t.detail;if(this.activeDropdownElement&&t.detail!==null&&!this.isMainNavOpen()){void this.activeDropdownElement.toggleDropdown(false)}};t.prototype.toggleMobileDropdown=function(){var t;(t=this.mainNav)===null||t===void 0?void 0:t.toggleDropdown()};t.prototype.isMainNavOpen=function(){return this.activeDropdownElement&&this.activeDropdownElement.tagName==="POST-MAIN-NAVIGATION"};t.prototype.handleMainSlotChange=function(t){var e=t.target;this.isMainSlotEmpty=e.assignedElements().length===0};t.prototype.render=function(){var t=this;var e,i,o;if(!((e=d.localizedConfig)===null||e===void 0?void 0:e.header)){console.error(new Error("Internet Header: Config cannot be loaded"));return}var s=d.localizedConfig;var a=this.meta&&s.header.navMeta!==undefined&&((i=s.header.navMeta)===null||i===void 0?void 0:i.filter((function(t){return!t.isHomeLink})).length)>0;var l=((o=this.login)!==null&&o!==void 0?o:!s.header.isLoginWidgetHidden)&&s.header.loginWidgetOptions;var u=s.header.navLang.length>1;var f=a?ot(this.host):"1";return n(r,{class:"stickyness-".concat(this.stickyness," ").concat(Boolean(this.activeDropdownElement)||Boolean(this.activeFlyout)?"dropdown-open":""),"data-version":it.version,onKeyup:function(e){return t.handleKeyUp(e)},style:{"--logo-scale":f}},n("header",{class:"post-internet-header".concat(this.fullWidth?" full-width":"")},n(p,null),n("h1",{class:"visually-hidden"},c("Navigate on post.ch")),n(v,{condition:this.skiplinks},n("post-skiplinks",null)),n(v,{condition:a},n("post-meta-navigation",{orientation:"horizontal",class:"hidden-lg","full-width":this.fullWidth,ref:function(e){return t.metaNav=e}},n(v,{condition:u},n("post-language-switch",{id:"post-language-switch-desktop",mode:"dropdown",onDropdownToggled:function(e){return t.handleDropdownToggled(e)}})))),n("div",{class:"main-navigation-container wide-container"},n("post-header-logo",null),n("button",{class:"menu-button nav-link",onClick:function(){return t.toggleMobileDropdown()},"aria-haspopup":"menu","aria-controls":"post-internet-header-main-navigation","aria-expanded":this.activeDropdownElement?"true":"false"},n("span",{class:"menu-button-text visually-hidden"},s.header.mobileMenu.text),n(g,{name:this.isMainNavOpen()?"pi-close":"pi-menu"})),n("post-main-navigation",{onDropdownToggled:function(e){return t.handleDropdownToggled(e)},onFlyoutToggled:function(e){return t.handleFlyoutToggled(e)},ref:function(e){return t.mainNav=e}},n(v,{condition:a},n("post-meta-navigation",{orientation:"vertical"},n(v,{condition:u},n("post-language-switch",{id:"post-language-switch-mobile",mode:"list"}))))),n("div",{class:"main-navigation-controls"},n("div",{class:"main-navigation-custom-content".concat(this.isMainSlotEmpty?" d-none":"")},n("slot",{name:"main",onSlotchange:function(e){return t.handleMainSlotChange(e)}})),n(v,{condition:this.search},n("post-search",{onDropdownToggled:function(e){return t.handleDropdownToggled(e)}})),n(v,{condition:!!l},n("post-klp-login-widget",{"logout-url":this.logoutUrl},n("slot",{name:"login-widget"}))),n(v,{condition:!a&&u},n("post-language-switch",{id:"post-language-switch-no-meta",onDropdownToggled:function(e){return t.handleDropdownToggled(e)},mode:"dropdown"}))))))};Object.defineProperty(t.prototype,"host",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{language:["handleLanguageChange"],languageSwitchOverrides:["handleAvailableLanguagesChange"],osFlyoutOverrides:["handleOsFlyoutOverrides"],activeRoute:["handleActiveRouteChange"],customConfig:["handleCustomConfigChange"],search:["handleSearchChange"],login:["handleLoginChange"],meta:["handleMetaChange"],stickyness:["handleStickynessChange"]}},enumerable:false,configurable:true});return t}());ut.style=lt}}}));
@@ -0,0 +1 @@
1
+ System.register(["./p-9730e79d.system.js","./p-5600adca.system.js","./p-7b27bee6.system.js"],(function(e){"use strict";return{setters:[function(t){e("post_header_logo",t.P)},function(){},function(){}],execute:function(){}}}));
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-67f6b5a8.js";export{s as setNonce}from"./p-67f6b5a8.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o([["p-6f9aca24",[[1,"swisspost-internet-header",{project:[1],stickyness:[1],language:[1],meta:[4],login:[4],search:[4],skiplinks:[4],configProxy:[1,"config-proxy"],environment:[1],languageSwitchOverrides:[1,"language-switch-overrides"],customConfig:[1,"custom-config"],languageCookieKey:[1,"language-cookie-key"],languageLocalStorageKey:[1,"language-local-storage-key"],logoutUrl:[1,"logout-url"],activeRoute:[8,"active-route"],osFlyoutOverrides:[1,"os-flyout-overrides"],fullWidth:[4,"full-width"],activeFlyout:[32],activeDropdownElement:[32],isMainSlotEmpty:[32],getCurrentLanguage:[64]},[[0,"languageChanged","handleLanguageChangeEvent"]],{language:["handleLanguageChange"],languageSwitchOverrides:["handleAvailableLanguagesChange"],osFlyoutOverrides:["handleOsFlyoutOverrides"],activeRoute:["handleActiveRouteChange"],customConfig:["handleCustomConfigChange"],search:["handleSearchChange"],login:["handleLoginChange"],meta:["handleMetaChange"],stickyness:["handleStickynessChange"]}]]],["p-fa5453ce",[[1,"swisspost-internet-breadcrumbs",{customItems:[1,"custom-items"],hideButtons:[4,"hide-buttons"],customBreadcrumbItems:[32],overlayVisible:[32],isConcatenated:[32],dropdownOpen:[32],refsReady:[32],toggleOverlayById:[64]},null,{customItems:["handleCustomConfigChange"]}]]],["p-9f9b1221",[[1,"swisspost-internet-footer",{liveSupportEnabled:[32],cookieSettingsEnabled:[32]}]]],["p-43fc36bc",[[1,"post-search",{searchDropdownOpen:[32],coveoSuggestions:[32],placeSuggestions:[32],parcelSuggestion:[32],toggleDropdown:[64],setFocus:[64]}]]],["p-6ee4b188",[[1,"post-klp-login-widget",{logoutUrl:[1,"logout-url"],setFocus:[64]}]]],["p-74737624",[[1,"post-language-switch",{mode:[1],langSwitchOpen:[32],toggleDropdown:[64]}]]],["p-3ab58011",[[1,"post-logo"]]],["p-b2159d69",[[1,"post-main-navigation",{activeFlyout:[32],mobileMenuOpen:[32],toggleDropdown:[64],setFocus:[64],setActiveFlyout:[64]}]]],["p-d83083ac",[[1,"post-meta-navigation",{orientation:[1],fullWidth:[4,"full-width"]}]]],["p-b99b4d2d",[[0,"post-skiplinks"]]],["p-944e8412",[[4,"focus-trap",{active:[4],trap:[32]},null,{active:["handleActiveChange"]}]]]],e))));
1
+ import{p as e,b as o}from"./p-67f6b5a8.js";export{s as setNonce}from"./p-67f6b5a8.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o([["p-299d7534",[[1,"swisspost-internet-header",{project:[1],stickyness:[1],language:[1],meta:[4],login:[4],search:[4],skiplinks:[4],configProxy:[1,"config-proxy"],environment:[1],languageSwitchOverrides:[1,"language-switch-overrides"],customConfig:[1,"custom-config"],languageCookieKey:[1,"language-cookie-key"],languageLocalStorageKey:[1,"language-local-storage-key"],logoutUrl:[1,"logout-url"],activeRoute:[8,"active-route"],osFlyoutOverrides:[1,"os-flyout-overrides"],fullWidth:[4,"full-width"],activeFlyout:[32],activeDropdownElement:[32],isMainSlotEmpty:[32],getCurrentLanguage:[64]},[[0,"languageChanged","handleLanguageChangeEvent"]],{language:["handleLanguageChange"],languageSwitchOverrides:["handleAvailableLanguagesChange"],osFlyoutOverrides:["handleOsFlyoutOverrides"],activeRoute:["handleActiveRouteChange"],customConfig:["handleCustomConfigChange"],search:["handleSearchChange"],login:["handleLoginChange"],meta:["handleMetaChange"],stickyness:["handleStickynessChange"]}]]],["p-fa5453ce",[[1,"swisspost-internet-breadcrumbs",{customItems:[1,"custom-items"],hideButtons:[4,"hide-buttons"],customBreadcrumbItems:[32],overlayVisible:[32],isConcatenated:[32],dropdownOpen:[32],refsReady:[32],toggleOverlayById:[64]},null,{customItems:["handleCustomConfigChange"]}]]],["p-9f9b1221",[[1,"swisspost-internet-footer",{liveSupportEnabled:[32],cookieSettingsEnabled:[32]}]]],["p-43fc36bc",[[1,"post-search",{searchDropdownOpen:[32],coveoSuggestions:[32],placeSuggestions:[32],parcelSuggestion:[32],toggleDropdown:[64],setFocus:[64]}]]],["p-6f9b276e",[[1,"post-header-logo"]]],["p-6ee4b188",[[1,"post-klp-login-widget",{logoutUrl:[1,"logout-url"],setFocus:[64]}]]],["p-74737624",[[1,"post-language-switch",{mode:[1],langSwitchOpen:[32],toggleDropdown:[64]}]]],["p-b2159d69",[[1,"post-main-navigation",{activeFlyout:[32],mobileMenuOpen:[32],toggleDropdown:[64],setFocus:[64],setActiveFlyout:[64]}]]],["p-d83083ac",[[1,"post-meta-navigation",{orientation:[1],fullWidth:[4,"full-width"]}]]],["p-b99b4d2d",[[0,"post-skiplinks"]]],["p-944e8412",[[4,"focus-trap",{active:[4],trap:[32]},null,{active:["handleActiveChange"]}]]]],e))));
@@ -1,4 +1,4 @@
1
1
  export declare class PostLogo {
2
- host: HTMLPostLogoElement;
2
+ host: HTMLPostHeaderLogoElement;
3
3
  render(): any;
4
4
  }
@@ -25,6 +25,8 @@ export namespace Components {
25
25
  interface FocusTrap {
26
26
  "active": boolean;
27
27
  }
28
+ interface PostHeaderLogo {
29
+ }
28
30
  interface PostKlpLoginWidget {
29
31
  /**
30
32
  * Override the logout-url provided by the portal config.
@@ -47,8 +49,6 @@ export namespace Components {
47
49
  */
48
50
  "toggleDropdown": (force?: boolean) => Promise<boolean>;
49
51
  }
50
- interface PostLogo {
51
- }
52
52
  interface PostMainNavigation {
53
53
  /**
54
54
  * Open a specific flyout
@@ -210,6 +210,12 @@ declare global {
210
210
  prototype: HTMLFocusTrapElement;
211
211
  new (): HTMLFocusTrapElement;
212
212
  };
213
+ interface HTMLPostHeaderLogoElement extends Components.PostHeaderLogo, HTMLStencilElement {
214
+ }
215
+ var HTMLPostHeaderLogoElement: {
216
+ prototype: HTMLPostHeaderLogoElement;
217
+ new (): HTMLPostHeaderLogoElement;
218
+ };
213
219
  interface HTMLPostKlpLoginWidgetElement extends Components.PostKlpLoginWidget, HTMLStencilElement {
214
220
  }
215
221
  var HTMLPostKlpLoginWidgetElement: {
@@ -234,12 +240,6 @@ declare global {
234
240
  prototype: HTMLPostLanguageSwitchElement;
235
241
  new (): HTMLPostLanguageSwitchElement;
236
242
  };
237
- interface HTMLPostLogoElement extends Components.PostLogo, HTMLStencilElement {
238
- }
239
- var HTMLPostLogoElement: {
240
- prototype: HTMLPostLogoElement;
241
- new (): HTMLPostLogoElement;
242
- };
243
243
  interface HTMLPostMainNavigationElementEventMap {
244
244
  "dropdownToggled": DropdownEvent;
245
245
  "flyoutToggled": string | null;
@@ -318,9 +318,9 @@ declare global {
318
318
  };
319
319
  interface HTMLElementTagNameMap {
320
320
  "focus-trap": HTMLFocusTrapElement;
321
+ "post-header-logo": HTMLPostHeaderLogoElement;
321
322
  "post-klp-login-widget": HTMLPostKlpLoginWidgetElement;
322
323
  "post-language-switch": HTMLPostLanguageSwitchElement;
323
- "post-logo": HTMLPostLogoElement;
324
324
  "post-main-navigation": HTMLPostMainNavigationElement;
325
325
  "post-meta-navigation": HTMLPostMetaNavigationElement;
326
326
  "post-search": HTMLPostSearchElement;
@@ -338,6 +338,8 @@ declare namespace LocalJSX {
338
338
  interface FocusTrap {
339
339
  "active"?: boolean;
340
340
  }
341
+ interface PostHeaderLogo {
342
+ }
341
343
  interface PostKlpLoginWidget {
342
344
  /**
343
345
  * Override the logout-url provided by the portal config.
@@ -358,8 +360,6 @@ declare namespace LocalJSX {
358
360
  */
359
361
  "onLanguageChanged"?: (event: PostLanguageSwitchCustomEvent<string>) => void;
360
362
  }
361
- interface PostLogo {
362
- }
363
363
  interface PostMainNavigation {
364
364
  /**
365
365
  * Fires when the dropdown has been toggled.
@@ -476,9 +476,9 @@ declare namespace LocalJSX {
476
476
  }
477
477
  interface IntrinsicElements {
478
478
  "focus-trap": FocusTrap;
479
+ "post-header-logo": PostHeaderLogo;
479
480
  "post-klp-login-widget": PostKlpLoginWidget;
480
481
  "post-language-switch": PostLanguageSwitch;
481
- "post-logo": PostLogo;
482
482
  "post-main-navigation": PostMainNavigation;
483
483
  "post-meta-navigation": PostMetaNavigation;
484
484
  "post-search": PostSearch;
@@ -497,9 +497,9 @@ declare module "@stencil/core" {
497
497
  * @param active activate or deactivate the focus trap
498
498
  */
499
499
  "focus-trap": LocalJSX.FocusTrap & JSXBase.HTMLAttributes<HTMLFocusTrapElement>;
500
+ "post-header-logo": LocalJSX.PostHeaderLogo & JSXBase.HTMLAttributes<HTMLPostHeaderLogoElement>;
500
501
  "post-klp-login-widget": LocalJSX.PostKlpLoginWidget & JSXBase.HTMLAttributes<HTMLPostKlpLoginWidgetElement>;
501
502
  "post-language-switch": LocalJSX.PostLanguageSwitch & JSXBase.HTMLAttributes<HTMLPostLanguageSwitchElement>;
502
- "post-logo": LocalJSX.PostLogo & JSXBase.HTMLAttributes<HTMLPostLogoElement>;
503
503
  "post-main-navigation": LocalJSX.PostMainNavigation & JSXBase.HTMLAttributes<HTMLPostMainNavigationElement>;
504
504
  "post-meta-navigation": LocalJSX.PostMetaNavigation & JSXBase.HTMLAttributes<HTMLPostMetaNavigationElement>;
505
505
  "post-search": LocalJSX.PostSearch & JSXBase.HTMLAttributes<HTMLPostSearchElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swisspost/internet-header",
3
- "version": "1.14.4",
3
+ "version": "1.14.5",
4
4
  "description": "The header for client facing applications.",
5
5
  "author": "Swiss Post <design-system@post.ch>",
6
6
  "license": "Apache-2.0",
@@ -27,7 +27,7 @@
27
27
  "loader/"
28
28
  ],
29
29
  "dependencies": {
30
- "@swisspost/design-system-styles": "8.1.0",
30
+ "@swisspost/design-system-styles": "8.2.0",
31
31
  "body-scroll-lock": "4.0.0-beta.0",
32
32
  "iframe-resizer": "4.4.5",
33
33
  "jquery": "3.7.1",
@@ -35,10 +35,10 @@
35
35
  "url-polyfill": "1.1.12"
36
36
  },
37
37
  "devDependencies": {
38
- "@babel/core": "7.24.9",
39
- "@percy/cli": "1.29.0",
38
+ "@babel/core": "7.25.2",
39
+ "@percy/cli": "1.29.1",
40
40
  "@percy/cypress": "3.1.2",
41
- "@stencil-community/eslint-plugin": "0.7.2",
41
+ "@stencil-community/eslint-plugin": "0.8.0",
42
42
  "@stencil/core": "4.19.2",
43
43
  "@stencil/sass": "3.0.12",
44
44
  "@stencil/store": "2.0.16",
@@ -46,11 +46,11 @@
46
46
  "@types/iframe-resizer": "3.5.13",
47
47
  "@types/jest": "29.5.12",
48
48
  "@types/jquery": "3.5.30",
49
- "@types/node": "20.14.12",
49
+ "@types/node": "20.14.14",
50
50
  "@types/throttle-debounce": "5.0.2",
51
51
  "babel-loader": "9.1.3",
52
52
  "bootstrap": "5.3.3",
53
- "cypress": "13.13.1",
53
+ "cypress": "13.13.2",
54
54
  "cypress-each": "1.14.0",
55
55
  "cypress-storybook": "1.0.0",
56
56
  "eslint": "8.57.0",
@@ -64,8 +64,8 @@
64
64
  "rollup-plugin-scss": "4.0.0",
65
65
  "rollup-plugin-visualizer": "5.12.0",
66
66
  "sass": "1.77.8",
67
- "start-server-and-test": "2.0.4",
68
- "ts-jest": "29.2.3",
67
+ "start-server-and-test": "2.0.5",
68
+ "ts-jest": "29.2.4",
69
69
  "typescript": "5.5.4"
70
70
  },
71
71
  "keywords": [
@@ -1,37 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { s as state } from './store.js';
3
-
4
- const postLogoCss = "@font-face{font-display:swap;font-family:\"Frutiger Neue For Post\";font-weight:700;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\")}@font-face{font-display:swap;font-family:\"Frutiger Neue For Post\";font-weight:700;font-style:italic;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\")}@font-face{font-display:swap;font-family:\"Frutiger Neue For Post\";font-weight:400;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\")}@font-face{font-display:swap;font-family:\"Frutiger Neue For Post\";font-weight:400;font-style:italic;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\")}@font-face{font-display:swap;font-family:\"Frutiger Neue For Post\";font-weight:300;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\")}@font-face{font-display:swap;font-family:\"Frutiger Neue For Post\";font-weight:300;font-style:italic;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\")}.visually-hidden{position:absolute;width:1px;height:1px;border:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0)}.btn-blank{background-color:rgba(0,0,0,0);border:none;border-radius:0;padding:0}.nav-link{outline:none;outline-offset:2px;text-decoration:none;color:rgba(0,0,0,.8);-webkit-transition:color 200ms;transition:color 200ms;background-color:rgba(0,0,0,0);-webkit-box-shadow:none;box-shadow:none;border:0;margin:0;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:.5rem}.nav-link:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.nav-link:hover,.nav-link:focus{color:#000}.nav-link:is(:focus-visible,:focus-within,.pretend-focus){z-index:1;position:relative}.nav-link>svg{width:1.4em;height:1.4em;-ms-flex-negative:0;flex-shrink:0}.nav-link>span{-ms-flex-negative:1;flex-shrink:1}.no-list{list-style:none;padding-left:0;margin-top:0;margin-bottom:0}*,:host,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host{font-family:\"Frutiger Neue For Post\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif}button{font:inherit;padding:0}a,button{border-radius:4px;outline:none;outline-offset:2px}a:is(:focus-visible,:focus-within,.pretend-focus),button:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color);border-radius:4px}img,svg{max-width:100%;max-height:100%}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){svg{color:currentColor;forced-color-adjust:preserve-parent-color}}.box>*:first-child{margin-top:0}.box>*:last-child{margin-bottom:0}.mirrored{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.bold{font-weight:700}.light{font-weight:300}.d-none{display:none !important}.d-flex{display:-ms-flexbox;display:flex}.d-inline-flex{display:-ms-inline-flexbox;display:inline-flex}.align-items-center{-ms-flex-align:center;align-items:center}@media (min-width: 1441px){.wide-container{margin:0 auto;max-width:1440px}}@media (max-width: 599.98px){.container{padding-right:16px;padding-left:16px}}@media (min-width: 600px)and (max-width: 1023.98px){.container{padding-right:32px;padding-left:32px}}@media (min-width: 1024px){.container{padding-right:40px;padding-left:40px}}@media (max-width: -0.02px){.hidden-xs{display:none}}@media (max-width: 399.98px){.hidden-sm{display:none}}@media (max-width: 599.98px){.hidden-rg{display:none}}@media (max-width: 779.98px){.hidden-md{display:none}}@media (max-width: 1023.98px){.hidden-lg{display:none}}@media (max-width: 1279.98px){.hidden-xl{display:none}}@media (max-width: 1439.98px){.hidden-xxl{display:none}}:host{display:block}.logo{display:block;-ms-flex-align:center;align-items:center;background:#fc0}.logo svg{display:block;width:100%;height:100%}";
5
- const PostLogoStyle0 = postLogoCss;
6
-
7
- const PostLogo = /*@__PURE__*/ proxyCustomElement(class PostLogo extends HTMLElement {
8
- constructor() {
9
- super();
10
- this.__registerHost();
11
- this.__attachShadow();
12
- }
13
- render() {
14
- var _a;
15
- if (((_a = state.localizedConfig) === null || _a === void 0 ? void 0 : _a.header.logo) === undefined)
16
- return;
17
- const config = state.localizedConfig.header.logo;
18
- return (h(Host, null, h("a", { href: config.logoLink, class: "logo" }, h("span", { class: "visually-hidden" }, config.logoLinkTitle), h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, h("g", { id: "Logo" }, h("rect", { fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), h("polygon", { fill: "#ff0000", points: "34,32.3 34,19 19.7,19 19.7,29.1 10,29.1 10,42.9 19.7,42.9 19.7,53 34,53 34,39.7 30.6,39.7 30.6,49.8 23.1,49.8 23.1,39.7 13.4,39.7 13.4,32.3 23.1,32.3 23.1,22.2 30.6,22.2 30.6,32.3" }), h("path", { d: "M53.56234,31.10526c0,2.41272-1.99154,4.29475-4.51723,4.29475H45.2v-8.3h3.84511C51.66802,27.1,53.56234,28.78889,53.56234,31.10526z M50.69666,19H36v34h9.2V42.9h5.49666c6.75131,0,11.9971-5.15137,11.9971-11.8057C62.69376,24.39136,57.35099,19,50.69666,19z" }))))));
19
- }
20
- get host() { return this; }
21
- static get style() { return PostLogoStyle0; }
22
- }, [1, "post-logo"]);
23
- function defineCustomElement() {
24
- if (typeof customElements === "undefined") {
25
- return;
26
- }
27
- const components = ["post-logo"];
28
- components.forEach(tagName => { switch (tagName) {
29
- case "post-logo":
30
- if (!customElements.get(tagName)) {
31
- customElements.define(tagName, PostLogo);
32
- }
33
- break;
34
- } });
35
- }
36
-
37
- export { PostLogo as P, defineCustomElement as d };
@@ -1,3 +0,0 @@
1
- export { P as post_logo } from './post-logo-366ed138.js';
2
- import './index-bb0e68fd.js';
3
- import './store-b1332c1e.js';
@@ -1 +0,0 @@
1
- export{P as post_logo}from"./post-logo-366ed138.js";import"./index-bb0e68fd.js";import"./store-b1332c1e.js";
@@ -1 +0,0 @@
1
- export{P as post_logo}from"./p-abd7dbc8.js";import"./p-67f6b5a8.js";import"./p-13453cb0.js";
@@ -1 +0,0 @@
1
- System.register(["./p-793de0f0.system.js","./p-5600adca.system.js","./p-7b27bee6.system.js"],(function(t){"use strict";return{setters:[function(s){t("post_logo",s.P)},function(){},function(){}],execute:function(){}}}));