site-libsoc/Server/public/js/components/groups-component.js

2 lines
3.8 KiB
JavaScript
Raw Permalink Normal View History

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