import{S as t,i as o,a as n,b as e,s as r,e as s,n as a,d as i,c as m,o as c,g as l,t as p,h as u,j as g,k as d,l as f,m as h,q as b,u as j}from"./index-8c09578c.js";import{w as x}from"./index-77787e10.js";import{loadLocaleContent as y,getData as v}from"../../../../../../../../../js/libraries/serverTools.js";import{addMarkersEntries as w,translate as k}from"../../../../../../../../../js/libraries/mapTools.js";import{addGroupPinContent as z}from"../../../../../../../../../js/mapFuncs.js";import"../../../../../../../../../js/components/map-component.js";function N(t,o,n){const e=t.slice();return e[12]=o[n][0],e[3]=o[n][1],e}function O(t,o,n){const e=t.slice();return e[15]=o[n],e}function T(t){let o,n,r,s,a,m,c,x,y,v,w,k,z,O,T,D,R,S,q,A,C=t[1].groups+"",F=t[1].p1+"",H=t[1].subheading1+"",J=t[1]["map-prompt"]+"",K=Object.entries(t[0]),L=[];for(let o=0;on(2,r=t)));let a,i,l=x({});m(t,l,(t=>n(1,e=t)));let p=y(l,"groups-component",s);y(l,"countries",s);function u(t,o,n){let e=t([22,0],2);w(a,i,e,o,n,z,"green")}v("/assets/groups.json",(t=>{n(3,a=JSON.parse(t)),n(0,i={});for(let t of a){let o=t.country;null==t.contact&&(t.contact="https://discord.gg/Qk8KUk787z"),o in i?i[o].push(t):n(0,i[o]=[t],i)}s.update((t=>t+1))})),c((()=>{}));return[i,e,r,a,s,l,p,u,function(t){return"en"==p?t:k(e,t)},function(t){return[t.country,t.state,t.town].filter((t=>null!=t)).map((t=>"en"==p?t:k(e,t))).join(", ")},t=>u(t,e,p)]}class A extends t{constructor(t){super(),this.shadowRoot.innerHTML="",o(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},q,S,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("groups-component",A);export{A as default};