vendor: 18,820 bytes, line 1
1(self.dynamisWebpackJsonp=self.dynamisWebpackJsonp||[]).push([[2649],{4878:function(t,e,s){!function(t,e,s){"use strict";var i="3.1.5",o="https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/",r=s.Task.extend({path:"findAddressCandidates",params:{outSr:4326,forStorage:!1,outFields:"*",maxLocations:20},setters:{address:"address",neighborhood:"neighborhood",city:"city",subregion:"subregion",region:"region",postal:"postal",country:"country",text:"singleLine",category:"category",token:"token",apikey:"apikey",key:"magicKey",fields:"outFields",forStorage:"forStorage",maxLocations:"maxLocations",countries:"sourceCountry"},initialize:function(t){(t=t||{}).url=t.url||o,s.Task.prototype.initialize.call(this,t)},within:function(t){return t=e.latLngBounds(t),this.params.searchExtent=s.Util.boundsToExtent(t),this},nearby:function(t,s){var i=e.latLng(t);return this.params.location=i.lng+","+i.lat,s&&(this.params.distance=Math.min(Math.max(s,2e3),5e4)),this},run:function(t,e){return this.options.token&&(this.params.token=this.options.token),this.options.apikey&&(this.params.token=this.options.apikey),this.options.customParam&&(this.params[this.options.customParam]=this.params.singleLine,delete this.params.singleLine),this.request((function(s,i){var o=this._processGeocoderResponse,r=s?void 0:o(i);t.call(e,s,{results:r},i)}),this)},_processGeocoderResponse:function(t){for(var i=[],o=0;o<t.candidates.length;o++){var r=t.candidates[o];if(r.extent)var n=s.Util.extentToBounds(r.extent);i.push({text:r.address,bounds:n,score:r.score,latlng:e.latLng(r.location.y,r.location.x),properties:r.attributes})}return i}});function n(t){return new r(t)}var a=s.Task.extend({path:"reverseGeocode",params:{outSR:4326,returnIntersection:!1},setters:{distance:"distance",language:"langCode",intersection:"returnIntersection",apikey:"apikey"},initialize:function(t){(t=t||{}).url=t.url||o,s.Task.prototype.initialize.call(this,t)},latlng:function(t){var s=e.latLng(t);return this.params.location=s.lng+","+s.lat,this},run:function(t,s){return this.options.token&&(this.params.token=this.options.token),this.options.apikey&&(this.params.token=this.options.apikey),this.request((function(i,o){var r;r=i?void 0:{latlng:e.latLng(o.location.y,o.location.x),address:o.address},t.call(s,i,r,o)}),this)}});function l(t){return new a(t)}var u=s.Task.extend({path:"suggest",params:{},setters:{text:"text",category:"category",countries:"countryCode",maxSuggestions:"maxSuggestions"},initialize:function(t){(t=t||{}).url||(t.url=o,t.supportsSuggest=!0),s.Task.prototype.initialize.call(this,t)},within:function(t){var i=(t=e.latLngBounds(t)).getCenter(),o=t.getNorthWest();return this.params.location=i.lng+","+i.lat,this.params.distance=Math.min(Math.max(i.distanceTo(o),2e3),5e4),this.params.searchExtent=s.Util.boundsToExtent(t),this},nearby:function(t,s){var i=e.latLng(t);return this.params.location=i.lng+","+i.lat,s&&(this.params.distance=Math.min(Math.max(s,2e3),5e4)),this},run:function(t,e){if(this.options.supportsSuggest)return this.request((function(s,i){t.call(e,s,i,i)}),this);console.warn("this geocoding service does not support asking for suggestions")}});function h(t){return new u(t)}var d=s.Service.extend({initialize:function(t){(t=t||{}).apikey&&(t.token=t.apikey),t.url?(s.Service.prototype.initialize.call(this,t),this._confirmSuggestSupport()):(t.url=o,t.supportsSuggest=!0,s.Service.prototype.initialize.call(this,t))},geocode:function(){return n(this)},reverse:function(){return l(this)},suggest:function(){return h(this)},_confirmSuggestSupport:function(){this.metadata((function(t,e){t||(e.capabilities&&e.capabilities.indexOf("Suggest")>-1?this.options.supportsSuggest=!0:this.options.supportsSuggest=!1,this.options.customParam=e.singleLineAddressField.name)}),this)}});function c(t){return new d(t)}var p=e.Evented.extend({options:{zoomToResult:!0,useMapBounds:12,searchBounds:null},initialize:function(t,s){if(e.Util.setOptions(this,s),this._control=t,!s||!s.providers||!s.providers.length)throw new Error("You must specify at least one provider");this._providers=s.providers},_geocode:function(t,s,i){var o,r=0,n=[],a=e.Util.bind((function(e,s){r--,e||(s&&(n=n.concat(s)),r<=0&&(o=this._boundsFromResults(n),this.fire("results",{results:n,bounds:o,latlng:o?o.getCenter():void 0,text:t},!0),this.options.zoomToResult&&o&&this._control._map.fitBounds(o),this.fire("load")))}),this);if(s)r++,i.results(t,s,this._searchBounds(),a);else for(var l=0;l<this._providers.length;l++)r++,this._providers[l].results(t,s,this._searchBounds(),a)},_suggest:function(t){var s=this._providers.length,i=0,o=e.Util.bind((function(t,o){return e.Util.bind((function(e,r){if(s-=1,i+=r.length,e)return this._control._clearProviderSuggestions(o),void this._control._finalizeSuggestions(s,i);if(r.length)for(var n=0;n<r.length;n++)r[n].provider=o;else this._control._renderSuggestions(r);o._lastRender!==t&&this._control._clearProviderSuggestions(o),r.length&&this._control._input.value===t&&(o._lastRender=t,this._control._renderSuggestions(r)),this._control._finalizeSuggestions(s,i)}),this)}),this);this._pendingSuggestions=[];for(var r=0;r<this._providers.length;r++){var n=this._providers[r],a=n.suggestions(t,this._searchBounds(),o(t,n));this._pendingSuggestions.push(a)}},_searchBounds:function(){return null!==this.options.searchBounds?this.options.searchBounds:!1===this.options.useMapBounds?null:!0===this.options.useMapBounds||this.options.useMapBounds<=this._control._map.getZoom()?this._control._map.getBounds():null},_boundsFromResults:function(t){if(t.length){for(var s=e.latLngBounds([0,0],[0,0]),i=[],o=[],r=t.length-1;r>=0;r--){var n=t[r];o.push(n.latlng),n.bounds&&n.bounds.isValid()&&!n.bounds.equals(s)&&i.push(n.bounds)}for(var a=e.latLngBounds(o),l=0;l<i.length;l++)a.extend(i[l]);return a}},_getAttribution:function(){for(var t=[],e=this._providers,s=0;s<e.length;s++)e[s].options.attribution&&t.push(e[s].options.attribution);return t.join(", ")}});function g(t,e){return new p(t,e)}var f=d.extend({options:{label:"Places and Addresses",maxResults:5},suggestions:function(t,e,s){var i=this.suggest().text(t);return e&&i.within(e),this.options.nearby&&i.nearby(this.options.nearby),this.options.countries&&i.countries(this.options.countries),this.options.categories&&i.category(this.options.categories),i.maxSuggestions(this.options.maxResults),i.run((function(t,e,i){var o=[];if(!t)for(;i.suggestions.length&&o.length<=this.options.maxResults-1;){var r=i.suggestions.shift();r.isCollection||o.push({text:r.text,unformattedText:r.text,magicKey:r.magicKey})}s(t,o)}),this)},results:function(t,e,s,i){var o=this.geocode().text(t);return e&&o.key(e),o.maxLocations(this.options.maxResults),s&&o.within(s),this.options.forStorage&&o.forStorage(!0),this.options.nearby&&o.nearby(this.options.nearby),this.options.countries&&o.countries(this.options.countries),this.options.categories&&o.category(this.options.categories),o.run((function(t,e){i(t,e.results)}),this)}});function v(t){return new f(t)}var m=e.Control.extend({includes:e.Evented.prototype,options:{position:"topleft",collapseAfterResult:!0,expanded:!1,allowMultipleResults:!0,placeholder:"Search for places or addresses",title:"Location Search"},initialize:function(t){e.Util.setOptions(this,t),t&&t.providers&&t.providers.length||(t||(t={}),t.providers=[v()]),this._geosearchCore=g(this,t),this._geosearchCore._providers=t.providers,this._geosearchCore.addEventParent(this);for(var s=0;s<this._geosearchCore._providers.length;s++)this._geosearchCore._providers[s].addEventParent(this);this._geosearchCore._pendingSuggestions=[],e.Control.prototype.initialize.call(this,t)},_renderSuggestions:function(t){var s,i,o;t.length>0&&(this._suggestions.style.display="block");for(var r=[],n=0;n<t.length;n++){var a=t[n];if(!o&&this._geosearchCore._providers.length>1&&s!==a.provider.options.label&&((o=e.DomUtil.create("div","geocoder-control-header",a.provider._contentsElement)).textContent=a.provider.options.label,o.innerText=a.provider.options.label,s=a.provider.options.label),i||(i=e.DomUtil.create("ul","geocoder-control-list",a.provider._contentsElement)),-1===r.indexOf(a.text)){var l=e.DomUtil.create("li","geocoder-control-suggestion",i);l.innerHTML=a.text,l.provider=a.provider,l["data-magic-key"]=a.magicKey,l.unformattedText=a.unformattedText}else for(var u=0;u<i.childNodes.length;u++)i.childNodes[u].innerHTML===a.text&&(i.childNodes[u]["data-magic-key"]+=","+a.magicKey);r.push(a.text)}this.getPosition().indexOf("top")>-1&&(this._suggestions.style.maxHeight=this._map.getSize().y-this._suggestions.offsetTop-this._wrapper.offsetTop-10+"px"),this.getPosition().indexOf("bottom")>-1&&this._setSuggestionsBottomPosition()},_setSuggestionsBottomPosition:function(){this._suggestions.style.maxHeight=this._map.getSize().y-this._map._controlCorners[this.getPosition()].offsetHeight-this._wrapper.offsetHeight+"px",this._suggestions.style.top=-this._suggestions.offsetHeight-this._wrapper.offsetHeight+20+"px"},_boundsFromResults:function(t){if(t.length){for(var s=e.latLngBounds([0,0],[0,0]),i=[],o=[],r=t.length-1;r>=0;r--){var n=t[r];o.push(n.latlng),n.bounds&&n.bounds.isValid()&&!n.bounds.equals(s)&&i.push(n.bounds)}for(var a=e.latLngBounds(o),l=0;l<i.length;l++)a.extend(i[l]);return a}},clear:function(){this._clearAllSuggestions(),this.options.collapseAfterResult&&(this._input.value="",this._lastValue="",this._input.placeholder="",e.DomUtil.removeClass(this._wrapper,"geocoder-control-expanded")),!this._map.scrollWheelZoom.enabled()&&this._map.options.scrollWheelZoom&&this._map.scrollWheelZoom.enable()},_clearAllSuggestions:function(){this._suggestions.style.display="none";for(var t=0;t<this.options.providers.length;t++)this._clearProviderSuggestions(this.options.providers[t])},_clearProviderSuggestions:function(t){t._contentsElement.innerHTML=""},_finalizeSuggestions:function(t,s){t||(e.DomUtil.removeClass(this._input,"geocoder-control-loading"),this.getPosition().indexOf("bottom")>-1&&this._setSuggestionsBottomPosition(),s||this._clearAllSuggestions())},_setupClick:function(){e.DomUtil.addClass(this._wrapper,"geocoder-control-expanded"),this._input.focus()},disable:function(){this._input.disabled=!0,e.DomUtil.addClass(this._input,"geocoder-control-input-disabled"),e.DomEvent.removeListener(this._wrapper,"click",this._setupClick,this)},enable:function(){this._input.disabled=!1,e.DomUtil.removeClass(this._input,"geocoder-control-input-disabled"),e.DomEvent.addListener(this._wrapper,"click",this._setupClick,this)},getAttribution:function(){for(var t=[],e=0;e<this._providers.length;e++)this._providers[e].options.attribution&&t.push(this._providers[e].options.attribution);return t.join(", ")},geocodeSuggestion:function(t){var e=t.target||t.srcElement;e.classList.contains("geocoder-control-suggestions")||e.classList.contains("geocoder-control-header")||(e.classList.length<1&&(e=e.parentNode),this._geosearchCore._geocode(e.unformattedText,e["data-magic-key"],e.provider),this.clear())},onAdd:function(t){s.Util.setEsriAttribution(t),this._map=t,this._wrapper=e.DomUtil.create("div","geocoder-control"),this._input=e.DomUtil.create("input","geocoder-control-input leaflet-bar",this._wrapper),this._input.title=this.options.title,this.options.expanded&&(e.DomUtil.addClass(this._wrapper,"geocoder-control-expanded"),this._input.placeholder=this.options.placeholder),this._suggestions=e.DomUtil.create("div","geocoder-control-suggestions leaflet-bar",this._wrapper);for(var i=0;i<this.options.providers.length;i++)this.options.providers[i]._contentsElement=e.DomUtil.create("div",null,this._suggestions);var o=this._geosearchCore._getAttribution();return t.attributionControl&&t.attributionControl.addAttribution(o),e.DomEvent.addListener(this._input,"focus",(function(t){this._input.placeholder=this.options.placeholder,e.DomUtil.addClass(this._wrapper,"geocoder-control-expanded")}),this),e.DomEvent.addListener(this._wrapper,"click",this._setupClick,this),e.DomEvent.addListener(this._suggestions,"mousedown",this.geocodeSuggestion,this),e.DomEvent.addListener(this._input,"blur",(function(t){this.clear()}),this),e.DomEvent.addListener(this._input,"keydown",(function(t){var s=(t.target||t.srcElement).value;e.DomUtil.addClass(this._wrapper,"geocoder-control-expanded");for(var i,o=this._suggestions.querySelectorAll(".geocoder-control-suggestion"),r=this._suggestions.querySelectorAll(".geocoder-control-selected")[0],n=0;n<o.length;n++)if(o[n]===r){i=n;break}switch(t.keyCode){case 13:r?(this._input.value=r.innerText,this._geosearchCore._geocode(r.unformattedText,r["data-magic-key"],r.provider),this.clear()):this.options.allowMultipleResults&&s.length>=2?(this._geosearchCore._geocode(this._input.value,void 0),this.clear()):1===o.length?(e.DomUtil.addClass(o[0],"geocoder-control-selected"),this._geosearchCore._geocode(o[0].innerHTML,o[0]["data-magic-key"],o[0].provider)):(this.clear(),this._input.blur()),e.DomEvent.preventDefault(t);break;case 38:r&&e.DomUtil.removeClass(r,"geocoder-control-selected");var a=o[i-1];r&&a?e.DomUtil.addClass(a,"geocoder-control-selected"):e.DomUtil.addClass(o[o.length-1],"geocoder-control-selected"),e.DomEvent.preventDefault(t);break;case 40:r&&e.DomUtil.removeClass(r,"geocoder-control-selected");var l=o[i+1];r&&l?e.DomUtil.addClass(l,"geocoder-control-selected"):e.DomUtil.addClass(o[0],"geocoder-control-selected"),e.DomEvent.preventDefault(t);break;default:for(var u=0;u<this._geosearchCore._pendingSuggestions.length;u++){var h=this._geosearchCore._pendingSuggestions[u];h&&h.abort&&!h.id&&h.abort()}}}),this),e.DomEvent.addListener(this._input,"keyup",e.Util.throttle((function(t){var s=t.which||t.keyCode,i=(t.target||t.srcElement).value;if(i.length<2)return this._lastValue=this._input.value,this._clearAllSuggestions(),void e.DomUtil.removeClass(this._input,"geocoder-control-loading");27!==s?13!==s&&38!==s&&40!==s&&this._input.value!==this._lastValue&&(this._lastValue=this._input.value,e.DomUtil.addClass(this._input,"geocoder-control-loading"),this._geosearchCore._suggest(i)):this._clearAllSuggestions()}),50,this),this),e.DomEvent.disableClickPropagation(this._wrapper),e.DomEvent.addListener(this._suggestions,"mouseover",(function(e){t.scrollWheelZoom.enabled()&&t.options.scrollWheelZoom&&t.scrollWheelZoom.disable()})),e.DomEvent.addListener(this._suggestions,"mouseout",(function(e){!t.scrollWheelZoom.enabled()&&t.options.scrollWheelZoom&&t.scrollWheelZoom.enable()})),this._geosearchCore.on("load",(function(t){e.DomUtil.removeClass(this._input,"geocoder-control-loading"),this.clear(),this._input.blur()}),this),this._wrapper}});function _(t){return new m(t)}var y=s.FeatureLayerService.extend({options:{label:"Feature Layer",maxResults:5,bufferRadius:1e3,searchMode:"contain",formatSuggestion:function(t){return t.properties[this.options.searchFields[0]]}},initialize:function(t){t.apikey&&(t.token=t.apikey),s.FeatureLayerService.prototype.initialize.call(this,t),"string"==typeof this.options.searchFields&&(this.options.searchFields=[this.options.searchFields]),this._suggestionsQuery=this.query(),this._resultsQuery=this.query()},suggestions:function(t,e,s){var i=this._suggestionsQuery.where(this._buildQuery(t)).returnGeometry(!1);return e&&i.intersects(e),this.options.idField&&i.fields([this.options.idField].concat(this.options.searchFields)),i.run((function(t,e,i){if(t)s(t,[]);else{this.options.idField=i.objectIdFieldName;for(var o=[],r=e.features.length-1;r>=0;r--){var n=e.features[r];o.push({text:this.options.formatSuggestion.call(this,n),unformattedText:n.properties[this.options.searchFields[0]],magicKey:n.id})}s(t,o.slice(0,this.options.maxResults))}}),this)},results:function(t,s,i,o){var r=this._resultsQuery;return s?(delete r.params.where,r.featureIds([s])):r.where(this._buildQuery(t)),i&&r.within(i),r.run(e.Util.bind((function(t,e){for(var s=[],i=0;i<e.features.length;i++){var r=e.features[i];if(r){var n=this._featureBounds(r),a={latlng:n.getCenter(),bounds:n,text:this.options.formatSuggestion.call(this,r),properties:r.properties,geojson:r};s.push(a),delete this._resultsQuery.params.objectIds}}o(t,s)}),this))},orderBy:function(t,e){this._suggestionsQuery.orderBy(t,e)},_buildQuery:function(t){for(var e=[],s=this.options.searchFields.length-1;s>=0;s--){var i='upper("'+this.options.searchFields[s]+'")';if("contain"===this.options.searchMode)e.push(i+" LIKE upper('%"+t+"%')");else if("startWith"===this.options.searchMode)e.push(i+" LIKE upper('"+t+"%')");else if("endWith"===this.options.searchMode)e.push(i+" LIKE upper('%"+t+"')");else{if("strict"!==this.options.searchMode)throw new Error('L.esri.Geocoding.featureLayerProvider: Invalid parameter for "searchMode". Use one of "contain", "startWith", "endWith", or "strict"');e.push(i+" LIKE upper('"+t+"')")}}return this.options.where?this.options.where+" AND ("+e.join(" OR ")+")":e.join(" OR ")},_featureBounds:function(t){var s=e.geoJson(t);if("Point"===t.geometry.type){var i=s.getBounds().getCenter(),o=this.options.bufferRadius/40075017*360/Math.cos(180/Math.PI*i.lat),r=this.options.bufferRadius/40075017*360;return e.latLngBounds([i.lat-r,i.lng-o],[i.lat+r,i.lng+o])}return s.getBounds()}});function b(t){return new y(t)}var x=s.MapService.extend({options:{layers:[0],label:"Map Service",bufferRadius:1e3,maxResults:5,formatSuggestion:function(t){return t.properties[t.displayFieldName]+" <small>"+t.layerName+"</small>"}},initialize:function(t){t.apikey&&(t.token=t.apikey),s.MapService.prototype.initialize.call(this,t),this._getIdFields()},suggestions:function(t,e,s){return this.find().text(t).fields(this.options.searchFields).returnGeometry(!1).layers(this.options.layers).run((function(t,e,i){var o=[];if(!t){var r=Math.min(this.options.maxResults,e.features.length);i.results=i.results.reverse();for(var n=0;n<r;n++){var a=e.features[n],l=i.results[n],u=l.layerId,h=this._idFields[u];a.layerId=u,a.layerName=this._layerNames[u],a.displayFieldName=this._displayFields[u],h&&o.push({text:this.options.formatSuggestion.call(this,a),unformattedText:a.properties[a.displayFieldName],magicKey:l.attributes[h]+":"+u})}}s(t,o.reverse())}),this)},results:function(t,e,s,i){var o,r=[];if(e&&!e.includes(",")){var n=e.split(":")[0],a=e.split(":")[1];o=this.query().layer(a).featureIds(n)}else o=this.find().text(t).fields(this.options.searchFields).layers(this.options.layers);return o.run((function(t,e,s){if(!t){s.results&&(s.results=s.results.reverse());for(var o=0;o<e.features.length;o++){var n=e.features[o];if(a=a||s.results[o].layerId,n&&void 0!==a){var l=this._featureBounds(n);n.layerId=a,n.layerName=this._layerNames[a],n.displayFieldName=this._displayFields[a];var u={latlng:l.getCenter(),bounds:l,text:this.options.formatSuggestion.call(this,n),properties:n.properties,geojson:n};r.push(u)}}}i(t,r.reverse())}),this)}
1,_featureBounds:function(t){var s=e.geoJson(t);if("Point"===t.geometry.type){var i=s.getBounds().getCenter(),o=this.options.bufferRadius/40075017*360/Math.cos(180/Math.PI*i.lat),r=this.options.bufferRadius/40075017*360;return e.latLngBounds([i.lat-r,i.lng-o],[i.lat+r,i.lng+o])}return s.getBounds()},_layerMetadataCallback:function(t){return e.Util.bind((function(e,s){if(!e){this._displayFields[t]=s.displayField,this._layerNames[t]=s.name;for(var i=0;i<s.fields.length;i++){var o=s.fields[i];if("esriFieldTypeOID"===o.type){this._idFields[t]=o.name;break}}}}),this)},_getIdFields:function(){this._idFields={},this._displayFields={},this._layerNames={};for(var t=0;t<this.options.layers.length;t++){var e=this.options.layers[t];this.get(e,{},this._layerMetadataCallback(e))}}});function S(t){return new x(t)}var k=d.extend({options:{label:"Geocode Server",maxResults:5},suggestions:function(t,e,s){if(this.options.supportsSuggest){var i=this.suggest().text(t);return e&&i.within(e),i.run((function(t,e,i){var o=[];if(!t)for(;i.suggestions.length&&o.length<=this.options.maxResults-1;){var r=i.suggestions.shift();r.isCollection||o.push({text:r.text,unformattedText:r.text,magicKey:r.magicKey})}s(t,o)}),this)}return s(null,[]),!1},results:function(t,e,s,i){var o=this.geocode().text(t);return e&&o.key(e),o.maxLocations(this.options.maxResults),s&&o.within(s),o.run((function(t,e){i(t,e.results)}),this)}});function C(t){return new k(t)}t.ArcgisOnlineProvider=f,t.FeatureLayerProvider=y,t.Geocode=r,t.GeocodeService=d,t.GeocodeServiceProvider=k,t.Geosearch=m,t.GeosearchCore=p,t.MapServiceProvider=x,t.ReverseGeocode=a,t.Suggest=u,t.VERSION=i,t.WorldGeocodingServiceUrl=o,t.arcgisOnlineProvider=v,t.featureLayerProvider=b,t.geocode=n,t.geocodeService=c,t.geocodeServiceProvider=C,t.geosearch=_,t.geosearchCore=g,t.mapServiceProvider=S,t.reverseGeocode=l,t.suggest=h,Object.defineProperty(t,"__esModule",{value:!0})}(e,s(3481),s(8470))}}]);
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.