1"use strict";(self.webpackChunkcariera_plugin=self.webpackChunkcariera_plugin||[]).push([[937],{676:function(t,e,o){o.r(e),o.d(e,{Geocoder:function(){return q},geocoder:function(){return A},geocoders:function(){return j}});var s=o(481);function n(t,e){return s.Util.extend(e,t.geocodingQueryParams)}function i(t,e){return s.Util.extend(e,t.reverseQueryParams)}let r=0;const a=/[&<>"'`]/g,l=/[&<>"'`]/,c={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};function d(t){return c[t]}function p(t,e,o,n,i){const a="_l_geocoder_"+r++;e[i||"callback"]=a,window[a]=s.Util.bind(o,n);const l=document.createElement("script");l.type="text/javascript",l.src=t+g(e),l.id=a,document.getElementsByTagName("head")[0].appendChild(l)}function h(t,e,o){const s=new XMLHttpRequest;s.onreadystatechange=function(){if(4!==s.readyState)return;let t;if(200!==s.status&&304!==s.status)t="";else if("string"==typeof s.response)try{t=JSON.parse(s.response)}catch(e){t=s.response}else t=s.response;o(t)},s.open("GET",t+g(e),!0),s.responseType="json",s.setRequestHeader("Accept","application/json"),s.send(null)}function u(t,e){return t.replace(/\{ *([\w_]+) *\}/g,((t,o)=>{let s=e[o];return void 0===s?s="":"function"==typeof s&&(s=s(e)),null==(n=s)?"":n?(n=""+n,l.test(n)?n.replace(a,d):n):n+"";var n}))}function g(t,e,o){const s=[];for(const e in t){const n=encodeURIComponent(o?e.toUpperCase():e),i=t[e];if(Array.isArray(i))for(let t=0;t<i.length;t++)s.push(n+"="+encodeURIComponent(i[t]));else s.push(n+"="+encodeURIComponent(String(i)))}return(e&&-1!==e.indexOf("?")?"&":"?")+s.join("&")}class m{constructor(t){this.options={serviceUrl:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",apiKey:""},s.Util.setOptions(this,t)}geocode(t,e,o){const i=n(this.options,{token:this.options.apiKey,SingleLine:t,outFields:"Addr_Type",forStorage:!1,maxLocations:10,f:"json"});h(this.options.serviceUrl+"/findAddressCandidates",i,(t=>{const n=[];if(t.candidates&&t.candidates.length)for(let e=0;e<=t.candidates.length-1;e++){const o=t.candidates[e],i=s.latLng(o.location.y,o.location.x),r=s.latLngBounds(s.latLng(o.extent.ymax,o.extent.xmax),s.latLng(o.extent.ymin,o.extent.xmin));n[e]={name:o.address,bbox:r,center:i}}e.call(o,n)}))}suggest(t,e,o){return this.geocode(t,e,o)}reverse(t,e,o,n){const r=i(this.options,{location:t.lng+","+t.lat,distance:100,f:"json"});h(this.options.serviceUrl+"/reverseGeocode",r,(t=>{const e=[];if(t&&!t.error){const o=s.latLng(t.location.y,t.location.x),n=s.latLngBounds(o,o);e.push({name:t.address.Match_addr,center:o,bbox:n})}o.call(n,e)}))}}class f{constructor(t){this.options={serviceUrl:"https://dev.virtualearth.net/REST/v1/Locations"},s.Util.setOptions(this,t)}geocode(t,e,o){const i=n(this.options,{query:t,key:this.options.apiKey});p(this.options.apiKey,i,(t=>{const n=[];if(t.resourceSets.length>0)for(let e=t.resourceSets[0].resources.length-1;e>=0;e--){const o=t.resourceSets[0].resources[e],i=o.bbox;n[e]={name:o.name,bbox:s.latLngBounds([i[0],i[1]],[i[2],i[3]]),center:s.latLng(o.point.coordinates)}}e.call(o,n)}),this,"jsonp")}reverse(t,e,o,n){const r=i(this.options,{key:this.options.apiKey});p(this.options.serviceUrl+t.lat+","+t.lng,r,(t=>{const e=[];for(let o=t.resourceSets[0].resources.length-1;o>=0;o--){const n=t.resourceSets[0].resources[o],i=n.bbox;e[o]={name:n.name,bbox:s.latLngBounds([i[0],i[1]],[i[2],i[3]]),center:s.latLng(n.point.coordinates)}}o.call(n,e)}),this,"jsonp")}}class v{constructor(t){this.options={serviceUrl:"https://maps.googleapis.com/maps/api/geocode/json"},s.Util.setOptions(this,t)}geocode(t,e,o){const i=n(this.options,{key:this.options.apiKey,address:t});h(this.options.serviceUrl,i,(t=>{const n=[];if(t.results&&t.results.length)for(let e=0;e<=t.results.length-1;e++){const o=t.results[e],i=s.latLng(o.geometry.location),r=s.latLngBounds(s.latLng(o.geometry.viewport.northeast),s.latLng(o.geometry.viewport.southwest));n[e]={name:o.formatted_address,bbox:r,center:i,properties:o.address_components}}e.call(o,n)}))}reverse(t,e,o,n){const r=i(this.options,{key:this.options.apiKey,latlng:t.lat+","+t.lng});h(this.options.serviceUrl,r,(t=>{const e=[];
1if(t.results&&t.results.length)for(let o=0;o<=t.results.length-1;o++){const n=t.results[o],i=s.latLng(n.geometry.location),r=s.latLngBounds(s.latLng(n.geometry.viewport.northeast),s.latLng(n.geometry.viewport.southwest));e[o]={name:n.formatted_address,bbox:r,center:i,properties:n.address_components}}o.call(n,e)}))}}class _{constructor(t){if(this.options={serviceUrl:"https://geocoder.api.here.com/6.2/",app_id:"",app_code:"",apiKey:"",maxResults:5},s.Util.setOptions(this,t),t.apiKey)throw Error("apiKey is not supported, use app_id/app_code instead!")}geocode(t,e,o){const s=n(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",s,e,o)}reverse(t,e,o,s){let n=t.lat+","+t.lng;this.options.reverseGeocodeProxRadius&&(n+=","+this.options.reverseGeocodeProxRadius);const r=i(this.options,{prox:n,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",r,o,s)}getJSON(t,e,o,n){h(t,e,(t=>{const e=[];if(t.response.view&&t.response.view.length)for(let o=0;o<=t.response.view[0].result.length-1;o++){const n=t.response.view[0].result[o].location,i=s.latLng(n.displayPosition.latitude,n.displayPosition.longitude),r=s.latLngBounds(s.latLng(n.mapView.topLeft.latitude,n.mapView.topLeft.longitude),s.latLng(n.mapView.bottomRight.latitude,n.mapView.bottomRight.longitude));e[o]={name:n.address.label,properties:n.address,bbox:r,center:i}}o.call(n,e)}))}}class b{constructor(t){this.options={serviceUrl:"https://geocode.search.hereapi.com/v1",apiKey:"",app_id:"",app_code:"",maxResults:10},s.Util.setOptions(this,t)}geocode(t,e,o){const s=n(this.options,{q:t,apiKey:this.options.apiKey,limit:this.options.maxResults});if(!s.at&&!s.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",s,e,o)}reverse(t,e,o,s){const n=i(this.options,{at:t.lat+","+t.lng,limit:this.options.reverseGeocodeProxRadius,apiKey:this.options.apiKey});this.getJSON(this.options.serviceUrl+"/revgeocode",n,o,s)}getJSON(t,e,o,n){h(t,e,(t=>{const e=[];if(t.items&&t.items.length)for(let o=0;o<=t.items.length-1;o++){const n=t.items[o],i=s.latLng(n.position.lat,n.position.lng);let r;r=n.mapView?s.latLngBounds(s.latLng(n.mapView.south,n.mapView.west),s.latLng(n.mapView.north,n.mapView.east)):s.latLngBounds(s.latLng(n.position.lat,n.position.lng),s.latLng(n.position.lat,n.position.lng)),e[o]={name:n.address.label,properties:n.address,bbox:r,center:i}}o.call(n,e)}))}}function L(t){let e;return(e=t.match(/^([NS])\s*(\d{1,3}(?:\.\d*)?)\W*([EW])\s*(\d{1,3}(?:\.\d*)?)$/))?s.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])$/))?s.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*)?)?['â²]?$/))?s.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])$/))?s.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*)?)?["â³]?$/))?s.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])$/))?s.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*$/))?s.latLng(+e[1],+e[2]):void 0}class y{constructor(t){this.options={next:void 0,sizeInMeters:1e4},s.Util.setOptions(this,t)}geocode(t,e,o){const s=L(t);if(s){const n=[{name:t,center:s,bbox:s.toBounds(this.options.sizeInMeters)}];e.call(o,n)}else this.options.next&&this.options.next.geocode(t,e,o)}}class x{constructor(t){this.options={serviceUrl:"https://api.mapbox.com/geocoding/v5/mapbox.places/"},s.Util.setOptions(this,t)}_getProperties(t){const e={text:t.text,address:t.address};for(let 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}geocode(t,e,o){const i=n(this.options,{access_token:this.options.apiKey});void 0!==i.proximity&&void 0!==i.proximity.lat&&void 0!==i.proximity.lng&&(i.proximity=i.proximity.lng+","+i.proximity.lat),h(this.options.serviceUrl+encodeURIComponent(t)+".json",i,(t=>{const n=[];if(t.features&&t.features.length)for(let e=0;e<=t.features.length-1;e++){const o=t.features[e],i=s.latLng(o.center.reverse());let r;r=o.bbox?s.latLngBounds(s.latLng(o.bbox.slice(0,2).reverse()),s.latLng(o.bbox.slice(2,4).reverse())):s.latLngBounds(i,i),n[e]={name:o.place_name,bbox:r,center:i,properties:this._getProperties(o)}}e.call(o,n)}))}suggest(t,e,o){return this.geocode(t,e,o)}reverse(t,e,o,n){h(this.options.serviceUrl+t.lng+","+t.lat+".json",i(this.options,{access_token:this.options.apiKey}),(t=>{const e=[];
1if(t.features&&t.features.length)for(let o=0;o<=t.features.length-1;o++){const n=t.features[o],i=s.latLng(n.center.reverse());let r;r=n.bbox?s.latLngBounds(s.latLng(n.bbox.slice(0,2).reverse()),s.latLng(n.bbox.slice(2,4).reverse())):s.latLngBounds(i,i),e[o]={name:n.place_name,bbox:r,center:i,properties:this._getProperties(n)}}o.call(n,e)}))}}class U{constructor(t){this.options={serviceUrl:"https://www.mapquestapi.com/geocoding/v1"},s.Util.setOptions(this,t),this.options.apiKey=decodeURIComponent(this.options.apiKey)}_formatName(...t){return t.filter((t=>!!t)).join(", ")}geocode(t,e,o){const i=n(this.options,{key:this.options.apiKey,location:t,limit:5,outFormat:"json"});h(this.options.serviceUrl+"/address",i,s.Util.bind((function(t){const n=[];if(t.results&&t.results[0].locations)for(let e=t.results[0].locations.length-1;e>=0;e--){const o=t.results[0].locations[e],i=s.latLng(o.latLng);n[e]={name:this._formatName(o.street,o.adminArea4,o.adminArea3,o.adminArea1),bbox:s.latLngBounds(i,i),center:i}}e.call(o,n)}),this))}reverse(t,e,o,n){const r=i(this.options,{key:this.options.apiKey,location:t.lat+","+t.lng,outputFormat:"json"});h(this.options.serviceUrl+"/reverse",r,s.Util.bind((function(t){const e=[];if(t.results&&t.results[0].locations)for(let o=t.results[0].locations.length-1;o>=0;o--){const n=t.results[0].locations[o],i=s.latLng(n.latLng);e[o]={name:this._formatName(n.street,n.adminArea4,n.adminArea3,n.adminArea1),bbox:s.latLngBounds(i,i),center:i}}o.call(n,e)}),this))}}class w{constructor(t){this.options={userId:void 0,apiKey:void 0,serviceUrl:"https://neutrinoapi.com/"},s.Util.setOptions(this,t)}geocode(t,e,o){const i=n(this.options,{apiKey:this.options.apiKey,userId:this.options.userId,address:t.split(/\s+/).join(".")});h(this.options.serviceUrl+"geocode-address",i,(t=>{const n=[];if(t.locations){t.geometry=t.locations[0];const e=s.latLng(t.geometry.latitude,t.geometry.longitude),o=s.latLngBounds(e,e);n[0]={name:t.geometry.address,bbox:o,center:e}}e.call(o,n)}))}suggest(t,e,o){return this.geocode(t,e,o)}reverse(t,e,o,n){const r=i(this.options,{apiKey:this.options.apiKey,userId:this.options.userId,latitude:t.lat,longitude:t.lng});h(this.options.serviceUrl+"geocode-reverse",r,(e=>{const i=[];if(200==e.status.status&&e.found){const o=s.latLng(t.lat,t.lng),n=s.latLngBounds(o,o);i[0]={name:e.address,bbox:n,center:o}}o.call(n,i)}))}}class C{constructor(t){this.options={serviceUrl:"https://nominatim.openstreetmap.org/",htmlTemplate:function(t){const e=t.address;let o;const s=[];return(e.road||e.building)&&s.push("{building} {road} {house_number}"),(e.city||e.town||e.village||e.hamlet)&&(o=s.length>0?"leaflet-control-geocoder-address-detail":"",s.push('<span class="'+o+'">{postcode} {city} {town} {village} {hamlet}</span>')),(e.state||e.country)&&(o=s.length>0?"leaflet-control-geocoder-address-context":"",s.push('<span class="'+o+'">{state} {country}</span>')),u(s.join("<br/>"),e)}},s.Util.setOptions(this,t||{})}geocode(t,e,o){const i=n(this.options,{q:t,limit:5,format:"json",addressdetails:1});h(this.options.serviceUrl+"search",i,(t=>{const n=[];for(let e=t.length-1;e>=0;e--){const o=t[e].boundingbox;for(let t=0;t<4;t++)o[t]=+o[t];n[e]={icon:t[e].icon,name:t[e].display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(t[e]):void 0,bbox:s.latLngBounds([o[0],o[2]],[o[1],o[3]]),center:s.latLng(t[e].lat,t[e].lon),properties:t[e]}}e.call(o,n)}))}reverse(t,e,o,n){const r=i(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",r,(t=>{const e=[];if(t&&t.lat&&t.lon){const o=s.latLng(t.lat,t.lon),n=s.latLngBounds(o,o);e.push({name:t.display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(t):void 0,center:o,bbox:n,properties:t})}o.call(n,e)}))}}class k{constructor(t){s.Util.setOptions(this,t)}geocode(t,e,o){try{const n=this.options.OpenLocationCode.decode(t),i={name:t,center:s.latLng(n.latitudeCenter,n.longitudeCenter),bbox:s.latLngBounds(s.latLng(n.latitudeLo,n.longitudeLo),s.latLng(n.latitudeHi,n.longitudeHi))};e.call(o,[i])}catch(t){console.warn(t),e.call(o,[])}}reverse(t,e,o,n){try{const e={name:this.options.OpenLocationCode.encode(t.lat,t.lng,this.options.codeLength),center:s.latLng(t.lat,t.lng),bbox:s.latLngBounds(s.latLng(t.lat,t.lng),s.latLng(t.lat,t.lng))};o.call(n,[e])}catch(t){console.warn(t),o.call(n,[])}}}class E{constructor(t){this.options={serviceUrl:"https://api.opencagedata.com/geocode/v1/json"},s.Util.setOptions(this,t)}geocode(t,e,o){const i=n(this.options,{key:this.options.apiKey,q:t});h(this.options.serviceUrl,i,(t=>{const n=[];if(t.results&&t.results.length)for(let e=0;e<t.results.length;e++){const o=t.results[e],i=s.latLng(o.geometry);let r;r=o.annotations&&o.annotations.bounds?s.latLngBounds(s.latLng(o.annotations.bounds.northeast),s.latLng(o.annotations.bounds.southwest)):s.latLngBounds(i,i),n.push({name:o.formatted,bbox:r,center:i})}e.call(o,n)}))}suggest(t,e,o){return this.geocode(t,e,o)}reverse(t,e,o,n){const r=i(this.options,{key:this.options.apiKey,q:[t.lat,t.lng].join(",")});h(this.options.serviceUrl,r,(t=>{const e=[];
1if(t.results&&t.results.length)for(let o=0;o<t.results.length;o++){const n=t.results[o],i=s.latLng(n.geometry);let r;r=n.annotations&&n.annotations.bounds?s.latLngBounds(s.latLng(n.annotations.bounds.northeast),s.latLng(n.annotations.bounds.southwest)):s.latLngBounds(i,i),e.push({name:n.formatted,bbox:r,center:i})}o.call(n,e)}))}}class D{constructor(t){this.options={serviceUrl:"https://api.geocode.earth/v1"},this._lastSuggest=0,s.Util.setOptions(this,t)}geocode(t,e,o){const s=n(this.options,{api_key:this.options.apiKey,text:t});h(this.options.serviceUrl+"/search",s,(t=>{e.call(o,this._parseResults(t,"bbox"))}))}suggest(t,e,o){const s=n(this.options,{api_key:this.options.apiKey,text:t});h(this.options.serviceUrl+"/autocomplete",s,(t=>{t.geocoding.timestamp>this._lastSuggest&&(this._lastSuggest=t.geocoding.timestamp,e.call(o,this._parseResults(t,"bbox")))}))}reverse(t,e,o,s){const n=i(this.options,{api_key:this.options.apiKey,"point.lat":t.lat,"point.lon":t.lng});h(this.options.serviceUrl+"/reverse",n,(t=>{o.call(s,this._parseResults(t,"bounds"))}))}_parseResults(t,e){const o=[];return s.geoJSON(t,{pointToLayer:function(t,e){return s.circleMarker(e)},onEachFeature:function(t,n){const i={};let r,a;n.getBounds?(r=n.getBounds(),a=r.getCenter()):n.feature.bbox?(a=n.getLatLng(),r=s.latLngBounds(s.GeoJSON.coordsToLatLng(n.feature.bbox.slice(0,2)),s.GeoJSON.coordsToLatLng(n.feature.bbox.slice(2,4)))):(a=n.getLatLng(),r=s.latLngBounds(a,a)),i.name=n.feature.properties.label,i.center=a,i[e]=r,i.properties=n.feature.properties,o.push(i)}}),o}}function B(t){return new D(t)}const R=D,S=B,K=D,T=B;class N extends D{constructor(t){super(s.Util.extend({serviceUrl:"https://api.openrouteservice.org/geocode"},t))}}class O{constructor(t){this.options={serviceUrl:"https://photon.komoot.io/api/",reverseUrl:"https://photon.komoot.io/reverse/",nameProperties:["name","street","suburb","hamlet","town","city","state","country"]},s.Util.setOptions(this,t)}geocode(t,e,o){const i=n(this.options,{q:t});h(this.options.serviceUrl,i,s.Util.bind((function(t){e.call(o,this._decodeFeatures(t))}),this))}suggest(t,e,o){return this.geocode(t,e,o)}reverse(t,e,o,n){const r=i(this.options,{lat:t.lat,lon:t.lng});h(this.options.reverseUrl,r,s.Util.bind((function(t){o.call(n,this._decodeFeatures(t))}),this))}_decodeFeatures(t){const e=[];if(t&&t.features)for(let o=0;o<t.features.length;o++){const n=t.features[o],i=n.geometry.coordinates,r=s.latLng(i[1],i[0]),a=n.properties.extent,l=a?s.latLngBounds([a[1],a[0]],[a[3],a[2]]):s.latLngBounds(r,r);e.push({name:this._decodeFeatureName(n),html:this.options.htmlTemplate?this.options.htmlTemplate(n):void 0,center:r,bbox:l,properties:n.properties})}return e}_decodeFeatureName(t){return(this.options.nameProperties||[]).map((e=>t.properties[e])).filter((t=>!!t)).join(", ")}}class M{constructor(t){this.options={serviceUrl:"https://api.what3words.com/v2/"},s.Util.setOptions(this,t)}geocode(t,e,o){h(this.options.serviceUrl+"forward",n(this.options,{key:this.options.apiKey,addr:t.split(/\s+/).join(".")}),(t=>{const n=[];if(t.geometry){const e=s.latLng(t.geometry.lat,t.geometry.lng),o=s.latLngBounds(e,e);n[0]={name:t.words,bbox:o,center:e}}e.call(o,n)}))}suggest(t,e,o){return this.geocode(t,e,o)}reverse(t,e,o,n){h(this.options.serviceUrl+"reverse",i(this.options,{key:this.options.apiKey,coords:[t.lat,t.lng].join(",")}),(t=>{const e=[];if(200==t.status.status){const o=s.latLng(t.geometry.lat,t.geometry.lng),n=s.latLngBounds(o,o);e[0]={name:t.words,bbox:n,center:o}}o.call(n,e)}))}}var j={__proto__:null,geocodingParams:n,reverseParams:i,ArcGis:m,arcgis:function(t){return new m(t)},Bing:f,bing:function(t){return new f(t)},Google:v,google:function(t){return new v(t)},HERE:_,HEREv2:b,here:function(t){return t.apiKey?new b(t):new _(t)},parseLatLng:L,LatLng:y,latLng:function(t){return new y(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:k,openLocationCode:function(t){return new k(t)},OpenCage:E,opencage:function(t){return new E(t)},Pelias:D,pelias:B,GeocodeEarth:R,geocodeEarth:S,Mapzen:K,mapzen:T,Openrouteservice:N,openrouteservice:function(t){return new N(t)},Photon:O,photon:function(t){return new O(t)},What3Words:M,what3words:function(t){return new M(t)}};class P{constructor(...t){}}s.Util.extend(P.prototype,s.Control.prototype),s.Util.extend(P.prototype,s.Evented.prototype);class q extends P{constructor(t){super(t),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},this._requestCount=0,s.Util.setOptions(this,t),this.options.geocoder||(this.options.geocoder=new C)}addThrobberClass(){s.DomUtil.addClass(this._container,"leaflet-control-geocoder-throbber")}removeThrobberClass(){s.DomUtil.removeClass(this._container,"leaflet-control-geocoder-throbber")}onAdd(t){const e="leaflet-control-geocoder",o=s.DomUtil.create("div",e+" leaflet-bar"),n=s.DomUtil.create("button",e+"-icon",o),i=this._form=s.DomUtil.create("div",e+"-form",o);this._map=t,this._container=o,n.innerHTML=" ",n.type="button",n.setAttribute("aria-label",this.options.iconLabel);const r=this._input=s.DomUtil.create("input","",i);return r.type="text",r.value=this.options.query,r.placeholder=this.options.placeholder,s.DomEvent.disableClickPropagation(r),this._errorElement=s.DomUtil.create("div",e+"-form-no-error",o),this._errorElement.innerHTML=this.options.errorMessage,this._alts=s.Dom
1Util.create("ul",e+"-alternatives leaflet-control-geocoder-alternatives-minimized",o),s.DomEvent.disableClickPropagation(this._alts),s.DomEvent.addListener(r,"keydown",this._keydown,this),this.options.geocoder.suggest&&s.DomEvent.addListener(r,"input",this._change,this),s.DomEvent.addListener(r,"blur",(()=>{this.options.collapsed&&!this._preventBlurCollapse&&this._collapse(),this._preventBlurCollapse=!1})),this.options.collapsed?"click"===this.options.expand?s.DomEvent.addListener(o,"click",(t=>{0===t.button&&2!==t.detail&&this._toggle()})):"touch"===this.options.expand?s.DomEvent.addListener(o,s.Browser.touch?"touchstart mousedown":"mousedown",(t=>{this._toggle(),t.preventDefault(),t.stopPropagation()}),this):(s.DomEvent.addListener(o,"mouseover",this._expand,this),s.DomEvent.addListener(o,"mouseout",this._collapse,this),this._map.on("movestart",this._collapse,this)):(this._expand(),s.Browser.touch?s.DomEvent.addListener(o,"touchstart",(()=>this._geocode())):s.DomEvent.addListener(o,"click",(()=>this._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),s.DomEvent.disableClickPropagation(o),o}setQuery(t){return this._input.value=t,this}_geocodeResult(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,s.DomUtil.removeClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),s.DomUtil.addClass(this._container,"leaflet-control-geocoder-options-open");for(let e=0;e<t.length;e++)this._alts.appendChild(this._createAlt(t[e],e))}else s.DomUtil.addClass(this._container,"leaflet-control-geocoder-options-error"),s.DomUtil.addClass(this._errorElement,"leaflet-control-geocoder-error")}markGeocode(t){const e=t.geocode;return this._map.fitBounds(e.bbox),this._geocodeMarker&&this._map.removeLayer(this._geocodeMarker),this._geocodeMarker=new s.Marker(e.center).bindPopup(e.html||e.name).addTo(this._map).openPopup(),this}_geocode(t){const e=this._input.value;if(!t&&e.length<this.options.queryMinLength)return;const o=++this._requestCount,s=s=>{if(o===this._requestCount){const o={input:e,results:s};this.fire(t?"finishsuggest":"finishgeocode",o),this._geocodeResult(s,t)}};this._lastGeocode=e,t||this._clearResults();const n={input:e};this.fire(t?"startsuggest":"startgeocode",n),t?this.options.geocoder.suggest(e,s):this.options.geocoder.geocode(e,s)}_geocodeResultSelected(t){const e={geocode:t};this.fire("markgeocode",e)}_toggle(){s.DomUtil.hasClass(this._container,"leaflet-control-geocoder-expanded")?this._collapse():this._expand()}_expand(){s.DomUtil.addClass(this._container,"leaflet-control-geocoder-expanded"),this._input.select(),this.fire("expand")}_collapse(){s.DomUtil.removeClass(this._container,"leaflet-control-geocoder-expanded"),s.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),s.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),s.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-open"),s.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-error"),this._input.blur(),this.fire("collapse")}_clearResults(){s.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),this._selection=null,s.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),s.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-open"),s.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-error")}_createAlt(t,e){const o=s.DomUtil.create("li",""),n=s.DomUtil.create("a","",o),i=this.options.showResultIcons&&t.icon?s.DomUtil.create("img","",n):null,r=t.html?void 0:document.createTextNode(t.name);return i&&(i.src=t.icon),o.setAttribute("data-result-index",String(e)),t.html?n.innerHTML=n.innerHTML+t.html:r&&n.appendChild(r),s.DomEvent.addListener(o,"mousedown touchstart",(e=>{this._preventBlurCollapse=!0,s.DomEvent.stop(e),this._geocodeResultSelected(t),s.DomEvent.on(o,"click touchend",(()=>{this.options.collapsed?this._collapse():this._clearResults()}))}),this),o}_keydown(t){const e=t=>{this._selection&&(s.DomUtil.removeClass(this._selection,"leaflet-control-geocoder-selected"),this._selection=this._selection[t>0?"nextSibling":"previousSibling"]),this._selection||(this._selection=this._alts[t>0?"firstChild":"lastChild"]),this._selection&&s.DomUtil.addClass(this._selection,"leaflet-control-geocoder-selected")};switch(t.keyCode){case 27:this.options.collapsed?this._collapse():this._clearResults();break;case 38:e(-1);break;case 40:e(1);break;case 13:if(this._selection){const t=parseInt(this._selection.getAttribute("data-result-index"),10);this._geocodeResultSelected(this._results[t]),this._clearResults()}else this._geocode();break;default:return}s.DomEvent.preventDefault(t)}_change(){const t=this._input.value;t!==this._lastGeocode&&(clearTimeout(this._suggestTimeout),t.length>=this.options.suggestMinLength?this._suggestTimeout=setTimeout((()=>this._geocode(!0)),this.options.suggestTimeout):this._clearResults())}}function A(t){return new q(t)} 2/* @preserve 3 * Leaflet Control Geocoder 4 * https://github.com/perliedman/leaflet-control-geocoder 5 * 6 * Copyright (c) 2012 sa3m (https://github.com/sa3m) 7 * Copyright (c) 2018 Per Liedman 8 * All rights reserved. 9 */s.Util.extend(q,j),s.Util.extend(s.Control,{Geocoder:q,geocoder:A}),e.default=q}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.