2 lines
6.9 KiB
JavaScript
2 lines
6.9 KiB
JavaScript
import{S as t,i as e,a as n,b as o,s as r,e as i,n as a,d as s,c as m,o as c,h as l,t as p,j as g,k as d,w as h,x as u,l as f,y as b,p as w}from"./index-0d9f0c09.js";import{w as x}from"./index-1c123138.js";import{loadLocaleContent as j,getData as y}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as v,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addPartnersPinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,e,n){const o=t.slice();return o[12]=e[n][0],o[3]=e[n][1],o}function O(t,e,n){const o=t.slice();return o[15]=e[n],o}function T(t){let e,n,r,i,a,m,c,x,j,y,v,k,z,O,T,C,E,R,S,_,A=t[1].heading+"",F=t[1].p1+"",G=t[1].subheading1+"",H=t[1]["map-prompt"]+"",J=Object.entries(t[0]),K=[];for(let e=0;e<J.length;e+=1)K[e]=D(N(t,J,e));return{c(){e=l("div"),n=l("div"),r=l("h1"),i=p(A),a=g(),m=l("img"),x=g(),j=l("p"),y=p(F),v=g(),k=l("h3"),z=p(G),O=g(),T=l("map-component"),E=g(),R=l("p"),S=p(H),_=g();for(let t=0;t<K.length;t+=1)K[t].c();d(m,"id","hands-img"),h(m.src,c="/img/common/handshake.svg")||d(m,"src","/img/common/handshake.svg"),d(m,"alt","hands"),u(T,"id","map"),u(T,"callback",C=t[10]),d(R,"id","add-prompt"),d(n,"id","text-container"),d(e,"id","container")},m(t,s){o(t,e,s),f(e,n),f(n,r),f(r,i),f(n,a),f(n,m),f(n,x),f(n,j),f(j,y),f(n,v),f(n,k),f(k,z),f(n,O),f(n,T),f(n,E),f(n,R),f(R,S),f(n,_);for(let t=0;t<K.length;t+=1)K[t].m(n,null)},p(t,e){if(2&e&&A!==(A=t[1].heading+"")&&b(i,A),2&e&&F!==(F=t[1].p1+"")&&b(y,F),2&e&&G!==(G=t[1].subheading1+"")&&b(z,G),2&e&&C!==(C=t[10])&&u(T,"callback",C),2&e&&H!==(H=t[1]["map-prompt"]+"")&&b(S,H),771&e){let o;for(J=Object.entries(t[0]),o=0;o<J.length;o+=1){const r=N(t,J,o);K[o]?K[o].p(r,e):(K[o]=D(r),K[o].c(),K[o].m(n,null))}for(;o<K.length;o+=1)K[o].d(1);K.length=J.length}},d(t){t&&s(e),w(K,t)}}}function C(t){let e,n,r,i,a,m,c,h,u,w,x,j,y,v,k,z,N,O,T,C,D,E,R,_,A,F,G,H,J,K,L,M,Q,U,q,B,I,P,V,W,X,Y,Z,$,tt,et=t[1].name+"",nt=t[15].name+"",ot=t[1].location+"",rt=t[9](t[15])+"",it=t[1].website+"",at=t[15].website+"",st=t[1].contact+"",mt=t[15].contact+"",ct=t[1].description+"",lt=t[15].description+"";return{c(){e=l("div"),n=l("div"),r=l("picture"),i=l("source"),m=g(),c=l("source"),u=g(),w=l("img"),x=g(),j=l("div"),y=l("p"),v=l("b"),k=p(et),z=p(": "),N=p(nt),O=g(),T=l("p"),C=l("b"),D=p(ot),E=p(": "),R=p(rt),_=g(),A=l("p"),F=l("b"),G=p(it),H=p(": "),J=l("a"),K=p(at),M=g(),Q=l("p"),U=l("b"),q=p(st),B=p(": "),I=l("a"),P=p(mt),W=g(),X=l("p"),Y=l("b"),Z=p(ct),$=p(": "),tt=p(lt),d(i,"srcset",a="/img/partners/"+t[15].logo+".webp"),d(c,"srcset",h="/img/partners/"+t[15].logo+".jpg"),d(w,"class","partner-logo"),d(w,"alt","logo"),d(J,"href",L=t[15].website),d(J,"target",";_blank;"),d(J,"rel","noreferrer"),d(I,"href",V=S(t[15].contact)),d(I,"target",";_blank;"),d(I,"rel","noreferrer"),d(n,"class","img-general-info"),d(e,"class","location-info")},m(t,a){o(t,e,a),f(e,n),f(n,r),f(r,i),f(r,m),f(r,c),f(r,u),f(r,w),f(n,x),f(n,j),f(j,y),f(y,v),f(v,k),f(v,z),f(y,N),f(j,O),f(j,T),f(T,C),f(C,D),f(C,E),f(T,R),f(j,_),f(j,A),f(A,F),f(F,G),f(F,H),f(A,J),f(J,K),f(j,M),f(j,Q),f(Q,U),f(U,q),f(U,B),f(Q,I),f(I,P),f(e,W),f(e,X),f(X,Y),f(Y,Z),f(Y,$),f(X,tt)},p(t,e){1&e&&a!==(a="/img/partners/"+t[15].logo+".webp")&&d(i,"srcset",a),1&e&&h!==(h="/img/partners/"+t[15].logo+".jpg")&&d(c,"srcset",h),2&e&&et!==(et=t[1].name+"")&&b(k,et),1&e&&nt!==(nt=t[15].name+"")&&b(N,nt),2&e&&ot!==(ot=t[1].location+"")&&b(D,ot),1&e&&rt!==(rt=t[9](t[15])+"")&&b(R,rt),2&e&&it!==(it=t[1].website+"")&&b(G,it),1&e&&at!==(at=t[15].website+"")&&b(K,at),1&e&&L!==(L=t[15].website)&&d(J,"href",L),2&e&&st!==(st=t[1].contact+"")&&b(q,st),1&e&&mt!==(mt=t[15].contact+"")&&b(P,mt),1&e&&V!==(V=S(t[15].contact))&&d(I,"href",V),2&e&&ct!==(ct=t[1].description+"")&&b(Z,ct),1&e&<!==(lt=t[15].description+"")&&b(tt,lt)},d(t){t&&s(e)}}}function D(t){let e,n,r,i,a,m=t[8](t[12])+"",c=t[3],h=[];for(let e=0;e<c.length;e+=1)h[e]=C(O(t,c,e));return{c(){e=l("h4"),n=p(m),r=g(),i=l("div");for(let t=0;t<h.length;t+=1)h[t].c();a=g(),d(e,"class","country-name"),d(i,"class","country-block")},m(t,s){o(t,e,s),f(e,n),o(t,r,s),o(t,i,s);for(let t=0;t<h.length;t+=1)h[t].m(i,null);f(i,a)},p(t,e){if(1&e&&m!==(m=t[8](t[12])+"")&&b(n,m),515&e){let n;for(c=t[3],n=0;n<c.length;n+=1){const o=O(t,c,n);h[n]?h[n].p(o,e):(h[n]=C(o),h[n].c(),h[n].m(i,a))}for(;n<h.length;n+=1)h[n].d(1);h.length=c.length}},d(t){t&&s(e),t&&s(r),t&&s(i),w(h,t)}}}function E(t){let e,n=3==t[2]&&T(t);return{c(){n&&n.c(),e=i()},m(t,r){n&&n.m(t,r),o(t,e,r)},p(t,o){3==t[2]?n?n.p(t,o):(n=T(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&s(e)}}}function R(t){let e,n=t[2],m=E(t);return{c(){m.c(),e=i(),this.c=a},m(t,n){m.m(t,n),o(t,e,n)},p(t,[o]){4&o&&r(n,n=t[2])?(m.d(1),m=E(t),m.c(),m.m(e.parentNode,e)):m.p(t,o)},i:a,o:a,d(t){t&&s(e),m.d(t)}}}function S(t){return t.includes("@")?"mailto:"+t:t}function _(t,e,n){let o,r,i=x(0);m(t,i,(t=>n(2,r=t)));let a,s,l=x({});m(t,l,(t=>n(1,o=t)));let p=j(l,"partners-component",i);j(l,"countries",i);function g(t,e,n){let o=t([22,0],2);v(a,s,o,e,n,z,"blue",{enableCountryGrouping:!0})}y("/assets/partners.json",(t=>{n(3,a=JSON.parse(t)),n(0,s={});for(let t of a){let e=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),e in s?s[e].push(t):n(0,s[e]=[t],s)}i.update((t=>t+1))})),c((()=>{}));return[s,o,r,a,i,l,p,g,function(t){return"en"==p?t:k(o,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:k(o,t))).join(", ")},t=>g(t,o,p)]}class A 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}#map{--height:30rem;--width:100%;--margin-bottom:0.5rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.2rem;text-align:center}h3{margin-bottom:1rem}#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>",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},_,R,r,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("partners-component",A);export{A as default};
|