# HG changeset patch # User Thierry Florac # Date 1531410007 -7200 # Node ID 37970a21346362f21f240bd16c186e984a7a32c4 # Parent 829abfdd6d27e7e1605dad49c1c83fbe2f0e197e Added minified resources diff -r 829abfdd6d27 -r 37970a213463 src/pyams_gis/resources/js/leaflet-esri-2.0.8.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_gis/resources/js/leaflet-esri-2.0.8.min.js Thu Jul 12 17:40:07 2018 +0200 @@ -0,0 +1,1 @@ +(function(b,a){typeof exports==="object"&&typeof module!=="undefined"?a(exports,require("leaflet")):typeof define==="function"&&define.amd?define(["exports","leaflet"],a):(a((b.L=b.L||{},b.L.esri=b.L.esri||{}),b.L))}(this,function(O,S){var Y="default" in S?S["default"]:S;var s="2.0.8";var aJ=((window.XMLHttpRequest&&"withCredentials" in new window.XMLHttpRequest()));var a=document.documentElement.style.pointerEvents==="";var ag={cors:aJ,pointerEvents:a};var W={attributionWidthOffset:55};var o=0;function c(aP){var aN="";aP.f=aP.f||"json";for(var aK in aP){if(aP.hasOwnProperty(aK)){var aO=aP[aK];var aL=Object.prototype.toString.call(aO);var aM;if(aN.length){aN+="&"}if(aL==="[object Array]"){aM=(Object.prototype.toString.call(aO[0])==="[object Object]")?JSON.stringify(aO):aO.join(",")}else{if(aL==="[object Object]"){aM=JSON.stringify(aO)}else{if(aL==="[object Date]"){aM=aO.valueOf()}else{aM=aO}}}aN+=encodeURIComponent(aK)+"="+encodeURIComponent(aM)}}return aN}function y(aM,aL){var aK=new window.XMLHttpRequest();aK.onerror=function(aN){aK.onreadystatechange=S.Util.falseFn;aM.call(aL,{error:{code:500,message:"XMLHttpRequest error"}},null)};aK.onreadystatechange=function(){var aN;var aO;if(aK.readyState===4){try{aN=JSON.parse(aK.responseText)}catch(aP){aN=null;aO={code:500,message:"Could not parse response as JSON. This could also be caused by a CORS or XMLHttpRequest error."}}if(!aO&&aN.error){aO=aN.error;aN=null}aK.onerror=S.Util.falseFn;aM.call(aL,aO,aN)}};aK.ontimeout=function(){this.onerror()};return aK}function aA(aL,aN,aO,aM){var aK=y(aO,aM);aK.open("POST",aL);if(typeof aM!=="undefined"&&aM!==null){if(typeof aM.options!=="undefined"){aK.timeout=aM.options.timeout}}aK.setRequestHeader("Content-Type","application/x-www-form-urlencoded");aK.send(c(aN));return aK}function b(aL,aN,aO,aM){var aK=y(aO,aM);aK.open("GET",aL+"?"+c(aN),true);if(typeof aM!=="undefined"&&aM!==null){if(typeof aM.options!=="undefined"){aK.timeout=aM.options.timeout}}aK.send(null);return aK}function ah(aL,aP,aQ,aN){var aO=c(aP);var aK=y(aQ,aN);var aM=(aL+"?"+aO).length;if(aM<=2000&&ag.cors){aK.open("GET",aL+"?"+aO)}else{if(aM>2000&&ag.cors){aK.open("POST",aL);aK.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}}if(typeof aN!=="undefined"&&aN!==null){if(typeof aN.options!=="undefined"){aK.timeout=aN.options.timeout}}if(aM<=2000&&ag.cors){aK.send(null)}else{if(aM>2000&&ag.cors){aK.send(aO)}else{if(aM<=2000&&!ag.cors){return g(aL,aP,aQ,aN)}else{aF("a request to "+aL+" was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy http://esri.github.io/esri-leaflet/api-reference/request.html");return}}}return aK}function g(aL,aO,aP,aM){window._EsriLeafletCallbacks=window._EsriLeafletCallbacks||{};var aN="c"+o;aO.callback="window._EsriLeafletCallbacks."+aN;window._EsriLeafletCallbacks[aN]=function(aQ){if(window._EsriLeafletCallbacks[aN]!==true){var aS;var aR=Object.prototype.toString.call(aQ);if(!(aR==="[object Object]"||aR==="[object Array]")){aS={error:{code:500,message:"Expected array or object as JSONP response"}};aQ=null}if(!aS&&aQ.error){aS=aQ;aQ=null}aP.call(aM,aS,aQ);window._EsriLeafletCallbacks[aN]=true}};var aK=S.DomUtil.create("script",null,document.body);aK.type="text/javascript";aK.src=aL+"?"+c(aO);aK.id=aN;o++;return{id:aN,url:aK.src,abort:function(){window._EsriLeafletCallbacks._callback[aN]({code:0,message:"Request aborted."})}}}var al=((ag.cors)?b:g);al.CORS=b;al.JSONP=g;var G={request:ah,get:al,post:aA};function af(aL,aK){for(var aM=0;aM=0)}function u(aO,aN,aS,aR){var aL=(aR[0]-aS[0])*(aO[1]-aS[1])-(aR[1]-aS[1])*(aO[0]-aS[0]);var aQ=(aN[0]-aO[0])*(aO[1]-aS[1])-(aN[1]-aO[1])*(aO[0]-aS[0]);var aP=(aR[1]-aS[1])*(aN[0]-aO[0])-(aR[0]-aS[0])*(aN[1]-aO[1]);if(aP!==0){var aM=aL/aP;var aK=aQ/aP;if(aM>=0&&aM<=1&&aK>=0&&aK<=1){return true}}return false}function h(aL,aK){for(var aN=0;aN=0;aU--){aP=aQ[aU][0];if(an(aP,aK)){aQ[aU].push(aK);aR=true;break}}if(!aR){aV.push(aK)}}while(aV.length){aK=aV.pop();var aO=false;for(aU=aQ.length-1;aU>=0;aU--){aP=aQ[aU][0];if(h(aP,aK)){aQ[aU].push(aK);aO=true;break}}if(!aO){aQ.push([aK.reverse()])}}if(aQ.length===1){return{type:"Polygon",coordinates:aQ[0]}}else{return{type:"MultiPolygon",coordinates:aQ}}}function I(aP){var aL=[];var aN=aP.slice(0);var aK=D(aN.shift().slice(0));if(aK.length>=4){if(!t(aK)){aK.reverse()}aL.push(aK);for(var aM=0;aM=4){if(t(aO)){aO.reverse()}aL.push(aO)}}}return aL}function p(aP){var aL=[];for(var aO=0;aO=0;aK--){var aM=aN[aK].slice(0);aL.push(aM)}}return aL}function ak(aM){var aL={};for(var aK in aM){if(aM.hasOwnProperty(aK)){aL[aK]=aM[aK]}}return aL}function e(aM,aL){var aK={};if(typeof aM.x==="number"&&typeof aM.y==="number"){aK.type="Point";aK.coordinates=[aM.x,aM.y]}if(aM.points){aK.type="MultiPoint";aK.coordinates=aM.points.slice(0)}if(aM.paths){if(aM.paths.length===1){aK.type="LineString";aK.coordinates=aM.paths[0].slice(0)}else{aK.type="MultiLineString";aK.coordinates=aM.paths.slice(0)}}if(aM.rings){aK=k(aM.rings.slice(0))}if(aM.geometry||aM.attributes){aK.type="Feature";aK.geometry=(aM.geometry)?e(aM.geometry):null;aK.properties=(aM.attributes)?ak(aM.attributes):null;if(aM.attributes){aK.id=aM.attributes[aL]||aM.attributes.OBJECTID||aM.attributes.FID}}return aK}function v(aL,aO){aO=aO||"OBJECTID";var aN={wkid:4326};var aK={};var aM;switch(aL.type){case"Point":aK.x=aL.coordinates[0];aK.y=aL.coordinates[1];aK.spatialReference=aN;break;case"MultiPoint":aK.points=aL.coordinates.slice(0);aK.spatialReference=aN;break;case"LineString":aK.paths=[aL.coordinates.slice(0)];aK.spatialReference=aN;break;case"MultiLineString":aK.paths=aL.coordinates.slice(0);aK.spatialReference=aN;break;case"Polygon":aK.rings=I(aL.coordinates.slice(0));aK.spatialReference=aN;break;case"MultiPolygon":aK.rings=p(aL.coordinates.slice(0));aK.spatialReference=aN;break;case"Feature":if(aL.geometry){aK.geometry=v(aL.geometry,aO)}aK.attributes=(aL.properties)?ak(aL.properties):{};if(aL.id){aK.attributes[aO]=aL.id}break;case"FeatureCollection":aK=[];for(aM=0;aM=0;aO--){var aT=ac(aL[aO],aQ);aK.features.push(aT)}}return aK}function T(aK){aK=S.Util.trim(aK);if(aK[aK.length-1]!=="/"){aK+="/"}return aK}function z(aK){return(/^(?!.*utility\.arcgis\.com).*\.arcgis\.com.*FeatureServer/i).test(aK)}function aI(aK){var aL;switch(aK){case"Point":aL="esriGeometryPoint";break;case"MultiPoint":aL="esriGeometryMultipoint";break;case"LineString":aL="esriGeometryPolyline";break;case"MultiLineString":aL="esriGeometryPolyline";break;case"Polygon":aL="esriGeometryPolygon";break;case"MultiPolygon":aL="esriGeometryPolygon";break}return aL}function aF(){if(console&&console.warn){console.warn.apply(console,arguments)}}function C(aK){return(aK.getSize().x-W.attributionWidthOffset)+"px"}function ay(aM){if(aM.attributionControl&&!aM.attributionControl._esriAttributionAdded){aM.attributionControl.setPrefix('Leaflet | Powered by Esri');var aL=document.createElement("style");aL.type="text/css";aL.innerHTML=".esri-truncated-attribution:hover {white-space: normal;}";document.getElementsByTagName("head")[0].appendChild(aL);S.DomUtil.addClass(aM.attributionControl._container,"esri-truncated-attribution:hover");var aK=document.createElement("style");aK.type="text/css";aK.innerHTML=".esri-truncated-attribution {vertical-align: -3px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: inline-block;transition: 0s white-space;transition-delay: 1s;max-width: "+C(aM)+";}";document.getElementsByTagName("head")[0].appendChild(aK);S.DomUtil.addClass(aM.attributionControl._container,"esri-truncated-attribution");aM.on("resize",function(aN){aM.attributionControl._container.style.maxWidth=C(aN.target)});aM.attributionControl._esriAttributionAdded=true}}function V(aK,aL){g(aK,{},S.Util.bind(function(aU,aM){if(aU){return}aL._esriAttributions=[];for(var aT=0;aT=aS.minZoom&&aU<=aS.maxZoom){aO+=(", "+aR)}}aO=aO.substr(2);var aT=aM.attributionControl._container.querySelector(".esri-dynamic-attribution");aT.innerHTML=aO;aT.style.maxWidth=C(aM);aM.fire("attributionupdated",{attribution:aO})}}var X={shallowClone:aD,warn:aF,cleanUrl:T,isArcgisOnline:z,geojsonTypeToArcGIS:aI,responseToFeatureCollection:r,geojsonToArcGIS:ap,arcgisToGeoJSON:ac,boundsToExtent:aj,extentToBounds:Q,calcAttributionWidth:C,setEsriAttribution:ay,_getAttributionData:V,_updateMapAttribution:aB};var aC=S.Class.extend({options:{proxy:false,useCors:aJ},generateSetter:function(aL,aK){return S.Util.bind(function(aM){this.params[aL]=aM;return this},aK)},initialize:function(aL){if(aL.request&&aL.options){this._service=aL;S.Util.setOptions(this,aL.options)}else{S.Util.setOptions(this,aL);this.options.url=T(aL.url)}this.params=S.Util.extend({},this.params||{});if(this.setters){for(var aM in this.setters){var aK=this.setters[aM];this[aM]=this.generateSetter(aK,this)}}},token:function(aK){if(this._service){this._service.authenticate(aK)}else{this.params.token=aK}return this},request:function(aL,aK){if(this._service){return this._service.request(this.path,this.params,aL,aK)}return this._request("request",this.path,this.params,aL,aK)},_request:function(aP,aM,aN,aO,aL){var aK=(this.options.proxy)?this.options.proxy+"?"+this.options.url+aM:this.options.url+aM;if((aP==="get"||aP==="request")&&!this.options.useCors){return G.get.JSONP(aK,aN,aO,aL)}return G[aP](aK,aN,aO,aL)}});function am(aK){return new aC(aK)}var R=aC.extend({setters:{offset:"resultOffset",limit:"resultRecordCount",fields:"outFields",precision:"geometryPrecision",featureIds:"objectIds",returnGeometry:"returnGeometry",token:"token"},path:"query",params:{returnGeometry:true,where:"1=1",outSr:4326,outFields:"*"},within:function(aK){this._setGeometry(aK);this.params.spatialRel="esriSpatialRelContains";return this},intersects:function(aK){this._setGeometry(aK);this.params.spatialRel="esriSpatialRelIntersects";return this},contains:function(aK){this._setGeometry(aK);this.params.spatialRel="esriSpatialRelWithin";return this},crosses:function(aK){this._setGeometry(aK);this.params.spatialRel="esriSpatialRelCrosses";return this},touches:function(aK){this._setGeometry(aK);this.params.spatialRel="esriSpatialRelTouches";return this},overlaps:function(aK){this._setGeometry(aK);this.params.spatialRel="esriSpatialRelOverlaps";return this},bboxIntersects:function(aK){this._setGeometry(aK);this.params.spatialRel="esriSpatialRelEnvelopeIntersects";return this},indexIntersects:function(aK){this._setGeometry(aK);this.params.spatialRel="esriSpatialRelIndexIntersects";return this},nearby:function(aL,aK){aL=S.latLng(aL);this.params.geometry=[aL.lng,aL.lat];this.params.geometryType="esriGeometryPoint";this.params.spatialRel="esriSpatialRelIntersects";this.params.units="esriSRUnit_Meter";this.params.distance=aK;this.params.inSr=4326;return this},where:function(aK){this.params.where=aK;return this},between:function(aL,aK){this.params.time=[aL.valueOf(),aK.valueOf()];return this},simplify:function(aM,aL){var aK=Math.abs(aM.getBounds().getWest()-aM.getBounds().getEast());this.params.maxAllowableOffset=(aK/aM.getSize().y)*aL;return this},orderBy:function(aL,aK){aK=aK||"ASC";this.params.orderByFields=(this.params.orderByFields)?this.params.orderByFields+",":"";this.params.orderByFields+=([aL,aK]).join(" ");return this},run:function(aL,aK){this._cleanParams();if(this.options.isModern||z(this.options.url)){this.params.f="geojson";return this.request(function(aN,aM){this._trapSQLerrors(aN);aL.call(aK,aN,aM,aM)},this)}else{return this.request(function(aN,aM){this._trapSQLerrors(aN);aL.call(aK,aN,(aM&&r(aM)),aM)},this)}},count:function(aL,aK){this._cleanParams();this.params.returnCountOnly=true;return this.request(function(aN,aM){aL.call(this,aN,(aM&&aM.count),aM)},aK)},ids:function(aL,aK){this._cleanParams();this.params.returnIdsOnly=true;return this.request(function(aN,aM){aL.call(this,aN,(aM&&aM.objectIds),aM)},aK)},bounds:function(aL,aK){this._cleanParams();this.params.returnExtentOnly=true;return this.request(function(aN,aM){if(aM&&aM.extent&&Q(aM.extent)){aL.call(aK,aN,Q(aM.extent),aM)}else{aN={message:"Invalid Bounds"};aL.call(aK,aN,null,aM)}},aK)},pixelSize:function(aK){var aL=S.point(aK);this.params.pixelSize=[aL.x,aL.y];return this},layer:function(aK){this.path=aK+"/query";return this},_trapSQLerrors:function(aK){if(aK){if(aK.code==="400"){aF("one common syntax error in query requests is encasing string values in double quotes instead of single quotes")}}},_cleanParams:function(){delete this.params.returnIdsOnly;delete this.params.returnExtentOnly;delete this.params.returnCountOnly},_setGeometry:function(aK){this.params.inSr=4326;if(aK instanceof S.LatLngBounds){this.params.geometry=aj(aK);this.params.geometryType="esriGeometryEnvelope";return}if(aK.getLatLng){aK=aK.getLatLng()}if(aK instanceof S.LatLng){aK={type:"Point",coordinates:[aK.lng,aK.lat]}}if(aK instanceof S.GeoJSON){aK=aK.getLayers()[0].feature.geometry;this.params.geometry=ap(aK);this.params.geometryType=aI(aK.type)}if(aK.toGeoJSON){aK=aK.toGeoJSON()}if(aK.type==="Feature"){aK=aK.geometry}if(aK.type==="Point"||aK.type==="LineString"||aK.type==="Polygon"||aK.type==="MultiPolygon"){this.params.geometry=ap(aK);this.params.geometryType=aI(aK.type);return}aF("invalid geometry passed to spatial query. Should be L.LatLng, L.LatLngBounds, L.Marker or a GeoJSON Point, Line, Polygon or MultiPolygon object");return}});function K(aK){return new R(aK)}var l=aC.extend({setters:{contains:"contains",text:"searchText",fields:"searchFields",spatialReference:"sr",sr:"sr",layers:"layers",returnGeometry:"returnGeometry",maxAllowableOffset:"maxAllowableOffset",precision:"geometryPrecision",dynamicLayers:"dynamicLayers",returnZ:"returnZ",returnM:"returnM",gdbVersion:"gdbVersion",token:"token"},path:"find",params:{sr:4326,contains:true,returnGeometry:true,returnZ:true,returnM:false},layerDefs:function(aL,aK){this.params.layerDefs=(this.params.layerDefs)?this.params.layerDefs+";":"";this.params.layerDefs+=([aL,aK]).join(":");return this},simplify:function(aM,aL){var aK=Math.abs(aM.getBounds().getWest()-aM.getBounds().getEast());this.params.maxAllowableOffset=(aK/aM.getSize().y)*aL;return this},run:function(aL,aK){return this.request(function(aN,aM){aL.call(aK,aN,(aM&&r(aM)),aM)},aK)}});function aH(aK){return new l(aK)}var ax=aC.extend({path:"identify",between:function(aL,aK){this.params.time=[aL.valueOf(),aK.valueOf()];return this}});function ao(aK){return new ax(aK)}var au=ax.extend({setters:{layers:"layers",precision:"geometryPrecision",tolerance:"tolerance",returnGeometry:"returnGeometry"},params:{sr:4326,layers:"all",tolerance:3,returnGeometry:true},on:function(aM){var aL=aj(aM.getBounds());var aK=aM.getSize();this.params.imageDisplay=[aK.x,aK.y,96];this.params.mapExtent=[aL.xmin,aL.ymin,aL.xmax,aL.ymax];return this},at:function(aK){aK=S.latLng(aK);this.params.geometry=[aK.lng,aK.lat];this.params.geometryType="esriGeometryPoint";return this},layerDef:function(aL,aK){this.params.layerDefs=(this.params.layerDefs)?this.params.layerDefs+";":"";this.params.layerDefs+=([aL,aK]).join(":");return this},simplify:function(aM,aL){var aK=Math.abs(aM.getBounds().getWest()-aM.getBounds().getEast());this.params.maxAllowableOffset=(aK/aM.getSize().y)*aL;return this},run:function(aL,aK){return this.request(function(aN,aM){if(aN){aL.call(aK,aN,undefined,aM);return}else{var aQ=r(aM);aM.results=aM.results.reverse();for(var aP=0;aP=0;aM--){aP.catalogItems.features[aM].properties.catalogItemVisibility=aO[aM]}}}return aP}});function n(aK){return new d(aK)}var ae=S.Evented.extend({options:{proxy:false,useCors:aJ,timeout:0},initialize:function(aK){aK=aK||{};this._requestQueue=[];this._authenticating=false;S.Util.setOptions(this,aK);this.options.url=T(this.options.url)},get:function(aL,aM,aN,aK){return this._request("get",aL,aM,aN,aK)},post:function(aL,aM,aN,aK){return this._request("post",aL,aM,aN,aK)},request:function(aL,aM,aN,aK){return this._request("request",aL,aM,aN,aK)},metadata:function(aL,aK){return this._request("get","",{},aL,aK)},authenticate:function(aK){this._authenticating=false;this.options.token=aK;this._runQueue();return this},getTimeout:function(){return this.options.timeout},setTimeout:function(aK){this.options.timeout=aK},_request:function(aQ,aM,aO,aP,aL){this.fire("requeststart",{url:this.options.url+aM,params:aO,method:aQ},true);var aN=this._createServiceCallback(aQ,aM,aO,aP,aL);if(this.options.token){aO.token=this.options.token}if(this._authenticating){this._requestQueue.push([aQ,aM,aO,aP,aL]);return}else{var aK=(this.options.proxy)?this.options.proxy+"?"+this.options.url+aM:this.options.url+aM;if((aQ==="get"||aQ==="request")&&!this.options.useCors){return G.get.JSONP(aK,aO,aN,aL)}else{return G[aQ](aK,aO,aN,aL)}}},_createServiceCallback:function(aO,aL,aM,aN,aK){return S.Util.bind(function(aQ,aP){if(aQ&&(aQ.code===499||aQ.code===498)){this._authenticating=true;this._requestQueue.push([aO,aL,aM,aN,aK]);this.fire("authenticationrequired",{authenticate:S.Util.bind(this.authenticate,this)},true);aQ.authenticate=S.Util.bind(this.authenticate,this)}aN.call(aK,aQ,aP);if(aQ){this.fire("requesterror",{url:this.options.url+aL,params:aM,message:aQ.message,code:aQ.code,method:aO},true)}else{this.fire("requestsuccess",{url:this.options.url+aL,params:aM,response:aP,method:aO},true)}this.fire("requestend",{url:this.options.url+aL,params:aM,method:aO},true)},this)},_runQueue:function(){for(var aK=this._requestQueue.length-1;aK>=0;aK--){var aL=this._requestQueue[aK];var aM=aL.shift();this[aM].apply(this,aL)}this._requestQueue=[]}});function aG(aK){return new ae(aK)}var m=ae.extend({identify:function(){return N(this)},find:function(){return aH(this)},query:function(){return K(this)}});function f(aK){return new m(aK)}var ar=ae.extend({query:function(){return K(this)},identify:function(){return n(this)}});function P(aK){return new ar(aK)}var az=ae.extend({options:{idAttribute:"OBJECTID"},query:function(){return K(this)},addFeature:function(aL,aM,aK){delete aL.id;aL=ap(aL);return this.post("addFeatures",{features:[aL]},function(aP,aO){var aN=(aO&&aO.addResults)?aO.addResults[0]:undefined;if(aM){aM.call(aK,aP||aO.addResults[0].error,aN)}},aK)},updateFeature:function(aL,aM,aK){aL=ap(aL,this.options.idAttribute);return this.post("updateFeatures",{features:[aL]},function(aP,aO){var aN=(aO&&aO.updateResults)?aO.updateResults[0]:undefined;if(aM){aM.call(aK,aP||aO.updateResults[0].error,aN)}},aK)},deleteFeature:function(aM,aL,aK){return this.post("deleteFeatures",{objectIds:aM},function(aP,aO){var aN=(aO&&aO.deleteResults)?aO.deleteResults[0]:undefined;if(aL){aL.call(aK,aP||aO.deleteResults[0].error,aN)}},aK)},deleteFeatures:function(aL,aM,aK){return this.post("deleteFeatures",{objectIds:aL},function(aP,aO){var aN=(aO&&aO.deleteResults)?aO.deleteResults:undefined;if(aM){aM.call(aK,aP||aO.deleteResults[0].error,aN)}},aK)}});function ab(aK){return new az(aK)}var x=(window.location.protocol!=="https:")?"http:":"https:";var ad=S.TileLayer.extend({statics:{TILES:{Streets:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"USGS, NOAA",attributionUrl:"https://static.arcgis.com/attribution/World_Street_Map"}},Topographic:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"USGS, NOAA",attributionUrl:"https://static.arcgis.com/attribution/World_Topo_Map"}},Oceans:{urlTemplate:x+"//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"USGS, NOAA",attributionUrl:"https://static.arcgis.com/attribution/Ocean_Basemap"}},OceansLabels:{urlTemplate:x+"//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],pane:(a)?"esri-labels":"tilePane"}},NationalGeographic:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"National Geographic, DeLorme, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp."}},DarkGray:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors"}},DarkGrayLabels:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],pane:(a)?"esri-labels":"tilePane",attribution:""}},Gray:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors"}},GrayLabels:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],pane:(a)?"esri-labels":"tilePane",attribution:""}},Imagery:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community"}},ImageryLabels:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:19,subdomains:["server","services"],pane:(a)?"esri-labels":"tilePane",attribution:""}},ImageryTransportation:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:19,subdomains:["server","services"],pane:(a)?"esri-labels":"tilePane"}},ShadedRelief:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:13,subdomains:["server","services"],attribution:"USGS"}},ShadedReliefLabels:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:12,subdomains:["server","services"],pane:(a)?"esri-labels":"tilePane",attribution:""}},Terrain:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:13,subdomains:["server","services"],attribution:"USGS, NOAA"}},TerrainLabels:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:13,subdomains:["server","services"],pane:(a)?"esri-labels":"tilePane",attribution:""}},USATopo:{urlTemplate:x+"//{s}.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:15,subdomains:["server","services"],attribution:"USGS, National Geographic Society, i-cubed"}}}},initialize:function(aM,aL){var aK;if(typeof aM==="object"&&aM.urlTemplate&&aM.options){aK=aM}else{if(typeof aM==="string"&&ad.TILES[aM]){aK=ad.TILES[aM]}else{throw new Error('L.esri.BasemapLayer: Invalid parameter. Use one of "Streets", "Topographic", "Oceans", "OceansLabels", "NationalGeographic", "Gray", "GrayLabels", "DarkGray", "DarkGrayLabels", "Imagery", "ImageryLabels", "ImageryTransportation", "ShadedRelief", "ShadedReliefLabels", "Terrain", "TerrainLabels" or "USATopo"')}}var aN=S.Util.extend(aK.options,aL);S.Util.setOptions(this,aN);if(this.options.token){aK.urlTemplate+=("?token="+this.options.token)}S.TileLayer.prototype.initialize.call(this,aK.urlTemplate,aN)},onAdd:function(aK){ay(aK);if(this.options.pane==="esri-labels"){this._initPane()}if(this.options.attributionUrl){V(this.options.attributionUrl,aK)}aK.on("moveend",aB);S.TileLayer.prototype.onAdd.call(this,aK)},onRemove:function(aK){aK.off("moveend",aB);S.TileLayer.prototype.onRemove.call(this,aK)},_initPane:function(){if(!this._map.getPane(this.options.pane)){var aK=this._map.createPane(this.options.pane);aK.style.pointerEvents="none";aK.style.zIndex=500}},getAttribution:function(){if(this.options.attribution){var aK=''+this.options.attribution+""}return aK}});function w(aL,aK){return new ad(aL,aK)}var q=S.TileLayer.extend({options:{zoomOffsetAllowance:0.1,errorTileUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEABAMAAACuXLVVAAAAA1BMVEUzNDVszlHHAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAAAAAAAAAB6mUWpAAAADZJREFUeJztwQEBAAAAgiD/r25IQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7waBAAABw08RwAAAAABJRU5ErkJggg=="},statics:{MercatorZoomLevels:{"0":156543.033928,"1":78271.5169639999,"2":39135.7584820001,"3":19567.8792409999,"4":9783.93962049996,"5":4891.96981024998,"6":2445.98490512499,"7":1222.99245256249,"8":611.49622628138,"9":305.748113140558,"10":152.874056570411,"11":76.4370282850732,"12":38.2185141425366,"13":19.1092570712683,"14":9.55462853563415,"15":4.77731426794937,"16":2.38865713397468,"17":1.19432856685505,"18":0.597164283559817,"19":0.298582141647617,"20":0.14929107082381,"21":0.07464553541191,"22":0.0373227677059525,"23":0.0186613838529763}},initialize:function(aK){aK.url=T(aK.url);aK=S.Util.setOptions(this,aK);this.tileUrl=aK.url+"tile/{z}/{y}/{x}";this.service=f(aK);this.service.addEventParent(this);var aL=new RegExp(/tiles.arcgis(online)?\.com/g);if(aL.test(aK.url)){this.tileUrl=this.tileUrl.replace("://tiles","://tiles{s}");aK.subdomains=["1","2","3","4"]}if(this.options.token){this.tileUrl+=("?token="+this.options.token)}S.TileLayer.prototype.initialize.call(this,this.tileUrl,aK)},getTileUrl:function(aK){var aL=this._getZoomForUrl();return S.Util.template(this.tileUrl,S.Util.extend({s:this._getSubdomain(aK),x:aK.x,y:aK.y,z:(this._lodMap&&this._lodMap[aL])?this._lodMap[aL]:aL},this.options))},createTile:function(aM,aK){var aL=document.createElement("img");L.DomEvent.on(aL,"load",L.bind(this._tileOnLoad,this,aK,aL));L.DomEvent.on(aL,"error",L.bind(this._tileOnError,this,aK,aL));if(this.options.crossOrigin){aL.crossOrigin=""}aL.alt="";if(!this._lodMap||(this._lodMap&&this._lodMap[this._getZoomForUrl()])){aL.src=this.getTileUrl(aM)}else{this.once("lodmap",function(){aL.src=this.getTileUrl(aM)},this)}return aL},onAdd:function(aK){ay(aK);if(!this._lodMap){this.metadata(function(aP,aQ){if(!aP&&aQ.spatialReference){var aL=aQ.spatialReference.latestWkid||aQ.spatialReference.wkid;if(!this.options.attribution&&aK.attributionControl&&aQ.copyrightText){this.options.attribution=aQ.copyrightText;aK.attributionControl.addAttribution(this.getAttribution())}if(aK.options.crs===L.CRS.EPSG3857&&aL===102100||aL===3857){this._lodMap={};var aM=aQ.tileInfo.lods;var aN=q.MercatorZoomLevels;for(var aO=0;aOthis.options.maxZoom||aL0||aL.y0||aL.yaM.max.x))||(!aK.wrapLat&&(aN.yaM.max.y))){return false}}if(!this.options.bounds){return true}var aL=this._cellCoordsToBounds(aN);return Y.latLngBounds(this.options.bounds).intersects(aL)},_cellCoordsToBounds:function(aO){var aP=this._map;var aQ=this.options.cellSize;var aM=aO.multiplyBy(aQ);var aK=aM.add([aQ,aQ]);var aL=aP.wrapLatLng(aP.unproject(aM,aO.z));var aN=aP.wrapLatLng(aP.unproject(aK,aO.z));return Y.latLngBounds(aL,aN)},_cellCoordsToKey:function(aK){return aK.x+":"+aK.y},_keyToCellCoords:function(aL){var aM=aL.split(":");var aK=parseInt(aM[0],10);var aN=parseInt(aM[1],10);return Y.point(aK,aN)},_removeOtherCells:function(aL){for(var aK in this._cells){if(!aL.contains(this._keyToCellCoords(aK))){this._removeCell(aK)}}},_removeCell:function(aL){var aK=this._activeCells[aL];if(aK){delete this._activeCells[aL];if(this.cellLeave){this.cellLeave(aK.bounds,aK.coords)}this.fire("cellleave",{bounds:aK.bounds,coords:aK.coords})}},_removeCells:function(){for(var aK in this._cells){var aL=this._cells[aK].bounds;var aM=this._cells[aK].coords;if(this.cellLeave){this.cellLeave(aL,aM)}this.fire("cellleave",{bounds:aL,coords:aM})}},_addCell:function(aM){this._wrapCoords(aM);var aL=this._cellCoordsToKey(aM);var aK=this._cells[aL];if(aK&&!this._activeCells[aL]){if(this.cellEnter){this.cellEnter(aK.bounds,aM)}this.fire("cellenter",{bounds:aK.bounds,coords:aM});this._activeCells[aL]=aK}if(!aK){aK={coords:aM,bounds:this._cellCoordsToBounds(aM)};this._cells[aL]=aK;this._activeCells[aL]=aK;if(this.createCell){this.createCell(aK.bounds,aM)}this.fire("cellcreate",{bounds:aK.bounds,coords:aM})}},_wrapCoords:function(aK){aK.x=this._wrapLng?Y.Util.wrapNum(aK.x,this._wrapLng):aK.x;aK.y=this._wrapLat?Y.Util.wrapNum(aK.y,this._wrapLat):aK.y},_getCellNumBounds:function(){var aL=this._map.getPixelWorldBounds();var aK=this._getCellSize();return aL?Y.bounds(aL.min.divideBy(aK).floor(),aL.max.divideBy(aK).ceil().subtract([1,1])):null}});function aa(aK){this.values=[].concat(aK||[])}aa.prototype.query=function(aL){var aK=this.getIndex(aL);return this.values[aK]};aa.prototype.getIndex=function i(aO){if(this.dirty){this.sort()}var aM=0;var aN=this.values.length-1;var aK;var aL;while(aM<=aN){aK=(aM+aN)/2|0;aL=this.values[Math.round(aK)];if(+aL.value<+aO){aM=aK+1}else{if(+aL.value>+aO){aN=aK-1}else{return aK}}}return Math.abs(~aN)};aa.prototype.between=function H(aN,aK){var aM=this.getIndex(aN);var aL=this.getIndex(aK);if(aM===0&&aL===0){return[]}while(this.values[aM-1]&&this.values[aM-1].value===aN){aM--}while(this.values[aL+1]&&this.values[aL+1].value===aK){aL++}if(this.values[aL]&&this.values[aL].value===aK&&this.values[aL+1]){aL++}return this.values.slice(aM,aL)};aa.prototype.insert=function B(aK){this.values.splice(this.getIndex(aK.value),0,aK);return this};aa.prototype.bulkAdd=function A(aK,aL){this.values=this.values.concat([].concat(aK||[]));if(aL){this.sort()}else{this.dirty=true}return this};aa.prototype.sort=function F(){this.values.sort(function(aL,aK){return +aK.value-+aL.value}).reverse();this.dirty=false;return this};var av=Z.extend({options:{attribution:null,where:"1=1",fields:["*"],from:false,to:false,timeField:false,timeFilterMode:"server",simplifyFactor:0,precision:6},initialize:function(aK){Z.prototype.initialize.call(this,aK);aK.url=T(aK.url);aK=S.setOptions(this,aK);this.service=ab(aK);this.service.addEventParent(this);if(this.options.fields[0]!=="*"){var aM=false;for(var aL=0;aL=0;aK--){var aO=aM[aK].id;if(this._currentSnapshot.indexOf(aO)===-1){this._currentSnapshot.push(aO)}if(this._cache[aL].indexOf(aO)===-1){this._cache[aL].push(aO)}}if(this.options.timeField){this._buildTimeIndexes(aM)}this.createLayers(aM)},_buildQuery:function(aK){var aL=this.service.query().intersects(aK).where(this.options.where).fields(this.options.fields).precision(this.options.precision);if(this.options.simplifyFactor){aL.simplify(this._map,this.options.simplifyFactor)}if(this.options.timeFilterMode==="server"&&this.options.from&&this.options.to){aL.between(this.options.from,this.options.to)}return aL},setWhere:function(aP,aU,aL){this.options.where=(aP&&aP.length)?aP:"1=1";var aN=[];var aT=[];var aM=0;var aR=null;var aV=S.Util.bind(function(aW,aY){if(aW){aR=aW}if(aY){for(var aX=aY.features.length-1;aX>=0;aX--){aT.push(aY.features[aX].id)}}aM--;if(aM<=0){this._currentSnapshot=aT;S.Util.requestAnimFrame(S.Util.bind(function(){this.removeLayers(aN);this.addLayers(aT);if(aU){aU.call(aL,aR)}},this))}},this);for(var aO=this._currentSnapshot.length-1;aO>=0;aO--){aN.push(this._currentSnapshot[aO])}for(var aS in this._activeCells){aM++;var aQ=this._keyToCellCoords(aS);var aK=this._cellCoordsToBounds(aQ);this._requestFeatures(aK,aS,aV)}return this},getWhere:function(){return this.options.where},getTimeRange:function(){return[this.options.from,this.options.to]},setTimeRange:function(aO,aP,aU,aL){var aT=this.options.from;var aS=this.options.to;var aM=0;var aQ=null;var aV=S.Util.bind(function(aW){if(aW){aQ=aW}this._filterExistingFeatures(aT,aS,aO,aP);aM--;if(aU&&aM<=0){aU.call(aL,aQ)}},this);this.options.from=aO;this.options.to=aP;this._filterExistingFeatures(aT,aS,aO,aP);if(this.options.timeFilterMode==="server"){for(var aR in this._activeCells){aM++;var aN=this._keyToCellCoords(aR);var aK=this._cellCoordsToBounds(aN);this._requestFeatures(aK,aR,aV)}}return this},refresh:function(){for(var aK in this._activeCells){var aM=this._keyToCellCoords(aK);var aL=this._cellCoordsToBounds(aM);this._requestFeatures(aL,aK)}if(this.redraw){this.once("load",function(){this.eachFeature(function(aN){this._redraw(aN.feature.id)},this)},this)}},_filterExistingFeatures:function(aL,aR,aP,aM){var aO=(aL&&aR)?this._getFeaturesInTimeRange(aL,aR):this._currentSnapshot;var aQ=this._getFeaturesInTimeRange(aP,aM);if(aQ.indexOf){for(var aN=0;aN=0){aO.splice(aK,1)}}}S.Util.requestAnimFrame(S.Util.bind(function(){this.removeLayers(aO);this.addLayers(aQ)},this))},_getFeaturesInTimeRange:function(aQ,aK){var aP=[];var aO;if(this.options.timeField.start&&this.options.timeField.end){var aN=this._startTimeIndex.between(aQ,aK);var aL=this._endTimeIndex.between(aQ,aK);aO=aN.concat(aL)}else{aO=this._timeIndex.between(aQ,aK)}for(var aM=aO.length-1;aM>=0;aM--){aP.push(aO[aM].id)}return aP},_buildTimeIndexes:function(aL){var aO;var aN;if(this.options.timeField.start&&this.options.timeField.end){var aP=[];var aK=[];for(aO=aL.length-1;aO>=0;aO--){aN=aL[aO];aP.push({id:aN.id,value:new Date(aN.properties[this.options.timeField.start])});aK.push({id:aN.id,value:new Date(aN.properties[this.options.timeField.end])})}this._startTimeIndex.bulkAdd(aP);this._endTimeIndex.bulkAdd(aK)}else{var aM=[];for(aO=aL.length-1;aO>=0;aO--){aN=aL[aO];aM.push({id:aN.id,value:new Date(aN.properties[this.options.timeField])})}this._timeIndex.bulkAdd(aM)}},_featureWithinTimeRange:function(aM){if(!this.options.from||!this.options.to){return true}var aP=+this.options.from.valueOf();var aO=+this.options.to.valueOf();if(typeof this.options.timeField==="string"){var aL=+aM.properties[this.options.timeField];return(aL>=aP)&&(aL<=aO)}if(this.options.timeField.start&&this.options.timeField.end){var aK=+aM.properties[this.options.timeField.start];var aN=+aM.properties[this.options.timeField.end];return((aK>=aP)&&(aK<=aO))||((aN>=aP)&&(aN<=aO))}},_visibleZoom:function(){if(!this._map){return false}var aK=this._map.getZoom();if(aK>this.options.maxZoom||aK0){for(var aP=0;aP=0;aM--){var aK=aO[aM];var aL=this._layers[aK.id];var aN;if(this._visibleZoom()&&aL&&!this._map.hasLayer(aL)){this._map.addLayer(aL);this.fire("addfeature",{feature:aL.feature},true)}if(aL&&this.options.simplifyFactor>0&&(aL.setLatLngs||aL.setLatLng)){this._updateLayer(aL,aK)}if(!aL){aN=this.createNewLayer(aK);aN.feature=aK;aN.addEventParent(this);if(this.options.onEachFeature){this.options.onEachFeature(aN.feature,aN)}this._layers[aN.feature.id]=aN;this.setFeatureStyle(aN.feature.id,this.options.style);this.fire("createfeature",{feature:aN.feature},true);if(this._visibleZoom()&&(!this.options.timeField||(this.options.timeField&&this._featureWithinTimeRange(aK)))){this._map.addLayer(aN)}}}},addLayers:function(aM){for(var aL=aM.length-1;aL>=0;aL--){var aK=this._layers[aM[aL]];if(aK){this._map.addLayer(aK)}}},removeLayers:function(aM,aN){for(var aL=aM.length-1;aL>=0;aL--){var aO=aM[aL];var aK=this._layers[aO];if(aK){this.fire("removefeature",{feature:aK.feature,permanent:aN},true);this._map.removeLayer(aK)}if(aK&&aN){delete this._layers[aO]}}},cellEnter:function(aK,aL){if(this._visibleZoom()&&!this._zooming&&this._map){S.Util.requestAnimFrame(S.Util.bind(function(){var aN=this._cacheKey(aL);var aO=this._cellCoordsToKey(aL);var aM=this._cache[aN];if(this._activeCells[aO]&&aM){this.addLayers(aM)}},this))}},cellLeave:function(aK,aL){if(!this._zooming){S.Util.requestAnimFrame(S.Util.bind(function(){if(this._map){var aR=this._cacheKey(aL);var aS=this._cellCoordsToKey(aL);var aQ=this._cache[aR];var aM=this._map.getBounds();if(!this._activeCells[aS]&&aQ){var aN=true;for(var aP=0;aP=0;j--){var g=l[j];var h=this._layers[g.id];if(!h){var k=a.GeoJSON.geometryToLayer(g,this.options);k.feature=a.GeoJSON.asFeature(g);k.defaultOptions=k.options;k._leaflet_id=this._key+"_"+g.id;this.resetStyle(k.feature.id);this._layers[k.feature.id]=k;this._leafletIds[k._leaflet_id]=g.id;if(this.options.onEachFeature){this.options.onEachFeature(k.feature,k)}this.fire("createfeature",{feature:k.feature});if(!this.options.timeField||(this.options.timeField&&this._featureWithinTimeRange(g))){m.push(k)}}}if(m.length){this.cluster.addLayers(m)}},addLayers:function(j){var k=[];for(var h=j.length-1;h>=0;h--){var g=this._layers[j[h]];this.fire("addfeature",{feature:g.feature});k.push(g)}this.cluster.addLayers(k)},removeLayers:function(k,l){var j=[];for(var h=k.length-1;h>=0;h--){var m=k[h];var g=this._layers[m];this.fire("removefeature",{feature:g.feature,permanent:l});j.push(g);if(this._layers[m]&&l){delete this._layers[m]}}this.cluster.removeLayers(j)},resetStyle:function(h){var g=this._layers[h];if(g){g.options=g.defaultOptions;this.setFeatureStyle(g.feature.id,this.options.style)}return this},setStyle:function(g){this.eachFeature(function(h){this.setFeatureStyle(h.feature.id,g)},this);return this},setFeatureStyle:function(i,h){var g=this._layers[i];if(typeof h==="function"){h=h(g.feature)}if(g.setStyle){g.setStyle(h)}},eachFeature:function(j,h){for(var g in this._layers){j.call(h,this._layers[g])}return this},getFeature:function(g){return this._layers[g]}});function e(g){return new f(g)}c.FeatureLayer=f;c.featureLayer=e;c["default"]=e;c.VERSION=b})); \ No newline at end of file diff -r 829abfdd6d27 -r 37970a213463 src/pyams_gis/resources/js/leaflet-esri-geocoder-2.2.4.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_gis/resources/js/leaflet-esri-geocoder-2.2.4.min.js Thu Jul 12 17:40:07 2018 +0200 @@ -0,0 +1,1 @@ +(function(b,a){typeof exports==="object"&&typeof module!=="undefined"?a(exports,require("leaflet"),require("esri-leaflet")):typeof define==="function"&&define.amd?define(["exports","leaflet","esri-leaflet"],a):(a((b.L=b.L||{},b.L.esri=b.L.esri||{},b.L.esri.Geocoding=b.L.esri.Geocoding||{}),b.L,b.L.esri))}(this,function(y,g,w){g="default" in g?g["default"]:g;var d="2.2.4";var t=w.Task.extend({path:"findAddressCandidates",params:{outSr:4326,forStorage:false,outFields:"*",maxLocations:20},setters:{address:"address",neighborhood:"neighborhood",city:"city",subregion:"subregion",region:"region",postal:"postal",country:"country",text:"singleLine",category:"category",token:"token",key:"magicKey",fields:"outFields",forStorage:"forStorage",maxLocations:"maxLocations"},initialize:function(z){z=z||{};z.url=z.url||i;w.Task.prototype.initialize.call(this,z)},within:function(z){z=g.latLngBounds(z);this.params.searchExtent=w.Util.boundsToExtent(z);return this},nearby:function(A,z){A=g.latLng(A);this.params.location=A.lng+","+A.lat;this.params.distance=Math.min(Math.max(z,2000),50000);return this},run:function(A,z){if(this.options.customParam){this.params[this.options.customParam]=this.params.singleLine;delete this.params.singleLine}return this.request(function(C,B){var E=this._processGeocoderResponse;var D=(!C)?E(B):undefined;A.call(z,C,{results:D},B)},this)},_processGeocoderResponse:function(z){var B=[];for(var A=0;A-1){this.options.supportsSuggest=true}else{this.options.supportsSuggest=false}}},this)}});function r(z){return new c(z)}var f=g.Evented.extend({options:{zoomToResult:true,useMapBounds:12,searchBounds:null},initialize:function(A,z){g.Util.setOptions(this,z);this._control=A;if(!z||!z.providers||!z.providers.length){throw new Error("You must specify at least one provider")}this._providers=z.providers},_geocode:function(F,C,E){var A=0;var z=[];var D;var G=g.Util.bind(function(H,I){A--;if(H){return}if(I){z=z.concat(I)}if(A<=0){D=this._boundsFromResults(z);this.fire("results",{results:z,bounds:D,latlng:(D)?D.getCenter():undefined,text:F},true);if(this.options.zoomToResult&&D){this._control._map.fitBounds(D)}this.fire("load")}},this);if(C){A++;E.results(F,C,this._searchBounds(),G)}else{for(var B=0;B=0;D--){var z=E[D];A.push(z.latlng);if(z.bounds&&z.bounds.isValid()&&!z.bounds.equals(B)){G.push(z.bounds)}}var F=g.latLngBounds(A);for(var C=0;C0){this._suggestions.style.display="block"}this._suggestions.style.maxHeight=(this._map.getSize().y-this._suggestions.offsetTop-this._wrapper.offsetTop-10)+"px";var z=[];var F;var D;var H=[];for(var C=0;C1&&G!==B.provider.options.label){D=g.DomUtil.create("span","geocoder-control-header",this._suggestions);D.textContent=B.provider.options.label;D.innerText=B.provider.options.label;G=B.provider.options.label;z.push(D)}if(!F){F=g.DomUtil.create("ul","geocoder-control-list",this._suggestions)}if(H.indexOf(B.text)===-1){var I=g.DomUtil.create("li","geocoder-control-suggestion",F);I.innerHTML=B.text;I.provider=B.provider;I["data-magic-key"]=B.magicKey}else{for(var A=0;A=0;D--){var z=E[D];A.push(z.latlng);if(z.bounds&&z.bounds.isValid()&&!z.bounds.equals(B)){G.push(z.bounds)}}var F=g.latLngBounds(A);for(var C=0;C=2){this._geosearchCore._geocode(this._input.value,undefined);this.clear()}else{if(H.length===1){g.DomUtil.addClass(H[0],"geocoder-control-selected");this._geosearchCore._geocode(H[0].innerHTML,H[0]["data-magic-key"],H[0].provider)}else{this.clear();this._input.blur()}}}g.DomEvent.preventDefault(G);break;case 38:if(D){g.DomUtil.removeClass(D,"geocoder-control-selected")}var F=H[J-1];if(D&&F){g.DomUtil.addClass(F,"geocoder-control-selected")}else{g.DomUtil.addClass(H[H.length-1],"geocoder-control-selected")}g.DomEvent.preventDefault(G);break;case 40:if(D){g.DomUtil.removeClass(D,"geocoder-control-selected")}var B=H[J+1];if(D&&B){g.DomUtil.addClass(B,"geocoder-control-selected")}else{g.DomUtil.addClass(H[0],"geocoder-control-selected")}g.DomEvent.preventDefault(G);break;default:for(var I=0;I=0;I--){var H=J.features[I];E.push({text:this.options.formatSuggestion.call(this,H),magicKey:H.id})}D(G,E.slice(0,this.options.maxResults))}},this);return z},results:function(C,z,A,D){var B=this._resultsQuery;if(z){delete B.params.where;B.featureIds([z])}else{B.where(this._buildQuery(C))}if(A){B.within(A)}return B.run(g.Util.bind(function(F,J){var I=[];for(var H=0;H=0;z--){var A='upper("'+this.options.searchFields[z]+'")';C.push(A+" LIKE upper('%"+B+"%')")}if(this.options.where){return this.options.where+" AND ("+C.join(" OR ")+")"}else{return C.join(" OR ")}},_featureBounds:function(B){var A=g.geoJson(B);if(B.geometry.type==="Point"){var z=A.getBounds().getCenter();var D=((this.options.bufferRadius/40075017)*360)/Math.cos((180/Math.PI)*z.lat);var C=(this.options.bufferRadius/40075017)*360;return g.latLngBounds([z.lat-C,z.lng-D],[z.lat+C,z.lng+D])}else{return A.getBounds()}}});function u(z){return new j(z)}var n=w.MapService.extend({options:{layers:[0],label:"Map Service",bufferRadius:1000,maxResults:5,formatSuggestion:function(z){return z.properties[z.displayFieldName]+" "+z.layerName+""}},initialize:function(z){w.MapService.prototype.initialize.call(this,z);this._getIdFields()},suggestions:function(B,A,C){var z=this.find().text(B).fields(this.options.searchFields).returnGeometry(false).layers(this.options.layers);return z.run(function(J,E,K){var I=[];if(!J){var H=Math.min(this.options.maxResults,E.features.length);K.results=K.results.reverse();for(var F=0;F=0;h--){var g=j[h];var l=g.id;var k=new a.LatLng(g.geometry.coordinates[1],g.geometry.coordinates[0]);this._cache[l]=k;if(!this._active[l]&&(!this.options.timeField||(this.options.timeField&&this._featureWithinTimeRange(g)))){this._active[l]=k;this.heat._latlngs.push(k)}}this.heat.redraw()},addLayers:function(h){for(var g=h.length-1;g>=0;g--){var k=h[g];if(!this._active[k]){var j=this._cache[k];this.heat._latlngs.push(j);this._active[k]=j}}this.heat.redraw()},removeLayers:function(j,k){var h=[];for(var g=j.length-1;g>=0;g--){var m=j[g];if(this._active[m]){delete this._active[m]}if(this._cache[m]&&k){delete this._cache[m]}}for(var l in this._active){h.push(this._active[l])}this.heat.setLatLngs(h)},setOptions:function(g){this.heat.setOptions(g)},redraw:function(){this.heat.redraw()}});function e(g){return new f(g)}c.FeatureLayer=f;c.featureLayer=e;c["default"]=e;c.VERSION=b})); \ No newline at end of file diff -r 829abfdd6d27 -r 37970a213463 src/pyams_gis/resources/js/leaflet-esri-renderers-2.0.2.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_gis/resources/js/leaflet-esri-renderers-2.0.2.min.js Thu Jul 12 17:40:07 2018 +0200 @@ -0,0 +1,1 @@ +(function(b,a){typeof exports==="object"&&typeof module!=="undefined"?a(exports,require("leaflet")):typeof define==="function"&&define.amd?define(["exports","leaflet"],a):(a((b.L=b.L||{},b.L.esri=b.L.esri||{},b.L.esri.Renderers=b.L.esri.Renderers||{}),b.L))}(this,function(y,j){j="default" in j?j["default"]:j;var g="2.0.2";var p=j.Class.extend({initialize:function(B,A){this._symbolJson=B;this.val=null;this._styles={};this._isDefault=false;this._layerTransparency=1;if(A&&A.layerTransparency){this._layerTransparency=1-(A.layerTransparency/100)}},pixelValue:function(A){return A*1.333},colorValue:function(A){return"rgb("+A[0]+","+A[1]+","+A[2]+")"},alphaValue:function(A){var B=A[3]/255;return B*this._layerTransparency},getSize:function(L,E){var G=L.properties;var J=E.field;var M=0;var C=null;if(J){C=G[J];var B=E.minSize;var K=E.maxSize;var D=E.minDataValue;var I=E.maxDataValue;var A;var F=E.normalizationField;var H=G?parseFloat(G[F]):undefined;if(C===null||(F&&((isNaN(H)||H===0)))){return null}if(!isNaN(H)){C/=H}if(B!==null&&K!==null&&D!==null&&I!==null){if(C<=D){M=B}else{if(C>=I){M=K}else{A=(C-D)/(I-D);M=B+(A*(K-B))}}}M=isNaN(M)?0:M}return M},getColor:function(E,J){if(!(E.properties&&J&&J.field&&J.stops)){return null}var L=E.properties;var Q=L[J.field];var D,A,F,H;var K=J.normalizationField;var C=L?parseFloat(L[K]):undefined;if(Q===null||(K&&((isNaN(C)||C===0)))){return null}if(!isNaN(C)){Q/=C}if(Q<=J.stops[0].value){return J.stops[0].color}var G=J.stops[J.stops.length-1];if(Q>=G.value){return G.color}for(var N=0;NQ){A=O.color;H=O.value;break}}}if(!isNaN(F)&&!isNaN(H)){var I=H-F;if(I>0){var P=(Q-F)/I;if(P){var R=(H-Q)/I;if(R){var B=[];for(var M=0;M<4;M++){B[M]=Math.round(D[M]*R+A[M]*P)}return B}else{return A}}else{return D}}}return null}});var b=j.Path.extend({initialize:function(C,B,A){j.setOptions(this,A);this._size=B;this._latlng=j.latLng(C);this._svgCanvasIncludes()},_svgCanvasIncludes:function(){},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_update:function(){if(this._map){this._updatePath()}},_updatePath:function(){},setLatLng:function(A){this._latlng=j.latLng(A);this.redraw();return this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setSize:function(A){this._size=A;return this.redraw()},getSize:function(){return this._size}});var m=b.extend({initialize:function(C,B,A){b.prototype.initialize.call(this,C,B,A)},_updatePath:function(){this._renderer._updateCrossMarker(this)},_svgCanvasIncludes:function(){j.Canvas.include({_updateCrossMarker:function(B){var D=B._point;var C=B._size/2;var A=this._ctx;A.beginPath();A.moveTo(D.x,D.y+C);A.lineTo(D.x,D.y-C);this._fillStroke(A,B);A.moveTo(D.x-C,D.y);A.lineTo(D.x+C,D.y);this._fillStroke(A,B)}});j.SVG.include({_updateCrossMarker:function(A){var D=A._point;var C=A._size/2;if(j.Browser.vml){D._round();C=Math.round(C)}var B="M"+D.x+","+(D.y+C)+"L"+D.x+","+(D.y-C)+"M"+(D.x-C)+","+D.y+"L"+(D.x+C)+","+D.y;this._setPath(A,B)}})}});var w=function(C,B,A){return new m(C,B,A)};var o=b.extend({initialize:function(C,B,A){b.prototype.initialize.call(this,C,B,A)},_updatePath:function(){this._renderer._updateXMarker(this)},_svgCanvasIncludes:function(){j.Canvas.include({_updateXMarker:function(B){var D=B._point;var C=B._size/2;var A=this._ctx;A.beginPath();A.moveTo(D.x+C,D.y+C);A.lineTo(D.x-C,D.y-C);this._fillStroke(A,B)}});j.SVG.include({_updateXMarker:function(A){var D=A._point;var C=A._size/2;if(j.Browser.vml){D._round();C=Math.round(C)}var B="M"+(D.x+C)+","+(D.y+C)+"L"+(D.x-C)+","+(D.y-C)+"M"+(D.x-C)+","+(D.y+C)+"L"+(D.x+C)+","+(D.y-C);this._setPath(A,B)}})}});var a=function(C,B,A){return new o(C,B,A)};var u=b.extend({options:{fill:true},initialize:function(C,B,A){b.prototype.initialize.call(this,C,B,A)},_updatePath:function(){this._renderer._updateSquareMarker(this)},_svgCanvasIncludes:function(){j.Canvas.include({_updateSquareMarker:function(B){var D=B._point;var C=B._size/2;var A=this._ctx;A.beginPath();A.moveTo(D.x+C,D.y+C);A.lineTo(D.x-C,D.y+C);A.lineTo(D.x-C,D.y-C);A.lineTo(D.x+C,D.y-C);A.closePath();this._fillStroke(A,B)}});j.SVG.include({_updateSquareMarker:function(A){var D=A._point;var C=A._size/2;if(j.Browser.vml){D._round();C=Math.round(C)}var B="M"+(D.x+C)+","+(D.y+C)+"L"+(D.x-C)+","+(D.y+C)+"L"+(D.x-C)+","+(D.y-C)+"L"+(D.x+C)+","+(D.y-C);B=B+(j.Browser.svg?"z":"x");this._setPath(A,B)}})}});var d=function(C,B,A){return new u(C,B,A)};var n=b.extend({options:{fill:true},initialize:function(C,B,A){b.prototype.initialize.call(this,C,B,A)},_updatePath:function(){this._renderer._updateDiamondMarker(this)},_svgCanvasIncludes:function(){j.Canvas.include({_updateDiamondMarker:function(B){var D=B._point;var C=B._size/2;var A=this._ctx;A.beginPath();A.moveTo(D.x,D.y+C);A.lineTo(D.x-C,D.y);A.lineTo(D.x,D.y-C);A.lineTo(D.x+C,D.y);A.closePath();this._fillStroke(A,B)}});j.SVG.include({_updateDiamondMarker:function(A){var D=A._point;var C=A._size/2;if(j.Browser.vml){D._round();C=Math.round(C)}var B="M"+D.x+","+(D.y+C)+"L"+(D.x-C)+","+D.y+"L"+D.x+","+(D.y-C)+"L"+(D.x+C)+","+D.y;B=B+(j.Browser.svg?"z":"x");this._setPath(A,B)}})}});var v=function(C,B,A){return new n(C,B,A)};var r=p.extend({statics:{MARKERTYPES:["esriSMSCircle","esriSMSCross","esriSMSDiamond","esriSMSSquare","esriSMSX","esriPMS"]},initialize:function(C,B){p.prototype.initialize.call(this,C,B);if(B){this.serviceUrl=B.url}if(C){if(C.type==="esriPMS"){var A=this.serviceUrl+"images/"+this._symbolJson.url;this._iconUrl=B&&B.token?A+"?token="+B.token:A;this._icons={};this.icon=this._createIcon(this._symbolJson)}else{this._fillStyles()}}},_fillStyles:function(){if(this._symbolJson.outline&&this._symbolJson.size>0){this._styles.stroke=true;this._styles.weight=this.pixelValue(this._symbolJson.outline.width);this._styles.color=this.colorValue(this._symbolJson.outline.color);this._styles.opacity=this.alphaValue(this._symbolJson.outline.color)}else{this._styles.stroke=false}if(this._symbolJson.color){this._styles.fillColor=this.colorValue(this._symbolJson.color);this._styles.fillOpacity=this.alphaValue(this._symbolJson.color)}else{this._styles.fillOpacity=0}if(this._symbolJson.style==="esriSMSCircle"){this._styles.radius=this.pixelValue(this._symbolJson.size)/2}},_createIcon:function(B){var E=this.pixelValue(B.width);var A=E;if(B.height){A=this.pixelValue(B.height)}var D=E/2;var F=A/2;if(B.xoffset){D+=this.pixelValue(B.xoffset)}if(B.yoffset){F+=this.pixelValue(B.yoffset)}var C=j.icon({iconUrl:this._iconUrl,iconSize:[E,A],iconAnchor:[D,F]});this._icons[B.width.toString()]=C;return C},_getIcon:function(A){var B=this._icons[A.toString()];if(!B){B=this._createIcon({width:A})}return B},pointToLayer:function(C,H,E,B){var D=this._symbolJson.size||this._symbolJson.width;if(!this._isDefault){if(E.sizeInfo){var G=this.getSize(C,E.sizeInfo);if(G){D=G}}if(E.colorInfo){var A=this.getColor(C,E.colorInfo);if(A){this._styles.fillColor=this.colorValue(A);this._styles.fillOpacity=this.alphaValue(A)}}}if(this._symbolJson.type==="esriPMS"){var F=j.extend({},{icon:this._getIcon(D)},B);return j.marker(H,F)}D=this.pixelValue(D);switch(this._symbolJson.style){case"esriSMSSquare":return d(H,D,j.extend({},this._styles,B));case"esriSMSDiamond":return v(H,D,j.extend({},this._styles,B));case"esriSMSCross":return w(H,D,j.extend({},this._styles,B));case"esriSMSX":return a(H,D,j.extend({},this._styles,B))}this._styles.radius=D/2;return j.circleMarker(H,j.extend({},this._styles,B))}});function l(B,A){return new r(B,A)}var s=p.extend({statics:{LINETYPES:["esriSLSDash","esriSLSDot","esriSLSDashDotDot","esriSLSDashDot","esriSLSSolid"]},initialize:function(B,A){p.prototype.initialize.call(this,B,A);this._fillStyles()},_fillStyles:function(){this._styles.lineCap="butt";this._styles.lineJoin="miter";this._styles.fill=false;this._styles.weight=0;if(!this._symbolJson){return this._styles}if(this._symbolJson.color){this._styles.color=this.colorValue(this._symbolJson.color);this._styles.opacity=this.alphaValue(this._symbolJson.color)}if(!isNaN(this._symbolJson.width)){this._styles.weight=this.pixelValue(this._symbolJson.width);var A=[];switch(this._symbolJson.style){case"esriSLSDash":A=[4,3];break;case"esriSLSDot":A=[1,3];break;case"esriSLSDashDot":A=[8,3,1,3];break;case"esriSLSDashDotDot":A=[8,3,1,3,1,3];break}if(A.length>0){for(var B=0;B=0)){this._styles.fill=true;this._styles.fillColor=this.colorValue(this._symbolJson.color);this._styles.fillOpacity=this.alphaValue(this._symbolJson.color)}else{this._styles.fill=false;this._styles.fillOpacity=0}}},style:function(B,C){if(!this._isDefault&&C&&C.colorInfo){var A=this.getColor(B,C.colorInfo);if(A){this._styles.fillColor=this.colorValue(A);this._styles.fillOpacity=this.alphaValue(A)}}return this._styles}});function f(B,A){return new z(B,A)}var t=j.Class.extend({options:{proportionalPolygon:false,clickable:true},initialize:function(B,A){this._rendererJson=B;this._pointSymbols=false;this._symbols=[];this._visualVariables=this._parseVisualVariables(B.visualVariables);j.Util.setOptions(this,A)},_parseVisualVariables:function(C){var A={};if(C){for(var B=0;B=0;B--){if(this.options.proportionalPolygon&&this._rendererJson.backgroundFillSymbol){C=this._newSymbol(this._rendererJson.backgroundFillSymbol)}else{C=this._newSymbol(A[B].symbol)}C.val=A[B].classMaxValue;this._symbols.push(C)}this._symbols.sort(function(E,D){return E.val>D.val?1:-1});this._createDefaultSymbol();this._maxValue=this._symbols[this._symbols.length-1].val},_getSymbol:function(C){var E=C.properties[this._field];if(this._normalizationField){var A=C.properties[this._normalizationField];if(!isNaN(A)&&A!==0){E=E/A}else{return this._defaultSymbol}}if(E>this._maxValue){return this._defaultSymbol}var D=this._symbols[0];for(var B=this._symbols.length-1;B>=0;B--){if(E>this._symbols[B].val){break}D=this._symbols[B]}return D}});function c(B,A){return new e(B,A)}var h=t.extend({initialize:function(B,A){t.prototype.initialize.call(this,B,A);this._field=this._rendererJson.field1;this._createSymbols()},_createSymbols:function(){var B;var C=this._rendererJson.uniqueValueInfos;for(var A=C.length-1;A>=0;A--){B=this._newSymbol(C[A].symbol);B.val=C[A].value;this._symbols.push(B)}this._createDefaultSymbol()},_getSymbol:function(B){var F=B.properties[this._field];if(this._rendererJson.fieldDelimiter&&this._rendererJson.field2){var D=B.properties[this._rendererJson.field2];if(D){F+=this._rendererJson.fieldDelimiter+D;var C=B.properties[this._rendererJson.field3];if(C){F+=this._rendererJson.fieldDelimiter+C}}}var E=this._defaultSymbol;for(var A=this._symbols.length-1;A>=0;A--){if(this._symbols[A].val==F){E=this._symbols[A]}}return E}});function q(B,A){return new h(B,A)}j.esri.FeatureLayer.addInitHook(function(){if(this.options.ignoreRenderer){return}var A=j.Util.bind(this.onAdd,this);var C=j.Util.bind(this.unbindPopup,this);var B=j.Util.bind(this.onRemove,this);j.Util.bind(this.createNewLayer,this);this.metadata(function(E,D){if(E){return}if(D&&D.drawingInfo){this._setRenderers(D)}if(this._alreadyAdded){this.setStyle(this._originalStyle)}},this);this.onAdd=function(D){A(D);this._addPointLayer(D);this._alreadyAdded=true};this.onRemove=function(F){B(F);if(this._pointLayer){var D=this._pointLayer.getLayers();for(var E in D){F.removeLayer(D[E])}}};this.unbindPopup=function(){C();if(this._pointLayer){var D=this._pointLayer.getLayers();for(var E in D){D[E].unbindPopup()}}};this._addPointLayer=function(D){if(this._pointLayer){this._pointLayer.addTo(D);this._pointLayer.bringToFront()}};this._createPointLayer=function(){if(!this._pointLayer){this._pointLayer=j.geoJson();this._pointLayerIds={};if(this._popup){var D=function(F,E){E.bindPopup(this._popup(F,E),this._popupOptions)};this._pointLayer.options.onEachFeature=j.Util.bind(D,this)}}};this.createNewLayer=function(E){var H=j.GeoJSON.geometryToLayer(E,this.options);if(this._hasProportionalSymbols){var F=this.getPolygonCentroid(E.geometry.coordinates);if(!(isNaN(F[0])||isNaN(F[0]))){this._createPointLayer();var G=E.id.toString();if(!this._pointLayerIds[G]){var D=this.getPointJson(E,F);this._pointLayer.addData(D);this._pointLayerIds[G]=true}this._pointLayer.bringToFront()}}return H};this.getPolygonCentroid=function(K){var N=K[0][0];if(N.length===2){N=K[0]}var G=0;var J=0;var I=0;var D=N.length;var M;var L;var H;for(var F=0,E=D-1;Fw||w>=D||0>z||z>=D)){var v=this.buffers.circleVertex.index-this.elementGroups.current.vertexStartIndex;this.buffers.circleVertex.add(w,z,-1,-1),this.buffers.circleVertex.add(w,z,1,-1),this.buffers.circleVertex.add(w,z,1,1),this.buffers.circleVertex.add(w,z,-1,1),this.elementGroups.elementBuffer.add(v,v+1,v+2),this.elementGroups.elementBuffer.add(v,v+3,v+2),this.elementGroups.current.vertexLength+=4,this.elementGroups.current.elementLength+=2}}}}},{"./element_groups":14}],13:[function(r,q,t){function u(G,K,F,B,E){var H=new s("layout",G.type,G.layout,{}).values(),I={lastIntegerZoom:1/0,lastIntegerZoomTime:0,lastZoom:0},J={};for(var C in H){J[C]=H[C].calculate(F,I)}"symbol"===G.type&&(H["text-size"]&&(J["text-max-size"]=H["text-size"].calculate(18,I),J["text-size"]=H["text-size"].calculate(F+1,I)),H["icon-size"]&&(J["icon-max-size"]=H["icon-size"].calculate(18,I),J["icon-size"]=H["icon-size"].calculate(F+1,I)));var M="line"===G.type?A:"fill"===G.type?v:"symbol"===G.type?w:"circle"===G.type?p:null,D=new M(K,new z[G.type](J),B,F,E);return D.id=G.id,D.type=G.type,D["source-layer"]=G["source-layer"],D.interactive=G.interactive,D.minZoom=G.minzoom,D.maxZoom=G.maxzoom,D.filter=o(G.filter),D.features=[],D}q.exports=u;var A=r("./line_bucket"),v=r("./fill_bucket"),w=r("./symbol_bucket"),p=r("./circle_bucket"),z=r("../style/layout_properties"),o=r("feature-filter"),s=r("../style/style_declaration_set")},{"../style/layout_properties":53,"../style/style_declaration_set":59,"./circle_bucket":12,"./fill_bucket":16,"./line_bucket":17,"./symbol_bucket":18,"feature-filter":108}],14:[function(p,q,o){function r(v,u,w){this.vertexBuffer=v,this.elementBuffer=u,this.secondElementBuffer=w,this.groups=[]}function s(v,u,w){this.vertexStartIndex=v,this.elementStartIndex=u,this.secondElementStartIndex=w,this.elementLength=0,this.vertexLength=0,this.secondElementLength=0}q.exports=r,r.prototype.makeRoomFor=function(t){(!this.current||this.current.vertexLength+t>65535)&&(this.current=new s(this.vertexBuffer.index,this.elementBuffer&&this.elementBuffer.index,this.secondElementBuffer&&this.secondElementBuffer.index),this.groups.push(this.current))}},{}],15:[function(u,q,G){function s(I,J){this.x=I.x,this.y=I.y,this.z=I.z-Math.log(J)/Math.LN2,this.rtree=w(9),this.toBeInserted=[]}function C(I,J,K){return"Point"===J?p(I,K):"LineString"===J?F(I,K):"Polygon"===J?A(I,K)||F(I,K):!1}function A(I,J){return r(I,new E(J[0],J[1]))||r(I,new E(J[0],J[3]))||r(I,new E(J[2],J[1]))||r(I,new E(J[2],J[3]))?!0:F(I,J)}function F(R,O){for(var K=0;K=P}var I=(O-J.y)/(N.y-J.y),K=J.x+I*(N.x-J.x);return K>=P&&M>=K&&1>=I&&I>=0}function p(I,K){for(var N=0;N=K[0]&&J[M].y>=K[1]&&J[M].x<=K[2]&&J[M].y<=K[3]){return !0}}}return !1}function t(I,K,M,J){return"Point"===K?D(I,M,J):"LineString"===K?B(I,M,J):"Polygon"===K?r(I,M)||B(I,M,J):!1}function H(I,K,N){var J=K.distSqr(N);if(0===J){return I.distSqr(K)}var M=((I.x-K.x)*(N.x-K.x)+(I.y-K.y)*(N.y-K.y))/J;return 0>M?I.distSqr(K):M>1?I.distSqr(N):I.distSqr(N.sub(K)._mult(M)._add(K))}function B(Q,N,K){for(var I=K*K,J=0;JN.y!=J.y>N.y&&N.x<(J.x-I.x)*(N.y-I.y)/(J.y-I.y)+I.x&&(M=!M)}}return M}function D(J,N,P){for(var M=P*P,O=0;O=2&&(z.x!==C[0].x||z.y!==C[0].y)&&(F.add(D,A,v),B.elementLength++),E>=1&&(H.add(A,v),B.secondElementLength++),A=v}}}},{"./element_groups":14}],17:[function(q,r,p){function o(v,u){this.buffers=v,this.elementGroups=new s(v.lineVertex,v.lineElement),this.layoutProperties=u}var s=q("./element_groups");r.exports=o,o.prototype.addFeatures=function(){for(var z=this.features,v=0;v2&&am[ae-1].equals(am[ae-2]);){ae--}if(!(am.length<2)){"bevel"===W&&(ai=1.05);var T=am[0],aj=am[ae-1],an=T.equals(aj);if(this.elementGroups.makeRoomFor(10*ae),2!==ae||!an){var aq,ag,ad,al,af,ac,N,Q=Z,ao=an?"butt":Z,w=1,ap=0,ar=!0;this.e1=this.e2=this.e3=-1,an&&(aq=am[ae-2],af=T.sub(aq)._unit()._perp());for(var J=0;ae>J;J++){if(ad=an&&J===ae-1?am[1]:am[J+1],!ad||!am[J].equals(ad)){af&&(al=af),aq&&(ag=aq),aq=am[J],ag&&(ap+=aq.dist(ag)),af=ad?ad.sub(aq)._unit()._perp():al,al=al||af;var H=al.add(af)._unit(),Y=H.x*af.x+H.y*af.y,ak=1/Y,ah=ag&&ad,O=ah?W:ad?Q:ao;if(ah&&"round"===O&&(X>ak?O="miter":2>=ak&&(O="fakeround")),"miter"===O&&ak>ai&&(O="bevel"),"bevel"===O&&(ak>2&&(O="flipbevel"),ai>ak&&(O="miter")),"miter"===O){H._mult(ak),this.addCurrentVertex(aq,w,ap,H,0,0,!1)}else{if("flipbevel"===O){if(ak>100){H=af.clone()}else{var ab=al.x*af.y-al.y*af.x>0?-1:1,aa=ak*al.add(af).mag()/al.sub(af).mag();H._perp()._mult(aa*ab)}this.addCurrentVertex(aq,w,ap,H,0,0,!1),w=-w}else{if("bevel"===O||"fakeround"===O){var A=w*(al.x*af.y-al.y*af.x)>0,z=-Math.sqrt(ak*ak-1);if(A?(N=0,ac=z):(ac=0,N=z),ar||this.addCurrentVertex(aq,w,ap,al,ac,N,!1),"fakeround"===O){for(var U,R=Math.floor(8*(0.5-(Y-0.5))),K=0;R>K;K++){U=af.mult((K+1)/(R+1))._add(al)._unit(),this.addPieSliceVertex(aq,w,ap,U,A)}this.addPieSliceVertex(aq,w,ap,H,A);for(var D=R-1;D>=0;D--){U=al.mult((D+1)/(R+1))._add(af)._unit(),this.addPieSliceVertex(aq,w,ap,U,A)}}ad&&this.addCurrentVertex(aq,w,ap,af,-ac,-N,!1)}else{"butt"===O?(ar||this.addCurrentVertex(aq,w,ap,al,0,0,!1),ad&&this.addCurrentVertex(aq,w,ap,af,0,0,!1)):"square"===O?(ar||(this.addCurrentVertex(aq,w,ap,al,1,1,!1),this.e1=this.e2=-1,w=1),ad&&this.addCurrentVertex(aq,w,ap,af,-1,-1,!1)):"round"===O&&(ar||(this.addCurrentVertex(aq,w,ap,al,0,0,!1),this.addCurrentVertex(aq,w,ap,al,1,1,!0),this.e1=this.e2=-1,w=1),ad&&(this.addCurrentVertex(aq,w,ap,af,-1,-1,!0),this.addCurrentVertex(aq,w,ap,af,0,0,!1)))}}}ar=!1}}}}},o.prototype.addCurrentVertex=function(E,I,v,B,J,z,H){var C,F=H?1:0,G=this.buffers.lineVertex,A=this.buffers.lineElement,w=this.elementGroups.current,D=this.elementGroups.current.vertexStartIndex;C=B.mult(I),J&&C._sub(B.perp()._mult(J)),this.e3=G.add(E,C,F,0,v)-D,this.e1>=0&&this.e2>=0&&(A.add(this.e1,this.e2,this.e3),w.elementLength++),this.e1=this.e2,this.e2=this.e3,C=B.mult(-I),z&&C._sub(B.perp()._mult(z)),this.e3=G.add(E,C,F,1,v)-D,this.e1>=0&&this.e2>=0&&(A.add(this.e1,this.e2,this.e3),w.elementLength++),this.e1=this.e2,this.e2=this.e3,w.vertexLength+=2},o.prototype.addPieSliceVertex=function(B,F,v,z,G){var w=this.buffers.lineVertex,E=this.buffers.lineElement,A=this.elementGroups.current,C=this.elementGroups.current.vertexStartIndex,D=G;z=z.mult(F*(G?-1:1)),this.e3=w.add(B,z,0,D,v)-C,A.vertexLength+=1,this.e1>=0&&this.e2>=0&&(E.add(this.e1,this.e2,this.e3),A.elementLength++),G?this.e2=this.e3:this.e1=this.e3}},{"./element_groups":14}],18:[function(A,q,K){function E(Q,O,R,N,P){this.buffers=Q,this.layoutProperties=O,this.overscaling=R,this.zoom=N,this.collisionDebug=P;var S=512*R,M=4096;this.tilePixelRatio=M/S,this.compareText={},this.symbolInstances=[]}function o(S,W,N,Q,X,O,U,P,M,T,R,V){this.x=S.x,this.y=S.y,this.hasText=!!N,this.hasIcon=!!Q,this.hasText&&(this.glyphQuads=O?B(S,N,U,W,X,M):[],this.textCollisionFeature=new H(W,S,N,U,P,M)),this.hasIcon&&(this.iconQuads=O?s(S,Q,T,W,X,V):[],this.iconCollisionFeature=new H(W,S,Q,T,R,V))}var t=A("./element_groups"),G=A("../symbol/anchor"),v=A("../symbol/get_anchors"),I=A("../util/token"),F=A("../symbol/quads"),u=A("../symbol/shaping"),p=A("../symbol/resolve_text"),w=A("../symbol/resolve_icons"),C=A("../symbol/mergelines"),z=u.shapeText,D=u.shapeIcon,B=F.getGlyphQuads,s=F.getIconQuads,r=A("../symbol/clip_line"),J=A("point-geometry"),H=A("../symbol/collision_feature");q.exports=E,E.prototype.needsPlacement=!0,E.prototype.addFeatures=function(ac){var Q=this.layoutProperties,U=this.features,Y=this.textFeatures,R=0.5,V=0.5;switch(Q["text-anchor"]){case"right":case"top-right":case"bottom-right":R=1;break;case"left":case"top-left":case"bottom-left":R=0}switch(Q["text-anchor"]){case"bottom":case"bottom-right":case"bottom-left":V=1;break;case"top":case"top-right":case"top-left":V=0}for(var ag="right"===Q["text-justify"]?1:"left"===Q["text-justify"]?0:0.5,X=24,S=Q["text-line-height"]*X,ae="line"!==Q["symbol-placement"]?Q["text-max-width"]*X:0,Z=Q["text-letter-spacing"]*X,P=[Q["text-offset"][0]*X,Q["text-offset"][1]*X],W=Q["text-font"].join(","),T=[],N=0;NN;N++){var O=T[N];if(!(Y&&aj&&this.anchorIsTooClose(Y.text,ak,O))){var Q=!(O.x<0||O.x>4096||O.y<0||O.y>4096);if(!ai||Q){var ag=Q||am;this.symbolInstances.push(new o(O,V,Y,ac,ah,ag,ap,X,U,aa,ae,R))}}}}},E.prototype.anchorIsTooClose=function(P,N,Q){var M=this.compareText;if(P in M){for(var O=M[P],R=O.length-1;R>=0;R--){if(Q.dist(O[R])=aa&&this.addSymbols(P.glyphVertex,P.glyphElement,X.text,S.glyphQuads,aa,Q["text-keep-upright"],af,ab.angle)),M&&(Q["icon-ignore-placement"]||ab.insertCollisionFeature(S.iconCollisionFeature,ae),U>=ae&&this.addSymbols(P.iconVertex,P.iconElement,X.icon,S.iconQuads,ae,Q["icon-keep-upright"],W,ab.angle))}T&&this.addToDebugBuffers(ab)},E.prototype.addSymbols=function(ag,U,Y,ac,V,Z,ak,ab){Y.makeRoomFor(4*ac.length);for(var W=Y.current,ai=this.zoom,ad=Math.max(Math.log(V)/Math.LN2+ai,0),T=0;T3*Math.PI/2))){var N=aa.tl,ah=aa.tr,ae=aa.bl,af=aa.br,aj=aa.tex,Q=aa.anchorPoint,O=Math.max(ai+Math.log(aa.minScale)/Math.LN2,ad),M=Math.min(ai+Math.log(aa.maxScale)/Math.LN2,25);if(!(O>=M)){O===ad&&(O=0);var R=ag.index-W.vertexStartIndex;ag.add(Q.x,Q.y,N.x,N.y,aj.x,aj.y,O,M,ad),ag.add(Q.x,Q.y,ah.x,ah.y,aj.x+aj.w,aj.y,O,M,ad),ag.add(Q.x,Q.y,ae.x,ae.y,aj.x,aj.y+aj.h,O,M,ad),ag.add(Q.x,Q.y,af.x,af.y,aj.x+aj.w,aj.y+aj.h,O,M,ad),W.vertexLength+=4,U.add(R,R+1,R+2),U.add(R+1,R+2,R+3),W.elementLength+=2}}}},E.prototype.getDependencies=function(P,N,Q){function M(R){return R||O?Q(R):void (O=!0)}var O=!1;this.getTextDependencies(P,N,M),this.getIconDependencies(P,N,M)},E.prototype.getIconDependencies=function(P,N,Q){function M(T,S){return T?Q(T):(this.icons=S,void Q())}if(this.layoutProperties["icon-image"]){var O=this.features,R=w(O,this.layoutProperties);R.length?N.send("get icons",{icons:R},M.bind(this)):Q()}else{Q()}},E.prototype.getTextDependencies=function(R,P,S){var O=this.features,Q=this.layoutProperties["text-font"],T=this.stacks=R.stacks;void 0===T[Q]&&(T[Q]={});var N=T[Q],M=p(O,this.layoutProperties,N);this.textFeatures=M.textFeatures,P.send("get glyphs",{uid:R.uid,fontstack:Q,codepoints:M.codepoints},function(W,V){if(W){return S(W)}for(var U in V){N[U]=V[U]}S()})},E.prototype.addToDebugBuffers=function(U){this.elementGroups.collisionBox=new t(this.buffers.collisionBoxVertex),this.elementGroups.collisionBox.makeRoomFor(0);for(var ab=this.buffers.collisionBoxVertex,O=-U.angle,S=U.yStretch,ac=0;acP;P++){var Z=this.symbolInstances[ac][0===P?"textCollisionFeature":"iconCollisionFeature"];if(Z){for(var R=Z.boxes,M=0;M90||this.lat<-90){throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}}q.exports=s;var r=p("../util/util").wrap;s.prototype.wrap=function(){return new s(r(this.lng,-180,180),this.lat)},s.convert=function(u){return u instanceof s?u:Array.isArray(u)?new s(u[0],u[1]):u}},{"../util/util":106}],21:[function(p,q,o){function r(v,A){if(v){for(var z=A?[v,A]:v,w=0,u=z.length;u>w;w++){this.extend(z[w])}}}q.exports=r;var s=p("./lng_lat");r.prototype={extend:function(v){var A,z,w=this._sw,u=this._ne;if(v instanceof s){A=v,z=v}else{if(!(v instanceof r)){return v?this.extend(s.convert(v)||r.convert(v)):this}if(A=v._sw,z=v._ne,!A||!z){return this}}return w||u?(w.lng=Math.min(A.lng,w.lng),w.lat=Math.min(A.lat,w.lat),u.lng=Math.max(z.lng,u.lng),u.lat=Math.max(z.lat,u.lat)):(this._sw=new s(A.lng,A.lat),this._ne=new s(z.lng,z.lat)),this},getCenter:function(){return new s((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},getSouthWest:function(){return this._sw},getNorthEast:function(){return this._ne},getNorthWest:function(){return new s(this.getWest(),this.getNorth())},getSouthEast:function(){return new s(this.getEast(),this.getSouth())},getWest:function(){return this._sw.lng},getSouth:function(){return this._sw.lat},getEast:function(){return this._ne.lng},getNorth:function(){return this._ne.lat}},r.convert=function(u){return !u||u instanceof r?u:new r(u)}},{"./lng_lat":20}],22:[function(r,q,t){function s(C,B){this.tileSize=512,this._minZoom=C||0,this._maxZoom=B||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this.zoom=0,this.center=new w(0,0),this.angle=0,this._altitude=1.5,this._pitch=0}var w=r("./lng_lat"),v=r("point-geometry"),z=r("./coordinate"),p=r("../util/util").wrap,A=r("../util/interpolate"),u=r("gl-matrix").vec4,o=r("gl-matrix").mat4;q.exports=s,s.prototype={get minZoomfunction(){return this._minZoom},set minZoomfunction(B){this._minZoom=B,this.zoom=Math.max(this.zoom,B)},get maxZoomfunction(){return this._maxZoom},set maxZoomfunction(B){this._maxZoom=B,this.zoom=Math.min(this.zoom,B)},get worldSizefunction(){return this.tileSize*this.scale},get centerPointfunction(){return this.size._div(2)},get sizefunction(){return new v(this.width,this.height)},get bearingfunction(){return -this.angle/Math.PI*180},set bearingfunction(B){this.angle=-p(B,-180,180)*Math.PI/180},get pitchfunction(){return this._pitch/Math.PI*180},set pitchfunction(B){this._pitch=Math.min(60,B)/180*Math.PI},get altitudefunction(){return this._altitude},set altitudefunction(B){this._altitude=Math.max(0.75,B)},get zoomfunction(){return this._zoom},set zoomfunction(B){B=Math.min(Math.max(B,this.minZoom),this.maxZoom),this._zoom=B,this.scale=this.zoomScale(B),this.tileZoom=Math.floor(B),this.zoomFraction=B-this.tileZoom,this._constrain()},get centerfunction(){return this._center},set centerfunction(B){this._center=B,this._constrain()},zoomScale:function(B){return Math.pow(2,B)},scaleZoom:function(B){return Math.log(B)/Math.LN2},project:function(C,B){return new v(this.lngX(C.lng,B),this.latY(C.lat,B))},unproject:function(C,B){return new w(this.xLng(C.x,B),this.yLat(C.y,B))},get xfunction(){return this.lngX(this.center.lng)},get yfunction(){return this.latY(this.center.lat)},get pointfunction(){return new v(this.x,this.y)},lngX:function(C,B){return(180+C)*(B||this.worldSize)/360},latY:function(C,B){var D=180/Math.PI*Math.log(Math.tan(Math.PI/4+C*Math.PI/360));return(180-D)*(B||this.worldSize)/360},xLng:function(C,B){return 360*C/(B||this.worldSize)-180},yLat:function(C,B){var D=180-360*C/(B||this.worldSize);return 360/Math.PI*Math.atan(Math.exp(D*Math.PI/180))-90},panBy:function(C){var B=this.centerPoint._add(C);this.center=this.pointLocation(B)},setLocationAtPoint:function(D,C){var G=this.locationCoordinate(D),F=this.pointCoordinate(C),E=this.pointCoordinate(this.centerPoint),B=F._sub(G);this.center=this.coordinateLocation(E._sub(B))},setZoomAround:function(C,B){var D;B&&(D=this.locationPoint(B)),this.zoom=C,B&&this.setLocationAtPoint(B,D)},setBearingAround:function(C,B){var D;B&&(D=this.locationPoint(B)),this.bearing=C,B&&this.setLocationAtPoint(B,D)},locationPoint:function(B){return this.coordinatePoint(this.locationCoordinate(B))},pointLocation:function(B){return this.coordinateLocation(this.pointCoordinate(B))},locationCoordinate:function(C){var B=this.zoomScale(this.tileZoom)/this.worldSize,D=w.convert(C);return new z(this.lngX(D.lng)*B,this.latY(D.lat)*B,this.tileZoom)},coordinateLocation:function(C){var B=this.zoomScale(C.zoom);return new w(this.xLng(C.column,B),this.yLat(C.row,B))},pointCoordinate:function(P,G){void 0===G&&(G=0);var D=this.coordinatePointMatrix(this.tileZoom),C=o.invert(new Float64Array(16),D);if(!C){throw new Error("failed to invert matrix")}var K=u.transformMat4([],[P.x,P.y,0,1],C),N=u.transformMat4([],[P.x,P.y,1,1],C),B=K[3],H=N[3],Q=K[0]/B,M=N[0]/H,O=K[1]/B,F=N[1]/H,E=K[2]/B,I=N[2]/H,J=E===I?0:(G-E)/(I-E);return new z(A(Q,M,J),A(O,F,J),this.tileZoom)},coordinatePoint:function(C){var B=this.coordinatePointMatrix(C.zoom),D=u.transformMat4([],[C.column,C.row,0,1],B);return new v(D[0]/D[3],D[1]/D[3])},coordinatePointMatrix:function(C){var B=this.getProjMatrix(),D=this.worldSize/this.zoomScale(C);return o.scale(B,B,[D,D,1]),o.multiply(B,this.getPixelMatrix(),B),B},getPixelMatrix:function(){var B=o.create();return o.scale(B,B,[this.width/2,-this.height/2,1]),o.translate(B,B,[1,-1,0]),B},_constrain:function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var O,G,D,C,J,M,B,H,P=this.size;this.latRange&&(O=this.latY(this.latRange[1]),G=this.latY(this.latRange[0]),J=G-ON-F&&(H=O+F),N+F>G&&(H=G-F)}if(this.lngRange){var E=this.x,I=P.x/2;D>E-I&&(B=D+I),E+I>C&&(B=C-I)}(void 0!==B||void 0!==H)&&(this.center=this.unproject(new v(void 0!==B?B:this.x,void 0!==H?H:this.y))),this._constraining=!1}},getProjMatrix:function(){var C=new Float64Array(16),B=Math.atan(0.5/this.altitude),E=Math.sin(B)*this.altitude/Math.sin(Math.PI/2-this._pitch-B),D=Math.cos(Math.PI/2-this._pitch)*E+this.altitude;return o.perspective(C,2*Math.atan(this.height/2/this.altitude),this.width/this.height,0.1,D),o.translate(C,C,[0,0,-this.altitude]),o.scale(C,C,[1,-1,1/this.height]),o.rotateX(C,C,this._pitch),o.rotateZ(C,C,this.angle),o.translate(C,C,[-this.x,-this.y,0]),C}}},{"../util/interpolate":102,"../util/util":106,"./coordinate":19,"./lng_lat":20,"gl-matrix":116,"point-geometry":137}],23:[function(q,r,p){var o={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]};r.exports=function(B,A,I,F){F=F||1;var v,z,H,J,C,G,E,w,D=[];for(v=0,z=B.length;z>v;v++){if(C=o[B[v]]){for(w=null,H=0,J=C[1].length;J>H;H+=2){-1===C[1][H]&&-1===C[1][H+1]?w=null:(G=A+C[1][H]*F,E=I-C[1][H+1]*F,w&&D.push(w.x,w.y,G,E),w={x:G,y:E})}A+=C[0]*F}}return D}},{}],24:[function(q,r,o){var t=r.exports={};t.Map=q("./ui/map"),t.Control=q("./ui/control/control"),t.Navigation=q("./ui/control/navigation"),t.Attribution=q("./ui/control/attribution"),t.Popup=q("./ui/popup"),t.GeoJSONSource=q("./source/geojson_source"),t.VideoSource=q("./source/video_source"),t.ImageSource=q("./source/image_source"),t.Style=q("./style/style"),t.LngLat=q("./geo/lng_lat"),t.LngLatBounds=q("./geo/lng_lat_bounds"),t.Point=q("point-geometry"),t.Evented=q("./util/evented"),t.util=q("./util/util"),t.supported=q("./util/browser").supported;var s=q("./util/ajax");t.util.getJSON=s.getJSON,t.util.getArrayBuffer=s.getArrayBuffer;var p=q("./util/config");t.config=p,Object.defineProperty(t,"accessToken",{get:function(){return p.ACCESS_TOKEN},set:function(u){p.ACCESS_TOKEN=u}})},{"./geo/lng_lat":20,"./geo/lng_lat_bounds":21,"./source/geojson_source":39,"./source/image_source":41,"./source/video_source":48,"./style/style":56,"./ui/control/attribution":79,"./ui/control/control":80,"./ui/control/navigation":81,"./ui/map":91,"./ui/popup":92,"./util/ajax":94,"./util/browser":95,"./util/config":99,"./util/evented":100,"./util/util":106,"point-geometry":137}],25:[function(p,r,o){function s(N,J,v){var G,E=N.gl,z=J.paint["background-color"],A=J.paint["background-pattern"],C=J.paint["background-opacity"],M=A?N.spriteAtlas.getPosition(A.from,!0):null,B=A?N.spriteAtlas.getPosition(A.to,!0):null;if(M&&B){G=N.patternShader,E.switchShader(G,v),E.uniform1i(G.u_image,0),E.uniform2fv(G.u_pattern_tl_a,M.tl),E.uniform2fv(G.u_pattern_br_a,M.br),E.uniform2fv(G.u_pattern_tl_b,B.tl),E.uniform2fv(G.u_pattern_br_b,B.br),E.uniform1f(G.u_opacity,C);var I=N.transform,F=M.size,O=B.size,K=I.locationCoordinate(I.center),D=1/Math.pow(2,I.zoomFraction);E.uniform1f(G.u_mix,A.t);var H=q.create();q.scale(H,H,[1/(F[0]*A.fromScale),1/(F[1]*A.fromScale)]),q.translate(H,H,[K.column*I.tileSize%(F[0]*A.fromScale),K.row*I.tileSize%(F[1]*A.fromScale)]),q.rotate(H,H,-I.angle),q.scale(H,H,[D*I.width/2,-D*I.height/2]);var w=q.create();q.scale(w,w,[1/(O[0]*A.toScale),1/(O[1]*A.toScale)]),q.translate(w,w,[K.column*I.tileSize%(O[0]*A.toScale),K.row*I.tileSize%(O[1]*A.toScale)]),q.rotate(w,w,-I.angle),q.scale(w,w,[D*I.width/2,-D*I.height/2]),E.uniformMatrix3fv(G.u_patternmatrix_a,!1,H),E.uniformMatrix3fv(G.u_patternmatrix_b,!1,w),N.spriteAtlas.bind(E,!0)}else{G=N.fillShader,E.switchShader(G,v),E.uniform4fv(G.u_color,z)}E.disable(E.STENCIL_TEST),E.bindBuffer(E.ARRAY_BUFFER,N.backgroundBuffer),E.vertexAttribPointer(G.a_pos,N.backgroundBuffer.itemSize,E.SHORT,!1,0,0),E.drawArrays(E.TRIANGLE_STRIP,0,N.backgroundBuffer.itemCount),E.enable(E.STENCIL_TEST),E.stencilMask(0),E.stencilFunc(E.EQUAL,128,128)}var q=p("gl-matrix").mat3;r.exports=s},{"gl-matrix":116}],26:[function(r,s,p){function o(E,v,C,I){if(I.buffers){C=E.translateMatrix(C,I,v.paint["circle-translate"],v.paint["circle-translate-anchor"]);var K=I.elementGroups[v.ref||v.id];if(K){var A=E.gl;A.disable(A.STENCIL_TEST),A.switchShader(E.circleShader,C,I.exMatrix);var G=I.buffers.circleVertex,z=E.circleShader,M=I.buffers.circleElement,J=1/q.devicePixelRatio/v.paint["circle-radius"];A.uniform4fv(z.u_color,v.paint["circle-color"]),A.uniform1f(z.u_blur,Math.max(v.paint["circle-blur"],J)),A.uniform1f(z.u_size,v.paint["circle-radius"]);for(var w=0;w0&&(an=ay.paint["line-gap-width"]/2+0.5*au,ax=ay.paint["line-width"],aw=an-au/2);var aH=aw+ax+au/2+ap,az=ay.paint["line-color"],aD=ao.transform.scale/(1<0?1/(1-z):1+z}function o(z){return z>0?1-1/(1.001-z):-z}function v(J,z,E,H){if(!J.source){return[1,0]}var C=(new Date).getTime(),A=E.paint["raster-fade-duration"],B=(C-J.timeAdded)/A,I=z?(C-z.timeAdded)/A:-1,K=J.source._pyramid.coveringZoomLevel(H),G=z?Math.abs(z.coord.z-K)>Math.abs(J.coord.z-K):!1,D=[];!z||G?(D[0]=t.clamp(B,0,1),D[1]=1-D[0]):(D[0]=t.clamp(1-I,0,1),D[1]=1-D[0]);var F=E.paint["raster-opacity"];return D[0]*=F,D[1]*=F,D}var t=r("../util/util");p.exports=q},{"../util/util":106}],32:[function(q,p,r){function v(D,B,C,z){if(z.buffers){var E=z.elementGroups[B.ref||B.id];if(E){var A=!(B.layout["text-allow-overlap"]||B.layout["icon-allow-overlap"]||B.layout["text-ignore-placement"]||B.layout["icon-ignore-placement"]),F=D.gl;A&&F.disable(F.STENCIL_TEST),E.text.groups.length&&w(D,B,C,z,E.text,"text",!0),E.icon.groups.length&&w(D,B,C,z,E.icon,"icon",E.sdfIcons),s(D,B,C,z),A&&F.enable(F.STENCIL_TEST)}}}function w(ar,ae,ag,aw,aj,an,ak){var am=ar.gl;ag=ar.translateMatrix(ag,aw,ae.paint[an+"-translate"],ae.paint[an+"-translate-anchor"]);var al,aq,ad,af=ar.transform,at="map"===ae.layout[an+"-rotation-alignment"],ao=at;ao?(al=o.create(),aq=aw.tileExtent/aw.tileSize/Math.pow(2,ar.transform.zoom-aw.coord.z),ad=1/Math.cos(af._pitch)):(al=o.clone(aw.exMatrix),aq=ar.transform.altitude,ad=1),o.scale(al,al,[aq,aq,1]);var ai=ae.paint[an+"-size"],ap=ai/u[an];o.scale(al,al,[ap,ap,1]);var F,au,aa,av,ac=Math.sqrt(af.height*af.height/4*(1+af.altitude*af.altitude)),ax=af.height/2*Math.tan(af._pitch),Y=(ac+ax)/ac-1,ab="text"===an;if(ab||ar.style.sprite.loaded()){am.activeTexture(am.TEXTURE0),F=ak?ar.sdfShader:ar.iconShader,ab?(ar.glyphAtlas.updateTexture(am),au=aw.buffers.glyphVertex,aa=aw.buffers.glyphElement,av=[ar.glyphAtlas.width/4,ar.glyphAtlas.height/4]):(ar.spriteAtlas.bind(am,at||ar.options.rotating||ar.options.zooming||1!==ap||ak||ar.transform.pitch),au=aw.buffers.iconVertex,aa=aw.buffers.iconElement,av=[ar.spriteAtlas.width/4,ar.spriteAtlas.height/4]),am.switchShader(F,ag,al),am.uniform1i(F.u_texture,0),am.uniform2fv(F.u_texsize,av),am.uniform1i(F.u_skewed,ao),am.uniform1f(F.u_extra,Y);var Z=Math.log(ai/aj[an+"-size"])/Math.LN2||0;am.uniform1f(F.u_zoom,10*(ar.transform.zoom-Z));var U=ar.frameHistory.getFadeProperties(300);am.uniform1f(F.u_fadedist,10*U.fadedist),am.uniform1f(F.u_minfadezoom,Math.floor(10*U.minfadezoom)),am.uniform1f(F.u_maxfadezoom,Math.floor(10*U.maxfadezoom)),am.uniform1f(F.u_fadezoom,10*(ar.transform.zoom+U.bump));var B,P,J,K;if(aa.bind(am),ak){var X=8,O=1.19,H=6,Q=0.105*u[an]/ai/t.devicePixelRatio;am.uniform1f(F.u_gamma,Q*ad),am.uniform4fv(F.u_color,ae.paint[an+"-color"]),am.uniform1f(F.u_buffer,0.75);for(var V=0;V3&&this.frameHistory[1].time+Gu&&console.warn("there should never be less than three frames in the history");var A=this.frameHistory[0].z,H=this.frameHistory[u-1],v=H.z,F=Math.min(A,v),z=Math.max(A,v),B=H.z-this.frameHistory[1].z,C=H.time-this.frameHistory[1].time,E=B/(C/G);isNaN(E)&&console.warn("fadedist should never be NaN");var w=(D-H.time)/G*E;return{fadedist:E,minfadezoom:F,maxfadezoom:z,bump:w}},o.prototype.record=function(s){var u=(new Date).getTime();this.frameHistory.length||this.frameHistory.push({time:0,z:s},{time:0,z:s}),(2===this.frameHistory.length||this.frameHistory[this.frameHistory.length-1].z!==s)&&this.frameHistory.push({time:u,z:s})}},{}],35:[function(r,s,p){var q=r("./shaders"),o=r("../util/util");p.extend=function(v){var u=v.lineWidth,w=v.getParameter(v.ALIASED_LINE_WIDTH_RANGE);return v.lineWidth=function(t){u.call(v,o.clamp(t,w[0],w[1]))},v.getShader=function(C,B){var D=B===this.FRAGMENT_SHADER?"fragment":"vertex";if(!q[C]||!q[C][D]){throw new Error("Could not find shader "+C)}var A=this.createShader(B),z=q[C][D];if("undefined"==typeof orientation&&(z=z.replace(/ highp /g," ")),this.shaderSource(A,z),this.compileShader(A),!this.getShaderParameter(A,this.COMPILE_STATUS)){throw new Error(this.getShaderInfoLog(A))}return A},v.initializeShader=function(D,B,E){var A={program:this.createProgram(),fragment:this.getShader(D,this.FRAGMENT_SHADER),vertex:this.getShader(D,this.VERTEX_SHADER),attributes:[]};if(this.attachShader(A.program,A.vertex),this.attachShader(A.program,A.fragment),this.linkProgram(A.program),this.getProgramParameter(A.program,this.LINK_STATUS)){for(var z=0;zthis.height){return console.warn("LineAtlas out of space"),null}for(var ab=0,M=0;M=H;H++){for(var v=this.nextRow+Y+H,S=this.width*v,z=Z?-I[I.length-1]:0,G=I[0],W=1,O=0;OG;){z=G,G+=I[W],Z&&W===I.length-1&&(G+=I[0]),W++}var C,X=Math.abs(O-z*Q),N=Math.abs(O-G*Q),F=Math.min(X,N),ac=W%2===1;if(U){var B=Y?H/Y*(P+1):0;if(ac){var J=P-Math.abs(B);C=Math.sqrt(F*F+J*J)}else{C=P-Math.sqrt(F*F+B*B)}}else{C=(ac?1:-1)*F}this.data[3+4*(S+O)]=Math.max(0,Math.min(255,C+K))}}var aa={y:(this.nextRow+Y+0.5)/this.height,height:2*Y/this.height,width:ab};return this.nextRow+=V,this.dirty=!0,aa},r.prototype.bind=function(s){this.texture?(s.bindTexture(s.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,s.texSubImage2D(s.TEXTURE_2D,0,0,0,this.width,this.height,s.RGBA,s.UNSIGNED_BYTE,this.data))):(this.texture=s.createTexture(),s.bindTexture(s.TEXTURE_2D,this.texture),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.REPEAT),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.REPEAT),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.LINEAR),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.LINEAR),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,this.width,this.height,0,s.RGBA,s.UNSIGNED_BYTE,this.data))},r.prototype.debug=function(){var v=document.createElement("canvas");document.body.appendChild(v),v.style.position="absolute",v.style.top=0,v.style.left=0,v.style.background="#ff0",v.width=this.width,v.height=this.height;for(var u=v.getContext("2d"),A=u.getImageData(0,0,this.width,this.height),z=0;z=0;A--){var C=B._groups[A],z=B.sources[C.source];z?(this.clearStencil(),z.render(C,this)):void 0===C.source&&this.drawLayers(C,this.identityMatrix)}},t.prototype.drawTile=function(z,A){this.setExtent(z.tileExtent),this.drawClippingMask(z),this.drawLayers(A,z.posMatrix,z),this.options.debug&&w.debug(this,z)},t.prototype.drawLayers=function(B,D,A){for(var C=B.length-1;C>=0;C--){var z=B[C];z.hidden||(w[z.type](this,z,D,A),this.options.vertices&&w.vertices(this,z,D,A))}},t.prototype.drawStencilBuffer=function(){var z=this.gl;z.switchShader(this.fillShader,this.identityMatrix),z.blendFunc(z.ONE,z.ONE_MINUS_SRC_ALPHA),z.stencilMask(0),z.stencilFunc(z.EQUAL,128,128),z.bindBuffer(z.ARRAY_BUFFER,this.backgroundBuffer),z.vertexAttribPointer(this.fillShader.a_pos,this.backgroundBuffer.itemSize,z.SHORT,!1,0,0),z.uniform4fv(this.fillShader.u_color,[0,0,0,0.5]),z.drawArrays(z.TRIANGLE_STRIP,0,this.tileExtentBuffer.itemCount),z.blendFunc(z.ONE_MINUS_DST_ALPHA,z.ONE)},t.prototype.translateMatrix=function(G,C,B,z){if(!B[0]&&!B[1]){return G}if("viewport"===z){var D=Math.sin(-this.transform.angle),H=Math.cos(-this.transform.angle);B=[B[0]*H-B[1]*D,B[0]*D+B[1]*H]}var F=this.transform.scale/(1<0?A.pop():null}},{"../util/browser":95,"./draw_background":25,"./draw_circle":26,"./draw_debug":28,"./draw_fill":29,"./draw_line":30,"./draw_raster":31,"./draw_symbol":32,"./draw_vertices":33,"./frame_history":34,"./gl_util":35,"gl-matrix":116}],38:[function(q,r,p){var o=void 0;r.exports={debug:{vertex:"precision mediump float;attribute vec2 a_pos;uniform mat4 u_matrix;void main(){gl_Position=u_matrix*vec4(a_pos,step(32767.,a_pos.x),1);}",fragment:"precision mediump float;uniform vec4 u_color;void main(){gl_FragColor=u_color;}"},dot:{vertex:"precision mediump float;uniform mat4 u_matrix;uniform float u_size;attribute vec2 a_pos;void main(){gl_Position=u_matrix*vec4(a_pos,0,1);gl_PointSize=u_size;}",fragment:"precision mediump float;uniform vec4 u_color;uniform float u_blur;void main(){float a,b;a=length(gl_PointCoord-.5);b=smoothstep(.5,.5-u_blur,a);gl_FragColor=u_color*b;}"},fill:{vertex:"precision mediump float;attribute vec2 a_pos;uniform mat4 u_matrix;void main(){gl_Position=u_matrix*vec4(a_pos,0,1);}",fragment:"precision mediump float;uniform vec4 u_color;void main(){gl_FragColor=u_color;}"},circle:{vertex:"precision mediump float;uniform float u_size;attribute vec2 a_pos;uniform mat4 u_matrix,u_exmatrix;varying vec2 a;void main(){a=vec2(mod(a_pos,2.)*2.-1.);vec4 b=u_exmatrix*vec4(a*u_size,0,0);gl_Position=u_matrix*vec4(floor(a_pos*.5),0,1);gl_Position+=b*gl_Position.w;}",fragment:"precision mediump float;uniform vec4 u_color;uniform float u_blur,u_size;varying vec2 a;void main(){float b=smoothstep(1.-u_blur,1.,length(a));gl_FragColor=u_color*(1.-b);}"},line:{vertex:"precision mediump float;attribute vec2 a_pos;attribute vec4 a_data;uniform highp mat4 u_matrix;uniform float u_ratio,u_extra;uniform vec2 u_linewidth;uniform mat2 u_antialiasingmatrix;varying vec2 a;varying float b,c;void main(){vec2 d,e;d=a_data.xy;e=mod(a_pos,2.);e.y=sign(e.y-.5);a=e;vec4 f=vec4(u_linewidth.s*d*.015873016,0,0);gl_Position=u_matrix*vec4(floor(a_pos*.5)+f.xy/u_ratio,0,1);float g,h,i;g=gl_Position.y/gl_Position.w;h=length(d)/length(u_antialiasingmatrix*d);i=1./(1.-min(g*u_extra,.9));c=i*h;}",fragment:"precision mediump float;uniform vec2 u_linewidth;uniform vec4 u_color;uniform float u_blur;varying vec2 a;varying float b,c;void main(){float d,e,f;d=length(a)*u_linewidth.s;e=u_blur*c;f=clamp(min(d-(u_linewidth.t-e),u_linewidth.s-d)/e,0.,1.);gl_FragColor=u_color*f;}"},linepattern:{vertex:"precision mediump float;attribute vec2 a_pos;attribute vec4 a_data;uniform highp mat4 u_matrix;uniform float u_ratio,u_extra;uniform vec2 u_linewidth;uniform vec4 u_color;uniform mat2 u_antialiasingmatrix;varying vec2 a;varying float b,c;void main(){vec2 d,f,g,h;d=a_data.xy;float e,i,j,k;e=a_data.z*128.+a_data.w;f=mod(a_pos,2.);f.y=sign(f.y-.5);a=f;g=d*.015873016;h=u_linewidth.s*g;gl_Position=u_matrix*vec4(floor(a_pos*.5)+h.xy/u_ratio,0,1);b=e;i=gl_Position.y/gl_Position.w;j=length(d)/length(u_antialiasingmatrix*d);k=1./(1.-min(i*u_extra,.9));c=k*j;}",fragment:"precision mediump float;uniform vec2 u_linewidth,u_pattern_size_a,u_pattern_size_b,u_pattern_tl_a,u_pattern_br_a,u_pattern_tl_b,u_pattern_br_b;uniform float u_point,u_blur,u_fade,u_opacity;uniform sampler2D u_image;varying vec2 a;varying float b,c;void main(){float d,e,f,g,h,i,j;d=length(a)*u_linewidth.s;e=u_blur*c;f=clamp(min(d-(u_linewidth.t-e),u_linewidth.s-d)/e,0.,1.);g=mod(b/u_pattern_size_a.x,1.);h=mod(b/u_pattern_size_b.x,1.);i=.5+a.y*u_linewidth.s/u_pattern_size_a.y;j=.5+a.y*u_linewidth.s/u_pattern_size_b.y;vec2 k,l;k=mix(u_pattern_tl_a,u_pattern_br_a,vec2(g,i));l=mix(u_pattern_tl_b,u_pattern_br_b,vec2(h,j));vec4 m=mix(texture2D(u_image,k),texture2D(u_image,l),u_fade);f*=u_opacity;gl_FragColor=m*f;}"},linesdfpattern:{vertex:"precision mediump float;attribute vec2 a_pos;attribute vec4 a_data;uniform highp mat4 u_matrix;uniform vec2 u_linewidth,u_patternscale_a,u_patternscale_b;uniform float u_ratio,u_tex_y_a,u_tex_y_b,u_extra;uniform mat2 u_antialiasingmatrix;varying vec2 a,b,c;varying float d;void main(){vec2 e,g;e=a_data.xy;float f,i,j,k;f=a_data.z*128.+a_data.w;g=mod(a_pos,2.);g.y=sign(g.y-.5);a=g;vec4 h=vec4(u_linewidth.s*e*.015873016,0,0);gl_Position=u_matrix*vec4(floor(a_pos*.5)+h.xy/u_ratio,0,1);b=vec2(f*u_patternscale_a.x,g.y*u_patternscale_a.y+u_tex_y_a);c=vec2(f*u_patternscale_b.x,g.y*u_patternscale_b.y+u_tex_y_b);i=gl_Position.y/gl_Position.w;j=length(e)/length(u_antialiasingmatrix*e);k=1./(1.-min(i*u_extra,.9));d=k*j;}",fragment:"precision mediump float;uniform vec2 u_linewidth;uniform vec4 u_color;uniform float u_blur,u_sdfgamma,u_mix;uniform sampler2D u_image;varying vec2 a,b,c;varying float d;void main(){float e,f,g,h,i,j;e=length(a)*u_linewidth.s;f=u_blur*d;g=clamp(min(e-(u_linewidth.t-f),u_linewidth.s-e)/f,0.,1.);h=texture2D(u_image,b).a;i=texture2D(u_image,c).a;j=mix(h,i,u_mix);g*=smoothstep(.5-u_sdfgamma,.5+u_sdfgamma,j);gl_FragColor=u_color*g;}"},outline:{vertex:"precision mediump float;attribute vec2 a_pos;uniform highp mat4 u_matrix;uniform vec2 u_world;varying vec2 a;void main(){gl_Position=u_matrix*vec4(a_pos,0,1);a=(gl_Position.xy/gl_Position.w+1.)/2.*u_world;}",fragment:"precision mediump float;uniform vec4 u_color;varying vec2 a;void main(){float b,c;b=length(a-gl_FragCoord.xy);c=smoothstep(1.,0.,b);gl_FragColor=u_color*c;}"},pattern:{vertex:"precision mediump float;uniform mat4 u_matrix;uniform mat3 u_patternmatrix_a,u_patternmatrix_b;attribute vec2 a_pos;varying vec2 a,b;void main(){gl_Position=u_matrix*vec4(a_pos,0,1);a=(u_patternmatrix_a*vec3(a_pos,1)).xy;b=(u_patternmatrix_b*vec3(a_pos,1)).xy;}",fragment:"precision mediump float;uniform float u_opacity,u_mix;uniform vec2 u_pattern_tl_a,u_pattern_br_a,u_pattern_tl_b,u_pattern_br_b;uniform sampler2D u_image;varying vec2 a,b;void main(){vec2 c,d,f,g;c=mod(a,1.);d=mix(u_pattern_tl_a,u_pattern_br_a,c);vec4 e,h;e=texture2D(u_image,d);f=mod(b,1.);g=mix(u_pattern_tl_b,u_pattern_br_b,f);h=texture2D(u_image,g);gl_FragColor=mix(e,h,u_mix)*u_opacity;}"},raster:{vertex:"precision mediump float;uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent,u_buffer_scale;attribute vec2 a_pos,a_texture_pos;varying vec2 a,b;void main(){gl_Position=u_matrix*vec4(a_pos,0,1);a=(a_texture_pos/32767.-.5)/u_buffer_scale+.5;b=a*u_scale_parent+u_tl_parent;}",fragment:"precision mediump float;uniform float u_opacity0,u_opacity1,u_brightness_low,u_brightness_high,u_saturation_factor,u_contrast_factor;uniform sampler2D u_image0,u_image1;varying vec2 a,b;uniform vec3 u_spin_weights;void main(){vec4 c,d,e;c=texture2D(u_image0,a);d=texture2D(u_image1,b);e=c*u_opacity0+d*u_opacity1;vec3 f,h,i;f=e.rgb;f=vec3(dot(f,u_spin_weights.xyz),dot(f,u_spin_weights.zxy),dot(f,u_spin_weights.yzx));float g=(e.r+e.g+e.b)/3.;f+=(g-f)*u_saturation_factor;f=(f-.5)*u_contrast_factor+.5;h=vec3(u_brightness_low);i=vec3(u_brightness_high);gl_FragColor=vec4(mix(h,i,f),e.a);}"},icon:{vertex:"precision mediump float;attribute vec2 a_pos,a_offset;attribute vec4 a_data1,a_data2;uniform highp mat4 u_matrix;uniform mat4 u_exmatrix;uniform float u_zoom,u_fadedist,u_minfadezoom,u_maxfadezoom,u_fadezoom,u_opacity,u_extra;uniform bool u_skewed;uniform vec2 u_texsize;varying vec2 a;varying float b;void main(){vec2 c,e;c=a_data1.xy;float d,f,g,h,i,j;d=a_data1[2];e=a_data2.st;f=e[0];g=e[1];h=10.;i=2.-step(f,u_zoom)-(1.-step(g,u_zoom));j=clamp((u_fadezoom-d)/u_fadedist,0.,1.);if(u_fadedist>=0.)b=j;else b=1.-j;if(u_maxfadezoom=d)b=1.;i+=step(b,0.);if(u_skewed){vec4 k=u_exmatrix*vec4(a_offset/64.,0,0);gl_Position=u_matrix*vec4(a_pos+k.xy,0,1);gl_Position.z+=i*gl_Position.w;}else{vec4 k=u_exmatrix*vec4(a_offset/64.,i,0);gl_Position=u_matrix*vec4(a_pos,0,1)+k;}a=c/u_texsize;b*=u_opacity;}",fragment:"precision mediump float;uniform sampler2D u_texture;varying vec2 a;varying float b;void main(){gl_FragColor=texture2D(u_texture,a)*b;}"},sdf:{vertex:"precision mediump float;attribute vec2 a_pos,a_offset;attribute vec4 a_data1,a_data2;uniform highp mat4 u_matrix;uniform mat4 u_exmatrix;uniform float u_zoom,u_fadedist,u_minfadezoom,u_maxfadezoom,u_fadezoom,u_extra;uniform bool u_skewed;uniform vec2 u_texsize;varying vec2 a;varying float b,c;void main(){vec2 d,f;d=a_data1.xy;float e,g,h,i,j,k,l;e=a_data1[2];f=a_data2.st;g=f[0];h=f[1];i=2.-step(g,u_zoom)-(1.-step(h,u_zoom));j=clamp((u_fadezoom-e)/u_fadedist,0.,1.);if(u_fadedist>=0.)b=j;else b=1.-j;if(u_maxfadezoom=e)b=1.;i+=step(b,0.);if(u_skewed){vec4 k=u_exmatrix*vec4(a_offset/64.,0,0);gl_Position=u_matrix*vec4(a_pos+k.xy,0,1);gl_Position.z+=i*gl_Position.w;}else{vec4 k=u_exmatrix*vec4(a_offset/64.,i,0);gl_Position=u_matrix*vec4(a_pos,0,1)+k;}k=gl_Position.y/gl_Position.w;l=1./(1.-k*u_extra);c=l;a=d/u_texsize;}",fragment:"precision mediump float;uniform sampler2D u_texture;uniform vec4 u_color;uniform float u_buffer,u_gamma;varying vec2 a;varying float b,c;void main(){float d,e,f;d=u_gamma*c;e=texture2D(u_texture,a).a;f=smoothstep(u_buffer-d,u_buffer+d,e)*b;gl_FragColor=u_color*f;}"},collisionbox:{vertex:"precision mediump float;attribute vec2 a_pos,a_extrude,a_data;uniform mat4 u_matrix;uniform float u_scale;varying float a,b;void main(){gl_Position=u_matrix*vec4(a_pos+a_extrude/u_scale,0,1);a=a_data.x;b=a_data.y;}",fragment:"precision mediump float;uniform float u_zoom,u_maxzoom;varying float a,b;void main(){float c=.5;gl_FragColor=vec4(0,1,0,1)*c;if(b>u_zoom)gl_FragColor=vec4(1,0,0,1)*c;if(u_zoom>=a)gl_FragColor=vec4(0,0,0,1)*c*.25;if(b>=u_maxzoom)gl_FragColor=vec4(0,0,1,1)*c*.2;}"}}},{}],39:[function(p,o,r){function t(z){z=z||{},this._data=z.data,void 0!==z.maxzoom&&(this.maxzoom=z.maxzoom),this.geojsonVtOptions={maxZoom:this.maxzoom},void 0!==z.buffer&&(this.geojsonVtOptions.buffer=z.buffer),void 0!==z.tolerance&&(this.geojsonVtOptions.tolerance=z.tolerance),this._pyramid=new v({tileSize:512,minzoom:this.minzoom,maxzoom:this.maxzoom,cacheSize:20,load:this._loadTile.bind(this),abort:this._abortTile.bind(this),unload:this._unloadTile.bind(this),add:this._addTile.bind(this),remove:this._removeTile.bind(this)})}var s=p("../util/util"),w=p("../util/evented"),v=p("./tile_pyramid"),q=p("./source"),u=p("resolve-url");o.exports=t,t.prototype=s.inherit(w,{minzoom:0,maxzoom:14,_dirty:!0,setData:function(z){return this._data=z,this._dirty=!0,this.fire("change"),this.map&&this.update(this.map.transform),this},onAdd:function(z){this.map=z},loaded:function(){return this._loaded&&this._pyramid.loaded()},update:function(z){this._dirty&&this._updateData(),this._loaded&&this._pyramid.update(this.used,z)},reload:function(){this._loaded&&this._pyramid.reload()},render:q._renderTiles,featuresAt:q._vectorFeaturesAt,featuresIn:q._vectorFeaturesIn,_updateData:function(){this._dirty=!1;var z=this._data;"string"==typeof z&&(z=u(window.location.href,z)),this.workerID=this.dispatcher.send("parse geojson",{data:z,tileSize:512,source:this.id,geojsonVtOptions:this.geojsonVtOptions},function(A){return A?void this.fire("error",{error:A}):(this._loaded=!0,this._pyramid.reload(),void this.fire("change"))}.bind(this))},_loadTile:function(A){var z=A.coord.z>this.maxzoom?Math.pow(2,A.coord.z-this.maxzoom):1,B={uid:A.uid,coord:A.coord,zoom:A.coord.z,maxZoom:this.maxzoom,tileSize:512,source:this.id,overscaling:z,angle:this.map.transform.angle,pitch:this.map.transform.pitch,collisionDebug:this.map.collisionDebug};A.workerID=this.dispatcher.send("load geojson tile",B,function(C,D){if(A.unloadVectorData(this.map.painter),!A.aborted){if(C){return void this.fire("tile.error",{tile:A})}A.loadVectorData(D),this.fire("tile.load",{tile:A})}}.bind(this),this.workerID)},_abortTile:function(z){z.aborted=!0},_addTile:function(z){this.fire("tile.add",{tile:z})},_removeTile:function(z){this.fire("tile.remove",{tile:z})},_unloadTile:function(z){z.unloadVectorData(this.map.painter),this.glyphAtlas.removeGlyphs(z.uid),this.dispatcher.send("remove tile",{uid:z.uid,source:this.id},null,z.workerID)}})},{"../util/evented":100,"../util/util":106,"./source":43,"./tile_pyramid":46,"resolve-url":140}],40:[function(r,s,p){function u(v){this.features=v,this.length=v.length}function o(v){this.type=v.type,this.rawGeometry=1===v.type?[v.geometry]:v.geometry,this.properties=v.tags,this.extent=4096}var t=r("point-geometry"),q=r("vector-tile").VectorTileFeature;s.exports=u,u.prototype.feature=function(v){return new o(this.features[v])},o.prototype.loadGeometry=function(){var A=this.rawGeometry;this.geometry=[];for(var w=0;w4096||A.parentId)&&(A.tileExtent=4096),I+=F*(1<z&&(z=-1*z-1);var A=1<v.row){var z=w;w=v,v=z}return{x0:w.column,y0:w.row,x1:v.column,y1:v.row,dx:v.column-w.column,dy:v.row-w.row}}function t(K,B,w,v,D){var z=Math.max(w,Math.floor(B.y0)),C=Math.min(v,Math.ceil(B.y1));if(K.x0===B.x0&&K.y0===B.y0?K.x0+B.dy/K.dy*K.dx0,G=B.dx<0,H=z;C>H;H++){var F=E*Math.max(0,Math.min(K.dy,H+A-K.y0))+K.x0,J=I*Math.max(0,Math.min(B.dy,H+G-B.y0))+B.x0;D(Math.floor(J),Math.ceil(F),H)}}function p(F,A,w,v,C,z){var B,G=u(F,A),D=u(A,w),E=u(w,F);G.dy>D.dy&&(B=G,G=D,D=B),G.dy>E.dy&&(B=G,G=E,E=B),D.dy>E.dy&&(B=D,D=E,E=B),G.dy&&t(E,G,v,C,z),D.dy&&t(E,D,v,C,z)}s.exports=r,r.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y},r.fromID=function(w){var v=w%32,C=1<v?new r(this.z-1,this.x,this.y,this.w):new r(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},r.prototype.wrapped=function(){return new r(this.z,this.x,this.y,0)},r.prototype.children=function(w){if(this.z>=w){return[new r(this.z+1,this.x,this.y,this.w)]}var v=this.z+1,A=2*this.x,z=2*this.y;return[new r(v,A,z,this.w),new r(v,A+1,z,this.w),new r(v,A,z+1,this.w),new r(v,A+1,z+1,this.w)]},r.cover=function(w,v,B){function z(E,D,H){var G,F,I;if(H>=0&&A>=H){for(G=E;D>G;G++){F=(G%A+A)%A,I=new r(B,F,H,Math.floor(G/A)),C[I.id]=I}}}var A=1<this.maxzoom&&(C=this.maxzoom);var D=A,B=D.locationCoordinate(D.center)._zoomTo(C),E=new t(B.column-0.5,B.row-0.5);return q.cover(C,[D.pointCoordinate(new t(0,0))._zoomTo(C),D.pointCoordinate(new t(D.width,0))._zoomTo(C),D.pointCoordinate(new t(D.width,D.height))._zoomTo(C),D.pointCoordinate(new t(0,D.height))._zoomTo(C)],this.reparseOverscaled?z:C).sort(function(F,G){return E.dist(F)-E.dist(G)})},findLoadedChildren:function(A,D,z){for(var F=!0,C=A.z,G=A.children(this.maxzoom),B=0;BC&&this.findLoadedChildren(G[B],D,z))}return F},findLoadedParent:function(A,C,z){for(var D=A.z-1;D>=C;D--){A=A.parent(this.maxzoom);var B=this._tiles[A.id];if(B&&B.loaded){return z[A.id]=!0,B}}},update:function(E,G,M){var A,z,B,N=(this.roundZoom?Math.round:Math.floor)(this.getZoom(G)),H=s.clamp(N-10,this.minzoom,this.maxzoom),F=s.clamp(N+1,this.minzoom,this.maxzoom),J={},D=(new Date).getTime();this._coveredTiles={};var C=E?this.coveringTiles(G):[];for(A=0;AD-(M||0)&&(this.findLoadedChildren(z,F,J)?(this._coveredTiles[K]=!0,J[K]=!0):this.findLoadedParent(z,H,J))}var I=s.keysDifference(this._tiles,J);for(A=0;Athis.maxzoom?Math.pow(2,D-this.maxzoom):1;C=new w(z,this.tileSize*B),this.index&&(C.parentId=this.indexSearch(A.id)),this._load(C)}return C.uses++,this._tiles[A.id]=C,this._add(C,A),C},removeTile:function(z){var A=this._tiles[z];A&&(A.uses--,delete this._tiles[z],this._remove(A),A.uses>0||(A.loaded?this._cache.add(A.coord.wrapped().id,A):(this._abort(A),this._unload(A))))},clearTiles:function(){for(var z in this._tiles){this.removeTile(z)}this._cache.reset()},tileAt:function(A){for(var C=this.orderedIDs(),z=0;z=0&&B.x=0&&B.y=0&&E[1].y>=0&&C.push({tile:B,minX:E[0].x,maxX:E[1].x,minY:E[0].y,maxY:E[1].y})}return C},indexSearch:function(A){for(var D=q.fromID(A),z=[A],F=D;0!==F.z;){F=F.parent(),z.push(F.id)}for(var C,G=this.index,B=z.pop(),E=function(H){return H.id};z.length;){if(A=z.pop(),D=q.fromID(B),C=D.children(this.maxzoom).map(E).indexOf(A),G){if(0===G[C]){B=A;break}if(1===G[C]){B=A;break}B=A,G=G[C]}}return 0===z.length?null:B}}},{"../util/mru_cache":104,"../util/util":106,"./tile":44,"./tile_coord":45,"point-geometry":137}],47:[function(q,t,p){function v(w){if(o.extend(this,o.pick(w,["url","tileSize"])),512!==this.tileSize){throw new Error("vector tile sources must have a tileSize of 512")}u._loadTileJSON.call(this,w)}var o=q("../util/util"),s=q("../util/evented"),u=q("./source"),r=q("./tile_coord");t.exports=v,v.prototype=o.inherit(s,{minzoom:0,maxzoom:22,tileSize:512,reparseOverscaled:!0,_loaded:!1,onAdd:function(w){this.map=w},loaded:function(){return this._pyramid&&this._pyramid.loaded()},update:function(w){this._pyramid&&this._pyramid.update(this.used,w)},reload:function(){this._pyramid&&this._pyramid.reload()},redoPlacement:function(){if(this._pyramid){for(var A=this._pyramid.orderedIDs(),z=0;zthis.maxzoom?Math.pow(2,A.coord.z-this.maxzoom):1,w={url:A.coord.url(this.tiles,this.maxzoom),uid:A.uid,coord:A.coord,zoom:A.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize*z,source:this.id,overscaling:z,angle:this.map.transform.angle,pitch:this.map.transform.pitch,collisionDebug:this.map.collisionDebug,parentId:A.parentId};A.parentId&&(w.url=r.fromID(A.parentId).url(this.tiles,this.maxzoom)),A.workerID?this.dispatcher.send("reload tile",w,this._tileLoaded.bind(this,A),A.workerID):A.workerID=this.dispatcher.send("load tile",w,this._tileLoaded.bind(this,A))},_tileLoaded:function(A,z,w){if(!A.aborted){if(z){return void this.fire("tile.error",{tile:A})}A.loadVectorData(w),A.redoWhenDone&&(A.redoWhenDone=!1,this._redoTilePlacement(A)),this.fire("tile.load",{tile:A}),this.fire("tile.stats",w.bucketStats)}},_abortTile:function(w){w.aborted=!0,this.dispatcher.send("abort tile",{uid:w.uid,source:this.id},null,w.workerID)},_addTile:function(w){this.fire("tile.add",{tile:w})},_removeTile:function(w){this.fire("tile.remove",{tile:w})},_unloadTile:function(w){w.unloadVectorData(this.map.painter),this.glyphAtlas.removeGlyphs(w.uid),this.dispatcher.send("remove tile",{uid:w.uid,source:this.id},null,w.workerID)},_redoTilePlacement:function(z){function w(B,A){z.reloadSymbolData(A,this.map.painter),this.fire("tile.load",{tile:z}),z.redoingPlacement=!1,z.redoWhenDone&&(this._redoTilePlacement(z),z.redoWhenDone=!1)}return !z.loaded||z.redoingPlacement?void (z.redoWhenDone=!0):(z.redoingPlacement=!0,void this.dispatcher.send("redo placement",{uid:z.uid,source:this.id,angle:this.map.transform.angle,pitch:this.map.transform.pitch,collisionDebug:this.map.collisionDebug},w.bind(this),z.workerID))}})},{"../util/evented":100,"../util/util":106,"./source":43,"./tile_coord":45}],48:[function(p,o,r){function q(A){this.coordinates=A.coordinates,v.getVideo(A.urls,function(D,C){if(!D){this.video=C,this.video.loop=!0;var B;this.video.addEventListener("playing",function(){B=this.map.style.animationLoop.set(1/0),this.map._rerender()}.bind(this)),this.video.addEventListener("pause",function(){this.map.style.animationLoop.cancel(B)}.bind(this)),this._loaded=!0,this.map&&(this.video.play(),this.createTile(),this.fire("change"))}}.bind(this))}var s=p("../util/util"),w=p("./tile"),u=p("../geo/lng_lat"),t=p("point-geometry"),z=p("../util/evented"),v=p("../util/ajax");o.exports=q,q.prototype=s.inherit(z,{roundZoom:!0,getVideo:function(){return this.video},onAdd:function(A){this.map=A,this.video&&(this.video.play(),this.createTile())},createTile:function(){var F=this.map,D=this.coordinates.map(function(J){var I=u.convert(J);return F.transform.locationCoordinate(I).zoomTo(0)}),C=s.getCoordinatesCenter(D),E=4096,G=D.map(function(J){var I=J.zoomTo(C.zoom);return new t(Math.round((I.column-C.column)*E),Math.round((I.row-C.row)*E))}),H=F.painter.gl,A=32767,B=new Int16Array([G[0].x,G[0].y,0,0,G[1].x,G[1].y,A,0,G[3].x,G[3].y,0,A,G[2].x,G[2].y,A,A]);this.tile=new w,this.tile.buckets={},this.tile.boundsBuffer=H.createBuffer(),H.bindBuffer(H.ARRAY_BUFFER,this.tile.boundsBuffer),H.bufferData(H.ARRAY_BUFFER,B,H.STATIC_DRAW),this.center=C},loaded:function(){return this.video&&this.video.readyState>=2},update:function(){},reload:function(){},render:function(D,B){if(this._loaded&&!(this.video.readyState<2)){var A=this.center;this.tile.calculateMatrices(A.zoom,A.column,A.row,this.map.transform,B);var C=B.gl;this.tile.texture?(C.bindTexture(C.TEXTURE_2D,this.tile.texture),C.texSubImage2D(C.TEXTURE_2D,0,0,0,C.RGBA,C.UNSIGNED_BYTE,this.video)):(this.tile.texture=C.createTexture(),C.bindTexture(C.TEXTURE_2D,this.tile.texture),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.CLAMP_TO_EDGE),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.CLAMP_TO_EDGE),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.LINEAR),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.LINEAR),C.texImage2D(C.TEXTURE_2D,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,this.video)),B.drawLayers(D,this.tile.posMatrix,this.tile)}},featuresAt:function(C,B,A){return A(null,[])},featuresIn:function(C,B,A){return A(null,[])}})},{"../geo/lng_lat":20,"../util/ajax":94,"../util/evented":100,"../util/util":106,"./tile":44,"point-geometry":137}],49:[function(q,o,t){function v(D){this.self=D,this.actor=new p(D,this),this.loading={},this.loaded={},this.layers=[],this.geoJSONIndexes={}}var p=q("../util/actor"),r=q("./worker_tile"),u=q("../util/util"),A=q("../util/ajax"),B=q("vector-tile"),w=q("pbf"),s=q("./tile_coord"),C=q("geojson-vt"),z=q("./geojson_wrapper");o.exports=function(D){return new v(D)},u.extend(v.prototype,{"set layers":function(D){this.layers=D},"load tile":function(H,G){function F(K,M){if(delete this.loading[I][E],K){return G(K)}if(D.data=new B.VectorTile(new w(new Uint8Array(M))),H.parentId&&D.data.layers){var J=this.getChildPosition(H.coord.id,H.parentId);D.parse(D.data,this.layers,this.actor,G,J.dz,J.xPos,J.yPos)}else{D.parse(D.data,this.layers,this.actor,G)}this.loaded[I]=this.loaded[I]||{},this.loaded[I][E]=D}var I=H.source,E=H.uid;this.loading[I]||(this.loading[I]={});var D=this.loading[I][E]=new r(H);D.xhr=A.getArrayBuffer(H.url,F.bind(this))},"reload tile":function(G,F){var E=this.loaded[G.source],H=G.uid;if(E&&E[H]){var D=E[H];D.parse(D.data,this.layers,this.actor,F)}},"abort tile":function(F){var E=this.loading[F.source],D=F.uid;E&&E[D]&&(E[D].xhr.abort(),delete E[D])},"remove tile":function(F){var E=this.loaded[F.source],D=F.uid;E&&E[D]&&delete E[D]},"redo placement":function(I,H){var F=this.loaded[I.source],J=this.loading[I.source],E=I.uid;if(F&&F[E]){var D=F[E],G=D.redoPlacement(I.angle,I.pitch,I.collisionDebug);G.result&&H(null,G.result,G.transferables)}else{J&&J[E]&&(J[E].angle=I.angle)}},"parse geojson":function(F,E){var D=function(G,H){return G?E(G):(this.geoJSONIndexes[F.source]=C(H,F.geojsonVtOptions),void E(null))}.bind(this);"string"==typeof F.data?A.getJSON(F.data,D):D(null,F.data)},"load geojson tile":function(H,G){var F=H.source,I=H.coord,E=this.geoJSONIndexes[F].getTile(I.z,I.x,I.y);if(!E){return G(null,null)}var D=new r(H);D.parse(new z(E.features),this.layers,this.actor,G),this.loaded[F]=this.loaded[F]||{},this.loaded[F][H.uid]=D},"query features":function(F,E){var D=this.loaded[F.source]&&this.loaded[F.source][F.uid];D?D.featureTree.query(F,E):E(null,[])},getChildPosition:function(I,H){var F=s.fromID(I),J=s.fromID(H),E=F.z-J.z,D=F.x&(1<=C)){var B=Z.layout.visibility;if("none"!==B){if(Q=v(Z,V,this.zoom,this.overscaling,this.collisionDebug),Q.layers=[Z.id],af[Q.id]=Q,G.push(Q),ac.layers){var M=Z["source-layer"];F[M]||(F[M]={}),F[M][Q.id]=Q}else{F[Q.id]=Q}}}}}}for(ae=0;ae=0;ae--){Q=G[ae],Q.needsPlacement&&(E?E.next=Q:Q.previousPlaced=!0,E=Q),Q.getDependencies&&Q.getDependencies(this,O,W(Q)),Q.needsPlacement||Q.getDependencies||J(I,Q)}},u.prototype.redoPlacement=function(E,H,w){if("done"!==this.status){return this.redoPlacementAfterDone=!0,this.angle=E,{}}for(var C=new t,I=[],z={},A=new o(E,H),F=this.bucketsInOrder,B=F.length-1;B>=0;B--){var G=F[B];"symbol"===G.type&&(G.placeFeatures(A,C,w),z[G.id]=G.elementGroups)}for(var D in C){I.push(C[D].array)}return{result:{elementGroups:z,buffers:C},transferables:I}}},{"../data/buffer/buffer_set":2,"../data/create_bucket":13,"../data/feature_tree":15,"../symbol/collision_tile":68}],51:[function(p,q,o){function r(){this.n=0,this.times=[]}q.exports=r,r.prototype.stopped=function(){return this.times=this.times.filter(function(s){return s.time>=(new Date).getTime()}),!this.times.length},r.prototype.set=function(s){return this.times.push({id:this.n,time:s+(new Date).getTime()}),this.n++},r.prototype.cancel=function(s){this.times=this.times.filter(function(t){return t.id!==s})}},{}],52:[function(p,o,r){function v(A){this.base=A,this.retina=t.devicePixelRatio>1;var z=this.retina?"@2x":"";u.getJSON(s(A,z,".json"),function(C,B){return C?void this.fire("error",{error:C}):(this.data=B,void (this.img&&this.fire("load")))}.bind(this)),u.getImage(s(A,z,".png"),function(D,C){if(D){return void this.fire("error",{error:D})}for(var F=C.getData(),E=C.data=new Uint8Array(F.length),B=0;B1!==this.retina){var z=new v(this.base);z.on("load",function(){this.img=z.img,this.data=z.data,this.retina=z.retina}.bind(this))}},q.prototype={x:0,y:0,width:0,height:0,pixelRatio:1,sdf:!1},v.prototype.getSpritePosition=function(A){if(!this.loaded()){return new q}var z=this.data&&this.data[A];return z&&this.img?z:new q}},{"../util/ajax":94,"../util/browser":95,"../util/evented":100,"../util/mapbox":103}],53:[function(q,r,p){var o=q("./reference");r.exports={},o.layout.forEach(function(v){var u=function(z){for(var t in z){this[t]=z[t]}},w=o[v];for(var s in w){void 0!==w[s]["default"]&&(u.prototype[s]=w[s]["default"])}r.exports[v.replace("layout_","")]=u})},{"./reference":55}],54:[function(q,r,p){var o=q("./reference"),s=q("csscolorparser").parseCSSColor;r.exports={},o.paint.forEach(function(A){var w=function(){},B=o[A];for(var z in B){var v=B[z],u=v["default"];void 0!==u&&("color"===v.type&&(u=s(u)),w.prototype[z]=u)}w.prototype.hidden=!1,r.exports[A.replace("paint_","")]=w})},{"./reference":55,csscolorparser:107}],55:[function(p,q,o){q.exports=p("mapbox-gl-style-spec/reference/latest")},{"mapbox-gl-style-spec/reference/latest":131}],56:[function(u,q,I){function o(M,J){this.animationLoop=J||new r,this.dispatcher=new D(Math.max(H.hardwareConcurrency-1,1),this),this.glyphAtlas=new B(1024,1024),this.spriteAtlas=new t(512,512),this.spriteAtlas.resize(H.devicePixelRatio),this.lineAtlas=new G(256,512),this._layers={},this._order=[],this._groups=[],this.sources={},this.zoomHistory={},p.bindAll(["_forwardSourceEvent","_forwardTileEvent","_redoPlacement"],this);var K=function(R,O){if(R){return void this.fire("error",{error:R})}var Q=z(O);if(Q.length){for(var N=0;NMath.floor(K)&&(J.lastIntegerZoom=Math.floor(K+1),J.lastIntegerZoomTime=Date.now()),J.lastZoom=K},batch:function(J){v(this,J)},addSource:function(K,J){return this.batch(function(M){M.addSource(K,J)}),this},removeSource:function(J){return this.batch(function(K){K.removeSource(J)}),this},getSource:function(J){return this.sources[J]},addLayer:function(K,J){return this.batch(function(M){M.addLayer(K,J)}),this},removeLayer:function(J){return this.batch(function(K){K.removeLayer(J)}),this},getLayer:function(J){return this._layers[J]},getReferentLayer:function(K){var J=this.getLayer(K);return J.ref&&(J=this.getLayer(J.ref)),J},setFilter:function(K,J){return this.batch(function(M){M.setFilter(K,J)}),this},setLayerZoomRange:function(M,J,K){return this.batch(function(N){N.setLayerZoomRange(M,J,K)}),this},getFilter:function(J){return this.getReferentLayer(J).filter},getLayoutProperty:function(K,J){return this.getReferentLayer(K).getLayoutProperty(J)},getPaintProperty:function(M,J,K){return this.getLayer(M).getPaintProperty(J,K)},featuresAt:function(O,K,N){var J=[],M=null;K.layer&&(K.layerIds=Array.isArray(K.layer)?K.layer:[K.layer]),p.asyncEach(Object.keys(this.sources),function(Q,R){var P=this.sources[Q];P.featuresAt(O,K,function(T,S){S&&(J=J.concat(S)),T&&(M=T),R()})}.bind(this),function(){return M?N(M):void N(null,J.filter(function(P){return void 0!==this._layers[P.layer]}.bind(this)).map(function(P){return P.layer=this._layers[P.layer].json(),P}.bind(this)))}.bind(this))},featuresIn:function(O,K,N){var J=[],M=null;K.layer&&(K.layer={id:K.layer}),p.asyncEach(Object.keys(this.sources),function(Q,R){var P=this.sources[Q];P.featuresIn(O,K,function(T,S){S&&(J=J.concat(S)),T&&(M=T),R()})}.bind(this),function(){return M?N(M):void N(null,J.filter(function(P){return void 0!==this._layers[P.layer]}.bind(this)).map(function(P){return P.layer=this._layers[P.layer].json(),P}.bind(this)))}.bind(this))},_remove:function(){this.dispatcher.remove()},_reloadSource:function(J){this.sources[J].reload()},_updateSources:function(K){for(var J in this.sources){this.sources[J].update(K)}},_redoPlacement:function(){for(var J in this.sources){this.sources[J].redoPlacement&&this.sources[J].redoPlacement()}},_forwardSourceEvent:function(J){this.fire("source."+J.type,p.extend({source:J.target},J))},_forwardTileEvent:function(J){this.fire(J.type,p.extend({source:J.target},J))},"get sprite json":function(M,J){var K=this.sprite;K.loaded()?J(null,{sprite:K.data,retina:K.retina}):K.on("load",function(){J(null,{sprite:K.data,retina:K.retina})})},"get icons":function(N,K){var M=this.sprite,J=this.spriteAtlas;M.loaded()?(J.setSprite(M),J.addIcons(N.icons,K)):M.on("load",function(){J.setSprite(M),J.addIcons(N.icons,K)})},"get glyphs":function(K,J){this.glyphSource.getSimpleGlyphs(K.fontstack,K.codepoints,K.uid,J)}})},{"../render/line_atlas":36,"../symbol/glyph_atlas":70,"../symbol/glyph_source":71,"../symbol/sprite_atlas":77,"../util/ajax":94,"../util/browser":95,"../util/dispatcher":97,"../util/evented":100,"../util/mapbox":103,"../util/util":106,"./animation_loop":51,"./image_sprite":52,"./style_batch":57,"./style_layer":60,"mapbox-gl-style-spec/lib/validate/latest":129}],57:[function(p,r,o){function t(w,u){if(!w._loaded){throw new Error("Style is not done loading")}var v=Object.create(t.prototype);v._style=w,v._groupLayers=!1,v._broadcastLayers=!1,v._reloadSources={},v._events=[],v._change=!1,u(v),v._groupLayers&&v._style._groupLayers(),v._broadcastLayers&&v._style._broadcastLayers(),Object.keys(v._reloadSources).forEach(function(z){v._style._reloadSource(z)}),v._events.forEach(function(z){v._style.fire.apply(v._style,z)}),v._change&&v._style.fire("change")}var s=p("../source/source"),q=p("./style_layer");t.prototype={addLayer:function(v,u){if(void 0!==this._style._layers[v.id]){throw new Error("There is already a layer with this ID")}return v instanceof q||(v=new q(v)),this._style._layers[v.id]=v,this._style._order.splice(u?this._style._order.indexOf(u):1/0,0,v.id),v.resolveLayout(),v.resolveReference(this._style._layers),v.resolvePaint(),this._groupLayers=!0,this._broadcastLayers=!0,v.source&&(this._reloadSources[v.source]=!0),this._events.push(["layer.add",{layer:v}]),this._change=!0,this},removeLayer:function(w){var u=this._style._layers[w];if(void 0===u){throw new Error("There is no layer with this ID")}for(var v in this._style._layers){this._style._layers[v].ref===w&&this.removeLayer(v)}return delete this._style._layers[w],this._style._order.splice(this._style._order.indexOf(w),1),this._groupLayers=!0,this._broadcastLayers=!0,this._events.push(["layer.remove",{layer:u}]),this._change=!0,this},setPaintProperty:function(z,u,w,v){return this._style.getLayer(z).setPaintProperty(u,w,v),this._change=!0,this},setLayoutProperty:function(w,u,v){return w=this._style.getReferentLayer(w),w.setLayoutProperty(u,v),this._broadcastLayers=!0,w.source&&(this._reloadSources[w.source]=!0),this._change=!0,this},setFilter:function(v,u){return v=this._style.getReferentLayer(v),v.filter=u,this._broadcastLayers=!0,v.source&&(this._reloadSources[v.source]=!0),this._change=!0,this},setLayerZoomRange:function(z,u,w){var v=this._style.getReferentLayer(z);return null!=u&&(v.minzoom=u),null!=w&&(v.maxzoom=w),this._broadcastLayers=!0,v.source&&(this._reloadSources[v.source]=!0),this._change=!0,this},addSource:function(v,u){if(!this._style._loaded){throw new Error("Style is not done loading")}if(void 0!==this._style.sources[v]){throw new Error("There is already a source with this ID")}return u=s.create(u),this._style.sources[v]=u,u.id=v,u.style=this._style,u.dispatcher=this._style.dispatcher,u.glyphAtlas=this._style.glyphAtlas,u.on("load",this._style._forwardSourceEvent).on("error",this._style._forwardSourceEvent).on("change",this._style._forwardSourceEvent).on("tile.add",this._style._forwardTileEvent).on("tile.load",this._style._forwardTileEvent).on("tile.error",this._style._forwardTileEvent).on("tile.remove",this._style._forwardTileEvent).on("tile.stats",this._style._forwardTileEvent),this._events.push(["source.add",{source:u}]),this._change=!0,this},removeSource:function(v){if(void 0===this._style.sources[v]){throw new Error("There is no source with this ID")}var u=this._style.sources[v];return delete this._style.sources[v],u.off("load",this._style._forwardSourceEvent).off("error",this._style._forwardSourceEvent).off("change",this._style._forwardSourceEvent).off("tile.add",this._style._forwardTileEvent).off("tile.load",this._style._forwardTileEvent).off("tile.error",this._style._forwardTileEvent).off("tile.remove",this._style._forwardTileEvent).off("tile.stats",this._style._forwardTileEvent),this._events.push(["source.remove",{source:u}]),this._change=!0,this}},r.exports=t},{"../source/source":43,"./style_layer":60}],58:[function(s,r,u){function o(B,C){this.type=B.type,this.transitionable=B.transition,null==C&&(C=B["default"]),this.json=JSON.stringify(C),"color"===this.type?this.value=z(C):this.value=C,"interpolated"===B["function"]?this.calculate=q.interpolated(this.value):(this.calculate=q["piecewise-constant"](this.value),B.transition&&(this.calculate=w(this.calculate)))}function w(B){return function(C,D,H){var E,G,J,F=C%1,M=Math.min((Date.now()-D.lastIntegerZoomTime)/H,1),I=1,K=1;return C>D.lastIntegerZoom?(E=F+(1-F)*M,I*=2,G=B(C-1),J=B(C)):(E=1-(1-M)*F,J=B(C),G=B(C+1),I/=2),{from:G,fromScale:I,to:J,toScale:K,t:E}}}function z(B){if(t[B]){return t[B]}if(Array.isArray(B)){return B}if(B.stops){return v.extend({},B,{stops:B.stops.map(function(D){return[D[0],z(D[1])]})})}if("string"==typeof B){var C=A(p(B));return t[B]=C,C}throw new Error("Invalid color "+B)}function A(B){return[B[0]/255,B[1]/255,B[2]/255,B[3]/1]}var p=s("csscolorparser").parseCSSColor,q=s("mapbox-gl-function"),v=s("../util/util");r.exports=o;var t={}},{"../util/util":106,csscolorparser:107,"mapbox-gl-function":128}],59:[function(s,t,q){function r(w){function z(A){this._values={},this._transitions={};for(var B in A){this[B]=A[B]}}return Object.keys(w).forEach(function(B){var A=w[B];Object.defineProperty(z.prototype,B,{set:function(C){this._values[B]=new v(A,C)},get:function(){return this._values[B].value}}),A.transition&&Object.defineProperty(z.prototype,B+"-transition",{set:function(C){this._transitions[B]=C},get:function(){return this._transitions[B]}})}),z.prototype.values=function(){return this._values},z.prototype.transition=function(A,B){var C=this._transitions[A]||{};return{duration:p.coalesce(C.duration,B.duration,300),delay:p.coalesce(C.delay,B.delay,0)}},z.prototype.json=function(){var A={};for(var B in this._values){A[B]=this._values[B].value}for(var C in this._transitions){A[C+"-transition"]=this._transitions[B]}return A},z}var p=s("../util/util"),o=s("./reference"),v=s("./style_declaration"),u={paint:{},layout:{}};o.layer.type.values.forEach(function(w){u.paint[w]=r(o["paint_"+w]),u.layout[w]=r(o["layout_"+w])}),t.exports=function(w,z,A){return new u[w][z](A)}},{"../util/util":106,"./reference":55,"./style_declaration":58}],60:[function(p,o,s){function q(A){this._layer=A,this.id=A.id,this.ref=A.ref,this._resolved={},this._cascaded={},this.assign(A)}function w(K,E){var G=E+"-color",I=E+"-halo-color",B=E+"-outline-color",A=K[G],M=K[I],C=K[B],D=K[E+"-opacity"],H=A&&D*A[3],J=M&&D*M[3],F=C&&D*C[3];void 0!==H&&1>H&&(K[G]=u.premultiply([A[0],A[1],A[2],H])),void 0!==J&&1>J&&(K[I]=u.premultiply([M[0],M[1],M[2],J])),void 0!==F&&1>F&&(K[B]=u.premultiply([C[0],C[1],C[2],F]))}var u=p("../util/util"),t=p("./style_transition"),r=p("./style_declaration_set"),z=p("./layout_properties"),v=p("./paint_properties");o.exports=q,q.prototype={resolveLayout:function(){this.ref||(this.layout=new z[this.type](this._layer.layout),"line"===this.layout["symbol-placement"]&&(this.layout.hasOwnProperty("text-rotation-alignment")||(this.layout["text-rotation-alignment"]="map"),this.layout.hasOwnProperty("icon-rotation-alignment")||(this.layout["icon-rotation-alignment"]="map"),this.layout["symbol-avoid-edges"]=!0))},setLayoutProperty:function(B,A){null==A?delete this.layout[B]:this.layout[B]=A},getLayoutProperty:function(A){return this.layout[A]},resolveReference:function(A){this.ref&&this.assign(A[this.ref])},resolvePaint:function(){for(var B in this._layer){var A=B.match(/^paint(?:\.(.*))?$/);A&&(this._resolved[A[1]||""]=new r("paint",this.type,this._layer[B]))}},setPaintProperty:function(C,B,D){var A=this._resolved[D||""];A||(A=this._resolved[D||""]=new r("paint",this.type,{})),A[C]=B},getPaintProperty:function(B,A){var C=this._resolved[A||""];if(C){return C[B]}},cascade:function(M,E,G,J){for(var B in this._resolved){if(""===B||M[B]){var A=this._resolved[B],N=A.values();for(var C in N){var D=N[C],I=E.transition?this._cascaded[C]:void 0;if(!I||I.declaration.json!==D.json){var K=A.transition(C,G),F=this._cascaded[C]=new t(D,I,K);F.instant()||(F.loopID=J.set(F.endTime-(new Date).getTime())),I&&J.cancel(I.loopID)}}}}if("symbol"===this.type){var H=new r("layout",this.type,this.layout);this._cascaded["text-size"]=new t(H.values()["text-size"],void 0,G),this._cascaded["icon-size"]=new t(H.values()["icon-size"],void 0,G)}},recalculate:function(C,B){var F=this.type,A=this.paint=new v[F];for(var G in this._cascaded){A[G]=this._cascaded[G].at(C,B)}if(this.hidden=this.minzoom&&C=this.maxzoom||"none"===this.layout.visibility,"symbol"===F?0!==A["text-opacity"]&&this.layout["text-field"]||0!==A["icon-opacity"]&&this.layout["icon-image"]?(w(A,"text"),w(A,"icon")):this.hidden=!0:0===A[F+"-opacity"]?this.hidden=!0:w(A,F),this._cascaded["line-dasharray"]){var E=A["line-dasharray"],D=this._cascaded["line-width"]?this._cascaded["line-width"].at(Math.floor(C),1/0):A["line-width"];E.fromScale*=D,E.toScale*=D}return !this.hidden},assign:function(A){u.extend(this,u.pick(A,["type","source","source-layer","minzoom","maxzoom","filter","layout"]))},json:function(){return u.extend({},this._layer,u.pick(this,["type","source","source-layer","minzoom","maxzoom","filter","layout","paint"]))}}},{"../util/util":106,"./layout_properties":53,"./paint_properties":54,"./style_declaration_set":59,"./style_transition":61}],61:[function(s,t,p){function r(w,v,z){this.declaration=w,this.startTime=this.endTime=(new Date).getTime();var A=w.type;"string"!==A&&"array"!==A||!w.transitionable?this.interp=q[A]:this.interp=u,this.oldTransition=v,this.duration=z.duration||0,this.delay=z.delay||0,this.instant()||(this.endTime=this.startTime+this.duration+this.delay,this.ease=o.easeCubicInOut),v&&v.endTime<=this.startTime&&delete v.oldTransition}function u(w,v,z){return{from:w.to,fromScale:w.toScale,to:v.to,toScale:v.toScale,t:z}}var o=s("../util/util"),q=s("../util/interpolate");t.exports=r,r.prototype.instant=function(){return !this.oldTransition||!this.interp||0===this.duration&&0===this.delay},r.prototype.at=function(z,w,B){var C=this.declaration.calculate(z,w,this.duration);if(this.instant()){return C}if(B=B||Date.now(),Bu?{x:-1,y:-1}:(this.free.splice(u,1),v.wB&&this.free.push({x:v.x+B,y:v.y,w:v.w-B,h:z}),v.h>z&&this.free.push({x:v.x,y:v.y+z,w:v.w,h:v.h-z})):(v.w>B&&this.free.push({x:v.x+B,y:v.y,w:v.w-B,h:v.h}),v.h>z&&this.free.push({x:v.x,y:v.y+z,w:B,h:v.h-z})),{x:v.x,y:v.y,w:B,h:z})}},{}],64:[function(p,q,o){function r(F,J,H,v,z){if(void 0===J.segment){return !0}for(var B=J,K=J.segment+1,E=0;E>-H/2;){if(K--,0>K){return !1}E-=F[K].dist(B),B=F[K]}E+=F[K].dist(F[K+1]),K++;for(var A=[],w=0;H/2>E;){var I=F[K-1],G=F[K],D=F[K+1];if(!D){return !1}var C=I.angleTo(G)-G.angleTo(D);for(C=(C+3*Math.PI)%(2*Math.PI)-Math.PI,A.push({distance:E,angleDelta:C}),w+=C;E-A[0].distance>v;){w-=A.shift().angleDelta}if(Math.abs(w)>z){return !1}K++,E+=G.dist(D)}return !0}q.exports=r},{}],65:[function(p,q,o){function s(G,F,A,E,J){for(var C=[],z=0;z=E&&B.x>=E||(H.x>=E?H=new r(E,H.y+(B.y-H.y)*((E-H.x)/(B.x-H.x))):B.x>=E&&(B=new r(E,H.y+(B.y-H.y)*((E-H.x)/(B.x-H.x)))),H.y>=J&&B.y>=J||(H.y>=J?H=new r(H.x+(B.x-H.x)*((J-H.y)/(B.y-H.y)),J):B.y>=J&&(B=new r(H.x+(B.x-H.x)*((J-H.y)/(B.y-H.y)),J)),v&&H.equals(v[v.length-1])||(v=[H],C.push(v)),v.push(B)))))}}return C}var r=p("point-geometry");q.exports=s},{"point-geometry":137}],66:[function(q,r,o){function p(w,v,A,z,B,u){this.anchorPoint=w,this.x1=v,this.y1=A,this.x2=z,this.y2=B,this.maxScale=u,this.placementScale=0,this[0]=this[1]=this[2]=this[3]=0}r.exports=p},{}],67:[function(q,r,o){function t(w,B,H,D,v,I){var z=H.top*D-v,A=H.bottom*D+v,F=H.left*D-v,G=H.right*D+v;if(this.boxes=[],I){var C=A-z,E=G-F;if(0>=C){return}C=Math.max(10*D,C),this._addLineCollisionBoxes(w,B,E,C)}else{this.boxes.push(new p(new s(B.x,B.y),F,z,G,A,1/0))}}var p=q("./collision_box"),s=q("point-geometry");r.exports=t,t.prototype._addLineCollisionBoxes=function(H,M,B,P){var F=P/2,D=Math.floor(B/F),I=-P/2,K=this.boxes,S=M,A=M.segment+1,N=I;do{if(A--,0>A){return K}N-=H[A].dist(S),S=H[A]}while(N>-B/2);for(var w=H[A].dist(H[A+1]),Q=0;D>Q;Q++){for(var O=-B/2+Q*F;O>N+w;){if(N+=w,A++,A+1>=H.length){return K}w=H[A].dist(H[A+1])}var E=O-N,R=H[A],J=H[A+1],G=J.sub(R)._unit()._mult(E)._add(R),z=Math.max(Math.abs(O-I)-F/2,0),T=B/2/z;K.push(new p(G,-P/2,-P/2,P/2,P/2,T))}return K}},{"./collision_box":66,"point-geometry":137}],68:[function(r,s,p){function o(w,u){this.tree=q(),this.angle=w;var z=Math.sin(w),v=Math.cos(w);this.rotationMatrix=[v,-z,z,v],this.yStretch=1/Math.cos(u/180*Math.PI),this.yStretch=Math.pow(this.yStretch,1.3)}var q=r("rbush");s.exports=o,o.prototype.minScale=0.25,o.prototype.maxScale=2,o.prototype.placeCollisionFeature=function(C){for(var Q=this.minScale,O=this.rotationMatrix,K=this.yStretch,G=0;GA.maxScale&&(w=A.maxScale),w>J.maxScale&&(w=J.maxScale),w>Q&&w>=A.placementScale&&(Q=w),Q>=this.maxScale){return Q}}}return Q},o.prototype.insertCollisionFeature=function(w,u){for(var z=w.boxes,v=0;vw-G*B&&(w=G*B+w/4);var K=2*z,E=I?w/2*D%w:(G/2+K)*B*D%w;return t(F,E,w,C,J,G*B,I,!1)}function t(R,F,D,T,J,I,M,O){for(var N=0,S=F-D,C=[],E=0;ES+D;){S+=D;var B=(S-N)/z,K=q(P.x,H.x,B),G=q(P.y,H.y,B);if(K>=0&&4096>K&&G>=0&&4096>G){K=Math.round(K),G=Math.round(G);var w=new o(K,G,Q,E);(!T||u(R,w,I,T,J))&&C.push(w)}}N+=z}return O||C.length||M||(C=t(R,N/2,D,T,J,I,M,!0)),C}var q=r("../util/interpolate"),o=r("../symbol/anchor"),u=r("./check_max_angle");s.exports=v},{"../symbol/anchor":62,"../util/interpolate":102,"./check_max_angle":64}],70:[function(p,q,o){function r(v,u){this.width=v,this.height=u,this.bin=new s(v,u),this.index={},this.ids={},this.data=new Uint8Array(v*u)}var s=p("./bin_pack");q.exports=r,r.prototype={get debugfunction(){return"canvas" in this},set debugfunction(u){u&&!this.canvas?(this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,document.body.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d")):!u&&this.canvas&&(this.canvas.parentNode.removeChild(this.canvas),delete this.ctx,delete this.canvas)}},r.prototype.getGlyphs=function(){var v,u,A,z={};for(var w in this.ids){v=w.split("#"),u=v[0],A=v[1],z[u]||(z[u]=[]),z[u].push(A)}return z},r.prototype.getRects=function(){var v,u,A,z={};for(var w in this.ids){v=w.split("#"),u=v[0],A=v[1],z[u]||(z[u]={}),z[u][A]=this.index[w]}return z},r.prototype.removeGlyphs=function(D){for(var w in this.ids){var A=this.ids[w],E=A.indexOf(D);if(E>=0&&A.splice(E,1),this.ids[w]=A,!A.length){for(var z=this.index[w],C=this.data,u=0;uM;M++){for(var J=this.width*(z.y+M+A)+z.x+A,O=K*M,C=0;K>C;C++){I[J+C]=w[O+C]}}return this.dirty=!0,z},r.prototype.bind=function(u){this.gl=u,this.texture?u.bindTexture(u.TEXTURE_2D,this.texture):(this.texture=u.createTexture(),u.bindTexture(u.TEXTURE_2D,this.texture),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),u.texImage2D(u.TEXTURE_2D,0,u.ALPHA,this.width,this.height,0,u.ALPHA,u.UNSIGNED_BYTE,null))},r.prototype.updateTexture=function(w){if(this.bind(w),this.dirty){if(w.texSubImage2D(w.TEXTURE_2D,0,0,0,this.width,this.height,w.ALPHA,w.UNSIGNED_BYTE,this.data),this.ctx){for(var v=this.ctx.getImageData(0,0,this.width,this.height),B=0,A=0;B65535){return E("gyphs > 65535 not supported")}void 0===this.loading[D]&&(this.loading[D]={});var C=this.loading[D];if(C[F]){C[F].push(E)}else{C[F]=[E];var B=256*F+"-"+(256*F+255),A=r(D,B,this.url);t(A,function(I,J){for(var H=!I&&new z(new w(new Uint8Array(J))),G=0;GH&&(A=!A),A&&E++;var F=new v(K.x,K.y),D=B[E],P=1/0;H=Math.abs(H);for(var C=r;;){var N=F.dist(D),J=H/N,G=Math.atan2(D.y-F.y,D.x-F.x);if(A||(G+=Math.PI),z&&(G+=Math.PI),O.push({anchorPoint:F,offset:z?Math.PI:0,minScale:J,maxScale:P,angle:(G+2*Math.PI)%(2*Math.PI)}),C>=J){break}for(F=D;F.equals(D);){if(E+=A?1:-1,D=B[E],!D){return J}}var I=D.sub(F)._unit();F=F.sub(I._mult(N)),P=J}return C}var v=s("point-geometry");p.exports={getIconQuads:w,getGlyphQuads:q};var r=0.5},{"point-geometry":137}],74:[function(q,r,o){function s(z,w){for(var A=[],v=0,B=z.length;B>v;v++){var u=p(z[v].properties,w["icon-image"]);u&&A.indexOf(u)<0&&A.push(u)}return A}var p=q("../util/token");r.exports=s},{"../util/token":105}],75:[function(q,r,o){function u(D,w,H){for(var z=[],I=[],A=0,G=D.length;G>A;A++){var E=p(D[A].properties,w["text-field"]);if(E){E=E.toString();var B=w["text-transform"];"uppercase"===B?E=E.toLocaleUpperCase():"lowercase"===B&&(E=E.toLocaleLowerCase());for(var C=0,F=E.length;F>C;C++){I.push(E.charCodeAt(C))}z[A]=E}else{z[A]=null}}return I=t(I,H),{textFeatures:z,codepoints:I}}function t(A,z){var v,B=[];A.sort(s);for(var w=0;wU&&null!==I){var S=K[I+1].x;W=Math.max(S,W);for(var F=I+1;G>=F;F++){K[F].y+=N,K[F].x-=S}X&&r(K,Q,O,I-1,X),O=I+1,I=null,J+=S,T++}s[V.codePoint]&&(I=G)}}var E=K[K.length-1],D=E.x+Q[E.codePoint].advance;W=Math.max(W,D);var C=(T+1)*N;r(K,Q,O,K.length-1,X),z(K,X,M,R,W,N,T),H.top+=-R*C,H.bottom=H.top+C,H.left+=-M*W,H.right=H.left+W}function r(E,D,J,H,I){for(var G=D[E[H].codePoint].advance,C=(E[H].x+G)*I,F=J;H>=F;F++){E[F].x-=C}}function z(K,G,E,I,D,H,J){for(var M=(G-E)*D,C=(-I*(J+1)+0.5)*H,F=0;F=H;H++,I=((H+B)%B+D)*C+F,E+=M){for(G=-1;A>=G;G++){J[E+G]=K[I+(G+A)%A]}}}else{for(H=0;B>H;H++,I+=C,E+=M){for(G=0;A>G;G++){J[E+G]=K[I+G]}}}}function u(w,v,A,z){this.rect=w,this.width=v,this.height=A,this.sdf=z}var t=r("./bin_pack");s.exports=o,o.prototype={get debugfunction(){return"canvas" in this},set debugfunction(v){v&&!this.canvas?(this.canvas=document.createElement("canvas"),this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.canvas.style.width=this.width+"px",this.canvas.style.width=this.width+"px",document.body.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d")):!v&&this.canvas&&(this.canvas.parentNode.removeChild(this.canvas),delete this.ctx,delete this.canvas)}},o.prototype.resize=function(J){if(this.pixelRatio===J){return !1}var C=this.pixelRatio;if(this.pixelRatio=J,this.canvas&&(this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio),this.data){var E=this.data;this.data=!1,this.allocate(),this.texture=!1;for(var D=this.width*C,I=this.height*C,K=this.width*J,v=this.height*J,z=this.data,A=E,B=0;v>B;B++){for(var w=Math.floor(B*I/v)*D,F=B*K,G=0;K>G;G++){var H=Math.floor(G*D/K);z[F+G]=A[w+H]}}E=null,this.dirty=!0}return this.dirty},o.prototype.allocateImage=function(z,w){var C=2,B=z+C+(4-(z+C)%4),v=w+C+(4-(w+C)%4),A=this.bin.allocate(B,v);return 0===A.w?A:(A.originalWidth=z,A.originalHeight=w,A)},o.prototype.getImage=function(z,w){if(this.images[z]){return this.images[z]}if(!this.sprite){return null}var D=this.sprite.getSpritePosition(z);if(!D.width||!D.height){return null}var B=D.width/D.pixelRatio,v=D.height/D.pixelRatio,A=this.allocateImage(B,v);if(0===A.w){return A}var C=new u(A,B,v,D.sdf);return this.images[z]=C,this.copy(A,D,w),C},o.prototype.getPosition=function(z,w){var D=this.getImage(z,w),B=D&&D.rect;if(!B){return null}var v=w?D.width:B.w,A=w?D.height:B.h,C=1;return{size:[v,A],tl:[(B.x+C)/this.width,(B.y+C)/this.height],br:[(B.x+C+v)/this.width,(B.y+C+A)/this.height]}},o.prototype.allocate=function(){if(!this.data){var w=Math.floor(this.width*this.pixelRatio),v=Math.floor(this.height*this.pixelRatio);this.data=new Uint32Array(w*v);for(var z=0;z=200&&(this.zooming=!1,this.fire("moveend"))},A),A.duration<200&&(clearTimeout(this._onZoomEnd),this._onZoomEnd=setTimeout(function(){this.zooming=!1,this.fire("moveend")}.bind(this),200)),this},zoomIn:function(A){return this.zoomTo(this.getZoom()+1,A),this},zoomOut:function(A){return this.zoomTo(this.getZoom()-1,A),this},getBearing:function(){return this.transform.bearing},setBearing:function(A){return this.jumpTo({bearing:A}),this},rotateTo:function(B,A){this.stop(),A=t.extend({duration:500,easing:t.ease},A);var C=this.transform,E=this.getBearing(),D=C.center;return A.around?D=z.convert(A.around):A.offset&&(D=C.pointLocation(C.centerPoint.add(v.convert(A.offset)))),B=this._normalizeBearing(B,E),this.rotating=!0,this.fire("movestart"),this._ease(function(F){C.setBearingAround(w(E,B,F),D),this.fire("move").fire("rotate")},function(){this.rotating=!1,this.fire("moveend")},A),this},resetNorth:function(A){return this.rotateTo(0,t.extend({duration:1000},A)),this},snapToNorth:function(A){return Math.abs(this.getBearing())E?-1:1;N=Math.abs(Math.log(E/ac))/S,A=function(){return 0},F=function(B){return Math.exp(U*S*B)}}return I.duration=1000*N/G,this.zooming=!0,W!==ab&&(this.rotating=!0),this.fire("movestart"),this._ease(function(M){var B=M*N,T=A(B);K.zoom=ad+K.scaleZoom(1/F(B)),K.center=K.unproject(X.add(aa.sub(X).mult(T)),O),ab!==W&&(K.bearing=w(W,ab,M)),this.fire("move").fire("zoom"),ab!==W&&this.fire("rotate")},function(){this.zooming=!1,this.rotating=!1,this.fire("moveend")},I),this},isEasing:function(){return !!this._abortFn},stop:function(){return this._abortFn&&(this._abortFn(),this._finishEase()),this},_ease:function(B,A,C){this._finishFn=A,this._abortFn=s.timed(function(D){B.call(this,C.easing(D)),1===D&&this._finishEase()},C.animate===!1?0:C.duration,this)},_finishEase:function(){delete this._abortFn;var A=this._finishFn;delete this._finishFn,A.call(this)},_normalizeBearing:function(B,A){B=t.wrap(B,-180,180);var C=Math.abs(B-A);return Math.abs(B-360-A)z?-5:z>window.screen.width-2?5:(z-this._prevX)/4;this._map.setBearing(this._map.getBearing()-w),this._prevX=v.screenX,this._moved=!0,v.preventDefault()},_onCompassUp:function(){document.removeEventListener("mousemove",this._onCompassMove),document.removeEventListener("mouseup",this._onCompassUp),s.enableDrag(),this._moved&&(this._moved=!1,s.suppressClick()),this._map.snapToNorth()},_createButton:function(v,z){var w=s.create("button",v,this._container);return w.addEventListener("click",function(){z()}),w},_drawNorth:function(){var w=20,B=8,z=26,A=this._map.transform.angle+Math.PI/2,v=this._compassCtx;this._compassCanvas.width=this._compassCanvas.width,v.translate(z,z),v.rotate(A),v.beginPath(),v.fillStyle="#000",v.lineTo(0,-B),v.lineTo(-w,0),v.lineTo(0,B),v.fill(),v.beginPath(),v.fillStyle="#bbb",v.moveTo(0,0),v.lineTo(0,B),v.lineTo(w,0),v.lineTo(0,-B),v.fill(),v.beginPath(),v.strokeStyle="#fff",v.lineWidth=4,v.moveTo(0,-B),v.lineTo(0,B),v.stroke()}})},{"../../util/dom":98,"../../util/util":106,"./control":80}],82:[function(q,r,p){function u(v){this._map=v,this._el=v.getCanvasContainer(),this._container=v.getContainer(),o.bindHandlers(this)}var t=q("../../util/dom"),s=q("../../geo/lng_lat_bounds"),o=q("../../util/util");r.exports=u,u.prototype={enable:function(){this._el.addEventListener("mousedown",this._onMouseDown,!1)},disable:function(){this._el.removeEventListener("mousedown",this._onMouseDown)},_onMouseDown:function(v){(v.shiftKey||1===v.which&&1===v.button)&&(document.addEventListener("mousemove",this._onMouseMove,!1),document.addEventListener("keydown",this._onKeyDown,!1),document.addEventListener("mouseup",this._onMouseUp,!1),this._startPos=t.mousePos(this._el,v),this.active=!0)},_onMouseMove:function(C){var B=this._startPos,z=t.mousePos(this._el,C);this._box||(this._box=t.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),t.disableDrag(),this._map.fire("boxzoomstart"));var A=Math.min(B.x,z.x),D=Math.max(B.x,z.x),w=Math.min(B.y,z.y),v=Math.max(B.y,z.y);t.setTransform(this._box,"translate("+A+"px,"+w+"px)"),this._box.style.width=D-A+"px",this._box.style.height=v-w+"px"},_onMouseUp:function(A){var z=this._startPos,v=t.mousePos(this._el,A),w=new s(this._map.unproject(z),this._map.unproject(v));this._finish(),this._map.fitBounds(w,{linear:!0}).fire("boxzoomend",{boxZoomBounds:w})},_onKeyDown:function(v){27===v.keyCode&&(this._finish(),this._map.fire("boxzoomcancel"))},_finish:function(){this._box&&(this.active=!1,document.removeEventListener("mousemove",this._onMouseMove,!1),document.removeEventListener("keydown",this._onKeyDown,!1),document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box.parentNode.removeChild(this._box),this._box=null,t.enableDrag())}}},{"../../geo/lng_lat_bounds":21,"../../util/dom":98,"../../util/util":106}],83:[function(q,r,o){function p(s){this._map=s,this._onDblClick=this._onDblClick.bind(this)}r.exports=p,p.prototype={enable:function(){this._map.on("dblclick",this._onDblClick)},disable:function(){this._map.off("dblclick",this._onDblClick)},_onDblClick:function(s){this._map.zoomTo(Math.round(this._map.getZoom())+1,{around:s.lngLat})}}},{}],84:[function(p,o,r){function q(A){this._map=A,this._el=A.getCanvasContainer(),s.bindHandlers(this)}var z=p("../../util/dom"),s=p("../../util/util");o.exports=q;var t=0.25,v=s.bezier(0,0,t,1),u=3000,w=4000;q.prototype={enable:function(){this._el.addEventListener("mousedown",this._onDown,!1),this._el.addEventListener("touchstart",this._onDown,!1)},disable:function(){this._el.removeEventListener("mousedown",this._onDown),this._el.removeEventListener("touchstart",this._onDown)},_onDown:function(A){this._startPos=this._pos=z.mousePos(this._el,A),this._inertia=[[Date.now(),this._pos]],A.touches?1===A.touches.length&&(document.addEventListener("touchmove",this._onMove,!1),document.addEventListener("touchend",this._onTouchEnd,!1)):(document.addEventListener("mousemove",this._onMove,!1),document.addEventListener("mouseup",this._onMouseUp,!1))},_onMove:function(C){var B=this._map;if(!(B.boxZoom.active||B.dragRotate.active||C.touches&&C.touches.length>1)){this.active=!0;var E=z.mousePos(this._el,C),A=this._inertia,D=Date.now();for(A.push([D,E]);A.length>2&&D-A[0][0]>50;){A.shift()}B.stop(),B.transform.setLocationAtPoint(B.transform.pointLocation(this._pos),E),B.fire("move"),this._pos=E,C.preventDefault()}},_onUp:function(){var E=this._inertia;if(E.length<2){return void this._map.fire("moveend")}var H=E[E.length-1],C=E[0],D=H[1].sub(C[1]),B=(H[0]-C[0])/1000,I=D.mult(t/B),F=I.mag();F>u&&(F=u,I._unit()._mult(F));var A=F/(w*t),G=I.mult(-A/2);this._map.panBy(G,{duration:1000*A,easing:v,noMoveStart:!0}),this.active=!1},_onMouseUp:function(){this._onUp(),document.removeEventListener("mousemove",this._onMove,!1),document.removeEventListener("mouseup",this._onMouseUp,!1)},_onTouchEnd:function(){this._onUp(),document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onTouchEnd)}}},{"../../util/dom":98,"../../util/util":106}],85:[function(r,s,p){function q(v){this._map=v,this._el=v.getCanvasContainer(),o.bindHandlers(this)}var u=r("../../util/dom"),t=r("point-geometry"),o=r("../../util/util");s.exports=q,q.prototype={enable:function(){this._el.addEventListener("contextmenu",this._onContextMenu,!1)},disable:function(){this._el.removeEventListener("contextmenu",this._onContextMenu)},_onContextMenu:function(v){this._map.stop(),this._startPos=this._pos=u.mousePos(this._el,v),document.addEventListener("mousemove",this._onMouseMove,!1),document.addEventListener("mouseup",this._onMouseUp,!1),v.preventDefault()},_onMouseMove:function(E){var B=this._startPos,w=this._pos,z=u.mousePos(this._el,E),A=this._map,F=A.transform.centerPoint,v=B.sub(F),D=v.mag();this.active=!0,A.rotating||(A.fire("movestart"),A.rotating=!0),200>D&&(F=B.add(new t(-200,0)._rotate(v.angle())));var C=w.sub(F).angleWith(z.sub(F))/Math.PI*180;A.transform.bearing=A.getBearing()-C,A.fire("move").fire("rotate"),clearTimeout(this._timeout),this._timeout=setTimeout(this._onTimeout,200),this._pos=z},_onTimeout:function(){var v=this._map;v.rotating=!1,v.snapToNorth(),v.rotating||(v._rerender(),v.fire("moveend"))},_onMouseUp:function(){this.active=!1,document.removeEventListener("mousemove",this._onMouseMove,!1),document.removeEventListener("mouseup",this._onMouseUp,!1)}}},{"../../util/dom":98,"../../util/util":106,"point-geometry":137}],86:[function(q,s,p){function o(u){this._map=u,this._el=u.getCanvasContainer(),this._onKeyDown=this._onKeyDown.bind(this)}s.exports=o;var t=80,r=2;o.prototype={enable:function(){this._el.addEventListener("keydown",this._onKeyDown,!1)},disable:function(){this._el.removeEventListener("keydown",this._onKeyDown)},_onKeyDown:function(v){if(!(v.altKey||v.ctrlKey||v.metaKey)){var u=this._map;switch(v.keyCode){case 61:case 107:case 171:case 187:u.zoomTo(Math.round(u.getZoom())+(v.shiftKey?2:1));break;case 189:case 109:case 173:u.zoomTo(Math.round(u.getZoom())-(v.shiftKey?2:1));break;case 37:v.shiftKey?u.setBearing(u.getBearing()-r):u.panBy([-t,0]);break;case 39:v.shiftKey?u.setBearing(u.getBearing()+r):u.panBy([t,0]);break;case 38:u.panBy([0,-t]);break;case 40:u.panBy([0,t])}}}}},{}],87:[function(q,r,p){function s(u){this._map=u,this._el=u.getCanvasContainer(),o.bindHandlers(this)}var t=q("../../util/dom"),o=q("../../util/util");r.exports=s,s.prototype={enable:function(){this._el.addEventListener("touchstart",this._onStart,!1)},disable:function(){this._el.removeEventListener("touchstart",this._onStart)},_onStart:function(u){if(2===u.touches.length){var w=t.mousePos(this._el,u.touches[0]),v=t.mousePos(this._el,u.touches[1]);this._startVec=w.sub(v),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,document.addEventListener("touchmove",this._onMove,!1),document.addEventListener("touchend",this._onEnd,!1)}},_onMove:function(w){if(2===w.touches.length){var B=t.mousePos(this._el,w.touches[0]),z=t.mousePos(this._el,w.touches[1]),D=B.add(z).div(2),C=B.sub(z),v=C.mag()/this._startVec.mag(),u=180*C.angleWith(this._startVec)/Math.PI,A=this._map;A.easeTo({zoom:A.transform.scaleZoom(this._startScale*v),bearing:this._startBearing+u,duration:0,around:A.unproject(D)}),w.preventDefault()}},_onEnd:function(){this._map.snapToNorth(),document.removeEventListener("touchmove",this._onMove),document.removeEventListener("touchend",this._onEnd)}}},{"../../util/dom":98,"../../util/util":106}],88:[function(r,q,s){function w(A){this._map=A,this._el=A.getCanvasContainer(),u.bindHandlers(this)}var z=r("../../util/dom"),t=r("../../util/browser"),u=r("../../util/util");q.exports=w;var p="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",v=-1!==p.indexOf("firefox"),o=-1!==p.indexOf("safari")&&-1===p.indexOf("chrom");w.prototype={enable:function(){this._el.addEventListener("wheel",this._onWheel,!1),this._el.addEventListener("mousewheel",this._onWheel,!1)},disable:function(){this._el.removeEventListener("wheel",this._onWheel),this._el.removeEventListener("mousewheel",this._onWheel)},_onWheel:function(C){var B;"wheel"===C.type?(B=C.deltaY,v&&C.deltaMode===window.WheelEvent.DOM_DELTA_PIXEL&&(B/=t.devicePixelRatio),C.deltaMode===window.WheelEvent.DOM_DELTA_LINE&&(B*=40)):"mousewheel"===C.type&&(B=-C.wheelDeltaY,o&&(B/=3));var A=(window.performance||Date).now(),D=A-(this._time||0);this._pos=z.mousePos(this._el,C),this._time=A,0!==B&&B%4.000244140625===0?(this._type="wheel",B=Math.floor(B/4)):0!==B&&Math.abs(B)<4?this._type="trackpad":D>400?(this._type=null,this._lastValue=B,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(D*B)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,B+=this._lastValue)),C.shiftKey&&B&&(B/=4),this._type&&this._zoom(-B),C.preventDefault()},_onTimeout:function(){this._type="wheel",this._zoom(-this._lastValue)},_zoom:function(D){var B=this._map,A=2/(1+Math.exp(-Math.abs(D/100)));0>D&&0!==A&&(A=1/A);var E=B.ease?B.ease.to:B.transform.scale,C=B.transform.scaleZoom(E*A);B.zoomTo(C,{duration:0,around:B.unproject(this._pos)})}}},{"../../util/browser":95,"../../util/dom":98,"../../util/util":106}],89:[function(q,r,p){function s(){o.bindAll(["_onHashChange","_updateHash"],this)}r.exports=s;var o=q("../util/util");s.prototype={addTo:function(u){return this._map=u,window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},remove:function(){return window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),delete this._map,this},_onHashChange:function(){var u=location.hash.replace("#","").split("/");return u.length>=3?(this._map.jumpTo({center:[+u[2],+u[1]],zoom:+u[0],bearing:+(u[3]||0)}),!0):!1},_updateHash:function(){var v=this._map.getCenter(),z=this._map.getZoom(),u=this._map.getBearing(),w=Math.max(0,Math.ceil(Math.log(z)/Math.LN2)),A="#"+Math.round(100*z)/100+"/"+v.lat.toFixed(w)+"/"+v.lng.toFixed(w)+(u?"/"+Math.round(10*u)/10:"");window.history.replaceState("","",A)}}},{"../util/util":106}],90:[function(r,s,q){function t(w){this._map=w,this._el=w.getCanvasContainer();for(var v in p){w[v]=new p[v](w)}o.bindHandlers(this)}var p={scrollZoom:r("./handler/scroll_zoom"),boxZoom:r("./handler/box_zoom"),dragRotate:r("./handler/drag_rotate"),dragPan:r("./handler/drag_pan"),keyboard:r("./handler/keyboard"),doubleClickZoom:r("./handler/dblclick_zoom"),pinch:r("./handler/pinch")},u=r("../util/dom"),o=r("../util/util");s.exports=t,t.prototype={enable:function(){var w=this._map.options,v=this._el;for(var z in p){w[z]&&this._map[z].enable()}v.addEventListener("mousedown",this._onMouseDown,!1),v.addEventListener("mouseup",this._onMouseUp,!1),v.addEventListener("touchstart",this._onTouchStart,!1),v.addEventListener("click",this._onClick,!1),v.addEventListener("mousemove",this._onMouseMove,!1),v.addEventListener("dblclick",this._onDblClick,!1),v.addEventListener("contextmenu",this._onContextMenu,!1)},disable:function(){var w=this._map.options,v=this._el;for(var z in p){w[z]&&this._map[z].disable()}v.removeEventListener("mousedown",this._onMouseDown),v.removeEventListener("mouseup",this._onMouseUp),v.removeEventListener("touchstart",this._onTouchStart),v.removeEventListener("click",this._onClick),v.removeEventListener("mousemove",this._onMouseMove),v.removeEventListener("dblclick",this._onDblClick),v.removeEventListener("contextmenu",this._onContextMenu)},_onMouseDown:function(v){this._startPos=u.mousePos(this._el,v)},_onMouseUp:function(v){!this._contextMenuFired||this._map.dragRotate.active||this._map.dragPan.active||this._fireEvent("contextmenu",v),this._contextMenuFired=null},_onTouchStart:function(v){!v.touches||v.touches.length>1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._fireEvent("dblclick",v)):this._tapped=setTimeout(this._onTimeout,300))},_onTimeout:function(){this._tapped=null},_onMouseMove:function(w){var v=this._map,A=this._el;if(!v.dragPan.active&&!v.dragRotate.active){for(var z=w.toElement||w.target;z&&z!==A;){z=z.parentNode}z===A&&this._fireEvent("mousemove",w)}},_onClick:function(w){var v=u.mousePos(this._el,w);v.equals(this._startPos)&&this._fireEvent("click",w)},_onDblClick:function(v){this._fireEvent("dblclick",v),v.preventDefault()},_onContextMenu:function(){this._contextMenuFired=!0},_fireEvent:function(w,v){var z=u.mousePos(this._el,v);this._map.fire(w,{lngLat:this._map.unproject(z),point:z,originalEvent:v})}}},{"../util/dom":98,"../util/util":106,"./handler/box_zoom":82,"./handler/dblclick_zoom":83,"./handler/drag_pan":84,"./handler/drag_rotate":85,"./handler/keyboard":86,"./handler/pinch":87,"./handler/scroll_zoom":88}],91:[function(w,q,J){var B=w("../util/canvas"),p=w("../util/util"),F=w("../util/browser"),C=w("../util/evented"),E=w("../util/dom"),o=w("../style/style"),r=w("../style/animation_loop"),z=w("../render/painter"),A=w("../geo/transform"),v=w("./hash"),I=w("./interaction"),u=w("./camera"),H=w("../geo/lng_lat"),D=w("../geo/lng_lat_bounds"),G=w("point-geometry"),t=w("./control/attribution"),s=q.exports=function(K){if(K=this.options=p.inherit(this.options,K),this.animationLoop=new r,this.transform=new A(K.minZoom,K.maxZoom),K.maxBounds){var M=D.convert(K.maxBounds);this.transform.lngRange=[M.getWest(),M.getEast()],this.transform.latRange=[M.getSouth(),M.getNorth()]}p.bindAll(["_forwardStyleEvent","_forwardSourceEvent","_forwardLayerEvent","_forwardTileEvent","_onStyleLoad","_onStyleChange","_onSourceAdd","_onSourceRemove","_onSourceUpdate","_onWindowResize","onError","update","render"],this),this._setupContainer(),this._setupPainter(),this.on("move",this.update),this.on("zoom",this.update.bind(this,!0)),this.on("moveend",function(){this.animationLoop.set(300),this._rerender()}.bind(this)),"undefined"!=typeof window&&window.addEventListener("resize",this._onWindowResize,!1),this.interaction=new I(this),K.interactive&&this.interaction.enable(),this._hash=K.hash&&(new v).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo(K),this.sources={},this.stacks={},this._classes={},this.resize(),K.classes&&this.setClasses(K.classes),K.style&&this.setStyle(K.style),K.attributionControl&&this.addControl(new t),this.on("style.error",this.onError),this.on("source.error",this.onError),this.on("tile.error",this.onError)};p.extend(s.prototype,C),p.extend(s.prototype,u.prototype),p.extend(s.prototype,{options:{center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:20,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,pinch:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1},addControl:function(K){return K.addTo(this),this},addClass:function(K,M){this._classes[K]||(this._classes[K]=!0,this.style&&this.style._cascade(this._classes,M))},removeClass:function(K,M){this._classes[K]&&(delete this._classes[K],this.style&&this.style._cascade(this._classes,M))},setClasses:function(M,N){this._classes={};for(var K=0;Kthis._map.transform.height-D?["bottom"]:[],A.xthis._map.transform.width-C/2&&z.push("right"),z=0===z.length?"bottom":z.join("-"),this.options.anchor=z}var E={top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"},B=this._container.classList;for(var w in E){B.remove("mapboxgl-popup-anchor-"+w)}B.add("mapboxgl-popup-anchor-"+z),u.setTransform(this._container,E[z]+" translate("+A.x+"px,"+A.y+"px)")}},_onClickClose:function(){this.remove()}})},{"../geo/lng_lat":20,"../util/dom":98,"../util/evented":100,"../util/util":106}],93:[function(q,r,p){function o(s,u){this.target=s,this.parent=u,this.callbacks={},this.callbackID=0,this.receive=this.receive.bind(this),this.target.addEventListener("message",this.receive,!1)}r.exports=o,o.prototype.receive=function(v){var z,w=v.data;if(""===w.type){z=this.callbacks[w.id],delete this.callbacks[w.id],z(w.error||null,w.data)}else{if("undefined"!=typeof w.id){var u=w.id;this.parent[w.type](w.data,function(A,C,B){this.postMessage({type:"",id:String(u),error:A?String(A):null,data:C},B)}.bind(this))}else{this.parent[w.type](w.data)}}},o.prototype.send=function(w,A,z,v){var u=null;z&&(this.callbacks[u=this.callbackID++]=z),this.postMessage({type:w,id:String(u),data:A},v)},o.prototype.postMessage=function(u,w){try{this.target.postMessage(u,w)}catch(v){this.target.postMessage(u)}}},{}],94:[function(p,q,o){function r(u){var s=document.createElement("a");return s.href=u,s.protocol===document.location.protocol&&s.host===document.location.host}o.getJSON=function(u,s){var v=new XMLHttpRequest;return v.open("GET",u,!0),v.setRequestHeader("Accept","application/json"),v.onerror=function(t){s(t)},v.onload=function(){if(v.status>=200&&v.status<300&&v.response){var w;try{w=JSON.parse(v.response)}catch(t){return s(t)}s(null,w)}else{s(new Error(v.statusText))}},v.send(),v},o.getArrayBuffer=function(u,s){var v=new XMLHttpRequest;return v.open("GET",u,!0),v.responseType="arraybuffer",v.onerror=function(t){s(t)},v.onload=function(){v.status>=200&&v.status<300&&v.response?s(null,v.response):s(new Error(v.statusText))},v.send(),v},o.getImage=function(u,s){return o.getArrayBuffer(u,function(v,z){v&&s(v);var t=new Image;t.onload=function(){s(null,t),(window.URL||window.webkitURL).revokeObjectURL(t.src)};var w=new Blob([new Uint8Array(z)],{type:"image/png"});return t.src=(window.URL||window.webkitURL).createObjectURL(w),t.getData=function(){var B=document.createElement("canvas"),A=B.getContext("2d");return B.width=t.width,B.height=t.height,A.drawImage(t,0,0),A.getImageData(0,0,t.width,t.height).data},t})},o.getVideo=function(v,s){var z=document.createElement("video");z.onloadstart=function(){s(null,z)};for(var u=0;u=u+w?z.call(v,1):(z.call(v,(C-u)/w),p.frame(B)))}if(!w){return z.call(v,1),null}var A=!1,u=window.performance?window.performance.now():Date.now();return p.frame(B),function(){A=!0}},p.supported=function(w){for(var v=([function(){return"undefined"!=typeof window},function(){return"undefined"!=typeof document},function(){return !!(Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray)},function(){return !(!Function.prototype||!Function.prototype.bind||!(Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions))},function(){return"JSON" in window&&"parse" in JSON&&"stringify" in JSON},function(){return(new o).supportsWebGLContext(w&&w.failIfMajorPerformanceCaveat||!1)},function(){return"Worker" in window}]),u=0;uz;z++){var A=new t(r("../../source/worker")),v=new o(A,u);v.name="Worker "+z,this.actors.push(v)}}var o=r("../actor"),t=r("webworkify");s.exports=p,p.prototype={broadcast:function(v,u){for(var w=0;w=0&&this._events[u].splice(v,1),this._events[u].length||delete this._events[u]}else{delete this._events[u]}return this},once:function(u,w){var v=function(t){this.off(u,v),w.call(this,t)}.bind(this);return this.on(u,v),this},fire:function(v,z){if(!this.listens(v)){return this}z=o.extend({},z),o.extend(z,{type:v,target:this});for(var w=this._events[v].slice(),u=0;u=2?"@2x.$1":".$1"):v}},{"./browser":95,"./config":99}],104:[function(p,q,o){function r(s,u){this.max=s,this.onRemove=u,this.reset()}q.exports=r,r.prototype.reset=function(){for(var s in this.list){this.onRemove(this.list[s])}return this.list={},this.order=[],this},r.prototype.add=function(u,v){if(this.list[u]=v,this.order.push(u),this.order.length>this.max){var s=this.get(this.order[0]);s&&this.onRemove(s)}return this},r.prototype.has=function(s){return s in this.list},r.prototype.keys=function(){return this.order},r.prototype.get=function(s){if(!this.has(s)){return null}var u=this.list[s];return delete this.list[s],this.order.splice(this.order.indexOf(s),1),u}},{}],105:[function(q,r,o){function p(s,t){return t.replace(/{([^{}()\[\]<>$=:;.,^]+)}/g,function(v,u){return u in s?s[u]:""})}r.exports=p},{}],106:[function(q,r,o){var p=q("unitbezier"),s=q("../geo/coordinate");o.easeCubicInOut=function(w){if(0>=w){return 0}if(w>=1){return 1}var u=w*w,v=u*w;return 4*(0.5>w?v:3*(w-u)+v-0.75)},o.bezier=function(A,u,v,w){var z=new p(A,u,v,w);return function(B){return z.solve(B)}},o.ease=o.bezier(0.25,0.1,0.25,1),o.premultiply=function(u){return u[0]*=u[3],u[1]*=u[3],u[2]*=u[3],u},o.clamp=function(w,u,v){return Math.min(v,Math.max(u,w))},o.wrap=function(A,u,v){var w=v-u,z=((A-u)%w+w)%w+u;return z===u?v:z},o.coalesce=function(){for(var v=0;vB?0:B>255?255:B}function s(B){return 0>B?0:B>1?1:B}function t(B){return q("%"===B[B.length-1]?parseFloat(B)/100*255:parseInt(B))}function z(B){return s("%"===B[B.length-1]?parseFloat(B)/100:parseFloat(B))}function A(D,C,B){return 0>B?B+=1:B>1&&(B-=1),1>6*B?D+(C-D)*B*6:1>2*B?C:2>3*B?D+(C-D)*(2/3-B)*6:D}function o(H){var B=H.replace(/ /g,"").toLowerCase();if(B in w){return w[B].slice()}if("#"===B[0]){if(4===B.length){var E=parseInt(B.substr(1),16);return E>=0&&4095>=E?[(3840&E)>>4|(3840&E)>>8,240&E|(240&E)>>4,15&E|(15&E)<<4,1]:null}if(7===B.length){var E=parseInt(B.substr(1),16);return E>=0&&16777215>=E?[(16711680&E)>>16,(65280&E)>>8,255&E,1]:null}return null}var K=B.indexOf("("),N=B.indexOf(")");if(-1!==K&&N+1===B.length){var D=B.substr(0,K),O=B.substr(K+1,N-(K+1)).split(","),C=1;switch(D){case"rgba":if(4!==O.length){return null}C=z(O.pop());case"rgb":return 3!==O.length?null:[t(O[0]),t(O[1]),t(O[2]),C];case"hsla":if(4!==O.length){return null}C=z(O.pop());case"hsl":if(3!==O.length){return null}var F=(parseFloat(O[0])%360+360)%360/360,M=z(O[1]),G=z(O[2]),I=0.5>=G?G*(M+1):G+M-G*M,J=2*G-I;return[q(255*A(J,I,F+1/3)),q(255*A(J,I,F)),q(255*A(J,I,F-1/3)),C];default:return null}}return null}var w={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{u.parseCSSColor=o}catch(v){}},{}],108:[function(q,o,s){function u(z){return function(C,B,A){return"$type"===B?"t"+z+p.indexOf(A):"p["+JSON.stringify(B)+"]"+z+JSON.stringify(A)}}function t(z){var A=u(z);return function(C,D,B){return"$type"===D?A(C,D,B):"typeof(p["+JSON.stringify(D)+"]) === typeof("+JSON.stringify(B)+") && "+A(C,D,B)}}function w(z){return r[z[0]].apply(z,z)}function v(){return !0}var p=["Unknown","Point","LineString","Polygon"],r={"==":u("==="),"!=":u("!=="),">":t(">"),"<":t("<"),"<=":t("<="),">=":t(">="),"in":function(z,A){return"(function(){"+Array.prototype.slice.call(arguments,2).map(function(B){return"if ("+r["=="](z,A,B)+") return true;"}).join("")+"return false;})()"},"!in":function(){return"!("+r["in"].apply(this,arguments)+")"},any:function(){return Array.prototype.slice.call(arguments,1).map(function(z){return"("+w(z)+")"}).join("||")||"false"},all:function(){return Array.prototype.slice.call(arguments,1).map(function(z){return"("+w(z)+")"}).join("&&")||"true"},none:function(){return"!("+r.any.apply(this,arguments)+")"}};o.exports=function(z){if(!z){return v}var A="var p = f.properties || f.tags || {}, t = f.type; return "+w(z)+";";return new Function("f",A)}},{}],109:[function(q,r,p){function t(H,A,M,v,C,K,D,N){if(M/=A,v/=A,D>=M&&v>=N){return H}if(D>v||M>N){return null}for(var w=[],E=0;E=M&&v>=J){w.push(z)}else{if(!(I>v||M>J)){var B=1===F?o(G,M,v,C):s(G,M,v,C,K,3===F);B.length&&w.push({geometry:B,type:F,tags:H[E].tags||null,min:z.min,max:z.max})}}}return w.length?w:null}function o(D,E,A,C){for(var v=[],w=0;w=E&&A>=B&&v.push(z)}return v}function s(Q,I,D,F,K,C){for(var M=[],E=0;EN;N++){G=P||O[N],P=O[N+1],S=H||G[F],H=P[F],I>S?H>D?(z.push(K(G,P,I),K(G,P,D)),C||(z=u(M,z,J,B))):H>=I&&z.push(K(G,P,I)):S>D?I>H?(z.push(K(G,P,D),K(G,P,I)),C||(z=u(M,z,J,B))):D>=H&&z.push(K(G,P,D)):(z.push(G),I>H?(z.push(K(G,P,I)),C||(z=u(M,z,J,B))):H>D&&(z.push(K(G,P,D)),C||(z=u(M,z,J,B))))}G=O[A-1],S=G[F],S>=I&&D>=S&&z.push(G),R=z[z.length-1],C&&R&&(z[0][0]!==R[0]||z[0][1]!==R[1])&&z.push(z[0]),u(M,z,J,B)}return M}function u(z,A,v,w){return A.length&&(A.area=v,A.dist=w,z.push(A)),[]}r.exports=t},{}],110:[function(p,o,q){function w(E,C){var D=[];if("FeatureCollection"===E.type){for(var F=0;FF?-1:F>1?1:F,[D,F,0]}function u(F){for(var D,E,G=0,H=0,C=0;C1){return !1}var J=N.geometry[0].length;if(5!==J){return !1}for(var I=0;J>I;I++){var F=t.point(N.geometry[0][I],H,K.z2,K.x,K.y);if(F[0]!==-G&&F[0]!==H+G||F[1]!==-G&&F[1]!==H+G){return !1}}return !0}r.exports=E;var B=v("./convert"),t=v("./transform"),u=v("./clip"),p=v("./wrap"),s=v("./tile");q.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:100000,solidChildren:!1,tolerance:3,extent:4096,buffer:64,debug:0},q.prototype.splitTile=function(ag,Q,ac,X,Y,U,R){for(var ab=[ag,Q,ac,X],ak=this.options,P=ak.debug,ai=null;ab.length;){X=ab.pop(),ac=ab.pop(),Q=ab.pop(),ag=ab.pop();var W=1<1&&console.time("creation"),aa=this.tiles[ah]=s(ag,W,ac,X,af,Q===ak.maxZoom),this.tileCoords.push({z:Q,x:ac,y:X}),P)){P>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Q,ac,X,aa.numFeatures,aa.numPoints,aa.numSimplified),console.timeEnd("creation"));var ad="z"+Q;this.stats[ad]=(this.stats[ad]||0)+1,this.total++}if(aa.source=ag,Y){if(Q===ak.maxZoom||Q===Y){continue}var K=1<1&&console.time("clipping");var ae,O,I,G,aj,J,H=0.5*ak.buffer/ak.extent,F=0.5-H,V=0.5+H,N=1+H;ae=O=I=G=null,aj=u(ag,W,ac-H,ac+V,0,D,aa.min[0],aa.max[0]),J=u(ag,W,ac+F,ac+N,0,D,aa.min[0],aa.max[0]),aj&&(ae=u(aj,W,X-H,X+V,1,C,aa.min[1],aa.max[1]),O=u(aj,W,X+F,X+N,1,C,aa.min[1],aa.max[1])),J&&(I=u(J,W,X-H,X+V,1,C,aa.min[1],aa.max[1]),G=u(J,W,X+F,X+N,1,C,aa.min[1],aa.max[1])),P>1&&console.timeEnd("clipping"),ae&&ab.push(ae,Q+1,2*ac,2*X),O&&ab.push(O,Q+1,2*ac,2*X+1),I&&ab.push(I,Q+1,2*ac+1,2*X),G&&ab.push(G,Q+1,2*ac+1,2*X+1)}else{Y&&(ai=Q)}}return ai},q.prototype.getTile=function(N,S,M){var H=this.options,I=H.extent,F=H.debug,T=1<1&&console.log("drilling down to z%d-%d-%d",N,S,M);for(var Q,R=N,P=S,G=M;!Q&&R>0;){R--,P=Math.floor(P/2),G=Math.floor(G/2),Q=this.tiles[z(R,P,G)]}if(!Q||!Q.source){return null}if(F>1&&console.log("found parent tile z%d-%d-%d",R,P,G),o(Q,I,H.buffer)){return t.tile(Q,I)}F>1&&console.time("drilling down");var O=this.splitTile(Q.source,R,P,G,N,S,M);if(F>1&&console.timeEnd("drilling down"),null!==O){var J=1<E;E++){v=s(G[E],G[F],G[A]),v>w&&(H=E,w=v)}w>z?(G[H][2]=w,C.push(F),C.push(H),F=H):(A=C.pop(),F=C.pop())}}function s(H,C,F){var w=C[0],v=C[1],I=F[0],z=F[1],E=H[0],G=H[1],A=I-w,D=z-v;if(0!==A||0!==D){var B=((E-w)*A+(G-v)*D)/(A*A+D*D);B>1?(w=I,v=z):B>0&&(w+=A*B,v+=D*B)}return A=E-w,D=G-v,A*A+D*D}r.exports=p},{}],113:[function(p,q,o){function s(C,w,F,z,B,E){for(var v={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:F,y:z,z2:w,transformed:!1,min:[2,1],max:[-1,0]},D=0;Dv.max[0]&&(v.max[0]=A[0]),A[1]>v.max[1]&&(v.max[1]=A[1])}return v}function r(E,z,I,A){var C,H,v,G,J=z.geometry,B=z.type,w=[],D=I*I;if(1===B){for(C=0;CD)&&(F.push(G),E.numSimplified++),E.numPoints++}w.push(F)}else{E.numPoints+=v.length}}}w.length&&E.features.push({geometry:w,type:B,tags:z.tags||null})}q.exports=s},{}],114:[function(p,q,o){function r(v,H){if(v.transformed){return v}var z,E,w,D=v.z2,F=v.x,I=v.y;for(z=0;zD?(s.cross(z,w,B),s.length(z)<0.000001&&s.cross(z,A,B),s.normalize(z,z),v.setAxisAngle(C,z,Math.PI),C):D>0.999999?(C[0]=0,C[1]=0,C[2]=0,C[3]=1,C):(s.cross(z,B,E),C[0]=z[0],C[1]=z[1],C[2]=z[2],C[3]=1+D,v.normalize(C,C))}}(),v.setAxes=function(){var w=t.create();return function(z,C,B,A){return w[0]=B[0],w[3]=B[1],w[6]=B[2],w[1]=A[0],w[4]=A[1],w[7]=A[2],w[2]=-C[0],w[5]=-C[1],w[8]=-C[2],v.normalize(z,v.fromMat3(z,w))}}(),v.clone=p.clone,v.fromValues=p.fromValues,v.copy=p.copy,v.set=p.set,v.identity=function(w){return w[0]=0,w[1]=0,w[2]=0,w[3]=1,w},v.setAxisAngle=function(z,w,B){B=0.5*B;var A=Math.sin(B);return z[0]=A*w[0],z[1]=A*w[1],z[2]=A*w[2],z[3]=Math.cos(B),z},v.add=p.add,v.multiply=function(H,F,D){var w=F[0],G=F[1],B=F[2],E=F[3],z=D[0],A=D[1],I=D[2],C=D[3];return H[0]=w*C+E*z+G*I-B*A,H[1]=G*C+E*A+B*z-w*I,H[2]=B*C+E*I+w*A-G*z,H[3]=E*C-w*z-G*A-B*I,H},v.mul=v.multiply,v.scale=p.scale,v.rotateX=function(G,E,C){C*=0.5;var w=E[0],F=E[1],B=E[2],D=E[3],z=Math.sin(C),A=Math.cos(C);return G[0]=w*A+D*z,G[1]=F*A+B*z,G[2]=B*A-F*z,G[3]=D*A-w*z,G},v.rotateY=function(G,E,C){C*=0.5;var w=E[0],F=E[1],B=E[2],D=E[3],z=Math.sin(C),A=Math.cos(C);return G[0]=w*A-B*z,G[1]=F*A+D*z,G[2]=B*A+w*z,G[3]=D*A-F*z,G},v.rotateZ=function(G,E,C){C*=0.5;var w=E[0],F=E[1],B=E[2],D=E[3],z=Math.sin(C),A=Math.cos(C);return G[0]=w*A+F*z,G[1]=F*A-w*z,G[2]=B*A+D*z,G[3]=D*A-B*z,G},v.calculateW=function(A,w){var C=w[0],B=w[1],z=w[2];return A[0]=C,A[1]=B,A[2]=z,A[3]=Math.sqrt(Math.abs(1-C*C-B*B-z*z)),A},v.dot=p.dot,v.lerp=p.lerp,v.slerp=function(P,K,H,w){var O,B,J,z,A,Q=K[0],E=K[1],N=K[2],D=K[3],G=H[0],F=H[1],I=H[2],C=H[3];return B=Q*G+E*F+N*I+D*C,0>B&&(B=-B,G=-G,F=-F,I=-I,C=-C),1-B>0.000001?(O=Math.acos(B),J=Math.sin(O),z=Math.sin((1-w)*O)/J,A=Math.sin(w*O)/J):(z=1-w,A=w),P[0]=z*Q+A*G,P[1]=z*E+A*F,P[2]=z*N+A*I,P[3]=z*D+A*C,P},v.sqlerp=function(){var z=v.create(),w=v.create();return function(D,B,A,F,E,C){return v.slerp(z,B,E,C),v.slerp(w,A,F,C),v.slerp(D,z,w,2*C*(1-C)),D}}(),v.invert=function(A,w){var D=w[0],B=w[1],z=w[2],F=w[3],E=D*D+B*B+z*z+F*F,C=E?1/E:0;return A[0]=-D*C,A[1]=-B*C,A[2]=-z*C,A[3]=F*C,A},v.conjugate=function(z,w){return z[0]=-w[0],z[1]=-w[1],z[2]=-w[2],z[3]=w[3],z},v.length=p.length,v.len=v.length,v.squaredLength=p.squaredLength,v.sqrLen=v.squaredLength,v.normalize=p.normalize,v.fromMat3=function(A,w){var C,B=w[0]+w[4]+w[8];if(B>0){C=Math.sqrt(B+1),A[3]=0.5*C,C=0.5/C,A[0]=(w[5]-w[7])*C,A[1]=(w[6]-w[2])*C,A[2]=(w[1]-w[3])*C}else{var z=0;w[4]>w[0]&&(z=1),w[8]>w[3*z+z]&&(z=2);var E=(z+1)%3,D=(z+2)%3;C=Math.sqrt(w[3*z+z]-w[3*E+E]-w[3*D+D]+1),A[z]=0.5*C,C=0.5/C,A[3]=(w[3*E+D]-w[3*D+E])*C,A[E]=(w[3*E+z]+w[3*z+E])*C,A[D]=(w[3*D+z]+w[3*z+D])*C}return A},v.str=function(w){return"quat("+w[0]+", "+w[1]+", "+w[2]+", "+w[3]+")"},u.exports=v},{"./common.js":117,"./mat3.js":120,"./vec3.js":124,"./vec4.js":125}],123:[function(q,r,o){var p=q("./common.js"),s={};s.create=function(){var t=new p.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},s.clone=function(u){var t=new p.ARRAY_TYPE(2);return t[0]=u[0],t[1]=u[1],t},s.fromValues=function(v,u){var t=new p.ARRAY_TYPE(2);return t[0]=v,t[1]=u,t},s.copy=function(u,t){return u[0]=t[0],u[1]=t[1],u},s.set=function(v,u,t){return v[0]=u,v[1]=t,v},s.add=function(v,u,t){return v[0]=u[0]+t[0],v[1]=u[1]+t[1],v},s.subtract=function(v,u,t){return v[0]=u[0]-t[0],v[1]=u[1]-t[1],v},s.sub=s.subtract,s.multiply=function(v,u,t){return v[0]=u[0]*t[0],v[1]=u[1]*t[1],v},s.mul=s.multiply,s.divide=function(v,u,t){return v[0]=u[0]/t[0],v[1]=u[1]/t[1],v},s.div=s.divide,s.min=function(v,u,t){return v[0]=Math.min(u[0],t[0]),v[1]=Math.min(u[1],t[1]),v},s.max=function(v,u,t){return v[0]=Math.max(u[0],t[0]),v[1]=Math.max(u[1],t[1]),v},s.scale=function(v,u,t){return v[0]=u[0]*t,v[1]=u[1]*t,v},s.scaleAndAdd=function(z,w,v,u){return z[0]=w[0]+v[0]*u,z[1]=w[1]+v[1]*u,z},s.distance=function(z,w){var v=w[0]-z[0],u=w[1]-z[1];return Math.sqrt(v*v+u*u)},s.dist=s.distance,s.squaredDistance=function(z,w){var v=w[0]-z[0],u=w[1]-z[1];return v*v+u*u},s.sqrDist=s.squaredDistance,s.length=function(v){var u=v[0],t=v[1];return Math.sqrt(u*u+t*t)},s.len=s.length,s.squaredLength=function(v){var u=v[0],t=v[1];return u*u+t*t},s.sqrLen=s.squaredLength,s.negate=function(u,t){return u[0]=-t[0],u[1]=-t[1],u},s.inverse=function(u,t){return u[0]=1/t[0],u[1]=1/t[1],u},s.normalize=function(A,w){var v=w[0],u=w[1],z=v*v+u*u;return z>0&&(z=1/Math.sqrt(z),A[0]=w[0]*z,A[1]=w[1]*z),A},s.dot=function(u,t){return u[0]*t[0]+u[1]*t[1]},s.cross=function(z,w,v){var u=w[0]*v[1]-w[1]*v[0];return z[0]=z[1]=0,z[2]=u,z},s.lerp=function(C,A,z,w){var B=A[0],v=A[1];return C[0]=B+w*(z[0]-B),C[1]=v+w*(z[1]-v),C},s.random=function(v,u){u=u||1;var t=2*p.RANDOM()*Math.PI;return v[0]=Math.cos(t)*u,v[1]=Math.sin(t)*u,v},s.transformMat2=function(A,w,v){var u=w[0],z=w[1];return A[0]=v[0]*u+v[2]*z,A[1]=v[1]*u+v[3]*z,A},s.transformMat2d=function(A,w,v){var u=w[0],z=w[1];return A[0]=v[0]*u+v[2]*z+v[4],A[1]=v[1]*u+v[3]*z+v[5],A},s.transformMat3=function(A,w,v){var u=w[0],z=w[1];return A[0]=v[0]*u+v[3]*z+v[6],A[1]=v[1]*u+v[4]*z+v[7],A},s.transformMat4=function(A,w,v){var u=w[0],z=w[1];return A[0]=v[0]*u+v[4]*z+v[12],A[1]=v[1]*u+v[5]*z+v[13],A},s.forEach=function(){var t=s.create();return function(E,D,C,F,A,z){var w,B;for(D||(D=2),C||(C=0),B=F?Math.min(F*D+C,E.length):E.length,w=C;B>w;w+=D){t[0]=E[w],t[1]=E[w+1],A(t,t,z),E[w]=t[0],E[w+1]=t[1]}return E}}(),s.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},r.exports=s},{"./common.js":117}],124:[function(q,s,o){var p=q("./common.js"),r={};r.create=function(){var t=new p.ARRAY_TYPE(3);return t[0]=0,t[1]=0,t[2]=0,t},r.clone=function(v){var u=new p.ARRAY_TYPE(3);return u[0]=v[0],u[1]=v[1],u[2]=v[2],u},r.fromValues=function(z,u,w){var v=new p.ARRAY_TYPE(3);return v[0]=z,v[1]=u,v[2]=w,v},r.copy=function(v,u){return v[0]=u[0],v[1]=u[1],v[2]=u[2],v},r.set=function(z,u,w,v){return z[0]=u,z[1]=w,z[2]=v,z},r.add=function(w,u,v){return w[0]=u[0]+v[0],w[1]=u[1]+v[1],w[2]=u[2]+v[2],w},r.subtract=function(w,u,v){return w[0]=u[0]-v[0],w[1]=u[1]-v[1],w[2]=u[2]-v[2],w},r.sub=r.subtract,r.multiply=function(w,u,v){return w[0]=u[0]*v[0],w[1]=u[1]*v[1],w[2]=u[2]*v[2],w},r.mul=r.multiply,r.divide=function(w,u,v){return w[0]=u[0]/v[0],w[1]=u[1]/v[1],w[2]=u[2]/v[2],w},r.div=r.divide,r.min=function(w,u,v){return w[0]=Math.min(u[0],v[0]),w[1]=Math.min(u[1],v[1]),w[2]=Math.min(u[2],v[2]),w},r.max=function(w,u,v){return w[0]=Math.max(u[0],v[0]),w[1]=Math.max(u[1],v[1]),w[2]=Math.max(u[2],v[2]),w},r.scale=function(w,u,v){return w[0]=u[0]*v,w[1]=u[1]*v,w[2]=u[2]*v,w},r.scaleAndAdd=function(z,u,w,v){return z[0]=u[0]+w[0]*v,z[1]=u[1]+w[1]*v,z[2]=u[2]+w[2]*v,z},r.distance=function(A,u){var w=u[0]-A[0],v=u[1]-A[1],z=u[2]-A[2];return Math.sqrt(w*w+v*v+z*z)},r.dist=r.distance,r.squaredDistance=function(A,u){var w=u[0]-A[0],v=u[1]-A[1],z=u[2]-A[2];return w*w+v*v+z*z},r.sqrDist=r.squaredDistance,r.length=function(z){var u=z[0],w=z[1],v=z[2];return Math.sqrt(u*u+w*w+v*v)},r.len=r.length,r.squaredLength=function(z){var u=z[0],w=z[1],v=z[2];return u*u+w*w+v*v},r.sqrLen=r.squaredLength,r.negate=function(v,u){return v[0]=-u[0],v[1]=-u[1],v[2]=-u[2],v},r.inverse=function(v,u){return v[0]=1/u[0],v[1]=1/u[1],v[2]=1/u[2],v},r.normalize=function(B,v){var z=v[0],w=v[1],A=v[2],u=z*z+w*w+A*A;return u>0&&(u=1/Math.sqrt(u),B[0]=v[0]*u,B[1]=v[1]*u,B[2]=v[2]*u),B},r.dot=function(v,u){return v[0]*u[0]+v[1]*u[1]+v[2]*u[2]},r.cross=function(z,G,B){var w=G[0],C=G[1],D=G[2],F=B[0],E=B[1],A=B[2];return z[0]=C*A-D*E,z[1]=D*F-w*A,z[2]=w*E-C*F,z},r.lerp=function(D,z,B,A){var C=z[0],v=z[1],w=z[2];return D[0]=C+A*(B[0]-C),D[1]=v+A*(B[1]-v),D[2]=w+A*(B[2]-w),D},r.hermite=function(A,H,C,w,D,E){var G=E*E,F=G*(2*E-3)+1,B=G*(E-2)+E,z=G*(E-1),I=G*(3-2*E);return A[0]=H[0]*F+C[0]*B+w[0]*z+D[0]*I,A[1]=H[1]*F+C[1]*B+w[1]*z+D[1]*I,A[2]=H[2]*F+C[2]*B+w[2]*z+D[2]*I,A},r.bezier=function(A,J,D,w,F,G){var I=1-G,H=I*I,B=G*G,z=H*I,K=3*G*H,C=3*B*I,E=B*G;return A[0]=J[0]*z+D[0]*K+w[0]*C+F[0]*E,A[1]=J[1]*z+D[1]*K+w[1]*C+F[1]*E,A[2]=J[2]*z+D[2]*K+w[2]*C+F[2]*E,A},r.random=function(A,u){u=u||1;var w=2*p.RANDOM()*Math.PI,v=2*p.RANDOM()-1,z=Math.sqrt(1-v*v)*u;return A[0]=Math.cos(w)*z,A[1]=Math.sin(w)*z,A[2]=v*u,A},r.transformMat4=function(D,z,B){var A=z[0],C=z[1],v=z[2],w=B[3]*A+B[7]*C+B[11]*v+B[15];return w=w||1,D[0]=(B[0]*A+B[4]*C+B[8]*v+B[12])/w,D[1]=(B[1]*A+B[5]*C+B[9]*v+B[13])/w,D[2]=(B[2]*A+B[6]*C+B[10]*v+B[14])/w,D},r.transformMat3=function(B,v,z){var w=v[0],A=v[1],u=v[2];return B[0]=w*z[0]+A*z[3]+u*z[6],B[1]=w*z[1]+A*z[4]+u*z[7],B[2]=w*z[2]+A*z[5]+u*z[8],B},r.transformQuat=function(A,K,E){var w=K[0],G=K[1],H=K[2],J=E[0],I=E[1],B=E[2],z=E[3],N=z*w+I*H-B*G,D=z*G+B*w-J*H,F=z*H+J*G-I*w,C=-J*w-I*G-B*H;return A[0]=N*z+C*-J+D*-B-F*-I,A[1]=D*z+C*-I+F*-J-N*-B,A[2]=F*z+C*-B+N*-I-D*-J,A},r.rotateX=function(B,v,z,w){var A=[],u=[];return A[0]=v[0]-z[0],A[1]=v[1]-z[1],A[2]=v[2]-z[2],u[0]=A[0],u[1]=A[1]*Math.cos(w)-A[2]*Math.sin(w),u[2]=A[1]*Math.sin(w)+A[2]*Math.cos(w),B[0]=u[0]+z[0],B[1]=u[1]+z[1],B[2]=u[2]+z[2],B},r.rotateY=function(B,v,z,w){var A=[],u=[];return A[0]=v[0]-z[0],A[1]=v[1]-z[1],A[2]=v[2]-z[2],u[0]=A[2]*Math.sin(w)+A[0]*Math.cos(w),u[1]=A[1],u[2]=A[2]*Math.cos(w)-A[0]*Math.sin(w),B[0]=u[0]+z[0],B[1]=u[1]+z[1],B[2]=u[2]+z[2],B},r.rotateZ=function(B,v,z,w){var A=[],u=[];return A[0]=v[0]-z[0],A[1]=v[1]-z[1],A[2]=v[2]-z[2],u[0]=A[0]*Math.cos(w)-A[1]*Math.sin(w),u[1]=A[0]*Math.sin(w)+A[1]*Math.cos(w),u[2]=A[2],B[0]=u[0]+z[0],B[1]=u[1]+z[1],B[2]=u[2]+z[2],B},r.forEach=function(){var t=r.create();return function(C,E,D,F,w,A){var z,B;for(E||(E=3),D||(D=0),B=F?Math.min(F*E+D,C.length):C.length,z=D;B>z;z+=E){t[0]=C[z],t[1]=C[z+1],t[2]=C[z+2],w(t,t,A),C[z]=t[0],C[z+1]=t[1],C[z+2]=t[2]}return C}}(),r.angle=function(A,u){var w=r.fromValues(A[0],A[1],A[2]),v=r.fromValues(u[0],u[1],u[2]);r.normalize(w,w),r.normalize(v,v);var z=r.dot(w,v);return z>1?0:Math.acos(z)},r.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},s.exports=r},{"./common.js":117}],125:[function(r,s,o){var q=r("./common.js"),p={};p.create=function(){var t=new q.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},p.clone=function(t){var u=new q.ARRAY_TYPE(4);return u[0]=t[0],u[1]=t[1],u[2]=t[2],u[3]=t[3],u},p.fromValues=function(w,A,u,v){var z=new q.ARRAY_TYPE(4);return z[0]=w,z[1]=A,z[2]=u,z[3]=v,z},p.copy=function(t,u){return t[0]=u[0],t[1]=u[1],t[2]=u[2],t[3]=u[3],t},p.set=function(w,A,u,v,z){return w[0]=A,w[1]=u,w[2]=v,w[3]=z,w},p.add=function(v,w,u){return v[0]=w[0]+u[0],v[1]=w[1]+u[1],v[2]=w[2]+u[2],v[3]=w[3]+u[3],v},p.subtract=function(v,w,u){return v[0]=w[0]-u[0],v[1]=w[1]-u[1],v[2]=w[2]-u[2],v[3]=w[3]-u[3],v},p.sub=p.subtract,p.multiply=function(v,w,u){return v[0]=w[0]*u[0],v[1]=w[1]*u[1],v[2]=w[2]*u[2],v[3]=w[3]*u[3],v},p.mul=p.multiply,p.divide=function(v,w,u){return v[0]=w[0]/u[0],v[1]=w[1]/u[1],v[2]=w[2]/u[2],v[3]=w[3]/u[3],v},p.div=p.divide,p.min=function(v,w,u){return v[0]=Math.min(w[0],u[0]),v[1]=Math.min(w[1],u[1]),v[2]=Math.min(w[2],u[2]),v[3]=Math.min(w[3],u[3]),v},p.max=function(v,w,u){return v[0]=Math.max(w[0],u[0]),v[1]=Math.max(w[1],u[1]),v[2]=Math.max(w[2],u[2]),v[3]=Math.max(w[3],u[3]),v},p.scale=function(v,w,u){return v[0]=w[0]*u,v[1]=w[1]*u,v[2]=w[2]*u,v[3]=w[3]*u,v},p.scaleAndAdd=function(w,z,u,v){return w[0]=z[0]+u[0]*v,w[1]=z[1]+u[1]*v,w[2]=z[2]+u[2]*v,w[3]=z[3]+u[3]*v,w},p.distance=function(A,C){var w=C[0]-A[0],z=C[1]-A[1],B=C[2]-A[2],v=C[3]-A[3];return Math.sqrt(w*w+z*z+B*B+v*v)},p.dist=p.distance,p.squaredDistance=function(A,C){var w=C[0]-A[0],z=C[1]-A[1],B=C[2]-A[2],v=C[3]-A[3];return w*w+z*z+B*B+v*v},p.sqrDist=p.squaredDistance,p.length=function(w){var A=w[0],u=w[1],v=w[2],z=w[3];return Math.sqrt(A*A+u*u+v*v+z*z)},p.len=p.length,p.squaredLength=function(w){var A=w[0],u=w[1],v=w[2],z=w[3];return A*A+u*u+v*v+z*z},p.sqrLen=p.squaredLength,p.negate=function(t,u){return t[0]=-u[0],t[1]=-u[1],t[2]=-u[2],t[3]=-u[3],t},p.inverse=function(t,u){return t[0]=1/u[0],t[1]=1/u[1],t[2]=1/u[2],t[3]=1/u[3],t},p.normalize=function(B,D){var z=D[0],A=D[1],C=D[2],w=D[3],v=z*z+A*A+C*C+w*w;return v>0&&(v=1/Math.sqrt(v),B[0]=z*v,B[1]=A*v,B[2]=C*v,B[3]=w*v),B},p.dot=function(t,u){return t[0]*u[0]+t[1]*u[1]+t[2]*u[2]+t[3]*u[3]},p.lerp=function(D,F,B,C){var E=F[0],A=F[1],w=F[2],z=F[3];return D[0]=E+C*(B[0]-E),D[1]=A+C*(B[1]-A),D[2]=w+C*(B[2]-w),D[3]=z+C*(B[3]-z),D},p.random=function(t,u){return u=u||1,t[0]=q.RANDOM(),t[1]=q.RANDOM(),t[2]=q.RANDOM(),t[3]=q.RANDOM(),p.normalize(t,t),p.scale(t,t,u),t},p.transformMat4=function(B,D,z){var A=D[0],C=D[1],w=D[2],v=D[3];return B[0]=z[0]*A+z[4]*C+z[8]*w+z[12]*v,B[1]=z[1]*A+z[5]*C+z[9]*w+z[13]*v,B[2]=z[2]*A+z[6]*C+z[10]*w+z[14]*v,B[3]=z[3]*A+z[7]*C+z[11]*w+z[15]*v,B},p.transformQuat=function(E,A,K){var w=A[0],G=A[1],J=A[2],H=K[0],I=K[1],C=K[2],z=K[3],D=z*w+I*J-C*G,N=z*G+C*w-H*J,B=z*J+H*G-I*w,F=-H*w-I*G-C*J;return E[0]=D*z+F*-H+N*-C-B*-I,E[1]=N*z+F*-I+B*-H-D*-C,E[2]=B*z+F*-C+D*-I-N*-H,E[3]=A[3],E},p.forEach=function(){var t=p.create();return function(F,C,D,E,A,w){var z,B;for(C||(C=4),D||(D=0),B=E?Math.min(E*C+D,F.length):F.length,z=D;B>z;z+=C){t[0]=F[z],t[1]=F[z+1],t[2]=F[z+2],t[3]=F[z+3],A(t,t,w),F[z]=t[0],F[z+1]=t[1],F[z+2]=t[2],F[z+3]=t[3]}return F}}(),p.str=function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},s.exports=p},{"./common.js":117}],126:[function(p,q,o){o.read=function(H,z,J,u,C){var G,v,I=8*C-u-1,D=(1<>1,B=-7,E=J?C-1:0,A=J?-1:1,K=H[z+E];for(E+=A,G=K&(1<<-B)-1,K>>=-B,B+=I;B>0;G=256*G+H[z+E],E+=A,B-=8){}for(v=G&(1<<-B)-1,G>>=-B,B+=u;B>0;v=256*v+H[z+E],E+=A,B-=8){}if(0===G){G=1-F}else{if(G===D){return v?NaN:(K?-1:1)*(1/0)}v+=Math.pow(2,u),G-=F}return(K?-1:1)*v*Math.pow(2,G-u)},o.write=function(J,A,P,v,E,I){var z,K,F,H=8*I-E-1,D=(1<>1,B=23===E?Math.pow(2,-24)-Math.pow(2,-77):0,Q=v?0:I-1,O=v?1:-1,C=0>A||0===A&&0>1/A?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(K=isNaN(A)?1:0,z=D):(z=Math.floor(Math.log(A)/Math.LN2),A*(F=Math.pow(2,-z))<1&&(z--,F*=2),A+=z+G>=1?B/F:B*Math.pow(2,1-G),A*F>=2&&(z++,F/=2),z+G>=D?(K=0,z=D):z+G>=1?(K=(A*F-1)*Math.pow(2,E),z+=G):(K=A*Math.pow(2,G-1)*Math.pow(2,E),z=0));E>=8;J[P+Q]=255&K,Q+=O,K/=256,E-=8){}for(z=z<0;J[P+Q]=255&z,Q+=O,z/=256,H-=8){}J[P+Q-O]|=128*C}},{}],127:[function(p,q,o){"function"==typeof Object.create?q.exports=function(r,s){r.super_=s,r.prototype=Object.create(s.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:q.exports=function(r,s){r.super_=s;var u=function(){};u.prototype=s.prototype,r.prototype=new u,r.prototype.constructor=r}},{}],128:[function(q,r,p){function s(u){return function(){return u}}function o(v,u,w){return v*(1-w)+u*w}function t(v,u,A){for(var w=[],z=0;zE){A=B;break}}if(H&&A){var D=A[0]-H[0],F=E-H[0],G=1===z?F/D:(Math.pow(z,F)-1)/(Math.pow(z,D)-1);return w(H[1],A[1],G)}return H?H[1]:A?A[1]:void 0}},p["piecewise-constant"]=function(v){if(!v.stops){return s(v)}var u=v.stops;return function(w){for(var z=0;zw){return u[0===z?0:z-1][1]}}return u[u.length-1][1]}}},{}],129:[function(q,r,p){var o=q("../../reference/latest.min.js"),s=q("./parsed");r.exports=function(t){return s(t,o)}},{"../../reference/latest.min.js":132,"./parsed":130}],130:[function(r,s,p){function o(v){return v instanceof Number?"number":v instanceof String?"string":v instanceof Boolean?"boolean":Array.isArray(v)?"array":null===v?"null":typeof v}function q(v){return v instanceof Number||v instanceof String||v instanceof Boolean?v.valueOf():v}var u=r("csscolorparser").parseCSSColor,t=r("util").format;s.exports=function(C,z){function B(H,F){var G={message:(H?H+": ":"")+t.apply(t,Array.prototype.slice.call(arguments,2))};null!==F&&void 0!==F&&F.__line__&&(G.line=F.__line__),A.push(G)}function E(I,J,G){var H=o(J);if("string"===H&&"@"===J[0]){if(z.$version>7){return B(I,J,"constants have been deprecated as of v8")}if(!(J in v)){return B(I,J,'constant "%s" not found',J)}J=v[J],H=o(J)}if(G["function"]&&"object"===H){return E["function"](I,J,G)}if(G.type){var F=E[G.type];if(F){return F(I,J,G)}G=z[G.type]}E.object(I,J,G)}function D(F){return function(H,J,I){var G=o(J);G!==F&&B(H,J,"%s expected, %s found",F,G),"minimum" in I&&JI.maximum&&B(H,J,"%s is greater than the maximum value %s",J,I.maximum)}}var v=C.constants||{},w={},A=[];return E.constants=function(G,I){if(z.$version>7){if(I){return B(G,I,"constants have been deprecated as of v8")}}else{var H=o(I);if("object"!==H){return B(G,I,"object expected, %s found",H)}for(var F in I){"@"!==F[0]&&B(G+"."+F,I[F],'constants must start with "@"')}}},E.source=function(H,I){if(!I.type){return void B(H,I,'"type" is required')}var F=q(I.type);switch(F){case"vector":case"raster":if(E.object(H,I,z.source_tile),"url" in I){for(var G in I){["type","url","tileSize"].indexOf(G)<0&&B(H+"."+G,I[G],'a source with a "url" property may not include a "%s" property',G)}}break;case"geojson":E.object(H,I,z.source_geojson);break;case"video":E.object(H,I,z.source_video);break;case"image":E.object(H,I,z.source_image);break;default:E["enum"](H+".type",I.type,{values:["vector","raster","geojson","video","image"]})}},E.layer=function(J,F){F.type||F.ref||B(J,F,'either "type" or "ref" is required');var H=q(F.type),G=q(F.ref);if(F.id&&(w[F.id]?B(J,F.id,'duplicate layer id "%s", previously used at line %d',F.id,w[F.id]):w[F.id]=F.id.__line__),"ref" in F){["type","source","source-layer","filter","layout"].forEach(function(M){M in F&&B(J,F[M],'"%s" is prohibited for ref layers',M)});var K;C.layers.forEach(function(M){M.id==G&&(K=M)}),K?K.ref?B(J,F.ref,"ref cannot reference another ref layer"):H=K.type:B(J,F.ref,'ref layer "%s" not found',G)}else{if("background"!==H){if(F.source){var I=C.sources[F.source];I?"vector"==I.type&&"raster"==H?B(J,F.source,'layer "%s" requires a raster source',F.id):"raster"==I.type&&"raster"!=H?B(J,F.source,'layer "%s" requires a vector source',F.id):"vector"!=I.type||F["source-layer"]||B(J,F,'layer "%s" must specify a "source-layer"',F.id):B(J,F.source,'source "%s" not found',F.source)}else{B(J,F,'missing required property "source"')}}}E.object(J,F,z.layer,{filter:E.filter,layout:function(N,M){var O=z["layout_"+H];return H&&O&&E(N,M,O)},paint:function(N,M){var O=z["paint_"+H];return H&&O&&E(N,M,O)}})},E.object=function(K,G,N,I){I=I||{};var P=o(G);if("object"!==P){return B(K,G,"object expected, %s found",P)}for(var O in G){var M=O.split(".")[0],J=N[M]||N["*"],H=M.match(/^(.*)-transition$/);J?(I[M]||E)((K?K+".":K)+O,G[O],J):H&&N[H[1]]&&N[H[1]].transition?E((K?K+".":K)+O,G[O],z.transition):""!==K&&1!==K.split(".").length&&B(K,G[O],'unknown property "%s"',O)}for(var F in N){N[F].required&&void 0===N[F]["default"]&&void 0===G[F]&&B(K,G,'missing required property "%s"',F)}},E.array=function(I,K,F,H){if("array"!==o(K)){return B(I,K,"array expected, %s found",o(K))}if(F.length&&K.length!==F.length){return B(I,K,"array length %d expected, length %d found",F.length,K.length)}if(F["min-length"]&&K.length":case">=":I.length>=2&&"$type"==I[1]&&B(H,I,'"$type" cannot be use with operator "%s"',I[0]);case"==":case"!=":3!=I.length&&B(H,I,'filter array for operator "%s" must have 3 elements',I[0]);case"in":case"!in":I.length>=2&&(F=o(I[1]),"string"!==F?B(H+"[1]",I[1],"string expected, %s found",F):"@"===I[1][0]&&B(H+"[1]",I[1],"filter key cannot be a constant"));for(var G=2;G7&&C.constants&&E.constants("constants",C.constants),A.sort(function(G,F){return G.line-F.line}),A}},{csscolorparser:107,util:143}],131:[function(p,q,o){q.exports=p("./v8.json")},{"./v8.json":133}],132:[function(p,q,o){q.exports=p("./v8.min.json")},{"./v8.min.json":134}],133:[function(p,q,o){q.exports={"$version":8,"$root":{version:{required:true,type:"enum",values:[8],doc:"Stylesheet version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number","default":0,period:360,units:"degrees",doc:"Default bearing, in degrees. The style bearing will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:29},pitch:{type:"number","default":0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},sources:{required:true,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended.",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. Valid tokens are {fontstack} and {range}.",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties.",example:{duration:300,delay:0}},layers:{required:true,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For GeoJSON and video sources, a URL must be provided."}},source:["source_tile","source_geojson","source_video","source_image"],source_tile:{type:{required:true,type:"enum",values:["vector","raster"],doc:"The data type of the tile source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},minzoom:{type:"number","default":0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number","default":22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number","default":512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:true,type:"enum",values:["geojson"],doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number","default":14,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},buffer:{type:"number","default":64,doc:"Tile buffer size on each side (higher means fewer rendering artifacts near tile edges but slower performance)."},tolerance:{type:"number","default":3,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean","default":false,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups."},clusterRadius:{type:"number","default":400,doc:"Radius of each cluster when clustering points, relative to 4096 tile."},clusterMaxZoom:{type:"number",doc:"Max zoom to cluster points on. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered)."}},source_video:{type:{required:true,type:"enum",values:["video"],doc:"The data type of the video source."},urls:{required:true,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:true,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:true,type:"enum",values:["image"],doc:"The data type of the image source."},url:{required:true,type:"string",doc:"URL that points to an image"},coordinates:{required:true,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:true},type:{type:"enum",values:["fill","line","symbol","circle","raster","background"],doc:"Rendering type of this layer."},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},ref:{type:"string",doc:"References another layer to copy `type`, `source`, `source-layer`, `minzoom`, `maxzoom`, `filter`, and `layout` properties from. This allows the layers to share processing and be more efficient."},source:{type:"string",doc:"Name of a source description to be used for this layer."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required if the source supports multiple layers."},minzoom:{type:"number",minimum:0,maximum:22,doc:"The minimum zoom level on which the layer gets parsed and appears on."},maxzoom:{type:"number",minimum:0,maximum:22,doc:"The maximum zoom level on which the layer gets parsed and appears on."},interactive:{type:"boolean",doc:"Enable querying of feature data from this layer for interactivity.","default":false},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."},"paint.*":{type:"paint",doc:"Class-specific paint properties for this layer. The class name is the part after the first dot."}},layout:["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],layout_background:{visibility:{type:"enum","function":"piecewise-constant",values:["visible","none"],"default":"visible",doc:"The display of this layer. `none` hides this layer."}},layout_fill:{visibility:{type:"enum","function":"piecewise-constant",values:["visible","none"],"default":"visible",doc:"The display of this layer. `none` hides this layer."}},layout_circle:{visibility:{type:"enum","function":"piecewise-constant",values:["visible","none"],"default":"visible",doc:"The display of this layer. `none` hides this layer."}},layout_line:{"line-cap":{type:"enum","function":"piecewise-constant",values:["butt","round","square"],"default":"butt",doc:"The display of line endings."},"line-join":{type:"enum","function":"piecewise-constant",values:["bevel","round","miter"],"default":"miter",doc:"The display of lines when joining."},"line-miter-limit":{type:"number","default":2,"function":"interpolated",doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}]},"line-round-limit":{type:"number","default":1.05,"function":"interpolated",doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}]},visibility:{type:"enum","function":"piecewise-constant",values:["visible","none"],"default":"visible",doc:"The display of this layer. `none` hides this layer."}},layout_symbol:{"symbol-placement":{type:"enum","function":"piecewise-constant",values:["point","line"],"default":"point",doc:"Label placement relative to its geometry. `line` can only be used on LineStrings and Polygons."},"symbol-spacing":{type:"number","default":250,minimum:1,"function":"interpolated",units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}]},"symbol-avoid-edges":{type:"boolean","function":"piecewise-constant","default":false,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer."},"icon-allow-overlap":{type:"boolean","function":"piecewise-constant","default":false,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"]},"icon-ignore-placement":{type:"boolean","function":"piecewise-constant","default":false,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"]},"icon-optional":{type:"boolean","function":"piecewise-constant","default":false,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"]},"icon-rotation-alignment":{type:"enum","function":"piecewise-constant",values:["map","viewport"],"default":"viewport",doc:"Orientation of icon when map is rotated.",requires:["icon-image"]},"icon-size":{type:"number","default":1,minimum:0,"function":"interpolated",doc:"Scale factor for icon. 1 is original size, 3 triples the size.",requires:["icon-image"]},"icon-image":{type:"string","function":"piecewise-constant",doc:"A string with {tokens} replaced, referencing the data property to pull from.",tokens:true},"icon-rotate":{type:"number","default":0,period:360,"function":"interpolated",units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"]},"icon-padding":{type:"number","default":2,minimum:0,"function":"interpolated",units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"]},"icon-keep-upright":{type:"boolean","function":"piecewise-constant","default":false,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{type:"array",value:"number",length:2,"default":[0,0],"function":"interpolated",doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"]},"text-rotation-alignment":{type:"enum","function":"piecewise-constant",values:["map","viewport"],"default":"viewport",doc:"Orientation of text when map is rotated.",requires:["text-field"]},"text-field":{type:"string","function":"piecewise-constant","default":"",tokens:true,doc:"Value to use for a text label. Feature properties are specified using tokens like {field_name}."},"text-font":{type:"array",value:"string","function":"piecewise-constant","default":["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"]},"text-size":{type:"number","default":16,minimum:0,units:"pixels","function":"interpolated",doc:"Font size.",requires:["text-field"]},"text-max-width":{type:"number","default":10,minimum:0,units:"em","function":"interpolated",doc:"The maximum line width for text wrapping.",requires:["text-field"]},"text-line-height":{type:"number","default":1.2,units:"em","function":"interpolated",doc:"Text leading value for multi-line text.",requires:["text-field"]},"text-letter-spacing":{type:"number","default":0,units:"em","function":"interpolated",doc:"Text tracking amount.",requires:["text-field"]},"text-justify":{type:"enum","function":"piecewise-constant",values:["left","center","right"],"default":"center",doc:"Text justification options.",requires:["text-field"]},"text-anchor":{type:"enum","function":"piecewise-constant",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],"default":"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field"]},"text-max-angle":{type:"number","default":45,units:"degrees","function":"interpolated",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":"line"}]},"text-rotate":{type:"number","default":0,period:360,units:"degrees","function":"interpolated",doc:"Rotates the text clockwise.",requires:["text-field"]},"text-padding":{type:"number","default":2,minimum:0,units:"pixels","function":"interpolated",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"]},"text-keep-upright":{type:"boolean","function":"piecewise-constant","default":true,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{type:"enum","function":"piecewise-constant",values:["none","uppercase","lowercase"],"default":"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"]},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.",value:"number",units:"ems","function":"interpolated",length:2,"default":[0,0],requires:["text-field"]},"text-allow-overlap":{type:"boolean","function":"piecewise-constant","default":false,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"]},"text-ignore-placement":{type:"boolean","function":"piecewise-constant","default":false,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"]},"text-optional":{type:"boolean","function":"piecewise-constant","default":false,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"]},visibility:{type:"enum","function":"piecewise-constant",values:["visible","none"],"default":"visible",doc:"The display of this layer. `none` hides this layer."}},layout_raster:{visibility:{type:"enum","function":"piecewise-constant",values:["visible","none"],"default":"visible",doc:"The display of this layer. `none` hides this layer."}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:["==","!=",">",">=","<","<=","in","!in","all","any","none"],doc:"The filter operator."},geometry_type:{type:"enum",values:["Point","LineString","Polygon"],doc:"The geometry type for the filter to select."},color_operation:{type:"enum",values:["lighten","saturate","spin","fade","mix"],doc:"A color operation to apply."},"function":{stops:{type:"array",required:true,doc:"An array of stops.",value:"function_stop"},base:{type:"number","default":1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2,doc:"Zoom level and value pair."},paint:["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],paint_fill:{"fill-antialias":{type:"boolean","function":"piecewise-constant","default":true,doc:"Whether or not the fill should be antialiased."},"fill-opacity":{type:"number","function":"interpolated","default":1,minimum:0,maximum:1,doc:"The opacity given to the fill color.",transition:true},"fill-color":{type:"color","default":"#000000",doc:"The color of the fill.","function":"interpolated",transition:true,requires:[{"!":"fill-pattern"}]},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.","function":"interpolated",transition:true,requires:[{"!":"fill-pattern"},{"fill-antialias":true}]},"fill-translate":{type:"array",value:"number",length:2,"default":[0,0],"function":"interpolated",transition:true,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively."},"fill-translate-anchor":{type:"enum","function":"piecewise-constant",values:["map","viewport"],doc:"Control whether the translation is relative to the map (north) or viewport (screen)","default":"map",requires:["fill-translate"]},"fill-pattern":{type:"string","function":"piecewise-constant",transition:true,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512)."}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.","function":"interpolated","default":1,minimum:0,maximum:1,transition:true},"line-color":{type:"color",doc:"The color with which the line will be drawn.","default":"#000000","function":"interpolated",transition:true,requires:[{"!":"line-pattern"}]},"line-translate":{type:"array",value:"number",length:2,"default":[0,0],"function":"interpolated",transition:true,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively."},"line-translate-anchor":{type:"enum","function":"piecewise-constant",values:["map","viewport"],doc:"Control whether the translation is relative to the map (north) or viewport (screen)","default":"map",requires:["line-translate"]},"line-width":{type:"number","default":1,minimum:0,"function":"interpolated",transition:true,units:"pixels",doc:"Stroke thickness."},"line-gap-width":{type:"number","default":0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.","function":"interpolated",transition:true,units:"pixels"},"line-offset":{type:"number","default":0,doc:'The line\'s offset perpendicular to its direction. Values may be positive or negative, where positive indicates "rightwards" (if you were moving in the direction of the line) and negative indicates "leftwards."',"function":"interpolated",transition:true,units:"pixels"},"line-blur":{type:"number","default":0,minimum:0,"function":"interpolated",transition:true,units:"pixels",doc:"Blur applied to the line, in pixels."},"line-dasharray":{type:"array",value:"number","function":"piecewise-constant",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width.",minimum:0,transition:true,units:"line widths",requires:[{"!":"line-pattern"}]},"line-pattern":{type:"string","function":"piecewise-constant",transition:true,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512)."}},paint_circle:{"circle-radius":{type:"number","default":5,minimum:0,"function":"interpolated",transition:true,units:"pixels",doc:"Circle radius."},"circle-color":{type:"color","default":"#000000",doc:"The color of the circle.","function":"interpolated",transition:true},"circle-blur":{type:"number","default":0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.","function":"interpolated",transition:true},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.","default":1,minimum:0,maximum:1,"function":"interpolated",transition:true},"circle-translate":{type:"array",value:"number",length:2,"default":[0,0],"function":"interpolated",transition:true,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively."},"circle-translate-anchor":{type:"enum","function":"piecewise-constant",values:["map","viewport"],doc:"Control whether the translation is relative to the map (north) or viewport (screen)","default":"map",requires:["circle-translate"]}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number","default":1,minimum:0,maximum:1,"function":"interpolated",transition:true,requires:["icon-image"]},"icon-color":{type:"color","default":"#000000","function":"interpolated",transition:true,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"]},"icon-halo-color":{type:"color","default":"rgba(0, 0, 0, 0)","function":"interpolated",transition:true,doc:"The color of the icon's halo. Icon halos can only be used with sdf icons.",requires:["icon-image"]},"icon-halo-width":{type:"number","default":0,minimum:0,"function":"interpolated",transition:true,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"]},"icon-halo-blur":{type:"number","default":0,minimum:0,"function":"interpolated",transition:true,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"]},"icon-translate":{type:"array",value:"number",length:2,"default":[0,0],"function":"interpolated",transition:true,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"]},"icon-translate-anchor":{type:"enum","function":"piecewise-constant",values:["map","viewport"],doc:"Control whether the translation is relative to the map (north) or viewport (screen).","default":"map",requires:["icon-image","icon-translate"]},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.","default":1,minimum:0,maximum:1,"function":"interpolated",transition:true,requires:["text-field"]},"text-color":{type:"color",doc:"The color with which the text will be drawn.","default":"#000000","function":"interpolated",transition:true,requires:["text-field"]},"text-halo-color":{type:"color","default":"rgba(0, 0, 0, 0)","function":"interpolated",transition:true,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"]},"text-halo-width":{type:"number","default":0,minimum:0,"function":"interpolated",transition:true,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"]},"text-halo-blur":{type:"number","default":0,minimum:0,"function":"interpolated",transition:true,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"]},"text-translate":{type:"array",value:"number",length:2,"default":[0,0],"function":"interpolated",transition:true,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"]},"text-translate-anchor":{type:"enum","function":"piecewise-constant",values:["map","viewport"],doc:"Control whether the translation is relative to the map (north) or viewport (screen).","default":"map",requires:["text-field","text-translate"]}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.","default":1,minimum:0,maximum:1,"function":"interpolated",transition:true},"raster-hue-rotate":{type:"number","default":0,period:360,"function":"interpolated",transition:true,units:"degrees",doc:"Rotates hues around the color wheel."},"raster-brightness-min":{type:"number","function":"interpolated",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.","default":0,minimum:0,maximum:1,transition:true},"raster-brightness-max":{type:"number","function":"interpolated",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.","default":1,minimum:0,maximum:1,transition:true},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.","default":0,minimum:-1,maximum:1,"function":"interpolated",transition:true},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.","default":0,minimum:-1,maximum:1,"function":"interpolated",transition:true},"raster-fade-duration":{type:"number","default":300,minimum:0,"function":"interpolated",transition:true,units:"milliseconds",doc:"Fade duration when a new tile is added."}},paint_background:{"background-color":{type:"color","default":"#000000",doc:"The color with which the background will be drawn.","function":"interpolated",transition:true,requires:[{"!":"background-pattern"}]},"background-pattern":{type:"string","function":"piecewise-constant",transition:true,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512)."},"background-opacity":{type:"number","default":1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.","function":"interpolated",transition:true}},transition:{duration:{type:"number","default":300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number","default":0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}}}},{}],134:[function(p,q,o){q.exports={"$version":8,"$root":{version:{required:true,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number","default":0,period:360,units:"degrees"},pitch:{type:"number","default":0,units:"degrees"},sources:{required:true,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:true,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_tile","source_geojson","source_video","source_image"],source_tile:{type:{required:true,type:"enum",values:["vector","raster"]},url:{type:"string"},tiles:{type:"array",value:"string"},minzoom:{type:"number","default":0},maxzoom:{type:"number","default":22},tileSize:{type:"number","default":512,units:"pixels"},"*":{type:"*"}},source_geojson:{type:{required:true,type:"enum",values:["geojson"]},data:{type:"*"},maxzoom:{type:"number","default":14},buffer:{type:"number","default":64},tolerance:{type:"number","default":3},cluster:{type:"boolean","default":false},clusterRadius:{type:"number","default":400},clusterMaxZoom:{type:"number"}},source_video:{type:{required:true,type:"enum",values:["video"]},urls:{required:true,type:"array",value:"string"},coordinates:{required:true,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:true,type:"enum",values:["image"]},url:{required:true,type:"string"},coordinates:{required:true,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:true},type:{type:"enum",values:["fill","line","symbol","circle","raster","background"]},metadata:{type:"*"},ref:{type:"string"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:22},maxzoom:{type:"number",minimum:0,maximum:22},interactive:{type:"boolean","default":false},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"},"paint.*":{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_symbol","layout_raster","layout_background"],layout_background:{visibility:{type:"enum","function":"piecewise-constant",values:["visible","none"],"default":"visible"}},layout_fill:{visibility:{type:"enum","function":"piecewise-constant",values:["visible","none"],"default":"visible"}},layout_circle:{visibility:{type:"enum","function":"piecewise-constant",values:["visible","none"],"default":"visible"}},layout_line:{"line-cap":{type:"enum","function":"piecewise-constant",values:["butt","round","square"],"default":"butt"},"line-join":{type:"enum","function":"piecewise-constant",values:["bevel","round","miter"],"default":"miter"},"line-miter-limit":{type:"number","default":2,"function":"interpolated",requires:[{"line-join":"miter"}]},"line-round-limit":{type:"number","default":1.05,"function":"interpolated",requires:[{"line-join":"round"}]},visibility:{type:"enum","function":"piecewise-constant",values:["visible","none"],"default":"visible"}},layout_symbol:{"symbol-placement":{type:"enum","function":"piecewise-constant",values:["point","line"],"default":"point"},"symbol-spacing":{type:"number","default":250,minimum:1,"function":"interpolated",units:"pixels",requires:[{"symbol-placement":"line"}]},"symbol-avoid-edges":{type:"boolean","function":"piecewise-constant","default":false},"icon-allow-overlap":{type:"boolean","function":"piecewise-constant","default":false,requires:["icon-image"]},"icon-ignore-placement":{type:"boolean","function":"piecewise-constant","default":false,requires:["icon-image"]},"icon-optional":{type:"boolean","function":"piecewise-constant","default":false,requires:["icon-image","text-field"]},"icon-rotation-alignment":{type:"enum","function":"piecewise-constant",values:["map","viewport"],"default":"viewport",requires:["icon-image"]},"icon-size":{type:"number","default":1,minimum:0,"function":"interpolated",requires:["icon-image"]},"icon-image":{type:"string","function":"piecewise-constant",tokens:true},"icon-rotate":{type:"number","default":0,period:360,"function":"interpolated",units:"degrees",requires:["icon-image"]},"icon-padding":{type:"number","default":2,minimum:0,"function":"interpolated",units:"pixels",requires:["icon-image"]},"icon-keep-upright":{type:"boolean","function":"piecewise-constant","default":false,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":"line"}]},"icon-offset":{type:"array",value:"number",length:2,"default":[0,0],"function":"interpolated",requires:["icon-image"]},"text-rotation-alignment":{type:"enum","function":"piecewise-constant",values:["map","viewport"],"default":"viewport",requires:["text-field"]},"text-field":{type:"string","function":"piecewise-constant","default":"",tokens:true},"text-font":{type:"array",value:"string","function":"piecewise-constant","default":["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"]},"text-size":{type:"number","default":16,minimum:0,units:"pixels","function":"interpolated",requires:["text-field"]},"text-max-width":{type:"number","default":10,minimum:0,units:"em","function":"interpolated",requires:["text-field"]},"text-line-height":{type:"number","default":1.2,units:"em","function":"interpolated",requires:["text-field"]},"text-letter-spacing":{type:"number","default":0,units:"em","function":"interpolated",requires:["text-field"]},"text-justify":{type:"enum","function":"piecewise-constant",values:["left","center","right"],"default":"center",requires:["text-field"]},"text-anchor":{type:"enum","function":"piecewise-constant",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],"default":"center",requires:["text-field"]},"text-max-angle":{type:"number","default":45,units:"degrees","function":"interpolated",requires:["text-field",{"symbol-placement":"line"}]},"text-rotate":{type:"number","default":0,period:360,units:"degrees","function":"interpolated",requires:["text-field"]},"text-padding":{type:"number","default":2,minimum:0,units:"pixels","function":"interpolated",requires:["text-field"]},"text-keep-upright":{type:"boolean","function":"piecewise-constant","default":true,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":"line"}]},"text-transform":{type:"enum","function":"piecewise-constant",values:["none","uppercase","lowercase"],"default":"none",requires:["text-field"]},"text-offset":{type:"array",value:"number",units:"ems","function":"interpolated",length:2,"default":[0,0],requires:["text-field"]},"text-allow-overlap":{type:"boolean","function":"piecewise-constant","default":false,requires:["text-field"]},"text-ignore-placement":{type:"boolean","function":"piecewise-constant","default":false,requires:["text-field"]},"text-optional":{type:"boolean","function":"piecewise-constant","default":false,requires:["text-field","icon-image"]},visibility:{type:"enum","function":"piecewise-constant",values:["visible","none"],"default":"visible"}},layout_raster:{visibility:{type:"enum","function":"piecewise-constant",values:["visible","none"],"default":"visible"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:["==","!=",">",">=","<","<=","in","!in","all","any","none"]},geometry_type:{type:"enum",values:["Point","LineString","Polygon"]},color_operation:{type:"enum",values:["lighten","saturate","spin","fade","mix"]},"function":{stops:{type:"array",required:true,value:"function_stop"},base:{type:"number","default":1,minimum:0}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},paint:["paint_fill","paint_line","paint_circle","paint_symbol","paint_raster","paint_background"],paint_fill:{"fill-antialias":{type:"boolean","function":"piecewise-constant","default":true},"fill-opacity":{type:"number","function":"interpolated","default":1,minimum:0,maximum:1,transition:true},"fill-color":{type:"color","default":"#000000","function":"interpolated",transition:true,requires:[{"!":"fill-pattern"}]},"fill-outline-color":{type:"color","function":"interpolated",transition:true,requires:[{"!":"fill-pattern"},{"fill-antialias":true}]},"fill-translate":{type:"array",value:"number",length:2,"default":[0,0],"function":"interpolated",transition:true,units:"pixels"},"fill-translate-anchor":{type:"enum","function":"piecewise-constant",values:["map","viewport"],"default":"map",requires:["fill-translate"]},"fill-pattern":{type:"string","function":"piecewise-constant",transition:true}},paint_line:{"line-opacity":{type:"number","function":"interpolated","default":1,minimum:0,maximum:1,transition:true},"line-color":{type:"color","default":"#000000","function":"interpolated",transition:true,requires:[{"!":"line-pattern"}]},"line-translate":{type:"array",value:"number",length:2,"default":[0,0],"function":"interpolated",transition:true,units:"pixels"},"line-translate-anchor":{type:"enum","function":"piecewise-constant",values:["map","viewport"],"default":"map",requires:["line-translate"]},"line-width":{type:"number","default":1,minimum:0,"function":"interpolated",transition:true,units:"pixels"},"line-gap-width":{type:"number","default":0,minimum:0,"function":"interpolated",transition:true,units:"pixels"},"line-offset":{type:"number","default":0,"function":"interpolated",transition:true,units:"pixels"},"line-blur":{type:"number","default":0,minimum:0,"function":"interpolated",transition:true,units:"pixels"},"line-dasharray":{type:"array",value:"number","function":"piecewise-constant",minimum:0,transition:true,units:"line widths",requires:[{"!":"line-pattern"}]},"line-pattern":{type:"string","function":"piecewise-constant",transition:true}},paint_circle:{"circle-radius":{type:"number","default":5,minimum:0,"function":"interpolated",transition:true,units:"pixels"},"circle-color":{type:"color","default":"#000000","function":"interpolated",transition:true},"circle-blur":{type:"number","default":0,"function":"interpolated",transition:true},"circle-opacity":{type:"number","default":1,minimum:0,maximum:1,"function":"interpolated",transition:true},"circle-translate":{type:"array",value:"number",length:2,"default":[0,0],"function":"interpolated",transition:true,units:"pixels"},"circle-translate-anchor":{type:"enum","function":"piecewise-constant",values:["map","viewport"],"default":"map",requires:["circle-translate"]}},paint_symbol:{"icon-opacity":{type:"number","default":1,minimum:0,maximum:1,"function":"interpolated",transition:true,requires:["icon-image"]},"icon-color":{type:"color","default":"#000000","function":"interpolated",transition:true,requires:["icon-image"]},"icon-halo-color":{type:"color","default":"rgba(0, 0, 0, 0)","function":"interpolated",transition:true,requires:["icon-image"]},"icon-halo-width":{type:"number","default":0,minimum:0,"function":"interpolated",transition:true,units:"pixels",requires:["icon-image"]},"icon-halo-blur":{type:"number","default":0,minimum:0,"function":"interpolated",transition:true,units:"pixels",requires:["icon-image"]},"icon-translate":{type:"array",value:"number",length:2,"default":[0,0],"function":"interpolated",transition:true,units:"pixels",requires:["icon-image"]},"icon-translate-anchor":{type:"enum","function":"piecewise-constant",values:["map","viewport"],"default":"map",requires:["icon-image","icon-translate"]},"text-opacity":{type:"number","default":1,minimum:0,maximum:1,"function":"interpolated",transition:true,requires:["text-field"]},"text-color":{type:"color","default":"#000000","function":"interpolated",transition:true,requires:["text-field"]},"text-halo-color":{type:"color","default":"rgba(0, 0, 0, 0)","function":"interpolated",transition:true,requires:["text-field"]},"text-halo-width":{type:"number","default":0,minimum:0,"function":"interpolated",transition:true,units:"pixels",requires:["text-field"]},"text-halo-blur":{type:"number","default":0,minimum:0,"function":"interpolated",transition:true,units:"pixels",requires:["text-field"]},"text-translate":{type:"array",value:"number",length:2,"default":[0,0],"function":"interpolated",transition:true,units:"pixels",requires:["text-field"]},"text-translate-anchor":{type:"enum","function":"piecewise-constant",values:["map","viewport"],"default":"map",requires:["text-field","text-translate"]}},paint_raster:{"raster-opacity":{type:"number","default":1,minimum:0,maximum:1,"function":"interpolated",transition:true},"raster-hue-rotate":{type:"number","default":0,period:360,"function":"interpolated",transition:true,units:"degrees"},"raster-brightness-min":{type:"number","function":"interpolated","default":0,minimum:0,maximum:1,transition:true},"raster-brightness-max":{type:"number","function":"interpolated","default":1,minimum:0,maximum:1,transition:true},"raster-saturation":{type:"number","default":0,minimum:-1,maximum:1,"function":"interpolated",transition:true},"raster-contrast":{type:"number","default":0,minimum:-1,maximum:1,"function":"interpolated",transition:true},"raster-fade-duration":{type:"number","default":300,minimum:0,"function":"interpolated",transition:true,units:"milliseconds"}},paint_background:{"background-color":{type:"color","default":"#000000","function":"interpolated",transition:true,requires:[{"!":"background-pattern"}]},"background-pattern":{type:"string","function":"piecewise-constant",transition:true},"background-opacity":{type:"number","default":1,minimum:0,maximum:1,"function":"interpolated",transition:true}},transition:{duration:{type:"number","default":300,minimum:0,units:"milliseconds"},delay:{type:"number","default":0,minimum:0,units:"milliseconds"}}}},{}],135:[function(q,o,s){function r(z){var B;z&&z.length&&(B=z,z=B.length);var A=new Uint8Array(z||0);return B&&A.set(B),A.readUInt32LE=p.readUInt32LE,A.writeUInt32LE=p.writeUInt32LE,A.readInt32LE=p.readInt32LE,A.writeInt32LE=p.writeInt32LE,A.readFloatLE=p.readFloatLE,A.writeFloatLE=p.writeFloatLE,A.readDoubleLE=p.readDoubleLE,A.writeDoubleLE=p.writeDoubleLE,A.toString=p.toString,A.write=p.write,A.slice=p.slice,A.copy=p.copy,A._isBuffer=!0,A}function u(A){for(var C,B,E=A.length,z=[],D=0;E>D;D++){if(C=A.charCodeAt(D),C>55295&&57344>C){if(!B){C>56319||D+1===E?z.push(239,191,189):B=C;continue}if(56320>C){z.push(239,191,189),B=C;continue}C=B-55296<<10|C-56320|65536,B=null}else{B&&(z.push(239,191,189),B=null)}128>C?z.push(C):2048>C?z.push(C>>6|192,63&C|128):65536>C?z.push(C>>12|224,C>>6&63|128,63&C|128):z.push(C>>18|240,C>>12&63|128,C>>6&63|128,63&C|128)}return z}o.exports=r;var w=q("ieee754"),p,t,v;p={readUInt32LE:function(z){return(this[z]|this[z+1]<<8|this[z+2]<<16)+16777216*this[z+3]},writeUInt32LE:function(z,A){this[A]=z,this[A+1]=z>>>8,this[A+2]=z>>>16,this[A+3]=z>>>24},readInt32LE:function(z){return(this[z]|this[z+1]<<8|this[z+2]<<16)+(this[z+3]<<24)},readFloatLE:function(z){return w.read(this,z,!0,23,4)},readDoubleLE:function(z){return w.read(this,z,!0,52,8)},writeFloatLE:function(z,A){return w.write(this,z,A,!0,23,4)},writeDoubleLE:function(z,A){return w.write(this,z,A,!0,52,8)},toString:function(B,D,C){var F="",A="";D=D||0,C=Math.min(this.length,C||this.length);for(var E=D;C>E;E++){var z=this[E];127>=z?(F+=decodeURIComponent(A)+String.fromCharCode(z),A=""):A+="%"+z.toString(16)}return F+=decodeURIComponent(A)},write:function(z,B){for(var A=z===t?v:u(z),C=0;C>3,O=this.pos;J(K,I,this),this.pos===O&&this.skip(M)}return I},readMessage:function(J,I){return this.readFields(J,I,this.readVarint()+this.pos)},readFixed32:function(){var I=this.buf.readUInt32LE(this.pos);return this.pos+=4,I},readSFixed32:function(){var I=this.buf.readInt32LE(this.pos);return this.pos+=4,I},readFixed64:function(){var I=this.buf.readUInt32LE(this.pos)+this.buf.readUInt32LE(this.pos+4)*B;return this.pos+=8,I},readSFixed64:function(){var I=this.buf.readUInt32LE(this.pos)+this.buf.readInt32LE(this.pos+4)*B;return this.pos+=8,I},readFloat:function(){var I=this.buf.readFloatLE(this.pos);return this.pos+=4,I},readDouble:function(){var I=this.buf.readDoubleLE(this.pos);return this.pos+=8,I},readVarint:function(){var J,I,N,M,K,P,O=this.buf;if(N=O[this.pos++],128>N){return N}if(N=127&N,M=O[this.pos++],128>M){return N|M<<7}if(M=(127&M)<<7,K=O[this.pos++],128>K){return N|M|K<<14}if(K=(127&K)<<14,P=O[this.pos++],128>P){return N|M|K|P<<21}if(J=N|M|K|(127&P)<<21,I=O[this.pos++],J+=268435456*(127&I),128>I){return J}if(I=O[this.pos++],J+=34359738368*(127&I),128>I){return J}if(I=O[this.pos++],J+=4398046511104*(127&I),128>I){return J}if(I=O[this.pos++],J+=562949953421312*(127&I),128>I){return J}if(I=O[this.pos++],J+=72057594037927940*(127&I),128>I){return J}if(I=O[this.pos++],J+=9223372036854776000*(127&I),128>I){return J}throw new Error("Expected varint not more than 10 bytes")},readVarint64:function(){var J=this.pos,I=this.readVarint();if(z>I){return I}for(var N=this.pos-2;255===this.buf[N];){N--}J>N&&(N=J),I=0;for(var M=0;N-J+1>M;M++){var K=127&~this.buf[J+M];I+=4>M?K<<7*M:K*Math.pow(2,7*M)}return -I-1},readSVarint:function(){var I=this.readVarint();return I%2===1?(I+1)/-2:I/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var J=this.readVarint()+this.pos,I=this.buf.toString("utf8",this.pos,J);return this.pos=J,I},readBytes:function(){var J=this.readVarint()+this.pos,I=this.buf.slice(this.pos,J);return this.pos=J,I},readPackedVarint:function(){for(var J=this.readVarint()+this.pos,I=[];this.pos127;){}}else{if(I===H.Bytes){this.pos=this.readVarint()+this.pos}else{if(I===H.Fixed32){this.pos+=4}else{if(I!==H.Fixed64){throw new Error("Unimplemented type: "+I)}this.pos+=8}}}},writeTag:function(J,I){this.writeVarint(J<<3|I)},realloc:function(J){for(var I=this.length||16;I=J){this.realloc(1),this.buf[this.pos++]=J}else{if(16383>=J){this.realloc(2),this.buf[this.pos++]=J>>>0&127|128,this.buf[this.pos++]=J>>>7&127}else{if(2097151>=J){this.realloc(3),this.buf[this.pos++]=J>>>0&127|128,this.buf[this.pos++]=J>>>7&127|128,this.buf[this.pos++]=J>>>14&127}else{if(268435455>=J){this.realloc(4),this.buf[this.pos++]=J>>>0&127|128,this.buf[this.pos++]=J>>>7&127|128,this.buf[this.pos++]=J>>>14&127|128,this.buf[this.pos++]=J>>>21&127}else{for(var I=this.pos;J>=128;){this.realloc(1),this.buf[this.pos++]=255&J|128,J/=128}if(this.realloc(1),this.buf[this.pos++]=0|J,this.pos-I>10){throw new Error("Given varint doesn't fit into 10 bytes")}}}}}},writeSVarint:function(I){this.writeVarint(0>I?2*-I-1:2*I)},writeBoolean:function(I){this.writeVarint(Boolean(I))},writeString:function(J){J=String(J);var I=v.byteLength(J);this.writeVarint(I),this.realloc(I),this.buf.write(J,this.pos),this.pos+=I},writeFloat:function(I){this.realloc(4),this.buf.writeFloatLE(I,this.pos),this.pos+=4},writeDouble:function(I){this.realloc(8),this.buf.writeDoubleLE(I,this.pos),this.pos+=8},writeBytes:function(J){var I=J.length;this.writeVarint(I),this.realloc(I);for(var K=0;I>K;K++){this.buf[this.pos++]=J[K]}},writeRawMessage:function(J,I){this.pos++;var N=this.pos;J(I,this);var M=this.pos-N,K=127>=M?1:16383>=M?2:2097151>=M?3:268435455>=M?4:Math.ceil(Math.log(M)/(7*Math.LN2));if(K>1){this.realloc(K-1);for(var O=this.pos-1;O>=N;O--){this.buf[O+K-1]=this.buf[O]}}this.pos=N-1,this.writeVarint(M),this.pos+=M},writeMessage:function(J,I,K){this.writeTag(J,H.Bytes),this.writeRawMessage(I,K)},writePackedVarint:function(J,I){this.writeMessage(J,u,I)},writePackedSVarint:function(J,I){this.writeMessage(J,s,I)},writePackedBoolean:function(J,I){this.writeMessage(J,G,I)},writePackedFloat:function(J,I){this.writeMessage(J,A,I)},writePackedDouble:function(J,I){this.writeMessage(J,D,I)},writePackedFixed32:function(J,I){this.writeMessage(J,E,I)},writePackedSFixed32:function(J,I){this.writeMessage(J,w,I)},writePackedFixed64:function(J,I){this.writeMessage(J,C,I)},writePackedSFixed64:function(J,I){this.writeMessage(J,t,I)},writeBytesField:function(J,I){this.writeTag(J,H.Bytes),this.writeBytes(I)},writeFixed32Field:function(J,I){this.writeTag(J,H.Fixed32),this.writeFixed32(I)},writeSFixed32Field:function(J,I){this.writeTag(J,H.Fixed32),this.writeSFixed32(I)},writeFixed64Field:function(J,I){this.writeTag(J,H.Fixed64),this.writeFixed64(I)},writeSFixed64Field:function(J,I){this.writeTag(J,H.Fixed64),this.writeSFixed64(I)},writeVarintField:function(J,I){this.writeTag(J,H.Varint),this.writeVarint(I)},writeSVarintField:function(J,I){this.writeTag(J,H.Varint),this.writeSVarint(I)},writeStringField:function(J,I){this.writeTag(J,H.Bytes),this.writeString(I)},writeFloatField:function(J,I){this.writeTag(J,H.Fixed32),this.writeFloat(I)},writeDoubleField:function(J,I){this.writeTag(J,H.Fixed64),this.writeDouble(I)},writeBooleanField:function(J,I){this.writeVarintField(J,Boolean(I))}}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./buffer":135}],137:[function(p,q,o){function r(s,u){this.x=s,this.y=u}q.exports=r,r.prototype={clone:function(){return new r(this.x,this.y)},add:function(s){return this.clone()._add(s)},sub:function(s){return this.clone()._sub(s)},mult:function(s){return this.clone()._mult(s)},div:function(s){return this.clone()._div(s)},rotate:function(s){return this.clone()._rotate(s)},matMult:function(s){return this.clone()._matMult(s)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(s){return this.x===s.x&&this.y===s.y},dist:function(s){return Math.sqrt(this.distSqr(s))},distSqr:function(u){var v=u.x-this.x,s=u.y-this.y;return v*v+s*s},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(s){return Math.atan2(this.y-s.y,this.x-s.x)},angleWith:function(s){return this.angleWithSep(s.x,s.y)},angleWithSep:function(s,u){return Math.atan2(this.x*u-this.y*s,this.x*s+this.y*u)},_matMult:function(u){var v=u[0]*this.x+u[1]*this.y,s=u[2]*this.x+u[3]*this.y;return this.x=v,this.y=s,this},_add:function(s){return this.x+=s.x,this.y+=s.y,this},_sub:function(s){return this.x-=s.x,this.y-=s.y,this},_mult:function(s){return this.x*=s,this.y*=s,this},_div:function(s){return this.x/=s,this.y/=s,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var s=this.y;return this.y=this.x,this.x=-s,this},_rotate:function(v){var A=Math.cos(v),u=Math.sin(v),w=A*this.x-u*this.y,z=u*this.x+A*this.y;return this.x=w,this.y=z,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(s){return s instanceof r?s:Array.isArray(s)?new r(s[0],s[1]):s}},{}],138:[function(q,p,s){function w(){z=!1,u.length?t=u.concat(t):v=-1,t.length&&B()}function B(){if(!z){var C=setTimeout(w);z=!0;for(var D=t.length;D;){for(u=t,t=[];++v1){for(var C=1;CQ;Q++){S=P.children[Q],D(u,P.leaf?R(S):S.bbox)}return u}function F(){return[1/0,1/0,-(1/0),-(1/0)]}function D(s,r){return s[0]=Math.min(s[0],r[0]),s[1]=Math.min(s[1],r[1]),s[2]=Math.max(s[2],r[2]),s[3]=Math.max(s[3],r[3]),s}function v(s,r){return s.bbox[0]-r.bbox[0]}function z(s,r){return s.bbox[1]-r.bbox[1]}function J(r){return(r[2]-r[0])*(r[3]-r[1])}function N(r){return r[2]-r[0]+(r[3]-r[1])}function B(s,r){return(Math.max(r[2],s[2])-Math.min(r[0],s[0]))*(Math.max(r[3],s[3])-Math.min(r[1],s[1]))}function K(u,s){var R=Math.max(u[0],s[0]),Q=Math.max(u[1],s[1]),O=Math.min(u[2],s[2]),P=Math.min(u[3],s[3]);return Math.max(0,O-R)*Math.max(0,P-Q)}function E(s,r){return s[0]<=r[0]&&s[1]<=r[1]&&r[2]<=s[2]&&r[3]<=s[3]}function H(s,r){return r[0]<=s[2]&&r[1]<=s[3]&&r[2]>=s[0]&&r[3]>=s[1]}function G(u,s,S,Q,O){for(var P,R=[s,S];R.length;){S=R.pop(),s=R.pop(),Q>=S-s||(P=s+Math.ceil((S-s)/Q/2)*Q,I(u,s,S,P,O),R.push(s,P,P,S))}}function I(aa,S,Q,V,T){for(var O,P,Y,ab,R,Z,U,X,W;Q>S;){for(Q-S>600&&(O=Q-S+1,P=V-S+1,Y=Math.log(O),ab=0.5*Math.exp(2*Y/3),R=0.5*Math.sqrt(Y*ab*(O-ab)/O)*(0>P-O/2?-1:1),Z=Math.max(S,Math.floor(V-P*ab/O+R)),U=Math.min(Q,Math.floor(V+(O-P)*ab/O+R)),I(aa,Z,U,V,T)),X=aa[V],P=S,W=Q,w(aa,S,V),T(aa[Q],X)>0&&w(aa,S,Q);W>P;){for(w(aa,P,W),P++,W--;T(aa[P],X)<0;){P++}for(;T(aa[W],X)>0;){W--}}0===T(aa[S],X)?w(aa,S,W):(W++,w(aa,W,Q)),V>=W&&(S=W+1),W>=V&&(Q=W-1)}}function w(s,r,O){var u=s[r];s[r]=s[O],s[O]=u}M.prototype={all:function(){return this._all(this.data,[])},search:function(U){var Q=this.data,P=[],S=this.toBBox;if(!H(U,Q.bbox)){return P}for(var R,u,O,T,V=[];Q;){for(R=0,u=Q.children.length;u>R;R++){O=Q.children[R],T=Q.leaf?S(O):O.bbox,H(U,T)&&(Q.leaf?P.push(O):E(U,T)?this._all(O,P):V.push(O))}Q=V.pop()}return P},collides:function(O){var u=this.data,T=this.toBBox;if(!H(O,u.bbox)){return !1}for(var R,P,Q,S,s=[];u;){for(R=0,P=u.children.length;P>R;R++){if(Q=u.children[R],S=u.leaf?T(Q):Q.bbox,H(O,S)){if(u.leaf||E(O,S)){return !0}s.push(Q)}}u=s.pop()}return !1},load:function(s){if(!s||!s.length){return this}if(s.lengthr;r++){this.insert(s[r])}return this}var O=this._build(s.slice(),0,s.length-1,0);if(this.data.children.length){if(this.data.height===O.height){this._splitRoot(this.data,O)}else{if(this.data.height=P){return O={children:Z.slice(Q,U+1),height:1,bbox:null,leaf:!0},C(O,this.toBBox),O}S||(S=Math.ceil(Math.log(P)/Math.log(X)),X=Math.ceil(P/Math.pow(X,S-1))),O={children:[],height:S,bbox:null,leaf:!1};var aa,R,Y,T,V=Math.ceil(P/X),W=V*Math.ceil(Math.sqrt(X));for(G(Z,Q,U,W,this.compareMinX),aa=Q;U>=aa;aa+=W){for(Y=Math.min(aa+W-1,U),G(Z,aa,Y,V,this.compareMinY),R=aa;Y>=R;R+=V){T=Math.min(R+V-1,Y),O.children.push(this._build(Z,R,T,S-1))}}return C(O,this.toBBox),O},_chooseSubtree:function(Y,R,Q,U){for(var S,O,P,Z,X,T,W,V;;){if(U.push(R),R.leaf||U.length-1===Q){break}for(W=V=1/0,S=0,O=R.children.length;O>S;S++){P=R.children[S],X=J(P.bbox),T=B(Y,P.bbox)-X,V>T?(V=T,W=W>X?X:W,Z=P):T===V&&W>X&&(W=X,Z=P)}R=Z}return R},_insert:function(O,u,S){var Q=this.toBBox,P=S?O.bbox:Q(O),R=[],s=this._chooseSubtree(P,this.data,u,R);for(s.children.push(O),D(s.bbox,P);u>=0&&R[u].children.length>this._maxEntries;){this._split(R,u),u--}this._adjustParentBBoxes(P,R,u)},_split:function(u,S){var Q=u[S],O=Q.children.length,P=this._minEntries;this._chooseSplitAxis(Q,P,O);var R=this._chooseSplitIndex(Q,P,O),s={children:Q.children.splice(R,Q.children.length-R),height:Q.height,bbox:null,leaf:!1};Q.leaf&&(s.leaf=!0),C(Q,this.toBBox),C(s,this.toBBox),S?u[S-1].children.push(s):this._splitRoot(Q,s)},_splitRoot:function(r,s){this.data={children:[r,s],height:r.height+1,bbox:null,leaf:!1},C(this.data,this.toBBox)},_chooseSplitIndex:function(W,Q,T){var R,u,O,X,P,S,V,U;for(S=V=1/0,R=Q;T-Q>=R;R++){u=A(W,0,R,this.toBBox),O=A(W,R,T,this.toBBox),X=K(u,O),P=J(u)+J(O),S>X?(S=X,U=R,V=V>P?P:V):X===S&&V>P&&(V=P,U=R)}return U},_chooseSplitAxis:function(O,u,S){var R=O.leaf?this.compareMinX:v,Q=O.leaf?this.compareMinY:z,r=this._allDistMargin(O,u,S,R),P=this._allDistMargin(O,u,S,Q);P>r&&O.children.sort(R)},_allDistMargin:function(W,Q,S,s){W.children.sort(s);var O,U,P=this.toBBox,V=A(W,0,Q,P),R=A(W,S-Q,S,P),T=N(V)+N(R);for(O=Q;S-Q>O;O++){U=W.children[O],D(V,W.leaf?P(U):U.bbox),T+=N(V)}for(O=S-Q-1;O>=Q;O--){U=W.children[O],D(R,W.leaf?P(U):U.bbox),T+=N(R)}return T},_adjustParentBBoxes:function(s,r,O){for(var u=O;u>=0;u--){D(r[u].bbox,s)}},_condense:function(r){for(var u,s=r.length-1;s>=0;s--){0===r[s].children.length?s>0?(u=r[s-1].children,u.splice(u.indexOf(r[s]),1)):this.clear():C(r[s],this.toBBox)}},_initFormat:function(s){var r=["return a"," - b",";"];this.compareMinX=new Function("a","b",r.join(s[0])),this.compareMinY=new Function("a","b",r.join(s[1])),this.toBBox=new Function("a","return [a"+s.join(", a")+"];")}},"function"==typeof n&&n.amd?n("rbush",function(){return M}):"undefined"!=typeof q?q.exports=M:"undefined"!=typeof self?self.rbush=M:window.rbush=M}()},{}],140:[function(p,q,o){void function(t,s){"function"==typeof n&&n.amd?n(s):"object"==typeof o?q.exports=s():t.resolveUrl=s()}(this,function(){function r(){var w=arguments.length;if(0===w){throw new Error("resolveUrl requires at least one argument; got none.")}var u=document.createElement("base");if(u.href=arguments[0],1===w){return u.href}var s=document.getElementsByTagName("head")[0];s.insertBefore(u,s.firstChild);for(var A,z=document.createElement("a"),v=1;w>v;v++){z.href=arguments[v],A=z.href,u.href=A}return s.removeChild(u),A}return r})},{}],141:[function(q,r,o){function p(u,s,w,v){this.cx=3*u,this.bx=3*(w-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*s,this.by=3*(v-s)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=v,this.p2x=w,this.p2y=v}r.exports=p,p.prototype.sampleCurveX=function(s){return((this.ax*s+this.bx)*s+this.cx)*s},p.prototype.sampleCurveY=function(s){return((this.ay*s+this.by)*s+this.cy)*s},p.prototype.sampleCurveDerivativeX=function(s){return(3*this.ax*s+2*this.bx)*s+this.cx},p.prototype.solveCurveX=function(z,w){"undefined"==typeof w&&(w=0.000001);var D,C,B,A,E;for(B=z,E=0;8>E;E++){if(A=this.sampleCurveX(B)-z,Math.abs(A)B){return D}if(B>C){return C}for(;C>D;){if(A=this.sampleCurveX(B),Math.abs(A-z)A?D=B:C=B,B=0.5*(C-D)+D}return B},p.prototype.solve=function(u,s){return this.sampleCurveY(this.solveCurveX(u,s))}},{}],142:[function(p,q,o){q.exports=function(r){return r&&"object"==typeof r&&"function"==typeof r.copy&&"function"==typeof r.fill&&"function"==typeof r.readUInt8}},{}],143:[function(p,q,o){(function(R,T){function ab(ae,ad){var ac={seen:[],stylize:E};return arguments.length>=3&&(ac.depth=arguments[2]),arguments.length>=4&&(ac.colors=arguments[3]),G(ad)?ac.showHidden=ad:ad&&o._extend(ac,ad),t(ac.showHidden)&&(ac.showHidden=!1),t(ac.depth)&&(ac.depth=2),t(ac.colors)&&(ac.colors=!1),t(ac.customInspect)&&(ac.customInspect=!0),ac.colors&&(ac.stylize=r),z(ac,ae,ac.depth)}function r(ae,ad){var ac=ab.styles[ad];return ac?"["+ab.colors[ac][0]+"m"+ae+"["+ab.colors[ac][1]+"m":ae}function E(ad,ac){return ad}function C(ad){var ac={};return ad.forEach(function(af,ae){ac[af]=!0}),ac}function z(aj,ac,an){if(aj.customInspect&&ac&&s(ac.inspect)&&ac.inspect!==o.inspect&&(!ac.constructor||ac.constructor.prototype!==ac)){var af=ac.inspect(an,aj);return O(af)||(af=z(aj,af,an)),af}var ah=N(aj,ac);if(ah){return ah}var ae=Object.keys(ac),ao=C(ae);if(aj.showHidden&&(ae=Object.getOwnPropertyNames(ac)),W(ac)&&(ae.indexOf("message")>=0||ae.indexOf("description")>=0)){return A(ac)}if(0===ae.length){if(s(ac)){var am=ac.name?": "+ac.name:"";return aj.stylize("[Function"+am+"]","special")}if(U(ac)){return aj.stylize(RegExp.prototype.toString.call(ac),"regexp")}if(aa(ac)){return aj.stylize(Date.prototype.toString.call(ac),"date")}if(W(ac)){return A(ac)}}var al="",ak=!1,ag=["{","}"];if(M(ac)&&(ak=!0,ag=["[","]"]),s(ac)){var ad=ac.name?": "+ac.name:"";al=" [Function"+ad+"]"}if(U(ac)&&(al=" "+RegExp.prototype.toString.call(ac)),aa(ac)&&(al=" "+Date.prototype.toUTCString.call(ac)),W(ac)&&(al=" "+A(ac)),0===ae.length&&(!ak||0==ac.length)){return ag[0]+al+ag[1]}if(0>an){return U(ac)?aj.stylize(RegExp.prototype.toString.call(ac),"regexp"):aj.stylize("[Object]","special")}aj.seen.push(ac);var ai;return ai=ak?Z(aj,ac,an,ao,ae):ae.map(function(ap){return v(aj,ac,an,ao,ap,ak)}),aj.seen.pop(),X(ai,al,ag)}function N(ae,ad){if(t(ad)){return ae.stylize("undefined","undefined")}if(O(ad)){var ac="'"+JSON.stringify(ad).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ae.stylize(ac,"string")}return P(ad)?ae.stylize(""+ad,"number"):G(ad)?ae.stylize(""+ad,"boolean"):S(ad)?ae.stylize("null","null"):void 0}function A(ac){return"["+Error.prototype.toString.call(ac)+"]"}function Z(ah,ag,ae,aj,ad){for(var ai=[],af=0,ac=ag.length;ac>af;++af){K(ag,String(af))?ai.push(v(ah,ag,ae,aj,String(af),!0)):ai.push("")}return ad.forEach(function(ak){ak.match(/^\d+$/)||ai.push(v(ah,ag,ae,aj,ak,!0))}),ai}function v(ag,ac,aj,ae,af,ad){var ak,ai,ah;if(ah=Object.getOwnPropertyDescriptor(ac,af)||{value:ac[af]},ah.get?ai=ah.set?ag.stylize("[Getter/Setter]","special"):ag.stylize("[Getter]","special"):ah.set&&(ai=ag.stylize("[Setter]","special")),K(ae,af)||(ak="["+af+"]"),ai||(ag.seen.indexOf(ah.value)<0?(ai=S(aj)?z(ag,ah.value,null):z(ag,ah.value,aj-1),ai.indexOf("\n")>-1&&(ai=ad?ai.split("\n").map(function(al){return" "+al}).join("\n").substr(2):"\n"+ai.split("\n").map(function(al){return" "+al}).join("\n"))):ai=ag.stylize("[Circular]","special")),t(ak)){if(ad&&af.match(/^\d+$/)){return ai}ak=JSON.stringify(""+af),ak.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ak=ak.substr(1,ak.length-2),ak=ag.stylize(ak,"name")):(ak=ak.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ak=ag.stylize(ak,"string"))}return ak+": "+ai}function X(af,ae,ad){var ag=0,ac=af.reduce(function(ai,ah){return ag++,ah.indexOf("\n")>=0&&ag++,ai+ah.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ac>60?ad[0]+(""===ae?"":ae+"\n ")+" "+af.join(",\n ")+" "+ad[1]:ad[0]+ae+" "+af.join(", ")+" "+ad[1]}function M(ac){return Array.isArray(ac)}function G(ac){return"boolean"==typeof ac}function S(ac){return null===ac}function F(ac){return null==ac}function P(ac){return"number"==typeof ac}function O(ac){return"string"==typeof ac}function w(ac){return"symbol"==typeof ac}function t(ac){return void 0===ac}function U(ac){return H(ac)&&"[object RegExp]"===B(ac)}function H(ac){return"object"==typeof ac&&null!==ac}function aa(ac){return H(ac)&&"[object Date]"===B(ac)}function W(ac){return H(ac)&&("[object Error]"===B(ac)||ac instanceof Error)}function s(ac){return"function"==typeof ac}function Y(ac){return null===ac||"boolean"==typeof ac||"number"==typeof ac||"string"==typeof ac||"symbol"==typeof ac||"undefined"==typeof ac}function B(ac){return Object.prototype.toString.call(ac)}function V(ac){return 10>ac?"0"+ac.toString(10):ac.toString(10)}function u(){var ad=new Date,ac=[V(ad.getHours()),V(ad.getMinutes()),V(ad.getSeconds())].join(":");return[ad.getDate(),D[ad.getMonth()],ac].join(" ")}function K(ad,ac){return Object.prototype.hasOwnProperty.call(ad,ac)}var Q=/%[sdj%]/g;o.format=function(ag){if(!O(ag)){for(var af=[],ad=0;ad=ac){return ak}switch(ak){case"%s":return String(ai[ad++]);case"%d":return Number(ai[ad++]);case"%j":try{return JSON.stringify(ai[ad++])}catch(aj){return"[Circular]"}default:return ak}}),ae=ai[ad];ac>ad;ae=ai[++ad]){ah+=S(ae)||!H(ae)?" "+ae:" "+ab(ae)}return ah},o.deprecate=function(ae,ad){function ac(){if(!af){if(R.throwDeprecation){throw new Error(ad)}R.traceDeprecation?console.trace(ad):console.error(ad),af=!0}return ae.apply(this,arguments)}if(t(T.process)){return function(){return o.deprecate(ae,ad).apply(this,arguments)}}if(R.noDeprecation===!0){return ae}var af=!1;return ac};var J={},I;o.debuglog=function(ad){if(t(I)&&(I=R.env.NODE_DEBUG||""),ad=ad.toUpperCase(),!J[ad]){if(new RegExp("\\b"+ad+"\\b","i").test(I)){var ac=R.pid;J[ad]=function(){var ae=o.format.apply(o,arguments);console.error("%s %d: %s",ad,ac,ae)}}else{J[ad]=function(){}}}return J[ad]},o.inspect=ab,ab.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ab.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},o.isArray=M,o.isBoolean=G,o.isNull=S,o.isNullOrUndefined=F,o.isNumber=P,o.isString=O,o.isSymbol=w,o.isUndefined=t,o.isRegExp=U,o.isObject=H,o.isDate=aa,o.isError=W,o.isFunction=s,o.isPrimitive=Y,o.isBuffer=p("./support/isBuffer");var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];o.log=function(){console.log("%s - %s",u(),o.format.apply(o,arguments))},o.inherits=p("inherits"),o._extend=function(ae,ad){if(!ad||!H(ad)){return ae}for(var ac=Object.keys(ad),af=ac.length;af--;){ae[ac[af]]=ad[ac[af]]}return ae}}).call(this,p("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":142,_process:138,inherits:127}],144:[function(p,q,o){q.exports.VectorTile=p("./lib/vectortile.js"),q.exports.VectorTileFeature=p("./lib/vectortilefeature.js"),q.exports.VectorTileLayer=p("./lib/vectortilelayer.js")},{"./lib/vectortile.js":145,"./lib/vectortilefeature.js":147,"./lib/vectortilelayer.js":148}],145:[function(r,s,q){function o(v,u){this.layers=v.readFields(p,{},u)}function p(z,w,v){if(3===z){var u=new t(v,v.readVarint()+v.pos);u.length&&(w[u.name]=u)}}var t=r("./vectortilelayer");s.exports=o},{"./vectortilelayer":148}],146:[function(p,q,o){function s(v){this.feature=v,this.finalRatio=4096/v.extent*Math.pow(2,v.dz);var u=64;u/=this.finalRatio;var w=v.extent>>v.dz;u>w&&(u=w),this.dz=v.dz,this.margin=u,this.xmin=w*v.xPos-u,this.ymin=w*v.yPos-u,this.xmax=this.xmin+w+2*u,this.ymax=this.ymin+w+2*u,this.lines=[],this._prevIsIn=!1,this.type=v.type}var r=p("point-geometry");q.exports=s,s.prototype.loadGeometry=function(){var w=this.feature._pbf;w.pos=this.feature._geometry;for(var v=w.readVarint()+w.pos,A=1,z=0,C=0,B=0;w.pos>3}if(z--,1===A||2===A){C+=w.readSVarint(),B+=w.readSVarint(),1===A?this.moveTo(C,B):this.lineTo(C,B)}else{if(7!==A){throw new Error("unknown command "+A)}this.closePolygon()}}return this.result()},s.prototype.moveTo=function(v,u){this._push_line(),this._prevIsIn=this._isIn(v,u),this._moveTo(v,u,this._prevIsIn),this._prevPt=new r(v,u),this._firstPt=new r(v,u)},s.prototype.lineTo=function(D,M){var N,E,A,F,I,G,C,z,B,v,H,w,J=this._isIn(D,M);if(J){this._prevIsIn?this._lineTo(D,M,!0):(N=this._prevPt,E=new r(D,M),A=this._intersect(E,N),this._lineTo(A.x,A.y,!0),this._lineTo(E.x,E.y,!0))}else{if(this._prevIsIn){E=this._prevPt,N=new r(D,M),A=this._intersect(E,N),this._lineTo(A.x,A.y,!0),this._lineTo(N.x,N.y,!1)}else{if(F=this._prevPt,I=new r(D,M),F.x<=this.xmin&&I.x<=this.xmin||F.x>=this.xmax&&I.x>=this.xmax||F.y<=this.ymin&&I.y<=this.ymin||F.y>=this.ymax&&I.y>=this.ymax){this._lineTo(I.x,I.y,!1)}else{if(z=[],(F.xthis.xmin||F.x>this.xmin&&I.x=this.ymax?v=!0:(C={},C.ratio=G,C.x=this.xmin,C.y=w,z.push(C))),(F.xthis.xmax||F.x>this.xmax&&I.x=this.ymax?v=!0:(C={},C.ratio=G,C.x=this.xmax,C.y=w,z.push(C))),(F.ythis.ymin||F.y>this.ymin&&I.y=this.xmax?B=!0:(C={},C.ratio=G,C.x=H,C.y=this.ymin,z.push(C))),(F.ythis.ymax||F.y>this.ymax&&I.y=this.xmax?B=!0:(C={},C.ratio=G,C.x=H,C.y=this.ymax,z.push(C))),0===z.length){B?v?this._lineTo(this.xmax,this.ymax,!0):this._lineTo(this.xmax,this.ymin,!0):v?this._lineTo(this.xmin,this.ymax,!0):this._lineTo(this.xmin,this.ymin,!0)}else{if(z.length>1&&z[0].ratio>z[1].ratio){this._lineTo(z[1].x,z[1].y,!0),this._lineTo(z[0].x,z[0].y,!0)}else{for(var K=0;K0&&(v=this._firstPt,u=this._prevPt,(v.x!==u.x||v.y!==u.y)&&this.lineTo(v.x,v.y))},s.prototype.result=function(){return this._push_line(),0===this.lines.length?null:this.lines},s.prototype._isIn=function(v,u){return v>=this.xmin&&v<=this.xmax&&u>=this.ymin&&u<=this.ymax},s.prototype._intersect=function(v,u){var z,w,B,A;return u.x>=this.xmin&&u.x<=this.xmax?(w=u.y<=this.ymin?this.ymin:this.ymax,z=v.x+(w-v.y)/(u.y-v.y)*(u.x-v.x)):u.y>=this.ymin&&u.y<=this.ymax?(z=u.x<=this.xmin?this.xmin:this.xmax,w=v.y+(z-v.x)/(u.x-v.x)*(u.y-v.y)):(w=u.y<=this.ymin?this.ymin:this.ymax,z=u.x<=this.xmin?this.xmin:this.xmax,B=(z-v.x)/(u.x-v.x),A=(w-v.y)/(u.y-v.y),A>B?w=v.y+B*(u.y-v.y):z=v.x+A*(u.x-v.x)),new r(z,w)},s.prototype._push_line=function(){this.line&&(1===this.type?this.line.length>0&&this.lines.push(this.line):2===this.type?this.line.length>1&&this.lines.push(this.line):3===this.type&&this.line.length>3&&this.lines.push(this.line)),this.line=[]},s.prototype._moveTo=function(v,u,w){3!==this.type?w&&(v=(v-(this.xmin+this.margin))*this.finalRatio,u=(u-(this.ymin+this.margin))*this.finalRatio,this.line.push(new r(v,u))):(w||(vthis.xmax&&(v=this.xmax),uthis.ymax&&(u=this.ymax)),v=(v-(this.xmin+this.margin))*this.finalRatio,u=(u-(this.ymin+this.margin))*this.finalRatio,this.line.push(new r(v,u)),this._is_h=!1,this._is_v=!1)},s.prototype._lineTo=function(w,v,A){var z,C;if(3!==this.type){if(A){if(w=(w-(this.xmin+this.margin))*this.finalRatio,v=(v-(this.ymin+this.margin))*this.finalRatio,this.line.length>0&&(z=this.line[this.line.length-1],z.x===w&&z.y===v)){return}this.line.push(new r(w,v))}else{this.line&&this.line.length>0&&this._push_line()}}else{if(A||(wthis.xmax&&(w=this.xmax),vthis.ymax&&(v=this.ymax)),w=(w-(this.xmin+this.margin))*this.finalRatio,v=(v-(this.ymin+this.margin))*this.finalRatio,this.line&&this.line.length>0){z=this.line[this.line.length-1];var B=z.x===w,u=z.y===v;if(B&&u){return}this._is_h&&B?(z.x=w,z.y=v,C=this.line[this.line.length-2],this._is_h=C.x===w,this._is_v=C.y===v):this._is_v&&u?(z.x=w,z.y=v,C=this.line[this.line.length-2],this._is_h=C.x===w,this._is_v=C.y===v):(this.line.push(new r(w,v)),this._is_h=B,this._is_v=u)}else{this.line.push(new r(w,v))}}}},{"point-geometry":137}],147:[function(q,r,o){function p(B,z,A,w,C){this.properties={},this.extent=A,this.type=0,this._pbf=B,this._geometry=-1,this._keys=w,this._values=C,B.readFields(v,this,z)}function v(A,w,z){1==A?w._id=z.readVarint():2==A?t(z,w):3==A?w.type=z.readVarint():4==A&&(w._geometry=z.pos)}function t(B,z){for(var A=B.readVarint()+B.pos;B.pos4096;){w+=1,D>>=1}var A=this._pbf;A.pos=this._geometry;var G,B=A.readVarint()+A.pos,J=1,z=0,E=0,H=0;for(F=[];A.pos>3}if(z--,1===J||2===J){E+=A.readSVarint(),H+=A.readSVarint(),1===J&&(G&&F.push(G),G=[]),G.push(new s(E>>w,H>>w))}else{if(7!==J){throw new Error("unknown command "+J)}G&&G.push(G[0].clone())}}G&&F.push(G)}return F},p.prototype.bbox=function(){var E=this._pbf;E.pos=this._geometry;for(var H=E.readVarint()+E.pos,w=1,C=0,A=0,F=0,B=1/0,I=-(1/0),z=1/0,D=-(1/0);E.pos>3}if(C--,1===w||2===w){A+=E.readSVarint(),F+=E.readSVarint(),B>A&&(B=A),A>I&&(I=A),z>F&&(z=F),F>D&&(D=F)}else{if(7!==w){throw new Error("unknown command "+w)}}}return[B,z,I,D]},p.prototype.toGeoJSON=function(F,J,w){for(var D=this.extent*Math.pow(2,w),A=this.extent*F,H=this.extent*J,B=this.loadGeometry(),K=p.types[this.type],z=0;z>3;w=1===v?A.readString():2===v?A.readFloat():3===v?A.readDouble():4===v?A.readVarint64():5===v?A.readVarint():6===v?A.readSVarint():7===v?A.readBoolean():null}return w}var p=q("./vectortilefeature.js");s.exports=t,t.prototype.feature=function(w){if(0>w||w>=this._features.length){throw new Error("feature index out of bounds")}this._pbf.pos=this._features[w];var v=this._pbf.readVarint()+this._pbf.pos;return new p(this._pbf,v,this.extent,this._keys,this._values)}},{"./vectortilefeature.js":147}],149:[function(r,s,p){var u=arguments[3],q=arguments[4],o=arguments[5],t=JSON.stringify;s.exports=function(v){for(var D,H=Object.keys(o),z=0,w=H.length;w>z;z++){var F=H[z],B=o[F].exports;if(B===v||B["default"]===v){D=F;break}}if(!D){D=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var I={},z=0,w=H.length;w>z;z++){var F=H[z];I[F]=F}q[D]=[Function(["require","module","exports"],"("+v+")(self)"),I]}var G=Math.floor(Math.pow(16,8)*Math.random()).toString(16),C={};C[D]=D,q[G]=[Function(["require"],"var f = require("+t(D)+");(f.default ? f.default : f)(self);"),C];var E="("+u+")({"+Object.keys(q).map(function(J){return t(J)+":["+q[J][0]+","+t(q[J][1])+"]"}).join(",")+"},{},["+t(G)+"])",A=window.URL||window.webkitURL||window.mozURL||window.msURL;return new Worker(A.createObjectURL(new Blob([E],{type:"text/javascript"})))}},{}]},{},[24])(24)});L.MapboxGL=L.Layer.extend({options:{updateInterval:32},initialize:function(k){L.setOptions(this,k);if(k.accessToken){mapboxgl.accessToken=k.accessToken}else{throw new Error("You should provide a Mapbox GL access token as a token option.")}var l=function(r,s,q){var p,o,n,m;m=function(){p=false;if(o){n.apply(q,o);o=false}};n=function(){if(p){o=arguments}else{r.apply(q,arguments);setTimeout(m,s);p=true}};return n};this._throttledUpdate=l(L.Util.bind(this._update,this),this.options.updateInterval)},onAdd:function(k){if(!this._glContainer){this._initContainer()}k._panes.tilePane.appendChild(this._glContainer);this._initGL();this._offset=this._map.containerPointToLayerPoint([0,0]);if(k.options.zoomAnimation){L.DomEvent.on(k._proxy,L.DomUtil.TRANSITION_END,this._transitionEnd,this)}},onRemove:function(k){if(this._map.options.zoomAnimation){L.DomEvent.off(this._map._proxy,L.DomUtil.TRANSITION_END,this._transitionEnd,this)}k.getPanes().tilePane.removeChild(this._glContainer);this._glMap.remove();this._glMap=null},getEvents:function(){return{move:this._throttledUpdate,zoomanim:this._animateZoom,zoom:this._pinchZoom,zoomstart:this._zoomStart,zoomend:this._zoomEnd}},_initContainer:function(){var k=this._glContainer=L.DomUtil.create("div","leaflet-gl-layer");var l=this._map.getSize();k.style.width=l.x+"px";k.style.height=l.y+"px"},_initGL:function(){var k=this._map.getCenter();var l=L.extend({},this.options,{container:this._glContainer,interactive:false,center:[k.lng,k.lat],zoom:this._map.getZoom()-1,attributionControl:false});this._glMap=new mapboxgl.Map(l);this._glMap.transform.latRange=null;L.DomUtil.addClass(this._glMap._canvas.canvas,"leaflet-image-layer");L.DomUtil.addClass(this._glMap._canvas.canvas,"leaflet-zoom-animated")},_update:function(p){this._offset=this._map.containerPointToLayerPoint([0,0]);if(this._zooming){return}var m=this._map.getSize(),l=this._glContainer,q=this._glMap,n=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(l,n);var k=this._map.getCenter();var o=q.transform;o.center=mapboxgl.LngLat.convert([k.lng,k.lat]);o.zoom=this._map.getZoom()-1;if(q.transform.width!==m.x||q.transform.height!==m.y){l.style.width=m.x+"px";l.style.height=m.y+"px";q._resize()}else{q.update()}},_pinchZoom:function(k){this._glMap.jumpTo({zoom:this._map.getZoom()-1,center:this._map.getCenter()})},_animateZoom:function(k){var m=this._map.getZoomScale(k.zoom),l=this._map._latLngToNewLayerPoint(this._map.getBounds().getNorthWest(),k.zoom,k.center);L.DomUtil.setTransform(this._glMap._canvas.canvas,l.subtract(this._offset),m)},_zoomStart:function(k){this._zooming=true},_zoomEnd:function(){var l=this._map.getZoomScale(this._map.getZoom()),k=this._map._latLngToNewLayerPoint(this._map.getBounds().getNorthWest(),this._map.getZoom(),this._map.getCenter());L.DomUtil.setTransform(this._glMap._canvas.canvas,k.subtract(this._offset),l)},_transitionEnd:function(k){L.Util.requestAnimFrame(function(){var m=this._map.getZoom(),l=this._map.getCenter(),n=this._map.latLngToContainerPoint(this._map.getBounds().getNorthWest());L.DomUtil.setTransform(this._glMap._canvas.canvas,n,1);this._glMap.once("moveend",L.Util.bind(function(){this._zooming=false;this._zoomEnd()},this));this._glMap.jumpTo({center:l,zoom:m-1})},this)}});L.mapboxGL=function(k){return new L.MapboxGL(k)};function d(k,l){i.request(k,{},function(m,n){if(!m){i.request(n.sources.esri.url,{},function(o,p){if(!o){h(n,p,k);l._mapboxGL=j.mapboxGL({accessToken:"ezree",style:n});l._ready=true;l.fire("ready",{},true)}},l)}else{throw new Error("Unable to fetch vector tile style metadata")}},l)}function h(m,l,k){if(m.sources.esri.url&&m.sources.esri.url.indexOf("http")===-1){m.sources.esri.url=k.replace("/resources/styles/root.json","")}if(l.tiles&&l.tiles[0].charAt(0)!=="/"){l.tiles[0]="/"+l.tiles[0]}if(l.tileMap&&l.tileMap.charAt(0)!=="/"){l.tileMap="/"+l.tileMap}m.sources.esri={type:"vector",scheme:"xyz",tilejson:l.tilejson||"2.0.0",format:(l.tileInfo&&l.tileInfo.format)||"pbf",index:l.tileMap?m.sources.esri.url+l.tileMap:null,tiles:[m.sources.esri.url+l.tiles[0]],description:l.description,name:l.name};if(m.glyphs.indexOf("http")===-1){m.glyphs=k.replace("styles/root.json",m.glyphs.replace("../",""));m.sprite=k.replace("styles/root.json",m.sprite.replace("../",""))}}var a=j.Layer.extend({statics:{URLPREFIX:"https://www.arcgis.com/sharing/rest/content/items/",URLSUFFIX:"/resources/styles/root.json",STYLES:{DarkGray:"57436c01bc754dbb87dfb636b6484022",Gray:"1e47168d181248e491541ffd5a91c0de",Hybrid:"af6063d6906c4eb589dfe03819610660",Navigation:"e19e9330bf08490ca8353d76b5e2e658",Streets:"a60a37a27cc140ddad15f919cd5a69f2",StreetsNight:"92c551c9f07b4147846aae273e822714",StreetsRelief:"78c0a9ab4fbf4198a8b951848aab19d8",Topographic:"86d5ed4b6dc741de9dad5f0fbe09ae95",Spring:"763884983d3544c0a418a97992881fce",Newspaper:"4f4843d99c34436f82920932317893ae",MidCentury:"267f44f08a844c7abee2b62b00600540",ModernAntique:"996d9e7a3aac4514bb692ce7a990f1c1",BlackAndWhite:"3161443179244702a5e0449010013b54"}},initialize:function(l){l={key:l};if(typeof l.key==="string"&&a.STYLES[l.key]){var k=a.URLPREFIX+a.STYLES[l.key]+a.URLSUFFIX;d(k,this)}else{throw new Error('L.esri.Vector.Basemap: Invalid parameter. Use one of "DarkGray", "Gray", "Hybrid", "Navigation", "Streets", "StreetsNight", "StreetsRelief", "Topographic"')}},onAdd:function(k){this._map=k;i.Util.setEsriAttribution(k);if(k.attributionControl){i.Util._getAttributionData("https://static.arcgis.com/attribution/World_Street_Map",k);k.attributionControl.addAttribution('USGS, NOAA')}if(this._ready){this._asyncAdd()}else{this.once("ready",function(){this._asyncAdd()},this)}},onRemove:function(l){l.off("moveend",i.Util._updateMapAttribution);l.removeLayer(this._mapboxGL);if(l.attributionControl){var k=document.getElementsByClassName("esri-dynamic-attribution")[0].outerHTML;l.attributionControl.removeAttribution(k)}},_asyncAdd:function(){var k=this._map;k.getContainer().style.background=this._mapboxGL.options.style.layers[0].paint["background-color"];k.on("moveend",i.Util._updateMapAttribution);this._mapboxGL.addTo(k,this)}});function f(k){return new a(k)}var b=j.Layer.extend({statics:{URLPREFIX:"https://www.arcgis.com/sharing/rest/content/items/"},initialize:function(l){l={id:l};if(typeof l.id==="string"){var m=b.URLPREFIX+l.id;var n;var k;i.request(m,{},function(o,p){if(!o){n=p.url;if(n.indexOf("basemaps.arcgis.com")===-1){this._customTileset=true;if(p.accessInformation){this._copyrightText=p.accessInformation}i.request(n,{},function(q,r){if(!q){if(r.defaultStyles.charAt(0)!=="/"){r.defaultStyles="/"+r.defaultStyles}k=n+r.defaultStyles+"/root.json";i.request(k,{},function(s,t){if(!s){h(t,r,k);this._mapboxGL=j.mapboxGL({accessToken:"ezree",style:t});this._ready=true;this.fire("ready",{},true)}},this)}},this)}else{d(m+"/resources/styles/root.json",this)}}},this)}else{throw new Error("L.esri.Vector.Layer: Invalid parameter. Use the id of an ArcGIS Online vector tile item")}},onAdd:function(k){this._map=k;i.Util.setEsriAttribution(k);if(this._ready){this._asyncAdd()}else{this.once("ready",function(){this._asyncAdd()},this)}},onRemove:function(l){l.off("moveend",i.Util._updateMapAttribution);l.removeLayer(this._mapboxGL);if(l.attributionControl){var k=document.getElementsByClassName("esri-dynamic-attribution")[0].outerHTML;l.attributionControl.removeAttribution(k)}},_asyncAdd:function(){var k=this._map;if(k.attributionControl){if(this._customTileset){if(this._copyrightText){k.attributionControl.addAttribution(''+this._copyrightText+"")}}else{i.Util._getAttributionData("https://static.arcgis.com/attribution/World_Street_Map",k);k.attributionControl.addAttribution('USGS, NOAA');k.on("moveend",i.Util._updateMapAttribution)}}k.getContainer().style.background=this._mapboxGL.options.style.layers[0].paint["background-color"];this._mapboxGL.addTo(k,this)}});function e(k){return new b(k)}c.VERSION=g;c.Basemap=a;c.basemap=f;c.Layer=b;c.layer=e})); \ No newline at end of file diff -r 829abfdd6d27 -r 37970a213463 src/pyams_gis/resources/js/leaflet-google-mutant.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_gis/resources/js/leaflet-google-mutant.min.js Thu Jul 12 17:40:07 2018 +0200 @@ -0,0 +1,1 @@ +L.GridLayer.GoogleMutant=L.GridLayer.extend({includes:L.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,continuousWorld:false,noWrap:false,type:"roadmap",maxNativeZoom:21},initialize:function(a){L.GridLayer.prototype.initialize.call(this,a);this._ready=!!window.google&&!!window.google.maps&&!!window.google.maps.Map;this._GAPIPromise=this._ready?Promise.resolve(window.google):new Promise(function(e,d){var b=0;var c=null;c=setInterval(function(){if(b>=10){clearInterval(c);return d(new Error("window.google not found after 10 attempts"))}if(!!window.google&&!!window.google.maps&&!!window.google.maps.Map){clearInterval(c);return e(window.google)}b++},500)});this._tileCallbacks={};this._freshTiles={};this._imagesPerTile=(this.options.type==="hybrid")?2:1},onAdd:function(a){L.GridLayer.prototype.onAdd.call(this,a);this._initMutantContainer();this._GAPIPromise.then(function(){this._ready=true;this._map=a;this._initMutant();a.on("viewreset",this._reset,this);a.on("move",this._update,this);a.on("zoomend",this._handleZoomAnim,this);a.on("resize",this._resize,this);google.maps.event.addListenerOnce(this._mutant,"idle",function(){this._checkZoomLevels();this._mutantIsReady=true}.bind(this));a._controlCorners.bottomright.style.marginBottom="20px";a._controlCorners.bottomleft.style.marginBottom="20px";this._reset();this._update();if(this._subLayers){for(var b in this._subLayers){this._subLayers[b].setMap(this._mutant)}}}.bind(this))},onRemove:function(a){L.GridLayer.prototype.onRemove.call(this,a);a._container.removeChild(this._mutantContainer);this._mutantContainer=undefined;a.off("viewreset",this._reset,this);a.off("move",this._update,this);a.off("zoomend",this._handleZoomAnim,this);a.off("resize",this._resize,this);a._controlCorners.bottomright.style.marginBottom="0em";a._controlCorners.bottomleft.style.marginBottom="0em"},getAttribution:function(){return this.options.attribution},setOpacity:function(a){this.options.opacity=a;if(a<1){L.DomUtil.setOpacity(this._mutantContainer,a)}},setElementSize:function(b,a){b.style.width=a.x+"px";b.style.height=a.y+"px"},addGoogleLayer:function(b,a){if(!this._subLayers){this._subLayers={}}return this._GAPIPromise.then(function(){var d=google.maps[b];var c=new d(a);c.setMap(this._mutant);this._subLayers[b]=c;return c}.bind(this))},removeGoogleLayer:function(a){var b=this._subLayers&&this._subLayers[a];if(!b){return}b.setMap(null);delete this._subLayers[a]},_initMutantContainer:function(){if(!this._mutantContainer){this._mutantContainer=L.DomUtil.create("div","leaflet-google-mutant leaflet-top leaflet-left");this._mutantContainer.id="_MutantContainer_"+L.Util.stamp(this._mutantContainer);this._mutantContainer.style.zIndex="800";this._mutantContainer.style.pointerEvents="none";this._map.getContainer().appendChild(this._mutantContainer)}this.setOpacity(this.options.opacity);this.setElementSize(this._mutantContainer,this._map.getSize());this._attachObserver(this._mutantContainer)},_initMutant:function(){if(!this._ready||!this._mutantContainer){return}this._mutantCenter=new google.maps.LatLng(0,0);var a=new google.maps.Map(this._mutantContainer,{center:this._mutantCenter,zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:true,keyboardShortcuts:false,draggable:false,disableDoubleClickZoom:true,scrollwheel:false,streetViewControl:false,styles:this.options.styles||{},backgroundColor:"transparent"});this._mutant=a;google.maps.event.addListenerOnce(a,"idle",function(){var b=this._mutantContainer.querySelectorAll("a");for(var c=0;c1){j.style.zIndex=1;f=1}}else{e=j.src.match(this._satRegexp);if(e){h={x:e[1],y:e[2],z:e[3]}}f=0}if(h){var d=this._tileCoordsToKey(h);j.style.position="absolute";var b=j.cloneNode(true);b.style.visibility="visible";j.style.visibility="hidden";var i=d+"/"+f;if(i in this._tileCallbacks&&this._tileCallbacks[i]){this._tileCallbacks[i].shift()(b);if(!this._tileCallbacks[i].length){delete this._tileCallbacks[i]}}else{if(this._tiles[d]){var g=this._tiles[d].el;var a=(f===0)?g.firstChild:g.firstChild.nextSibling;g.replaceChild(b,a)}else{if(i in this._freshTiles){this._freshTiles[i].push(b)}else{this._freshTiles[i]=[b]}}}}else{if(j.src.match(this._staticRegExp)){j.style.visibility="hidden"}}},createTile:function(f,a){var c=this._tileCoordsToKey(f);var e=L.DomUtil.create("div");e.dataset.pending=this._imagesPerTile;a=a.bind(this,null,e);for(var b=0;bthis.options.maxNativeZoom)){this._setMaxNativeZoom(a)}},_setMaxNativeZoom:function(a){if(a!=this.options.maxNativeZoom){this.options.maxNativeZoom=a;this._resetView()}},_reset:function(){this._initContainer()},_update:function(){if(this._mutant){var a=this._map.getCenter();var c=new google.maps.LatLng(a.lat,a.lng);this._mutant.setCenter(c);var e=this._map.getZoom();var b=e!==Math.round(e);var d=this._mutant.getZoom();if(!b&&(e!=d)){this._mutant.setZoom(e);if(this._mutantIsReady){this._checkZoomLevels()}}}L.GridLayer.prototype._update.call(this)},_resize:function(){var a=this._map.getSize();if(this._mutantContainer.style.width===a.x&&this._mutantContainer.style.height===a.y){return}this.setElementSize(this._mutantContainer,a);if(!this._mutant){return}google.maps.event.trigger(this._mutant,"resize")},_handleZoomAnim:function(){if(!this._mutant){return}var a=this._map.getCenter();var b=new google.maps.LatLng(a.lat,a.lng);this._mutant.setCenter(b);this._mutant.setZoom(Math.round(this._map.getZoom()))},_removeTile:function(g){if(!this._mutant){return}for(var c=0;c