@swisspost/internet-header 1.8.1-beta.0 → 1.8.2
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-5aa18735.js → index-87874f19.js} +1 -1
- package/dist/cjs/{index-5aa18735.js.map → index-87874f19.js.map} +1 -1
- package/dist/cjs/{klp-widget.controller-847b6688.js → klp-widget.controller-d86525e1.js} +5 -1
- package/dist/cjs/klp-widget.controller-d86525e1.js.map +1 -0
- package/dist/cjs/{language.service-2d0a1edd.js → language.service-516d1809.js} +2 -2
- package/dist/cjs/{language.service-2d0a1edd.js.map → language.service-516d1809.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/post-klp-login-widget.cjs.entry.js +6 -6
- package/dist/cjs/post-klp-login-widget.cjs.entry.js.map +1 -1
- package/dist/cjs/post-language-switch.cjs.entry.js +5 -5
- package/dist/cjs/post-logo.cjs.entry.js +2 -2
- package/dist/cjs/post-main-navigation.cjs.entry.js +5 -5
- package/dist/cjs/post-meta-navigation.cjs.entry.js +2 -2
- package/dist/cjs/post-search.cjs.entry.js +17 -13
- package/dist/cjs/post-search.cjs.entry.js.map +1 -1
- package/dist/cjs/post-skiplinks.cjs.entry.js +4 -4
- package/dist/cjs/{store-3355e50f.js → store-915e0360.js} +2 -2
- package/dist/cjs/{store-3355e50f.js.map → store-915e0360.js.map} +1 -1
- package/dist/cjs/{svg-icon.component-74d2326c.js → svg-icon.component-8e05af84.js} +2 -2
- package/dist/cjs/{svg-icon.component-74d2326c.js.map → svg-icon.component-8e05af84.js.map} +1 -1
- package/dist/cjs/{svg-sprite.component-4fd3c959.js → svg-sprite.component-f1866070.js} +2 -2
- package/dist/cjs/{svg-sprite.component-4fd3c959.js.map → svg-sprite.component-f1866070.js.map} +1 -1
- package/dist/cjs/swisspost-internet-breadcrumbs.cjs.entry.js +6 -6
- package/dist/cjs/swisspost-internet-breadcrumbs.cjs.entry.js.map +1 -1
- package/dist/cjs/swisspost-internet-footer.cjs.entry.js +4 -4
- package/dist/cjs/swisspost-internet-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/swisspost-internet-header.cjs.entry.js +28 -28
- package/dist/cjs/swisspost-internet-header.cjs.entry.js.map +1 -1
- package/dist/cjs/swisspost-internet-header.cjs.js +2 -2
- package/dist/cjs/swisspost-internet-header.cjs.js.map +1 -1
- package/dist/collection/assets/js/klp-login-widget.js +4 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/post-internet-breadcrumbs/post-internet-breadcrumbs.css +44 -30
- package/dist/collection/components/post-internet-footer/post-internet-footer.css +44 -30
- package/dist/collection/components/post-internet-header/post-internet-header.js +2 -2
- package/dist/collection/components/post-internet-header/post-internet-header.js.map +1 -1
- package/dist/collection/components/post-klp-login-widget/post-klp-login-widget.css +44 -30
- package/dist/collection/components/post-search/post-search.css +63 -9
- package/dist/collection/components/post-search/post-search.js +11 -7
- package/dist/collection/components/post-search/post-search.js.map +1 -1
- package/dist/collection/models/track-and-trace.model.js.map +1 -1
- package/dist/collection/services/search/parcel.service.js +1 -1
- package/dist/collection/services/search/parcel.service.js.map +1 -1
- package/dist/components/klp-widget.controller.js +4 -0
- package/dist/components/klp-widget.controller.js.map +1 -1
- package/dist/components/post-klp-login-widget2.js +1 -1
- package/dist/components/post-klp-login-widget2.js.map +1 -1
- package/dist/components/post-search2.js +13 -9
- package/dist/components/post-search2.js.map +1 -1
- package/dist/components/store.js.map +1 -1
- package/dist/components/swisspost-internet-breadcrumbs.js +1 -1
- package/dist/components/swisspost-internet-breadcrumbs.js.map +1 -1
- package/dist/components/swisspost-internet-footer.js +1 -1
- package/dist/components/swisspost-internet-footer.js.map +1 -1
- package/dist/components/swisspost-internet-header.js +23 -23
- package/dist/components/swisspost-internet-header.js.map +1 -1
- package/dist/esm/{index-8d59532e.js → index-82f4f02c.js} +1 -1
- package/dist/esm/{index-8d59532e.js.map → index-82f4f02c.js.map} +1 -1
- package/dist/esm/{klp-widget.controller-a3fe87ef.js → klp-widget.controller-91f5dd0b.js} +5 -1
- package/dist/esm/klp-widget.controller-91f5dd0b.js.map +1 -0
- package/dist/esm/{language.service-002fec1c.js → language.service-faf591b3.js} +2 -2
- package/dist/esm/{language.service-002fec1c.js.map → language.service-faf591b3.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/post-klp-login-widget.entry.js +6 -6
- package/dist/esm/post-klp-login-widget.entry.js.map +1 -1
- package/dist/esm/post-language-switch.entry.js +5 -5
- package/dist/esm/post-logo.entry.js +2 -2
- package/dist/esm/post-main-navigation.entry.js +5 -5
- package/dist/esm/post-meta-navigation.entry.js +2 -2
- package/dist/esm/post-search.entry.js +17 -13
- package/dist/esm/post-search.entry.js.map +1 -1
- package/dist/esm/post-skiplinks.entry.js +4 -4
- package/dist/esm/{store-a6a8929c.js → store-79377f91.js} +2 -2
- package/dist/esm/{store-a6a8929c.js.map → store-79377f91.js.map} +1 -1
- package/dist/esm/{svg-icon.component-aff0d204.js → svg-icon.component-f2fda279.js} +2 -2
- package/dist/esm/{svg-icon.component-aff0d204.js.map → svg-icon.component-f2fda279.js.map} +1 -1
- package/dist/esm/{svg-sprite.component-7c9a1dcd.js → svg-sprite.component-c140294e.js} +2 -2
- package/dist/esm/{svg-sprite.component-7c9a1dcd.js.map → svg-sprite.component-c140294e.js.map} +1 -1
- package/dist/esm/swisspost-internet-breadcrumbs.entry.js +6 -6
- package/dist/esm/swisspost-internet-breadcrumbs.entry.js.map +1 -1
- package/dist/esm/swisspost-internet-footer.entry.js +4 -4
- package/dist/esm/swisspost-internet-footer.entry.js.map +1 -1
- package/dist/esm/swisspost-internet-header.entry.js +28 -28
- package/dist/esm/swisspost-internet-header.entry.js.map +1 -1
- package/dist/esm/swisspost-internet-header.js +3 -3
- package/dist/esm/swisspost-internet-header.js.map +1 -1
- package/dist/esm-es5/{index-8d59532e.js → index-82f4f02c.js} +1 -1
- package/dist/esm-es5/{index-8d59532e.js.map → index-82f4f02c.js.map} +1 -1
- package/dist/esm-es5/{klp-widget.controller-a3fe87ef.js → klp-widget.controller-91f5dd0b.js} +2 -2
- package/dist/esm-es5/klp-widget.controller-91f5dd0b.js.map +1 -0
- package/dist/esm-es5/{language.service-002fec1c.js → language.service-faf591b3.js} +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/post-klp-login-widget.entry.js +1 -1
- package/dist/esm-es5/post-klp-login-widget.entry.js.map +1 -1
- package/dist/esm-es5/post-language-switch.entry.js +1 -1
- package/dist/esm-es5/post-logo.entry.js +1 -1
- package/dist/esm-es5/post-main-navigation.entry.js +1 -1
- package/dist/esm-es5/post-meta-navigation.entry.js +1 -1
- package/dist/esm-es5/post-search.entry.js +1 -1
- package/dist/esm-es5/post-search.entry.js.map +1 -1
- package/dist/esm-es5/post-skiplinks.entry.js +1 -1
- package/dist/esm-es5/{store-a6a8929c.js → store-79377f91.js} +2 -2
- package/dist/esm-es5/{store-a6a8929c.js.map → store-79377f91.js.map} +1 -1
- package/dist/esm-es5/{svg-icon.component-aff0d204.js → svg-icon.component-f2fda279.js} +2 -2
- package/dist/esm-es5/{svg-sprite.component-7c9a1dcd.js → svg-sprite.component-c140294e.js} +2 -2
- package/dist/esm-es5/swisspost-internet-breadcrumbs.entry.js +2 -2
- package/dist/esm-es5/swisspost-internet-breadcrumbs.entry.js.map +1 -1
- package/dist/esm-es5/swisspost-internet-footer.entry.js +1 -1
- package/dist/esm-es5/swisspost-internet-footer.entry.js.map +1 -1
- package/dist/esm-es5/swisspost-internet-header.entry.js +1 -1
- package/dist/esm-es5/swisspost-internet-header.entry.js.map +1 -1
- package/dist/esm-es5/swisspost-internet-header.js +1 -1
- package/dist/esm-es5/swisspost-internet-header.js.map +1 -1
- package/dist/swisspost-internet-header/p-1055564a.entry.js +7 -0
- package/dist/swisspost-internet-header/{p-d7fc17ac.entry.js.map → p-1055564a.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/p-11d05acc.js +2 -0
- package/dist/swisspost-internet-header/{p-74393bf7.system.js → p-1d455921.system.js} +1 -1
- package/dist/swisspost-internet-header/{p-74393bf7.system.js.map → p-1d455921.system.js.map} +1 -1
- package/dist/swisspost-internet-header/{p-b450a1dd.system.js → p-24aba4ed.system.js} +2 -2
- package/dist/swisspost-internet-header/p-24aba4ed.system.js.map +1 -0
- package/dist/swisspost-internet-header/{p-7999c250.entry.js → p-30669cd6.entry.js} +2 -2
- package/dist/swisspost-internet-header/{p-3ab9c6ee.entry.js → p-36d624d3.entry.js} +2 -2
- package/dist/swisspost-internet-header/{p-3ab9c6ee.entry.js.map → p-36d624d3.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/{p-c73f6117.system.js → p-3e6e0272.system.js} +2 -2
- package/dist/swisspost-internet-header/{p-98fc1c18.system.entry.js → p-41e08c10.system.entry.js} +2 -2
- package/dist/swisspost-internet-header/{p-98fc1c18.system.entry.js.map → p-41e08c10.system.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/p-4ae35141.entry.js +2 -0
- package/dist/swisspost-internet-header/{p-2ac6d85d.entry.js.map → p-4ae35141.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/p-4bd302a5.system.entry.js +2 -0
- package/dist/swisspost-internet-header/{p-465c735e.system.entry.js.map → p-4bd302a5.system.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/{p-64c04714.entry.js → p-541c204b.entry.js} +2 -2
- package/dist/swisspost-internet-header/{p-a0499b79.system.js → p-55bfdf22.system.js} +2 -2
- package/dist/swisspost-internet-header/{p-266baffd.system.js → p-5d893017.system.js} +2 -2
- package/dist/swisspost-internet-header/{p-266baffd.system.js.map → p-5d893017.system.js.map} +1 -1
- package/dist/swisspost-internet-header/{p-262889ce.js → p-77f72b8d.js} +2 -2
- package/dist/{esm/klp-widget.controller-a3fe87ef.js.map → swisspost-internet-header/p-77f72b8d.js.map} +1 -1
- package/dist/swisspost-internet-header/p-86a05039.system.entry.js +2 -0
- package/dist/swisspost-internet-header/{p-9c0dcf6a.system.entry.js.map → p-86a05039.system.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/{p-c2a481fb.system.entry.js → p-8d12fe0c.system.entry.js} +2 -2
- package/dist/swisspost-internet-header/{p-c388b2d1.entry.js → p-8d5f4d78.entry.js} +2 -2
- package/dist/swisspost-internet-header/{p-60dfb89c.js → p-8e0a4d18.js} +1 -1
- package/dist/swisspost-internet-header/{p-60dfb89c.js.map → p-8e0a4d18.js.map} +1 -1
- package/dist/swisspost-internet-header/{p-d40d43be.js → p-8eb05d18.js} +2 -2
- package/dist/swisspost-internet-header/{p-d40d43be.js.map → p-8eb05d18.js.map} +1 -1
- package/dist/swisspost-internet-header/p-ac8dce86.entry.js +2 -0
- package/dist/swisspost-internet-header/{p-65cba182.entry.js.map → p-ac8dce86.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/{p-77bae72c.system.entry.js → p-b6f237a1.system.entry.js} +2 -2
- package/dist/swisspost-internet-header/{p-e579c9a6.js → p-b762fba9.js} +2 -2
- package/dist/swisspost-internet-header/p-b7d03cb1.system.entry.js +7 -0
- package/dist/swisspost-internet-header/{p-9c4b1d8c.system.entry.js.map → p-b7d03cb1.system.entry.js.map} +1 -1
- package/dist/swisspost-internet-header/p-b8ea3c0a.system.entry.js +2 -0
- package/dist/swisspost-internet-header/p-b8ea3c0a.system.entry.js.map +1 -0
- package/dist/swisspost-internet-header/{p-11b5a18f.entry.js → p-bab5139b.entry.js} +2 -2
- package/dist/swisspost-internet-header/{p-4ffdc655.system.entry.js → p-bedb8e58.system.entry.js} +2 -2
- package/dist/swisspost-internet-header/p-df51fa24.entry.js +2 -0
- package/dist/swisspost-internet-header/p-df51fa24.entry.js.map +1 -0
- package/dist/swisspost-internet-header/{p-111288a2.js → p-e057071d.js} +2 -2
- package/dist/swisspost-internet-header/{p-771e4687.system.entry.js → p-eccdad3c.system.entry.js} +2 -2
- package/dist/swisspost-internet-header/{p-93bb6702.entry.js → p-ed043df2.entry.js} +2 -2
- package/dist/swisspost-internet-header/{p-cf3ceaab.system.entry.js → p-f445483f.system.entry.js} +2 -2
- package/dist/swisspost-internet-header/{p-5ff16d8a.system.js → p-fa230c6b.system.js} +2 -2
- package/dist/swisspost-internet-header/{p-5ff16d8a.system.js.map → p-fa230c6b.system.js.map} +1 -1
- package/dist/swisspost-internet-header/{p-35d8730c.system.js → p-fb82b748.system.js} +2 -2
- package/dist/swisspost-internet-header/swisspost-internet-header.css +1 -1
- package/dist/swisspost-internet-header/swisspost-internet-header.esm.js +1 -1
- package/dist/swisspost-internet-header/swisspost-internet-header.esm.js.map +1 -1
- package/dist/swisspost-internet-header/swisspost-internet-header.js +1 -1
- package/dist/types/models/track-and-trace.model.d.ts +1 -1
- package/{dist/loader → loader}/cdn.js +1 -1
- package/{dist/loader → loader}/index.cjs.js +1 -1
- package/{dist/loader → loader}/index.d.ts +1 -1
- package/loader/index.es2017.js +3 -0
- package/{dist/loader → loader}/index.js +2 -2
- package/package.json +21 -21
- package/readme.md +8 -1
- package/dist/cjs/klp-widget.controller-847b6688.js.map +0 -1
- package/dist/esm-es5/klp-widget.controller-a3fe87ef.js.map +0 -1
- package/dist/loader/index.es2017.js +0 -3
- package/dist/swisspost-internet-header/p-0cfdf8a1.entry.js +0 -2
- package/dist/swisspost-internet-header/p-0cfdf8a1.entry.js.map +0 -1
- package/dist/swisspost-internet-header/p-262889ce.js.map +0 -1
- package/dist/swisspost-internet-header/p-2ac6d85d.entry.js +0 -2
- package/dist/swisspost-internet-header/p-3b02cf6a.system.entry.js +0 -2
- package/dist/swisspost-internet-header/p-3b02cf6a.system.entry.js.map +0 -1
- package/dist/swisspost-internet-header/p-465c735e.system.entry.js +0 -2
- package/dist/swisspost-internet-header/p-65cba182.entry.js +0 -2
- package/dist/swisspost-internet-header/p-9c0dcf6a.system.entry.js +0 -2
- package/dist/swisspost-internet-header/p-9c4b1d8c.system.entry.js +0 -7
- package/dist/swisspost-internet-header/p-b450a1dd.system.js.map +0 -1
- package/dist/swisspost-internet-header/p-d7fc17ac.entry.js +0 -7
- package/dist/swisspost-internet-header/p-f6aac773.js +0 -2
- /package/dist/esm-es5/{language.service-002fec1c.js.map → language.service-faf591b3.js.map} +0 -0
- /package/dist/esm-es5/{svg-icon.component-aff0d204.js.map → svg-icon.component-f2fda279.js.map} +0 -0
- /package/dist/esm-es5/{svg-sprite.component-7c9a1dcd.js.map → svg-sprite.component-c140294e.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-f6aac773.js.map → p-11d05acc.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-7999c250.entry.js.map → p-30669cd6.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-c73f6117.system.js.map → p-3e6e0272.system.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-64c04714.entry.js.map → p-541c204b.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-a0499b79.system.js.map → p-55bfdf22.system.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-c2a481fb.system.entry.js.map → p-8d12fe0c.system.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-c388b2d1.entry.js.map → p-8d5f4d78.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-77bae72c.system.entry.js.map → p-b6f237a1.system.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-e579c9a6.js.map → p-b762fba9.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-11b5a18f.entry.js.map → p-bab5139b.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-4ffdc655.system.entry.js.map → p-bedb8e58.system.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-111288a2.js.map → p-e057071d.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-771e4687.system.entry.js.map → p-eccdad3c.system.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-93bb6702.entry.js.map → p-ed043df2.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-cf3ceaab.system.entry.js.map → p-f445483f.system.entry.js.map} +0 -0
- /package/dist/swisspost-internet-header/{p-35d8730c.system.js.map → p-fb82b748.system.js.map} +0 -0
- /package/{dist/loader → loader}/package.json +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t,f as e}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{a as t,f as e}from"./p-8e0a4d18.js";const n=(t,e,n)=>{const s=t.get(e);if(!s){t.set(e,[n])}else if(!s.includes(n)){s.push(n)}};const s=(t,e)=>{let n;return(...s)=>{if(n){clearTimeout(n)}n=setTimeout((()=>{n=0;t(...s)}),e)}};const o=t=>!("isConnected"in t)||t.isConnected;const r=s((t=>{for(let e of t.keys()){t.set(e,t.get(e).filter(o))}}),2e3);const c=()=>{if(typeof t!=="function"){return{}}const s=new Map;return{dispose:()=>s.clear(),get:e=>{const o=t();if(o){n(s,e,o)}},set:t=>{const n=s.get(t);if(n){s.set(t,n.filter(e))}r(s)},reset:()=>{s.forEach((t=>t.forEach(e)));r(s)}}};const u=t=>typeof t==="function"?t():t;const i=(t,e=((t,e)=>t!==e))=>{const n=u(t);let s=new Map(Object.entries(n!==null&&n!==void 0?n:{}));const o={dispose:[],get:[],set:[],reset:[]};const r=()=>{var e;s=new Map(Object.entries((e=u(t))!==null&&e!==void 0?e:{}));o.reset.forEach((t=>t()))};const c=()=>{o.dispose.forEach((t=>t()));r()};const i=t=>{o.get.forEach((e=>e(t)));return s.get(t)};const a=(t,n)=>{const r=s.get(t);if(e(n,r,t)){s.set(t,n);o.set.forEach((e=>e(t,n,r)))}};const l=typeof Proxy==="undefined"?{}:new Proxy(n,{get(t,e){return i(e)},ownKeys(t){return Array.from(s.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,e){return s.has(e)},set(t,e,n){a(e,n);return true}});const p=(t,e)=>{o[t].push(e);return()=>{f(o[t],e)}};const d=(e,n)=>{const s=p("set",((t,s)=>{if(t===e){n(s)}}));const o=p("reset",(()=>n(u(t)[e])));return()=>{s();o()}};const g=(...t)=>{const e=t.reduce(((t,e)=>{if(e.set){t.push(p("set",e.set))}if(e.get){t.push(p("get",e.get))}if(e.reset){t.push(p("reset",e.reset))}if(e.dispose){t.push(p("dispose",e.dispose))}return t}),[]);return()=>e.forEach((t=>t()))};const y=t=>{const e=s.get(t);o.set.forEach((n=>n(t,e,e)))};return{state:l,get:i,set:a,on:p,onChange:d,use:g,dispose:c,reset:r,forceUpdate:y}};const f=(t,e)=>{const n=t.indexOf(e);if(n>=0){t[n]=t[t.length-1];t.length--}};const a=(t,e)=>{const n=i(t,e);n.use(c());return n};const{state:l,reset:p,dispose:d}=a({projectId:null,currentLanguage:null,localizedConfig:null,environment:"prod",search:true,login:true,meta:true});export{d,l as s};
|
|
2
|
+
//# sourceMappingURL=p-8eb05d18.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["appendToMap","map","propName","value","items","get","set","includes","push","debounce","fn","ms","timeoutId","args","clearTimeout","setTimeout","isConnected","maybeElement","cleanupElements","key","keys","filter","stencilSubscription","getRenderingRef","elmsToUpdate","Map","dispose","clear","elm","elements","forceUpdate","reset","forEach","elms","unwrap","val","createObservableMap","defaultState","shouldUpdate","a","b","unwrappedState","states","Object","entries","handlers","_a","cb","oldValue","state","Proxy","_","ownKeys","Array","from","getOwnPropertyDescriptor","enumerable","configurable","has","on","eventName","callback","removeFromArray","onChange","unSet","newValue","unReset","use","subscriptions","unsubs","reduce","subscription","unsub","array","item","index","indexOf","length","createStore","projectId","currentLanguage","localizedConfig","environment","search","login","meta"],"sources":["../../node_modules/.pnpm/@stencil+store@2.0.8_@stencil+core@3.4.1/node_modules/@stencil/store/dist/index.mjs","./src/data/store.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\nimport { Environment, ILocalizedConfig, ILocalizedCustomConfig } from '../models/general.model';\nimport { NavMainEntity } from '../models/header.model';\nimport { IAvailableLanguage } from '../models/language.model';\n\nexport interface HeaderState {\n localizedConfig: ILocalizedConfig | null;\n currentLanguage: string | null;\n projectId: string | null;\n environment: Environment;\n search: boolean;\n login: boolean;\n meta: boolean;\n languageSwitchOverrides?: IAvailableLanguage[];\n localizedCustomConfig?: ILocalizedCustomConfig;\n osFlyoutOverrides?: NavMainEntity;\n}\n\nexport const { state, reset, dispose } = createStore<HeaderState>({\n projectId: null,\n currentLanguage: null,\n localizedConfig: null,\n environment: 'prod',\n search: true,\n login: true,\n meta: true,\n});\n"],"mappings":"2CAEA,MAAMA,EAAc,CAACC,EAAKC,EAAUC,KAChC,MAAMC,EAAQH,EAAII,IAAIH,GACtB,IAAKE,EAAO,CACRH,EAAIK,IAAIJ,EAAU,CAACC,GAC3B,MACS,IAAKC,EAAMG,SAASJ,GAAQ,CAC7BC,EAAMI,KAAKL,EACnB,GAEA,MAAMM,EAAW,CAACC,EAAIC,KAClB,IAAIC,EACJ,MAAO,IAAIC,KACP,GAAID,EAAW,CACXE,aAAaF,EACzB,CACQA,EAAYG,YAAW,KACnBH,EAAY,EACZF,KAAMG,EAAK,GACZF,EAAG,CACT,EAYL,MAAMK,EAAeC,KAAmB,gBAAiBA,IAAiBA,EAAaD,YACvF,MAAME,EAAkBT,GAAUR,IAC9B,IAAK,IAAIkB,KAAOlB,EAAImB,OAAQ,CACxBnB,EAAIK,IAAIa,EAAKlB,EAAII,IAAIc,GAAKE,OAAOL,GACzC,IACG,KACH,MAAMM,EAAsB,KACxB,UAAWC,IAAoB,WAAY,CAGvC,MAAO,EACf,CACI,MAAMC,EAAe,IAAIC,IACzB,MAAO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0B,SAASe,GAAOA,EAAG5B,EAAK6B,EAAUA,IAAU,EAE7D,MAAO,CACHC,QACA5C,MACAC,MACAqD,KACAI,WACAI,MACAzC,UACAK,QACAD,cACH,EAEL,MAAMgC,EAAkB,CAACW,EAAOC,KAC5B,MAAMC,EAAQF,EAAMG,QAAQF,GAC5B,GAAIC,GAAS,EAAG,CACZF,EAAME,GAASF,EAAMA,EAAMI,OAAS,GACpCJ,EAAMI,QACd,GAGA,MAAMC,EAAc,CAACzC,EAAcC,KAC/B,MAAMrC,EAAMmC,EAAoBC,EAAcC,GAC9CrC,EAAIkE,IAAI7C,KACR,OAAOrB,CAAG,E,MC5KDgD,MAAEA,EAAKlB,MAAEA,EAAKL,QAAEA,GAAYoD,EAAyB,CAChEC,UAAW,KACXC,gBAAiB,KACjBC,gBAAiB,KACjBC,YAAa,OACbC,OAAQ,KACRC,MAAO,KACPC,KAAM,c"}
|
|
1
|
+
{"version":3,"names":["appendToMap","map","propName","value","items","get","set","includes","push","debounce","fn","ms","timeoutId","args","clearTimeout","setTimeout","isConnected","maybeElement","cleanupElements","key","keys","filter","stencilSubscription","getRenderingRef","elmsToUpdate","Map","dispose","clear","elm","elements","forceUpdate","reset","forEach","elms","unwrap","val","createObservableMap","defaultState","shouldUpdate","a","b","unwrappedState","states","Object","entries","handlers","_a","cb","oldValue","state","Proxy","_","ownKeys","Array","from","getOwnPropertyDescriptor","enumerable","configurable","has","on","eventName","callback","removeFromArray","onChange","unSet","newValue","unReset","use","subscriptions","unsubs","reduce","subscription","unsub","array","item","index","indexOf","length","createStore","projectId","currentLanguage","localizedConfig","environment","search","login","meta"],"sources":["../../node_modules/.pnpm/@stencil+store@2.0.9_@stencil+core@3.4.2/node_modules/@stencil/store/dist/index.mjs","./src/data/store.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\nimport { Environment, ILocalizedConfig, ILocalizedCustomConfig } from '../models/general.model';\nimport { NavMainEntity } from '../models/header.model';\nimport { IAvailableLanguage } from '../models/language.model';\n\nexport interface HeaderState {\n localizedConfig: ILocalizedConfig | null;\n currentLanguage: string | null;\n projectId: string | null;\n environment: Environment;\n search: boolean;\n login: boolean;\n meta: boolean;\n languageSwitchOverrides?: IAvailableLanguage[];\n localizedCustomConfig?: ILocalizedCustomConfig;\n osFlyoutOverrides?: NavMainEntity;\n}\n\nexport const { state, reset, dispose } = createStore<HeaderState>({\n projectId: null,\n currentLanguage: null,\n localizedConfig: null,\n environment: 'prod',\n search: true,\n login: true,\n meta: true,\n});\n"],"mappings":"2CAEA,MAAMA,EAAc,CAACC,EAAKC,EAAUC,KAChC,MAAMC,EAAQH,EAAII,IAAIH,GACtB,IAAKE,EAAO,CACRH,EAAIK,IAAIJ,EAAU,CAACC,GAC3B,MACS,IAAKC,EAAMG,SAASJ,GAAQ,CAC7BC,EAAMI,KAAKL,EACnB,GAEA,MAAMM,EAAW,CAACC,EAAIC,KAClB,IAAIC,EACJ,MAAO,IAAIC,KACP,GAAID,EAAW,CACXE,aAAaF,EACzB,CACQA,EAAYG,YAAW,KACnBH,EAAY,EACZF,KAAMG,EAAK,GACZF,EAAG,CACT,EAYL,MAAMK,EAAeC,KAAmB,gBAAiBA,IAAiBA,EAAaD,YACvF,MAAME,EAAkBT,GAAUR,IAC9B,IAAK,IAAIkB,KAAOlB,EAAImB,OAAQ,CACxBnB,EAAIK,IAAIa,EAAKlB,EAAII,IAAIc,GAAKE,OAAOL,GACzC,IACG,KACH,MAAMM,EAAsB,KACxB,UAAWC,IAAoB,WAAY,CAGvC,MAAO,EACf,CACI,MAAMC,EAAe,IAAIC,IACzB,MAAO,CACHC,QAAS,IAAMF,EAAaG,QAC5BtB,IAAM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AAU,EAE7D,MAAO,CACHC,QACA5C,MACAC,MACAqD,KACAI,WACAI,MACAzC,UACAK,QACAD,cACH,EAEL,MAAMgC,EAAkB,CAACW,EAAOC,KAC5B,MAAMC,EAAQF,EAAMG,QAAQF,GAC5B,GAAIC,GAAS,EAAG,CACZF,EAAME,GAASF,EAAMA,EAAMI,OAAS,GACpCJ,EAAMI,QACd,GAGA,MAAMC,EAAc,CAACzC,EAAcC,KAC/B,MAAMrC,EAAMmC,EAAoBC,EAAcC,GAC9CrC,EAAIkE,IAAI7C,KACR,OAAOrB,CAAG,E,MC5KDgD,MAAEA,EAAKlB,MAAEA,EAAKL,QAAEA,GAAYoD,EAAyB,CAChEC,UAAW,KACXC,gBAAiB,KACjBC,gBAAiB,KACjBC,YAAa,OACbC,OAAQ,KACRC,MAAO,KACPC,KAAM,c"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as o,g as n}from"./p-8e0a4d18.js";import{t as s,d as r}from"./p-a74b380d.js";import{g as a,p as l,t as d}from"./p-e057071d.js";import{u as c}from"./p-8bf099a8.js";import{s as h,d as u}from"./p-8eb05d18.js";import{S as f}from"./p-b762fba9.js";import{S as p}from"./p-11d05acc.js";import{I as g}from"./p-a2f9d462.js";const m=(t,e)=>{if(e===false){return t}let i;t=y(t);if(e==="auto"||e==="exact"){if(w(t)){return v(t)}i=new URL(window.location.href)}else{try{i=new URL(e,document.location.origin)}catch(i){console.warn(`Active Route: ${e} is not a valid URL. Navigation highlighting has been disabled.`);return t}}const o=b(t,i,e);if(o.length===0){return t}const n=o[0];n.main.isActiveOverride=true;if(n.sub)n.sub.isActiveOverride=true;return t};const w=t=>t.filter((t=>t.isActive)).length>0;const v=t=>t.map((t=>Object.assign(Object.assign({},t),{isActiveOverride:t.isActive,flyout:t.flyout.map((t=>Object.assign(Object.assign({},t),{linkList:t.linkList.map((t=>Object.assign(Object.assign({},t),{isActiveOverride:t.isActive})))})))})));const y=t=>t.map((t=>Object.assign(Object.assign({},t),{isActiveOverride:false,flyout:t.flyout.map((t=>Object.assign(Object.assign({},t),{linkList:t.linkList.map((t=>Object.assign(Object.assign({},t),{isActiveOverride:false})))})))})));const b=(t,e,i)=>{let o=false;const n=[];t.filter((t=>!o&&t)).forEach((t=>{try{const s=k(e,new URL(t.url),i);o=x(n,s,{main:t,score:s},o)}catch(t){}t.flyout.forEach((s=>{var r;(r=s.linkList)===null||r===void 0?void 0:r.forEach((s=>{if(s.isActive&&(i==="auto"||i==="exact")){o=true;return}try{const r=new URL(s.url);const a=k(e,r,i);o=x(n,a,{main:t,sub:s,score:a},o)}catch(t){}}))}))}));return n.sort(((t,e)=>e.score-t.score))};function x(t,e,i,o){let n=o;if(e>0){if(e===Infinity)n=true;t.push(i)}return n}const k=(t,e,i)=>{if(!t||!e||t.origin!==e.origin){return 0}const o=t.pathname.toLocaleLowerCase();const n=e.pathname.toLocaleLowerCase();if(o===n){return Infinity}if(t.pathname.length<e.pathname.length){return 0}if(i==="auto"){const i=[t.origin.toLocaleLowerCase(),...o.split("/").filter((t=>!!t))];const s=[e.origin.toLocaleLowerCase(),...n.split("/").filter((t=>!!t))];const r=j(i,s);return Math.min(i.length,s.length)===r?r:0}return 0};const j=(t,e)=>{if(!(t===null||t===void 0?void 0:t.length)||!(e===null||e===void 0?void 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 O=null;let C=null;const F=()=>{const t=document.querySelector("#PPM_HEADER_DATA");if(t===null||t===void 0?void 0:t.textContent){return JSON.parse(t.textContent)}return null};const N=async({projectId:t,environment:e,language:i,cookieKey:o,localStorageKey:n,activeRouteProp:s,localizedCustomConfig:r,osFlyoutOverrides:d})=>{var c,h;const u=F();let f;let p=null;let g;if(u){f=u;g=document.documentElement.lang}else{if(!O){O=I(t,e)}p=await O;g=a(Object.keys(p),i,n,o);if(g===undefined){throw new Error("Internet Header: unable to determine current language")}f=Object.assign({},p[g])}if(r){const t=((c=r===null||r===void 0?void 0:r.header)===null||c===void 0?void 0:c.navMain)?Object.assign(Object.assign({},f.header),{navMain:[...f.header.navMain,...r.header.navMain]}):f.header;f=Object.assign(Object.assign({},f),{header:t})}if(d)f.header.navMain=P(f,d);if(s)f.header.navMain=m(f.header.navMain,s);R((h=f===null||f===void 0?void 0:f.header)===null||h===void 0?void 0:h.navMain);l(g,o,n);return f};const P=(t,e)=>{if(!e)return t.header.navMain;return t.header.navMain.map((t=>{var i,o;if(t.id!=="flyout_os")return t;if(C===null){C=JSON.parse(JSON.stringify(t))}const n=(i=e.text)!==null&&i!==void 0?i:C.text;const s=(o=e.title)!==null&&o!==void 0?o:C.title;if(!C.flyout||C.flyout.length===0||!e.flyout||e.flyout.length===0)return Object.assign(Object.assign({},t),{title:s,text:n});const r=[...C.flyout.map(((t,i)=>{var o;const n=e.flyout[i];const s=(o=n.title)!==null&&o!==void 0?o:t.title;const r=n.linkList?e.flyout[i].linkList:[];return{title:s,linkList:[...t.linkList,...r]}})),...e.flyout.slice(C.flyout.length)];return Object.assign(Object.assign({},t),{text:n,title:s,flyout:r})}))};const I=async(t,e)=>{if(!S(t)){throw new Error(`Internet Header: invalid project id "${t}"`)}if(t==="test"){e="int01"}let i=L(t,e);try{const t=await fetch(i);return await t.json()}catch(t){throw new Error(`Internet Header: fetching config failed. ${t.message}`)}};const L=(t,e)=>{if(t==="test")return"assets/config/test-configuration.json";const i=e.toLowerCase();const o=i==="prod";const 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.`)}};const S=t=>t!==""&&t.length>0&&/^[a-zA-Z][\w-]*[a-zA-Z0-9]$/.test(t);const z=(t,e)=>{var i;let 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. `)}let n=o[e];if((i=n===null||n===void 0?void 0:n.header)===null||i===void 0?void 0:i.navMain)R(n.header.navMain);return n};const R=t=>{t.forEach((t=>{t.id=t.id==="flyout_os"?t.id:c("main-nav-")}))};const A="@swisspost/internet-header";const K="1.8.2";const W="The header for client facing applications.";const E="Swiss Post <oss@post.ch>";const T="Apache-2.0";const $={type:"git",url:"https://github.com/swisspost/design-system.git"};const D="https://next.design-system.post.ch";const H={url:"https://github.com/swisspost/design-system/issues"};const J="loader/index.cjs.js";const M="loader/index.js";const U="loader/index.es2017.js";const _="dist/types/index.d.ts";const B="dist/collection/collection-manifest.json";const q="loader/cdn.js";const X={access:"public"};const Z=["dist/","loader/"];const G={dev:"stencil build --serve --watch --docs-readme",start:"stencil build --watch --docs-readme",build:"stencil build --docs-readme",clean:"rimraf www dist loader",test:"npm run unit",unit:"jest","unit:watch":"jest --watch",e2e:"cypress run","e2e:watch":"cypress open",lint:"eslint src/**/*{.ts,.tsx}","lint:fix":"eslint src/**/*{.ts,.tsx} --fix",generate:"stencil generate"};const V={"@stencil/core":"3.4.2","@stencil/store":"2.0.9","@swisspost/design-system-styles":"workspace:6.2.6","body-scroll-lock":"4.0.0-beta.0","iframe-resizer":"4.3.6",jquery:"3.7.0",tabbable:"6.2.0","throttle-debounce":"5.0.0","url-polyfill":"1.1.12"};const Q={"@babel/core":"7.22.9","@percy/cli":"1.26.2","@percy/cypress":"3.1.2","@stencil/eslint-plugin":"0.4.0","@stencil/sass":"3.0.5","@types/iframe-resizer":"3.5.9","@types/jest":"27.5.2","@types/jquery":"3.5.16","@types/node":"18.17.1","@types/throttle-debounce":"5.0.0","babel-loader":"9.1.3",bootstrap:"5.3.1",cypress:"12.17.2","cypress-each":"1.13.3","cypress-storybook":"0.5.1","eslint-plugin-react":"7.33.0",globby:"13.2.2",jest:"27.5.1",rimraf:"5.0.1","rollup-plugin-node-polyfills":"0.2.1","rollup-plugin-scss":"4.0.0","rollup-plugin-visualizer":"5.9.2",sass:"1.64.1","start-server-and-test":"2.0.0","ts-jest":"27.1.5",typescript:"4.9.5"};const Y={name:A,version:K,description:W,author:E,license:T,repository:$,homepage:D,bugs:H,main:J,module:M,es2017:U,types:_,collection:B,"collection:main":"dist/collection/index.js",unpkg:q,publishConfig:X,files:Z,scripts:G,dependencies:V,devDependencies:Q};const tt='@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:transparent;border:none;border-radius:0;padding:0}.nav-link{outline:none;outline-offset:2px;text-decoration:none;color:rgba(0, 0, 0, 0.8);-webkit-transition:color 200ms;transition:color 200ms;background-color:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.5rem}.nav-link:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.nav-link:hover,.nav-link:focus{color:black}.nav-link:focus-visible{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", system-ui, sans-serif}button{font:inherit;padding:0}a,button{border-radius:3px;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:3px}img,svg{max-width:100%;max-height:100%}@media (forced-colors: active){svg{color:white}}.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-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: 1440.98px){.hidden-xxl{display:none}}:host{display:block;position:relative;font-size:1rem;font-weight:300;z-index:var(--header-z-index, 10);--header-height:3.5rem;--meta-header-height:0px;--language-dropdown-margin-top:0px}@media (min-width: 1024px){:host{--meta-header-height:3rem;--header-height:4rem}}@media (min-width: 1280px){:host{--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);-webkit-transition:top 200ms ease-out;transition:top 200ms ease-out}}.post-internet-header{border-bottom:1px solid hsl(0, 0%, 90%);background-color:white}.main-navigation-container{display:-ms-flexbox;display:flex}.main-navigation-container>.main-navigation-controls{-ms-flex:0 0 auto;flex:0 0 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:white;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 hsl(0, 0%, 90%)}.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 hsl(0, 0%, 90%);-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:0.5rem}}.menu-button svg{width:1.5rem;height:1.5rem}.full-width .wide-container{max-width:none}';const et=class{async getCurrentLanguage(){var t;return(t=h.currentLanguage)!==null&&t!==void 0?t:"de"}constructor(i){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=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.activeRoute="auto";this.osFlyoutOverrides=undefined;this.fullWidth=false;this.activeFlyout=null;this.activeDropdownElement=null;if(this.project===undefined||this.project===""||!S(this.project)){throw new Error(`Internet Header project key is "${this.project}". Please provide a valid project key.`)}}connectedCallback(){this.throttledScroll=s(300,(()=>this.handleScrollEvent()));this.debouncedResize=r(200,(()=>this.handleResize()));window.addEventListener("scroll",this.throttledScroll,{passive:true});window.addEventListener("resize",this.debouncedResize,{passive:true})}disconnectedCallback(){window.removeEventListener("scroll",this.throttledScroll);window.removeEventListener("resize",this.debouncedResize);u()}async componentWillLoad(){try{h.projectId=this.project;h.environment=this.environment.toLocaleLowerCase();if(this.language!==undefined)h.currentLanguage=this.language;h.languageSwitchOverrides=typeof this.languageSwitchOverrides==="string"?JSON.parse(this.languageSwitchOverrides):this.languageSwitchOverrides;h.osFlyoutOverrides=typeof this.osFlyoutOverrides==="string"?JSON.parse(this.osFlyoutOverrides):this.osFlyoutOverrides;if(this.customConfig!==undefined&&h.currentLanguage!==null){h.localizedCustomConfig=z(this.customConfig,h.currentLanguage)}h.localizedConfig=await N({projectId:this.project,environment:h.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:h.localizedCustomConfig,osFlyoutOverrides:h.osFlyoutOverrides})}catch(t){console.error(t)}}componentDidLoad(){window.requestAnimationFrame((()=>{this.handleResize();this.headerLoaded.emit();this.host.classList.add("header-loaded")}));if(this.stickyness==="full")console.warn('Internet Header: The stickyness="full" option is deprecated.')}async handleLanguageChange(t){h.currentLanguage=t;h.localizedConfig=await N({projectId:this.project,environment:this.environment,language:t,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:h.localizedCustomConfig,osFlyoutOverrides:h.osFlyoutOverrides});if(this.customConfig)h.localizedCustomConfig=z(this.customConfig,t)}handleAvailableLanguagesChage(t){h.languageSwitchOverrides=typeof t==="string"?JSON.parse(t):t}async handleOsFlyoutOverrides(t){h.osFlyoutOverrides=typeof t==="string"?JSON.parse(t):t;h.localizedConfig=await N({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:h.localizedCustomConfig,osFlyoutOverrides:h.osFlyoutOverrides})}async handleActiveRouteChange(t){h.localizedConfig=await N({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:t,localizedCustomConfig:h.localizedCustomConfig,osFlyoutOverrides:h.osFlyoutOverrides})}async handleCustomConfigChange(t){if(this.language===undefined)return;const e=z(t,this.language);h.localizedCustomConfig=e;h.localizedConfig=await N({projectId:this.project,environment:this.environment,language:this.language,cookieKey:this.languageCookieKey,localStorageKey:this.languageLocalStorageKey,activeRouteProp:this.activeRoute,localizedCustomConfig:e,osFlyoutOverrides:h.osFlyoutOverrides})}handleSearchChange(t){h.search=t}handleLoginChange(t){h.login=t}handleMetaChange(t){h.meta=t}handleLanguageChangeEvent(t){this.handleLanguageChange(t.detail)}handleClickOutside(t){if(this.activeDropdownElement&&!t.composedPath().includes(this.activeDropdownElement)){this.activeDropdownElement.toggleDropdown(false)}}handleKeyUp(t){if(t.key==="Escape"){if(this.activeDropdownElement){this.activeDropdownElement.toggleDropdown(false)}if(this.activeFlyout!==null&&this.mainNav){this.mainNav.toggleDropdown(false)}}}handleScrollEvent(){const t=window.scrollY||document.documentElement.scrollTop;if(this.stickyness==="minimal"){this.host.classList.toggle("scrolling-up",t<=this.lastScrollTop)}this.lastScrollTop=t<=0?0:t}handleResize(){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}handleDropdownToggled(t){if(!t.detail.open&&this.activeDropdownElement!==t.detail.element){return}if(t.detail.open===true){if(this.activeDropdownElement){this.activeDropdownElement.toggleDropdown(false)}this.activeDropdownElement=t.detail.element;if(window.innerWidth>=1024){window.setTimeout((()=>{window.addEventListener("click",this.handleClickOutsideBound)}),10)}if(this.activeFlyout!==null&&this.mainNav){this.mainNav.setActiveFlyout(null)}}else{this.activeDropdownElement=null;window.removeEventListener("click",this.handleClickOutsideBound)}}handleFlyoutToggled(t){this.activeFlyout=t.detail;if(this.activeDropdownElement&&t.detail&&!this.isMainNavOpen()){this.activeDropdownElement.toggleDropdown(false)}}toggleMobileDropdown(){var t;(t=this.mainNav)===null||t===void 0?void 0:t.toggleDropdown()}isMainNavOpen(){return this.activeDropdownElement&&this.activeDropdownElement.tagName==="POST-MAIN-NAVIGATION"}render(){var t,e,n;if(!((t=h.localizedConfig)===null||t===void 0?void 0:t.header)){console.error(new Error("Internet Header: Config cannot be loaded"));return}const s=h.localizedConfig;const r=this.meta&&s.header.navMeta!==undefined&&((e=s.header.navMeta)===null||e===void 0?void 0:e.filter((t=>!t.isHomeLink)).length)>0;const a=((n=this.login)!==null&&n!==void 0?n:!s.header.isLoginWidgetHidden)&&s.header.loginWidgetOptions;const l=s.header.navLang.length>1;return i(o,{class:`stickyness-${this.stickyness} ${this.activeDropdownElement||this.activeFlyout?"dropdown-open":""}`,"data-version":Y.version,onKeyup:t=>this.handleKeyUp(t)},i("header",{class:`post-internet-header${this.fullWidth?" full-width":""}`},i(f,null),i("h1",{class:"visually-hidden"},d("Navigate on post.ch")),i(g,{condition:this.skiplinks===true},i("post-skiplinks",null)),i(g,{condition:r===true},i("post-meta-navigation",{orientation:"horizontal",class:"hidden-lg","full-width":this.fullWidth},i(g,{condition:l===true},i("post-language-switch",{id:"post-language-switch-desktop",mode:"dropdown",onDropdownToggled:t=>this.handleDropdownToggled(t)})))),i("div",{class:"main-navigation-container wide-container"},i("post-logo",null),i("button",{class:"menu-button nav-link",onClick:()=>this.toggleMobileDropdown(),"aria-haspopup":"menu","aria-controls":"post-internet-header-main-navigation","aria-expanded":this.activeDropdownElement?"true":"false"},i("span",{class:"menu-button-text visually-hidden"},s.header.mobileMenu.text),i(p,{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(g,{condition:r===true},i("post-meta-navigation",{orientation:"vertical"},i(g,{condition:l===true},i("post-language-switch",{id:"post-language-switch-mobile",mode:"list"}))))),i("div",{class:"main-navigation-controls"},i(g,{condition:this.search!==false},i("post-search",{onDropdownToggled:t=>this.handleDropdownToggled(t)})),i(g,{condition:!!a},i("post-klp-login-widget",null,i("slot",{name:"login-widget"}))),i(g,{condition:r===false&&l===true},i("post-language-switch",{id:"post-language-switch-no-meta",onDropdownToggled:t=>this.handleDropdownToggled(t),mode:"dropdown"})),i("slot",{name:"main"})))))}get host(){return n(this)}static get watchers(){return{language:["handleLanguageChange"],languageSwitchOverrides:["handleAvailableLanguagesChage"],osFlyoutOverrides:["handleOsFlyoutOverrides"],activeRoute:["handleActiveRouteChange"],customConfig:["handleCustomConfigChange"],search:["handleSearchChange"],login:["handleLoginChange"],meta:["handleMetaChange"]}}};et.style=tt;export{et as swisspost_internet_header};
|
|
2
|
+
//# sourceMappingURL=p-ac8dce86.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["markActiveRoute","config","activeRouteProp","compareUrl","resetOverrideConfig","hasActivePortalRoute","resetActiveStateToPortalConfig","URL","window","location","href","document","origin","error","console","warn","scoreList","compileScoreList","length","winnerPair","main","isActiveOverride","sub","filter","nav","isActive","map","Object","assign","flyout","linkList","link","hadAnyActiveLink","mainNav","forEach","score","compareRoutes","url","updateScoreList","_a","linklist","sort","a","b","scoreListItem","hadActiveLink","Infinity","push","baseUrl","matchMode","baseUrlPath","pathname","toLocaleLowerCase","compareUrlPath","baseSegments","split","x","compareSegments","getSimilarityScore","Math","min","i","request","osFlyoutCache","getPPMConfig","ppmConfigScript","querySelector","textContent","JSON","parse","getLocalizedConfig","async","projectId","environment","language","cookieKey","localStorageKey","localizedCustomConfig","osFlyoutOverrides","ppmConfig","localizedConfig","lang","documentElement","fetchConfig","getUserLang","keys","undefined","Error","header","navMain","mergeOsFlyoutOverrides","setMainNavigationIds","_b","persistLanguageChoice","id","stringify","mainNavText","text","mainNavTitle","title","mainNavFlyout","col","index","overrides","slice","isValidProjectId","generateConfigUrl","res","fetch","json","message","parsedEnvironment","toLowerCase","isProd","host","encodeURIComponent","toString","test","getLocalizedCustomConfig","customConfig","navMainEntities","navMainEntity","uniqueId","postInternetHeaderCss","PostInternetHeader","state","currentLanguage","constructor","hostRef","this","lastScrollTop","scrollY","scrollTop","lastWindowWidth","innerWidth","handleClickOutsideBound","handleClickOutside","bind","project","connectedCallback","throttledScroll","throttle","handleScrollEvent","debouncedResize","debounce","handleResize","addEventListener","passive","disconnectedCallback","removeEventListener","dispose","languageSwitchOverrides","languageCookieKey","languageLocalStorageKey","activeRoute","componentDidLoad","requestAnimationFrame","headerLoaded","emit","classList","add","stickyness","newValue","handleAvailableLanguagesChage","handleSearchChange","search","handleLoginChange","login","handleMetaChange","meta","handleLanguageChangeEvent","event","handleLanguageChange","detail","activeDropdownElement","composedPath","includes","toggleDropdown","handleKeyUp","key","activeFlyout","st","toggle","isMainNavOpen","handleDropdownToggled","open","element","setTimeout","setActiveFlyout","handleFlyoutToggled","toggleMobileDropdown","tagName","render","renderMetaNavigation","navMeta","isHomeLink","renderLogin","_c","isLoginWidgetHidden","loginWidgetOptions","renderLanguageSwitch","navLang","h","Host","class","packageJson","version","onKeyup","e","fullWidth","SvgSprite","translate","If","condition","skiplinks","orientation","mode","onDropdownToggled","onClick","mobileMenu","SvgIcon","name","onFlyoutToggled","ref","el"],"sources":["./src/services/route.service.ts","./src/services/config.service.ts","./src/components/post-internet-header/post-internet-header.scss?tag=swisspost-internet-header&encapsulation=shadow","./src/components/post-internet-header/post-internet-header.tsx"],"sourcesContent":["import { ActiveRouteProp } from '../models/general.model';\nimport { NavMainEntity, MainNavScoreList } from '../models/header.model';\n\n/**\n * Activate the current route based on the config and the match mode\n * @param config Main Navigation Config\n * @param activeRouteProp Match mode\n * @returns Modified Main Navigation Config\n */\nexport const markActiveRoute = (\n config: NavMainEntity[],\n activeRouteProp: ActiveRouteProp,\n): NavMainEntity[] => {\n // Don't highlight any route\n if (activeRouteProp === false) {\n return config;\n }\n\n // Set compare URL and check if activeRouteProp is valid\n let compareUrl: URL;\n config = resetOverrideConfig(config);\n\n if (activeRouteProp === 'auto' || activeRouteProp === 'exact') {\n // Check if an active route is already configured, set override to that and return\n if (hasActivePortalRoute(config)) {\n return resetActiveStateToPortalConfig(config);\n }\n\n compareUrl = new URL(window.location.href);\n } else {\n try {\n compareUrl = new URL(activeRouteProp, document.location.origin);\n } catch (error) {\n console.warn(\n `Active Route: ${activeRouteProp} is not a valid URL. Navigation highlighting has been disabled.`,\n );\n return config;\n }\n }\n\n const scoreList = compileScoreList(config, compareUrl, activeRouteProp);\n\n if (scoreList.length === 0) {\n // No match found or already active links defined\n return config;\n }\n\n const winnerPair = scoreList[0];\n winnerPair.main.isActiveOverride = true;\n if (winnerPair.sub) winnerPair.sub.isActiveOverride = true;\n\n return config;\n};\n\n/**\n * Check if the portal config set any active route\n * @param config Main navigation config\n * @returns True if portal set any route as active\n */\nexport const hasActivePortalRoute = (config: NavMainEntity[]): boolean => {\n return config.filter(nav => nav.isActive).length > 0;\n};\n\nexport const resetActiveStateToPortalConfig = (config: NavMainEntity[]): NavMainEntity[] => {\n return config.map(nav => ({\n ...nav,\n isActiveOverride: nav.isActive,\n flyout: nav.flyout.map(flyout => ({\n ...flyout,\n linkList: flyout.linkList.map(link => ({ ...link, isActiveOverride: link.isActive })),\n })),\n }));\n};\n\nconst resetOverrideConfig = (config: NavMainEntity[]): NavMainEntity[] => {\n return config.map(nav => ({\n ...nav,\n isActiveOverride: false,\n flyout: nav.flyout.map(flyout => ({\n ...flyout,\n linkList: flyout.linkList.map(link => ({ ...link, isActiveOverride: false })),\n })),\n }));\n};\n\n/**\n * Compile a list of scores based on the map mode, sorted in descending order\n * @param config Main Nav Config\n * @param compareUrl Current Browser URL or a custom URL\n * @param activeRouteProp Match mode\n * @returns A list of scored URLs if any matched\n */\nexport const compileScoreList = (\n config: NavMainEntity[],\n compareUrl: URL,\n activeRouteProp: ActiveRouteProp,\n): MainNavScoreList => {\n // Flag to check if the Portal set any active links or if there are any exact matches\n let hadAnyActiveLink = false;\n const scoreList: MainNavScoreList = [];\n\n config\n .filter(mainNav => !hadAnyActiveLink && mainNav)\n .forEach(mainNav => {\n try {\n const score = compareRoutes(\n compareUrl,\n new URL(mainNav.url),\n activeRouteProp as 'auto' | 'exact',\n );\n\n hadAnyActiveLink = updateScoreList(\n scoreList,\n score,\n { main: mainNav, score },\n hadAnyActiveLink,\n );\n } catch {\n // Not a valid url, continue\n }\n\n // Loop through flyout links 2nd level\n mainNav.flyout.forEach(flyout => {\n flyout.linkList?.forEach(linklist => {\n // Don't override if any link is already active\n if (linklist.isActive && (activeRouteProp === 'auto' || activeRouteProp === 'exact')) {\n hadAnyActiveLink = true;\n return;\n }\n\n try {\n const url = new URL(linklist.url);\n const score = compareRoutes(compareUrl, url, activeRouteProp as 'auto' | 'exact');\n\n hadAnyActiveLink = updateScoreList(\n scoreList,\n score,\n { main: mainNav, sub: linklist, score },\n hadAnyActiveLink,\n );\n } catch {\n // Not a valid URL, continue\n }\n });\n });\n });\n\n return scoreList.sort((a, b) => b.score - a.score);\n};\n\n/**\n * Update score list\n */\nfunction updateScoreList(\n scoreList: MainNavScoreList,\n score: number,\n scoreListItem: any,\n hadAnyActiveLink: boolean,\n) {\n let hadActiveLink = hadAnyActiveLink;\n\n if (score > 0) {\n if (score === Infinity) hadActiveLink = true;\n // Push score\n scoreList.push(scoreListItem);\n }\n\n return hadActiveLink;\n}\n\n/**\n * Compare two URLs for similarity based on a match mode\n * @param baseUrl Browser URL\n * @param compareUrl Navigatgion URL\n * @param matchMode exact or auto matching\n * @returns Score\n */\nexport const compareRoutes = (\n baseUrl: URL,\n compareUrl: URL,\n matchMode?: 'auto' | 'exact',\n): number => {\n // One url is not defined or they don't share the same orign\n if (!baseUrl || !compareUrl || baseUrl.origin !== compareUrl.origin) {\n return 0;\n }\n\n const baseUrlPath = baseUrl.pathname.toLocaleLowerCase();\n const compareUrlPath = compareUrl.pathname.toLocaleLowerCase();\n\n // Exact match, origin and pathname are the same\n if (baseUrlPath === compareUrlPath) {\n return Infinity;\n }\n\n // The basepath is longer than the comparison, a match is impossible\n if (baseUrl.pathname.length < compareUrl.pathname.length) {\n return 0;\n }\n\n if (matchMode === 'auto') {\n const baseSegments = [\n baseUrl.origin.toLocaleLowerCase(),\n ...baseUrlPath.split('/').filter(x => !!x),\n ];\n const compareSegments = [\n compareUrl.origin.toLocaleLowerCase(),\n ...compareUrlPath.split('/').filter(x => !!x),\n ];\n\n const score = getSimilarityScore(baseSegments, compareSegments);\n\n // If only some segments match, but not the whole smaller array, it's not a match\n return Math.min(baseSegments.length, compareSegments.length) === score ? score : 0;\n }\n\n return 0;\n};\n\n/**\n * Check how many items in an array match\n * @param a Base array\n * @param b Compare array\n * @returns Score\n */\nexport const getSimilarityScore = (a: string[], b: string[]): number => {\n if (!a?.length || !b?.length) {\n return 0;\n }\n\n let i = 0;\n for (; i < Math.min(a.length, b.length); i++) {\n if (a[i] !== b[i]) {\n return 0;\n }\n }\n\n return i;\n};\n","import {\n Environment,\n IPortalConfig,\n ILocalizedConfig,\n ICustomConfig,\n ILocalizedCustomConfig,\n LocalizedConfigParameters,\n} from '../models/general.model';\nimport { NavMainEntity } from '../models/header.model';\nimport { getUserLang, persistLanguageChoice } from './language.service';\nimport { uniqueId } from '../utils/utils';\nimport { markActiveRoute } from './route.service';\n\n// Prevent double requests\nlet request: Promise<IPortalConfig> | null = null;\n\n// Cache the original os flyout to use it for updates\nlet osFlyoutCache: NavMainEntity | null = null;\n\nconst getPPMConfig = (): ILocalizedConfig | null => {\n const ppmConfigScript = document.querySelector('#PPM_HEADER_DATA');\n\n if (ppmConfigScript?.textContent) {\n return JSON.parse(ppmConfigScript.textContent);\n }\n\n return null;\n};\n\n/**\n * Get a localized config object\n *\n * @param projectId String identifying the project\n * @param language [optional] Preferred language\n * @returns Localized config object\n */\nexport const getLocalizedConfig = async ({\n projectId,\n environment,\n language,\n cookieKey,\n localStorageKey,\n activeRouteProp,\n localizedCustomConfig,\n osFlyoutOverrides,\n}: LocalizedConfigParameters): Promise<ILocalizedConfig> => {\n const ppmConfig = getPPMConfig();\n let localizedConfig: ILocalizedConfig;\n let config: IPortalConfig | null = null;\n let lang: string | undefined;\n\n if (ppmConfig) {\n localizedConfig = ppmConfig;\n lang = document.documentElement.lang;\n } else {\n if (!request) {\n request = fetchConfig(projectId, environment);\n }\n\n config = await request;\n lang = getUserLang(Object.keys(config), language, localStorageKey, cookieKey);\n\n if (lang === undefined) {\n throw new Error('Internet Header: unable to determine current language');\n }\n\n // Clone config for more predictable state updates\n localizedConfig = { ...config[lang] };\n }\n\n // Merge custom config with portal config\n if (localizedCustomConfig) {\n const header = localizedCustomConfig?.header?.navMain\n ? {\n ...localizedConfig.header,\n navMain: [...localizedConfig.header.navMain, ...localizedCustomConfig.header.navMain],\n }\n : localizedConfig.header;\n localizedConfig = {\n ...localizedConfig,\n header,\n };\n }\n\n // Add entries to flyout_os\n if (osFlyoutOverrides)\n localizedConfig.header.navMain = mergeOsFlyoutOverrides(localizedConfig, osFlyoutOverrides);\n\n // Mark active route\n if (activeRouteProp)\n localizedConfig.header.navMain = markActiveRoute(\n localizedConfig.header.navMain,\n activeRouteProp,\n );\n\n setMainNavigationIds(localizedConfig?.header?.navMain);\n\n // Set the new language choice\n persistLanguageChoice(lang, cookieKey, localStorageKey);\n\n return localizedConfig;\n};\n\n/**\n * Merge portal config with custom os flyout overrides\n * @param config Localized config\n * @param osFlyoutOverrides Overrides for the flyout\n * @returns Merged localized config\n */\nexport const mergeOsFlyoutOverrides = (\n config: ILocalizedConfig,\n osFlyoutOverrides: NavMainEntity,\n): NavMainEntity[] => {\n if (!osFlyoutOverrides) return config.header.navMain;\n\n return config.header.navMain.map(mainNav => {\n if (mainNav.id !== 'flyout_os') return mainNav;\n\n if (osFlyoutCache === null) {\n osFlyoutCache = JSON.parse(JSON.stringify(mainNav)) as NavMainEntity;\n }\n\n const mainNavText = osFlyoutOverrides.text ?? osFlyoutCache.text;\n const mainNavTitle = osFlyoutOverrides.title ?? osFlyoutCache.title;\n\n if (\n !osFlyoutCache.flyout ||\n osFlyoutCache.flyout.length === 0 ||\n !osFlyoutOverrides.flyout ||\n osFlyoutOverrides.flyout.length === 0\n )\n return {\n ...mainNav,\n title: mainNavTitle,\n text: mainNavText,\n };\n\n // Add entries for os flyout columns without overriding existing config\n const mainNavFlyout = [\n ...osFlyoutCache.flyout.map((col, index) => {\n const overrides = osFlyoutOverrides.flyout[index];\n const title = overrides.title ?? col.title;\n\n const linkList = overrides.linkList ? osFlyoutOverrides.flyout[index].linkList : [];\n\n return {\n title,\n linkList: [...col.linkList, ...linkList],\n };\n }),\n ...osFlyoutOverrides.flyout.slice(osFlyoutCache.flyout.length),\n ];\n\n return {\n ...mainNav,\n text: mainNavText,\n title: mainNavTitle,\n flyout: mainNavFlyout,\n } as NavMainEntity;\n });\n};\n\n/**\n * Fetch the general config based on project id\n *\n * @returns Promise for Post Portal general config\n */\nexport const fetchConfig = async (\n projectId: string,\n environment: Environment,\n): Promise<IPortalConfig> => {\n // Check if project id is sanitized\n if (!isValidProjectId(projectId)) {\n throw new Error(`Internet Header: invalid project id \"${projectId}\"`);\n }\n\n if (projectId === 'test') {\n environment = 'int01';\n }\n\n let url = generateConfigUrl(projectId, environment);\n\n // Get the config if cache is invalid\n try {\n const res = await fetch(url);\n return (await res.json()) as IPortalConfig;\n } catch (error) {\n throw new Error(`Internet Header: fetching config failed. ${error.message}`);\n }\n};\n\n/**\n * Generate an URL with all necessary query params to get the configuration.\n * Project id \"test\" will return a test configuration\n * @param projectId string\n * @param environment int01, int02 or prod\n * @returns URL pointing to the project config\n */\nexport const generateConfigUrl = (projectId: string, environment: Environment): string => {\n if (projectId === 'test') return 'assets/config/test-configuration.json';\n\n const parsedEnvironment = environment.toLowerCase();\n const isProd = parsedEnvironment === 'prod';\n const host = `https://${isProd ? 'www' : 'int'}.post.ch`;\n try {\n // Use URL to validate the generated URL\n return new URL(\n `${host}/api/headerjs/Json?serviceid=${encodeURIComponent(projectId)}${\n !isProd ? '&environment=' + parsedEnvironment : ''\n }`,\n ).toString();\n } catch (error) {\n throw new Error(`Internet Header: Config URL is invalid.`);\n }\n};\n\n/**\n * Check if project id contains only URL safe characters\n *\n * @param projectId Project Id string\n * @returns The valid project id\n */\nexport const isValidProjectId = (projectId: string): boolean => {\n return projectId !== '' && projectId.length > 0 && /^[a-zA-Z][\\w-]*[a-zA-Z0-9]$/.test(projectId);\n};\n\n/**\n * Get the localized config object from a custom config\n *\n * @param config String or json object of the custom config\n * @param language Specific language\n * @returns Localized custom config object\n */\nexport const getLocalizedCustomConfig = (\n config: string | ICustomConfig,\n language: string,\n): ILocalizedCustomConfig | undefined => {\n let customConfig: ICustomConfig;\n try {\n customConfig = typeof config === 'string' ? JSON.parse(config) : config;\n } catch (error) {\n throw new Error(\n `Internet Header: Custom config is invalid. Make sure your custom config contains valid JSON syntax and matches the definition. `,\n );\n }\n let localizedCustomConfig: ILocalizedCustomConfig | undefined = customConfig[language];\n if (localizedCustomConfig?.header?.navMain)\n setMainNavigationIds(localizedCustomConfig.header.navMain);\n return localizedCustomConfig;\n};\n\n/**\n * Check if mobile header styles are applied or not\n * @returns True if browser is smaller than 1024px\n */\nexport const isMobile = () => window.innerWidth < 1024;\n\n/**\n * Set unique ID's on main navigation entities but conserve flyout_os to be able to\n * identify the online-service flyout, which can be configured by osFlyoutOverrides\n */\nexport const setMainNavigationIds = (navMainEntities: NavMainEntity[]): void => {\n navMainEntities.forEach(navMainEntity => {\n navMainEntity.id = navMainEntity.id === 'flyout_os' ? navMainEntity.id : uniqueId('main-nav-');\n });\n};\n","@use '@swisspost/design-system-styles/variables/color';\n@use '../../utils/utils.scss';\n@use '../../utils/mixins.scss';\n\n:host {\n display: block;\n position: relative;\n font-size: 1rem;\n font-weight: 300;\n z-index: var(--header-z-index, 10);\n\n --header-height: 3.5rem; // 56px\n --meta-header-height: 0px; // Not visible on mobile\n --language-dropdown-margin-top: 0px;\n\n @include mixins.min(lg) {\n --meta-header-height: 3rem; // 48px\n --header-height: 4rem; // 64px\n }\n\n @include mixins.min(xl) {\n --header-height: 4.5rem; // 72px\n }\n}\n\n// Set height to 0 if meta is never visible\n:host([meta='false']) {\n --meta-header-height: 0px;\n // Compensation for header border-bottom, when language dropdown is displayed within main navigation controls\n --language-dropdown-margin-top: 1px;\n}\n\n// Support different kinds of stickyness modes\n// Works only in combination with setting header heights dynamically\n@supports (position: sticky) {\n // If stickyness is none, simply apply no styles, all others are sticky\n :host(:not(.stickyness-none)) {\n position: sticky;\n }\n\n // Everything is always sticky\n :host(.stickyness-full) {\n top: 0;\n }\n\n // Only main nav is sticky\n :host(.stickyness-main) {\n top: calc(var(--meta-header-height, 0px) * -1);\n }\n\n // Hide everything\n :host(.stickyness-minimal) {\n top: calc((var(--header-height, 0px) + var(--meta-header-height, 0px) + 1px) * -1);\n transition: top 200ms ease-in;\n }\n\n // Show main when scrolling up or any of the menus are open\n :host(.stickyness-minimal.scrolling-up),\n :host(.stickyness-minimal.dropdown-open) {\n top: calc(var(--meta-header-height, 0px) * -1);\n transition: top 200ms ease-out;\n }\n}\n\n.post-internet-header {\n border-bottom: 1px solid color.$gray-10;\n background-color: white;\n}\n\n.main-navigation-container {\n display: flex;\n\n & > .main-navigation-controls {\n flex: 0 0 auto;\n }\n}\n\n.main-navigation {\n display: flex;\n}\n\n.sub-navigation-container {\n position: absolute;\n top: 100%;\n left: 0;\n width: 100%;\n display: flex;\n background: white;\n visibility: hidden;\n}\n\n.main-navigation-item:hover .sub-navigation-container {\n visibility: visible;\n}\n\n.main-navigation-controls {\n display: flex;\n margin-left: auto;\n\n @include mixins.max(lg) {\n font-weight: 400;\n }\n\n @include mixins.min(lg) {\n font-size: 1.0625rem;\n }\n\n & > * {\n border-left: 1px solid color.$gray-10;\n }\n}\n\n.menu-button {\n display: flex;\n align-items: center;\n padding: 0 calc(1rem - 1px);\n font-weight: 300;\n cursor: pointer;\n border-left: 1px solid color.$gray-10;\n order: 1; /* Display on the far right because of tab order */\n\n @include mixins.min(lg) {\n display: none;\n }\n\n .visually-hidden {\n @include mixins.between(rg, lg) {\n @include mixins.reset-visually-hidden();\n\n margin-right: 0.5rem;\n }\n }\n\n svg {\n width: 1.5rem;\n height: 1.5rem;\n }\n}\n\n.full-width {\n .wide-container {\n max-width: none;\n }\n}\n","import {\n Component,\n Host,\n Element,\n h,\n State,\n Prop,\n Watch,\n Listen,\n EventEmitter,\n Event,\n Method,\n} from '@stencil/core';\nimport { debounce, throttle } from 'throttle-debounce';\nimport {\n getLocalizedConfig,\n getLocalizedCustomConfig,\n isValidProjectId,\n} from '../../services/config.service';\nimport { state, dispose } from '../../data/store';\nimport { DropdownElement, DropdownEvent, NavMainEntity } from '../../models/header.model';\nimport { SvgSprite } from '../../utils/svg-sprite.component';\nimport { SvgIcon } from '../../utils/svg-icon.component';\nimport { StickynessOptions } from '../../models/implementor.model';\nimport { ActiveRouteProp, Environment, ICustomConfig } from '../../models/general.model';\nimport { IAvailableLanguage } from '../../models/language.model';\nimport { translate } from '../../services/language.service';\nimport { If } from '../../utils/if.component';\nimport packageJson from '../../../package.json';\n\n@Component({\n tag: 'swisspost-internet-header',\n styleUrl: 'post-internet-header.scss',\n shadow: true,\n})\nexport class PostInternetHeader {\n /**\n * Your project id, previously passed as query string parameter serviceId.\n */\n @Prop() project: string;\n\n /**\n * Sticky behaviour of the header.\n */\n @Prop() stickyness: StickynessOptions = 'minimal';\n\n /**\n * Initial language to be used. Overrides automatic language detection.\n */\n @Prop() language?: string;\n\n /**\n * Toggle the meta navigation.\n */\n @Prop() meta: boolean = true;\n\n /**\n * Toggle the login link (when logged out) or the user widget (when logged in).\n */\n @Prop() login: boolean = true;\n\n /**\n * Toggle the search button.\n */\n @Prop() search: boolean = true;\n\n /**\n * Toggle skiplinks. They help keyboard users to quickly jump to important sections of the page.\n */\n @Prop() skiplinks: boolean = true;\n\n /**\n * DEPRECATED!: Define a proxy URL for the config fetch request. Will be removed in the next major version\n */\n @Prop() configProxy?: string;\n\n /**\n * Target environment. Choose 'int01' for local testing.\n */\n @Prop() environment: Environment = 'prod';\n\n /**\n * Override the language switch links with custom URLs. Helpful when your application contains sub-pages and you\n * would like to stay on subpages when the user changes language.\n */\n @Prop() languageSwitchOverrides?: string | IAvailableLanguage[];\n\n /**\n * Customize the header config loaded from the post portal.\n */\n @Prop() customConfig?: string | ICustomConfig;\n\n /**\n * The header uses this cookie to set the language. Disables automatic language detection.\n */\n @Prop() languageCookieKey?: string;\n\n /**\n * The header uses this local storage key to set the language. Disables automatic language selection.\n */\n @Prop() languageLocalStorageKey?: string = 'swisspost-internet-header-language';\n\n /**\n * Set the currently activated route. If there is a link matching this URL in the header, it will be highlighted.\n * Will also highlight partly matching URLs. When set to auto, will use current location.href for comparison.\n */\n @Prop() activeRoute?: 'auto' | false | string = 'auto';\n\n /**\n * Online Services only: Add custom links to the special online service navigation entry\n */\n @Prop() osFlyoutOverrides?: string | NavMainEntity;\n\n /**\n * Displays the header at full width for full-screen applications\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * Fires when the header has been rendered to the page.\n */\n @Event() headerLoaded: EventEmitter<void>;\n\n @State() activeFlyout: string | null = null;\n @State() activeDropdownElement: DropdownElement | null = null;\n @Element() host: HTMLElement;\n\n /**\n * Get the currently set language as a two letter string (\"de\", \"fr\" \"it\" or \"en\")\n * @returns string\n */\n @Method()\n async getCurrentLanguage(): Promise<'de' | 'fr' | 'it' | 'en' | string> {\n return state.currentLanguage ?? 'de';\n }\n\n private mainNav?: HTMLPostMainNavigationElement;\n private lastScrollTop = window.scrollY || document.documentElement.scrollTop;\n private throttledScroll: throttle<() => void>;\n private debouncedResize: debounce<() => void>;\n private lastWindowWidth: number = window.innerWidth;\n\n constructor() {\n if (this.project === undefined || this.project === '' || !isValidProjectId(this.project)) {\n throw new Error(\n `Internet Header project key is \"${this.project}\". Please provide a valid project key.`,\n );\n }\n }\n\n connectedCallback() {\n this.throttledScroll = throttle(300, () => this.handleScrollEvent());\n this.debouncedResize = debounce(200, () => this.handleResize());\n window.addEventListener('scroll', this.throttledScroll, { passive: true });\n window.addEventListener('resize', this.debouncedResize, { passive: true });\n }\n\n disconnectedCallback() {\n window.removeEventListener('scroll', this.throttledScroll);\n window.removeEventListener('resize', this.debouncedResize);\n\n // Reset the store to its original state\n dispose();\n }\n\n async componentWillLoad() {\n // Wait for the config to arrive, then render the header\n try {\n state.projectId = this.project;\n state.environment = this.environment;\n if (this.language !== undefined) state.currentLanguage = this.language;\n state.languageSwitchOverrides =\n typeof this.languageSwitchOverrides === 'string'\n ? JSON.parse(this.languageSwitchOverrides)\n : this.languageSwitchOverrides;\n state.osFlyoutOverrides =\n typeof this.osFlyoutOverrides === 'string'\n ? JSON.parse(this.osFlyoutOverrides)\n : this.osFlyoutOverrides;\n\n if (this.customConfig !== undefined && state.currentLanguage !== null) {\n state.localizedCustomConfig = getLocalizedCustomConfig(\n this.customConfig,\n state.currentLanguage,\n );\n }\n\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n } catch (error) {\n console.error(error);\n }\n }\n\n componentDidLoad() {\n window.requestAnimationFrame(() => {\n this.handleResize();\n this.headerLoaded.emit();\n this.host.classList.add('header-loaded');\n });\n\n if (this.stickyness === 'full')\n console.warn('Internet Header: The stickyness=\"full\" option is deprecated.');\n }\n\n @Watch('language')\n async handleLanguageChange(newValue: string) {\n state.currentLanguage = newValue;\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: newValue,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n if (this.customConfig)\n state.localizedCustomConfig = getLocalizedCustomConfig(this.customConfig, newValue);\n }\n\n @Watch('languageSwitchOverrides')\n handleAvailableLanguagesChage(newValue: string | IAvailableLanguage[]) {\n state.languageSwitchOverrides = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;\n }\n\n @Watch('osFlyoutOverrides')\n async handleOsFlyoutOverrides(newValue: string | NavMainEntity) {\n state.osFlyoutOverrides = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n }\n\n @Watch('activeRoute')\n async handleActiveRouteChange(newValue: string | ActiveRouteProp) {\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: newValue,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n }\n\n @Watch('customConfig')\n async handleCustomConfigChange(newValue: string | ICustomConfig) {\n if (this.language === undefined) return;\n const localizedCustomConfig = getLocalizedCustomConfig(newValue, this.language);\n state.localizedCustomConfig = localizedCustomConfig;\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n }\n\n @Watch('search')\n handleSearchChange(newValue: boolean) {\n state.search = newValue;\n }\n\n @Watch('login')\n handleLoginChange(newValue: boolean) {\n state.login = newValue;\n }\n\n @Watch('meta')\n handleMetaChange(newValue: boolean) {\n state.meta = newValue;\n }\n\n @Listen('languageChanged')\n handleLanguageChangeEvent(event: CustomEvent<string>) {\n this.handleLanguageChange(event.detail);\n }\n\n private handleClickOutsideBound = this.handleClickOutside.bind(this);\n\n private handleClickOutside(event: Event) {\n // Close active dropdown element on click outside of it\n if (this.activeDropdownElement && !event.composedPath().includes(this.activeDropdownElement)) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n }\n\n private handleKeyUp(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n if (this.activeDropdownElement) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n if (this.activeFlyout !== null && this.mainNav) {\n this.mainNav.toggleDropdown(false);\n }\n }\n }\n\n private handleScrollEvent() {\n // Credits: \"https://github.com/qeremy/so/blob/master/so.dom.js#L426\"\n const st = window.scrollY || document.documentElement.scrollTop;\n\n // Toggle class without re-rendering the component if stickyness is minimal\n // the other stickyness modes do not need the class\n if (this.stickyness === 'minimal') {\n this.host.classList.toggle('scrolling-up', st <= this.lastScrollTop);\n }\n\n // For Mobile or negative scrolling\n this.lastScrollTop = st <= 0 ? 0 : st;\n }\n\n private handleResize() {\n // Close main navigation dropdown if size changed to bigger than 1024px (search dropdown will be kept open)\n if (this.isMainNavOpen() && this.lastWindowWidth < 1024 && window.innerWidth >= 1024) {\n this.activeDropdownElement?.toggleDropdown(false);\n }\n\n this.lastWindowWidth = window.innerWidth;\n }\n\n /**\n * Close open dropdown menus if another is being opened\n *\n * @param event Dropdown toggled event\n * @returns void\n */\n private handleDropdownToggled(event: CustomEvent<DropdownEvent>) {\n if (!event.detail.open && this.activeDropdownElement !== event.detail.element) {\n // Some dropdown got closed programmatically (possibly by this function). To prevent\n // a circle or an outdated state, we'll not handle this event\n return;\n }\n\n if (event.detail.open === true) {\n if (this.activeDropdownElement) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n\n this.activeDropdownElement = event.detail.element;\n\n if (window.innerWidth >= 1024) {\n // Add event listener to close active dropdown element on click outsite of it\n // Also adds 10ms delay in case of an external interaction:\n // Some button on the page calls toggleDropdown() -> dropdown opens\n // Click event bubbles to the window, this.handleClickOutsideBound closes dropdown again\n window.setTimeout(() => {\n window.addEventListener('click', this.handleClickOutsideBound);\n }, 10);\n }\n\n if (this.activeFlyout !== null && this.mainNav) {\n this.mainNav.setActiveFlyout(null);\n }\n } else {\n this.activeDropdownElement = null;\n\n // Remove event listener as it is not needed if no dropdown element is active\n window.removeEventListener('click', this.handleClickOutsideBound);\n }\n }\n\n /**\n * Close open dropdowns if the flyout is being opened\n * @param event Flyout toggle event\n */\n private handleFlyoutToggled(event: CustomEvent<string | null>) {\n this.activeFlyout = event.detail;\n\n if (this.activeDropdownElement && event.detail && !this.isMainNavOpen()) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n }\n\n private toggleMobileDropdown() {\n this.mainNav?.toggleDropdown();\n }\n\n private isMainNavOpen() {\n return (\n this.activeDropdownElement && this.activeDropdownElement.tagName === 'POST-MAIN-NAVIGATION'\n );\n }\n\n render() {\n if (!state.localizedConfig?.header) {\n console.error(new Error('Internet Header: Config cannot be loaded'));\n return;\n }\n\n const config = state.localizedConfig;\n const renderMetaNavigation =\n this.meta &&\n config.header.navMeta !== undefined &&\n config.header.navMeta?.filter(meta => !meta.isHomeLink).length > 0;\n const renderLogin =\n (this.login ?? !config.header.isLoginWidgetHidden) && config.header.loginWidgetOptions;\n const renderLanguageSwitch = config.header.navLang.length > 1;\n\n return (\n <Host\n class={`stickyness-${this.stickyness} ${\n this.activeDropdownElement || this.activeFlyout ? 'dropdown-open' : ''\n }`}\n data-version={packageJson.version}\n onKeyup={(e: KeyboardEvent) => this.handleKeyUp(e)}\n >\n <header class={`post-internet-header${this.fullWidth ? ' full-width' : ''}`}>\n <SvgSprite />\n <h1 class=\"visually-hidden\">{translate('Navigate on post.ch')}</h1>\n <If condition={this.skiplinks === true}>\n <post-skiplinks></post-skiplinks>\n </If>\n <If condition={renderMetaNavigation === true}>\n <post-meta-navigation\n orientation=\"horizontal\"\n class=\"hidden-lg\"\n full-width={this.fullWidth}\n >\n <If condition={renderLanguageSwitch === true}>\n <post-language-switch\n id=\"post-language-switch-desktop\"\n mode=\"dropdown\"\n onDropdownToggled={e => this.handleDropdownToggled(e)}\n ></post-language-switch>\n </If>\n </post-meta-navigation>\n </If>\n <div class=\"main-navigation-container wide-container\">\n <post-logo></post-logo>\n <button\n class=\"menu-button nav-link\"\n onClick={() => this.toggleMobileDropdown()}\n aria-haspopup=\"menu\"\n aria-controls=\"post-internet-header-main-navigation\"\n aria-expanded={this.activeDropdownElement ? 'true' : 'false'}\n >\n <span class=\"menu-button-text visually-hidden\">{config.header.mobileMenu.text}</span>\n <SvgIcon name={this.isMainNavOpen() ? 'pi-close' : 'pi-menu'}></SvgIcon>\n </button>\n <post-main-navigation\n onDropdownToggled={e => this.handleDropdownToggled(e)}\n onFlyoutToggled={e => this.handleFlyoutToggled(e)}\n ref={el => (this.mainNav = el)}\n >\n <If condition={renderMetaNavigation === true}>\n <post-meta-navigation orientation=\"vertical\">\n <If condition={renderLanguageSwitch === true}>\n <post-language-switch\n id=\"post-language-switch-mobile\"\n mode=\"list\"\n ></post-language-switch>\n </If>\n </post-meta-navigation>\n </If>\n </post-main-navigation>\n <div class=\"main-navigation-controls\">\n <If condition={this.search !== false}>\n <post-search onDropdownToggled={e => this.handleDropdownToggled(e)}></post-search>\n </If>\n <If condition={!!renderLogin}>\n <post-klp-login-widget>\n <slot name=\"login-widget\"></slot>\n </post-klp-login-widget>\n </If>\n <If condition={renderMetaNavigation === false && renderLanguageSwitch === true}>\n <post-language-switch\n id=\"post-language-switch-no-meta\"\n onDropdownToggled={e => this.handleDropdownToggled(e)}\n mode=\"dropdown\"\n ></post-language-switch>\n </If>\n <slot name=\"main\"></slot>\n </div>\n </div>\n </header>\n </Host>\n );\n }\n}\n"],"mappings":"wVASO,MAAMA,EAAkB,CAC7BC,EACAC,KAGA,GAAIA,IAAoB,MAAO,CAC7B,OAAOD,C,CAIT,IAAIE,EACJF,EAASG,EAAoBH,GAE7B,GAAIC,IAAoB,QAAUA,IAAoB,QAAS,CAE7D,GAAIG,EAAqBJ,GAAS,CAChC,OAAOK,EAA+BL,E,CAGxCE,EAAa,IAAII,IAAIC,OAAOC,SAASC,K,KAChC,CACL,IACEP,EAAa,IAAII,IAAIL,EAAiBS,SAASF,SAASG,O,CACxD,MAAOC,GACPC,QAAQC,KACN,iBAAiBb,oEAEnB,OAAOD,C,EAIX,MAAMe,EAAYC,EAAiBhB,EAAQE,EAAYD,GA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KAAKuD,sBAAsBwB,QAK3DN,EAAA,OAAKE,MAAM,4CACTF,EAAA,kBACAA,EAAA,UACEE,MAAM,uBACNc,QAAS,IAAMzF,KAAK6D,uBAAsB,gBAC5B,OAAM,gBACN,uCAAsC,gBACrC7D,KAAK6C,sBAAwB,OAAS,SAErD4B,EAAA,QAAME,MAAM,oCAAoC3M,EAAOuF,OAAOmI,WAAW1H,MACzEyG,EAACkB,EAAO,CAACC,KAAM5F,KAAKsD,gBAAkB,WAAa,aAErDmB,EAAA,wBACEe,kBAAmBT,GAAK/E,KAAKuD,sBAAsBwB,GACnDc,gBAAiBd,GAAK/E,KAAK4D,oBAAoBmB,GAC/Ce,IAAKC,GAAO/F,KAAKhG,QAAU+L,GAE3BtB,EAACU,EAAE,CAACC,UAAWpB,IAAyB,MACtCS,EAAA,wBAAsBa,YAAY,YAChCb,EAACU,EAAE,CAACC,UAAWb,IAAyB,MACtCE,EAAA,wBACE5G,GAAG,8BACH0H,KAAK,aAMfd,EAAA,OAAKE,MAAM,4BACTF,EAACU,EAAE,CAACC,UAAWpF,KAAKoC,SAAW,OAC7BqC,EAAA,eAAae,kBAAmBT,GAAK/E,KAAKuD,sBAAsBwB,MAElEN,EAACU,EAAE,CAACC,YAAajB,GACfM,EAAA,6BACEA,EAAA,QAAMmB,KAAK,mBAGfnB,EAACU,EAAE,CAACC,UAAWpB,IAAyB,OAASO,IAAyB,MACxEE,EAAA,wBACE5G,GAAG,+BACH2H,kBAAmBT,GAAK/E,KAAKuD,sBAAsBwB,GACnDQ,KAAK,cAGTd,EAAA,QAAMmB,KAAK,Y"}
|
|
1
|
+
{"version":3,"names":["markActiveRoute","config","activeRouteProp","compareUrl","resetOverrideConfig","hasActivePortalRoute","resetActiveStateToPortalConfig","URL","window","location","href","document","origin","error","console","warn","scoreList","compileScoreList","length","winnerPair","main","isActiveOverride","sub","filter","nav","isActive","map","Object","assign","flyout","linkList","link","hadAnyActiveLink","mainNav","forEach","score","compareRoutes","url","updateScoreList","_a","linklist","sort","a","b","scoreListItem","hadActiveLink","Infinity","push","baseUrl","matchMode","baseUrlPath","pathname","toLocaleLowerCase","compareUrlPath","baseSegments","split","x","compareSegments","getSimilarityScore","Math","min","i","request","osFlyoutCache","getPPMConfig","ppmConfigScript","querySelector","textContent","JSON","parse","getLocalizedConfig","async","projectId","environment","language","cookieKey","localStorageKey","localizedCustomConfig","osFlyoutOverrides","ppmConfig","localizedConfig","lang","documentElement","fetchConfig","getUserLang","keys","undefined","Error","header","navMain","mergeOsFlyoutOverrides","setMainNavigationIds","_b","persistLanguageChoice","id","stringify","mainNavText","text","mainNavTitle","title","mainNavFlyout","col","index","overrides","slice","isValidProjectId","generateConfigUrl","res","fetch","json","message","parsedEnvironment","toLowerCase","isProd","host","encodeURIComponent","toString","test","getLocalizedCustomConfig","customConfig","navMainEntities","navMainEntity","uniqueId","postInternetHeaderCss","PostInternetHeader","state","currentLanguage","constructor","hostRef","this","lastScrollTop","scrollY","scrollTop","lastWindowWidth","innerWidth","handleClickOutsideBound","handleClickOutside","bind","project","connectedCallback","throttledScroll","throttle","handleScrollEvent","debouncedResize","debounce","handleResize","addEventListener","passive","disconnectedCallback","removeEventListener","dispose","languageSwitchOverrides","languageCookieKey","languageLocalStorageKey","activeRoute","componentDidLoad","requestAnimationFrame","headerLoaded","emit","classList","add","stickyness","newValue","handleAvailableLanguagesChage","handleSearchChange","search","handleLoginChange","login","handleMetaChange","meta","handleLanguageChangeEvent","event","handleLanguageChange","detail","activeDropdownElement","composedPath","includes","toggleDropdown","handleKeyUp","key","activeFlyout","st","toggle","isMainNavOpen","handleDropdownToggled","open","element","setTimeout","setActiveFlyout","handleFlyoutToggled","toggleMobileDropdown","tagName","render","renderMetaNavigation","navMeta","isHomeLink","renderLogin","_c","isLoginWidgetHidden","loginWidgetOptions","renderLanguageSwitch","navLang","h","Host","class","packageJson","version","onKeyup","e","fullWidth","SvgSprite","translate","If","condition","skiplinks","orientation","mode","onDropdownToggled","onClick","mobileMenu","SvgIcon","name","onFlyoutToggled","ref","el"],"sources":["./src/services/route.service.ts","./src/services/config.service.ts","./src/components/post-internet-header/post-internet-header.scss?tag=swisspost-internet-header&encapsulation=shadow","./src/components/post-internet-header/post-internet-header.tsx"],"sourcesContent":["import { ActiveRouteProp } from '../models/general.model';\nimport { NavMainEntity, MainNavScoreList } from '../models/header.model';\n\n/**\n * Activate the current route based on the config and the match mode\n * @param config Main Navigation Config\n * @param activeRouteProp Match mode\n * @returns Modified Main Navigation Config\n */\nexport const markActiveRoute = (\n config: NavMainEntity[],\n activeRouteProp: ActiveRouteProp,\n): NavMainEntity[] => {\n // Don't highlight any route\n if (activeRouteProp === false) {\n return config;\n }\n\n // Set compare URL and check if activeRouteProp is valid\n let compareUrl: URL;\n config = resetOverrideConfig(config);\n\n if (activeRouteProp === 'auto' || activeRouteProp === 'exact') {\n // Check if an active route is already configured, set override to that and return\n if (hasActivePortalRoute(config)) {\n return resetActiveStateToPortalConfig(config);\n }\n\n compareUrl = new URL(window.location.href);\n } else {\n try {\n compareUrl = new URL(activeRouteProp, document.location.origin);\n } catch (error) {\n console.warn(\n `Active Route: ${activeRouteProp} is not a valid URL. Navigation highlighting has been disabled.`,\n );\n return config;\n }\n }\n\n const scoreList = compileScoreList(config, compareUrl, activeRouteProp);\n\n if (scoreList.length === 0) {\n // No match found or already active links defined\n return config;\n }\n\n const winnerPair = scoreList[0];\n winnerPair.main.isActiveOverride = true;\n if (winnerPair.sub) winnerPair.sub.isActiveOverride = true;\n\n return config;\n};\n\n/**\n * Check if the portal config set any active route\n * @param config Main navigation config\n * @returns True if portal set any route as active\n */\nexport const hasActivePortalRoute = (config: NavMainEntity[]): boolean => {\n return config.filter(nav => nav.isActive).length > 0;\n};\n\nexport const resetActiveStateToPortalConfig = (config: NavMainEntity[]): NavMainEntity[] => {\n return config.map(nav => ({\n ...nav,\n isActiveOverride: nav.isActive,\n flyout: nav.flyout.map(flyout => ({\n ...flyout,\n linkList: flyout.linkList.map(link => ({ ...link, isActiveOverride: link.isActive })),\n })),\n }));\n};\n\nconst resetOverrideConfig = (config: NavMainEntity[]): NavMainEntity[] => {\n return config.map(nav => ({\n ...nav,\n isActiveOverride: false,\n flyout: nav.flyout.map(flyout => ({\n ...flyout,\n linkList: flyout.linkList.map(link => ({ ...link, isActiveOverride: false })),\n })),\n }));\n};\n\n/**\n * Compile a list of scores based on the map mode, sorted in descending order\n * @param config Main Nav Config\n * @param compareUrl Current Browser URL or a custom URL\n * @param activeRouteProp Match mode\n * @returns A list of scored URLs if any matched\n */\nexport const compileScoreList = (\n config: NavMainEntity[],\n compareUrl: URL,\n activeRouteProp: ActiveRouteProp,\n): MainNavScoreList => {\n // Flag to check if the Portal set any active links or if there are any exact matches\n let hadAnyActiveLink = false;\n const scoreList: MainNavScoreList = [];\n\n config\n .filter(mainNav => !hadAnyActiveLink && mainNav)\n .forEach(mainNav => {\n try {\n const score = compareRoutes(\n compareUrl,\n new URL(mainNav.url),\n activeRouteProp as 'auto' | 'exact',\n );\n\n hadAnyActiveLink = updateScoreList(\n scoreList,\n score,\n { main: mainNav, score },\n hadAnyActiveLink,\n );\n } catch {\n // Not a valid url, continue\n }\n\n // Loop through flyout links 2nd level\n mainNav.flyout.forEach(flyout => {\n flyout.linkList?.forEach(linklist => {\n // Don't override if any link is already active\n if (linklist.isActive && (activeRouteProp === 'auto' || activeRouteProp === 'exact')) {\n hadAnyActiveLink = true;\n return;\n }\n\n try {\n const url = new URL(linklist.url);\n const score = compareRoutes(compareUrl, url, activeRouteProp as 'auto' | 'exact');\n\n hadAnyActiveLink = updateScoreList(\n scoreList,\n score,\n { main: mainNav, sub: linklist, score },\n hadAnyActiveLink,\n );\n } catch {\n // Not a valid URL, continue\n }\n });\n });\n });\n\n return scoreList.sort((a, b) => b.score - a.score);\n};\n\n/**\n * Update score list\n */\nfunction updateScoreList(\n scoreList: MainNavScoreList,\n score: number,\n scoreListItem: any,\n hadAnyActiveLink: boolean,\n) {\n let hadActiveLink = hadAnyActiveLink;\n\n if (score > 0) {\n if (score === Infinity) hadActiveLink = true;\n // Push score\n scoreList.push(scoreListItem);\n }\n\n return hadActiveLink;\n}\n\n/**\n * Compare two URLs for similarity based on a match mode\n * @param baseUrl Browser URL\n * @param compareUrl Navigatgion URL\n * @param matchMode exact or auto matching\n * @returns Score\n */\nexport const compareRoutes = (\n baseUrl: URL,\n compareUrl: URL,\n matchMode?: 'auto' | 'exact',\n): number => {\n // One url is not defined or they don't share the same orign\n if (!baseUrl || !compareUrl || baseUrl.origin !== compareUrl.origin) {\n return 0;\n }\n\n const baseUrlPath = baseUrl.pathname.toLocaleLowerCase();\n const compareUrlPath = compareUrl.pathname.toLocaleLowerCase();\n\n // Exact match, origin and pathname are the same\n if (baseUrlPath === compareUrlPath) {\n return Infinity;\n }\n\n // The basepath is longer than the comparison, a match is impossible\n if (baseUrl.pathname.length < compareUrl.pathname.length) {\n return 0;\n }\n\n if (matchMode === 'auto') {\n const baseSegments = [\n baseUrl.origin.toLocaleLowerCase(),\n ...baseUrlPath.split('/').filter(x => !!x),\n ];\n const compareSegments = [\n compareUrl.origin.toLocaleLowerCase(),\n ...compareUrlPath.split('/').filter(x => !!x),\n ];\n\n const score = getSimilarityScore(baseSegments, compareSegments);\n\n // If only some segments match, but not the whole smaller array, it's not a match\n return Math.min(baseSegments.length, compareSegments.length) === score ? score : 0;\n }\n\n return 0;\n};\n\n/**\n * Check how many items in an array match\n * @param a Base array\n * @param b Compare array\n * @returns Score\n */\nexport const getSimilarityScore = (a: string[], b: string[]): number => {\n if (!a?.length || !b?.length) {\n return 0;\n }\n\n let i = 0;\n for (; i < Math.min(a.length, b.length); i++) {\n if (a[i] !== b[i]) {\n return 0;\n }\n }\n\n return i;\n};\n","import {\n Environment,\n IPortalConfig,\n ILocalizedConfig,\n ICustomConfig,\n ILocalizedCustomConfig,\n LocalizedConfigParameters,\n} from '../models/general.model';\nimport { NavMainEntity } from '../models/header.model';\nimport { getUserLang, persistLanguageChoice } from './language.service';\nimport { uniqueId } from '../utils/utils';\nimport { markActiveRoute } from './route.service';\n\n// Prevent double requests\nlet request: Promise<IPortalConfig> | null = null;\n\n// Cache the original os flyout to use it for updates\nlet osFlyoutCache: NavMainEntity | null = null;\n\nconst getPPMConfig = (): ILocalizedConfig | null => {\n const ppmConfigScript = document.querySelector('#PPM_HEADER_DATA');\n\n if (ppmConfigScript?.textContent) {\n return JSON.parse(ppmConfigScript.textContent);\n }\n\n return null;\n};\n\n/**\n * Get a localized config object\n *\n * @param projectId String identifying the project\n * @param language [optional] Preferred language\n * @returns Localized config object\n */\nexport const getLocalizedConfig = async ({\n projectId,\n environment,\n language,\n cookieKey,\n localStorageKey,\n activeRouteProp,\n localizedCustomConfig,\n osFlyoutOverrides,\n}: LocalizedConfigParameters): Promise<ILocalizedConfig> => {\n const ppmConfig = getPPMConfig();\n let localizedConfig: ILocalizedConfig;\n let config: IPortalConfig | null = null;\n let lang: string | undefined;\n\n if (ppmConfig) {\n localizedConfig = ppmConfig;\n lang = document.documentElement.lang;\n } else {\n if (!request) {\n request = fetchConfig(projectId, environment);\n }\n\n config = await request;\n lang = getUserLang(Object.keys(config), language, localStorageKey, cookieKey);\n\n if (lang === undefined) {\n throw new Error('Internet Header: unable to determine current language');\n }\n\n // Clone config for more predictable state updates\n localizedConfig = { ...config[lang] };\n }\n\n // Merge custom config with portal config\n if (localizedCustomConfig) {\n const header = localizedCustomConfig?.header?.navMain\n ? {\n ...localizedConfig.header,\n navMain: [...localizedConfig.header.navMain, ...localizedCustomConfig.header.navMain],\n }\n : localizedConfig.header;\n localizedConfig = {\n ...localizedConfig,\n header,\n };\n }\n\n // Add entries to flyout_os\n if (osFlyoutOverrides)\n localizedConfig.header.navMain = mergeOsFlyoutOverrides(localizedConfig, osFlyoutOverrides);\n\n // Mark active route\n if (activeRouteProp)\n localizedConfig.header.navMain = markActiveRoute(\n localizedConfig.header.navMain,\n activeRouteProp,\n );\n\n setMainNavigationIds(localizedConfig?.header?.navMain);\n\n // Set the new language choice\n persistLanguageChoice(lang, cookieKey, localStorageKey);\n\n return localizedConfig;\n};\n\n/**\n * Merge portal config with custom os flyout overrides\n * @param config Localized config\n * @param osFlyoutOverrides Overrides for the flyout\n * @returns Merged localized config\n */\nexport const mergeOsFlyoutOverrides = (\n config: ILocalizedConfig,\n osFlyoutOverrides: NavMainEntity,\n): NavMainEntity[] => {\n if (!osFlyoutOverrides) return config.header.navMain;\n\n return config.header.navMain.map(mainNav => {\n if (mainNav.id !== 'flyout_os') return mainNav;\n\n if (osFlyoutCache === null) {\n osFlyoutCache = JSON.parse(JSON.stringify(mainNav)) as NavMainEntity;\n }\n\n const mainNavText = osFlyoutOverrides.text ?? osFlyoutCache.text;\n const mainNavTitle = osFlyoutOverrides.title ?? osFlyoutCache.title;\n\n if (\n !osFlyoutCache.flyout ||\n osFlyoutCache.flyout.length === 0 ||\n !osFlyoutOverrides.flyout ||\n osFlyoutOverrides.flyout.length === 0\n )\n return {\n ...mainNav,\n title: mainNavTitle,\n text: mainNavText,\n };\n\n // Add entries for os flyout columns without overriding existing config\n const mainNavFlyout = [\n ...osFlyoutCache.flyout.map((col, index) => {\n const overrides = osFlyoutOverrides.flyout[index];\n const title = overrides.title ?? col.title;\n\n const linkList = overrides.linkList ? osFlyoutOverrides.flyout[index].linkList : [];\n\n return {\n title,\n linkList: [...col.linkList, ...linkList],\n };\n }),\n ...osFlyoutOverrides.flyout.slice(osFlyoutCache.flyout.length),\n ];\n\n return {\n ...mainNav,\n text: mainNavText,\n title: mainNavTitle,\n flyout: mainNavFlyout,\n } as NavMainEntity;\n });\n};\n\n/**\n * Fetch the general config based on project id\n *\n * @returns Promise for Post Portal general config\n */\nexport const fetchConfig = async (\n projectId: string,\n environment: Environment,\n): Promise<IPortalConfig> => {\n // Check if project id is sanitized\n if (!isValidProjectId(projectId)) {\n throw new Error(`Internet Header: invalid project id \"${projectId}\"`);\n }\n\n if (projectId === 'test') {\n environment = 'int01';\n }\n\n let url = generateConfigUrl(projectId, environment);\n\n // Get the config if cache is invalid\n try {\n const res = await fetch(url);\n return (await res.json()) as IPortalConfig;\n } catch (error) {\n throw new Error(`Internet Header: fetching config failed. ${error.message}`);\n }\n};\n\n/**\n * Generate an URL with all necessary query params to get the configuration.\n * Project id \"test\" will return a test configuration\n * @param projectId string\n * @param environment int01, int02 or prod\n * @returns URL pointing to the project config\n */\nexport const generateConfigUrl = (projectId: string, environment: Environment): string => {\n if (projectId === 'test') return 'assets/config/test-configuration.json';\n\n const parsedEnvironment = environment.toLowerCase();\n const isProd = parsedEnvironment === 'prod';\n const host = `https://${isProd ? 'www' : 'int'}.post.ch`;\n try {\n // Use URL to validate the generated URL\n return new URL(\n `${host}/api/headerjs/Json?serviceid=${encodeURIComponent(projectId)}${\n !isProd ? '&environment=' + parsedEnvironment : ''\n }`,\n ).toString();\n } catch (error) {\n throw new Error(`Internet Header: Config URL is invalid.`);\n }\n};\n\n/**\n * Check if project id contains only URL safe characters\n *\n * @param projectId Project Id string\n * @returns The valid project id\n */\nexport const isValidProjectId = (projectId: string): boolean => {\n return projectId !== '' && projectId.length > 0 && /^[a-zA-Z][\\w-]*[a-zA-Z0-9]$/.test(projectId);\n};\n\n/**\n * Get the localized config object from a custom config\n *\n * @param config String or json object of the custom config\n * @param language Specific language\n * @returns Localized custom config object\n */\nexport const getLocalizedCustomConfig = (\n config: string | ICustomConfig,\n language: string,\n): ILocalizedCustomConfig | undefined => {\n let customConfig: ICustomConfig;\n try {\n customConfig = typeof config === 'string' ? JSON.parse(config) : config;\n } catch (error) {\n throw new Error(\n `Internet Header: Custom config is invalid. Make sure your custom config contains valid JSON syntax and matches the definition. `,\n );\n }\n let localizedCustomConfig: ILocalizedCustomConfig | undefined = customConfig[language];\n if (localizedCustomConfig?.header?.navMain)\n setMainNavigationIds(localizedCustomConfig.header.navMain);\n return localizedCustomConfig;\n};\n\n/**\n * Check if mobile header styles are applied or not\n * @returns True if browser is smaller than 1024px\n */\nexport const isMobile = () => window.innerWidth < 1024;\n\n/**\n * Set unique ID's on main navigation entities but conserve flyout_os to be able to\n * identify the online-service flyout, which can be configured by osFlyoutOverrides\n */\nexport const setMainNavigationIds = (navMainEntities: NavMainEntity[]): void => {\n navMainEntities.forEach(navMainEntity => {\n navMainEntity.id = navMainEntity.id === 'flyout_os' ? navMainEntity.id : uniqueId('main-nav-');\n });\n};\n","@use '@swisspost/design-system-styles/variables/color';\n@use '../../utils/utils.scss';\n@use '../../utils/mixins.scss';\n\n:host {\n display: block;\n position: relative;\n font-size: 1rem;\n font-weight: 300;\n z-index: var(--header-z-index, 10);\n\n --header-height: 3.5rem; // 56px\n --meta-header-height: 0px; // Not visible on mobile\n --language-dropdown-margin-top: 0px;\n\n @include mixins.min(lg) {\n --meta-header-height: 3rem; // 48px\n --header-height: 4rem; // 64px\n }\n\n @include mixins.min(xl) {\n --header-height: 4.5rem; // 72px\n }\n}\n\n// Set height to 0 if meta is never visible\n:host([meta='false']) {\n --meta-header-height: 0px;\n // Compensation for header border-bottom, when language dropdown is displayed within main navigation controls\n --language-dropdown-margin-top: 1px;\n}\n\n// Support different kinds of stickyness modes\n// Works only in combination with setting header heights dynamically\n@supports (position: sticky) {\n // If stickyness is none, simply apply no styles, all others are sticky\n :host(:not(.stickyness-none)) {\n position: sticky;\n }\n\n // Everything is always sticky\n :host(.stickyness-full) {\n top: 0;\n }\n\n // Only main nav is sticky\n :host(.stickyness-main) {\n top: calc(var(--meta-header-height, 0px) * -1);\n }\n\n // Hide everything\n :host(.stickyness-minimal) {\n top: calc((var(--header-height, 0px) + var(--meta-header-height, 0px) + 1px) * -1);\n transition: top 200ms ease-in;\n }\n\n // Show main when scrolling up or any of the menus are open\n :host(.stickyness-minimal.scrolling-up),\n :host(.stickyness-minimal.dropdown-open) {\n top: calc(var(--meta-header-height, 0px) * -1);\n transition: top 200ms ease-out;\n }\n}\n\n.post-internet-header {\n border-bottom: 1px solid color.$gray-10;\n background-color: white;\n}\n\n.main-navigation-container {\n display: flex;\n\n & > .main-navigation-controls {\n flex: 0 0 auto;\n }\n}\n\n.main-navigation {\n display: flex;\n}\n\n.sub-navigation-container {\n position: absolute;\n top: 100%;\n left: 0;\n width: 100%;\n display: flex;\n background: white;\n visibility: hidden;\n}\n\n.main-navigation-item:hover .sub-navigation-container {\n visibility: visible;\n}\n\n.main-navigation-controls {\n display: flex;\n margin-left: auto;\n\n @include mixins.max(lg) {\n font-weight: 400;\n }\n\n @include mixins.min(lg) {\n font-size: 1.0625rem;\n }\n\n & > * {\n border-left: 1px solid color.$gray-10;\n }\n}\n\n.menu-button {\n display: flex;\n align-items: center;\n padding: 0 calc(1rem - 1px);\n font-weight: 300;\n cursor: pointer;\n border-left: 1px solid color.$gray-10;\n order: 1; /* Display on the far right because of tab order */\n\n @include mixins.min(lg) {\n display: none;\n }\n\n .visually-hidden {\n @include mixins.between(rg, lg) {\n @include mixins.reset-visually-hidden();\n\n margin-right: 0.5rem;\n }\n }\n\n svg {\n width: 1.5rem;\n height: 1.5rem;\n }\n}\n\n.full-width {\n .wide-container {\n max-width: none;\n }\n}\n","import {\n Component,\n Host,\n Element,\n h,\n State,\n Prop,\n Watch,\n Listen,\n EventEmitter,\n Event,\n Method,\n} from '@stencil/core';\nimport { debounce, throttle } from 'throttle-debounce';\nimport {\n getLocalizedConfig,\n getLocalizedCustomConfig,\n isValidProjectId,\n} from '../../services/config.service';\nimport { state, dispose } from '../../data/store';\nimport { DropdownElement, DropdownEvent, NavMainEntity } from '../../models/header.model';\nimport { SvgSprite } from '../../utils/svg-sprite.component';\nimport { SvgIcon } from '../../utils/svg-icon.component';\nimport { StickynessOptions } from '../../models/implementor.model';\nimport { ActiveRouteProp, Environment, ICustomConfig } from '../../models/general.model';\nimport { IAvailableLanguage } from '../../models/language.model';\nimport { translate } from '../../services/language.service';\nimport { If } from '../../utils/if.component';\nimport packageJson from '../../../package.json';\n\n@Component({\n tag: 'swisspost-internet-header',\n styleUrl: 'post-internet-header.scss',\n shadow: true,\n})\nexport class PostInternetHeader {\n /**\n * Your project id, previously passed as query string parameter serviceId.\n */\n @Prop() project: string;\n\n /**\n * Sticky behaviour of the header.\n */\n @Prop() stickyness: StickynessOptions = 'minimal';\n\n /**\n * Initial language to be used. Overrides automatic language detection.\n */\n @Prop() language?: string;\n\n /**\n * Toggle the meta navigation.\n */\n @Prop() meta: boolean = true;\n\n /**\n * Toggle the login link (when logged out) or the user widget (when logged in).\n */\n @Prop() login: boolean = true;\n\n /**\n * Toggle the search button.\n */\n @Prop() search: boolean = true;\n\n /**\n * Toggle skiplinks. They help keyboard users to quickly jump to important sections of the page.\n */\n @Prop() skiplinks: boolean = true;\n\n /**\n * DEPRECATED!: Define a proxy URL for the config fetch request. Will be removed in the next major version\n */\n @Prop() configProxy?: string;\n\n /**\n * Target environment. Choose 'int01' for local testing.\n */\n @Prop() environment: Environment = 'prod';\n\n /**\n * Override the language switch links with custom URLs. Helpful when your application contains sub-pages and you\n * would like to stay on subpages when the user changes language.\n */\n @Prop() languageSwitchOverrides?: string | IAvailableLanguage[];\n\n /**\n * Customize the header config loaded from the post portal.\n */\n @Prop() customConfig?: string | ICustomConfig;\n\n /**\n * The header uses this cookie to set the language. Disables automatic language detection.\n */\n @Prop() languageCookieKey?: string;\n\n /**\n * The header uses this local storage key to set the language. Disables automatic language selection.\n */\n @Prop() languageLocalStorageKey?: string = 'swisspost-internet-header-language';\n\n /**\n * Set the currently activated route. If there is a link matching this URL in the header, it will be highlighted.\n * Will also highlight partly matching URLs. When set to auto, will use current location.href for comparison.\n */\n @Prop() activeRoute?: 'auto' | false | string = 'auto';\n\n /**\n * Online Services only: Add custom links to the special online service navigation entry\n */\n @Prop() osFlyoutOverrides?: string | NavMainEntity;\n\n /**\n * Displays the header at full width for full-screen applications\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * Fires when the header has been rendered to the page.\n */\n @Event() headerLoaded: EventEmitter<void>;\n\n @State() activeFlyout: string | null = null;\n @State() activeDropdownElement: DropdownElement | null = null;\n @Element() host: HTMLElement;\n\n /**\n * Get the currently set language as a two letter string (\"de\", \"fr\" \"it\" or \"en\")\n * @returns string\n */\n @Method()\n async getCurrentLanguage(): Promise<'de' | 'fr' | 'it' | 'en' | string> {\n return state.currentLanguage ?? 'de';\n }\n\n private mainNav?: HTMLPostMainNavigationElement;\n private lastScrollTop = window.scrollY || document.documentElement.scrollTop;\n private throttledScroll: throttle<() => void>;\n private debouncedResize: debounce<() => void>;\n private lastWindowWidth: number = window.innerWidth;\n\n constructor() {\n if (this.project === undefined || this.project === '' || !isValidProjectId(this.project)) {\n throw new Error(\n `Internet Header project key is \"${this.project}\". Please provide a valid project key.`,\n );\n }\n }\n\n connectedCallback() {\n this.throttledScroll = throttle(300, () => this.handleScrollEvent());\n this.debouncedResize = debounce(200, () => this.handleResize());\n window.addEventListener('scroll', this.throttledScroll, { passive: true });\n window.addEventListener('resize', this.debouncedResize, { passive: true });\n }\n\n disconnectedCallback() {\n window.removeEventListener('scroll', this.throttledScroll);\n window.removeEventListener('resize', this.debouncedResize);\n\n // Reset the store to its original state\n dispose();\n }\n\n async componentWillLoad() {\n // Wait for the config to arrive, then render the header\n try {\n state.projectId = this.project;\n state.environment = this.environment.toLocaleLowerCase() as Environment;\n if (this.language !== undefined) state.currentLanguage = this.language;\n state.languageSwitchOverrides =\n typeof this.languageSwitchOverrides === 'string'\n ? JSON.parse(this.languageSwitchOverrides)\n : this.languageSwitchOverrides;\n state.osFlyoutOverrides =\n typeof this.osFlyoutOverrides === 'string'\n ? JSON.parse(this.osFlyoutOverrides)\n : this.osFlyoutOverrides;\n\n if (this.customConfig !== undefined && state.currentLanguage !== null) {\n state.localizedCustomConfig = getLocalizedCustomConfig(\n this.customConfig,\n state.currentLanguage,\n );\n }\n\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: state.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n } catch (error) {\n console.error(error);\n }\n }\n\n componentDidLoad() {\n window.requestAnimationFrame(() => {\n this.handleResize();\n this.headerLoaded.emit();\n this.host.classList.add('header-loaded');\n });\n\n if (this.stickyness === 'full')\n console.warn('Internet Header: The stickyness=\"full\" option is deprecated.');\n }\n\n @Watch('language')\n async handleLanguageChange(newValue: string) {\n state.currentLanguage = newValue;\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: newValue,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n if (this.customConfig)\n state.localizedCustomConfig = getLocalizedCustomConfig(this.customConfig, newValue);\n }\n\n @Watch('languageSwitchOverrides')\n handleAvailableLanguagesChage(newValue: string | IAvailableLanguage[]) {\n state.languageSwitchOverrides = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;\n }\n\n @Watch('osFlyoutOverrides')\n async handleOsFlyoutOverrides(newValue: string | NavMainEntity) {\n state.osFlyoutOverrides = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n }\n\n @Watch('activeRoute')\n async handleActiveRouteChange(newValue: string | ActiveRouteProp) {\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: newValue,\n localizedCustomConfig: state.localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n }\n\n @Watch('customConfig')\n async handleCustomConfigChange(newValue: string | ICustomConfig) {\n if (this.language === undefined) return;\n const localizedCustomConfig = getLocalizedCustomConfig(newValue, this.language);\n state.localizedCustomConfig = localizedCustomConfig;\n state.localizedConfig = await getLocalizedConfig({\n projectId: this.project,\n environment: this.environment,\n language: this.language,\n cookieKey: this.languageCookieKey,\n localStorageKey: this.languageLocalStorageKey,\n activeRouteProp: this.activeRoute,\n localizedCustomConfig: localizedCustomConfig,\n osFlyoutOverrides: state.osFlyoutOverrides,\n });\n }\n\n @Watch('search')\n handleSearchChange(newValue: boolean) {\n state.search = newValue;\n }\n\n @Watch('login')\n handleLoginChange(newValue: boolean) {\n state.login = newValue;\n }\n\n @Watch('meta')\n handleMetaChange(newValue: boolean) {\n state.meta = newValue;\n }\n\n @Listen('languageChanged')\n handleLanguageChangeEvent(event: CustomEvent<string>) {\n this.handleLanguageChange(event.detail);\n }\n\n private handleClickOutsideBound = this.handleClickOutside.bind(this);\n\n private handleClickOutside(event: Event) {\n // Close active dropdown element on click outside of it\n if (this.activeDropdownElement && !event.composedPath().includes(this.activeDropdownElement)) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n }\n\n private handleKeyUp(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n if (this.activeDropdownElement) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n if (this.activeFlyout !== null && this.mainNav) {\n this.mainNav.toggleDropdown(false);\n }\n }\n }\n\n private handleScrollEvent() {\n // Credits: \"https://github.com/qeremy/so/blob/master/so.dom.js#L426\"\n const st = window.scrollY || document.documentElement.scrollTop;\n\n // Toggle class without re-rendering the component if stickyness is minimal\n // the other stickyness modes do not need the class\n if (this.stickyness === 'minimal') {\n this.host.classList.toggle('scrolling-up', st <= this.lastScrollTop);\n }\n\n // For Mobile or negative scrolling\n this.lastScrollTop = st <= 0 ? 0 : st;\n }\n\n private handleResize() {\n // Close main navigation dropdown if size changed to bigger than 1024px (search dropdown will be kept open)\n if (this.isMainNavOpen() && this.lastWindowWidth < 1024 && window.innerWidth >= 1024) {\n this.activeDropdownElement?.toggleDropdown(false);\n }\n\n this.lastWindowWidth = window.innerWidth;\n }\n\n /**\n * Close open dropdown menus if another is being opened\n *\n * @param event Dropdown toggled event\n * @returns void\n */\n private handleDropdownToggled(event: CustomEvent<DropdownEvent>) {\n if (!event.detail.open && this.activeDropdownElement !== event.detail.element) {\n // Some dropdown got closed programmatically (possibly by this function). To prevent\n // a circle or an outdated state, we'll not handle this event\n return;\n }\n\n if (event.detail.open === true) {\n if (this.activeDropdownElement) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n\n this.activeDropdownElement = event.detail.element;\n\n if (window.innerWidth >= 1024) {\n // Add event listener to close active dropdown element on click outsite of it\n // Also adds 10ms delay in case of an external interaction:\n // Some button on the page calls toggleDropdown() -> dropdown opens\n // Click event bubbles to the window, this.handleClickOutsideBound closes dropdown again\n window.setTimeout(() => {\n window.addEventListener('click', this.handleClickOutsideBound);\n }, 10);\n }\n\n if (this.activeFlyout !== null && this.mainNav) {\n this.mainNav.setActiveFlyout(null);\n }\n } else {\n this.activeDropdownElement = null;\n\n // Remove event listener as it is not needed if no dropdown element is active\n window.removeEventListener('click', this.handleClickOutsideBound);\n }\n }\n\n /**\n * Close open dropdowns if the flyout is being opened\n * @param event Flyout toggle event\n */\n private handleFlyoutToggled(event: CustomEvent<string | null>) {\n this.activeFlyout = event.detail;\n\n if (this.activeDropdownElement && event.detail && !this.isMainNavOpen()) {\n this.activeDropdownElement.toggleDropdown(false);\n }\n }\n\n private toggleMobileDropdown() {\n this.mainNav?.toggleDropdown();\n }\n\n private isMainNavOpen() {\n return (\n this.activeDropdownElement && this.activeDropdownElement.tagName === 'POST-MAIN-NAVIGATION'\n );\n }\n\n render() {\n if (!state.localizedConfig?.header) {\n console.error(new Error('Internet Header: Config cannot be loaded'));\n return;\n }\n\n const config = state.localizedConfig;\n const renderMetaNavigation =\n this.meta &&\n config.header.navMeta !== undefined &&\n config.header.navMeta?.filter(meta => !meta.isHomeLink).length > 0;\n const renderLogin =\n (this.login ?? !config.header.isLoginWidgetHidden) && config.header.loginWidgetOptions;\n const renderLanguageSwitch = config.header.navLang.length > 1;\n\n return (\n <Host\n class={`stickyness-${this.stickyness} ${\n this.activeDropdownElement || this.activeFlyout ? 'dropdown-open' : ''\n }`}\n data-version={packageJson.version}\n onKeyup={(e: KeyboardEvent) => this.handleKeyUp(e)}\n >\n <header class={`post-internet-header${this.fullWidth ? ' full-width' : ''}`}>\n <SvgSprite />\n <h1 class=\"visually-hidden\">{translate('Navigate on post.ch')}</h1>\n <If condition={this.skiplinks === true}>\n <post-skiplinks></post-skiplinks>\n </If>\n <If condition={renderMetaNavigation === true}>\n <post-meta-navigation\n orientation=\"horizontal\"\n class=\"hidden-lg\"\n full-width={this.fullWidth}\n >\n <If condition={renderLanguageSwitch === true}>\n <post-language-switch\n id=\"post-language-switch-desktop\"\n mode=\"dropdown\"\n onDropdownToggled={e => this.handleDropdownToggled(e)}\n ></post-language-switch>\n </If>\n </post-meta-navigation>\n </If>\n <div class=\"main-navigation-container wide-container\">\n <post-logo></post-logo>\n <button\n class=\"menu-button nav-link\"\n onClick={() => this.toggleMobileDropdown()}\n aria-haspopup=\"menu\"\n aria-controls=\"post-internet-header-main-navigation\"\n aria-expanded={this.activeDropdownElement ? 'true' : 'false'}\n >\n <span class=\"menu-button-text visually-hidden\">{config.header.mobileMenu.text}</span>\n <SvgIcon name={this.isMainNavOpen() ? 'pi-close' : 'pi-menu'}></SvgIcon>\n </button>\n <post-main-navigation\n onDropdownToggled={e => this.handleDropdownToggled(e)}\n onFlyoutToggled={e => this.handleFlyoutToggled(e)}\n ref={el => (this.mainNav = el)}\n >\n <If condition={renderMetaNavigation === true}>\n <post-meta-navigation orientation=\"vertical\">\n <If condition={renderLanguageSwitch === true}>\n <post-language-switch\n id=\"post-language-switch-mobile\"\n mode=\"list\"\n ></post-language-switch>\n </If>\n </post-meta-navigation>\n </If>\n </post-main-navigation>\n <div class=\"main-navigation-controls\">\n <If condition={this.search !== false}>\n <post-search onDropdownToggled={e => this.handleDropdownToggled(e)}></post-search>\n </If>\n <If condition={!!renderLogin}>\n <post-klp-login-widget>\n <slot name=\"login-widget\"></slot>\n </post-klp-login-widget>\n </If>\n <If condition={renderMetaNavigation === false && renderLanguageSwitch === true}>\n <post-language-switch\n id=\"post-language-switch-no-meta\"\n onDropdownToggled={e => this.handleDropdownToggled(e)}\n mode=\"dropdown\"\n ></post-language-switch>\n </If>\n <slot name=\"main\"></slot>\n </div>\n </div>\n </header>\n </Host>\n );\n }\n}\n"],"mappings":"wVASO,MAAMA,EAAkB,CAC7BC,EACAC,KAGA,GAAIA,IAAoB,MAAO,CAC7B,OAAOD,C,CAIT,IAAIE,EACJF,EAASG,EAAoBH,GAE7B,GAAIC,IAAoB,QAAUA,IAAoB,QAAS,CAE7D,GAAIG,EAAqBJ,GAAS,CAChC,OAAOK,EAA+BL,E,CAGxCE,EAAa,IAAII,IAAIC,OAAOC,SAASC,K,KAChC,CACL,IACEP,EAAa,IAAII,IAAIL,EAAiBS,SAASF,SAASG,O,CACxD,MAAOC,GACPC,QAAQC,KACN,iBAAiBb,oEAEnB,OAAOD,C,EAIX,MAAMe,EAAYC,EAAiBhB,EAAQE,EAAYD,GAEvD,GAAIc,EAAUE,SAAW,EAAG,CAE1B,OAAOjB,C,CAGT,MAAMkB,EAAaH,EAAU,GAC7BG,EAAWC,KAAKC,iBAAmB,KACnC,GAAIF,EAAWG,IAAKH,EAAWG,IAAID,iBAAmB,KAEtD,OAAOpB,CAAM,EAQR,MAAMI,EAAwBJ,GAC5BA,EAAOsB,QAAOC,GAAOA,EAAIC,WAAUP,OAAS,EAG9C,MAAMZ,EAAkCL,GACtCA,EAAOyB,KAAIF,GAAGG,OAAAC,OAAAD,OAAAC,OAAA,GAChBJ,GAAG,CACNH,iBAAkBG,EAAIC,SACtBI,OAAQL,EAAIK,OAAOH,KAAIG,GAAMF,OAAAC,OAAAD,OAAAC,OAAA,GACxBC,GAAM,CACTC,SAAUD,EAAOC,SAASJ,KAAIK,GAA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pB,IAAyB,MACtCS,EAAA,wBAAsBa,YAAY,YAChCb,EAACU,EAAE,CAACC,UAAWb,IAAyB,MACtCE,EAAA,wBACE5G,GAAG,8BACH0H,KAAK,aAMfd,EAAA,OAAKE,MAAM,4BACTF,EAACU,EAAE,CAACC,UAAWpF,KAAKoC,SAAW,OAC7BqC,EAAA,eAAae,kBAAmBT,GAAK/E,KAAKuD,sBAAsBwB,MAElEN,EAACU,EAAE,CAACC,YAAajB,GACfM,EAAA,6BACEA,EAAA,QAAMmB,KAAK,mBAGfnB,EAACU,EAAE,CAACC,UAAWpB,IAAyB,OAASO,IAAyB,MACxEE,EAAA,wBACE5G,GAAG,+BACH2H,kBAAmBT,GAAK/E,KAAKuD,sBAAsBwB,GACnDQ,KAAK,cAGTd,EAAA,QAAMmB,KAAK,Y"}
|
package/dist/swisspost-internet-header/{p-77bae72c.system.entry.js → p-b6f237a1.system.entry.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,n,e,o){function i(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o["throw"](t))}catch(t){r(t)}}function l(t){t.done?e(t.value):i(t.value).then(a,s)}l((o=o.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(n){return l([t,n])}}function l(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(e=0)),e)try{if(o=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;i=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){e.label=s[1];break}if(s[0]===6&&e.label<r[1]){e.label=r[1];r=s;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(s);break}if(r[2])e.ops.pop();e.trys.pop();continue}s=n.call(t,e)}catch(t){s=[6,t];i=0}finally{o=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-74393bf7.system.js","./p-35d8730c.system.js","./p-a0499b79.system.js","./p-5ff16d8a.system.js","./p-88aac12c.system.js","./p-c73f6117.system.js"],(function(t){"use strict";var n,e,o,i,r,a,s,l,f,d,u;return{setters:[function(t){n=t.h;e=t.r;o=t.c;i=t.H;r=t.g},function(t){a=t.S},function(t){s=t.S},function(t){l=t.s},function(t){f=t.e;d=t.u},function(t){u=t.t}],execute:function(){var g=function(t){var e;if(((e=l.localizedConfig)===null||e===void 0?void 0:e.header)===undefined)return;var o=l.localizedConfig.header;return n("nav",{class:"language-switch-dropdown",ref:function(n){return t.dropdownRef(n)},"aria-label":o.translations.navLangAriaLabel},n("ul",{"aria-label":u("Change language")},t.navLang.filter((function(t){return!t.isCurrent})).map((function(e){var o=e.url?"a":"button";return n("li",{key:e.lang},n(o,{onClick:function(){return t.switchLanguage(e)},href:e.url,lang:e.lang,title:e.title},n("span",{class:"visually-hidden"},e.title),n("span",{"aria-hidden":"true"},e.text)))}))))};var p='@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:transparent;border:none;border-radius:0;padding:0}.nav-link,.language-switch-dropdown a,.language-switch-dropdown button{outline:none;outline-offset:2px;text-decoration:none;color:rgba(0, 0, 0, 0.8);-webkit-transition:color 200ms;transition:color 200ms;background-color:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.5rem}.nav-link:is(:focus-visible,:focus-within,.pretend-focus),.language-switch-dropdown a:is(:focus-visible,:focus-within,.pretend-focus),.language-switch-dropdown button:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.nav-link:hover,.language-switch-dropdown a:hover,.language-switch-dropdown button:hover,.nav-link:focus,.language-switch-dropdown a:focus,.language-switch-dropdown button:focus{color:black}.nav-link:focus-visible,.language-switch-dropdown a:focus-visible,.language-switch-dropdown button:focus-visible{z-index:1;position:relative}.nav-link>svg,.language-switch-dropdown a>svg,.language-switch-dropdown button>svg{width:1.4em;height:1.4em;-ms-flex-negative:0;flex-shrink:0}.nav-link>span,.language-switch-dropdown a>span,.language-switch-dropdown button>span{-ms-flex-negative:1;flex-shrink:1}.no-list,.language-switch-dropdown ul{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", system-ui, sans-serif}button{font:inherit;padding:0}a,button{border-radius:3px;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:3px}img,svg{max-width:100%;max-height:100%}@media (forced-colors: active){svg{color:white}}.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-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: 1440.98px){.hidden-xxl{display:none}}:host{--separator-display:none;--separator-height:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-item-align:stretch;align-self:stretch}:host::before{display:var(--separator-display);height:var(--separator-height);border-left:1px solid hsl(0, 0%, 90%);content:""}.lang-btn{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:100%;padding:0 1rem;border:none;-webkit-box-shadow:none;box-shadow:none;background:none;text-transform:uppercase;cursor:pointer;color:rgba(0, 0, 0, 0.8)}.lang-btn:hover,.lang-btn:focus{color:black;position:relative;z-index:1}.lang-btn svg{width:1.5em;height:1.5em;-webkit-transition:-webkit-transform 250ms;transition:-webkit-transform 250ms;transition:transform 250ms;transition:transform 250ms, -webkit-transform 250ms}.lang-btn svg.rotated{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.language-switch{position:relative;-ms-flex-item-align:stretch;align-self:stretch;height:100%}.language-switch.list{margin-top:1.5rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.current-language{text-transform:uppercase;border-right:1px solid hsl(0, 0%, 80%);padding:0.5rem 1rem 0.5rem 0}.dropdown .language-switch-dropdown{position:absolute;top:100%;width:100%;background:white;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2), 0 2px 6px 2px rgba(0, 0, 0, 0.1);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2), 0 2px 6px 2px rgba(0, 0, 0, 0.1);z-index:1;-webkit-transform:scale(0.1);transform:scale(0.1);-webkit-transform-origin:center top;transform-origin:center top;-webkit-transition:-webkit-transform 0.1s;transition:-webkit-transform 0.1s;transition:transform 0.1s;transition:transform 0.1s, -webkit-transform 0.1s;margin-top:var(--language-dropdown-margin-top)}@media (prefers-reduced-motion: reduce){.dropdown .language-switch-dropdown{-webkit-transition:none;transition:none}}.dropdown .language-switch-dropdown.open{-webkit-transform:scale(1);transform:scale(1)}.list .language-switch-dropdown ul{display:-ms-flexbox;display:flex}.list .language-switch-dropdown ul>li+li{border-left:1px solid hsl(0, 0%, 80%)}.language-switch-dropdown a,.language-switch-dropdown button{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:3rem;padding:0 0.25rem;text-transform:uppercase;cursor:pointer;-webkit-transition:background-color 200ms, color 200ms;transition:background-color 200ms, color 200ms}.language-switch-dropdown a:hover,.language-switch-dropdown a:focus,.language-switch-dropdown button:hover,.language-switch-dropdown button:focus{background:#f4f3f1}.language-switch-dropdown a span,.language-switch-dropdown button span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.list .language-switch-dropdown a,.list .language-switch-dropdown button{color:black;height:auto;padding:0.5rem 1rem}';var c=t("post_language_switch",function(){function t(t){e(this,t);this.dropdownToggled=o(this,"dropdownToggled",7);this.languageChanged=o(this,"languageChanged",7);this.mode=undefined;this.langSwitchOpen=false}t.prototype.componentWillUpdate=function(){var t=this;if(this.languageSwitchDropdown&&!this.langSwitchOpen&&this.mode=="dropdown"){this.languageSwitchDropdown.classList.remove("open");if(f(this.languageSwitchDropdown,"transform")&&!d()){return new Promise((function(n){var e;(e=t.languageSwitchDropdown)===null||e===void 0?void 0:e.addEventListener("transitionend",(function(t){if(t.propertyName==="transform"){n(true)}}))}))}}};t.prototype.componentDidUpdate=function(){if(this.languageSwitchDropdown&&this.langSwitchOpen){this.languageSwitchDropdown.getBoundingClientRect();this.languageSwitchDropdown.classList.add("open")}};t.prototype.toggleDropdown=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){this.langSwitchOpen=t!==null&&t!==void 0?t:!this.langSwitchOpen;this.dropdownToggled.emit({open:this.langSwitchOpen,element:this.host});return[2,this.langSwitchOpen]}))}))};t.prototype.switchLanguage=function(t){this.languageChanged.emit(t.lang);this.toggleDropdown(false)};t.prototype.getMergedLanguageConfig=function(t,n){if(n===undefined){return t}return t.map((function(t){return Object.assign({},t,n.find((function(n){return n.lang===t.lang})))}))};t.prototype.setDropdownRef=function(t){this.languageSwitchDropdown=t};t.prototype.render=function(){var t=this;var e;if(((e=l.localizedConfig)===null||e===void 0?void 0:e.header)===undefined)return;var o=l.localizedConfig.header;var r=this.getMergedLanguageConfig(o.navLang,l.languageSwitchOverrides);return n(i,null,n("div",{class:"language-switch ".concat(this.mode)},n(a,null),this.mode==="dropdown"?n("button",{class:"lang-btn","aria-expanded":"".concat(this.langSwitchOpen),"aria-haspopup":"listbox",onClick:function(){return t.toggleDropdown()}},n("span",{class:"visually-hidden"},o.translations.navLangAriaLabel,", ",u("Current language is English")),n("span",{"aria-hidden":"true"},l.currentLanguage),n(s,{name:"pi-arrow-down",classNames:this.langSwitchOpen?"rotated":""})):n("span",{class:"bold current-language"},n("span",{class:"visually-hidden"},u("Current language is English")),n("span",null,l.currentLanguage)),this.langSwitchOpen||this.mode==="list"?n(g,{navLang:r,switchLanguage:function(n){return t.switchLanguage(n)},dropdownRef:function(n){return n!==undefined&&t.setDropdownRef(n)}}):null))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());c.style=p}}}));
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,o){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o["throw"](t))}catch(t){r(t)}}function l(t){t.done?n(t.value):i(t.value).then(a,s)}l((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(o=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];i=0}finally{o=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-1d455921.system.js","./p-fb82b748.system.js","./p-55bfdf22.system.js","./p-fa230c6b.system.js","./p-88aac12c.system.js","./p-3e6e0272.system.js"],(function(t){"use strict";var e,n,o,i,r,a,s,l,f,d,u;return{setters:[function(t){e=t.h;n=t.r;o=t.c;i=t.H;r=t.g},function(t){a=t.S},function(t){s=t.S},function(t){l=t.s},function(t){f=t.e;d=t.u},function(t){u=t.t}],execute:function(){var g=function(t){var n;if(((n=l.localizedConfig)===null||n===void 0?void 0:n.header)===undefined)return;var o=l.localizedConfig.header;return e("nav",{class:"language-switch-dropdown",ref:function(e){return t.dropdownRef(e)},"aria-label":o.translations.navLangAriaLabel},e("ul",{"aria-label":u("Change language")},t.navLang.filter((function(t){return!t.isCurrent})).map((function(n){var o=n.url?"a":"button";return e("li",{key:n.lang},e(o,{onClick:function(){return t.switchLanguage(n)},href:n.url,lang:n.lang,title:n.title},e("span",{class:"visually-hidden"},n.title),e("span",{"aria-hidden":"true"},n.text)))}))))};var p='@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:transparent;border:none;border-radius:0;padding:0}.nav-link,.language-switch-dropdown a,.language-switch-dropdown button{outline:none;outline-offset:2px;text-decoration:none;color:rgba(0, 0, 0, 0.8);-webkit-transition:color 200ms;transition:color 200ms;background-color:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.5rem}.nav-link:is(:focus-visible,:focus-within,.pretend-focus),.language-switch-dropdown a:is(:focus-visible,:focus-within,.pretend-focus),.language-switch-dropdown button:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.nav-link:hover,.language-switch-dropdown a:hover,.language-switch-dropdown button:hover,.nav-link:focus,.language-switch-dropdown a:focus,.language-switch-dropdown button:focus{color:black}.nav-link:focus-visible,.language-switch-dropdown a:focus-visible,.language-switch-dropdown button:focus-visible{z-index:1;position:relative}.nav-link>svg,.language-switch-dropdown a>svg,.language-switch-dropdown button>svg{width:1.4em;height:1.4em;-ms-flex-negative:0;flex-shrink:0}.nav-link>span,.language-switch-dropdown a>span,.language-switch-dropdown button>span{-ms-flex-negative:1;flex-shrink:1}.no-list,.language-switch-dropdown ul{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", system-ui, sans-serif}button{font:inherit;padding:0}a,button{border-radius:3px;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:3px}img,svg{max-width:100%;max-height:100%}@media (forced-colors: active){svg{color:white}}.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-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: 1440.98px){.hidden-xxl{display:none}}:host{--separator-display:none;--separator-height:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-item-align:stretch;align-self:stretch}:host::before{display:var(--separator-display);height:var(--separator-height);border-left:1px solid hsl(0, 0%, 90%);content:""}.lang-btn{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:100%;padding:0 1rem;border:none;-webkit-box-shadow:none;box-shadow:none;background:none;text-transform:uppercase;cursor:pointer;color:rgba(0, 0, 0, 0.8)}.lang-btn:hover,.lang-btn:focus{color:black;position:relative;z-index:1}.lang-btn svg{width:1.5em;height:1.5em;-webkit-transition:-webkit-transform 250ms;transition:-webkit-transform 250ms;transition:transform 250ms;transition:transform 250ms, -webkit-transform 250ms}.lang-btn svg.rotated{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.language-switch{position:relative;-ms-flex-item-align:stretch;align-self:stretch;height:100%}.language-switch.list{margin-top:1.5rem;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.current-language{text-transform:uppercase;border-right:1px solid hsl(0, 0%, 80%);padding:0.5rem 1rem 0.5rem 0}.dropdown .language-switch-dropdown{position:absolute;top:100%;width:100%;background:white;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2), 0 2px 6px 2px rgba(0, 0, 0, 0.1);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2), 0 2px 6px 2px rgba(0, 0, 0, 0.1);z-index:1;-webkit-transform:scale(0.1);transform:scale(0.1);-webkit-transform-origin:center top;transform-origin:center top;-webkit-transition:-webkit-transform 0.1s;transition:-webkit-transform 0.1s;transition:transform 0.1s;transition:transform 0.1s, -webkit-transform 0.1s;margin-top:var(--language-dropdown-margin-top)}@media (prefers-reduced-motion: reduce){.dropdown .language-switch-dropdown{-webkit-transition:none;transition:none}}.dropdown .language-switch-dropdown.open{-webkit-transform:scale(1);transform:scale(1)}.list .language-switch-dropdown ul{display:-ms-flexbox;display:flex}.list .language-switch-dropdown ul>li+li{border-left:1px solid hsl(0, 0%, 80%)}.language-switch-dropdown a,.language-switch-dropdown button{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:3rem;padding:0 0.25rem;text-transform:uppercase;cursor:pointer;-webkit-transition:background-color 200ms, color 200ms;transition:background-color 200ms, color 200ms}.language-switch-dropdown a:hover,.language-switch-dropdown a:focus,.language-switch-dropdown button:hover,.language-switch-dropdown button:focus{background:#f4f3f1}.language-switch-dropdown a span,.language-switch-dropdown button span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.list .language-switch-dropdown a,.list .language-switch-dropdown button{color:black;height:auto;padding:0.5rem 1rem}';var c=t("post_language_switch",function(){function t(t){n(this,t);this.dropdownToggled=o(this,"dropdownToggled",7);this.languageChanged=o(this,"languageChanged",7);this.mode=undefined;this.langSwitchOpen=false}t.prototype.componentWillUpdate=function(){var t=this;if(this.languageSwitchDropdown&&!this.langSwitchOpen&&this.mode=="dropdown"){this.languageSwitchDropdown.classList.remove("open");if(f(this.languageSwitchDropdown,"transform")&&!d()){return new Promise((function(e){var n;(n=t.languageSwitchDropdown)===null||n===void 0?void 0:n.addEventListener("transitionend",(function(t){if(t.propertyName==="transform"){e(true)}}))}))}}};t.prototype.componentDidUpdate=function(){if(this.languageSwitchDropdown&&this.langSwitchOpen){this.languageSwitchDropdown.getBoundingClientRect();this.languageSwitchDropdown.classList.add("open")}};t.prototype.toggleDropdown=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.langSwitchOpen=t!==null&&t!==void 0?t:!this.langSwitchOpen;this.dropdownToggled.emit({open:this.langSwitchOpen,element:this.host});return[2,this.langSwitchOpen]}))}))};t.prototype.switchLanguage=function(t){this.languageChanged.emit(t.lang);this.toggleDropdown(false)};t.prototype.getMergedLanguageConfig=function(t,e){if(e===undefined){return t}return t.map((function(t){return Object.assign({},t,e.find((function(e){return e.lang===t.lang})))}))};t.prototype.setDropdownRef=function(t){this.languageSwitchDropdown=t};t.prototype.render=function(){var t=this;var n;if(((n=l.localizedConfig)===null||n===void 0?void 0:n.header)===undefined)return;var o=l.localizedConfig.header;var r=this.getMergedLanguageConfig(o.navLang,l.languageSwitchOverrides);return e(i,null,e("div",{class:"language-switch ".concat(this.mode)},e(a,null),this.mode==="dropdown"?e("button",{class:"lang-btn","aria-expanded":"".concat(this.langSwitchOpen),"aria-haspopup":"listbox",onClick:function(){return t.toggleDropdown()}},e("span",{class:"visually-hidden"},o.translations.navLangAriaLabel,", ",u("Current language is English")),e("span",{"aria-hidden":"true"},l.currentLanguage),e(s,{name:"pi-arrow-down",classNames:this.langSwitchOpen?"rotated":""})):e("span",{class:"bold current-language"},e("span",{class:"visually-hidden"},u("Current language is English")),e("span",null,l.currentLanguage)),this.langSwitchOpen||this.mode==="list"?e(g,{navLang:r,switchLanguage:function(e){return t.switchLanguage(e)},dropdownRef:function(e){return e!==undefined&&t.setDropdownRef(e)}}):null))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());c.style=p}}}));
|
|
2
|
+
//# sourceMappingURL=p-b6f237a1.system.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as l}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{h as l}from"./p-8e0a4d18.js";const c=()=>l("svg",{"aria-hidden":"true",style:{display:"none"}},l("symbol",{id:"pi-close",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M22.6 23.5L16 17l-6.5 6.6-.9-.9 6.5-6.6-6.6-6.7.9-.9 6.6 6.6 6.5-6.6.9.9L17 16l6.6 6.6-1 .9z"})),l("symbol",{id:"pi-search",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M32 28.2l-11-11c1.1-1.7 1.7-3.7 1.7-5.9C22.7 5.1 17.6 0 11.3 0 5.1 0 0 5.1 0 11.3c0 6.3 5.1 11.3 11.3 11.3 2.2 0 4.2-.6 5.9-1.7l11 11 3.8-3.7zM1.3 11.3c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10-10-4.4-10-10zm17.2 8.8c.1 0 .1-.1.2-.1.6-.5 1.1-1 1.6-1.6l9.8 9.8-1.9 1.9-9.8-9.8c0-.1.1-.1.1-.2z"})),l("symbol",{id:"pi-arrow-down",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M23.6,13.2l-7.5,7.6l-7.6-7.6l0.9-0.9l6.6,6.6l6.6-6.6L23.6,13.2z"})),l("symbol",{id:"pi-menu",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M26.7 8v1.3H5.4V8h21.3zM5.4 17.3h21.3V16H5.4v1.3zm0 8.1h21.3V24H5.4v1.4z"})),l("symbol",{id:"pi-pointy-arrow-right",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M29.4 17.4H0V16h29.5L18.8 5.3h1.9L32 16.7 20.6 28h-1.9l10.7-10.6z"})),l("symbol",{id:"8004_facebook",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M22.8 10.5l-.5 5.4h-4.5V32h-6.4V15.9H8v-5.5h3.4V6.1c0-4 2.2-6.2 7-6.2h4.5v5.6h-3.5c-1.2 0-1.5.5-1.5 1.8v3.1h4.9z"})),l("symbol",{id:"8007_instagram",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M23.1 0H8.9C4 0 0 4 0 8.9v14.2C0 28 4 32 8.9 32h14.2c4.9 0 8.9-4 8.9-8.9V8.9C32 4 28 0 23.1 0zM29 23.1c0 3.3-2.7 5.9-5.9 5.9H8.9C5.6 29 3 26.4 3 23.1V8.9C3 5.6 5.6 3 8.9 3h14.2C26.4 3 29 5.6 29 8.9v14.2zM16 7.5c-4.7 0-8.5 3.8-8.5 8.5s3.8 8.5 8.5 8.5 8.5-3.8 8.5-8.5-3.8-8.5-8.5-8.5zm0 14c-3 0-5.5-2.5-5.5-5.5s2.5-5.5 5.5-5.5 5.5 2.5 5.5 5.5-2.5 5.5-5.5 5.5zM26.5 7.3c0 1-.8 1.9-1.9 1.9-1 0-1.9-.8-1.9-1.9s.8-1.9 1.9-1.9c1 .1 1.9.9 1.9 1.9z"})),l("symbol",{id:"8002_youtube",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M12.7 20.1v-9l8.6 4.5-8.6 4.5zm19-10.5s-.3-2.2-1.3-3.2c-1.2-1.3-2.6-1.3-3.2-1.4-4.5-.3-11.2-.3-11.2-.3s-6.7 0-11.2.3c-.6.1-2 .1-3.2 1.4C.6 7.4.3 9.6.3 9.6S0 12.2 0 14.8v2.4c0 2.6.3 5.2.3 5.2s.3 2.2 1.3 3.2c1.2 1.3 2.8 1.2 3.5 1.4 2.6.2 10.9.2 10.9.2s6.7 0 11.2-.3c.6-.1 2-.1 3.2-1.4 1-1 1.3-3.2 1.3-3.2s.3-2.6.3-5.2v-2.4c0-2.5-.3-5.1-.3-5.1"})),l("symbol",{id:"8017_snapchat",viewBox:"0 0 32 32"},l("path",{d:"M16.328.714h.003c1.396 0 6.121.389 8.35 5.385.721 1.619.616 4.076.488 6.144.081-.031.17-.068.265-.113a2.415 2.415 0 0 1 1.008-.213c.356 0 .71.07.964.178.956.338 1.584 1.122 1.6 1.996.015.717-.35 1.722-2.165 2.44a8.441 8.441 0 0 1-.498.17c-.23.072-.812.257-1.015.424.011.048.037.13.095.248l.023.047.014.032c.016.039 1.684 3.838 5.202 4.418a1.648 1.648 0 0 1 1.377 1.723c-.013.218-.064.43-.148.624-.436 1.02-1.671 1.66-4.085 2.1l-.004.017c-.056.254-.113.504-.19.765-.226.776-.87 1.257-1.712 1.257-.236 0-.522-.033-.874-.103a6.86 6.86 0 0 0-1.399-.15c-.315 0-.644.028-.975.083-.526.087-1.079.478-1.72.931-1.132.801-2.541 1.798-4.705 1.798-.07 0-.14-.002-.21-.004a3.37 3.37 0 0 1-.16.004c-2.163 0-3.572-.996-4.704-1.797-.642-.453-1.196-.845-1.72-.932a6.011 6.011 0 0 0-.976-.083c-.57 0-1.028.09-1.397.162h-.002c-.3.059-.582.114-.874.114-.827 0-1.483-.486-1.712-1.267a11.05 11.05 0 0 1-.19-.772l-.004-.02C1.864 25.88.628 25.238.19 24.21a1.869 1.869 0 0 1-.146-.622 1.644 1.644 0 0 1 1.378-1.719c3.517-.579 5.185-4.379 5.2-4.413l.02-.05.018-.034c.058-.119.084-.2.095-.248-.202-.167-.784-.352-1.019-.426a8.141 8.141 0 0 1-.497-.17c-2.147-.849-2.256-2.091-2.13-2.756.219-1.15 1.425-1.837 2.465-1.837.327 0 .633.065.91.195.166.077.31.133.433.173-.129-2.083-.242-4.57.486-6.203C9.63 1.108 14.347.72 15.737.72l.518-.005h.073Z",fill:"currentColor"})),l("symbol",{id:"8000_twitter",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M32 6.4c-.9 1.3-2 2.5-3.3 3.4.4 9.2-6.5 19.5-18.7 19.5-3.7 0-7.2-1.1-10.1-2.9 3.5.4 7-.6 9.7-2.7-2.9-.1-5.3-2-6.1-4.6 1 .2 2 .1 3-.1a6.6 6.6 0 01-5.3-6.5c.9.5 1.9.8 3 .8a6.6 6.6 0 01-2-8.8c3.2 4 8.1 6.6 13.5 6.9a6.6 6.6 0 016.4-8.1c1.9 0 3.6.8 4.8 2.1 1.5-.3 2.9-.8 4.2-1.6a6.5 6.5 0 01-2.9 3.6c1.4-.1 2.6-.5 3.8-1z"})),l("symbol",{id:"8001_xing",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M13.9 12.7l-5.5 9.7H1.8l5.5-9.7-3.7-6.4h6.6l3.7 6.4zM30 0h-6.6L12.7 19.1 19.8 32h6.5l-7-12.9L30 0z"})),l("symbol",{id:"8005_linkedin",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M7.8 3.9c0 2.2-1.7 3.9-3.9 3.9A3.8 3.8 0 010 3.9a3.9 3.9 0 017.8 0zM.6 32h6.6V10.7H.6V32zm23.6-22c-4.5 0-6.4 3.5-6.4 3.5v-2.9h-6.3V32h6.3V20.8c0-3 1.4-4.8 4-4.8 2.4 0 3.6 1.7 3.6 4.8V32H32V18.5c0-5.7-3.3-8.5-7.8-8.5z"})),l("symbol",{id:"8008_kununu",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M27.2 26l-.1 5.1c0 .4-.4.8-.8.8h-5c-.5 0-.8-.4-.8-.8v-6.7c0-1.8-1.5-3.2-3.3-3.2h-1.8c-1.8 0-3.3 1.4-3.3 3.2v6.7c0 .4-.4.8-.8.8h-5c-.5 0-.8-.4-.8-.8V.8c-.2-.4.2-.8.7-.8h5c.4 0 .8.4.8.8v14.3c1-.4 2.2-.6 3.3-.6H17c1.8 0 3.3-1.4 3.3-3.2l.1-1.6c.1-.4.4-.7.8-.7h5c.4 0 .8.3.8.7v1.6c0 2.5-1 4.8-2.5 6.5 1.6 1.7 2.6 4 2.6 6.6V26z"})),l("symbol",{id:"2064_arrow-enter",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M32 0v32H13.3v-1.3h17.3V1.3H13.3V0H32zM12.3 9.3h-1.9l6.7 6.7H0v1.3h17.1L10.4 24h1.9l7.3-7.3-7.3-7.4z"})),l("symbol",{id:"pi-home",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M16 .7L0 16h5.3v16h8V21.3h5.3V32h8V16H32L16 .7zm9.3 14v16H20V20h-8V30.6H6.7V14.7H3.4L16 2.5l12.7 12.2h-3.4z"})),l("symbol",{id:"3033_question-mark",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M22.7 10.7c0 3.2-2.7 5-4.7 6.2-.9.6-2 1.3-2 1.8v4h-1.3v-4c0-1.2 1.2-1.9 2.6-2.9 1.9-1.3 4.1-2.7 4.1-5.1 0-2.9-2.4-5.3-5.3-5.3s-5.3 2.4-5.3 5.3H9.3C9.3 7 12.3 4 16 4s6.7 3 6.7 6.7zm-8 17.3H16v-2.7h-1.3V28z"})),l("symbol",{id:"3073_phone",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M5.5 2.1c.1 0 .1 0 0 0 .3 0 .5.1.6.3l2.8 4.8c.1.3.1.6-.1.8L7.2 9.6l-.7.7.5 1c3.4 5.6 8.2 10.4 13.8 13.8l.9.6.7-.8 1.5-1.5c.1-.1.3-.2.5-.2.1 0 .2 0 .3.1l4.8 2.8c.2.1.3.3.3.5s0 .4-.2.6l-2 2-.8.8C13.9 28.6 3.4 18.1 2.2 5.1l.9-.9 2-2c.1 0 .3-.1.4-.1m0-1.3c-.5 0-1 .2-1.4.6l-2 2L.9 4.6v.1c1 14 12.3 25.4 26.4 26.5h.1l1.3-1.3 2-2c.4-.4.7-1.1.6-1.7-.1-.6-.4-1.2-1-1.5l-4.8-2.8c-.3-.2-.7-.3-1-.3-.5 0-1 .2-1.4.6l-1.5 1.5c-5.4-3.3-10-7.9-13.4-13.4L9.7 9c.6-.6.8-1.6.3-2.4L7.3 1.8C7 1.2 6.4.9 5.8.8h-.3z"})),l("symbol",{id:"pi-place",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M16 1.3c5.1 0 9.3 4.2 9.3 9.3 0 1.6-.4 3.3-1.3 4.7l-8.1 14-8-14c-.8-1.4-1.2-3-1.2-4.6 0-5.2 4.2-9.4 9.3-9.4M16 0C10.1 0 5.3 4.8 5.3 10.7c0 1.8.5 3.7 1.4 5.3L16 32l9.2-16c.9-1.6 1.4-3.5 1.4-5.4C26.7 4.8 21.9 0 16 0zm0 8c1.5 0 2.7 1.2 2.7 2.7s-1.2 2.7-2.7 2.7-2.7-1.2-2.7-2.7S14.5 8 16 8m0-1.3c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z"})),l("symbol",{id:"pi-letter-parcel",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M20.667 2.667l-4 4h5.867l4-4h-5.867zM22 5.333h-2.133L21.2 4h2.133L22 5.333z"}),l("path",{fill:"currentColor",d:"M12.4 0L4 8.4v8.933H0V32h21.333v-4H23.6l8.4-8.4V0H12.4zm6.667 18.667L11.2 26.534a.644.644 0 0 1-.933 0l-8-7.867h16.8zM1.333 19.6L6.4 24.667l-5.067 5.067V19.601zm.934 11.067L7.334 25.6l1.867 1.867c.8.8 2 .8 2.8 0l1.867-1.867 5.067 5.067H2.268zM20 29.733l-5.067-5.067L20 19.599v10.133zm2.667-3.066h-1.333v-9.333h-16v-8h17.333v17.333zM23.067 8h-16.8l6.667-6.667h16.8L23.067 8zm7.6 11.067L24 25.734v-16.8l6.667-6.667v16.8z"})),l("symbol",{id:"pi-login",viewBox:"0 0 32 32"},l("path",{fill:"currentColor",d:"M13.333 0v1.333h17.333v29.333H13.333v1.333H32v-32z"}),l("path",{fill:"currentColor",d:"M12.267 9.333H10.4L17.067 16H0v1.333h17.067L10.4 24h1.867l7.333-7.333z"})));export{c as S};
|
|
2
|
+
//# sourceMappingURL=p-b762fba9.js.map
|