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