@swisspost/internet-header 1.15.0 → 1.15.1
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.
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{post-internet-header-d8394275.js → post-internet-header-0bc6191d.js} +2 -2
- package/dist/cjs/swisspost-internet-header.cjs.entry.js +1 -1
- package/dist/components/swisspost-internet-header.js +2 -2
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{post-internet-header-b8322d64.js → post-internet-header-0b3def5c.js} +2 -2
- package/dist/esm/swisspost-internet-header.entry.js +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{post-internet-header-b8322d64.js → post-internet-header-0b3def5c.js} +1 -1
- package/dist/esm-es5/swisspost-internet-header.entry.js +1 -1
- package/dist/swisspost-internet-header/index.esm.js +1 -1
- package/dist/swisspost-internet-header/{p-c2740557.js → p-02f75eb0.js} +1 -1
- package/dist/swisspost-internet-header/{p-e9f5f372.entry.js → p-22328fea.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-85119fa1.system.js → p-2a6f40b8.system.js} +1 -1
- package/dist/swisspost-internet-header/{p-91092813.system.entry.js → p-325b363d.system.entry.js} +1 -1
- package/dist/swisspost-internet-header/{p-7c0498aa.system.js → p-468fb80a.system.js} +1 -1
- package/dist/swisspost-internet-header/p-695fe962.system.js +1 -1
- package/dist/swisspost-internet-header/swisspost-internet-header.esm.js +1 -1
- package/package.json +2 -2
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postInternetHeader = require('./post-internet-header-
|
|
5
|
+
const postInternetHeader = require('./post-internet-header-0bc6191d.js');
|
|
6
6
|
const postInternetBreadcrumbs = require('./post-internet-breadcrumbs-1a8bd582.js');
|
|
7
7
|
const postInternetFooter = require('./post-internet-footer-ca621ca9.js');
|
|
8
8
|
const postSkiplinks = require('./post-skiplinks-894eb1ca.js');
|
|
@@ -368,7 +368,7 @@ const setMainNavigationIds = (navMainEntities) => {
|
|
|
368
368
|
};
|
|
369
369
|
|
|
370
370
|
const name = "@swisspost/internet-header";
|
|
371
|
-
const version = "1.15.
|
|
371
|
+
const version = "1.15.1";
|
|
372
372
|
const description = "The header for client facing applications.";
|
|
373
373
|
const author = "Swiss Post <design-system@post.ch>";
|
|
374
374
|
const license = "Apache-2.0";
|
|
@@ -409,7 +409,7 @@ const scripts = {
|
|
|
409
409
|
generate: "stencil generate"
|
|
410
410
|
};
|
|
411
411
|
const dependencies = {
|
|
412
|
-
"@swisspost/design-system-styles": "workspace:8.
|
|
412
|
+
"@swisspost/design-system-styles": "workspace:8.6.0",
|
|
413
413
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
414
414
|
"iframe-resizer": "4.4.5",
|
|
415
415
|
jquery: "3.7.1",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postInternetHeader = require('./post-internet-header-
|
|
5
|
+
const postInternetHeader = require('./post-internet-header-0bc6191d.js');
|
|
6
6
|
require('./index-ecd8c9bb.js');
|
|
7
7
|
require('./index-fbcc9ff3.js');
|
|
8
8
|
require('./language.service-2a3c77d1.js');
|
|
@@ -373,7 +373,7 @@ const setMainNavigationIds = (navMainEntities) => {
|
|
|
373
373
|
};
|
|
374
374
|
|
|
375
375
|
const name = "@swisspost/internet-header";
|
|
376
|
-
const version = "1.15.
|
|
376
|
+
const version = "1.15.1";
|
|
377
377
|
const description = "The header for client facing applications.";
|
|
378
378
|
const author = "Swiss Post <design-system@post.ch>";
|
|
379
379
|
const license = "Apache-2.0";
|
|
@@ -414,7 +414,7 @@ const scripts = {
|
|
|
414
414
|
generate: "stencil generate"
|
|
415
415
|
};
|
|
416
416
|
const dependencies = {
|
|
417
|
-
"@swisspost/design-system-styles": "workspace:8.
|
|
417
|
+
"@swisspost/design-system-styles": "workspace:8.6.0",
|
|
418
418
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
419
419
|
"iframe-resizer": "4.4.5",
|
|
420
420
|
jquery: "3.7.1",
|
package/dist/docs.json
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { P as PostInternetHeader } from './post-internet-header-
|
|
1
|
+
export { P as PostInternetHeader } from './post-internet-header-0b3def5c.js';
|
|
2
2
|
export { P as PostInternetBreadcrumbs } from './post-internet-breadcrumbs-2370e12d.js';
|
|
3
3
|
export { P as PostInternetFooter } from './post-internet-footer-e6980e19.js';
|
|
4
4
|
export { P as PostSkiplinks } from './post-skiplinks-8c64cda3.js';
|
|
@@ -366,7 +366,7 @@ const setMainNavigationIds = (navMainEntities) => {
|
|
|
366
366
|
};
|
|
367
367
|
|
|
368
368
|
const name = "@swisspost/internet-header";
|
|
369
|
-
const version = "1.15.
|
|
369
|
+
const version = "1.15.1";
|
|
370
370
|
const description = "The header for client facing applications.";
|
|
371
371
|
const author = "Swiss Post <design-system@post.ch>";
|
|
372
372
|
const license = "Apache-2.0";
|
|
@@ -407,7 +407,7 @@ const scripts = {
|
|
|
407
407
|
generate: "stencil generate"
|
|
408
408
|
};
|
|
409
409
|
const dependencies = {
|
|
410
|
-
"@swisspost/design-system-styles": "workspace:8.
|
|
410
|
+
"@swisspost/design-system-styles": "workspace:8.6.0",
|
|
411
411
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
412
412
|
"iframe-resizer": "4.4.5",
|
|
413
413
|
jquery: "3.7.1",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { P as swisspost_internet_header } from './post-internet-header-
|
|
1
|
+
export { P as swisspost_internet_header } from './post-internet-header-0b3def5c.js';
|
|
2
2
|
import './index-bb0e68fd.js';
|
|
3
3
|
import './index-d3f1363d.js';
|
|
4
4
|
import './language.service-490983de.js';
|
package/dist/esm-es5/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as PostInternetHeader}from"./post-internet-header-
|
|
1
|
+
export{P as PostInternetHeader}from"./post-internet-header-0b3def5c.js";export{P as PostInternetBreadcrumbs}from"./post-internet-breadcrumbs-2370e12d.js";export{P as PostInternetFooter}from"./post-internet-footer-e6980e19.js";export{P as PostSkiplinks}from"./post-skiplinks-8c64cda3.js";export{P as PostMetaNavigation}from"./post-meta-navigation-c90e0eab.js";export{P as PostLanguageSwitch}from"./post-language-switch-05672675.js";export{P as PostLogo}from"./post-logo-a10a7614.js";export{P as PostMainNavigation}from"./post-main-navigation-1105de2a.js";export{P as PostSearch}from"./post-search-4314142a.js";export{P as PostKlpLoginWidget}from"./post-klp-login-widget-d0cb76d7.js";import"./index-bb0e68fd.js";import"./index-d3f1363d.js";import"./language.service-490983de.js";import"./store-b1332c1e.js";import"./utils-c8805f81.js";import"./svg-sprite.component-d3726867.js";import"./svg-icon.component-70692acc.js";import"./if.component-d88d9e48.js";import"./bodyScrollLock.esm-afcc00e3.js";import"./ui.service-22f2c593.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,i,o){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function s(t){try{l(o.next(t))}catch(t){r(t)}}function a(t){try{l(o["throw"](t))}catch(t){r(t)}}function l(t){t.done?i(t.value):n(t.value).then(s,a)}l((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,n,r,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(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(o=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;n=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];n=0}finally{o=r=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 o=0,n=e.length,r;o<n;o++){if(r||!(o in e)){if(!r)r=Array.prototype.slice.call(e,0,o);r[o]=e[o]}}return t.concat(r||Array.prototype.slice.call(e))};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-bb0e68fd.js";import{d as debounce,t as throttle}from"./index-d3f1363d.js";import{g as getUserLang,p as persistLanguageChoice,t as translate}from"./language.service-490983de.js";import{u as uniqueId}from"./utils-c8805f81.js";import{s as state,d as dispose}from"./store-b1332c1e.js";import{S as SvgSprite}from"./svg-sprite.component-d3726867.js";import{S as SvgIcon}from"./svg-icon.component-70692acc.js";import{I as If}from"./if.component-d88d9e48.js";var markActiveRoute=function(t,e){if(e===false){return t}var i;t=resetOverrideConfig(t);if(e==="auto"||e==="exact"){if(hasActivePortalRoute(t)){return resetActiveStateToPortalConfig(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 o=compileScoreList(t,i,e);if(o.length===0){return t}var n=o[0];n.main.isActiveOverride=true;if(n.sub)n.sub.isActiveOverride=true;return t};var hasActivePortalRoute=function(t){return t.filter((function(t){return t.isActive})).length>0};var resetActiveStateToPortalConfig=function(t){return t.map((function(t){var e;return Object.assign(Object.assign({},t),{isActiveOverride:t.isActive,flyout:(e=t.flyout)===null||e===void 0?void 0:e.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 resetOverrideConfig=function(t){return t.map((function(t){var e;return Object.assign(Object.assign({},t),{isActiveOverride:false,flyout:((e=t.flyout)===null||e===void 0?void 0:e.map((function(t){return Object.assign(Object.assign({},t),{linkList:t.linkList.map((function(t){return Object.assign(Object.assign({},t),{isActiveOverride:false})}))})})))||[]})}))};var compileScoreList=function(t,e,i){var o=false;var n=[];t.filter((function(t){return!o&&t})).forEach((function(t){var r;try{var s=compareRoutes(e,new URL(t.url),i);o=updateScoreList(n,s,{main:t,score:s},o)}catch(t){}(r=t.flyout)===null||r===void 0?void 0:r.forEach((function(r){var s;(s=r.linkList)===null||s===void 0?void 0:s.forEach((function(r){if(r.isActive&&(i==="auto"||i==="exact")){o=true;return}try{var s=new URL(r.url);var a=compareRoutes(e,s,i);o=updateScoreList(n,a,{main:t,sub:r,score:a},o)}catch(t){}}))}))}));return n.sort((function(t,e){return e.score-t.score}))};function updateScoreList(t,e,i,o){var n=o;if(e>0){if(e===Infinity)n=true;t.push(i)}return n}var compareRoutes=function(t,e,i){if(t===null||e===null||t.origin!==e.origin){return 0}var o=t.pathname.toLocaleLowerCase();var n=e.pathname.toLocaleLowerCase();if(o===n){return Infinity}if(t.pathname.length<e.pathname.length){return 0}if(i==="auto"){var r=__spreadArray([t.origin.toLocaleLowerCase()],o.split("/").filter((function(t){return t!==null&&t!==""})),true);var s=__spreadArray([e.origin.toLocaleLowerCase()],n.split("/").filter((function(t){return t!==null&&t!==""})),true);var a=getSimilarityScore(r,s);return Math.min(r.length,s.length)===a?a:0}return 0};var getSimilarityScore=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 request=null;var osFlyoutCache=null;var getPPMConfig=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 getLocalizedConfig=function(t){return __awaiter(void 0,[t],void 0,(function(t){var e,i,o,n,r,s,a;var l=t.projectId,u=t.environment,c=t.language,d=t.cookieKey,f=t.localStorageKey,h=t.activeRouteProp,p=t.localizedCustomConfig,g=t.osFlyoutOverrides;return __generator(this,(function(t){switch(t.label){case 0:o=getPPMConfig();r=null;if(!o)return[3,1];n=o;s=document.documentElement.lang;return[3,3];case 1:if(request==null){request=fetchConfig(l,u)}return[4,request];case 2:r=t.sent();s=getUserLang(Object.keys(r),c,f,d);if(s===undefined){throw new Error("Internet Header: unable to determine current language")}n=Object.assign({},r[s]);t.label=3;case 3:if(p){a=((e=p===null||p===void 0?void 0:p.header)===null||e===void 0?void 0:e.navMain)?Object.assign(Object.assign({},n.header),{navMain:__spreadArray(__spreadArray([],n.header.navMain,true),p.header.navMain,true)}):n.header;n=Object.assign(Object.assign({},n),{header:a})}if(g)n.header.navMain=mergeOsFlyoutOverrides(n,g);if(h!=null)n.header.navMain=markActiveRoute(n.header.navMain,h);setMainNavigationIds((i=n===null||n===void 0?void 0:n.header)===null||i===void 0?void 0:i.navMain);persistLanguageChoice(s,d,f);return[2,n]}}))}))};var mergeOsFlyoutOverrides=function(t,e){if(e==null)return t.header.navMain;return t.header.navMain.map((function(t){var i,o,n;if(t.id!=="flyout_os")return t;if(osFlyoutCache===null){osFlyoutCache=JSON.parse(JSON.stringify(t))}var r=(i=e.text)!==null&&i!==void 0?i:osFlyoutCache.text;var s=(o=e.title)!==null&&o!==void 0?o:osFlyoutCache.title;if(osFlyoutCache.flyout==null||osFlyoutCache.flyout.length===0||e.flyout==null||e.flyout.length===0)return Object.assign(Object.assign({},t),{title:s,text:r});var a=__spreadArray(__spreadArray([],osFlyoutCache.flyout.map((function(t,i){var o,n;var r=(o=e.flyout)===null||o===void 0?void 0:o[i];var s=(n=r===null||r===void 0?void 0:r.title)!==null&&n!==void 0?n:t.title;var a=(r===null||r===void 0?void 0:r.linkList)!=null?r.linkList:[];return{title:s,linkList:__spreadArray(__spreadArray([],t.linkList,true),a,true)}})),true),((n=e.flyout)===null||n===void 0?void 0:n.slice(osFlyoutCache.flyout.length))||[],true);return Object.assign(Object.assign({},t),{text:r,title:s,flyout:a})}))};var fetchConfig=function(t,e){return __awaiter(void 0,void 0,void 0,(function(){var i,o,n;return __generator(this,(function(r){switch(r.label){case 0:if(!isValidProjectId(t)){throw new Error('Internet Header: invalid project id "'.concat(t,'"'))}if(t==="test"){e="int01"}i=generateConfigUrl(t,e);r.label=1;case 1:r.trys.push([1,4,,5]);return[4,fetch(i)];case 2:o=r.sent();return[4,o.json()];case 3:return[2,r.sent()];case 4:n=r.sent();throw new Error("Internet Header: fetching config failed. ".concat(n.message));case 5:return[2]}}))}))};var generateConfigUrl=function(t,e){if(t==="test")return"assets/config/test-configuration.json";var i=e.toLowerCase();var o=i==="prod";var n="https://".concat(o?"www":"int",".post.ch");try{return new URL("".concat(n,"/api/headerjs/Json?serviceid=").concat(encodeURIComponent(t)).concat(!o?"&environment="+i:"")).toString()}catch(t){throw new Error("Internet Header: Config URL is invalid.")}};var isValidProjectId=function(t){return t!==""&&t.length>0&&/^[a-zA-Z][\w-]*[a-zA-Z0-9]$/.test(t)};var getLocalizedCustomConfig=function(t,e){var i;var o;try{o=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 n=o[e];if((i=n===null||n===void 0?void 0:n.header)===null||i===void 0?void 0:i.navMain)setMainNavigationIds(n.header.navMain);return n};var setMainNavigationIds=function(t){t.forEach((function(t){t.id=t.id==="flyout_os"?t.id:uniqueId("main-nav-")}))};var name="@swisspost/internet-header";var version="1.15.0";var description="The header for client facing applications.";var author="Swiss Post <design-system@post.ch>";var license="Apache-2.0";var repository={type:"git",url:"https://github.com/swisspost/design-system.git"};var homepage="https://design-system.post.ch";var bugs={url:"https://github.com/swisspost/design-system/issues"};var main="loader/index.cjs.js";var module="loader/index.js";var es2017="loader/index.es2017.js";var types="loader/index.d.ts";var collection="dist/collection/collection-manifest.json";var unpkg="dist/swisspost-internet-header/swisspost-internet-header.esm.js";var publishConfig={access:"public"};var files=["dist/","loader/"];var scripts={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 dependencies={"@swisspost/design-system-styles":"workspace:8.5.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 devDependencies={"@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 keywords=["components","web-components","header","stencil","design-system","ui","frontend"];var packageJson={name:name,version:version,description:description,author:author,license:license,repository:repository,homepage:homepage,bugs:bugs,main:main,module:module,es2017:es2017,types:types,collection:collection,"collection:main":"dist/collection/index.js",unpkg:unpkg,publishConfig:publishConfig,files:files,scripts:scripts,dependencies:dependencies,devDependencies:devDependencies,keywords:keywords};var isScrollable=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 getScrollParent=function(t){var e=t.parentElement;while(e){if(e.nodeName==="BODY"){return document}if(isScrollable(e)){return e}e=e.parentElement}return document};var getLogoScale=function(t,e){var i=getScrollParent(t);var o=i instanceof Element?i.scrollTop:i.documentElement.scrollTop;var n=state.stickyness==="full"?0:o;var r,s;if(e){r=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;r=s+parseFloat(a.getPropertyValue("--header-height"))*l}var u=1;if(s>0){u=Math.max((r-Math.max(n,0))/(r-s),1)}return u.toString()};var registerLogoAnimationObserver=function(t,e){var i=getScrollParent(e);var o=function(){e.style.setProperty("--logo-scale",getLogoScale(e,t))};var n=debounce(150,o);var r=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting&&t.intersectionRatio>0){i.addEventListener("scroll",o,{passive:true});window.addEventListener("resize",n);window.requestAnimationFrame(o)}else{i.removeEventListener("scroll",o);window.removeEventListener("resize",n);window.requestAnimationFrame(o)}}))}),{threshold:[0,.001]});r.observe(t);return o};var postInternetHeaderCss=':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 SwisspostInternetHeaderStyle0=postInternetHeaderCss;var PostInternetHeader=function(){function t(t){registerInstance(this,t);this.headerLoaded=createEvent(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===""||!isValidProjectId(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=state.currentLanguage)!==null&&t!==void 0?t:"de"]}))}))};t.prototype.connectedCallback=function(){var t=this;this.throttledScroll=throttle(300,(function(){return t.handleScrollEvent()}));this.debouncedResize=debounce(200,(function(){return t.handleResize()}))};t.prototype.disconnectedCallback=function(){this.scrollParent.removeEventListener("scroll",this.throttledScroll);this.scrollParent.removeEventListener("resize",this.debouncedResize);dispose()};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,o;return __generator(this,(function(n){switch(n.label){case 0:this.scrollParent=getScrollParent(this.host);this.scrollParent.addEventListener("scroll",this.throttledScroll,{passive:true});this.scrollParent.addEventListener("resize",this.debouncedResize,{passive:true});n.label=1;case 1:n.trys.push([1,3,,4]);state.projectId=this.project;state.stickyness=this.stickyness;state.environment=this.environment.toLocaleLowerCase();if(this.language!==undefined)state.currentLanguage=this.language;state.languageSwitchOverrides=typeof this.languageSwitchOverrides==="string"?JSON.parse(this.languageSwitchOverrides):this.languageSwitchOverrides;state.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=state.currentLanguage||getUserLang(t,this.language);state.localizedCustomConfig=getLocalizedCustomConfig(this.customConfig,e)}i=state;return[4,getLocalizedConfig({projectId:this.project,environment:state.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:state.localizedCustomConfig,osFlyoutOverrides:state.osFlyoutOverrides})];case 2:i.localizedConfig=n.sent();return[3,4];case 3:o=n.sent();console.error(o);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=registerLogoAnimationObserver(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:state.currentLanguage=t;e=state;return[4,getLocalizedConfig({projectId:this.project,environment:this.environment,language:t,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:state.localizedCustomConfig,osFlyoutOverrides:state.osFlyoutOverrides})];case 1:e.localizedConfig=i.sent();if(this.customConfig!==undefined)state.localizedCustomConfig=getLocalizedCustomConfig(this.customConfig,t);return[2]}}))}))};t.prototype.handleAvailableLanguagesChange=function(t){state.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:state.osFlyoutOverrides=typeof t==="string"?JSON.parse(t):t;e=state;return[4,getLocalizedConfig({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:state.localizedCustomConfig,osFlyoutOverrides:state.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=state;return[4,getLocalizedConfig({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:t,localizedCustomConfig:state.localizedCustomConfig,osFlyoutOverrides:state.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(o){switch(o.label){case 0:if(this.language===undefined)return[2];e=getLocalizedCustomConfig(t,this.language);state.localizedCustomConfig=e;i=state;return[4,getLocalizedConfig({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:e,osFlyoutOverrides:state.osFlyoutOverrides})];case 1:i.localizedConfig=o.sent();return[2]}}))}))};t.prototype.handleSearchChange=function(t){state.search=t};t.prototype.handleLoginChange=function(t){state.login=t};t.prototype.handleMetaChange=function(t){state.meta=t};t.prototype.handleLanguageChangeEvent=function(t){void this.handleLanguageChange(t.detail)};t.prototype.handleStickynessChange=function(t){state.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=state.localizedConfig)===null||e===void 0?void 0:e.header)){console.error(new Error("Internet Header: Config cannot be loaded"));return}var n=state.localizedConfig;var r=this.meta&&n.header.navMeta!==undefined&&((i=n.header.navMeta)===null||i===void 0?void 0:i.filter((function(t){return!t.isHomeLink})).length)>0;var s=((o=this.login)!==null&&o!==void 0?o:!n.header.isLoginWidgetHidden)&&n.header.loginWidgetOptions;var a=n.header.navLang.length>1;var l=r?getLogoScale(this.host):"1";return h(Host,{class:"stickyness-".concat(this.stickyness," ").concat(Boolean(this.activeDropdownElement)||Boolean(this.activeFlyout)?"dropdown-open":""),"data-version":packageJson.version,onKeyup:function(e){return t.handleKeyUp(e)},style:{"--logo-scale":l}},h("header",{class:"post-internet-header".concat(this.fullWidth?" full-width":"")},h(SvgSprite,null),h("h1",{class:"visually-hidden"},translate("Navigate on post.ch")),h(If,{condition:this.skiplinks},h("post-skiplinks",null)),h(If,{condition:r},h("post-meta-navigation",{orientation:"horizontal",class:"hidden-lg","full-width":this.fullWidth,ref:function(e){return t.metaNav=e}},h(If,{condition:a},h("post-language-switch",{id:"post-language-switch-desktop",mode:"dropdown",onDropdownToggled:function(e){return t.handleDropdownToggled(e)}})))),h("div",{class:"main-navigation-container wide-container"},h("post-header-logo",null),h("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"},h("span",{class:"menu-button-text visually-hidden"},n.header.mobileMenu.text),h(SvgIcon,{name:this.isMainNavOpen()?"pi-close":"pi-menu"})),h("post-main-navigation",{onDropdownToggled:function(e){return t.handleDropdownToggled(e)},onFlyoutToggled:function(e){return t.handleFlyoutToggled(e)},ref:function(e){return t.mainNav=e}},h(If,{condition:r},h("post-meta-navigation",{orientation:"vertical"},h(If,{condition:a},h("post-language-switch",{id:"post-language-switch-mobile",mode:"list"}))))),h("div",{class:"main-navigation-controls"},h("div",{class:"main-navigation-custom-content".concat(this.isMainSlotEmpty?" d-none":"")},h("slot",{name:"main",onSlotchange:function(e){return t.handleMainSlotChange(e)}})),h(If,{condition:this.search},h("post-search",{onDropdownToggled:function(e){return t.handleDropdownToggled(e)}})),h(If,{condition:!!s},h("post-klp-login-widget",{"logout-url":this.logoutUrl},h("slot",{name:"login-widget"}))),h(If,{condition:!r&&a},h("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 getElement(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}();PostInternetHeader.style=SwisspostInternetHeaderStyle0;export{PostInternetHeader as P};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,i,o){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function s(t){try{l(o.next(t))}catch(t){r(t)}}function a(t){try{l(o["throw"](t))}catch(t){r(t)}}function l(t){t.done?i(t.value):n(t.value).then(s,a)}l((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,n,r,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(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(o=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;n=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];n=0}finally{o=r=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 o=0,n=e.length,r;o<n;o++){if(r||!(o in e)){if(!r)r=Array.prototype.slice.call(e,0,o);r[o]=e[o]}}return t.concat(r||Array.prototype.slice.call(e))};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-bb0e68fd.js";import{d as debounce,t as throttle}from"./index-d3f1363d.js";import{g as getUserLang,p as persistLanguageChoice,t as translate}from"./language.service-490983de.js";import{u as uniqueId}from"./utils-c8805f81.js";import{s as state,d as dispose}from"./store-b1332c1e.js";import{S as SvgSprite}from"./svg-sprite.component-d3726867.js";import{S as SvgIcon}from"./svg-icon.component-70692acc.js";import{I as If}from"./if.component-d88d9e48.js";var markActiveRoute=function(t,e){if(e===false){return t}var i;t=resetOverrideConfig(t);if(e==="auto"||e==="exact"){if(hasActivePortalRoute(t)){return resetActiveStateToPortalConfig(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 o=compileScoreList(t,i,e);if(o.length===0){return t}var n=o[0];n.main.isActiveOverride=true;if(n.sub)n.sub.isActiveOverride=true;return t};var hasActivePortalRoute=function(t){return t.filter((function(t){return t.isActive})).length>0};var resetActiveStateToPortalConfig=function(t){return t.map((function(t){var e;return Object.assign(Object.assign({},t),{isActiveOverride:t.isActive,flyout:(e=t.flyout)===null||e===void 0?void 0:e.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 resetOverrideConfig=function(t){return t.map((function(t){var e;return Object.assign(Object.assign({},t),{isActiveOverride:false,flyout:((e=t.flyout)===null||e===void 0?void 0:e.map((function(t){return Object.assign(Object.assign({},t),{linkList:t.linkList.map((function(t){return Object.assign(Object.assign({},t),{isActiveOverride:false})}))})})))||[]})}))};var compileScoreList=function(t,e,i){var o=false;var n=[];t.filter((function(t){return!o&&t})).forEach((function(t){var r;try{var s=compareRoutes(e,new URL(t.url),i);o=updateScoreList(n,s,{main:t,score:s},o)}catch(t){}(r=t.flyout)===null||r===void 0?void 0:r.forEach((function(r){var s;(s=r.linkList)===null||s===void 0?void 0:s.forEach((function(r){if(r.isActive&&(i==="auto"||i==="exact")){o=true;return}try{var s=new URL(r.url);var a=compareRoutes(e,s,i);o=updateScoreList(n,a,{main:t,sub:r,score:a},o)}catch(t){}}))}))}));return n.sort((function(t,e){return e.score-t.score}))};function updateScoreList(t,e,i,o){var n=o;if(e>0){if(e===Infinity)n=true;t.push(i)}return n}var compareRoutes=function(t,e,i){if(t===null||e===null||t.origin!==e.origin){return 0}var o=t.pathname.toLocaleLowerCase();var n=e.pathname.toLocaleLowerCase();if(o===n){return Infinity}if(t.pathname.length<e.pathname.length){return 0}if(i==="auto"){var r=__spreadArray([t.origin.toLocaleLowerCase()],o.split("/").filter((function(t){return t!==null&&t!==""})),true);var s=__spreadArray([e.origin.toLocaleLowerCase()],n.split("/").filter((function(t){return t!==null&&t!==""})),true);var a=getSimilarityScore(r,s);return Math.min(r.length,s.length)===a?a:0}return 0};var getSimilarityScore=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 request=null;var osFlyoutCache=null;var getPPMConfig=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 getLocalizedConfig=function(t){return __awaiter(void 0,[t],void 0,(function(t){var e,i,o,n,r,s,a;var l=t.projectId,u=t.environment,c=t.language,d=t.cookieKey,f=t.localStorageKey,h=t.activeRouteProp,p=t.localizedCustomConfig,g=t.osFlyoutOverrides;return __generator(this,(function(t){switch(t.label){case 0:o=getPPMConfig();r=null;if(!o)return[3,1];n=o;s=document.documentElement.lang;return[3,3];case 1:if(request==null){request=fetchConfig(l,u)}return[4,request];case 2:r=t.sent();s=getUserLang(Object.keys(r),c,f,d);if(s===undefined){throw new Error("Internet Header: unable to determine current language")}n=Object.assign({},r[s]);t.label=3;case 3:if(p){a=((e=p===null||p===void 0?void 0:p.header)===null||e===void 0?void 0:e.navMain)?Object.assign(Object.assign({},n.header),{navMain:__spreadArray(__spreadArray([],n.header.navMain,true),p.header.navMain,true)}):n.header;n=Object.assign(Object.assign({},n),{header:a})}if(g)n.header.navMain=mergeOsFlyoutOverrides(n,g);if(h!=null)n.header.navMain=markActiveRoute(n.header.navMain,h);setMainNavigationIds((i=n===null||n===void 0?void 0:n.header)===null||i===void 0?void 0:i.navMain);persistLanguageChoice(s,d,f);return[2,n]}}))}))};var mergeOsFlyoutOverrides=function(t,e){if(e==null)return t.header.navMain;return t.header.navMain.map((function(t){var i,o,n;if(t.id!=="flyout_os")return t;if(osFlyoutCache===null){osFlyoutCache=JSON.parse(JSON.stringify(t))}var r=(i=e.text)!==null&&i!==void 0?i:osFlyoutCache.text;var s=(o=e.title)!==null&&o!==void 0?o:osFlyoutCache.title;if(osFlyoutCache.flyout==null||osFlyoutCache.flyout.length===0||e.flyout==null||e.flyout.length===0)return Object.assign(Object.assign({},t),{title:s,text:r});var a=__spreadArray(__spreadArray([],osFlyoutCache.flyout.map((function(t,i){var o,n;var r=(o=e.flyout)===null||o===void 0?void 0:o[i];var s=(n=r===null||r===void 0?void 0:r.title)!==null&&n!==void 0?n:t.title;var a=(r===null||r===void 0?void 0:r.linkList)!=null?r.linkList:[];return{title:s,linkList:__spreadArray(__spreadArray([],t.linkList,true),a,true)}})),true),((n=e.flyout)===null||n===void 0?void 0:n.slice(osFlyoutCache.flyout.length))||[],true);return Object.assign(Object.assign({},t),{text:r,title:s,flyout:a})}))};var fetchConfig=function(t,e){return __awaiter(void 0,void 0,void 0,(function(){var i,o,n;return __generator(this,(function(r){switch(r.label){case 0:if(!isValidProjectId(t)){throw new Error('Internet Header: invalid project id "'.concat(t,'"'))}if(t==="test"){e="int01"}i=generateConfigUrl(t,e);r.label=1;case 1:r.trys.push([1,4,,5]);return[4,fetch(i)];case 2:o=r.sent();return[4,o.json()];case 3:return[2,r.sent()];case 4:n=r.sent();throw new Error("Internet Header: fetching config failed. ".concat(n.message));case 5:return[2]}}))}))};var generateConfigUrl=function(t,e){if(t==="test")return"assets/config/test-configuration.json";var i=e.toLowerCase();var o=i==="prod";var n="https://".concat(o?"www":"int",".post.ch");try{return new URL("".concat(n,"/api/headerjs/Json?serviceid=").concat(encodeURIComponent(t)).concat(!o?"&environment="+i:"")).toString()}catch(t){throw new Error("Internet Header: Config URL is invalid.")}};var isValidProjectId=function(t){return t!==""&&t.length>0&&/^[a-zA-Z][\w-]*[a-zA-Z0-9]$/.test(t)};var getLocalizedCustomConfig=function(t,e){var i;var o;try{o=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 n=o[e];if((i=n===null||n===void 0?void 0:n.header)===null||i===void 0?void 0:i.navMain)setMainNavigationIds(n.header.navMain);return n};var setMainNavigationIds=function(t){t.forEach((function(t){t.id=t.id==="flyout_os"?t.id:uniqueId("main-nav-")}))};var name="@swisspost/internet-header";var version="1.15.1";var description="The header for client facing applications.";var author="Swiss Post <design-system@post.ch>";var license="Apache-2.0";var repository={type:"git",url:"https://github.com/swisspost/design-system.git"};var homepage="https://design-system.post.ch";var bugs={url:"https://github.com/swisspost/design-system/issues"};var main="loader/index.cjs.js";var module="loader/index.js";var es2017="loader/index.es2017.js";var types="loader/index.d.ts";var collection="dist/collection/collection-manifest.json";var unpkg="dist/swisspost-internet-header/swisspost-internet-header.esm.js";var publishConfig={access:"public"};var files=["dist/","loader/"];var scripts={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 dependencies={"@swisspost/design-system-styles":"workspace:8.6.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 devDependencies={"@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 keywords=["components","web-components","header","stencil","design-system","ui","frontend"];var packageJson={name:name,version:version,description:description,author:author,license:license,repository:repository,homepage:homepage,bugs:bugs,main:main,module:module,es2017:es2017,types:types,collection:collection,"collection:main":"dist/collection/index.js",unpkg:unpkg,publishConfig:publishConfig,files:files,scripts:scripts,dependencies:dependencies,devDependencies:devDependencies,keywords:keywords};var isScrollable=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 getScrollParent=function(t){var e=t.parentElement;while(e){if(e.nodeName==="BODY"){return document}if(isScrollable(e)){return e}e=e.parentElement}return document};var getLogoScale=function(t,e){var i=getScrollParent(t);var o=i instanceof Element?i.scrollTop:i.documentElement.scrollTop;var n=state.stickyness==="full"?0:o;var r,s;if(e){r=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;r=s+parseFloat(a.getPropertyValue("--header-height"))*l}var u=1;if(s>0){u=Math.max((r-Math.max(n,0))/(r-s),1)}return u.toString()};var registerLogoAnimationObserver=function(t,e){var i=getScrollParent(e);var o=function(){e.style.setProperty("--logo-scale",getLogoScale(e,t))};var n=debounce(150,o);var r=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting&&t.intersectionRatio>0){i.addEventListener("scroll",o,{passive:true});window.addEventListener("resize",n);window.requestAnimationFrame(o)}else{i.removeEventListener("scroll",o);window.removeEventListener("resize",n);window.requestAnimationFrame(o)}}))}),{threshold:[0,.001]});r.observe(t);return o};var postInternetHeaderCss=':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 SwisspostInternetHeaderStyle0=postInternetHeaderCss;var PostInternetHeader=function(){function t(t){registerInstance(this,t);this.headerLoaded=createEvent(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===""||!isValidProjectId(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=state.currentLanguage)!==null&&t!==void 0?t:"de"]}))}))};t.prototype.connectedCallback=function(){var t=this;this.throttledScroll=throttle(300,(function(){return t.handleScrollEvent()}));this.debouncedResize=debounce(200,(function(){return t.handleResize()}))};t.prototype.disconnectedCallback=function(){this.scrollParent.removeEventListener("scroll",this.throttledScroll);this.scrollParent.removeEventListener("resize",this.debouncedResize);dispose()};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,o;return __generator(this,(function(n){switch(n.label){case 0:this.scrollParent=getScrollParent(this.host);this.scrollParent.addEventListener("scroll",this.throttledScroll,{passive:true});this.scrollParent.addEventListener("resize",this.debouncedResize,{passive:true});n.label=1;case 1:n.trys.push([1,3,,4]);state.projectId=this.project;state.stickyness=this.stickyness;state.environment=this.environment.toLocaleLowerCase();if(this.language!==undefined)state.currentLanguage=this.language;state.languageSwitchOverrides=typeof this.languageSwitchOverrides==="string"?JSON.parse(this.languageSwitchOverrides):this.languageSwitchOverrides;state.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=state.currentLanguage||getUserLang(t,this.language);state.localizedCustomConfig=getLocalizedCustomConfig(this.customConfig,e)}i=state;return[4,getLocalizedConfig({projectId:this.project,environment:state.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:state.localizedCustomConfig,osFlyoutOverrides:state.osFlyoutOverrides})];case 2:i.localizedConfig=n.sent();return[3,4];case 3:o=n.sent();console.error(o);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=registerLogoAnimationObserver(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:state.currentLanguage=t;e=state;return[4,getLocalizedConfig({projectId:this.project,environment:this.environment,language:t,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:state.localizedCustomConfig,osFlyoutOverrides:state.osFlyoutOverrides})];case 1:e.localizedConfig=i.sent();if(this.customConfig!==undefined)state.localizedCustomConfig=getLocalizedCustomConfig(this.customConfig,t);return[2]}}))}))};t.prototype.handleAvailableLanguagesChange=function(t){state.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:state.osFlyoutOverrides=typeof t==="string"?JSON.parse(t):t;e=state;return[4,getLocalizedConfig({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:state.localizedCustomConfig,osFlyoutOverrides:state.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=state;return[4,getLocalizedConfig({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:t,localizedCustomConfig:state.localizedCustomConfig,osFlyoutOverrides:state.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(o){switch(o.label){case 0:if(this.language===undefined)return[2];e=getLocalizedCustomConfig(t,this.language);state.localizedCustomConfig=e;i=state;return[4,getLocalizedConfig({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:e,osFlyoutOverrides:state.osFlyoutOverrides})];case 1:i.localizedConfig=o.sent();return[2]}}))}))};t.prototype.handleSearchChange=function(t){state.search=t};t.prototype.handleLoginChange=function(t){state.login=t};t.prototype.handleMetaChange=function(t){state.meta=t};t.prototype.handleLanguageChangeEvent=function(t){void this.handleLanguageChange(t.detail)};t.prototype.handleStickynessChange=function(t){state.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=state.localizedConfig)===null||e===void 0?void 0:e.header)){console.error(new Error("Internet Header: Config cannot be loaded"));return}var n=state.localizedConfig;var r=this.meta&&n.header.navMeta!==undefined&&((i=n.header.navMeta)===null||i===void 0?void 0:i.filter((function(t){return!t.isHomeLink})).length)>0;var s=((o=this.login)!==null&&o!==void 0?o:!n.header.isLoginWidgetHidden)&&n.header.loginWidgetOptions;var a=n.header.navLang.length>1;var l=r?getLogoScale(this.host):"1";return h(Host,{class:"stickyness-".concat(this.stickyness," ").concat(Boolean(this.activeDropdownElement)||Boolean(this.activeFlyout)?"dropdown-open":""),"data-version":packageJson.version,onKeyup:function(e){return t.handleKeyUp(e)},style:{"--logo-scale":l}},h("header",{class:"post-internet-header".concat(this.fullWidth?" full-width":"")},h(SvgSprite,null),h("h1",{class:"visually-hidden"},translate("Navigate on post.ch")),h(If,{condition:this.skiplinks},h("post-skiplinks",null)),h(If,{condition:r},h("post-meta-navigation",{orientation:"horizontal",class:"hidden-lg","full-width":this.fullWidth,ref:function(e){return t.metaNav=e}},h(If,{condition:a},h("post-language-switch",{id:"post-language-switch-desktop",mode:"dropdown",onDropdownToggled:function(e){return t.handleDropdownToggled(e)}})))),h("div",{class:"main-navigation-container wide-container"},h("post-header-logo",null),h("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"},h("span",{class:"menu-button-text visually-hidden"},n.header.mobileMenu.text),h(SvgIcon,{name:this.isMainNavOpen()?"pi-close":"pi-menu"})),h("post-main-navigation",{onDropdownToggled:function(e){return t.handleDropdownToggled(e)},onFlyoutToggled:function(e){return t.handleFlyoutToggled(e)},ref:function(e){return t.mainNav=e}},h(If,{condition:r},h("post-meta-navigation",{orientation:"vertical"},h(If,{condition:a},h("post-language-switch",{id:"post-language-switch-mobile",mode:"list"}))))),h("div",{class:"main-navigation-controls"},h("div",{class:"main-navigation-custom-content".concat(this.isMainSlotEmpty?" d-none":"")},h("slot",{name:"main",onSlotchange:function(e){return t.handleMainSlotChange(e)}})),h(If,{condition:this.search},h("post-search",{onDropdownToggled:function(e){return t.handleDropdownToggled(e)}})),h(If,{condition:!!s},h("post-klp-login-widget",{"logout-url":this.logoutUrl},h("slot",{name:"login-widget"}))),h(If,{condition:!r&&a},h("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 getElement(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}();PostInternetHeader.style=SwisspostInternetHeaderStyle0;export{PostInternetHeader as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as swisspost_internet_header}from"./post-internet-header-
|
|
1
|
+
export{P as swisspost_internet_header}from"./post-internet-header-0b3def5c.js";import"./index-bb0e68fd.js";import"./index-d3f1363d.js";import"./language.service-490983de.js";import"./store-b1332c1e.js";import"./utils-c8805f81.js";import"./svg-sprite.component-d3726867.js";import"./svg-icon.component-70692acc.js";import"./if.component-d88d9e48.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as PostInternetHeader}from"./p-
|
|
1
|
+
export{P as PostInternetHeader}from"./p-02f75eb0.js";export{P as PostInternetBreadcrumbs}from"./p-ef0ad4df.js";export{P as PostInternetFooter}from"./p-cf968189.js";export{P as PostSkiplinks}from"./p-feac8b80.js";export{P as PostMetaNavigation}from"./p-24933caa.js";export{P as PostLanguageSwitch}from"./p-72be908b.js";export{P as PostLogo}from"./p-8f8d8912.js";export{P as PostMainNavigation}from"./p-a38fcaca.js";export{P as PostSearch}from"./p-3036187e.js";export{P as PostKlpLoginWidget}from"./p-89d3591d.js";import"./p-67f6b5a8.js";import"./p-151d419a.js";import"./p-709f2c44.js";import"./p-13453cb0.js";import"./p-a39139a9.js";import"./p-9fee809c.js";import"./p-a0313d87.js";import"./p-840aa5c6.js";import"./p-a119b38d.js";import"./p-dc2f1d20.js";
|
|
@@ -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 r}from"./p-151d419a.js";import{g as a,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 u}from"./p-a0313d87.js";import{I as f}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))],r=b(i,s);return Math.min(i.length,s.length)===r?r: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:r,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,u,f=null;if(g)p=g,u=document.documentElement.lang;else{if(null==w&&(w=O(t,e)),f=await w,u=a(Object.keys(f),i,n,o),void 0===u)throw new Error("Internet Header: unable to determine current language");p=Object.assign({},f[u])}if(r){const t=(null===(d=null==r?void 0:r.header)||void 0===d?void 0:d.navMain)?Object.assign(Object.assign({},p.header),{navMain:[...p.header.navMain,...r.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=>{var e;return Object.assign(Object.assign({},t),{isActiveOverride:!1,flyout:(null===(e=t.flyout)||void 0===e?void 0:e.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=>{var e;return Object.assign(Object.assign({},t),{isActiveOverride:t.isActive,flyout:null===(e=t.flyout)||void 0===e?void 0:e.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=>{var s;try{const s=v(e,new URL(t.url),i);o=m(n,s,{main:t,score:s},o)}catch(t){}null===(s=t.flyout)||void 0===s||s.forEach((s=>{var r;null===(r=s.linkList)||void 0===r||r.forEach((s=>{if(!s.isActive||"auto"!==i&&"exact"!==i)try{const r=new URL(s.url),a=v(e,r,i);o=m(n,a,{main:t,sub:s,score:a},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(u,o,n),p},k=(t,e)=>null==e?t.header.navMain:t.header.navMain.map((t=>{var i,o,n;if("flyout_os"!==t.id)return t;null===y&&(y=JSON.parse(JSON.stringify(t)));const s=null!==(i=e.text)&&void 0!==i?i:y.text,r=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:r,text:s});const a=[...y.flyout.map(((t,i)=>{var o,n;const s=null===(o=e.flyout)||void 0===o?void 0:o[i];return{title:null!==(n=null==s?void 0:s.title)&&void 0!==n?n:t.title,linkList:[...t.linkList,...null!=(null==s?void 0:s.linkList)?s.linkList:[]]}})),...(null===(n=e.flyout)||void 0===n?void 0:n.slice(y.flyout.length))||[]];return Object.assign(Object.assign({},t),{text:s,title:r,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,r;if(e)s=t.clientHeight-1,r=e.clientHeight;else{const e=window.getComputedStyle(t),i=parseFloat(e.getPropertyValue("font-size"));r=parseFloat(e.getPropertyValue("--meta-header-height"))*i,s=r+parseFloat(e.getPropertyValue("--header-height"))*i}let a=1;return r>0&&(a=Math.max((s-Math.max(n,0))/(s-r),1)),a.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=r(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||a(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,r=this.meta&&void 0!==s.header.navMeta&&(null===(e=s.header.navMeta)||void 0===e?void 0:e.filter((t=>!t.isHomeLink)).length)>0,a=(null!==(n=this.login)&&void 0!==n?n:!s.header.isLoginWidgetHidden)&&s.header.loginWidgetOptions,l=s.header.navLang.length>1,d=r?I(this.host):"1";return i(o,{class:`stickyness-${this.stickyness} ${Boolean(this.activeDropdownElement)||Boolean(this.activeFlyout)?"dropdown-open":""}`,"data-version":"1.15.0",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(f,{condition:this.skiplinks},i("post-skiplinks",null)),i(f,{condition:r},i("post-meta-navigation",{orientation:"horizontal",class:"hidden-lg","full-width":this.fullWidth,ref:t=>this.metaNav=t},i(f,{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(u,{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(f,{condition:r},i("post-meta-navigation",{orientation:"vertical"},i(f,{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(f,{condition:this.search},i("post-search",{onDropdownToggled:t=>this.handleDropdownToggled(t)})),i(f,{condition:!!a},i("post-klp-login-widget",{"logout-url":this.logoutUrl},i("slot",{name:"login-widget"}))),i(f,{condition:!r&&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
|
+
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 r}from"./p-151d419a.js";import{g as a,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 u}from"./p-a0313d87.js";import{I as f}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))],r=b(i,s);return Math.min(i.length,s.length)===r?r: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:r,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,u,f=null;if(g)p=g,u=document.documentElement.lang;else{if(null==w&&(w=O(t,e)),f=await w,u=a(Object.keys(f),i,n,o),void 0===u)throw new Error("Internet Header: unable to determine current language");p=Object.assign({},f[u])}if(r){const t=(null===(d=null==r?void 0:r.header)||void 0===d?void 0:d.navMain)?Object.assign(Object.assign({},p.header),{navMain:[...p.header.navMain,...r.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=>{var e;return Object.assign(Object.assign({},t),{isActiveOverride:!1,flyout:(null===(e=t.flyout)||void 0===e?void 0:e.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=>{var e;return Object.assign(Object.assign({},t),{isActiveOverride:t.isActive,flyout:null===(e=t.flyout)||void 0===e?void 0:e.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=>{var s;try{const s=v(e,new URL(t.url),i);o=m(n,s,{main:t,score:s},o)}catch(t){}null===(s=t.flyout)||void 0===s||s.forEach((s=>{var r;null===(r=s.linkList)||void 0===r||r.forEach((s=>{if(!s.isActive||"auto"!==i&&"exact"!==i)try{const r=new URL(s.url),a=v(e,r,i);o=m(n,a,{main:t,sub:s,score:a},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(u,o,n),p},k=(t,e)=>null==e?t.header.navMain:t.header.navMain.map((t=>{var i,o,n;if("flyout_os"!==t.id)return t;null===y&&(y=JSON.parse(JSON.stringify(t)));const s=null!==(i=e.text)&&void 0!==i?i:y.text,r=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:r,text:s});const a=[...y.flyout.map(((t,i)=>{var o,n;const s=null===(o=e.flyout)||void 0===o?void 0:o[i];return{title:null!==(n=null==s?void 0:s.title)&&void 0!==n?n:t.title,linkList:[...t.linkList,...null!=(null==s?void 0:s.linkList)?s.linkList:[]]}})),...(null===(n=e.flyout)||void 0===n?void 0:n.slice(y.flyout.length))||[]];return Object.assign(Object.assign({},t),{text:s,title:r,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,r;if(e)s=t.clientHeight-1,r=e.clientHeight;else{const e=window.getComputedStyle(t),i=parseFloat(e.getPropertyValue("font-size"));r=parseFloat(e.getPropertyValue("--meta-header-height"))*i,s=r+parseFloat(e.getPropertyValue("--header-height"))*i}let a=1;return r>0&&(a=Math.max((s-Math.max(n,0))/(s-r),1)),a.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=r(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||a(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,r=this.meta&&void 0!==s.header.navMeta&&(null===(e=s.header.navMeta)||void 0===e?void 0:e.filter((t=>!t.isHomeLink)).length)>0,a=(null!==(n=this.login)&&void 0!==n?n:!s.header.isLoginWidgetHidden)&&s.header.loginWidgetOptions,l=s.header.navLang.length>1,d=r?I(this.host):"1";return i(o,{class:`stickyness-${this.stickyness} ${Boolean(this.activeDropdownElement)||Boolean(this.activeFlyout)?"dropdown-open":""}`,"data-version":"1.15.1",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(f,{condition:this.skiplinks},i("post-skiplinks",null)),i(f,{condition:r},i("post-meta-navigation",{orientation:"horizontal",class:"hidden-lg","full-width":this.fullWidth,ref:t=>this.metaNav=t},i(f,{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(u,{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(f,{condition:r},i("post-meta-navigation",{orientation:"vertical"},i(f,{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(f,{condition:this.search},i("post-search",{onDropdownToggled:t=>this.handleDropdownToggled(t)})),i(f,{condition:!!a},i("post-klp-login-widget",{"logout-url":this.logoutUrl},i("slot",{name:"login-widget"}))),i(f,{condition:!r&&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
|
-
export{P as swisspost_internet_header}from"./p-
|
|
1
|
+
export{P as swisspost_internet_header}from"./p-02f75eb0.js";import"./p-67f6b5a8.js";import"./p-151d419a.js";import"./p-709f2c44.js";import"./p-13453cb0.js";import"./p-a39139a9.js";import"./p-9fee809c.js";import"./p-a0313d87.js";import"./p-840aa5c6.js";
|
|
@@ -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){var e;return Object.assign(Object.assign({},t),{isActiveOverride:t.isActive,flyout:(e=t.flyout)===null||e===void 0?void 0:e.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){var e;return Object.assign(Object.assign({},t),{isActiveOverride:false,flyout:((e=t.flyout)===null||e===void 0?void 0:e.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){var o;try{var s=_(e,new URL(t.url),i);n=j(r,s,{main:t,score:s},n)}catch(t){}(o=t.flyout)===null||o===void 0?void 0:o.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,r;if(t.id!=="flyout_os")return t;if(N===null){N=JSON.parse(JSON.stringify(t))}var o=(i=e.text)!==null&&i!==void 0?i:N.text;var s=(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:s,text:o});var a=__spreadArray(__spreadArray([],N.flyout.map((function(t,i){var n,r;var o=(n=e.flyout)===null||n===void 0?void 0:n[i];var s=(r=o===null||o===void 0?void 0:o.title)!==null&&r!==void 0?r:t.title;var a=(o===null||o===void 0?void 0:o.linkList)!=null?o.linkList:[];return{title:s,linkList:__spreadArray(__spreadArray([],t.linkList,true),a,true)}})),true),((r=e.flyout)===null||r===void 0?void 0:r.slice(N.flyout.length))||[],true);return Object.assign(Object.assign({},t),{text:o,title:s,flyout:a})}))};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.15.0";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.5.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}}}));
|
|
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){var e;return Object.assign(Object.assign({},t),{isActiveOverride:t.isActive,flyout:(e=t.flyout)===null||e===void 0?void 0:e.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){var e;return Object.assign(Object.assign({},t),{isActiveOverride:false,flyout:((e=t.flyout)===null||e===void 0?void 0:e.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){var o;try{var s=_(e,new URL(t.url),i);n=j(r,s,{main:t,score:s},n)}catch(t){}(o=t.flyout)===null||o===void 0?void 0:o.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,r;if(t.id!=="flyout_os")return t;if(N===null){N=JSON.parse(JSON.stringify(t))}var o=(i=e.text)!==null&&i!==void 0?i:N.text;var s=(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:s,text:o});var a=__spreadArray(__spreadArray([],N.flyout.map((function(t,i){var n,r;var o=(n=e.flyout)===null||n===void 0?void 0:n[i];var s=(r=o===null||o===void 0?void 0:o.title)!==null&&r!==void 0?r:t.title;var a=(o===null||o===void 0?void 0:o.linkList)!=null?o.linkList:[];return{title:s,linkList:__spreadArray(__spreadArray([],t.linkList,true),a,true)}})),true),((r=e.flyout)===null||r===void 0?void 0:r.slice(N.flyout.length))||[],true);return Object.assign(Object.assign({},t),{text:o,title:s,flyout:a})}))};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.15.1";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.6.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}}}));
|
package/dist/swisspost-internet-header/{p-91092813.system.entry.js → p-325b363d.system.entry.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-2a6f40b8.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"],(function(s){"use strict";return{setters:[function(t){s("swisspost_internet_header",t.P)},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-2a6f40b8.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-9af11364.system.js","./p-d504b43a.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(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-
|
|
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-325b363d.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-a8863898.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-08083b29.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 +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-
|
|
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-22328fea",[[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-fcccc35e",[[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-bb181ae4",[[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))));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/internet-header",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.1",
|
|
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.
|
|
30
|
+
"@swisspost/design-system-styles": "8.6.0",
|
|
31
31
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
32
32
|
"iframe-resizer": "4.4.5",
|
|
33
33
|
"jquery": "3.7.1",
|