2 lines
4.9 KiB
JavaScript
2 lines
4.9 KiB
JavaScript
import{S as t,i as n,a as o,b as e,s as r,e as m,n as a,d as c,c as i,o as s,f as l,t as u,g as p,h as g,j as h,k as d,l as f,m as b,p as x}from"./index-4348483d.js";import{w as j}from"./index-71440b21.js";import{addMarkersCommunes as v,communesByCountry as w}from"../../../../../../../../../js/communes.js";import{loadLocaleContent as y}from"../../../../../../../../../js/libraries/serverTools.js";import"../../../../../../../../../js/components/map-component.js";function k(t,n,o){const e=t.slice();return e[7]=n[o][0],e[8]=n[o][1],e}function z(t,n,o){const e=t.slice();return e[11]=n[o],e}function D(t){let n,o,r,m,a,i,s,j,v,y,z,D,E,O,R,T,A,C=t[1].heading+"",H=t[1].p1+"",L=t[1].subheading1+"",M=Object.entries(w),S=[];for(let n=0;n<M.length;n+=1)S[n]=N(k(t,M,n));return{c(){n=l("div"),o=l("div"),r=l("h1"),m=u(C),a=p(),i=l("img"),j=p(),v=l("p"),y=u(H),z=p(),D=l("h3"),E=u(L),O=p(),R=l("map-component"),A=p();for(let t=0;t<S.length;t+=1)S[t].c();g(i,"id","commune-img"),h(i.src,s="/img/common/commune.svg")||g(i,"src","/img/common/commune.svg"),g(i,"alt","commune"),d(R,"id","map"),d(R,"callback",T=t[6]),g(o,"id","text-container"),g(n,"id","container")},m(t,c){e(t,n,c),f(n,o),f(o,r),f(r,m),f(o,a),f(o,i),f(o,j),f(o,v),f(v,y),f(o,z),f(o,D),f(D,E),f(o,O),f(o,R),f(o,A);for(let t=0;t<S.length;t+=1)S[t].m(o,null)},p(t,n){if(2&n&&C!==(C=t[1].heading+"")&&b(m,C),2&n&&H!==(H=t[1].p1+"")&&b(y,H),2&n&&L!==(L=t[1].subheading1+"")&&b(E,L),2&n&&T!==(T=t[6])&&d(R,"callback",T),2&n){let e;for(M=Object.entries(w),e=0;e<M.length;e+=1){const r=k(t,M,e);S[e]?S[e].p(r,n):(S[e]=N(r),S[e].c(),S[e].m(o,null))}for(;e<S.length;e+=1)S[e].d(1);S.length=M.length}},d(t){t&&c(n),x(S,t)}}}function E(t){let n,o,r,m,a,i,s,h,d,x,j,v,w,y,k,z,D,E,N,O,R,T,A,C,H,L=t[1].location+"",M=t[1][t[11].location[0][0]]+(""==t[11].location[0][1]?"":", "+t[1][t[11].location[0][1]]),S=t[1].status+"",_=t[1][t[11].status]+"",q=t[1].members+"",B=t[11].members+"",F=t[1].contact+"",G=t[1][t[11].contact[1]]+"";return{c(){n=l("div"),o=l("p"),r=l("b"),m=u(L),a=u(": "),i=u(M),s=p(),h=l("p"),d=l("b"),x=u(S),j=u(": "),v=u(_),w=p(),y=l("p"),k=l("b"),z=u(q),D=u(": "),E=u(B),N=p(),O=l("p"),R=l("b"),T=u(F),A=u(": "),C=l("a"),H=u(G),g(C,"href",t[11].contact[0]),g(C,"target",";_blank;"),g(C,"rel","noreferrer"),g(n,"class","location-info")},m(t,c){e(t,n,c),f(n,o),f(o,r),f(r,m),f(r,a),f(o,i),f(n,s),f(n,h),f(h,d),f(d,x),f(d,j),f(h,v),f(n,w),f(n,y),f(y,k),f(k,z),f(k,D),f(y,E),f(n,N),f(n,O),f(O,R),f(R,T),f(R,A),f(O,C),f(C,H)},p(t,n){2&n&&L!==(L=t[1].location+"")&&b(m,L),2&n&&M!==(M=t[1][t[11].location[0][0]]+(""==t[11].location[0][1]?"":", "+t[1][t[11].location[0][1]]))&&b(i,M),2&n&&S!==(S=t[1].status+"")&&b(x,S),2&n&&_!==(_=t[1][t[11].status]+"")&&b(v,_),2&n&&q!==(q=t[1].members+"")&&b(z,q),2&n&&F!==(F=t[1].contact+"")&&b(T,F),2&n&&G!==(G=t[1][t[11].contact[1]]+"")&&b(H,G)},d(t){t&&c(n)}}}function N(t){let n,o,r,m,a,i=t[1][t[7]]+"",s=t[8],h=[];for(let n=0;n<s.length;n+=1)h[n]=E(z(t,s,n));return{c(){n=l("h4"),o=u(i),r=p(),m=l("div");for(let t=0;t<h.length;t+=1)h[t].c();a=p(),g(n,"class","country-name"),g(m,"class","country-block")},m(t,c){e(t,n,c),f(n,o),e(t,r,c),e(t,m,c);for(let t=0;t<h.length;t+=1)h[t].m(m,null);f(m,a)},p(t,n){if(2&n&&i!==(i=t[1][t[7]]+"")&&b(o,i),2&n){let o;for(s=t[8],o=0;o<s.length;o+=1){const e=z(t,s,o);h[o]?h[o].p(e,n):(h[o]=E(e),h[o].c(),h[o].m(m,a))}for(;o<h.length;o+=1)h[o].d(1);h.length=s.length}},d(t){t&&c(n),t&&c(r),t&&c(m),x(h,t)}}}function O(t){let n,o=2==t[0]&&D(t);return{c(){o&&o.c(),n=m()},m(t,r){o&&o.m(t,r),e(t,n,r)},p(t,e){2==t[0]?o?o.p(t,e):(o=D(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(t){o&&o.d(t),t&&c(n)}}}function R(t){let n,o=t[0],i=O(t);return{c(){i.c(),n=m(),this.c=a},m(t,o){i.m(t,o),e(t,n,o)},p(t,[e]){1&e&&r(o,o=t[0])?(i.d(1),i=O(t),i.c(),i.m(n.parentNode,n)):i.p(t,e)},i:a,o:a,d(t){t&&c(n),i.d(t)}}}function T(t,n,o){let e,r,m=j(0);i(t,m,(t=>o(0,e=t)));let a=j({});i(t,a,(t=>o(1,r=t))),y(a,"countries",m);let c=y(a,"communes-component",m);function l(t,n){let o=t([22,0],2);v(o,n)}s((()=>{}));return[e,r,m,a,c,l,t=>l(t,r)]}class A extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#commune-img{position:absolute;width:11.5rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2}#text-container>:nth-child(3){margin-top:8rem}.country-name{margin-bottom:0.5rem}.country-block{margin-bottom:2rem}.location-info{position:relative;margin-bottom:2rem}.location-info p{margin-bottom:0}a{color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:3rem}#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}</style>",n(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},T,R,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("communes-component",A);export{A as default};
|