import{q as L,L as x}from"./vendor-HosIAaPb.js";import"./leaflet-tkpg15bm.js";let l;const z=s=>{if(l)return l;const e={};return l=new x(s,e).load(),l},q=async s=>{const e=L.parse(s.src.replace(/^[^?]*\?/,"")),c=s.alt.split("[[:split:]]");if(!e.key)return;const o=await z(e.key),a=document.createElement("div"),g=e.size.split("x"),d=g[0]||null,k=g[1]||null,f=e.center.split(","),h=[],u=new o.maps.InfoWindow,w=new o.maps.Map(a,{center:{lat:parseFloat(f[0]),lng:parseFloat(f[1])},zoom:parseInt(e.zoom,10)});a.className=s.className,a.style.width=`${d}px`,a.style.height=`${k}px`,a.style.overflow="hidden",s.parentNode.replaceChild(a,s),typeof e.markers=="string"&&(e.markers=[e.markers]),e.markers.forEach(i=>{const t=i.split("|"),p={icon:null,optAry:[]};if(t.length){for(let n=0;n<t.length;n+=1)if(t[n].indexOf("icon:")===0)p.icon={icon:t[n].slice(5),shadow:new o.maps.MarkerImage("http://maps.google.co.jp/mapfiles/ms/icons/msmarker.shadow.png",new o.maps.Size(59,32),new o.maps.Point(0,0))};else{const r=t[n].split(",");if(!r[0].length)return;p.optAry.push({position:new o.maps.LatLng(parseFloat(r[0]),parseFloat(r[1])),map:w})}h.push(p)}});let m=0;h.forEach(i=>{for(let t=0;t<i.optAry.length;t+=1){const p=i.optAry[t],n=new o.maps.Marker(Object.assign(p,i.icon));c[m]!==void 0&&d>=180&&((r,y)=>{y&&o.maps.event.addListener(r,"click",()=>{u.setOptions({content:y}),u.open(w,r)})})(n,c[m].replace(/\[\[:quot:\]\]/gim,'"').replace(/\[\[:lt:\]\]/gim,"<").replace(/\[\[:gt:\]\]/gim,">").replace(/\[\[:amp:\]\]/gim,"&")),m+=1}})};export{q as default};
