2 lines
5.6 KiB
JavaScript
2 lines
5.6 KiB
JavaScript
import{S as t,i as n,a as e,b as o,s as r,e as i,n as a,d as m,c as s,o as l,f as c,t as g,g as p,h as d,j as h,l as f,m as u,p as b}from"./index-4348483d.js";import{w as x}from"./index-71440b21.js";import{loadLocaleContent as y}from"../../../../../../../../../js/libraries/serverTools.js";import{partnersByCountry as j}from"../../../../../../../../../js/partners.js";import"../../../../../../../../../js/components/map-component.js";function w(t,n,e){const o=t.slice();return o[7]=n[e][0],o[8]=n[e][1],o}function v(t,n,e){const o=t.slice();return o[11]=n[e],o}function k(t){let n,e,r,i,a,s,l,x,y,v,k,z,E,N,O=t[0].heading+"",R=t[0].p1+"",T=t[0].subheading1+"",A=Object.entries(j),C=[];for(let n=0;n<A.length;n+=1)C[n]=D(w(t,A,n));return{c(){n=c("div"),e=c("div"),r=c("h1"),i=g(O),a=p(),s=c("img"),x=p(),y=c("p"),v=g(R),k=p(),z=c("h3"),E=g(T),N=p();for(let t=0;t<C.length;t+=1)C[t].c();d(s,"id","hands-img"),h(s.src,l="/img/common/handshake.svg")||d(s,"src","/img/common/handshake.svg"),d(s,"alt","hands"),d(e,"id","text-container"),d(n,"id","container")},m(t,m){o(t,n,m),f(n,e),f(e,r),f(r,i),f(e,a),f(e,s),f(e,x),f(e,y),f(y,v),f(e,k),f(e,z),f(z,E),f(e,N);for(let t=0;t<C.length;t+=1)C[t].m(e,null)},p(t,n){if(1&n&&O!==(O=t[0].heading+"")&&u(i,O),1&n&&R!==(R=t[0].p1+"")&&u(v,R),1&n&&T!==(T=t[0].subheading1+"")&&u(E,T),49&n){let o;for(A=Object.entries(j),o=0;o<A.length;o+=1){const r=w(t,A,o);C[o]?C[o].p(r,n):(C[o]=D(r),C[o].c(),C[o].m(e,null))}for(;o<C.length;o+=1)C[o].d(1);C.length=A.length}},d(t){t&&m(n),b(C,t)}}}function z(t){let n,e,r,i,a,s,l,h,b,x,y,j,w,v,k,z,D,E,N,O,R,T,A,C,H,L,M,S,_,q,B,F,G,I,J,K,P,Q,U,V,W=t[0].name+"",X=t[11].name+"",Y=t[0].type+"",Z=t[0][t[11].type]+"",$=t[0].location+"",tt=t[5](t[11])+"",nt=t[0].link+"",et=t[11].link+"",ot=t[0].description+"",rt=t[0][t[11].description]+"";return{c(){n=c("div"),e=c("div"),r=c("picture"),i=c("source"),a=p(),s=c("source"),l=p(),h=c("img"),b=p(),x=c("div"),y=c("p"),j=c("b"),w=g(W),v=g(": "),k=g(X),z=p(),D=c("p"),E=c("b"),N=g(Y),O=g(": "),R=g(Z),T=p(),A=c("p"),C=c("b"),H=g($),L=g(": "),M=g(tt),S=p(),_=c("p"),q=c("b"),B=g(nt),F=g(": "),G=c("a"),I=g(et),J=p(),K=c("p"),P=c("b"),Q=g(ot),U=g(": "),V=g(rt),d(i,"srcset","/img/partners/"+t[11].logo+".webp"),d(s,"srcset","/img/partners/"+t[11].logo+".jpg"),d(h,"class","partner-logo"),d(h,"alt","logo"),d(G,"href",t[11].link),d(G,"target",";_blank;"),d(G,"rel","noreferrer"),d(e,"class","img-general-info"),d(n,"class","location-info")},m(t,m){o(t,n,m),f(n,e),f(e,r),f(r,i),f(r,a),f(r,s),f(r,l),f(r,h),f(e,b),f(e,x),f(x,y),f(y,j),f(j,w),f(j,v),f(y,k),f(x,z),f(x,D),f(D,E),f(E,N),f(E,O),f(D,R),f(x,T),f(x,A),f(A,C),f(C,H),f(C,L),f(A,M),f(x,S),f(x,_),f(_,q),f(q,B),f(q,F),f(_,G),f(G,I),f(n,J),f(n,K),f(K,P),f(P,Q),f(P,U),f(K,V)},p(t,n){1&n&&W!==(W=t[0].name+"")&&u(w,W),1&n&&Y!==(Y=t[0].type+"")&&u(N,Y),1&n&&Z!==(Z=t[0][t[11].type]+"")&&u(R,Z),1&n&&$!==($=t[0].location+"")&&u(H,$),1&n&&nt!==(nt=t[0].link+"")&&u(B,nt),1&n&&ot!==(ot=t[0].description+"")&&u(Q,ot),1&n&&rt!==(rt=t[0][t[11].description]+"")&&u(V,rt)},d(t){t&&m(n)}}}function D(t){let n,e,r,i,a,s=t[4](t[7])+"",l=t[8],h=[];for(let n=0;n<l.length;n+=1)h[n]=z(v(t,l,n));return{c(){n=c("h4"),e=g(s),r=p(),i=c("div");for(let t=0;t<h.length;t+=1)h[t].c();a=p(),d(n,"class","country-name"),d(i,"class","country-block")},m(t,m){o(t,n,m),f(n,e),o(t,r,m),o(t,i,m);for(let t=0;t<h.length;t+=1)h[t].m(i,null);f(i,a)},p(t,n){if(33&n){let e;for(l=t[8],e=0;e<l.length;e+=1){const o=v(t,l,e);h[e]?h[e].p(o,n):(h[e]=z(o),h[e].c(),h[e].m(i,a))}for(;e<h.length;e+=1)h[e].d(1);h.length=l.length}},d(t){t&&m(n),t&&m(r),t&&m(i),b(h,t)}}}function E(t){let n,e=2==t[1]&&k(t);return{c(){e&&e.c(),n=i()},m(t,r){e&&e.m(t,r),o(t,n,r)},p(t,o){2==t[1]?e?e.p(t,o):(e=k(t),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},d(t){e&&e.d(t),t&&m(n)}}}function N(t){let n,e=t[1],s=E(t);return{c(){s.c(),n=i(),this.c=a},m(t,e){s.m(t,e),o(t,n,e)},p(t,[o]){2&o&&r(e,e=t[1])?(s.d(1),s=E(t),s.c(),s.m(n.parentNode,n)):s.p(t,o)},i:a,o:a,d(t){t&&m(n),s.d(t)}}}function O(t,n,e){let o,r,i=x(0);s(t,i,(t=>e(1,r=t)));let a=x({});s(t,a,(t=>e(0,o=t))),y(a,"countries",i);let m=y(a,"partners-component",i);return l((()=>{})),[o,r,i,a,function(t){return"en"==m?t:o[t]},function(t){return t.location[0].map((t=>"en"==m?t:o[t])).join(", ")}]}class R extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#hands-img{position:absolute;width:10.5rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2;margin-top:-2rem}#text-container>:nth-child(3){margin-top:6rem}.img-general-info{display:flex;align-content:center;width:100%;gap:1.5rem;align-items:center;margin-bottom:0.5rem}.img-general-info>:nth-child(2){flex:none}.partner-logo{position:relative;right:0;max-height:6.5rem;max-width:100%;border-radius:1rem}h4{margin-bottom:2rem}.country-name{margin-bottom:0.5rem}.country-block{margin-bottom:2rem}.location-info{position:relative;margin-bottom:0.5rem}.location-info p{margin-bottom:0}a{color:#DD1C1A}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.2rem;text-align:center}h3{margin-bottom:2rem}#container{margin:auto;max-width:800px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#container p{text-align:justify}@media only screen and (max-width: 500px){.img-general-info{display:flex;flex-direction:column;align-content:left;width:100%;gap:1rem;align-items:left;margin-bottom:0rem}.img-general-info>:nth-child(1){width:max-content}.img-general-info>:nth-child(2){width:100%}}</style>",n(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},O,N,r,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("partners-component",R);export{R as default};
|