@teipublisher/pb-components 2.15.3 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5436,7 +5436,7 @@
5436
5436
  {
5437
5437
  "name": "pb-leaflet-map",
5438
5438
  "path": "./src/pb-leaflet-map.js",
5439
- "description": "A wrapper component for [leaflet](https://leafletjs.com/) displaying a map.\r\n\r\nThe map layers displayed can be configured via nested `pb-map-layer` (see docs) elements,\r\nicons via `pb-map-icon`.",
5439
+ "description": "A wrapper component for [leaflet](https://leafletjs.com/) displaying a map.\n\nThe map layers displayed can be configured via nested `pb-map-layer` (see docs) elements,\nicons via `pb-map-icon`.",
5440
5440
  "attributes": [
5441
5441
  {
5442
5442
  "name": "latitude",
@@ -5475,7 +5475,7 @@
5475
5475
  },
5476
5476
  {
5477
5477
  "name": "toggle",
5478
- "description": "If enabled, the map will remain invisible until an event is received from `pb-geolocation`.\r\nIn this case the map also offers a close button to hide it again.",
5478
+ "description": "If enabled, the map will remain invisible until an event is received from `pb-geolocation`.\nIn this case the map also offers a close button to hide it again.",
5479
5479
  "type": "boolean",
5480
5480
  "default": "false"
5481
5481
  },
@@ -5487,7 +5487,7 @@
5487
5487
  },
5488
5488
  {
5489
5489
  "name": "cluster",
5490
- "description": "If set, combine markers into clusters if they are located too close together\r\nto display as single markers",
5490
+ "description": "If set, combine markers into clusters if they are located too close together\nto display as single markers",
5491
5491
  "type": "boolean",
5492
5492
  "default": "false"
5493
5493
  },
@@ -5499,9 +5499,15 @@
5499
5499
  },
5500
5500
  {
5501
5501
  "name": "disable-clustering-at",
5502
- "description": "Limits up to which zoom level markers are arranged into clusters.\r\nUsing a higher zoom level here will result in more markers to be shown.\r\n\r\nRequires `cluster` option to be enabled.",
5502
+ "description": "Limits up to which zoom level markers are arranged into clusters.\nUsing a higher zoom level here will result in more markers to be shown.\n\nRequires `cluster` option to be enabled.",
5503
5503
  "type": "number"
5504
5504
  },
5505
+ {
5506
+ "name": "geo-coding",
5507
+ "description": "Enables geocoding: an additional control will allow users to search for a place.\nReverse geocoding is also possible: single clicking on the map will request information\nabout the current location.\n\nIn both cases, a `pb-geocode` event will be emitted containing additional information\nabout the place in the event details (see demo).\n\nFor lookups the free OSM/Nominatim service is used.",
5508
+ "type": "boolean",
5509
+ "default": "false"
5510
+ },
5505
5511
  {
5506
5512
  "name": "subscribe",
5507
5513
  "description": "The name of the channel to subscribe to. Only events on a channel corresponding\nto this property are listened to.",
@@ -5537,7 +5543,7 @@
5537
5543
  "properties": [
5538
5544
  {
5539
5545
  "name": "map",
5540
- "description": "The underlying leafletjs map. Can be used for custom scripts.\r\n\r\nWill be null until the component is fully loaded. Listen to `pb-ready` on the component to\r\nbe sure it has initialized."
5546
+ "description": "The underlying leafletjs map. Can be used for custom scripts.\n\nWill be null until the component is fully loaded. Listen to `pb-ready` on the component to\nbe sure it has initialized."
5541
5547
  },
5542
5548
  {
5543
5549
  "name": "latitude",
@@ -5584,7 +5590,7 @@
5584
5590
  {
5585
5591
  "name": "toggle",
5586
5592
  "attribute": "toggle",
5587
- "description": "If enabled, the map will remain invisible until an event is received from `pb-geolocation`.\r\nIn this case the map also offers a close button to hide it again.",
5593
+ "description": "If enabled, the map will remain invisible until an event is received from `pb-geolocation`.\nIn this case the map also offers a close button to hide it again.",
5588
5594
  "type": "boolean",
5589
5595
  "default": "false"
5590
5596
  },
@@ -5598,7 +5604,7 @@
5598
5604
  {
5599
5605
  "name": "cluster",
5600
5606
  "attribute": "cluster",
5601
- "description": "If set, combine markers into clusters if they are located too close together\r\nto display as single markers",
5607
+ "description": "If set, combine markers into clusters if they are located too close together\nto display as single markers",
5602
5608
  "type": "boolean",
5603
5609
  "default": "false"
5604
5610
  },
@@ -5612,9 +5618,16 @@
5612
5618
  {
5613
5619
  "name": "disableClusteringAt",
5614
5620
  "attribute": "disable-clustering-at",
5615
- "description": "Limits up to which zoom level markers are arranged into clusters.\r\nUsing a higher zoom level here will result in more markers to be shown.\r\n\r\nRequires `cluster` option to be enabled.",
5621
+ "description": "Limits up to which zoom level markers are arranged into clusters.\nUsing a higher zoom level here will result in more markers to be shown.\n\nRequires `cluster` option to be enabled.",
5616
5622
  "type": "number"
5617
5623
  },
5624
+ {
5625
+ "name": "geoCoding",
5626
+ "attribute": "geo-coding",
5627
+ "description": "Enables geocoding: an additional control will allow users to search for a place.\nReverse geocoding is also possible: single clicking on the map will request information\nabout the current location.\n\nIn both cases, a `pb-geocode` event will be emitted containing additional information\nabout the place in the event details (see demo).\n\nFor lookups the free OSM/Nominatim service is used.",
5628
+ "type": "boolean",
5629
+ "default": "false"
5630
+ },
5618
5631
  {
5619
5632
  "name": "subscribe",
5620
5633
  "attribute": "subscribe",
@@ -5660,7 +5673,7 @@
5660
5673
  },
5661
5674
  {
5662
5675
  "name": "pb-update-map",
5663
- "description": "When received, redraws the map to fit markers passed in with the event.\rEvent details should include an array of locations, see `pb-geolocation` event below."
5676
+ "description": "When received, redraws the map to fit markers passed in with the event.\nEvent details should include an array of locations, see `pb-geolocation` event below."
5664
5677
  },
5665
5678
  {
5666
5679
  "name": "pb-update",
@@ -5668,7 +5681,11 @@
5668
5681
  },
5669
5682
  {
5670
5683
  "name": "pb-geolocation",
5671
- "description": "When received, focuses the map on the geocoordinates passed in with the event.\rThe event details should include an object:\r```\r{\rcoordinates: {\r latitude: Number,\r longitude: Number\r},\rlabel: string - the label to show on mouseover,\rzoom: Number - fixed zoom level to zoom to,\rfitBounds: Boolean - if true, recompute current zoom level to show all markers\r}\r```"
5684
+ "description": "When received, focuses the map on the geocoordinates passed in with the event.\nThe event details should include an object:\n```\n{\ncoordinates: {\n latitude: Number,\n longitude: Number\n},\nlabel: string - the label to show on mouseover,\nzoom: Number - fixed zoom level to zoom to,\nfitBounds: Boolean - if true, recompute current zoom level to show all markers\n}\n```"
5685
+ },
5686
+ {
5687
+ "name": "pb-geocode",
5688
+ "description": "emitted if geocoding is enabled and the user searches or selects a location from the map"
5672
5689
  }
5673
5690
  ],
5674
5691
  "slots": [
@@ -1,8 +1,9 @@
1
- import{L as t,p as e,r as i,h as s,c as a}from"./pb-mixin-d61c06b6.js";import"./es-global-bridge-4240f389.js";const o=["type","url","label","base","show"];class r extends t{static get properties(){return{type:{type:String},url:{type:String},base:{type:Boolean},show:{type:Boolean},label:{type:String},attribution:{type:String},minZoom:{type:Number,attribute:"min-zoom"},maxZoom:{type:Number,attribute:"max-zoom"},zoomOffset:{type:Number,attribute:"zoom-offset"},opacity:{type:Number},tileSize:{type:Number},id:{type:String},accessToken:{type:String,attribute:"access-token"}}}constructor(){super(),this.type="tile",this.url=null}get options(){const t={};return Object.keys(r.properties).forEach(e=>{o.indexOf(e)<0&&this[e]&&(t[e]=this[e])}),console.log("<pb-leaflet-map-layer> Options: %o",t),t}async data(){return new Promise(t=>{fetch(this.url).then(t=>t.json()).then(e=>t(e))})}}function l(t,e){try{return t.split(/\s*,\s*/).map(t=>parseInt(t,10))}catch(e){return console.error("<pb-map-icon> Invalid size specified: "+t),null}}customElements.define("pb-map-layer",r);class n extends t{static get properties(){return{name:{type:String},iconUrl:{type:String,attribute:"icon-url"},iconSize:{type:Array,converter:l,attribute:"icon-size"},iconAnchor:{type:Array,converter:l,attribute:"icon-anchor"},shadowUrl:{type:String,attribute:"shadow-url"},shadowSize:{type:Array,converter:l,attribute:"shadow-size"},shadowAnchor:{type:Array,converter:l,attribute:"shadow-anchor"},popupAncor:{type:Array,converter:l,attribute:"popup-anchor"}}}constructor(){super(),this.name="default",this.type="image",this.iconUrl=null}get options(){const t={};return Object.keys(n.properties).forEach(e=>{this[e]&&(t[e]=this[e])}),console.log("<pb-map-icon> Options: %o",t),t}}customElements.define("pb-map-icon",n);class c extends(e(t)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{latitude:{type:Number},longitude:{type:Number},zoom:{type:Number},crs:{type:String},fitMarkers:{type:Boolean,attribute:"fit-markers"},cluster:{type:Boolean},disableClusteringAt:{type:Number,attribute:"disable-clustering-at"},noScroll:{type:Boolean,attribute:"no-scroll"},accessToken:{type:String,attribute:"access-token"},toggle:{type:Boolean},imagesPath:{type:String,attribute:"images-path"},cssPath:{type:String,attribute:"css-path"},_map:{type:Object}})}constructor(){super(),this.latitude=51.505,this.longitude=-.09,this.zoom=15,this.crs="EPSG3857",this.accessToken="",this.imagesPath="../images/leaflet/",this.cssPath="../css/leaflet",this.toggle=!1,this.noScroll=!1,this.disabled=!0,this.cluster=!1,this.fitMarkers=!1,this.disableClusteringAt=null,this._icons={}}connectedCallback(){super.connectedCallback(),this._layers=this.querySelectorAll("pb-map-layer"),this._markers=this.querySelectorAll("pb-map-icon"),this.subscribeTo("pb-update-map",t=>{this._markerLayer.clearLayers(),t.detail.forEach(t=>{const e=L.marker([t.latitude,t.longitude]);t.label&&e.bindTooltip(t.label),e.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",t)}),e.bindTooltip(t.label),this.setMarkerIcon(e),this._markerLayer.addLayer(e)}),this._fitBounds()}),this.subscribeTo("pb-update",t=>{this._markerLayer.clearLayers();t.detail.root.querySelectorAll("pb-geolocation").forEach(t=>{const e=L.latLng(t.latitude,t.longitude),i=L.marker(e).addTo(this._markerLayer);t.label&&i.bindTooltip(t.label),t.popup&&i.bindPopup(t.popup),i.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",t)}),this.setMarkerIcon(i)}),this._fitBounds()}),this.subscribeTo("pb-geolocation",t=>{if(t.detail.coordinates){if(this.latitude=t.detail.coordinates.latitude,this.longitude=t.detail.coordinates.longitude,this._hasMarker(this.latitude,this.longitude))console.log("<pb-leaflet-map> Marker already added to map");else{const e=L.marker([this.latitude,this.longitude]);e.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",t.detail.element)}),t.detail.label&&e.bindTooltip(t.detail.label),t.detail.popup&&e.bindPopup(t.detail.popup),this.setMarkerIcon(e),e.addTo(this._markerLayer),t.detail.fitBounds&&this._fitBounds(),console.log("<pb-leaflet-map> added marker")}this.toggle&&(this.disabled=!1);const e=t.detail.event;this._locationChanged(this.latitude,this.longitude,t.detail.zoom,e)}})}get map(){return this._map}setMarkerIcon(t){this._icons&&this._icons.default&&t.setIcon(this._icons.default)}firstUpdated(){this.toggle||(this.disabled=!1),window.ESGlobalBridge.requestAvailability();const t=i("../lib/leaflet-src.js"),e=i("../lib/leaflet.markercluster-src.js");window.ESGlobalBridge.instance.load("leaflet",t).then(()=>window.ESGlobalBridge.instance.load("plugin",e)),window.addEventListener("es-bridge-plugin-loaded",this._initMap.bind(this),{once:!0})}render(){const t=i(this.cssPath);return s`
2
- <link rel="Stylesheet" href="${t}/leaflet.css">
3
- <link rel="Stylesheet" href="${t}/MarkerCluster.Default.css">
1
+ import{L as e,p as t,r as i,h as o,c as s}from"./pb-mixin-d61c06b6.js";import{g as a}from"./pb-i18n-375ccc5c.js";import"./es-global-bridge-4240f389.js";const r=["type","url","label","base","show"];class n extends e{static get properties(){return{type:{type:String},url:{type:String},base:{type:Boolean},show:{type:Boolean},label:{type:String},attribution:{type:String},minZoom:{type:Number,attribute:"min-zoom"},maxZoom:{type:Number,attribute:"max-zoom"},zoomOffset:{type:Number,attribute:"zoom-offset"},opacity:{type:Number},tileSize:{type:Number},id:{type:String},accessToken:{type:String,attribute:"access-token"}}}constructor(){super(),this.type="tile",this.url=null}get options(){const e={};return Object.keys(n.properties).forEach(t=>{r.indexOf(t)<0&&this[t]&&(e[t]=this[t])}),console.log("<pb-leaflet-map-layer> Options: %o",e),e}async data(){return new Promise(e=>{fetch(this.url).then(e=>e.json()).then(t=>e(t))})}}function l(e,t){try{return e.split(/\s*,\s*/).map(e=>parseInt(e,10))}catch(t){return console.error("<pb-map-icon> Invalid size specified: "+e),null}}customElements.define("pb-map-layer",n);class c extends e{static get properties(){return{name:{type:String},iconUrl:{type:String,attribute:"icon-url"},iconSize:{type:Array,converter:l,attribute:"icon-size"},iconAnchor:{type:Array,converter:l,attribute:"icon-anchor"},shadowUrl:{type:String,attribute:"shadow-url"},shadowSize:{type:Array,converter:l,attribute:"shadow-size"},shadowAnchor:{type:Array,converter:l,attribute:"shadow-anchor"},popupAncor:{type:Array,converter:l,attribute:"popup-anchor"}}}constructor(){super(),this.name="default",this.type="image",this.iconUrl=null}get options(){const e={};return Object.keys(c.properties).forEach(t=>{this[t]&&(e[t]=this[t])}),console.log("<pb-map-icon> Options: %o",e),e}}customElements.define("pb-map-icon",c);class d extends(t(e)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{latitude:{type:Number},longitude:{type:Number},zoom:{type:Number},crs:{type:String},fitMarkers:{type:Boolean,attribute:"fit-markers"},cluster:{type:Boolean},disableClusteringAt:{type:Number,attribute:"disable-clustering-at"},noScroll:{type:Boolean,attribute:"no-scroll"},accessToken:{type:String,attribute:"access-token"},toggle:{type:Boolean},imagesPath:{type:String,attribute:"images-path"},cssPath:{type:String,attribute:"css-path"},geoCoding:{type:Boolean,attribute:"geo-coding"},_map:{type:Object}})}constructor(){super(),this.latitude=51.505,this.longitude=-.09,this.zoom=15,this.crs="EPSG3857",this.accessToken="",this.imagesPath="../images/leaflet/",this.cssPath="../css/leaflet",this.toggle=!1,this.noScroll=!1,this.disabled=!0,this.cluster=!1,this.fitMarkers=!1,this.disableClusteringAt=null,this._icons={},this.geoCoding=!1}connectedCallback(){super.connectedCallback(),this._layers=this.querySelectorAll("pb-map-layer"),this._markers=this.querySelectorAll("pb-map-icon"),this.subscribeTo("pb-update-map",e=>{this._markerLayer.clearLayers(),e.detail.forEach(e=>{const t=L.marker([e.latitude,e.longitude]);e.label&&t.bindTooltip(e.label),t.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",e)}),t.bindTooltip(e.label),this.setMarkerIcon(t),this._markerLayer.addLayer(t)}),this._fitBounds()}),this.subscribeTo("pb-update",e=>{this._markerLayer.clearLayers();e.detail.root.querySelectorAll("pb-geolocation").forEach(e=>{const t=L.latLng(e.latitude,e.longitude),i=L.marker(t).addTo(this._markerLayer);e.label&&i.bindTooltip(e.label),e.popup&&i.bindPopup(e.popup),i.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",e)}),this.setMarkerIcon(i)}),this._fitBounds()}),this.subscribeTo("pb-geolocation",e=>{if(e.detail.coordinates){if(this.latitude=e.detail.coordinates.latitude,this.longitude=e.detail.coordinates.longitude,e.detail.clear&&this._markerLayer.clearLayers(),this._hasMarker(this.latitude,this.longitude))console.log("<pb-leaflet-map> Marker already added to map");else{const t=L.marker([this.latitude,this.longitude]);t.addEventListener("click",()=>{this.emitTo("pb-leaflet-marker-click",e.detail.element)}),e.detail.label&&t.bindTooltip(e.detail.label),e.detail.popup&&t.bindPopup(e.detail.popup),this.setMarkerIcon(t),t.addTo(this._markerLayer),e.detail.fitBounds&&this._fitBounds(),console.log("<pb-leaflet-map> added marker")}this.toggle&&(this.disabled=!1);const t=e.detail.event;this._locationChanged(this.latitude,this.longitude,e.detail.zoom,t)}})}get map(){return this._map}setMarkerIcon(e){this._icons&&this._icons.default&&e.setIcon(this._icons.default)}async firstUpdated(){if(this.toggle||(this.disabled=!1),void 0!==window.L)return void this._initMap();window.ESGlobalBridge.requestAvailability();const e=i("../lib/leaflet-src.js"),t=i("../lib/leaflet.markercluster-src.js"),o=i("../lib/Control.Geocoder.min.js");await window.ESGlobalBridge.instance.load("leaflet",e),await window.ESGlobalBridge.instance.load("plugin",t),this.geoCoding&&await window.ESGlobalBridge.instance.load("geocoding",o),window.addEventListener(`es-bridge-${this.geocoding?"geoCoding":"plugin"}-loaded`,this._initMap.bind(this),{once:!0})}render(){const e=i(this.cssPath);return o`
2
+ <link rel="Stylesheet" href="${e}/leaflet.css">
3
+ <link rel="Stylesheet" href="${e}/MarkerCluster.Default.css">
4
+ ${this.geoCoding?o`<link rel="Stylesheet" href="${e}/Control.Geocoder.css">`:null}
4
5
  <div id="map" style="height: 100%; width: 100%"></div>
5
- `}static get styles(){return a`
6
+ `}static get styles(){return s`
6
7
  :host {
7
8
  display: block;
8
9
  }
@@ -21,4 +22,4 @@ import{L as t,p as e,r as i,h as s,c as a}from"./pb-mixin-d61c06b6.js";import"./
21
22
  text-decoration: none;
22
23
  cursor: pointer;
23
24
  }
24
- `}_initMap(){if(this._map)return;L.Icon.Default.imagePath=i(this.imagesPath);const t=L.CRS[this.crs]||L.CRS.EPSG3857;if(this._map=L.map(this.shadowRoot.getElementById("map"),{zoom:this.zoom,center:L.latLng(this.latitude,this.longitude),crs:t}),this._configureLayers(),this._configureMarkers(),this.cluster){const t={};this.disableClusteringAt&&(t.disableClusteringAtZoom=this.disableClusteringAt),this._markerLayer=L.markerClusterGroup(t)}else this._markerLayer=L.layerGroup();if(this._markerLayer.addTo(this._map),this.signalReady(),L.control.scale().addTo(this._map),this.toggle){let t;L.Control.CloseButton=L.Control.extend({options:{position:"topright"},onAdd:e=>(t=L.DomUtil.create("div"),t.className="close",t.innerHTML="X",L.DomEvent.on(t,"click",this._hide.bind(this)),t),onRemove:e=>{L.DomEvent.off(t,"click",this._hide.bind(this))}}),L.control.closeButton=t=>new L.Control.CloseButton(t),L.control.closeButton({position:"topright"}).addTo(this._map)}}_configureMarkers(){0!==this._markers.length&&(this._icons={},this._markers.forEach(t=>{t.iconUrl&&(this._icons[t.name]=L.icon(t.options))}))}_configureLayers(){if(0===this._layers.length)return void L.tileLayer("https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token={accessToken}",{attribution:'© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>',maxZoom:18,zoomOffset:-1,tileSize:512,accessToken:this.accessToken}).addTo(this._map);const t=L.control.layers(null,null,{collapsed:!1});this._layers.forEach(e=>{let i;switch(e.type){case"geojson":e.data().then(s=>{i=L.geoJSON([s]),this._addLayer(e,i,t)});break;default:i=L.tileLayer(e.url,e.options),this._addLayer(e,i,t)}}),this._layers.length>1&&t.addTo(this._map),this._layers=null}_addLayer(t,e,i){t.show&&e.addTo(this._map),t.label&&(t.base?i.addBaseLayer(e,t.label):i.addOverlay(e,t.label))}_fitBounds(){if(!this.fitMarkers)return;const t=L.latLngBounds();let e=0;this._markerLayer.eachLayer(i=>{t.extend(i.getLatLng()),e+=1}),0===e?this._map.fitWorld():1===e?this._map.fitBounds(t,{maxZoom:this.zoom}):this._map.fitBounds(t)}_locationChanged(t,e,i,s){if(this._map){const a=L.latLng([t,e]);this._markerLayer.eachLayer(t=>{t.getLatLng().equals(a)?(i&&!this.noScroll?(t.openTooltip(),this._map.setView(a,i)):this.cluster?this._markerLayer.zoomToShowLayer(t,()=>t.openTooltip()):(t.openTooltip(),this._map.setView(a,this.zoom)),s&&this._icons&&this._icons.active&&t.setIcon(this._icons.active)):this._icons&&this._icons.default&&t.getIcon()!==this._icons.default&&t.setIcon(this._icons.default)})}}_hasMarker(t,e){const i=L.latLng([t,e]);let s=null;return this._markerLayer.eachLayer(t=>{t instanceof L.Marker&&t.getLatLng().equals(i)&&(s=t)}),s}_hide(){this.disabled=!0}}customElements.define("pb-leaflet-map",c);export{c as PbLeafletMap};
25
+ `}_initMap(){if(this._map)return;L.Icon.Default.imagePath=i(this.imagesPath);const e=L.CRS[this.crs]||L.CRS.EPSG3857;if(this._map=L.map(this.shadowRoot.getElementById("map"),{zoom:this.zoom,center:L.latLng(this.latitude,this.longitude),crs:e}),this._configureLayers(),this._configureMarkers(),this.cluster){const e={};this.disableClusteringAt&&(e.disableClusteringAtZoom=this.disableClusteringAt),this._markerLayer=L.markerClusterGroup(e)}else this._markerLayer=L.layerGroup();if(this._markerLayer.addTo(this._map),this.signalReady(),L.control.scale().addTo(this._map),this.toggle){let e;L.Control.CloseButton=L.Control.extend({options:{position:"topright"},onAdd:t=>(e=L.DomUtil.create("div"),e.className="close",e.innerHTML="X",L.DomEvent.on(e,"click",this._hide.bind(this)),e),onRemove:t=>{L.DomEvent.off(e,"click",this._hide.bind(this))}}),L.control.closeButton=e=>new L.Control.CloseButton(e),L.control.closeButton({position:"topright"}).addTo(this._map)}this._configureGeoCoding()}_configureGeoCoding(){if(!this.geoCoding)return;const e=L.Control.Geocoder.nominatim({geocodingQueryParams:{"accept-language":"en"}}),t=L.Control.geocoder({defaultMarkGeocode:!1,geocoder:e,placeholder:a("search.search"),suggestMinLength:3});t.on("markgeocode",e=>{const{geocode:t}=e,i={coordinates:{longitude:t.center.lng,latitude:t.center.lat},name:t.name,label:t.html,properties:t.properties};this.emitTo("pb-geocode",i)}),t.addTo(this._map),this._map.on("click",t=>{e.reverse(t.latlng,this._map.options.crs.scale(this._map.getZoom()),e=>{const t=e[0],i={coordinates:{longitude:t.center.lng,latitude:t.center.lat},name:t.name,label:t.html,properties:t.properties};this.emitTo("pb-geocode",i)})})}_configureMarkers(){0!==this._markers.length&&(this._icons={},this._markers.forEach(e=>{e.iconUrl&&(this._icons[e.name]=L.icon(e.options))}))}_configureLayers(){if(0===this._layers.length)return void L.tileLayer("https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token={accessToken}",{attribution:'© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>',maxZoom:18,zoomOffset:-1,tileSize:512,accessToken:this.accessToken}).addTo(this._map);const e=L.control.layers(null,null,{collapsed:!1});this._layers.forEach(t=>{let i;switch(t.type){case"geojson":t.data().then(o=>{i=L.geoJSON([o]),this._addLayer(t,i,e)});break;default:i=L.tileLayer(t.url,t.options),this._addLayer(t,i,e)}}),this._layers.length>1&&e.addTo(this._map),this._layers=null}_addLayer(e,t,i){e.show&&t.addTo(this._map),e.label&&(e.base?i.addBaseLayer(t,e.label):i.addOverlay(t,e.label))}_fitBounds(){if(!this.fitMarkers)return;const e=L.latLngBounds();let t=0;this._markerLayer.eachLayer(i=>{e.extend(i.getLatLng()),t+=1}),0===t?this._map.fitWorld():1===t?this._map.fitBounds(e,{maxZoom:this.zoom}):this._map.fitBounds(e)}_locationChanged(e,t,i,o){if(this._map){const s=L.latLng([e,t]);this._markerLayer.eachLayer(e=>{e.getLatLng().equals(s)?(i&&!this.noScroll?(e.openTooltip(),this._map.setView(s,i)):this.cluster?this._markerLayer.zoomToShowLayer(e,()=>e.openTooltip()):(e.openTooltip(),this._map.setView(s,this.zoom)),o&&this._icons&&this._icons.active&&e.setIcon(this._icons.active)):this._icons&&this._icons.default&&e.getIcon()!==this._icons.default&&e.setIcon(this._icons.default)})}}_hasMarker(e,t){const i=L.latLng([e,t]);let o=null;return this._markerLayer.eachLayer(e=>{e instanceof L.Marker&&e.getLatLng().equals(i)&&(o=e)}),o}_hide(){this.disabled=!0}}customElements.define("pb-leaflet-map",d);export{d as PbLeafletMap};
@@ -247,6 +247,9 @@
247
247
  "app": "Apparatus Entry",
248
248
  "hi": "Highlight",
249
249
  "ref": "Link (ref)",
250
+ "pb": "Page break (pb)",
251
+ "pagenum": "Page number (@n)",
252
+ "facs": "Image URL (@facs)",
250
253
  "abbreviation": "Abbreviation",
251
254
  "occurrences": "Occurrences in text",
252
255
  "correction": "Correction",
@@ -0,0 +1,2 @@
1
+ var leafletControlGeocoder=function(t,e){function o(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,n.get?n:{enumerable:!0,get:function(){return t[o]}})}}),e.default=t,e}var n=o(e);function s(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function i(t,e){return n.Util.extend(e,t.geocodingQueryParams)}function r(t,e){return n.Util.extend(e,t.reverseQueryParams)}var a=0,l=/[&<>"'`]/g,c=/[&<>"'`]/,u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function p(t){return u[t]}function d(t,e,o,s,i){var r="_l_geocoder_"+a++;e[i||"callback"]=r,window[r]=n.Util.bind(o,s);var l=document.createElement("script");l.type="text/javascript",l.src=t+g(e),l.id=r,document.getElementsByTagName("head")[0].appendChild(l)}function h(t,e,o){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){var t;if(200!==n.status&&304!==n.status)t="";else if("string"==typeof n.response)try{t=JSON.parse(n.response)}catch(e){t=n.response}else t=n.response;o(t)}},n.open("GET",t+g(e),!0),n.responseType="json",n.setRequestHeader("Accept","application/json"),n.send(null)}function g(t,e,o){var n=[];for(var s in t){var i=encodeURIComponent(o?s.toUpperCase():s),r=t[s];if(Array.isArray(r))for(var a=0;a<r.length;a++)n.push(i+"="+encodeURIComponent(r[a]));else n.push(i+"="+encodeURIComponent(String(r)))}return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var f=function(){function t(t){this.options={serviceUrl:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",apiKey:""},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var s=i(this.options,{token:this.options.apiKey,SingleLine:t,outFields:"Addr_Type",forStorage:!1,maxLocations:10,f:"json"});h(this.options.serviceUrl+"/findAddressCandidates",s,function(t){var s=[];if(t.candidates&&t.candidates.length)for(var i=0;i<=t.candidates.length-1;i++){var r=t.candidates[i],a=n.latLng(r.location.y,r.location.x),l=n.latLngBounds(n.latLng(r.extent.ymax,r.extent.xmax),n.latLng(r.extent.ymin,r.extent.xmin));s[i]={name:r.address,bbox:l,center:a}}e.call(o,s)})},e.suggest=function(t,e,o){return this.geocode(t,e,o)},e.reverse=function(t,e,o,s){var i=r(this.options,{location:t.lng+","+t.lat,distance:100,f:"json"});h(this.options.serviceUrl+"/reverseGeocode",i,function(t){var e=[];if(t&&!t.error){var i=n.latLng(t.location.y,t.location.x),r=n.latLngBounds(i,i);e.push({name:t.address.Match_addr,center:i,bbox:r})}o.call(s,e)})},t}(),v=function(){function t(t){this.options={serviceUrl:"https://dev.virtualearth.net/REST/v1/Locations"},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var s=i(this.options,{query:t,key:this.options.apiKey});d(this.options.apiKey,s,function(t){var s=[];if(t.resourceSets.length>0)for(var i=t.resourceSets[0].resources.length-1;i>=0;i--){var r=t.resourceSets[0].resources[i],a=r.bbox;s[i]={name:r.name,bbox:n.latLngBounds([a[0],a[1]],[a[2],a[3]]),center:n.latLng(r.point.coordinates)}}e.call(o,s)},this,"jsonp")},e.reverse=function(t,e,o,s){var i=r(this.options,{key:this.options.apiKey});d(this.options.serviceUrl+t.lat+","+t.lng,i,function(t){for(var e=[],i=t.resourceSets[0].resources.length-1;i>=0;i--){var r=t.resourceSets[0].resources[i],a=r.bbox;e[i]={name:r.name,bbox:n.latLngBounds([a[0],a[1]],[a[2],a[3]]),center:n.latLng(r.point.coordinates)}}o.call(s,e)},this,"jsonp")},t}(),m=function(){function t(t){this.options={serviceUrl:"https://maps.googleapis.com/maps/api/geocode/json"},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var s=i(this.options,{key:this.options.apiKey,address:t});h(this.options.serviceUrl,s,function(t){var s=[];if(t.results&&t.results.length)for(var i=0;i<=t.results.length-1;i++){var r=t.results[i],a=n.latLng(r.geometry.location),l=n.latLngBounds(n.latLng(r.geometry.viewport.northeast),n.latLng(r.geometry.viewport.southwest));s[i]={name:r.formatted_address,bbox:l,center:a,properties:r.address_components}}e.call(o,s)})},e.reverse=function(t,e,o,s){var i=r(this.options,{key:this.options.apiKey,latlng:t.lat+","+t.lng});h(this.options.serviceUrl,i,function(t){var e=[];if(t.results&&t.results.length)for(var i=0;i<=t.results.length-1;i++){var r=t.results[i],a=n.latLng(r.geometry.location),l=n.latLngBounds(n.latLng(r.geometry.viewport.northeast),n.latLng(r.geometry.viewport.southwest));e[i]={name:r.formatted_address,bbox:l,center:a,properties:r.address_components}}o.call(s,e)})},t}(),_=function(){function t(t){if(this.options={serviceUrl:"https://geocoder.api.here.com/6.2/",app_id:"",app_code:"",apiKey:"",maxResults:5},n.Util.setOptions(this,t),t.apiKey)throw Error("apiKey is not supported, use app_id/app_code instead!")}var e=t.prototype;return e.geocode=function(t,e,o){var n=i(this.options,{searchtext:t,gen:9,app_id:this.options.app_id,app_code:this.options.app_code,jsonattributes:1,maxresults:this.options.maxResults});this.getJSON(this.options.serviceUrl+"geocode.json",n,e,o)},e.reverse=function(t,e,o,n){var s=t.lat+","+t.lng;this.options.reverseGeocodeProxRadius&&(s+=","+this.options.reverseGeocodeProxRadius);var i=r(this.options,{prox:s,mode:"retrieveAddresses",app_id:this.options.app_id,app_code:this.options.app_code,gen:9,jsonattributes:1,maxresults:this.options.maxResults});this.getJSON(this.options.serviceUrl+"reversegeocode.json",i,o,n)},e.getJSON=function(t,e,o,s){h(t,e,function(t){var e=[];if(t.response.view&&t.response.view.length)for(var i=0;i<=t.response.view[0].result.length-1;i++){var r=t.response.view[0].result[i].location,a=n.latLng(r.displayPosition.latitude,r.displayPosition.longitude),l=n.latLngBounds(n.latLng(r.mapView.topLeft.latitude,r.mapView.topLeft.longitude),n.latLng(r.mapView.bottomRight.latitude,r.mapView.bottomRight.longitude));e[i]={name:r.address.label,properties:r.address,bbox:l,center:a}}o.call(s,e)})},t}(),b=function(){function t(t){this.options={serviceUrl:"https://geocode.search.hereapi.com/v1",apiKey:"",app_id:"",app_code:"",maxResults:10},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var n=i(this.options,{q:t,apiKey:this.options.apiKey,limit:this.options.maxResults});if(!n.at&&!n.in)throw Error("at / in parameters not found. Please define coordinates (at=latitude,longitude) or other (in) in your geocodingQueryParams.");this.getJSON(this.options.serviceUrl+"/discover",n,e,o)},e.reverse=function(t,e,o,n){var s=r(this.options,{at:t.lat+","+t.lng,limit:this.options.reverseGeocodeProxRadius,apiKey:this.options.apiKey});this.getJSON(this.options.serviceUrl+"/revgeocode",s,o,n)},e.getJSON=function(t,e,o,s){h(t,e,function(t){var e=[];if(t.items&&t.items.length)for(var i=0;i<=t.items.length-1;i++){var r,a=t.items[i],l=n.latLng(a.position.lat,a.position.lng);r=a.mapView?n.latLngBounds(n.latLng(a.mapView.south,a.mapView.west),n.latLng(a.mapView.north,a.mapView.east)):n.latLngBounds(n.latLng(a.position.lat,a.position.lng),n.latLng(a.position.lat,a.position.lng)),e[i]={name:a.address.label,properties:a.address,bbox:r,center:l}}o.call(s,e)})},t}();function y(t){var e;return(e=t.match(/^([NS])\s*(\d{1,3}(?:\.\d*)?)\W*([EW])\s*(\d{1,3}(?:\.\d*)?)$/))?n.latLng((/N/i.test(e[1])?1:-1)*+e[2],(/E/i.test(e[3])?1:-1)*+e[4]):(e=t.match(/^(\d{1,3}(?:\.\d*)?)\s*([NS])\W*(\d{1,3}(?:\.\d*)?)\s*([EW])$/))?n.latLng((/N/i.test(e[2])?1:-1)*+e[1],(/E/i.test(e[4])?1:-1)*+e[3]):(e=t.match(/^([NS])\s*(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['′]?\W*([EW])\s*(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['′]?$/))?n.latLng((/N/i.test(e[1])?1:-1)*(+e[2]+ +e[3]/60),(/E/i.test(e[4])?1:-1)*(+e[5]+ +e[6]/60)):(e=t.match(/^(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['′]?\s*([NS])\W*(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['′]?\s*([EW])$/))?n.latLng((/N/i.test(e[3])?1:-1)*(+e[1]+ +e[2]/60),(/E/i.test(e[6])?1:-1)*(+e[4]+ +e[5]/60)):(e=t.match(/^([NS])\s*(\d{1,3})°?\s*(\d{1,2})['′]?\s*(\d{1,3}(?:\.\d*)?)?["″]?\W*([EW])\s*(\d{1,3})°?\s*(\d{1,2})['′]?\s*(\d{1,3}(?:\.\d*)?)?["″]?$/))?n.latLng((/N/i.test(e[1])?1:-1)*(+e[2]+ +e[3]/60+ +e[4]/3600),(/E/i.test(e[5])?1:-1)*(+e[6]+ +e[7]/60+ +e[8]/3600)):(e=t.match(/^(\d{1,3})°?\s*(\d{1,2})['′]?\s*(\d{1,3}(?:\.\d*)?)?["″]\s*([NS])\W*(\d{1,3})°?\s*(\d{1,2})['′]?\s*(\d{1,3}(?:\.\d*)?)?["″]?\s*([EW])$/))?n.latLng((/N/i.test(e[4])?1:-1)*(+e[1]+ +e[2]/60+ +e[3]/3600),(/E/i.test(e[8])?1:-1)*(+e[5]+ +e[6]/60+ +e[7]/3600)):(e=t.match(/^\s*([+-]?\d+(?:\.\d*)?)\s*[\s,]\s*([+-]?\d+(?:\.\d*)?)\s*$/))?n.latLng(+e[1],+e[2]):void 0}var L=function(){function t(t){this.options={next:void 0,sizeInMeters:1e4},n.Util.setOptions(this,t)}return t.prototype.geocode=function(t,e,o){var n=y(t);if(n){var s=[{name:t,center:n,bbox:n.toBounds(this.options.sizeInMeters)}];e.call(o,s)}else this.options.next&&this.options.next.geocode(t,e,o)},t}(),x=function(){function t(t){this.options={serviceUrl:"https://api.mapbox.com/geocoding/v5/mapbox.places/"},n.Util.setOptions(this,t)}var e=t.prototype;return e._getProperties=function(t){for(var e={text:t.text,address:t.address},o=0;o<(t.context||[]).length;o++)e[t.context[o].id.split(".")[0]]=t.context[o].text,t.context[o].short_code&&(e.countryShortCode=t.context[o].short_code);return e},e.geocode=function(t,e,o){var s=this,r=i(this.options,{access_token:this.options.apiKey});void 0!==r.proximity&&void 0!==r.proximity.lat&&void 0!==r.proximity.lng&&(r.proximity=r.proximity.lng+","+r.proximity.lat),h(this.options.serviceUrl+encodeURIComponent(t)+".json",r,function(t){var i=[];if(t.features&&t.features.length)for(var r=0;r<=t.features.length-1;r++){var a,l=t.features[r],c=n.latLng(l.center.reverse());a=l.bbox?n.latLngBounds(n.latLng(l.bbox.slice(0,2).reverse()),n.latLng(l.bbox.slice(2,4).reverse())):n.latLngBounds(c,c),i[r]={name:l.place_name,bbox:a,center:c,properties:s._getProperties(l)}}e.call(o,i)})},e.suggest=function(t,e,o){return this.geocode(t,e,o)},e.reverse=function(t,e,o,s){var i=this;h(this.options.serviceUrl+t.lng+","+t.lat+".json",r(this.options,{access_token:this.options.apiKey}),function(t){var e=[];if(t.features&&t.features.length)for(var r=0;r<=t.features.length-1;r++){var a,l=t.features[r],c=n.latLng(l.center.reverse());a=l.bbox?n.latLngBounds(n.latLng(l.bbox.slice(0,2).reverse()),n.latLng(l.bbox.slice(2,4).reverse())):n.latLngBounds(c,c),e[r]={name:l.place_name,bbox:a,center:c,properties:i._getProperties(l)}}o.call(s,e)})},t}(),U=function(){function t(t){this.options={serviceUrl:"https://www.mapquestapi.com/geocoding/v1"},n.Util.setOptions(this,t),this.options.apiKey=decodeURIComponent(this.options.apiKey)}var e=t.prototype;return e._formatName=function(){return[].slice.call(arguments).filter(function(t){return!!t}).join(", ")},e.geocode=function(t,e,o){var s=i(this.options,{key:this.options.apiKey,location:t,limit:5,outFormat:"json"});h(this.options.serviceUrl+"/address",s,n.Util.bind(function(t){var s=[];if(t.results&&t.results[0].locations)for(var i=t.results[0].locations.length-1;i>=0;i--){var r=t.results[0].locations[i],a=n.latLng(r.latLng);s[i]={name:this._formatName(r.street,r.adminArea4,r.adminArea3,r.adminArea1),bbox:n.latLngBounds(a,a),center:a}}e.call(o,s)},this))},e.reverse=function(t,e,o,s){var i=r(this.options,{key:this.options.apiKey,location:t.lat+","+t.lng,outputFormat:"json"});h(this.options.serviceUrl+"/reverse",i,n.Util.bind(function(t){var e=[];if(t.results&&t.results[0].locations)for(var i=t.results[0].locations.length-1;i>=0;i--){var r=t.results[0].locations[i],a=n.latLng(r.latLng);e[i]={name:this._formatName(r.street,r.adminArea4,r.adminArea3,r.adminArea1),bbox:n.latLngBounds(a,a),center:a}}o.call(s,e)},this))},t}(),w=function(){function t(t){this.options={userId:void 0,apiKey:void 0,serviceUrl:"https://neutrinoapi.com/"},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var s=i(this.options,{apiKey:this.options.apiKey,userId:this.options.userId,address:t.split(/\s+/).join(".")});h(this.options.serviceUrl+"geocode-address",s,function(t){var s=[];if(t.locations){t.geometry=t.locations[0];var i=n.latLng(t.geometry.latitude,t.geometry.longitude),r=n.latLngBounds(i,i);s[0]={name:t.geometry.address,bbox:r,center:i}}e.call(o,s)})},e.suggest=function(t,e,o){return this.geocode(t,e,o)},e.reverse=function(t,e,o,s){var i=r(this.options,{apiKey:this.options.apiKey,userId:this.options.userId,latitude:t.lat,longitude:t.lng});h(this.options.serviceUrl+"geocode-reverse",i,function(e){var i=[];if(200==e.status.status&&e.found){var r=n.latLng(t.lat,t.lng),a=n.latLngBounds(r,r);i[0]={name:e.address,bbox:a,center:r}}o.call(s,i)})},t}(),C=function(){function t(t){this.options={serviceUrl:"https://nominatim.openstreetmap.org/",htmlTemplate:function(t){var e,o,n=t.address,s=[];return(n.road||n.building)&&s.push("{building} {road} {house_number}"),(n.city||n.town||n.village||n.hamlet)&&s.push('<span class="'+(s.length>0?"leaflet-control-geocoder-address-detail":"")+'">{postcode} {city} {town} {village} {hamlet}</span>'),(n.state||n.country)&&s.push('<span class="'+(s.length>0?"leaflet-control-geocoder-address-context":"")+'">{state} {country}</span>'),e=s.join("<br/>"),o=n,e.replace(/\{ *([\w_]+) *\}/g,function(t,e){var n,s=o[e];return void 0===s?s="":"function"==typeof s&&(s=s(o)),null==(n=s)?"":n?c.test(n=""+n)?n.replace(l,p):n:n+""})}},n.Util.setOptions(this,t||{})}var e=t.prototype;return e.geocode=function(t,e,o){var s=this,r=i(this.options,{q:t,limit:5,format:"json",addressdetails:1});h(this.options.serviceUrl+"search",r,function(t){for(var i=[],r=t.length-1;r>=0;r--){for(var a=t[r].boundingbox,l=0;l<4;l++)a[l]=+a[l];i[r]={icon:t[r].icon,name:t[r].display_name,html:s.options.htmlTemplate?s.options.htmlTemplate(t[r]):void 0,bbox:n.latLngBounds([a[0],a[2]],[a[1],a[3]]),center:n.latLng(t[r].lat,t[r].lon),properties:t[r]}}e.call(o,i)})},e.reverse=function(t,e,o,s){var i=this,a=r(this.options,{lat:t.lat,lon:t.lng,zoom:Math.round(Math.log(e/256)/Math.log(2)),addressdetails:1,format:"json"});h(this.options.serviceUrl+"reverse",a,function(t){var e=[];if(t&&t.lat&&t.lon){var r=n.latLng(t.lat,t.lon),a=n.latLngBounds(r,r);e.push({name:t.display_name,html:i.options.htmlTemplate?i.options.htmlTemplate(t):void 0,center:r,bbox:a,properties:t})}o.call(s,e)})},t}(),E=function(){function t(t){n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){try{var s=this.options.OpenLocationCode.decode(t),i={name:t,center:n.latLng(s.latitudeCenter,s.longitudeCenter),bbox:n.latLngBounds(n.latLng(s.latitudeLo,s.longitudeLo),n.latLng(s.latitudeHi,s.longitudeHi))};e.call(o,[i])}catch(t){console.warn(t),e.call(o,[])}},e.reverse=function(t,e,o,s){try{var i={name:this.options.OpenLocationCode.encode(t.lat,t.lng,this.options.codeLength),center:n.latLng(t.lat,t.lng),bbox:n.latLngBounds(n.latLng(t.lat,t.lng),n.latLng(t.lat,t.lng))};o.call(s,[i])}catch(t){console.warn(t),o.call(s,[])}},t}(),k=function(){function t(t){this.options={serviceUrl:"https://api.opencagedata.com/geocode/v1/json"},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var s=i(this.options,{key:this.options.apiKey,q:t});h(this.options.serviceUrl,s,function(t){var s=[];if(t.results&&t.results.length)for(var i=0;i<t.results.length;i++){var r,a=t.results[i],l=n.latLng(a.geometry);r=a.annotations&&a.annotations.bounds?n.latLngBounds(n.latLng(a.annotations.bounds.northeast),n.latLng(a.annotations.bounds.southwest)):n.latLngBounds(l,l),s.push({name:a.formatted,bbox:r,center:l})}e.call(o,s)})},e.suggest=function(t,e,o){return this.geocode(t,e,o)},e.reverse=function(t,e,o,s){var i=r(this.options,{key:this.options.apiKey,q:[t.lat,t.lng].join(",")});h(this.options.serviceUrl,i,function(t){var e=[];if(t.results&&t.results.length)for(var i=0;i<t.results.length;i++){var r,a=t.results[i],l=n.latLng(a.geometry);r=a.annotations&&a.annotations.bounds?n.latLngBounds(n.latLng(a.annotations.bounds.northeast),n.latLng(a.annotations.bounds.southwest)):n.latLngBounds(l,l),e.push({name:a.formatted,bbox:r,center:l})}o.call(s,e)})},t}(),D=function(){function t(t){this.options={serviceUrl:"https://api.geocode.earth/v1"},this._lastSuggest=0,n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var n=this,s=i(this.options,{api_key:this.options.apiKey,text:t});h(this.options.serviceUrl+"/search",s,function(t){e.call(o,n._parseResults(t,"bbox"))})},e.suggest=function(t,e,o){var n=this,s=i(this.options,{api_key:this.options.apiKey,text:t});h(this.options.serviceUrl+"/autocomplete",s,function(t){t.geocoding.timestamp>n._lastSuggest&&(n._lastSuggest=t.geocoding.timestamp,e.call(o,n._parseResults(t,"bbox")))})},e.reverse=function(t,e,o,n){var s=this,i=r(this.options,{api_key:this.options.apiKey,"point.lat":t.lat,"point.lon":t.lng});h(this.options.serviceUrl+"/reverse",i,function(t){o.call(n,s._parseResults(t,"bounds"))})},e._parseResults=function(t,e){var o=[];return n.geoJSON(t,{pointToLayer:function(t,e){return n.circleMarker(e)},onEachFeature:function(t,s){var i,r,a={};s.getBounds?r=(i=s.getBounds()).getCenter():s.feature.bbox?(r=s.getLatLng(),i=n.latLngBounds(n.GeoJSON.coordsToLatLng(s.feature.bbox.slice(0,2)),n.GeoJSON.coordsToLatLng(s.feature.bbox.slice(2,4)))):(r=s.getLatLng(),i=n.latLngBounds(r,r)),a.name=s.feature.properties.label,a.center=r,a[e]=i,a.properties=s.feature.properties,o.push(a)}}),o},t}();function B(t){return new D(t)}var R=D,S=B,O=D,K=B,T=function(t){function e(e){return t.call(this,n.Util.extend({serviceUrl:"https://api.openrouteservice.org/geocode"},e))||this}return s(e,t),e}(D),j=function(){function t(t){this.options={serviceUrl:"https://photon.komoot.io/api/",reverseUrl:"https://photon.komoot.io/reverse/",nameProperties:["name","street","suburb","hamlet","town","city","state","country"]},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var s=i(this.options,{q:t});h(this.options.serviceUrl,s,n.Util.bind(function(t){e.call(o,this._decodeFeatures(t))},this))},e.suggest=function(t,e,o){return this.geocode(t,e,o)},e.reverse=function(t,e,o,s){var i=r(this.options,{lat:t.lat,lon:t.lng});h(this.options.reverseUrl,i,n.Util.bind(function(t){o.call(s,this._decodeFeatures(t))},this))},e._decodeFeatures=function(t){var e=[];if(t&&t.features)for(var o=0;o<t.features.length;o++){var s=t.features[o],i=s.geometry.coordinates,r=n.latLng(i[1],i[0]),a=s.properties.extent,l=a?n.latLngBounds([a[1],a[0]],[a[3],a[2]]):n.latLngBounds(r,r);e.push({name:this._decodeFeatureName(s),html:this.options.htmlTemplate?this.options.htmlTemplate(s):void 0,center:r,bbox:l,properties:s.properties})}return e},e._decodeFeatureName=function(t){return(this.options.nameProperties||[]).map(function(e){return t.properties[e]}).filter(function(t){return!!t}).join(", ")},t}(),N=function(){function t(t){this.options={serviceUrl:"https://api.what3words.com/v2/"},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){h(this.options.serviceUrl+"forward",i(this.options,{key:this.options.apiKey,addr:t.split(/\s+/).join(".")}),function(t){var s=[];if(t.geometry){var i=n.latLng(t.geometry.lat,t.geometry.lng),r=n.latLngBounds(i,i);s[0]={name:t.words,bbox:r,center:i}}e.call(o,s)})},e.suggest=function(t,e,o){return this.geocode(t,e,o)},e.reverse=function(t,e,o,s){h(this.options.serviceUrl+"reverse",r(this.options,{key:this.options.apiKey,coords:[t.lat,t.lng].join(",")}),function(t){var e=[];if(200==t.status.status){var i=n.latLng(t.geometry.lat,t.geometry.lng),r=n.latLngBounds(i,i);e[0]={name:t.words,bbox:r,center:i}}o.call(s,e)})},t}(),M={__proto__:null,geocodingParams:i,reverseParams:r,ArcGis:f,arcgis:function(t){return new f(t)},Bing:v,bing:function(t){return new v(t)},Google:m,google:function(t){return new m(t)},HERE:_,HEREv2:b,here:function(t){return t.apiKey?new b(t):new _(t)},parseLatLng:y,LatLng:L,latLng:function(t){return new L(t)},Mapbox:x,mapbox:function(t){return new x(t)},MapQuest:U,mapQuest:function(t){return new U(t)},Neutrino:w,neutrino:function(t){return new w(t)},Nominatim:C,nominatim:function(t){return new C(t)},OpenLocationCode:E,openLocationCode:function(t){return new E(t)},OpenCage:k,opencage:function(t){return new k(t)},Pelias:D,pelias:B,GeocodeEarth:R,geocodeEarth:S,Mapzen:O,mapzen:K,Openrouteservice:T,openrouteservice:function(t){return new T(t)},Photon:j,photon:function(t){return new j(t)},What3Words:N,what3words:function(t){return new N(t)}},P=function(){};n.Util.extend(P.prototype,n.Control.prototype),n.Util.extend(P.prototype,n.Evented.prototype);var G=function(t){function e(e){var o;return(o=t.call(this,e)||this).options={showUniqueResult:!0,showResultIcons:!1,collapsed:!0,expand:"touch",position:"topright",placeholder:"Search...",errorMessage:"Nothing found.",iconLabel:"Initiate a new search",query:"",queryMinLength:1,suggestMinLength:3,suggestTimeout:250,defaultMarkGeocode:!0},o._requestCount=0,n.Util.setOptions(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(o),e),o.options.geocoder||(o.options.geocoder=new C),o}s(e,t);var o=e.prototype;return o.addThrobberClass=function(){n.DomUtil.addClass(this._container,"leaflet-control-geocoder-throbber")},o.removeThrobberClass=function(){n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-throbber")},o.onAdd=function(t){var e=this,o="leaflet-control-geocoder",s=n.DomUtil.create("div",o+" leaflet-bar"),i=n.DomUtil.create("button",o+"-icon",s),r=this._form=n.DomUtil.create("div",o+"-form",s);this._map=t,this._container=s,i.innerHTML="&nbsp;",i.type="button",i.setAttribute("aria-label",this.options.iconLabel);var a=this._input=n.DomUtil.create("input","",r);return a.type="text",a.value=this.options.query,a.placeholder=this.options.placeholder,n.DomEvent.disableClickPropagation(a),this._errorElement=n.DomUtil.create("div",o+"-form-no-error",s),this._errorElement.innerHTML=this.options.errorMessage,this._alts=n.DomUtil.create("ul",o+"-alternatives leaflet-control-geocoder-alternatives-minimized",s),n.DomEvent.disableClickPropagation(this._alts),n.DomEvent.addListener(a,"keydown",this._keydown,this),this.options.geocoder.suggest&&n.DomEvent.addListener(a,"input",this._change,this),n.DomEvent.addListener(a,"blur",function(){e.options.collapsed&&!e._preventBlurCollapse&&e._collapse(),e._preventBlurCollapse=!1}),this.options.collapsed?"click"===this.options.expand?n.DomEvent.addListener(s,"click",function(t){0===t.button&&2!==t.detail&&e._toggle()}):"touch"===this.options.expand?n.DomEvent.addListener(s,n.Browser.touch?"touchstart mousedown":"mousedown",function(t){e._toggle(),t.preventDefault(),t.stopPropagation()},this):(n.DomEvent.addListener(s,"mouseover",this._expand,this),n.DomEvent.addListener(s,"mouseout",this._collapse,this),this._map.on("movestart",this._collapse,this)):(this._expand(),n.DomEvent.addListener(s,n.Browser.touch?"touchstart":"click",function(){return e._geocode()})),this.options.defaultMarkGeocode&&this.on("markgeocode",this.markGeocode,this),this.on("startgeocode",this.addThrobberClass,this),this.on("finishgeocode",this.removeThrobberClass,this),this.on("startsuggest",this.addThrobberClass,this),this.on("finishsuggest",this.removeThrobberClass,this),n.DomEvent.disableClickPropagation(s),s},o.setQuery=function(t){return this._input.value=t,this},o._geocodeResult=function(t,e){if(!e&&this.options.showUniqueResult&&1===t.length)this._geocodeResultSelected(t[0]);else if(t.length>0){this._alts.innerHTML="",this._results=t,n.DomUtil.removeClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),n.DomUtil.addClass(this._container,"leaflet-control-geocoder-options-open");for(var o=0;o<t.length;o++)this._alts.appendChild(this._createAlt(t[o],o))}else n.DomUtil.addClass(this._container,"leaflet-control-geocoder-options-error"),n.DomUtil.addClass(this._errorElement,"leaflet-control-geocoder-error")},o.markGeocode=function(t){var e=t.geocode;return this._map.fitBounds(e.bbox),this._geocodeMarker&&this._map.removeLayer(this._geocodeMarker),this._geocodeMarker=new n.Marker(e.center).bindPopup(e.html||e.name).addTo(this._map).openPopup(),this},o._geocode=function(t){var e=this,o=this._input.value;if(t||!(o.length<this.options.queryMinLength)){var n=++this._requestCount,s=function(s){n===e._requestCount&&(e.fire(t?"finishsuggest":"finishgeocode",{input:o,results:s}),e._geocodeResult(s,t))};this._lastGeocode=o,t||this._clearResults(),this.fire(t?"startsuggest":"startgeocode",{input:o}),t?this.options.geocoder.suggest(o,s):this.options.geocoder.geocode(o,s)}},o._geocodeResultSelected=function(t){this.fire("markgeocode",{geocode:t})},o._toggle=function(){n.DomUtil.hasClass(this._container,"leaflet-control-geocoder-expanded")?this._collapse():this._expand()},o._expand=function(){n.DomUtil.addClass(this._container,"leaflet-control-geocoder-expanded"),this._input.select(),this.fire("expand")},o._collapse=function(){n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-expanded"),n.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),n.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-open"),n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-error"),this._input.blur(),this.fire("collapse")},o._clearResults=function(){n.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),this._selection=null,n.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-open"),n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-error")},o._createAlt=function(t,e){var o=this,s=n.DomUtil.create("li",""),i=n.DomUtil.create("a","",s),r=this.options.showResultIcons&&t.icon?n.DomUtil.create("img","",i):null,a=t.html?void 0:document.createTextNode(t.name);return r&&(r.src=t.icon),s.setAttribute("data-result-index",String(e)),t.html?i.innerHTML=i.innerHTML+t.html:a&&i.appendChild(a),n.DomEvent.addListener(s,"mousedown touchstart",function(e){o._preventBlurCollapse=!0,n.DomEvent.stop(e),o._geocodeResultSelected(t),n.DomEvent.on(s,"click touchend",function(){o.options.collapsed?o._collapse():o._clearResults()})},this),s},o._keydown=function(t){var e=this,o=function(t){e._selection&&(n.DomUtil.removeClass(e._selection,"leaflet-control-geocoder-selected"),e._selection=e._selection[t>0?"nextSibling":"previousSibling"]),e._selection||(e._selection=e._alts[t>0?"firstChild":"lastChild"]),e._selection&&n.DomUtil.addClass(e._selection,"leaflet-control-geocoder-selected")};switch(t.keyCode){case 27:this.options.collapsed?this._collapse():this._clearResults();break;case 38:o(-1);break;case 40:o(1);break;case 13:if(this._selection){var s=parseInt(this._selection.getAttribute("data-result-index"),10);this._geocodeResultSelected(this._results[s]),this._clearResults()}else this._geocode();break;default:return}n.DomEvent.preventDefault(t)},o._change=function(){var t=this,e=this._input.value;e!==this._lastGeocode&&(clearTimeout(this._suggestTimeout),e.length>=this.options.suggestMinLength?this._suggestTimeout=setTimeout(function(){return t._geocode(!0)},this.options.suggestTimeout):this._clearResults())},e}(P);function q(t){return new G(t)}return n.Util.extend(G,M),n.Util.extend(n.Control,{Geocoder:G,geocoder:q}),t.Geocoder=G,t.default=G,t.geocoder=q,t.geocoders=M,t}({},L);
2
+ //# sourceMappingURL=Control.Geocoder.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Control.Geocoder.min.js","sources":["../src/geocoders/api.ts","../src/util.ts","../src/geocoders/arcgis.ts","../src/geocoders/bing.ts","../src/geocoders/google.ts","../src/geocoders/here.ts","../src/geocoders/latlng.ts","../src/geocoders/mapbox.ts","../src/geocoders/mapquest.ts","../src/geocoders/neutrino.ts","../src/geocoders/nominatim.ts","../src/geocoders/open-location-code.ts","../src/geocoders/opencage.ts","../src/geocoders/pelias.ts","../src/geocoders/photon.ts","../src/geocoders/what3words.ts","../src/control.ts","../src/index.ts"],"sourcesContent":["import * as L from 'leaflet';\n\n/**\n * An object that represents a result from a geocoding query\n */\nexport interface GeocodingResult {\n /**\n * Name of found location\n */\n name: string;\n /**\n * The bounds of the location\n */\n bbox: L.LatLngBounds;\n /**\n * The center coordinate of the location\n */\n center: L.LatLng;\n /**\n * URL for icon representing result; optional\n */\n icon?: string;\n /**\n * HTML formatted representation of the name\n */\n html?: string;\n /**\n * Additional properties returned by the geocoder\n */\n properties?: any;\n}\n\n/**\n * A callback function used in {@link IGeocoder.geocode} and {@link IGeocoder.suggest} and {@link IGeocoder.reverse}\n */\nexport type GeocodingCallback = (result: GeocodingResult[]) => void;\n\n/**\n * An interface implemented to respond to geocoding queries\n */\nexport interface IGeocoder {\n /**\n * Performs a geocoding query and returns the results to the callback in the provided context\n * @param query the query\n * @param cb the callback function\n * @param context the `this` context in the callback\n */\n geocode(query: string, cb: GeocodingCallback, context?: any): void;\n /**\n * Performs a geocoding query suggestion (this happens while typing) and returns the results to the callback in the provided context\n * @param query the query\n * @param cb the callback function\n * @param context the `this` context in the callback\n */\n suggest?(query: string, cb: GeocodingCallback, context?: any): void;\n /**\n * Performs a reverse geocoding query and returns the results to the callback in the provided context\n * @param location the coordinate to reverse geocode\n * @param scale the map scale possibly used for reverse geocoding\n * @param cb the callback function\n * @param context the `this` context in the callback\n */\n reverse?(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void;\n}\n\nexport interface GeocoderOptions {\n /**\n * URL of the service\n */\n serviceUrl: string;\n /**\n * Additional URL parameters (strings) that will be added to geocoding requests\n */\n geocodingQueryParams?: Record<string, unknown>;\n /**\n * Additional URL parameters (strings) that will be added to reverse geocoding requests\n */\n reverseQueryParams?: Record<string, unknown>;\n /**\n * API key to use this service\n */\n apiKey?: string;\n}\n\n/**\n * @internal\n */\nexport function geocodingParams(\n options: GeocoderOptions,\n params: Record<string, unknown>\n): Record<string, unknown> {\n return L.Util.extend(params, options.geocodingQueryParams);\n}\n\n/**\n * @internal\n */\nexport function reverseParams(\n options: GeocoderOptions,\n params: Record<string, unknown>\n): Record<string, unknown> {\n return L.Util.extend(params, options.reverseQueryParams);\n}\n","import * as L from 'leaflet';\n/**\n * @internal\n */\nlet lastCallbackId = 0;\n\n// Adapted from handlebars.js\n// https://github.com/wycats/handlebars.js/\n/**\n * @internal\n */\nconst badChars = /[&<>\"'`]/g;\n/**\n * @internal\n */\nconst possible = /[&<>\"'`]/;\n/**\n * @internal\n */\nconst escape: Record<string, string> = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#x27;',\n '`': '&#x60;'\n};\n\n/**\n * @internal\n */\nfunction escapeChar(chr: string) {\n return escape[chr];\n}\n\n/**\n * @internal\n */\nexport function htmlEscape(string?: string): string {\n if (string == null) {\n return '';\n } else if (!string) {\n return string + '';\n }\n\n // Force a string conversion as this will be done by the append regardless and\n // the regex test will do this transparently behind the scenes, causing issues if\n // an object's to string has escaped characters in it.\n string = '' + string;\n\n if (!possible.test(string)) {\n return string;\n }\n return string.replace(badChars, escapeChar);\n}\n\n/**\n * @internal\n */\nexport function jsonp(\n url: string,\n params: Record<string, any>,\n callback: (message: any) => void,\n context: any,\n jsonpParam?: string\n) {\n const callbackId = '_l_geocoder_' + lastCallbackId++;\n params[jsonpParam || 'callback'] = callbackId;\n (window as any)[callbackId] = L.Util.bind(callback, context);\n const script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = url + getParamString(params);\n script.id = callbackId;\n document.getElementsByTagName('head')[0].appendChild(script);\n}\n\n/**\n * @internal\n */\nexport function getJSON(\n url: string,\n params: Record<string, unknown>,\n callback: (message: any) => void\n): void {\n const xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function() {\n if (xmlHttp.readyState !== 4) {\n return;\n }\n let message;\n if (xmlHttp.status !== 200 && xmlHttp.status !== 304) {\n message = '';\n } else if (typeof xmlHttp.response === 'string') {\n // IE doesn't parse JSON responses even with responseType: 'json'.\n try {\n message = JSON.parse(xmlHttp.response);\n } catch (e) {\n // Not a JSON response\n message = xmlHttp.response;\n }\n } else {\n message = xmlHttp.response;\n }\n callback(message);\n };\n xmlHttp.open('GET', url + getParamString(params), true);\n xmlHttp.responseType = 'json';\n xmlHttp.setRequestHeader('Accept', 'application/json');\n xmlHttp.send(null);\n}\n\n/**\n * @internal\n */\nexport function template(str: string, data: Record<string, any>): string {\n return str.replace(/\\{ *([\\w_]+) *\\}/g, (str, key) => {\n let value = data[key];\n if (value === undefined) {\n value = '';\n } else if (typeof value === 'function') {\n value = value(data);\n }\n return htmlEscape(value);\n });\n}\n\n/**\n * @internal\n */\nexport function getParamString(\n obj: Record<string, unknown | unknown[]>,\n existingUrl?: string,\n uppercase?: boolean\n): string {\n const params = [];\n for (const i in obj) {\n const key = encodeURIComponent(uppercase ? i.toUpperCase() : i);\n const value = obj[i];\n if (!Array.isArray(value)) {\n params.push(key + '=' + encodeURIComponent(String(value)));\n } else {\n for (let j = 0; j < value.length; j++) {\n params.push(key + '=' + encodeURIComponent(value[j]));\n }\n }\n }\n return (!existingUrl || existingUrl.indexOf('?') === -1 ? '?' : '&') + params.join('&');\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface ArcGisOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the [ArcGIS geocoder](https://developers.arcgis.com/features/geocoding/)\n */\nexport class ArcGis implements IGeocoder {\n options: ArcGisOptions = {\n serviceUrl: 'https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer',\n apiKey: ''\n };\n\n constructor(options?: Partial<ArcGisOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n token: this.options.apiKey,\n SingleLine: query,\n outFields: 'Addr_Type',\n forStorage: false,\n maxLocations: 10,\n f: 'json'\n });\n\n getJSON(this.options.serviceUrl + '/findAddressCandidates', params, data => {\n const results: GeocodingResult[] = [];\n if (data.candidates && data.candidates.length) {\n for (let i = 0; i <= data.candidates.length - 1; i++) {\n const loc = data.candidates[i];\n const latLng = L.latLng(loc.location.y, loc.location.x);\n const latLngBounds = L.latLngBounds(\n L.latLng(loc.extent.ymax, loc.extent.xmax),\n L.latLng(loc.extent.ymin, loc.extent.xmin)\n );\n results[i] = {\n name: loc.address,\n bbox: latLngBounds,\n center: latLng\n };\n }\n }\n\n cb.call(context, results);\n });\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n return this.geocode(query, cb, context);\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n location: location.lng + ',' + location.lat,\n distance: 100,\n f: 'json'\n });\n getJSON(this.options.serviceUrl + '/reverseGeocode', params, data => {\n const result: GeocodingResult[] = [];\n if (data && !data.error) {\n const center = L.latLng(data.location.y, data.location.x);\n const bbox = L.latLngBounds(center, center);\n result.push({\n name: data.address.Match_addr,\n center: center,\n bbox: bbox\n });\n }\n\n cb.call(context, result);\n });\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link ArcGis}\n * @param options the options\n */\nexport function arcgis(options?: Partial<ArcGisOptions>) {\n return new ArcGis(options);\n}\n","import * as L from 'leaflet';\nimport { jsonp } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface BingOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the [Bing Locations API](https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/)\n */\nexport class Bing implements IGeocoder {\n options: BingOptions = {\n serviceUrl: 'https://dev.virtualearth.net/REST/v1/Locations'\n };\n\n constructor(options?: Partial<BingOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n query: query,\n key: this.options.apiKey\n });\n jsonp(\n this.options.apiKey,\n params,\n data => {\n const results: GeocodingResult[] = [];\n if (data.resourceSets.length > 0) {\n for (let i = data.resourceSets[0].resources.length - 1; i >= 0; i--) {\n const resource = data.resourceSets[0].resources[i],\n bbox = resource.bbox;\n results[i] = {\n name: resource.name,\n bbox: L.latLngBounds([bbox[0], bbox[1]], [bbox[2], bbox[3]]),\n center: L.latLng(resource.point.coordinates)\n };\n }\n }\n cb.call(context, results);\n },\n this,\n 'jsonp'\n );\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n key: this.options.apiKey\n });\n jsonp(\n this.options.serviceUrl + location.lat + ',' + location.lng,\n params,\n data => {\n const results: GeocodingResult[] = [];\n for (let i = data.resourceSets[0].resources.length - 1; i >= 0; i--) {\n const resource = data.resourceSets[0].resources[i],\n bbox = resource.bbox;\n results[i] = {\n name: resource.name,\n bbox: L.latLngBounds([bbox[0], bbox[1]], [bbox[2], bbox[3]]),\n center: L.latLng(resource.point.coordinates)\n };\n }\n cb.call(context, results);\n },\n this,\n 'jsonp'\n );\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Bing}\n * @param options the options\n */\nexport function bing(options?: Partial<BingOptions>) {\n return new Bing(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\n/**\n * Implementation of the [Google Geocoding API](https://developers.google.com/maps/documentation/geocoding/)\n */\nexport interface GoogleOptions extends GeocoderOptions {}\n\nexport class Google implements IGeocoder {\n options: GoogleOptions = {\n serviceUrl: 'https://maps.googleapis.com/maps/api/geocode/json'\n };\n\n constructor(options?: Partial<GoogleOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n key: this.options.apiKey,\n address: query\n });\n getJSON(this.options.serviceUrl, params, data => {\n const results: GeocodingResult[] = [];\n if (data.results && data.results.length) {\n for (let i = 0; i <= data.results.length - 1; i++) {\n const loc = data.results[i];\n const latLng = L.latLng(loc.geometry.location);\n const latLngBounds = L.latLngBounds(\n L.latLng(loc.geometry.viewport.northeast),\n L.latLng(loc.geometry.viewport.southwest)\n );\n results[i] = {\n name: loc.formatted_address,\n bbox: latLngBounds,\n center: latLng,\n properties: loc.address_components\n };\n }\n }\n\n cb.call(context, results);\n });\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n key: this.options.apiKey,\n latlng: location.lat + ',' + location.lng\n });\n getJSON(this.options.serviceUrl, params, data => {\n const results: GeocodingResult[] = [];\n if (data.results && data.results.length) {\n for (let i = 0; i <= data.results.length - 1; i++) {\n const loc = data.results[i];\n const center = L.latLng(loc.geometry.location);\n const bbox = L.latLngBounds(\n L.latLng(loc.geometry.viewport.northeast),\n L.latLng(loc.geometry.viewport.southwest)\n );\n results[i] = {\n name: loc.formatted_address,\n bbox: bbox,\n center: center,\n properties: loc.address_components\n };\n }\n }\n\n cb.call(context, results);\n });\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Google}\n * @param options the options\n */\nexport function google(options?: Partial<GoogleOptions>) {\n return new Google(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface HereOptions extends GeocoderOptions {\n /**\n * Use `apiKey` and the new `HEREv2` geocoder\n * @deprecated\n */\n app_id: string;\n /**\n * Use `apiKey` and the new `HEREv2` geocoder\n * @deprecated\n */\n app_code: string;\n reverseGeocodeProxRadius?: any;\n apiKey: string;\n maxResults: number;\n}\n\n/**\n * Implementation of the [HERE Geocoder API](https://developer.here.com/documentation/geocoder/topics/introduction.html)\n */\nexport class HERE implements IGeocoder {\n options: HereOptions = {\n serviceUrl: 'https://geocoder.api.here.com/6.2/',\n app_id: '',\n app_code: '',\n apiKey: '',\n maxResults: 5\n };\n\n constructor(options?: Partial<HereOptions>) {\n L.Util.setOptions(this, options);\n if (options.apiKey) throw Error('apiKey is not supported, use app_id/app_code instead!');\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n searchtext: query,\n gen: 9,\n app_id: this.options.app_id,\n app_code: this.options.app_code,\n jsonattributes: 1,\n maxresults: this.options.maxResults\n });\n this.getJSON(this.options.serviceUrl + 'geocode.json', params, cb, context);\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n let prox = location.lat + ',' + location.lng;\n if (this.options.reverseGeocodeProxRadius) {\n prox += ',' + this.options.reverseGeocodeProxRadius;\n }\n const params = reverseParams(this.options, {\n prox,\n mode: 'retrieveAddresses',\n app_id: this.options.app_id,\n app_code: this.options.app_code,\n gen: 9,\n jsonattributes: 1,\n maxresults: this.options.maxResults\n });\n this.getJSON(this.options.serviceUrl + 'reversegeocode.json', params, cb, context);\n }\n\n getJSON(url: string, params: any, cb: GeocodingCallback, context?: any) {\n getJSON(url, params, data => {\n const results: GeocodingResult[] = [];\n\n if (data.response.view && data.response.view.length) {\n for (let i = 0; i <= data.response.view[0].result.length - 1; i++) {\n const loc = data.response.view[0].result[i].location;\n const center = L.latLng(loc.displayPosition.latitude, loc.displayPosition.longitude);\n const bbox = L.latLngBounds(\n L.latLng(loc.mapView.topLeft.latitude, loc.mapView.topLeft.longitude),\n L.latLng(loc.mapView.bottomRight.latitude, loc.mapView.bottomRight.longitude)\n );\n results[i] = {\n name: loc.address.label,\n properties: loc.address,\n bbox: bbox,\n center: center\n };\n }\n }\n cb.call(context, results);\n });\n }\n}\n\n/**\n * Implementation of the new [HERE Geocoder API](https://developer.here.com/documentation/geocoding-search-api/api-reference-swagger.html)\n */\nexport class HEREv2 implements IGeocoder {\n options: HereOptions = {\n serviceUrl: 'https://geocode.search.hereapi.com/v1',\n apiKey: '',\n app_id: '',\n app_code: '',\n maxResults: 10\n };\n\n constructor(options?: Partial<HereOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n q: query,\n apiKey: this.options.apiKey,\n limit: this.options.maxResults\n });\n\n if (!params.at && !params.in) {\n throw Error(\n 'at / in parameters not found. Please define coordinates (at=latitude,longitude) or other (in) in your geocodingQueryParams.'\n );\n }\n\n this.getJSON(this.options.serviceUrl + '/discover', params, cb, context);\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n at: location.lat + ',' + location.lng,\n limit: this.options.reverseGeocodeProxRadius,\n apiKey: this.options.apiKey\n });\n this.getJSON(this.options.serviceUrl + '/revgeocode', params, cb, context);\n }\n\n getJSON(url: string, params: any, cb: GeocodingCallback, context?: any) {\n getJSON(url, params, data => {\n const results: GeocodingResult[] = [];\n\n if (data.items && data.items.length) {\n for (let i = 0; i <= data.items.length - 1; i++) {\n const item = data.items[i];\n const latLng = L.latLng(item.position.lat, item.position.lng);\n let bbox: L.LatLngBounds;\n if (item.mapView) {\n bbox = L.latLngBounds(\n L.latLng(item.mapView.south, item.mapView.west),\n L.latLng(item.mapView.north, item.mapView.east)\n );\n } else {\n // Using only position when not provided\n bbox = L.latLngBounds(\n L.latLng(item.position.lat, item.position.lng),\n L.latLng(item.position.lat, item.position.lng)\n );\n }\n results[i] = {\n name: item.address.label,\n properties: item.address,\n bbox: bbox,\n center: latLng\n };\n }\n }\n cb.call(context, results);\n });\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link HERE}\n * @param options the options\n */\nexport function here(options?: Partial<HereOptions>) {\n if (options.apiKey) {\n return new HEREv2(options);\n } else {\n return new HERE(options);\n }\n}\n","import * as L from 'leaflet';\nimport { IGeocoder, GeocodingCallback, GeocodingResult } from './api';\n\nexport interface LatLngOptions {\n /**\n * The next geocoder to use for non-supported queries\n */\n next?: IGeocoder;\n /**\n * The size in meters used for passing to `LatLng.toBounds`\n */\n sizeInMeters: number;\n}\n\n/**\n * Parses basic latitude/longitude strings such as `'50.06773 14.37742'`, `'N50.06773 W14.37742'`, `'S 50° 04.064 E 014° 22.645'`, or `'S 50° 4′ 03.828″, W 14° 22′ 38.712″'`\n * @param query the latitude/longitude string to parse\n * @returns the parsed latitude/longitude\n */\nexport function parseLatLng(query: string): L.LatLng | undefined {\n let match;\n // regex from https://github.com/openstreetmap/openstreetmap-website/blob/master/app/controllers/geocoder_controller.rb\n if ((match = query.match(/^([NS])\\s*(\\d{1,3}(?:\\.\\d*)?)\\W*([EW])\\s*(\\d{1,3}(?:\\.\\d*)?)$/))) {\n // [NSEW] decimal degrees\n return L.latLng(\n (/N/i.test(match[1]) ? 1 : -1) * +match[2],\n (/E/i.test(match[3]) ? 1 : -1) * +match[4]\n );\n } else if (\n (match = query.match(/^(\\d{1,3}(?:\\.\\d*)?)\\s*([NS])\\W*(\\d{1,3}(?:\\.\\d*)?)\\s*([EW])$/))\n ) {\n // decimal degrees [NSEW]\n return L.latLng(\n (/N/i.test(match[2]) ? 1 : -1) * +match[1],\n (/E/i.test(match[4]) ? 1 : -1) * +match[3]\n );\n } else if (\n (match = query.match(\n /^([NS])\\s*(\\d{1,3})°?\\s*(\\d{1,3}(?:\\.\\d*)?)?['′]?\\W*([EW])\\s*(\\d{1,3})°?\\s*(\\d{1,3}(?:\\.\\d*)?)?['′]?$/\n ))\n ) {\n // [NSEW] degrees, decimal minutes\n return L.latLng(\n (/N/i.test(match[1]) ? 1 : -1) * (+match[2] + +match[3] / 60),\n (/E/i.test(match[4]) ? 1 : -1) * (+match[5] + +match[6] / 60)\n );\n } else if (\n (match = query.match(\n /^(\\d{1,3})°?\\s*(\\d{1,3}(?:\\.\\d*)?)?['′]?\\s*([NS])\\W*(\\d{1,3})°?\\s*(\\d{1,3}(?:\\.\\d*)?)?['′]?\\s*([EW])$/\n ))\n ) {\n // degrees, decimal minutes [NSEW]\n return L.latLng(\n (/N/i.test(match[3]) ? 1 : -1) * (+match[1] + +match[2] / 60),\n (/E/i.test(match[6]) ? 1 : -1) * (+match[4] + +match[5] / 60)\n );\n } else if (\n (match = query.match(\n /^([NS])\\s*(\\d{1,3})°?\\s*(\\d{1,2})['′]?\\s*(\\d{1,3}(?:\\.\\d*)?)?[\"″]?\\W*([EW])\\s*(\\d{1,3})°?\\s*(\\d{1,2})['′]?\\s*(\\d{1,3}(?:\\.\\d*)?)?[\"″]?$/\n ))\n ) {\n // [NSEW] degrees, minutes, decimal seconds\n return L.latLng(\n (/N/i.test(match[1]) ? 1 : -1) * (+match[2] + +match[3] / 60 + +match[4] / 3600),\n (/E/i.test(match[5]) ? 1 : -1) * (+match[6] + +match[7] / 60 + +match[8] / 3600)\n );\n } else if (\n (match = query.match(\n /^(\\d{1,3})°?\\s*(\\d{1,2})['′]?\\s*(\\d{1,3}(?:\\.\\d*)?)?[\"″]\\s*([NS])\\W*(\\d{1,3})°?\\s*(\\d{1,2})['′]?\\s*(\\d{1,3}(?:\\.\\d*)?)?[\"″]?\\s*([EW])$/\n ))\n ) {\n // degrees, minutes, decimal seconds [NSEW]\n return L.latLng(\n (/N/i.test(match[4]) ? 1 : -1) * (+match[1] + +match[2] / 60 + +match[3] / 3600),\n (/E/i.test(match[8]) ? 1 : -1) * (+match[5] + +match[6] / 60 + +match[7] / 3600)\n );\n } else if ((match = query.match(/^\\s*([+-]?\\d+(?:\\.\\d*)?)\\s*[\\s,]\\s*([+-]?\\d+(?:\\.\\d*)?)\\s*$/))) {\n return L.latLng(+match[1], +match[2]);\n }\n}\n\n/**\n * Parses basic latitude/longitude strings such as `'50.06773 14.37742'`, `'N50.06773 W14.37742'`, `'S 50° 04.064 E 014° 22.645'`, or `'S 50° 4′ 03.828″, W 14° 22′ 38.712″'`\n */\nexport class LatLng implements IGeocoder {\n options: LatLngOptions = {\n next: undefined,\n sizeInMeters: 10000\n };\n\n constructor(options?: Partial<LatLngOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any) {\n const center = parseLatLng(query);\n if (center) {\n const results: GeocodingResult[] = [\n {\n name: query,\n center: center,\n bbox: center.toBounds(this.options.sizeInMeters)\n }\n ];\n cb.call(context, results);\n } else if (this.options.next) {\n this.options.next.geocode(query, cb, context);\n }\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link LatLng}\n * @param options the options\n */\nexport function latLng(options?: Partial<LatLngOptions>) {\n return new LatLng(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface MapboxOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the [Mapbox Geocoding](https://www.mapbox.com/api-documentation/#geocoding)\n */\nexport class Mapbox implements IGeocoder {\n options: MapboxOptions = {\n serviceUrl: 'https://api.mapbox.com/geocoding/v5/mapbox.places/'\n };\n\n constructor(options?: Partial<MapboxOptions>) {\n L.Util.setOptions(this, options);\n }\n\n _getProperties(loc) {\n const properties = {\n text: loc.text,\n address: loc.address\n };\n\n for (let j = 0; j < (loc.context || []).length; j++) {\n const id = loc.context[j].id.split('.')[0];\n properties[id] = loc.context[j].text;\n\n // Get country code when available\n if (loc.context[j].short_code) {\n properties['countryShortCode'] = loc.context[j].short_code;\n }\n }\n return properties;\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params: any = geocodingParams(this.options, {\n access_token: this.options.apiKey\n });\n if (\n params.proximity !== undefined &&\n params.proximity.lat !== undefined &&\n params.proximity.lng !== undefined\n ) {\n params.proximity = params.proximity.lng + ',' + params.proximity.lat;\n }\n getJSON(this.options.serviceUrl + encodeURIComponent(query) + '.json', params, data => {\n const results: GeocodingResult[] = [];\n if (data.features && data.features.length) {\n for (let i = 0; i <= data.features.length - 1; i++) {\n const loc = data.features[i];\n const center = L.latLng(loc.center.reverse());\n let bbox: L.LatLngBounds;\n if (loc.bbox) {\n bbox = L.latLngBounds(\n L.latLng(loc.bbox.slice(0, 2).reverse()),\n L.latLng(loc.bbox.slice(2, 4).reverse())\n );\n } else {\n bbox = L.latLngBounds(center, center);\n }\n\n results[i] = {\n name: loc.place_name,\n bbox: bbox,\n center: center,\n properties: this._getProperties(loc)\n };\n }\n }\n\n cb.call(context, results);\n });\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n return this.geocode(query, cb, context);\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const url = this.options.serviceUrl + location.lng + ',' + location.lat + '.json';\n const param = reverseParams(this.options, {\n access_token: this.options.apiKey\n });\n getJSON(url, param, data => {\n const results: GeocodingResult[] = [];\n if (data.features && data.features.length) {\n for (let i = 0; i <= data.features.length - 1; i++) {\n const loc = data.features[i];\n const center = L.latLng(loc.center.reverse());\n let bbox: L.LatLngBounds;\n if (loc.bbox) {\n bbox = L.latLngBounds(\n L.latLng(loc.bbox.slice(0, 2).reverse()),\n L.latLng(loc.bbox.slice(2, 4).reverse())\n );\n } else {\n bbox = L.latLngBounds(center, center);\n }\n results[i] = {\n name: loc.place_name,\n bbox: bbox,\n center: center,\n properties: this._getProperties(loc)\n };\n }\n }\n\n cb.call(context, results);\n });\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Mapbox}\n * @param options the options\n */\nexport function mapbox(options?: Partial<MapboxOptions>) {\n return new Mapbox(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface MapQuestOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the [MapQuest Geocoding API](http://developer.mapquest.com/web/products/dev-services/geocoding-ws)\n */\nexport class MapQuest implements IGeocoder {\n options: MapQuestOptions = {\n serviceUrl: 'https://www.mapquestapi.com/geocoding/v1'\n };\n\n constructor(options?: Partial<MapQuestOptions>) {\n L.Util.setOptions(this, options);\n // MapQuest seems to provide URI encoded API keys,\n // so to avoid encoding them twice, we decode them here\n this.options.apiKey = decodeURIComponent(this.options.apiKey);\n }\n\n _formatName(...parts: string[]) {\n return parts.filter(s => !!s).join(', ');\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n key: this.options.apiKey,\n location: query,\n limit: 5,\n outFormat: 'json'\n });\n getJSON(\n this.options.serviceUrl + '/address',\n params,\n L.Util.bind(function(data) {\n const results: GeocodingResult[] = [];\n if (data.results && data.results[0].locations) {\n for (let i = data.results[0].locations.length - 1; i >= 0; i--) {\n const loc = data.results[0].locations[i];\n const center = L.latLng(loc.latLng);\n results[i] = {\n name: this._formatName(loc.street, loc.adminArea4, loc.adminArea3, loc.adminArea1),\n bbox: L.latLngBounds(center, center),\n center: center\n };\n }\n }\n\n cb.call(context, results);\n }, this)\n );\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n key: this.options.apiKey,\n location: location.lat + ',' + location.lng,\n outputFormat: 'json'\n });\n getJSON(\n this.options.serviceUrl + '/reverse',\n params,\n L.Util.bind(function(data) {\n const results: GeocodingResult[] = [];\n if (data.results && data.results[0].locations) {\n for (let i = data.results[0].locations.length - 1; i >= 0; i--) {\n const loc = data.results[0].locations[i];\n const center = L.latLng(loc.latLng);\n results[i] = {\n name: this._formatName(loc.street, loc.adminArea4, loc.adminArea3, loc.adminArea1),\n bbox: L.latLngBounds(center, center),\n center: center\n };\n }\n }\n\n cb.call(context, results);\n }, this)\n );\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link MapQuest}\n * @param options the options\n */\nexport function mapQuest(options?: Partial<MapQuestOptions>) {\n return new MapQuest(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface NeutrinoOptions extends GeocoderOptions {\n userId: string;\n}\n\n/**\n * Implementation of the [Neutrino API](https://www.neutrinoapi.com/api/geocode-address/)\n */\nexport class Neutrino implements IGeocoder {\n options: NeutrinoOptions = {\n userId: undefined,\n apiKey: undefined,\n serviceUrl: 'https://neutrinoapi.com/'\n };\n\n constructor(options?: Partial<NeutrinoOptions>) {\n L.Util.setOptions(this, options);\n }\n\n // https://www.neutrinoapi.com/api/geocode-address/\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n apiKey: this.options.apiKey,\n userId: this.options.userId,\n //get three words and make a dot based string\n address: query.split(/\\s+/).join('.')\n });\n getJSON(this.options.serviceUrl + 'geocode-address', params, data => {\n const results: GeocodingResult[] = [];\n if (data.locations) {\n data.geometry = data.locations[0];\n const center = L.latLng(data.geometry['latitude'], data.geometry['longitude']);\n const bbox = L.latLngBounds(center, center);\n results[0] = {\n name: data.geometry.address,\n bbox: bbox,\n center: center\n };\n }\n\n cb.call(context, results);\n });\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n return this.geocode(query, cb, context);\n }\n\n // https://www.neutrinoapi.com/api/geocode-reverse/\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n apiKey: this.options.apiKey,\n userId: this.options.userId,\n latitude: location.lat,\n longitude: location.lng\n });\n getJSON(this.options.serviceUrl + 'geocode-reverse', params, data => {\n const results: GeocodingResult[] = [];\n if (data.status.status == 200 && data.found) {\n const center = L.latLng(location.lat, location.lng);\n const bbox = L.latLngBounds(center, center);\n results[0] = {\n name: data.address,\n bbox: bbox,\n center: center\n };\n }\n cb.call(context, results);\n });\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Neutrino}\n * @param options the options\n */\nexport function neutrino(options?: Partial<NeutrinoOptions>) {\n return new Neutrino(options);\n}\n","import * as L from 'leaflet';\nimport { template, getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface NominatimResult {\n place_id: number;\n licence: string;\n osm_type: string;\n osm_id: number;\n boundingbox: string[];\n lat: string;\n lon: string;\n display_name: string;\n class: string;\n type: string;\n importance: number;\n icon?: string;\n address: NominatimAddress;\n}\n\nexport interface NominatimAddress {\n building?: string;\n city_district?: string;\n city?: string;\n country_code?: string;\n country?: string;\n county?: string;\n hamlet?: string;\n house_number?: string;\n neighbourhood?: string;\n postcode?: string;\n road?: string;\n state_district?: string;\n state?: string;\n suburb?: string;\n village?: string;\n}\n\nexport interface NominatimOptions extends GeocoderOptions {\n /**\n * Additional URL parameters (strings) that will be added to geocoding requests; can be used to restrict results to a specific country for example, by providing the [`countrycodes`](https://wiki.openstreetmap.org/wiki/Nominatim#Parameters) parameter to Nominatim\n */\n geocodingQueryParams?: Record<string, unknown>;\n /**\n * A function that takes an GeocodingResult as argument and returns an HTML formatted string that represents the result. Default function breaks up address in parts from most to least specific, in attempt to increase readability compared to Nominatim's naming\n */\n htmlTemplate: (r: NominatimResult) => string;\n}\n\n/**\n * Implementation of the [Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim) geocoder.\n *\n * This is the default geocoding service used by the control, unless otherwise specified in the options.\n *\n * Unless using your own Nominatim installation, please refer to the [Nominatim usage policy](https://operations.osmfoundation.org/policies/nominatim/).\n */\nexport class Nominatim implements IGeocoder {\n options: NominatimOptions = {\n serviceUrl: 'https://nominatim.openstreetmap.org/',\n htmlTemplate: function(r: NominatimResult) {\n const address = r.address;\n let className: string;\n const parts = [];\n if (address.road || address.building) {\n parts.push('{building} {road} {house_number}');\n }\n\n if (address.city || (address as any).town || address.village || address.hamlet) {\n className = parts.length > 0 ? 'leaflet-control-geocoder-address-detail' : '';\n parts.push(\n '<span class=\"' + className + '\">{postcode} {city} {town} {village} {hamlet}</span>'\n );\n }\n\n if (address.state || address.country) {\n className = parts.length > 0 ? 'leaflet-control-geocoder-address-context' : '';\n parts.push('<span class=\"' + className + '\">{state} {country}</span>');\n }\n\n return template(parts.join('<br/>'), address);\n }\n };\n\n constructor(options?: Partial<NominatimOptions>) {\n L.Util.setOptions(this, options || {});\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any) {\n const params = geocodingParams(this.options, {\n q: query,\n limit: 5,\n format: 'json',\n addressdetails: 1\n });\n getJSON(this.options.serviceUrl + 'search', params, data => {\n const results: GeocodingResult[] = [];\n for (let i = data.length - 1; i >= 0; i--) {\n const bbox = data[i].boundingbox;\n for (let j = 0; j < 4; j++) bbox[j] = +bbox[j];\n results[i] = {\n icon: data[i].icon,\n name: data[i].display_name,\n html: this.options.htmlTemplate ? this.options.htmlTemplate(data[i]) : undefined,\n bbox: L.latLngBounds([bbox[0], bbox[2]], [bbox[1], bbox[3]]),\n center: L.latLng(data[i].lat, data[i].lon),\n properties: data[i]\n };\n }\n cb.call(context, results);\n });\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any) {\n const params = reverseParams(this.options, {\n lat: location.lat,\n lon: location.lng,\n zoom: Math.round(Math.log(scale / 256) / Math.log(2)),\n addressdetails: 1,\n format: 'json'\n });\n getJSON(this.options.serviceUrl + 'reverse', params, data => {\n const result: GeocodingResult[] = [];\n if (data && data.lat && data.lon) {\n const center = L.latLng(data.lat, data.lon);\n const bbox = L.latLngBounds(center, center);\n result.push({\n name: data.display_name,\n html: this.options.htmlTemplate ? this.options.htmlTemplate(data) : undefined,\n center: center,\n bbox: bbox,\n properties: data\n });\n }\n cb.call(context, result);\n });\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Nominatim}\n * @param options the options\n */\nexport function nominatim(options?: Partial<NominatimOptions>) {\n return new Nominatim(options);\n}\n","import * as L from 'leaflet';\nimport { IGeocoder, GeocodingCallback, GeocodingResult } from './api';\n\nexport interface OpenLocationCodeOptions {\n OpenLocationCode: OpenLocationCodeApi;\n codeLength?: number;\n}\n\nexport interface OpenLocationCodeApi {\n encode(latitude: number, longitude: number, codeLength?: number): string;\n decode(code: string): CodeArea;\n}\n\nexport interface CodeArea {\n latitudeLo: number;\n longitudeLo: number;\n latitudeHi: number;\n longitudeHi: number;\n latitudeCenter: number;\n longitudeCenter: number;\n codeLength: number;\n}\n\n/**\n * Implementation of the [Plus codes](https://plus.codes/) (formerly OpenLocationCode) (requires [open-location-code](https://www.npmjs.com/package/open-location-code))\n */\nexport class OpenLocationCode implements IGeocoder {\n options: OpenLocationCodeOptions;\n constructor(options?: Partial<OpenLocationCodeOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any) {\n try {\n const decoded = this.options.OpenLocationCode.decode(query);\n const result: GeocodingResult = {\n name: query,\n center: L.latLng(decoded.latitudeCenter, decoded.longitudeCenter),\n bbox: L.latLngBounds(\n L.latLng(decoded.latitudeLo, decoded.longitudeLo),\n L.latLng(decoded.latitudeHi, decoded.longitudeHi)\n )\n };\n cb.call(context, [result]);\n } catch (e) {\n console.warn(e); // eslint-disable-line no-console\n cb.call(context, []);\n }\n }\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any) {\n try {\n const code = this.options.OpenLocationCode.encode(\n location.lat,\n location.lng,\n this.options.codeLength\n );\n const result = {\n name: code,\n center: L.latLng(location.lat, location.lng),\n bbox: L.latLngBounds(\n L.latLng(location.lat, location.lng),\n L.latLng(location.lat, location.lng)\n )\n };\n cb.call(context, [result]);\n } catch (e) {\n console.warn(e); // eslint-disable-line no-console\n cb.call(context, []);\n }\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link OpenLocationCode}\n * @param options the options\n */\nexport function openLocationCode(options?: Partial<OpenLocationCodeOptions>) {\n return new OpenLocationCode(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface OpenCageOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the [OpenCage Data API](https://opencagedata.com/)\n */\nexport class OpenCage implements IGeocoder {\n options: OpenCageOptions = {\n serviceUrl: 'https://api.opencagedata.com/geocode/v1/json'\n };\n\n constructor(options?: Partial<OpenCageOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n key: this.options.apiKey,\n q: query\n });\n getJSON(this.options.serviceUrl, params, data => {\n const results: GeocodingResult[] = [];\n if (data.results && data.results.length) {\n for (let i = 0; i < data.results.length; i++) {\n const loc = data.results[i];\n const center = L.latLng(loc.geometry);\n let bbox: L.LatLngBounds;\n if (loc.annotations && loc.annotations.bounds) {\n bbox = L.latLngBounds(\n L.latLng(loc.annotations.bounds.northeast),\n L.latLng(loc.annotations.bounds.southwest)\n );\n } else {\n bbox = L.latLngBounds(center, center);\n }\n results.push({\n name: loc.formatted,\n bbox: bbox,\n center: center\n });\n }\n }\n cb.call(context, results);\n });\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n return this.geocode(query, cb, context);\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n key: this.options.apiKey,\n q: [location.lat, location.lng].join(',')\n });\n getJSON(this.options.serviceUrl, params, data => {\n const results: GeocodingResult[] = [];\n if (data.results && data.results.length) {\n for (let i = 0; i < data.results.length; i++) {\n const loc = data.results[i];\n const center = L.latLng(loc.geometry);\n let bbox: L.LatLngBounds;\n if (loc.annotations && loc.annotations.bounds) {\n bbox = L.latLngBounds(\n L.latLng(loc.annotations.bounds.northeast),\n L.latLng(loc.annotations.bounds.southwest)\n );\n } else {\n bbox = L.latLngBounds(center, center);\n }\n results.push({\n name: loc.formatted,\n bbox: bbox,\n center: center\n });\n }\n }\n cb.call(context, results);\n });\n }\n}\n\nexport function opencage(options?: Partial<OpenCageOptions>) {\n return new OpenCage(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface PeliasOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the [Pelias](https://pelias.io/), [geocode.earth](https://geocode.earth/) geocoder (formerly Mapzen Search)\n */\nexport class Pelias implements IGeocoder {\n options: PeliasOptions = {\n serviceUrl: 'https://api.geocode.earth/v1'\n };\n\n private _lastSuggest = 0;\n\n constructor(options?: Partial<PeliasOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n api_key: this.options.apiKey,\n text: query\n });\n getJSON(this.options.serviceUrl + '/search', params, data => {\n cb.call(context, this._parseResults(data, 'bbox'));\n });\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n api_key: this.options.apiKey,\n text: query\n });\n getJSON(this.options.serviceUrl + '/autocomplete', params, data => {\n if (data.geocoding.timestamp > this._lastSuggest) {\n this._lastSuggest = data.geocoding.timestamp;\n cb.call(context, this._parseResults(data, 'bbox'));\n }\n });\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n api_key: this.options.apiKey,\n 'point.lat': location.lat,\n 'point.lon': location.lng\n });\n getJSON(this.options.serviceUrl + '/reverse', params, data => {\n cb.call(context, this._parseResults(data, 'bounds'));\n });\n }\n\n _parseResults(data, bboxname) {\n const results: GeocodingResult[] = [];\n L.geoJSON(data, {\n pointToLayer: function(feature, latlng) {\n return L.circleMarker(latlng);\n },\n onEachFeature: function(feature, layer: any) {\n const result = {} as GeocodingResult;\n let bbox;\n let center;\n\n if (layer.getBounds) {\n bbox = layer.getBounds();\n center = bbox.getCenter();\n } else if (layer.feature.bbox) {\n center = layer.getLatLng();\n bbox = L.latLngBounds(\n L.GeoJSON.coordsToLatLng(layer.feature.bbox.slice(0, 2)),\n L.GeoJSON.coordsToLatLng(layer.feature.bbox.slice(2, 4))\n );\n } else {\n center = layer.getLatLng();\n bbox = L.latLngBounds(center, center);\n }\n\n result.name = layer.feature.properties.label;\n result.center = center;\n result[bboxname] = bbox;\n result.properties = layer.feature.properties;\n results.push(result);\n }\n });\n return results;\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Pelias}\n * @param options the options\n */\nexport function pelias(options?: Partial<PeliasOptions>) {\n return new Pelias(options);\n}\n\nexport const GeocodeEarth = Pelias;\nexport const geocodeEarth = pelias;\n\n/**\n * r.i.p.\n * @deprecated\n */\nexport const Mapzen = Pelias;\n/**\n * r.i.p.\n * @deprecated\n */\nexport const mapzen = pelias;\n\n/**\n * Implementation of the [Openrouteservice](https://openrouteservice.org/dev/#/api-docs/geocode) geocoder\n */\nexport class Openrouteservice extends Pelias {\n constructor(options?: Partial<PeliasOptions>) {\n super(\n L.Util.extend(\n {\n serviceUrl: 'https://api.openrouteservice.org/geocode'\n },\n options\n )\n );\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Openrouteservice}\n * @param options the options\n */\nexport function openrouteservice(options?: Partial<PeliasOptions>) {\n return new Openrouteservice(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface PhotonOptions extends GeocoderOptions {\n reverseUrl: string;\n nameProperties: string[];\n htmlTemplate?: (r: any) => string;\n}\n\n/**\n * Implementation of the [Photon](http://photon.komoot.de/) geocoder\n */\nexport class Photon implements IGeocoder {\n options: PhotonOptions = {\n serviceUrl: 'https://photon.komoot.io/api/',\n reverseUrl: 'https://photon.komoot.io/reverse/',\n nameProperties: ['name', 'street', 'suburb', 'hamlet', 'town', 'city', 'state', 'country']\n };\n\n constructor(options?: Partial<PhotonOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, { q: query });\n getJSON(\n this.options.serviceUrl,\n params,\n L.Util.bind(function(data) {\n cb.call(context, this._decodeFeatures(data));\n }, this)\n );\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n return this.geocode(query, cb, context);\n }\n\n reverse(latLng: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n lat: latLng.lat,\n lon: latLng.lng\n });\n getJSON(\n this.options.reverseUrl,\n params,\n L.Util.bind(function(data) {\n cb.call(context, this._decodeFeatures(data));\n }, this)\n );\n }\n\n _decodeFeatures(data: GeoJSON.FeatureCollection<GeoJSON.Point>) {\n const results: GeocodingResult[] = [];\n\n if (data && data.features) {\n for (let i = 0; i < data.features.length; i++) {\n const f = data.features[i];\n const c = f.geometry.coordinates;\n const center = L.latLng(c[1], c[0]);\n const extent = f.properties.extent;\n\n const bbox = extent\n ? L.latLngBounds([extent[1], extent[0]], [extent[3], extent[2]])\n : L.latLngBounds(center, center);\n\n results.push({\n name: this._decodeFeatureName(f),\n html: this.options.htmlTemplate ? this.options.htmlTemplate(f) : undefined,\n center: center,\n bbox: bbox,\n properties: f.properties\n });\n }\n }\n\n return results;\n }\n\n _decodeFeatureName(f: GeoJSON.Feature) {\n return (this.options.nameProperties || [])\n .map(p => {\n return f.properties[p];\n })\n .filter(v => {\n return !!v;\n })\n .join(', ');\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Photon}\n * @param options the options\n */\nexport function photon(options?: Partial<PhotonOptions>) {\n return new Photon(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface What3WordsOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the What3Words service\n */\nexport class What3Words implements IGeocoder {\n options: What3WordsOptions = {\n serviceUrl: 'https://api.what3words.com/v2/'\n };\n\n constructor(options: Partial<What3WordsOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n //get three words and make a dot based string\n getJSON(\n this.options.serviceUrl + 'forward',\n geocodingParams(this.options, {\n key: this.options.apiKey,\n addr: query.split(/\\s+/).join('.')\n }),\n data => {\n const results: GeocodingResult[] = [];\n if (data.geometry) {\n const latLng = L.latLng(data.geometry['lat'], data.geometry['lng']);\n const latLngBounds = L.latLngBounds(latLng, latLng);\n results[0] = {\n name: data.words,\n bbox: latLngBounds,\n center: latLng\n };\n }\n\n cb.call(context, results);\n }\n );\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n return this.geocode(query, cb, context);\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n getJSON(\n this.options.serviceUrl + 'reverse',\n reverseParams(this.options, {\n key: this.options.apiKey,\n coords: [location.lat, location.lng].join(',')\n }),\n data => {\n const results: GeocodingResult[] = [];\n if (data.status.status == 200) {\n const center = L.latLng(data.geometry['lat'], data.geometry['lng']);\n const bbox = L.latLngBounds(center, center);\n results[0] = {\n name: data.words,\n bbox: bbox,\n center: center\n };\n }\n cb.call(context, results);\n }\n );\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link What3Words}\n * @param options the options\n */\nexport function what3words(options: Partial<What3WordsOptions>) {\n return new What3Words(options);\n}\n","import * as L from 'leaflet';\nimport { Nominatim } from './geocoders/index';\nimport { IGeocoder, GeocodingResult } from './geocoders/api';\n\nexport interface GeocoderControlOptions extends L.ControlOptions {\n /**\n * Collapse control unless hovered/clicked\n */\n collapsed: boolean;\n /**\n * How to expand a collapsed control: `touch` or `click` or `hover`\n */\n expand: 'touch' | 'click' | 'hover';\n /**\n * Placeholder text for text input\n */\n placeholder: string;\n /**\n * Message when no result found / geocoding error occurs\n */\n errorMessage: string;\n /**\n * Accessibility label for the search icon used by screen readers\n */\n iconLabel: string;\n /**\n * Object to perform the actual geocoding queries\n */\n geocoder?: IGeocoder;\n /**\n * Immediately show the unique result without prompting for alternatives\n */\n showUniqueResult: boolean;\n /**\n * Show icons for geocoding results (if available); supported by Nominatim\n */\n showResultIcons: boolean;\n /**\n * Minimum number characters before suggest functionality is used (if available from geocoder)\n */\n suggestMinLength: number;\n /**\n * Number of milliseconds after typing stopped before suggest functionality is used (if available from geocoder)\n */\n suggestTimeout: number;\n /**\n * Initial query string for text input\n */\n query: string;\n /**\n * Minimum number of characters in search text before performing a query\n */\n queryMinLength: number;\n /**\n * Whether to mark a geocoding result on the map by default\n */\n defaultMarkGeocode: boolean;\n}\n\n/**\n * Event is fired when selecting a geocode result.\n * By default, the control will center the map on it and place a marker at its location.\n * To remove the control's default handler for marking a result, set {@link GeocoderControlOptions.defaultMarkGeocode} to `false`.\n */\nexport type MarkGeocodeEvent = { geocode: GeocodingResult };\nexport type MarkGeocodeEventHandlerFn = (event: MarkGeocodeEvent) => void;\n\n/**\n * Event is fired before invoking {@link IGeocoder.geocode} (or {@link IGeocoder.suggest}).\n * The event data contains the query string as `input`.\n */\nexport type StartGeocodeEvent = { input: string };\nexport type StartGeocodeEventHandlerFn = (event: StartGeocodeEvent) => void;\n\n/**\n * Event is fired before after receiving results from {@link IGeocoder.geocode} (or {@link IGeocoder.suggest}).\n * The event data contains the query string as `input` and the geocoding `results`.\n */\nexport type FinishGeocodeEvent = { input: string; results: GeocodingResult[] };\nexport type FinishGeocodeEventHandlerFn = (event: FinishGeocodeEvent) => void;\n\ndeclare module 'leaflet' {\n interface Evented {\n on(type: 'markgeocode', fn: MarkGeocodeEventHandlerFn, context?: any): this;\n on(type: 'startgeocode', fn: StartGeocodeEventHandlerFn, context?: any): this;\n on(type: 'startsuggest', fn: StartGeocodeEventHandlerFn, context?: any): this;\n on(type: 'finishsuggest', fn: FinishGeocodeEventHandlerFn, context?: any): this;\n on(type: 'finishgeocode', fn: FinishGeocodeEventHandlerFn, context?: any): this;\n }\n}\n\n/**\n * Leaflet mixins https://leafletjs.com/reference-1.7.1.html#class-includes\n * for TypeScript https://www.typescriptlang.org/docs/handbook/mixins.html\n * @internal\n */\nclass EventedControl {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n constructor(...args: any[]) {\n // empty\n }\n}\n\n/**\n * @internal\n */\ninterface EventedControl extends L.Control, L.Evented {}\nL.Util.extend(EventedControl.prototype, L.Control.prototype);\nL.Util.extend(EventedControl.prototype, L.Evented.prototype);\n\n/**\n * This is the geocoder control. It works like any other [Leaflet control](https://leafletjs.com/reference.html#control), and is added to the map.\n */\nexport class GeocoderControl extends EventedControl {\n options: GeocoderControlOptions = {\n showUniqueResult: true,\n showResultIcons: false,\n collapsed: true,\n expand: 'touch',\n position: 'topright',\n placeholder: 'Search...',\n errorMessage: 'Nothing found.',\n iconLabel: 'Initiate a new search',\n query: '',\n queryMinLength: 1,\n suggestMinLength: 3,\n suggestTimeout: 250,\n defaultMarkGeocode: true\n };\n\n private _alts: HTMLUListElement;\n private _container: HTMLDivElement;\n private _errorElement: HTMLDivElement;\n private _form: HTMLDivElement;\n private _geocodeMarker: L.Marker;\n private _input: HTMLInputElement;\n private _lastGeocode: string;\n private _map: L.Map;\n private _preventBlurCollapse: boolean;\n private _requestCount = 0;\n private _results: any;\n private _selection: any;\n private _suggestTimeout: any;\n\n /**\n * Instantiates a geocoder control (to be invoked using `new`)\n * @param options the options\n */\n constructor(options?: Partial<GeocoderControlOptions>) {\n super(options);\n L.Util.setOptions(this, options);\n if (!this.options.geocoder) {\n this.options.geocoder = new Nominatim();\n }\n }\n\n addThrobberClass() {\n L.DomUtil.addClass(this._container, 'leaflet-control-geocoder-throbber');\n }\n\n removeThrobberClass() {\n L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-throbber');\n }\n\n /**\n * Returns the container DOM element for the control and add listeners on relevant map events.\n * @param map the map instance\n * @see https://leafletjs.com/reference.html#control-onadd\n */\n onAdd(map: L.Map) {\n const className = 'leaflet-control-geocoder';\n const container = L.DomUtil.create('div', className + ' leaflet-bar') as HTMLDivElement;\n const icon = L.DomUtil.create('button', className + '-icon', container) as HTMLButtonElement;\n const form = (this._form = L.DomUtil.create(\n 'div',\n className + '-form',\n container\n ) as HTMLDivElement);\n\n this._map = map;\n this._container = container;\n\n icon.innerHTML = '&nbsp;';\n icon.type = 'button';\n icon.setAttribute('aria-label', this.options.iconLabel);\n\n const input = (this._input = L.DomUtil.create('input', '', form) as HTMLInputElement);\n input.type = 'text';\n input.value = this.options.query;\n input.placeholder = this.options.placeholder;\n L.DomEvent.disableClickPropagation(input);\n\n this._errorElement = L.DomUtil.create(\n 'div',\n className + '-form-no-error',\n container\n ) as HTMLDivElement;\n this._errorElement.innerHTML = this.options.errorMessage;\n\n this._alts = L.DomUtil.create(\n 'ul',\n className + '-alternatives leaflet-control-geocoder-alternatives-minimized',\n container\n ) as HTMLUListElement;\n L.DomEvent.disableClickPropagation(this._alts);\n\n L.DomEvent.addListener(input, 'keydown', this._keydown, this);\n if (this.options.geocoder.suggest) {\n L.DomEvent.addListener(input, 'input', this._change, this);\n }\n L.DomEvent.addListener(input, 'blur', () => {\n if (this.options.collapsed && !this._preventBlurCollapse) {\n this._collapse();\n }\n this._preventBlurCollapse = false;\n });\n\n if (this.options.collapsed) {\n if (this.options.expand === 'click') {\n L.DomEvent.addListener(container, 'click', (e: Event) => {\n if ((e as MouseEvent).button === 0 && (e as MouseEvent).detail !== 2) {\n this._toggle();\n }\n });\n } else if (this.options.expand === 'touch') {\n L.DomEvent.addListener(\n container,\n L.Browser.touch ? 'touchstart mousedown' : 'mousedown',\n (e: Event) => {\n this._toggle();\n e.preventDefault(); // mobile: clicking focuses the icon, so UI expands and immediately collapses\n e.stopPropagation();\n },\n this\n );\n } else {\n L.DomEvent.addListener(container, 'mouseover', this._expand, this);\n L.DomEvent.addListener(container, 'mouseout', this._collapse, this);\n this._map.on('movestart', this._collapse, this);\n }\n } else {\n this._expand();\n if (L.Browser.touch) {\n L.DomEvent.addListener(container, 'touchstart', () => this._geocode());\n } else {\n L.DomEvent.addListener(container, 'click', () => this._geocode());\n }\n }\n\n if (this.options.defaultMarkGeocode) {\n this.on('markgeocode', this.markGeocode, this);\n }\n\n this.on('startgeocode', this.addThrobberClass, this);\n this.on('finishgeocode', this.removeThrobberClass, this);\n this.on('startsuggest', this.addThrobberClass, this);\n this.on('finishsuggest', this.removeThrobberClass, this);\n\n L.DomEvent.disableClickPropagation(container);\n\n return container;\n }\n\n /**\n * Sets the query string on the text input\n * @param string the query string\n */\n setQuery(string: string): this {\n this._input.value = string;\n return this;\n }\n\n private _geocodeResult(results: GeocodingResult[], suggest: boolean) {\n if (!suggest && this.options.showUniqueResult && results.length === 1) {\n this._geocodeResultSelected(results[0]);\n } else if (results.length > 0) {\n this._alts.innerHTML = '';\n this._results = results;\n L.DomUtil.removeClass(this._alts, 'leaflet-control-geocoder-alternatives-minimized');\n L.DomUtil.addClass(this._container, 'leaflet-control-geocoder-options-open');\n for (let i = 0; i < results.length; i++) {\n this._alts.appendChild(this._createAlt(results[i], i));\n }\n } else {\n L.DomUtil.addClass(this._container, 'leaflet-control-geocoder-options-error');\n L.DomUtil.addClass(this._errorElement, 'leaflet-control-geocoder-error');\n }\n }\n\n /**\n * Marks a geocoding result on the map\n * @param result the geocoding result\n */\n markGeocode(event: MarkGeocodeEvent) {\n const result = event.geocode;\n\n this._map.fitBounds(result.bbox);\n\n if (this._geocodeMarker) {\n this._map.removeLayer(this._geocodeMarker);\n }\n\n this._geocodeMarker = new L.Marker(result.center)\n .bindPopup(result.html || result.name)\n .addTo(this._map)\n .openPopup();\n\n return this;\n }\n\n private _geocode(suggest?: boolean) {\n const value = this._input.value;\n if (!suggest && value.length < this.options.queryMinLength) {\n return;\n }\n\n const requestCount = ++this._requestCount;\n const cb = (results: GeocodingResult[]) => {\n if (requestCount === this._requestCount) {\n const event: FinishGeocodeEvent = { input: value, results };\n this.fire(suggest ? 'finishsuggest' : 'finishgeocode', event);\n this._geocodeResult(results, suggest);\n }\n };\n\n this._lastGeocode = value;\n if (!suggest) {\n this._clearResults();\n }\n\n const event: StartGeocodeEvent = { input: value };\n this.fire(suggest ? 'startsuggest' : 'startgeocode', event);\n if (suggest) {\n this.options.geocoder.suggest(value, cb);\n } else {\n this.options.geocoder.geocode(value, cb);\n }\n }\n\n private _geocodeResultSelected(geocode: GeocodingResult) {\n const event: MarkGeocodeEvent = { geocode };\n this.fire('markgeocode', event);\n }\n\n private _toggle() {\n if (L.DomUtil.hasClass(this._container, 'leaflet-control-geocoder-expanded')) {\n this._collapse();\n } else {\n this._expand();\n }\n }\n\n private _expand() {\n L.DomUtil.addClass(this._container, 'leaflet-control-geocoder-expanded');\n this._input.select();\n this.fire('expand');\n }\n\n private _collapse() {\n L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-expanded');\n L.DomUtil.addClass(this._alts, 'leaflet-control-geocoder-alternatives-minimized');\n L.DomUtil.removeClass(this._errorElement, 'leaflet-control-geocoder-error');\n L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-options-open');\n L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-options-error');\n this._input.blur(); // mobile: keyboard shouldn't stay expanded\n this.fire('collapse');\n }\n\n private _clearResults() {\n L.DomUtil.addClass(this._alts, 'leaflet-control-geocoder-alternatives-minimized');\n this._selection = null;\n L.DomUtil.removeClass(this._errorElement, 'leaflet-control-geocoder-error');\n L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-options-open');\n L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-options-error');\n }\n\n private _createAlt(result: GeocodingResult, index: number) {\n const li = L.DomUtil.create('li', ''),\n a = L.DomUtil.create('a', '', li),\n icon =\n this.options.showResultIcons && result.icon\n ? (L.DomUtil.create('img', '', a) as HTMLImageElement)\n : null,\n text = result.html ? undefined : document.createTextNode(result.name),\n mouseDownHandler = (e: Event) => {\n // In some browsers, a click will fire on the map if the control is\n // collapsed directly after mousedown. To work around this, we\n // wait until the click is completed, and _then_ collapse the\n // control. Messy, but this is the workaround I could come up with\n // for #142.\n this._preventBlurCollapse = true;\n L.DomEvent.stop(e);\n this._geocodeResultSelected(result);\n L.DomEvent.on(li, 'click touchend', () => {\n if (this.options.collapsed) {\n this._collapse();\n } else {\n this._clearResults();\n }\n });\n };\n\n if (icon) {\n icon.src = result.icon;\n }\n\n li.setAttribute('data-result-index', String(index));\n\n if (result.html) {\n a.innerHTML = a.innerHTML + result.html;\n } else if (text) {\n a.appendChild(text);\n }\n\n // Use mousedown and not click, since click will fire _after_ blur,\n // causing the control to have collapsed and removed the items\n // before the click can fire.\n L.DomEvent.addListener(li, 'mousedown touchstart', mouseDownHandler, this);\n\n return li;\n }\n\n private _keydown(e: KeyboardEvent) {\n const select = (dir: number) => {\n if (this._selection) {\n L.DomUtil.removeClass(this._selection, 'leaflet-control-geocoder-selected');\n this._selection = this._selection[dir > 0 ? 'nextSibling' : 'previousSibling'];\n }\n if (!this._selection) {\n this._selection = this._alts[dir > 0 ? 'firstChild' : 'lastChild'];\n }\n\n if (this._selection) {\n L.DomUtil.addClass(this._selection, 'leaflet-control-geocoder-selected');\n }\n };\n\n switch (e.keyCode) {\n // Escape\n case 27:\n if (this.options.collapsed) {\n this._collapse();\n } else {\n this._clearResults();\n }\n break;\n // Up\n case 38:\n select(-1);\n break;\n // Up\n case 40:\n select(1);\n break;\n // Enter\n case 13:\n if (this._selection) {\n const index = parseInt(this._selection.getAttribute('data-result-index'), 10);\n this._geocodeResultSelected(this._results[index]);\n this._clearResults();\n } else {\n this._geocode();\n }\n break;\n default:\n return;\n }\n\n L.DomEvent.preventDefault(e);\n }\n\n private _change() {\n const v = this._input.value;\n if (v !== this._lastGeocode) {\n clearTimeout(this._suggestTimeout);\n if (v.length >= this.options.suggestMinLength) {\n this._suggestTimeout = setTimeout(() => this._geocode(true), this.options.suggestTimeout);\n } else {\n this._clearResults();\n }\n }\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link GeocoderControl}\n * @param options the options\n */\nexport function geocoder(options?: Partial<GeocoderControlOptions>) {\n return new GeocoderControl(options);\n}\n","/* @preserve\n * Leaflet Control Geocoder\n * https://github.com/perliedman/leaflet-control-geocoder\n *\n * Copyright (c) 2012 sa3m (https://github.com/sa3m)\n * Copyright (c) 2018 Per Liedman\n * All rights reserved.\n */\nimport * as L from 'leaflet';\nimport { GeocoderControl as Geocoder, geocoder } from './control';\nimport * as geocoders from './geocoders/index';\n\nL.Util.extend(Geocoder, geocoders);\nexport default Geocoder;\nexport { Geocoder, geocoder, geocoders };\n\nL.Util.extend(L.Control, {\n Geocoder: Geocoder,\n geocoder: geocoder\n});\n"],"names":["geocodingParams","options","params","L","Util","extend","geocodingQueryParams","reverseParams","reverseQueryParams","lastCallbackId","badChars","possible","escape","&","<",">","\"","'","`","escapeChar","chr","jsonp","url","callback","context","jsonpParam","callbackId","window","bind","script","document","createElement","type","src","getParamString","id","getElementsByTagName","appendChild","getJSON","xmlHttp","XMLHttpRequest","onreadystatechange","readyState","message","status","response","JSON","parse","e","open","responseType","setRequestHeader","send","obj","existingUrl","uppercase","i","key","encodeURIComponent","toUpperCase","value","Array","isArray","j","length","push","String","indexOf","join","ArcGis","this","serviceUrl","apiKey","setOptions","geocode","query","cb","token","SingleLine","outFields","forStorage","maxLocations","f","data","results","candidates","loc","latLng","location","y","x","latLngBounds","extent","ymax","xmax","ymin","xmin","name","address","bbox","center","call","suggest","reverse","scale","lng","lat","distance","result","error","Match_addr","Bing","resourceSets","resources","resource","point","coordinates","Google","geometry","viewport","northeast","southwest","formatted_address","properties","address_components","latlng","HERE","app_id","app_code","maxResults","Error","searchtext","gen","jsonattributes","maxresults","prox","reverseGeocodeProxRadius","mode","view","displayPosition","latitude","longitude","mapView","topLeft","bottomRight","label","HEREv2","q","limit","at","items","item","position","south","west","north","east","parseLatLng","match","test","LatLng","next","undefined","sizeInMeters","toBounds","Mapbox","_getProperties","text","split","short_code","access_token","proximity","features","slice","place_name","_this","_this2","MapQuest","decodeURIComponent","_formatName","filter","s","outFormat","locations","street","adminArea4","adminArea3","adminArea1","outputFormat","Neutrino","userId","found","Nominatim","htmlTemplate","r","str","parts","road","building","city","town","village","hamlet","state","country","replace","string","format","addressdetails","boundingbox","icon","display_name","html","lon","zoom","Math","round","log","OpenLocationCode","decoded","decode","latitudeCenter","longitudeCenter","latitudeLo","longitudeLo","latitudeHi","longitudeHi","console","warn","encode","codeLength","OpenCage","annotations","bounds","formatted","Pelias","api_key","_parseResults","geocoding","timestamp","_lastSuggest","point.lat","point.lon","_this3","bboxname","geoJSON","pointToLayer","feature","circleMarker","onEachFeature","layer","getBounds","getCenter","getLatLng","GeoJSON","coordsToLatLng","pelias","GeocodeEarth","geocodeEarth","Mapzen","mapzen","Openrouteservice","Photon","reverseUrl","nameProperties","_decodeFeatures","c","_decodeFeatureName","map","p","v","What3Words","addr","words","coords","EventedControl","prototype","Control","Evented","GeocoderControl","showUniqueResult","showResultIcons","collapsed","expand","placeholder","errorMessage","iconLabel","queryMinLength","suggestMinLength","suggestTimeout","defaultMarkGeocode","geocoder","addThrobberClass","DomUtil","addClass","_container","removeThrobberClass","removeClass","onAdd","className","container","create","form","_form","_map","innerHTML","setAttribute","input","_input","DomEvent","disableClickPropagation","_errorElement","_alts","addListener","_keydown","_change","_preventBlurCollapse","_collapse","button","detail","_toggle","Browser","touch","preventDefault","stopPropagation","_expand","on","_geocode","markGeocode","setQuery","_geocodeResult","_geocodeResultSelected","_results","_createAlt","event","fitBounds","_geocodeMarker","removeLayer","Marker","bindPopup","addTo","openPopup","requestCount","_requestCount","fire","_lastGeocode","_clearResults","hasClass","select","blur","_selection","index","li","a","createTextNode","_this4","stop","dir","_this5","keyCode","parseInt","getAttribute","clearTimeout","_suggestTimeout","setTimeout","_this6","Geocoder","geocoders"],"mappings":"0aAuFgBA,EACdC,EACAC,GAEA,OAAOC,EAAEC,KAAKC,OAAOH,EAAQD,EAAQK,+BAMvBC,EACdN,EACAC,GAEA,OAAOC,EAAEC,KAAKC,OAAOH,EAAQD,EAAQO,oBCjGvC,IAAIC,EAAiB,EAOfC,EAAW,YAIXC,EAAW,WAIXC,EAAiC,CACrCC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,SACLC,IAAK,UAMP,SAASC,EAAWC,GAClB,OAAOR,EAAOQ,YA2BAC,EACdC,EACApB,EACAqB,EACAC,EACAC,GAEA,IAAMC,EAAa,eAAiBjB,IACpCP,EAAOuB,GAAc,YAAcC,EAClCC,OAAeD,GAAcvB,EAAEC,KAAKwB,KAAKL,EAAUC,GACpD,IAAMK,EAASC,SAASC,cAAc,UACtCF,EAAOG,KAAO,kBACdH,EAAOI,IAAMX,EAAMY,EAAehC,GAClC2B,EAAOM,GAAKT,EACZI,SAASM,qBAAqB,QAAQ,GAAGC,YAAYR,YAMvCS,EACdhB,EACApB,EACAqB,GAEA,IAAMgB,EAAU,IAAIC,eACpBD,EAAQE,mBAAqB,WAC3B,GAA2B,IAAvBF,EAAQG,WAAZ,CAGA,IAAIC,EACJ,GAAuB,MAAnBJ,EAAQK,QAAqC,MAAnBL,EAAQK,OACpCD,EAAU,WAC2B,iBAArBJ,EAAQM,SAExB,IACEF,EAAUG,KAAKC,MAAMR,EAAQM,UAC7B,MAAOG,GAEPL,EAAUJ,EAAQM,cAGpBF,EAAUJ,EAAQM,SAEpBtB,EAASoB,KAEXJ,EAAQU,KAAK,MAAO3B,EAAMY,EAAehC,IAAS,GAClDqC,EAAQW,aAAe,OACvBX,EAAQY,iBAAiB,SAAU,oBACnCZ,EAAQa,KAAK,eAqBClB,EACdmB,EACAC,EACAC,GAEA,IAAMrD,EAAS,GACf,IAAK,IAAMsD,KAAK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,aAAe,cAGpDC,EAAKR,YACP3V,EAAEkS,QAAQC,SAASgE,EAAKR,WAAY,sCAIxC,OAAQ9S,EAAEuT,SAER,QACMjS,KAAKrE,QAAQyR,UACfpN,KAAKuP,YAELvP,KAAKoR,gBAEP,MAEF,QACEE,GAAQ,GACR,MAEF,QACEA,EAAO,GACP,MAEF,QACE,GAAItR,KAAKwR,WAAY,CACnB,IAAMC,EAAQS,SAASlS,KAAKwR,WAAWW,aAAa,qBAAsB,IAC1EnS,KAAKqQ,uBAAuBrQ,KAAKsQ,SAASmB,IAC1CzR,KAAKoR,qBAELpR,KAAKiQ,WAEP,MACF,QACE,OAGJpU,EAAEkT,SAASc,eAAenR,MAGpB2Q,QAAA,sBACA7C,EAAIxM,KAAK8O,OAAOxP,MAClBkN,IAAMxM,KAAKmR,eACbiB,aAAapS,KAAKqS,iBACd7F,EAAE9M,QAAUM,KAAKrE,QAAQ+R,iBAC3B1N,KAAKqS,gBAAkBC,WAAW,kBAAMC,EAAKtC,UAAS,IAAOjQ,KAAKrE,QAAQgS,gBAE1E3N,KAAKoR,qBA7WwBvE,YAuXrBgB,EAASlS,GACvB,WAAWsR,EAAgBtR,YC7d3BG,KAAKC,OAAOyW,EAAUC,GAIxB5W,EAAEC,KAAKC,OAAOF,EAAEkR,QAAS,CACvByF,SAAUA,EACV3E,SAAUA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teipublisher/pb-components",
3
- "version": "2.15.3",
3
+ "version": "2.17.0",
4
4
  "description": "Collection of webcomponents underlying TEI Publisher",
5
5
  "repository": "https://github.com/eeditiones/tei-publisher-components.git",
6
6
  "main": "index.html",
@@ -80,6 +80,7 @@
80
80
  "i18next-xhr-backend": "^3.2.2",
81
81
  "js-cookie": "^2.2.1",
82
82
  "leaflet": "^1.9.4",
83
+ "leaflet-control-geocoder": "^2.4.0",
83
84
  "leaflet.markercluster": "^1.5.3",
84
85
  "lit-element": "^2.5.1",
85
86
  "lit-html": "^1.3.0",