{"version":3,"sources":["components/map/_base/map.js"],"names":["AppMap","Component","constructor","el","map","constructObserver","observe","$el","initMap","points","JSON","parse","dataset","mapCenter","center","google","maps","Map","zoom","lat","lng","forEach","point","marker","Marker","position","animation","Animation","DROP","icon","path","anchor","Point","fillColor","markerColor","Templating","baseColor","fillOpacity","strokeWeight","scale","showInfo","infowindow","InfoWindow","content","renderInfoWindow","title","description","url","event","addListener","setContent","open","loadMapResources","document","querySelector","mapsJS","createElement","id","src","apiKey","appendChild","onload","IntersectionObserver","entries","self","isIntersecting","intersectionRatio","unobserve","rootMargin","threshold"],"mappings":"aAAA,KAAMA,CAAAA,MAAN,QAAqBC,CAAAA,SAAU,CAC9BC,WAAW,CAACC,EAAD,CAAK,CACf,MAAMA,EAAN,EACA,KAAKC,GAAL,CAAW,IAAX,CACA,KAAKC,iBAAL,GAAyBC,OAAzB,CAAiC,KAAKC,GAAtC,CACA,CAEDC,OAAO,EAAG,CACT,KAAMC,CAAAA,MAAM,CAAGC,IAAI,CAACC,KAAL,CAAW,KAAKJ,GAAL,CAASK,OAAT,CAAiBH,MAA5B,CAAf,CACA,KAAMI,CAAAA,SAAS,CAAGH,IAAI,CAACC,KAAL,CAAW,KAAKJ,GAAL,CAASK,OAAT,CAAiBE,MAA5B,CAAlB,CAEA,KAAKV,GAAL,CAAW,GAAIW,CAAAA,MAAM,CAACC,IAAP,CAAYC,GAAhB,CAAoB,KAAKV,GAAzB,CAA8B,CACxCW,IAAI,CAAE,CAAC,KAAKX,GAAL,CAASK,OAAT,CAAiBM,IADgB,CAExCJ,MAAM,CAAE,CAACK,GAAG,CAAEN,SAAS,CAAC,CAAD,CAAf,CAAoBO,GAAG,CAAEP,SAAS,CAAC,CAAD,CAAlC,CAFgC,CAA9B,CAAX,CAKAJ,MAAM,CAACY,OAAP,CAAeC,KAAK,EAAI,CACvB,KAAMC,CAAAA,MAAM,CAAG,GAAIR,CAAAA,MAAM,CAACC,IAAP,CAAYQ,MAAhB,CAAuB,CACrCC,Q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BF,KAArB,CAA2B,MAA/B,CAAyCA,KAAM;AACxD;AACA,4CAA4CC,WAAY;AACxD,SACE,CAEDM,gBAAgB,EAAG,CAClB,GAAIC,QAAQ,CAACC,aAAT,CAAuB,iBAAvB,CAAJ,CAA+C,CAC9C,KAAK9C,OAAL,EACA,CAFD,IAEO,CACN,KAAM+C,CAAAA,MAAM,CAAGF,QAAQ,CAACG,aAAT,CAAuB,QAAvB,CAAf,CACAD,MAAM,CAACE,EAAP,CAAY,gBAAZ,CACAF,MAAM,CAACG,GAAP,CAAa,+CAAiD,KAAKnD,GAAL,CAASK,OAAT,CAAiB+C,MAA/E,CACAN,QAAQ,CAACC,aAAT,CAAuB,MAAvB,EAA+BM,WAA/B,CAA2CL,MAA3C,EACAA,MAAM,CAACM,MAAP,CAAgB,IAAM,CACrB,KAAKrD,OAAL,EACA,CACD,CACD,CAEDH,iBAAiB,EAAG,CACnB,MAAO,IAAIyD,CAAAA,oBAAJ,CACN,CAACC,OAAD,CAAUC,IAAV,GAAmB,CAClB,KAAMC,CAAAA,cAAc,CAAG,MAAOF,CAAAA,OAAO,CAAC,CAAD,CAAP,CAAWE,cAAlB,GAAqC,SAArC,CAAiDF,OAAO,CAAC,CAAD,CAAP,CAAWE,cAA5D,CAA6EF,OAAO,CAAC,CAAD,CAAP,CAAWG,iBAAX,CAA+B,CAAnI,CACA,GAAID,cAAJ,CAAoB,CACnB,KAAKb,gBAAL,GACAY,IAAI,CAACG,SAAL,CAAe,KAAK5D,GAApB,CACA,CACD,CAPK,CAQN,CACC6D,UAAU,CAAE,OADb,CAECC,SAAS,CAAE,CAFZ,CARM,CAaP,CAlF6B","sourcesContent":["class AppMap extends Component {\r\n\tconstructor(el) {\r\n\t\tsuper(el);\r\n\t\tthis.map = null;\r\n\t\tthis.constructObserver().observe(this.$el);\r\n\t}\r\n\r\n\tinitMap() {\r\n\t\tconst points = JSON.parse(this.$el.dataset.points);\r\n\t\tconst mapCenter = JSON.parse(this.$el.dataset.center);\r\n\r\n\t\tthis.map = new google.maps.Map(this.$el, {\r\n\t\t\tzoom: +this.$el.dataset.zoom,\r\n\t\t\tcenter: {lat: mapCenter[0], lng: mapCenter[1]},\r\n\t\t});\r\n\r\n\t\tpoints.forEach(point => {\r\n\t\t\tconst marker = new google.maps.Marker({\r\n\t\t\t\tposition: point,\r\n\t\t\t\tanimation: google.maps.Animation.DROP,\r\n\t\t\t\tmap: this.map,\r\n\t\t\t\ticon: {\r\n\t\t\t\t\tpath: 'M9.54,51.873C1.494,40.208,0,39.011,0,34.724c0-5.872,4.761-10.634,10.632-10.634c5.873,0,10.633,4.762,10.633,10.634c0,4.287-1.494,5.483-9.54,17.148C11.197,52.636,10.068,52.636,9.54,51.873L9.54,51.873zM10.632,39.155c2.447,0,4.431-1.983,4.431-4.43c0-2.447-1.983-4.432-4.431-4.432c-2.447,0-4.43,1.984-4.43,4.432C6.202,37.172,8.186,39.155,10.632,39.155z',\r\n\t\t\t\t\tanchor: new google.maps.Point(10.6325, 28.355),\r\n\t\t\t\t\tfillColor: point.markerColor ? point.markerColor : Templating.baseColor,\r\n\t\t\t\t\tfillOpacity: 1,\r\n\t\t\t\t\tstrokeWeight: 0,\r\n\t\t\t\t\tscale: 1\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(point.showInfo) {\r\n\t\t\t\tconst infowindow = new google.maps.InfoWindow();\r\n\t\t\t\tconst content = this.renderInfoWindow(point.title, point.description, point.url);\r\n\r\n\t\t\t\tgoogle.maps.event.addListener(marker, 'click', ((marker, content, infowindow) => {\r\n\t\t\t\t\treturn () => {\r\n\t\t\t\t\t\tinfowindow.setContent(content);\r\n\t\t\t\t\t\tinfowindow.open(this.map, marker);\r\n\t\t\t\t\t};\r\n\t\t\t\t})(marker, content, infowindow));\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\trenderInfoWindow(title, description, url) {\r\n\t\treturn `