--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_gis/resources/js/leaflet-esri-vector-1.0.6.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.Vector=b.L.esri.Vector||{}),b.L,b.L.esri))}(this,function(c,j,i){j="default" in j?j["default"]:j;var g="1.0.6";(function(l){if(typeof c==="object"&&typeof module!=="undefined"){module.exports=l()}else{if(typeof define==="function"&&define.amd){define([],l)}else{var k;if(typeof window!=="undefined"){k=window}else{if(typeof global!=="undefined"){k=global}else{if(typeof self!=="undefined"){k=self}else{k=this}}}k.mapboxgl=l()}}})(function(){var n,l,k;return(function m(q,z,v){function u(B,t){if(!z[B]){if(!q[B]){var s=typeof require=="function"&&require;if(!t&&s){return s(B,!0)}if(p){return p(B,!0)}var A=new Error("Cannot find module '"+B+"'");throw A.code="MODULE_NOT_FOUND",A}var r=z[B]={exports:{}};q[B][0].call(r.exports,function(o){var C=q[B][1][o];return u(C?C:o)},r,r.exports,m,q,z,v)}return z[B].exports}var p=typeof require=="function"&&require;for(var w=0;w<v.length;w++){u(v[w])}return u})({1:[function(p,q,o){function r(s){s?(this.array=s.array,this.pos=s.pos):(this.array=new ArrayBuffer(this.defaultLength),this.length=this.defaultLength,this.setupViews())}q.exports=r,r.prototype={pos:0,itemSize:4,defaultLength:8192,arrayType:"ARRAY_BUFFER",get indexfunction(){return this.pos/this.itemSize},setupViews:function(){this.ubytes=new Uint8Array(this.array),this.bytes=new Int8Array(this.array),this.ushorts=new Uint16Array(this.array),this.shorts=new Int16Array(this.array)},bind:function(s){var u=s[this.arrayType];this.buffer?s.bindBuffer(u,this.buffer):(this.buffer=s.createBuffer(),s.bindBuffer(u,this.buffer),s.bufferData(u,this.array.slice(0,this.pos),s.STATIC_DRAW),this.array=null)},destroy:function(s){this.buffer&&s.deleteBuffer(this.buffer)},resize:function(){if(this.length<this.pos+this.itemSize){for(;this.length<this.pos+this.itemSize;){this.length=2*Math.round(1.5*this.length/2)}this.array=new ArrayBuffer(this.length);var s=new Uint8Array(this.array);s.set(this.ubytes),this.setupViews()}}}},{}],2:[function(t,s,v){var o=t("./line_vertex_buffer"),z=t("./line_element_buffer"),p=t("./fill_vertex_buffer"),q=t("./triangle_element_buffer"),E=t("./outline_element_buffer"),r=t("./glyph_vertex_buffer"),w=t("./triangle_element_buffer"),u=t("./icon_vertex_buffer"),A=t("./triangle_element_buffer"),D=t("./collision_box_vertex_buffer"),C=t("./circle_vertex_buffer"),B=t("./triangle_element_buffer");s.exports=function(F){return F=F||{},{glyphVertex:new r(F.glyphVertex),glyphElement:new w(F.glyphElement),iconVertex:new u(F.iconVertex),iconElement:new A(F.iconElement),circleVertex:new C(F.circleVertex),circleElement:new B(F.circleElement),fillVertex:new p(F.fillVertex),fillElement:new q(F.fillElement),outlineElement:new E(F.outlineElement),lineVertex:new o(F.lineVertex),lineElement:new z(F.lineElement),collisionBoxVertex:new D(F.collisionBoxVertex)}}},{"./circle_vertex_buffer":3,"./collision_box_vertex_buffer":4,"./fill_vertex_buffer":5,"./glyph_vertex_buffer":6,"./icon_vertex_buffer":7,"./line_element_buffer":8,"./line_vertex_buffer":9,"./outline_element_buffer":10,"./triangle_element_buffer":11}],3:[function(q,r,p){function s(u){t.call(this,u)}var o=q("../../util/util"),t=q("./buffer");r.exports=s,s.prototype=o.inherit(t,{defaultLength:32768,itemSize:4,add:function(B,v,u,z){var A=this.pos,w=A/2;this.resize(),this.shorts[w+0]=2*B+(u+1)/2,this.shorts[w+1]=2*v+(z+1)/2,this.pos+=this.itemSize},bind:function(w,v,u){t.prototype.bind.call(this,w),w.vertexAttribPointer(v.a_pos,2,w.SHORT,!1,this.itemSize,u+0)}})},{"../../util/util":106,"./buffer":1}],4:[function(q,r,p){function t(u){s.call(this,u)}var o=q("../../util/util"),s=q("./buffer");r.exports=t,t.prototype=o.inherit(s,{itemSize:12,defaultLength:32768,add:function(z,w,C,B){var A=this.pos,D=A/2,v=this.index;return this.resize(),this.shorts[D+0]=z.x,this.shorts[D+1]=z.y,this.shorts[D+2]=Math.round(w.x),this.shorts[D+3]=Math.round(w.y),this.ubytes[A+8]=Math.floor(10*C),this.ubytes[A+9]=Math.floor(10*B),this.pos+=this.itemSize,v}})},{"../../util/util":106,"./buffer":1}],5:[function(q,r,p){function t(u){s.call(this,u)}var o=q("../../util/util"),s=q("./buffer");r.exports=t,t.prototype=o.inherit(s,{itemSize:4,add:function(w,v){var u=this.pos/2;this.resize(),this.shorts[u+0]=w,this.shorts[u+1]=v,this.pos+=this.itemSize}})},{"../../util/util":106,"./buffer":1}],6:[function(q,r,p){function t(u){s.call(this,u)}var o=q("../../util/util"),s=q("./buffer");r.exports=t,t.prototype=o.inherit(s,{defaultLength:32768,itemSize:16,add:function(G,D,v,A,H,B,w,C,F){var E=this.pos,z=E/2;this.resize(),this.shorts[z+0]=G,this.shorts[z+1]=D,this.shorts[z+2]=Math.round(64*v),this.shorts[z+3]=Math.round(64*A),this.ubytes[E+8]=Math.floor(H/4),this.ubytes[E+9]=Math.floor(B/4),this.ubytes[E+10]=Math.floor(10*F),this.ubytes[E+12]=Math.floor(10*w),this.ubytes[E+13]=Math.floor(10*Math.min(C,25)),this.pos+=this.itemSize},bind:function(v,z,w){s.prototype.bind.call(this,v);var u=this.itemSize;v.vertexAttribPointer(z.a_pos,2,v.SHORT,!1,u,w+0),v.vertexAttribPointer(z.a_offset,2,v.SHORT,!1,u,w+4),v.vertexAttribPointer(z.a_data1,4,v.UNSIGNED_BYTE,!1,u,w+8),v.vertexAttribPointer(z.a_data2,2,v.UNSIGNED_BYTE,!1,u,w+12)}})},{"../../util/util":106,"./buffer":1}],7:[function(q,r,p){function s(u){t.call(this,u)}var o=q("../../util/util"),t=q("./buffer");r.exports=s,s.prototype=o.inherit(t,{defaultLength:32768,itemSize:16,add:function(G,D,A,v,H,w,B,F,C){var E=this.pos,z=E/2;this.resize(),this.shorts[z+0]=G,this.shorts[z+1]=D,this.shorts[z+2]=Math.round(64*A),this.shorts[z+3]=Math.round(64*v),this.ubytes[E+8]=H/4,this.ubytes[E+9]=w/4,this.ubytes[E+10]=Math.floor(10*(C||0)),this.ubytes[E+12]=Math.floor(10*(B||0)),this.ubytes[E+13]=Math.floor(10*Math.min(F||25,25)),this.pos+=this.itemSize},bind:function(v,z,u){t.prototype.bind.call(this,v);var w=this.itemSize;v.vertexAttribPointer(z.a_pos,2,v.SHORT,!1,w,u+0),v.vertexAttribPointer(z.a_offset,2,v.SHORT,!1,w,u+4),v.vertexAttribPointer(z.a_data1,4,v.UNSIGNED_BYTE,!1,w,u+8),v.vertexAttribPointer(z.a_data2,2,v.UNSIGNED_BYTE,!1,w,u+12)}})},{"../../util/util":106,"./buffer":1}],8:[function(q,r,p){function s(u){t.call(this,u)}var o=q("../../util/util"),t=q("./buffer");r.exports=s,s.prototype=o.inherit(t,{itemSize:6,arrayType:"ELEMENT_ARRAY_BUFFER",add:function(z,v,u){var w=this.pos/2;this.resize(),this.ushorts[w+0]=z,this.ushorts[w+1]=v,this.ushorts[w+2]=u,this.pos+=this.itemSize}})},{"../../util/util":106,"./buffer":1}],9:[function(q,r,p){function t(u){s.call(this,u)}var o=q("../../util/util"),s=q("./buffer");r.exports=t,t.extrudeScale=63,t.prototype=o.inherit(s,{itemSize:8,defaultLength:32768,add:function(C,E,v,z,F){var D=this.pos,B=D/2,A=this.index,w=t.extrudeScale;return this.resize(),this.shorts[B+0]=2*Math.floor(C.x)|v,this.shorts[B+1]=2*Math.floor(C.y)|z,this.bytes[D+4]=Math.round(w*E.x),this.bytes[D+5]=Math.round(w*E.y),this.bytes[D+6]=(F||0)/128,this.bytes[D+7]=(F||0)%128,this.pos+=this.itemSize,A}})},{"../../util/util":106,"./buffer":1}],10:[function(q,r,p){function s(u){t.call(this,u)}var o=q("../../util/util"),t=q("./buffer");r.exports=s,s.prototype=o.inherit(t,{itemSize:4,arrayType:"ELEMENT_ARRAY_BUFFER",add:function(w,v){var u=this.pos/2;this.resize(),this.ushorts[u+0]=w,this.ushorts[u+1]=v,this.pos+=this.itemSize}})},{"../../util/util":106,"./buffer":1}],11:[function(r,s,q){function p(u){t.call(this,u)}var o=r("../../util/util"),t=r("./buffer");s.exports=p,p.prototype=o.inherit(t,{itemSize:6,arrayType:"ELEMENT_ARRAY_BUFFER",add:function(z,v,u){var w=this.pos/2;this.resize(),this.ushorts[w+0]=z,this.ushorts[w+1]=v,this.ushorts[w+2]=u,this.pos+=this.itemSize}})},{"../../util/util":106,"./buffer":1}],12:[function(q,r,p){function o(t){this.buffers=t,this.elementGroups=new s(t.circleVertex,t.circleElement)}var s=q("./element_groups");r.exports=o,o.prototype.addFeatures=function(){for(var D=4096,C=0;C<this.features.length;C++){for(var A=this.features[C].loadGeometry()[0],B=0;B<A.length;B++){this.elementGroups.makeRoomFor(6);var w=A[B].x,z=A[B].y;if(!(0>w||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<R.length;K++){for(var I=R[K],J=0,N=I.length-1;J<I.length;N=J++){var S=I[J],P=I[N],Q=new E(S.y,S.x),M=new E(P.y,P.x);if(v(S,P,O[0],O[2],O[1])||v(S,P,O[0],O[2],O[3])||v(Q,M,O[1],O[3],O[0])||v(Q,M,O[1],O[3],O[2])){return !0}}}return p(R,O)}function v(J,N,P,M,O){if(N.y===J.y){return N.y===O&&Math.min(J.x,N.x)<=M&&Math.max(J.x,N.x)>=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<I.length;N++){for(var J=I[N],M=0;M<J.length;M++){if(J[M].x>=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;J<Q.length;J++){for(var M=Q[J],R=1;R<M.length;R++){var O=M[R-1],P=M[R];if(H(N,O,P)<I){return !0}}}return !1}function r(Q,N){for(var K,I,J,M=!1,R=0;R<Q.length;R++){K=Q[R];for(var O=0,P=K.length-1;O<K.length;P=O++){I=K[O],J=K[P],I.y>N.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<J.length;O++){for(var I=J[O],K=0;K<I.length;K++){if(I[K].distSqr(N)<=M){return !0}}}return !1}var w=u("rbush"),E=u("point-geometry"),z=u("vector-tile"),o=u("../util/util");q.exports=s,s.prototype.insert=function(I,J,K){I.layers=J,I.feature=K,this.toBeInserted.push(I)},s.prototype._load=function(){this.rtree.load(this.toBeInserted),this.toBeInserted=[]},s.prototype.query=function(X,R){this.toBeInserted.length&&this._load();var K,I,J=X.params||{},N=X.x,Y=X.y,V=[];"undefined"!=typeof N&&"undefined"!=typeof Y?(K=(J.radius||0)*(X.tileExtent||4096)/X.scale,I=[N-K,Y-K,N+K,Y+K]):I=[X.minX,X.minY,X.maxX,X.maxY];for(var W=this.rtree.search(I),M=0;M<W.length;M++){var T=W[M].feature,U=W[M].layers,Q=z.VectorTileFeature.types[T.type];if((!J.$type||Q===J.$type)&&(!K||t(T.loadGeometry(),Q,new E(N,Y),K))&&C(T.loadGeometry(),Q,I)){var O=T.toGeoJSON(this.x,this.y,this.z);J.includeGeometry||(O.geometry=null);for(var S=0;S<U.length;S++){var P=U[S];J.layerIds&&J.layerIds.indexOf(P)<0||V.push(o.extend({layer:P},O))}}}R(null,V)}},{"../util/util":106,"point-geometry":137,rbush:139,"vector-tile":144}],16:[function(p,q,o){function r(t){this.buffers=t,this.elementGroups=new s(t.fillVertex,t.fillElement,t.outlineElement)}var s=p("./element_groups");q.exports=r,r.prototype.addFeatures=function(){for(var z=this.features,v=0;v<z.length;v++){var u=z[v],w=u.loadGeometry();w&&this.addFeature(w)}},r.prototype.addFeature=function(v){for(var u=0;u<v.length;u++){this.addFill(v[u])}},r.prototype.addFill=function(C){if(!(C.length<3)){var G=C.length;this.elementGroups.makeRoomFor(G+1);for(var A,v,z,B=this.elementGroups.current,w=this.buffers.fillVertex,F=this.buffers.fillElement,H=this.buffers.outlineElement,D=w.index-B.vertexStartIndex,E=0;E<C.length;E++){v=w.index-B.vertexStartIndex,z=C[E],w.add(z.x,z.y),B.vertexLength++,E>=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;v<z.length;v++){var w=z[v],u=w.loadGeometry();u&&this.addFeature(u)}},o.prototype.addFeature=function(w){for(var u=this.layoutProperties,v=0;v<w.length;v++){this.addLine(w[v],u["line-join"],u["line-cap"],u["line-miter-limit"],u["line-round-limit"])}},o.prototype.addLine=function(am,W,Z,ai,X){for(var ae=am.length;ae>2&&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;N<U.length;N++){T.push(U[N].loadGeometry())}if("line"===Q["symbol-placement"]){var M=C(U,Y,T);T=M.geometries,U=M.features,Y=M.textFeatures}for(var ad,aa,ab=0;ab<U.length;ab++){if(T[ab]){if(ad=Y[ab]?z(Y[ab],this.stacks[W],ae,S,R,V,ag,Z,P):null,Q["icon-image"]){var af=I(U[ab].properties,Q["icon-image"]),O=this.icons[af];aa=D(O,Q),O&&(void 0===this.sdfIcons?this.sdfIcons=O.sdf:this.sdfIcons!==O.sdf&&console.warn("Style sheet warning: Cannot mix SDF and non-SDF icons in one bucket"))}else{aa=null}(ad||aa)&&this.addFeature(T[ab],ad,aa)}}this.placeFeatures(ac,this.buffers,this.collisionDebug)},E.prototype.addFeature=function(al,Y,ac){var ah=this.layoutProperties,Z=24,ad=ah["text-size"]/Z,ap=this.tilePixelRatio*ad,af=this.tilePixelRatio*ah["text-max-size"]/Z,aa=this.tilePixelRatio*ah["icon-size"],an=this.tilePixelRatio*ah["symbol-spacing"],ai=ah["symbol-avoid-edges"],X=ah["text-padding"]*this.tilePixelRatio,ae=ah["icon-padding"]*this.tilePixelRatio,ab=ah["text-max-angle"]/180*Math.PI,U="map"===ah["text-rotation-alignment"]&&"line"===ah["symbol-placement"],R="map"===ah["icon-rotation-alignment"]&&"line"===ah["symbol-placement"],am=ah["text-allow-overlap"]||ah["icon-allow-overlap"]||ah["text-ignore-placement"]||ah["icon-ignore-placement"],aj="line"===ah["symbol-placement"],ak=an/2;aj&&(al=r(al,0,0,4096,4096));for(var ao=0;ao<al.length;ao++){for(var V=al[ao],T=aj?v(V,an,ab,Y,ac,Z,af,this.overscaling):[new G(V[0].x,V[0].y,0)],N=0,W=T.length;W>N;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])<N){return !0}}}else{M[P]=[]}return M[P].push(Q),!1},E.prototype.placeFeatures=function(ab,P,T){this.buffers=P;var X=this.elementGroups={text:new t(P.glyphVertex,P.glyphElement),icon:new t(P.iconVertex,P.iconElement),sdfIcons:this.sdfIcons},Q=this.layoutProperties,U=ab.maxScale;X.text["text-size"]=Q["text-size"],X.icon["icon-size"]=Q["icon-size"];var af="map"===Q["text-rotation-alignment"]&&"line"===Q["symbol-placement"],W="map"===Q["icon-rotation-alignment"]&&"line"===Q["symbol-placement"],R=Q["text-allow-overlap"]||Q["icon-allow-overlap"]||Q["text-ignore-placement"]||Q["icon-ignore-placement"];if(R){var ad=ab.angle,Y=Math.sin(ad),O=Math.cos(ad);this.symbolInstances.sort(function(ai,ah){var aj=Y*ai.x+O*ai.y,ag=Y*ah.x+O*ah.y;return ag-aj})}for(var V=0;V<this.symbolInstances.length;V++){var S=this.symbolInstances[V],N=S.hasText,M=S.hasIcon,ac=Q["text-optional"]||!N,Z=Q["icon-optional"]||!M,aa=N&&!Q["text-allow-overlap"]?ab.placeCollisionFeature(S.textCollisionFeature):ab.minScale,ae=M&&!Q["icon-allow-overlap"]?ab.placeCollisionFeature(S.iconCollisionFeature):ab.minScale;ac||Z?!Z&&aa?aa=Math.max(ae,aa):!ac&&ae&&(ae=Math.max(ae,aa)):ae=aa=Math.max(ae,aa),N&&(Q["text-ignore-placement"]||ab.insertCollisionFeature(S.textCollisionFeature,aa),U>=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;T<ac.length;T++){var aa=ac[T],X=aa.angle,P=(X+ab+Math.PI)%(2*Math.PI);if(!(Z&&ak&&(P<=Math.PI/2||P>3*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;ac<this.symbolInstances.length;ac++){for(var P=0;2>P;P++){var Z=this.symbolInstances[ac][0===P?"textCollisionFeature":"iconCollisionFeature"];if(Z){for(var R=Z.boxes,M=0;M<R.length;M++){var W=R[M],T=W.anchorPoint,aa=new J(W.x1,W.y1*S)._rotate(O),Q=new J(W.x2,W.y1*S)._rotate(O),N=new J(W.x1,W.y2*S)._rotate(O),Y=new J(W.x2,W.y2*S)._rotate(O),X=Math.max(0,Math.min(25,this.zoom+Math.log(W.maxScale)/Math.LN2)),V=Math.max(0,Math.min(25,this.zoom+Math.log(W.placementScale)/Math.LN2));ab.add(T,aa,X,V),ab.add(T,Q,X,V),ab.add(T,Q,X,V),ab.add(T,Y,X,V),ab.add(T,Y,X,V),ab.add(T,N,X,V),ab.add(T,N,X,V),ab.add(T,aa,X,V),this.elementGroups.collisionBox.current.vertexLength+=8}}}}}},{"../symbol/anchor":62,"../symbol/clip_line":65,"../symbol/collision_feature":67,"../symbol/get_anchors":69,"../symbol/mergelines":72,"../symbol/quads":73,"../symbol/resolve_icons":74,"../symbol/resolve_text":75,"../symbol/shaping":76,"../util/token":105,"./element_groups":14,"point-geometry":137}],19:[function(p,q,o){function r(u,s,v){this.column=u,this.row=s,this.zoom=v}q.exports=r,r.prototype={clone:function(){return new r(this.column,this.row,this.zoom)},zoomTo:function(s){return this.clone()._zoomTo(s)},sub:function(s){return this.clone()._sub(s)},_zoomTo:function(u){var s=Math.pow(2,u-this.zoom);return this.column*=s,this.row*=s,this.zoom=u,this},_sub:function(s){return s=s.zoomTo(this.zoom),this.column-=s.column,this.row-=s.row,this}}},{}],20:[function(p,q,o){function s(u,v){if(isNaN(u)||isNaN(v)){throw new Error("Invalid LngLat object: ("+u+", "+v+")")}if(this.lng=+u,this.lat=+v,this.lat>90||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-O<P.y?P.y/(G-O):0),this.lngRange&&(D=this.lngX(this.lngRange[0]),C=this.lngX(this.lngRange[1]),M=C-D<P.x?P.x/(C-D):0);var K=Math.max(M||0,J||0);if(K){return this.center=this.unproject(new v(M?(C+D)/2:this.x,J?(G+O)/2:this.y)),this.zoom+=this.scaleZoom(K),void (this._constraining=!1)}if(this.latRange){var N=this.y,F=P.y/2;O>N-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;w<K.groups.length;w++){var D=K.groups[w],F=D.vertexStartIndex*G.itemSize;G.bind(A,z,F),M.bind(A,z,F);var B=3*D.elementLength,H=D.elementStartIndex*M.itemSize;A.drawElements(A.TRIANGLES,B,A.UNSIGNED_SHORT,H)}A.enable(A.STENCIL_TEST)}}}var q=r("../util/browser.js");s.exports=o},{"../util/browser.js":95}],27:[function(p,q,o){function r(v,C,w,G){var E=G.elementGroups[C.ref||C.id].collisionBox;if(E){var B=v.gl,z=G.buffers.collisionBoxVertex,H=v.collisionBoxShader;B.enable(B.STENCIL_TEST),B.switchShader(H,w),z.bind(B,H),B.lineWidth(1);var F=12;B.vertexAttribPointer(H.a_pos,2,B.SHORT,!1,F,0),B.vertexAttribPointer(H.a_extrude,2,B.SHORT,!1,F,4),B.vertexAttribPointer(H.a_data,2,B.UNSIGNED_BYTE,!1,F,8),B.uniform1f(H.u_scale,Math.pow(2,v.transform.zoom-G.coord.z)),B.uniform1f(H.u_zoom,10*v.transform.zoom),B.uniform1f(H.u_maxzoom,10*(G.coord.z+1));var D=E.groups[0].vertexStartIndex,A=E.groups[0].vertexLength;B.drawArrays(B.LINES,D,A),B.disable(B.STENCIL_TEST)}}q.exports=r},{}],28:[function(r,s,p){function o(z,w){var v=z.gl;v.blendFunc(v.ONE,v.ONE_MINUS_SRC_ALPHA),v.switchShader(z.debugShader,w.posMatrix),v.bindBuffer(v.ARRAY_BUFFER,z.debugBuffer),v.vertexAttribPointer(z.debugShader.a_pos,z.debugBuffer.itemSize,v.SHORT,!1,0,0),v.uniform4f(z.debugShader.u_color,1,0,0,1),v.lineWidth(4),v.drawArrays(v.LINE_STRIP,0,z.debugBuffer.itemCount);var u=t(w.coord.toString(),50,200,5);v.bindBuffer(v.ARRAY_BUFFER,z.debugTextBuffer),v.bufferData(v.ARRAY_BUFFER,new Int16Array(u),v.STREAM_DRAW),v.vertexAttribPointer(z.debugShader.a_pos,z.debugTextBuffer.itemSize,v.SHORT,!1,0,0),v.lineWidth(8*q.devicePixelRatio),v.uniform4f(z.debugShader.u_color,1,1,1,1),v.drawArrays(v.LINES,0,u.length/z.debugTextBuffer.itemSize),v.lineWidth(2*q.devicePixelRatio),v.uniform4f(z.debugShader.u_color,0,0,0,1),v.drawArrays(v.LINES,0,u.length/z.debugTextBuffer.itemSize),v.blendFunc(v.ONE_MINUS_DST_ALPHA,v.ONE)}var t=r("../lib/debugtext"),q=r("../util/browser");s.exports=o},{"../lib/debugtext":23,"../util/browser":95}],29:[function(q,s,o){function t(W,G,I,Q){if(Q.buffers){var aa=Q.elementGroups[G.ref||G.id];if(aa){var P,N,M,V,H=W.gl,D=W.translateMatrix(I,Q,G.paint["fill-translate"],G.paint["fill-translate-anchor"]),Y=G.paint["fill-color"];H.stencilMask(63),H.clear(H.STENCIL_BUFFER_BIT),H.stencilFunc(H.NOTEQUAL,128,128),H.stencilOpSeparate(H.FRONT,H.INCR_WRAP,H.KEEP,H.KEEP),H.stencilOpSeparate(H.BACK,H.DECR_WRAP,H.KEEP,H.KEEP),H.colorMask(!1,!1,!1,!1),H.switchShader(W.fillShader,D),P=Q.buffers.fillVertex,P.bind(H),N=Q.buffers.fillElement,N.bind(H);for(var O,w,F=0;F<aa.groups.length;F++){M=aa.groups[F],O=M.vertexStartIndex*P.itemSize,H.vertexAttribPointer(W.fillShader.a_pos,2,H.SHORT,!1,4,O+0),V=3*M.elementLength,w=M.elementStartIndex*N.itemSize,H.drawElements(H.TRIANGLES,V,H.UNSIGNED_SHORT,w)}H.colorMask(!0,!0,!0,!0),H.stencilOp(H.KEEP,H.KEEP,H.KEEP),H.stencilMask(0);var X=G.paint["fill-outline-color"];if(G.paint["fill-antialias"]===!0&&(!G.paint["fill-pattern"]||X)){H.switchShader(W.outlineShader,D),H.lineWidth(2*p.devicePixelRatio),X?H.stencilFunc(H.EQUAL,128,128):H.stencilFunc(H.EQUAL,128,191),H.uniform2f(W.outlineShader.u_world,H.drawingBufferWidth,H.drawingBufferHeight),H.uniform4fv(W.outlineShader.u_color,X?X:Y),P=Q.buffers.fillVertex,N=Q.buffers.outlineElement,N.bind(H);for(var K=0;K<aa.groups.length;K++){M=aa.groups[K],O=M.vertexStartIndex*P.itemSize,H.vertexAttribPointer(W.outlineShader.a_pos,2,H.SHORT,!1,4,O+0),V=2*M.secondElementLength,w=M.secondElementStartIndex*N.itemSize,H.drawElements(H.LINES,V,H.UNSIGNED_SHORT,w)}}var ab,T=G.paint["fill-pattern"],C=G.paint["fill-opacity"]||1;if(T){var B=W.spriteAtlas.getPosition(T.from,!0),Z=W.spriteAtlas.getPosition(T.to,!0);if(!B||!Z){return}ab=W.patternShader,H.switchShader(ab,I),H.uniform1i(ab.u_image,0),H.uniform2fv(ab.u_pattern_tl_a,B.tl),H.uniform2fv(ab.u_pattern_br_a,B.br),H.uniform2fv(ab.u_pattern_tl_b,Z.tl),H.uniform2fv(ab.u_pattern_br_b,Z.br),H.uniform1f(ab.u_opacity,C),H.uniform1f(ab.u_mix,T.t);var J=Q.tileExtent/Q.tileSize/Math.pow(2,W.transform.tileZoom-Q.coord.z),z=r.create();r.scale(z,z,[1/(B.size[0]*J*T.fromScale),1/(B.size[1]*J*T.fromScale)]);var U=r.create();r.scale(U,U,[1/(Z.size[0]*J*T.toScale),1/(Z.size[1]*J*T.toScale)]),H.uniformMatrix3fv(ab.u_patternmatrix_a,!1,z),H.uniformMatrix3fv(ab.u_patternmatrix_b,!1,U),W.spriteAtlas.bind(H,!0)}else{ab=W.fillShader,H.switchShader(ab,I),H.uniform4fv(ab.u_color,Y)}H.stencilFunc(H.NOTEQUAL,0,63),H.bindBuffer(H.ARRAY_BUFFER,W.tileExtentBuffer),H.vertexAttribPointer(ab.a_pos,W.tileExtentBuffer.itemSize,H.SHORT,!1,0,0),H.drawArrays(H.TRIANGLE_STRIP,0,W.tileExtentBuffer.itemCount),H.stencilMask(0),H.stencilFunc(H.EQUAL,128,128)}}}var p=q("../util/browser"),r=q("gl-matrix").mat3;s.exports=t},{"../util/browser":95,"gl-matrix":116}],30:[function(q,r,o){var p=q("../util/browser"),s=q("gl-matrix").mat2;r.exports=function(ao,ay,aC,aq){if(aq.buffers){var aG=aq.elementGroups[ay.ref||ay.id];if(aG){var av=ao.gl;if(!(ay.paint["line-width"]<=0)){var au=1/p.devicePixelRatio,aB=ay.paint["line-blur"]+au,ax=ay.paint["line-width"]/2,an=-1,aw=0,ap=0;ay.paint["line-gap-width"]>0&&(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<<aq.coord.z)/(aq.tileExtent/aq.tileSize),at=ao.translateMatrix(aC,aq,ay.paint["line-translate"],ay.paint["line-translate-anchor"]),am=ao.transform,aE=s.create();s.scale(aE,aE,[1,Math.cos(am._pitch)]),s.rotate(aE,aE,ao.transform.angle);var ak,aF=Math.sqrt(am.height*am.height/4*(1+am.altitude*am.altitude)),al=am.height/2*Math.tan(am._pitch),aA=(aF+al)/aF-1,K=aq.tileSize/ao.transform.tileSize,Z=ay.paint["line-dasharray"],ai=ay.paint["line-pattern"];if(Z){ak=ao.linesdfpatternShader,av.switchShader(ak,at,aq.exMatrix),av.uniform2fv(ak.u_linewidth,[aH,an]),av.uniform1f(ak.u_ratio,aD),av.uniform1f(ak.u_blur,aB),av.uniform4fv(ak.u_color,az);var ah=ao.lineAtlas.getDash(Z.from,"round"===ay.layout["line-cap"]),aj=ao.lineAtlas.getDash(Z.to,"round"===ay.layout["line-cap"]);ao.lineAtlas.bind(av);var ae=Math.pow(2,Math.floor(Math.log(ao.transform.scale)/Math.LN2)-aq.coord.z)/8*K,W=[ae/ah.width/Z.fromScale,-ah.height/2],Q=ao.lineAtlas.width/(Z.fromScale*ah.width*256*p.devicePixelRatio)/2,ab=[ae/aj.width/Z.toScale,-aj.height/2],Y=ao.lineAtlas.width/(Z.toScale*aj.width*256*p.devicePixelRatio)/2;av.uniform2fv(ak.u_patternscale_a,W),av.uniform1f(ak.u_tex_y_a,ah.y),av.uniform2fv(ak.u_patternscale_b,ab),av.uniform1f(ak.u_tex_y_b,aj.y),av.uniform1i(ak.u_image,0),av.uniform1f(ak.u_sdfgamma,Math.max(Q,Y)),av.uniform1f(ak.u_mix,Z.t),av.uniform1f(ak.u_extra,aA),av.uniformMatrix2fv(ak.u_antialiasingmatrix,!1,aE)}else{if(ai){var J=ao.spriteAtlas.getPosition(ai.from,!0),ar=ao.spriteAtlas.getPosition(ai.to,!0);if(!J||!ar){return}var af=aq.tileExtent/aq.tileSize/Math.pow(2,ao.transform.tileZoom-aq.coord.z)*K;ao.spriteAtlas.bind(av,!0),ak=ao.linepatternShader,av.switchShader(ak,at,aq.exMatrix),av.uniform2fv(ak.u_linewidth,[aH,an]),av.uniform1f(ak.u_ratio,aD),av.uniform1f(ak.u_blur,aB),av.uniform2fv(ak.u_pattern_size_a,[J.size[0]*af*ai.fromScale,ar.size[1]]),av.uniform2fv(ak.u_pattern_size_b,[ar.size[0]*af*ai.toScale,ar.size[1]]),av.uniform2fv(ak.u_pattern_tl_a,J.tl),av.uniform2fv(ak.u_pattern_br_a,J.br),av.uniform2fv(ak.u_pattern_tl_b,ar.tl),av.uniform2fv(ak.u_pattern_br_b,ar.br),av.uniform1f(ak.u_fade,ai.t),av.uniform1f(ak.u_opacity,ay.paint["line-opacity"]),av.uniform1f(ak.u_extra,aA),av.uniformMatrix2fv(ak.u_antialiasingmatrix,!1,aE)}else{ak=ao.lineShader,av.switchShader(ak,at,aq.exMatrix),av.uniform2fv(ak.u_linewidth,[aH,an]),av.uniform1f(ak.u_ratio,aD),av.uniform1f(ak.u_blur,aB),av.uniform1f(ak.u_extra,aA),av.uniformMatrix2fv(ak.u_antialiasingmatrix,!1,aE),av.uniform4fv(ak.u_color,az)}}var ad=aq.buffers.lineVertex;ad.bind(av);var aa=aq.buffers.lineElement;aa.bind(av);for(var ac=0;ac<aG.groups.length;ac++){var X=aG.groups[ac],ag=X.vertexStartIndex*ad.itemSize;av.vertexAttribPointer(ak.a_pos,2,av.SHORT,!1,8,ag+0),av.vertexAttribPointer(ak.a_data,4,av.BYTE,!1,8,ag+4);var F=3*X.elementLength,C=X.elementStartIndex*aa.itemSize;av.drawElements(av.TRIANGLES,F,av.UNSIGNED_SHORT,C)}}}}}},{"../util/browser":95,"gl-matrix":116}],31:[function(r,p,s){function q(H,z,D,F){var C=H.gl;C.disable(C.STENCIL_TEST);var A=H.rasterShader;C.switchShader(A,D),C.uniform1f(A.u_brightness_low,z.paint["raster-brightness-min"]),C.uniform1f(A.u_brightness_high,z.paint["raster-brightness-max"]),C.uniform1f(A.u_saturation_factor,o(z.paint["raster-saturation"])),C.uniform1f(A.u_contrast_factor,u(z.paint["raster-contrast"])),C.uniform3fv(A.u_spin_weights,w(z.paint["raster-hue-rotate"]));var B,G,I=F.source&&F.source._pyramid.findLoadedParent(F.coord,0,{}),E=v(F,I,z,H.transform);C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,F.texture),I?(C.activeTexture(C.TEXTURE1),C.bindTexture(C.TEXTURE_2D,I.texture),B=Math.pow(2,I.coord.z-F.coord.z),G=[F.coord.x*B%1,F.coord.y*B%1]):E[1]=0,C.uniform2fv(A.u_tl_parent,G||[0,0]),C.uniform1f(A.u_scale_parent,B||1),C.uniform1f(A.u_buffer_scale,1),C.uniform1f(A.u_opacity0,E[0]),C.uniform1f(A.u_opacity1,E[1]),C.uniform1i(A.u_image0,0),C.uniform1i(A.u_image1,1),C.bindBuffer(C.ARRAY_BUFFER,F.boundsBuffer||H.tileExtentBuffer),C.vertexAttribPointer(A.a_pos,2,C.SHORT,!1,8,0),C.vertexAttribPointer(A.a_texture_pos,2,C.SHORT,!1,8,4),C.drawArrays(C.TRIANGLE_STRIP,0,4),C.enable(C.STENCIL_TEST)}function w(z){z*=Math.PI/180;var A=Math.sin(z),B=Math.cos(z);return[(2*B+1)/3,(-Math.sqrt(3)*A-B+1)/3,(Math.sqrt(3)*A-B+1)/3]}function u(z){return z>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;V<aj.groups.length;V++){B=aj.groups[V],P=B.vertexStartIndex*au.itemSize,au.bind(am,F,P),J=3*B.elementLength,K=B.elementStartIndex*aa.itemSize,am.drawElements(am.TRIANGLES,J,am.UNSIGNED_SHORT,K)}if(ae.paint[an+"-halo-width"]){am.uniform1f(F.u_gamma,(ae.paint[an+"-halo-blur"]*O/ap/X+Q)*ad),am.uniform4fv(F.u_color,ae.paint[an+"-halo-color"]),am.uniform1f(F.u_buffer,(H-ae.paint[an+"-halo-width"]/ap)/X);for(var ah=0;ah<aj.groups.length;ah++){B=aj.groups[ah],P=B.vertexStartIndex*au.itemSize,au.bind(am,F,P),J=3*B.elementLength,K=B.elementStartIndex*aa.itemSize,am.drawElements(am.TRIANGLES,J,am.UNSIGNED_SHORT,K)}}}else{am.uniform1f(F.u_opacity,ae.paint["icon-opacity"]);for(var W=0;W<aj.groups.length;W++){B=aj.groups[W],P=B.vertexStartIndex*au.itemSize,au.bind(am,F,P),J=3*B.elementLength,K=B.elementStartIndex*aa.itemSize,am.drawElements(am.TRIANGLES,J,am.UNSIGNED_SHORT,K)}}}}var t=q("../util/browser"),o=q("gl-matrix").mat4,s=q("./draw_collision_debug");p.exports=v;var u={icon:1,text:24}},{"../util/browser":95,"./draw_collision_debug":27,"gl-matrix":116}],33:[function(s,t,p){function o(C,A,w,v){function D(J,H,G,M){B.switchShader(C.dotShader,G),B.uniform1f(C.dotShader.u_size,4*r.devicePixelRatio),B.uniform1f(C.dotShader.u_blur,0.25),B.uniform4fv(C.dotShader.u_color,[0.1,0,0,0.1]),J.bind(B,C.dotShader,0);for(var E=0;E<H.length;E++){var I=H[E],F=I.vertexStartIndex,K=I.vertexLength;B.vertexAttribPointer(C.dotShader.a_pos,2,B.SHORT,!1,M,0),B.drawArrays(B.POINTS,F,K)}}var B=C.gl;if(v&&v.buffers){var u=v.elementGroups[A.ref||A.id];if(u){if(B.blendFunc(B.ONE,B.ONE_MINUS_SRC_ALPHA),"fill"===A.type){D(v.buffers.fillVertex,u.groups,w,4)}else{if("symbol"===A.type){D(v.buffers.iconVertex,u.icon.groups,w,16),D(v.buffers.glyphVertex,u.text.groups,w,16)}else{if("line"===A.type){var z=q.clone(w);q.scale(z,z,[0.5,0.5,1]),D(v.buffers.lineVertex,u.groups,z,8)}}}B.blendFunc(B.ONE_MINUS_DST_ALPHA,B.ONE)}}}var r=s("../util/browser"),q=s("gl-matrix").mat4;t.exports=o},{"../util/browser":95,"gl-matrix":116}],34:[function(q,r,p){function o(){this.frameHistory=[]}r.exports=o,o.prototype.getFadeProperties=function(G){void 0===G&&(G=300);for(var D=(new Date).getTime();this.frameHistory.length>3&&this.frameHistory[1].time+G<D;){this.frameHistory.shift()}this.frameHistory[1].time+G<D&&(this.frameHistory[0].z=this.frameHistory[1].z);var u=this.frameHistory.length;3>u&&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;z<B.length;z++){A[B[z]]=this.getAttribLocation(A.program,B[z]),A.attributes.push(A[B[z]])}for(var C=0;C<E.length;C++){A[E[C]]=this.getUniformLocation(A.program,E[C])}}else{console.error(this.getProgramInfoLog(A.program))}return A},v.switchShader=function(D,B,E){if(B||console.trace("posMatrix does not have required argument"),this.currentShader!==D){this.useProgram(D.program);for(var A=this.currentShader?this.currentShader.attributes:[],z=D.attributes,C=0;C<A.length;C++){z.indexOf(A[C])<0&&this.disableVertexAttribArray(A[C])}for(var F=0;F<z.length;F++){A.indexOf(z[F])<0&&this.enableVertexAttribArray(z[F])}this.currentShader=D}D.posMatrix!==B&&(this.uniformMatrix4fv(D.u_matrix,!1,B),D.posMatrix=B),E&&D.exMatrix!==E&&D.u_exmatrix&&(this.uniformMatrix4fv(D.u_exmatrix,!1,E),D.exMatrix=E)},v.vertexAttrib2fv=function(z,A){v.vertexAttrib2f(z,A[0],A[1])},v.vertexAttrib3fv=function(z,A){v.vertexAttrib3f(z,A[0],A[1],A[2])},v.vertexAttrib4fv=function(z,A){v.vertexAttrib4f(z,A[0],A[1],A[2],A[3])},v}},{"../util/util":106,"./shaders":38}],36:[function(p,q,o){function r(u,s){this.width=u,this.height=s,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}}q.exports=r,r.prototype.setSprite=function(s){this.sprite=s},r.prototype.getDash=function(u,s){var v=u.join(",")+s;return this.positions[v]||(this.positions[v]=this.addDash(u,s)),this.positions[v]},r.prototype.addDash=function(I,U){var Y=U?7:0,V=2*Y+1,K=128;if(this.nextRow+V>this.height){return console.warn("LineAtlas out of space"),null}for(var ab=0,M=0;M<I.length;M++){ab+=I[M]}for(var Q=this.width/ab,P=Q/2,Z=I.length%2===1,H=-Y;Y>=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;O<this.width;O++){for(;O/Q>G;){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<this.data.length;z++){if(this.sdf){var w=4*z;A.data[w]=A.data[w+1]=A.data[w+2]=0,A.data[w+3]=this.data[z]}else{A.data[z]=this.data[z]}}u.putImageData(A,0,0)}},{}],37:[function(q,p,s){function t(z,A){this.gl=v.extend(z),this.transform=A,this.reusableTextures={},this.preFbos={},this.frameHistory=new r,this.setup()}var v=q("./gl_util"),u=q("../util/browser"),o=q("gl-matrix").mat4,r=q("./frame_history");p.exports=t,t.prototype.resize=function(A,B){var z=this.gl;this.width=A*u.devicePixelRatio,this.height=B*u.devicePixelRatio,z.viewport(0,0,this.width,this.height)},t.prototype.setup=function(){var z=this.gl;z.verbose=!0,z.enable(z.BLEND),z.blendFunc(z.ONE_MINUS_DST_ALPHA,z.ONE),z.enable(z.STENCIL_TEST),this.debugShader=z.initializeShader("debug",["a_pos"],["u_matrix","u_color"]),this.rasterShader=z.initializeShader("raster",["a_pos","a_texture_pos"],["u_matrix","u_brightness_low","u_brightness_high","u_saturation_factor","u_spin_weights","u_contrast_factor","u_opacity0","u_opacity1","u_image0","u_image1","u_tl_parent","u_scale_parent","u_buffer_scale"]),this.circleShader=z.initializeShader("circle",["a_pos"],["u_matrix","u_exmatrix","u_blur","u_size","u_color"]),this.lineShader=z.initializeShader("line",["a_pos","a_data"],["u_matrix","u_linewidth","u_color","u_ratio","u_blur","u_extra","u_antialiasingmatrix"]),this.linepatternShader=z.initializeShader("linepattern",["a_pos","a_data"],["u_matrix","u_linewidth","u_ratio","u_pattern_size_a","u_pattern_size_b","u_pattern_tl_a","u_pattern_br_a","u_pattern_tl_b","u_pattern_br_b","u_blur","u_fade","u_opacity","u_extra","u_antialiasingmatrix"]),this.linesdfpatternShader=z.initializeShader("linesdfpattern",["a_pos","a_data"],["u_matrix","u_linewidth","u_color","u_ratio","u_blur","u_patternscale_a","u_tex_y_a","u_patternscale_b","u_tex_y_b","u_image","u_sdfgamma","u_mix","u_extra","u_antialiasingmatrix"]),this.dotShader=z.initializeShader("dot",["a_pos"],["u_matrix","u_size","u_color","u_blur"]),this.sdfShader=z.initializeShader("sdf",["a_pos","a_offset","a_data1","a_data2"],["u_matrix","u_exmatrix","u_texture","u_texsize","u_color","u_gamma","u_buffer","u_zoom","u_fadedist","u_minfadezoom","u_maxfadezoom","u_fadezoom","u_skewed","u_extra"]),this.iconShader=z.initializeShader("icon",["a_pos","a_offset","a_data1","a_data2"],["u_matrix","u_exmatrix","u_texture","u_texsize","u_zoom","u_fadedist","u_minfadezoom","u_maxfadezoom","u_fadezoom","u_opacity","u_skewed","u_extra"]),this.outlineShader=z.initializeShader("outline",["a_pos"],["u_matrix","u_color","u_world"]),this.patternShader=z.initializeShader("pattern",["a_pos"],["u_matrix","u_pattern_tl_a","u_pattern_br_a","u_pattern_tl_b","u_pattern_br_b","u_mix","u_patternmatrix_a","u_patternmatrix_b","u_opacity","u_image"]),this.fillShader=z.initializeShader("fill",["a_pos"],["u_matrix","u_color"]),this.collisionBoxShader=z.initializeShader("collisionbox",["a_pos","a_extrude","a_data"],["u_matrix","u_scale","u_zoom","u_maxzoom"]),this.identityMatrix=o.create(),this.backgroundBuffer=z.createBuffer(),this.backgroundBuffer.itemSize=2,this.backgroundBuffer.itemCount=4,z.bindBuffer(z.ARRAY_BUFFER,this.backgroundBuffer),z.bufferData(z.ARRAY_BUFFER,new Int16Array([-1,-1,1,-1,-1,1,1,1]),z.STATIC_DRAW),this.setExtent(4096),this.debugTextBuffer=z.createBuffer(),this.debugTextBuffer.itemSize=2},t.prototype.setExtent=function(z){if(z&&z!==this.tileExtent){this.tileExtent=z;var A=this.gl;this.tileExtentBuffer=A.createBuffer(),this.tileExtentBuffer.itemSize=4,this.tileExtentBuffer.itemCount=4,A.bindBuffer(A.ARRAY_BUFFER,this.tileExtentBuffer),A.bufferData(A.ARRAY_BUFFER,new Int16Array([0,0,0,0,this.tileExtent,0,32767,0,0,this.tileExtent,0,32767,this.tileExtent,this.tileExtent,32767,32767]),A.STATIC_DRAW),this.debugBuffer=A.createBuffer(),this.debugBuffer.itemSize=2,this.debugBuffer.itemCount=5,A.bindBuffer(A.ARRAY_BUFFER,this.debugBuffer),A.bufferData(A.ARRAY_BUFFER,new Int16Array([0,0,this.tileExtent-1,0,this.tileExtent-1,this.tileExtent-1,0,this.tileExtent-1,0,0]),A.STATIC_DRAW)}},t.prototype.clearColor=function(){var z=this.gl;z.clearColor(0,0,0,0),z.clear(z.COLOR_BUFFER_BIT)},t.prototype.clearStencil=function(){var z=this.gl;z.clearStencil(0),z.stencilMask(255),z.clear(z.STENCIL_BUFFER_BIT)},t.prototype.drawClippingMask=function(z){var A=this.gl;A.switchShader(this.fillShader,z.posMatrix),A.colorMask(!1,!1,!1,!1),A.clearStencil(0),A.stencilMask(191),A.clear(A.STENCIL_BUFFER_BIT),A.stencilFunc(A.EQUAL,192,64),A.stencilMask(192),A.stencilOp(A.REPLACE,A.KEEP,A.KEEP),A.bindBuffer(A.ARRAY_BUFFER,this.tileExtentBuffer),A.vertexAttribPointer(this.fillShader.a_pos,this.tileExtentBuffer.itemSize,A.SHORT,!1,8,0),A.drawArrays(A.TRIANGLE_STRIP,0,this.tileExtentBuffer.itemCount),A.stencilFunc(A.EQUAL,128,128),A.stencilOp(A.KEEP,A.KEEP,A.REPLACE),A.stencilMask(0),A.colorMask(!0,!0,!0,!0)},t.prototype.prepareBuffers=function(){},t.prototype.bindDefaultFramebuffer=function(){var z=this.gl;z.bindFramebuffer(z.FRAMEBUFFER,null)};var w={symbol:q("./draw_symbol"),circle:q("./draw_circle"),line:q("./draw_line"),fill:q("./draw_fill"),raster:q("./draw_raster"),background:q("./draw_background"),debug:q("./draw_debug"),vertices:q("./draw_vertices")};t.prototype.render=function(B,D){this.style=B,this.options=D,this.lineAtlas=B.lineAtlas,this.spriteAtlas=B.spriteAtlas,this.spriteAtlas.setSprite(B.sprite),this.glyphAtlas=B.glyphAtlas,this.glyphAtlas.bind(this.gl),this.frameHistory.record(this.transform.zoom),this.prepareBuffers(),this.clearColor();for(var A=B._groups.length-1;A>=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<<C.coord.z)/(C.tileExtent/C.tileSize),A=[B[0]/F,B[1]/F,0],E=new Float32Array(16);return o.translate(E,G,A),E},t.prototype.saveTexture=function(z){var A=this.reusableTextures[z.size];A?A.push(z):this.reusableTextures[z.size]=[z]},t.prototype.getTexture=function(z){var A=this.reusableTextures[z];return A&&A.length>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=0.;if(u_minfadezoom>=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=0.;if(u_minfadezoom>=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;w<A.length;w++){for(var z=A[w],B=[],v=0;v<z.length;v++){B.push(new t(z[v][0],z[v][1]))}this.geometry.push(B)}return this.geometry},o.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var D=this.geometry,F=1/0,v=-(1/0),z=1/0,E=-(1/0),w=0;w<D.length;w++){for(var B=D[w],A=0;A<B.length;A++){var C=B[A];F=Math.min(F,C.x),v=Math.max(v,C.x),z=Math.min(z,C.y),E=Math.max(E,C.y)}}return[F,z,v,E]},o.prototype.toGeoJSON=q.prototype.toGeoJSON},{"point-geometry":137,"vector-tile":144}],41:[function(q,p,r){function o(A){this.coordinates=A.coordinates,v.getImage(A.url,function(C,B){C||(this.image=B,this.image.addEventListener("load",function(){this.map._rerender()}.bind(this)),this._loaded=!0,this.map&&(this.createTile(),this.fire("change")))}.bind(this))}var s=q("../util/util"),w=q("./tile"),u=q("../geo/lng_lat"),t=q("point-geometry"),z=q("../util/evented"),v=q("../util/ajax");p.exports=o,o.prototype=s.inherit(z,{onAdd:function(A){this.map=A,this.image&&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,A=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,G=32767,B=new Int16Array([A[0].x,A[0].y,0,0,A[1].x,A[1].y,G,0,A[3].x,A[3].y,0,G,A[2].x,A[2].y,G,G]);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.image&&this.image.complete},update:function(){},reload:function(){},render:function(D,B){if(this._loaded&&this.loaded()){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.image)):(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.image)),B.drawLayers(D,this.tile.posMatrix,this.tile)}},featuresAt: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}],42:[function(p,o,r){function u(z){t.extend(this,t.pick(z,["url","tileSize"])),q._loadTileJSON.call(this,z)}var t=p("../util/util"),v=p("../util/ajax"),w=p("../util/evented"),q=p("./source"),s=p("../util/mapbox").normalizeTileURL;o.exports=u,u.prototype=t.inherit(w,{minzoom:0,maxzoom:22,roundZoom:!0,tileSize:512,_loaded:!1,onAdd:function(z){this.map=z},loaded:function(){return this._pyramid&&this._pyramid.loaded()},update:function(z){this._pyramid&&this._pyramid.update(this.used,z,this.map.style.rasterFadeDuration)},reload:function(){},render:q._renderTiles,_loadTile:function(B){function A(D,C){if(delete B.request,!B.aborted){if(D){return void this.fire("tile.error",{tile:B})}var E=this.map.painter.gl;B.texture=this.map.painter.getTexture(C.width),B.texture?(E.bindTexture(E.TEXTURE_2D,B.texture),E.texSubImage2D(E.TEXTURE_2D,0,0,0,E.RGBA,E.UNSIGNED_BYTE,C)):(B.texture=E.createTexture(),E.bindTexture(E.TEXTURE_2D,B.texture),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,E.LINEAR_MIPMAP_NEAREST),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,E.LINEAR),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_S,E.CLAMP_TO_EDGE),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_T,E.CLAMP_TO_EDGE),E.texImage2D(E.TEXTURE_2D,0,E.RGBA,E.RGBA,E.UNSIGNED_BYTE,C),B.texture.size=C.width),E.generateMipmap(E.TEXTURE_2D),B.timeAdded=(new Date).getTime(),this.map.animationLoop.set(this.style.rasterFadeDuration),B.source=this,B.loaded=!0,this.fire("tile.load",{tile:B})}}var z=s(B.coord.url(this.tiles),this.url);B.request=v.getImage(z,A.bind(this))},_abortTile:function(z){z.aborted=!0,z.request&&(z.request.abort(),delete z.request)},_addTile:function(z){this.fire("tile.add",{tile:z})},_removeTile:function(z){this.fire("tile.remove",{tile:z})},_unloadTile:function(z){z.texture&&this.map.painter.saveTexture(z.texture)},featuresAt:function(B,A,z){z(null,[])},featuresIn:function(B,A,z){z(null,[])}})},{"../util/ajax":94,"../util/evented":100,"../util/mapbox":103,"../util/util":106,"./source":43}],43:[function(p,o,r){var u=p("../util/util"),w=p("../util/ajax"),t=p("../util/browser"),v=p("./tile_pyramid"),q=p("./tile_coord"),s=p("../util/mapbox").normalizeSourceURL;r._loadTileJSON=function(z){var B=function(C){this._pyramid=new v({index:C,tileSize:this.tileSize,cacheSize:20,minzoom:this.minzoom,maxzoom:this.maxzoom,roundZoom:this.roundZoom,reparseOverscaled:this.reparseOverscaled,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),redoPlacement:this._redoTilePlacement?this._redoTilePlacement.bind(this):void 0})}.bind(this),A=function(C,D){return C?void this.fire("error",{error:C}):(u.extend(this,u.pick(D,["tiles","minzoom","maxzoom","attribution"])),void (D.index?w.getJSON(s(D.index),function(E,F){return E?void this.fire("error",{error:E}):(B(F.index),void this.fire("load"))}.bind(this)):(B(),this.fire("load"))))}.bind(this);z.url?w.getJSON(s(z.url),A):t.frame(A.bind(this,null,z))},r._renderTiles=function(D,E){if(this._pyramid){for(var z=this._pyramid.renderedIDs(),H=0;H<z.length;H++){var A=this._pyramid.getTile(z[H]),B=q.fromID(z[H]),G=B.z,I=B.x,C=B.y,F=B.w;G=Math.min(G,this.maxzoom),(A.tileExtent>4096||A.parentId)&&(A.tileExtent=4096),I+=F*(1<<G),A.calculateMatrices(G,I,C,E.transform,E),E.drawTile(A,D)}}},r._vectorFeaturesAt=function(A,C,B){if(!this._pyramid){return B(null,[])}var z=this._pyramid.tileAt(A);return z?void this.dispatcher.send("query features",{uid:z.tile.uid,x:z.x,y:z.y,tileExtent:z.tile.tileExtent,scale:z.scale,source:this.id,params:C},B,z.tile.workerID):B(null,[])},r._vectorFeaturesIn=function(A,C,B){if(!this._pyramid){return B(null,[])}var z=this._pyramid.tilesIn(A);return z?void u.asyncAll(z,function(D,E){this.dispatcher.send("query features",{uid:D.tile.uid,source:this.id,minX:D.minX,maxX:D.maxX,minY:D.minY,maxY:D.maxY,params:C},E,D.tile.workerID)}.bind(this),function(D,E){B(D,Array.prototype.concat.apply([],E))}):B(null,[])},r.create=function(z){var B={vector:p("./vector_tile_source"),raster:p("./raster_tile_source"),geojson:p("./geojson_source"),video:p("./video_source"),image:p("./image_source")};for(var A in B){if(z instanceof B[A]){return z}}return new B[z.type](z)}},{"../util/ajax":94,"../util/browser":95,"../util/mapbox":103,"../util/util":106,"./geojson_source":39,"./image_source":41,"./raster_tile_source":42,"./tile_coord":45,"./tile_pyramid":46,"./vector_tile_source":47,"./video_source":48}],44:[function(r,q,t){function w(z,A){this.coord=z,this.uid=u.uniqueId(),this.loaded=!1,this.uses=0,this.tileSize=A}var v=r("gl-matrix"),p=v.mat2,o=v.mat4,u=r("../util/util"),s=r("../data/buffer/buffer_set");q.exports=w,w.prototype={tileExtent:4096,calculateMatrices:function(A,D,z,C){var B=Math.pow(2,A),E=C.worldSize/B;this.scale=E,this.posMatrix=new Float64Array(16),o.identity(this.posMatrix),o.translate(this.posMatrix,this.posMatrix,[D*E,z*E,0]),o.scale(this.posMatrix,this.posMatrix,[E/this.tileExtent,E/this.tileExtent,1]),o.multiply(this.posMatrix,C.getProjMatrix(),this.posMatrix),this.exMatrix=o.create(),o.ortho(this.exMatrix,0,C.width,C.height,0,0,-1),this.rotationMatrix=p.create(),p.rotate(this.rotationMatrix,this.rotationMatrix,C.angle),this.posMatrix=new Float32Array(this.posMatrix)},positionAt:function(z,A){return z=z.zoomTo(Math.min(this.coord.z,A)),{x:(z.column-this.coord.x)*this.tileExtent,y:(z.row-this.coord.y)*this.tileExtent,scale:this.scale}},loadVectorData:function(z){this.loaded=!0,z&&(this.buffers=new s(z.buffers),this.elementGroups=z.elementGroups,this.tileExtent=z.extent)},reloadSymbolData:function(A,C){if(this.buffers){this.buffers.glyphVertex.destroy(C.gl),this.buffers.glyphElement.destroy(C.gl),this.buffers.iconVertex.destroy(C.gl),this.buffers.iconElement.destroy(C.gl),this.buffers.collisionBoxVertex.destroy(C.gl);var z=new s(A.buffers);this.buffers.glyphVertex=z.glyphVertex,this.buffers.glyphElement=z.glyphElement,this.buffers.iconVertex=z.iconVertex,this.buffers.iconElement=z.iconElement,this.buffers.collisionBoxVertex=z.collisionBoxVertex;for(var B in A.elementGroups){this.elementGroups[B]=A.elementGroups[B]}}},unloadVectorData:function(z){for(var A in this.buffers){this.buffers[A].destroy(z.gl)}this.buffers=null}}},{"../data/buffer/buffer_set":2,"../util/util":106,"gl-matrix":116}],45:[function(q,s,o){function r(w,v,B,z){isNaN(z)&&(z=0),this.z=+w,this.x=+v,this.y=+B,this.w=+z,z*=2,0>z&&(z=-1*z-1);var A=1<<this.z;this.id=32*(A*A*z+A*this.y+this.x)+this.z}function u(w,v){if(w.row>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.dx<B.x1:K.x1-B.dy/K.dy*K.dx<B.x0){var M=K;K=B,B=M}for(var E=K.dx/K.dy,I=B.dx/B.dy,A=K.dx>0,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,A=(w-v)/32,B=A%C,D=(A-B)/C%C,z=Math.floor(A/(C*C));return z%2!==0&&(z=-1*z-1),z/=2,new r(v,B,D,z)},r.prototype.url=function(w,v){return w[(this.x+this.y)%w.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",Math.min(this.z,v||this.z)).replace("{x}",this.x).replace("{y}",this.y)},r.prototype.parent=function(v){return 0===this.z?null:this.z>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<<w,C={};return p(v[0],v[1],v[2],0,A,z),p(v[2],v[3],v[0],0,A,z),Object.keys(C).map(function(D){return C[D]})}},{}],46:[function(p,o,r){function u(z){this.tileSize=z.tileSize,this.minzoom=z.minzoom,this.maxzoom=z.maxzoom,this.roundZoom=z.roundZoom,this.reparseOverscaled=z.reparseOverscaled,this.index=z.index,this._load=z.load,this._abort=z.abort,this._unload=z.unload,this._add=z.add,this._remove=z.remove,this._redoPlacement=z.redoPlacement,this._tiles={},this._cache=new v(z.cacheSize,function(A){return this._unload(A)}.bind(this))}var w=p("./tile"),q=p("./tile_coord"),t=p("point-geometry"),v=p("../util/mru_cache"),s=p("../util/util");o.exports=u,u.prototype={loaded:function(){for(var z in this._tiles){if(!this._tiles[z].loaded){return !1}}return !0},orderedIDs:function(){return Object.keys(this._tiles).sort(function(z,A){return A%32-z%32}).map(function(z){return +z})},renderedIDs:function(){return this.orderedIDs().filter(function(z){return this._tiles[z].loaded&&!this._coveredTiles[z]}.bind(this))},reload:function(){this._cache.reset();for(var z in this._tiles){this._load(this._tiles[z])}},getTile:function(z){return this._tiles[z]},getZoom:function(z){return z.zoom+Math.log(z.tileSize/this.tileSize)/Math.LN2},coveringZoomLevel:function(z){return(this.roundZoom?Math.round:Math.floor)(this.getZoom(z))},coveringTiles:function(A){var C=this.coveringZoomLevel(A),z=C;if(C<this.minzoom){return[]}C>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;B<G.length;B++){var E=G[B].id;this._tiles[E]&&this._tiles[E].loaded?z[E]=!0:(F=!1,D>C&&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;A<C.length;A++){z=C[A],B=this.addTile(z),J[z.id]=!0,B.loaded||this.findLoadedChildren(z,F,J)||this.findLoadedParent(z,H,J)}for(var K in J){z=q.fromID(K),B=this._tiles[K],B&&B.timeAdded>D-(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;A<I.length;A++){this.removeTile(+I[A])}},addTile:function(A){var C=this._tiles[A.id];if(C){return C}var z=A.wrapped();if(C=this._tiles[z.id],C||(C=this._cache.get(z.id),C&&this._redoPlacement&&this._redoPlacement(C)),!C){var D=A.z,B=D>this.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<C.length;z++){var D=this._tiles[C[z]],B=D.positionAt(A,this.maxzoom);if(B&&B.x>=0&&B.x<D.tileExtent&&B.y>=0&&B.y<D.tileExtent){return{tile:D,x:B.x,y:B.y,scale:B.scale}}}},tilesIn:function(A){for(var C=[],z=this.orderedIDs(),D=0;D<z.length;D++){var B=this._tiles[z[D]],E=[B.positionAt(A[0],this.maxzoom),B.positionAt(A[1],this.maxzoom)];E[0].x<B.tileExtent&&E[0].y<B.tileExtent&&E[1].x>=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;z<A.length;z++){var w=this._pyramid.getTile(A[z]);this._redoTilePlacement(w)}}},render:u._renderTiles,featuresAt:u._vectorFeaturesAt,featuresIn:u._vectorFeaturesIn,_loadTile:function(A){var z=A.coord.z>this.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<<E)-1,G=F.y&(1<<E)-1;return{dz:E,xPos:D,yPos:G}}})},{"../util/actor":93,"../util/ajax":94,"../util/util":106,"./geojson_wrapper":40,"./tile_coord":45,"./worker_tile":50,"geojson-vt":111,pbf:136,"vector-tile":144}],50:[function(q,s,p){function u(w){this.coord=w.coord,this.uid=w.uid,this.zoom=w.zoom,this.maxZoom=w.maxZoom,this.tileSize=w.tileSize,this.source=w.source,this.overscaling=w.overscaling,this.angle=w.angle,this.pitch=w.pitch,this.collisionDebug=w.collisionDebug,this.stacks={}}var r=q("../data/feature_tree"),o=q("../symbol/collision_tile"),t=q("../data/buffer/buffer_set"),v=q("../data/create_bucket");s.exports=u,u.prototype.parse=function(ac,K,O,Y,N,R,U){function ag(T,ai,w,S,aj){for(var z=0;z<T.length;z++){var D=T.feature(z);D.dz=w,D.xPos=S,D.yPos=aj;for(var ah in ai){var P=ai[ah];P.filter(D)&&P.features.push(D)}}}function W(w){return function(z){w.dependenciesLoaded=!0,J(I,w,z)}}function J(S,z,P){if((!z.getDependencies||z.dependenciesLoaded)&&(!z.needsPlacement||z.previousPlaced)){if(!P){var w=Date.now();z.features.length&&z.addFeatures(aa);var D=Date.now()-w;if(z.interactive){for(var T=0;T<z.features.length;T++){var ah=z.features[T];S.featureTree.insert(ah.bbox(),z.layers,ah)}}"undefined"!=typeof self&&(self.bucketStats=self.bucketStats||{_total:0},self.bucketStats._total+=D,self.bucketStats[z.id]=(self.bucketStats[z.id]||0)+D),z.features=null}return H--,H?void (z.next&&(z.next.previousPlaced=!0,J(S,z.next))):void ab()}}function ab(){if(I.status="done",I.redoPlacementAfterDone){var D=I.redoPlacement(I.angle,I.pitch).result;V.glyphVertex=D.buffers.glyphVertex,V.iconVertex=D.buffers.iconVertex,V.collisionBoxVertex=D.buffers.collisionBoxVertex}var w=[],z={};for(ad in V){w.push(V[ad].array)}for(ad in af){z[ad]=af[ad].elementGroups}Y(null,{elementGroups:z,buffers:V,extent:A,bucketStats:"undefined"!=typeof self?self.bucketStats:null},w)}this.status="parsing",this.featureTree=new r(this.coord,this.overscaling);var ae,ad,Z,Q,I=this,V=new t,aa=new o(this.angle,this.pitch),af={},G=this.bucketsInOrder=[],F={};for(ae=0;ae<K.length;ae++){if(Z=K[ae],Z.source===this.source&&!Z.ref){var X=Z.minzoom;if(!(X&&this.zoom<X&&X<this.maxZoom)){var C=Z.maxzoom;if(!(C&&this.zoom>=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<K.length;ae++){Z=K[ae],Z.source===this.source&&Z.ref&&(Q=af[Z.ref],Q&&Q.layers.push(Z.id))}var A=4096;if(ac.layers){for(ad in F){Z=ac.layers[ad],Z&&(Z.extent&&(A=Z.extent),ag(Z,F[ad],N,R,U))}}else{ag(ac,F)}var E,H=G.length;for(ae=G.length-1;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;B<F.length;B+=4){var G=F[B+3]/255;E[B+0]=F[B+0]*G,E[B+1]=F[B+1]*G,E[B+2]=F[B+2]*G,E[B+3]=F[B+3]}this.img=C,this.data&&this.fire("load")}.bind(this))}function q(){}var w=p("../util/evented"),u=p("../util/ajax"),t=p("../util/browser"),s=p("../util/mapbox").normalizeSpriteURL;o.exports=v,v.prototype=Object.create(w),v.prototype.toJSON=function(){return this.base},v.prototype.loaded=function(){return !(!this.data||!this.img)},v.prototype.resize=function(){if(t.devicePixelRatio>1!==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;N<Q.length;N++){this.fire("error",{error:new Error(Q[N].message)})}}else{this._loaded=!0,this.stylesheet=O;var P=O.sources;for(var S in P){this.addSource(S,P[S])}O.sprite&&(this.sprite=new A(O.sprite),this.sprite.on("load",this.fire.bind(this,"change"))),this.glyphSource=new s(O.glyphs,this.glyphAtlas),this._resolve(),this.fire("load")}}.bind(this);"string"==typeof M?w.getJSON(E(M),K):H.frame(K.bind(this,null,M))}var C=u("../util/evented"),v=u("./style_batch"),F=u("./style_layer"),A=u("./image_sprite"),s=u("../symbol/glyph_source"),B=u("../symbol/glyph_atlas"),t=u("../symbol/sprite_atlas"),G=u("../render/line_atlas"),p=u("../util/util"),w=u("../util/ajax"),E=u("../util/mapbox").normalizeStyleURL,H=u("../util/browser"),D=u("../util/dispatcher"),r=u("./animation_loop"),z=u("mapbox-gl-style-spec/lib/validate/latest");q.exports=o,o.prototype=p.inherit(C,{_loaded:!1,loaded:function(){if(!this._loaded){return !1}for(var J in this.sources){if(!this.sources[J].loaded()){return !1}}return this.sprite&&!this.sprite.loaded()?!1:!0},_resolve:function(){var M,J;this._layers={},this._order=[];for(var K=0;K<this.stylesheet.layers.length;K++){J=new F(this.stylesheet.layers[K]),this._layers[J.id]=J,this._order.push(J.id)}for(M in this._layers){this._layers[M].resolveLayout()}for(M in this._layers){this._layers[M].resolveReference(this._layers),this._layers[M].resolvePaint()}this._groupLayers(),this._broadcastLayers()},_groupLayers:function(){var M;this._groups=[];for(var J=0;J<this._order.length;++J){var K=this._layers[this._order[J]];M&&K.source===M.source||(M=[],M.source=K.source,this._groups.push(M)),M.push(K)}},_broadcastLayers:function(){var K=[];for(var J in this._layers){K.push(this._layers[J].json())}this.dispatcher.broadcast("set layers",K)},_cascade:function(M,J){if(this._loaded){J=J||{transition:!0};for(var K in this._layers){this._layers[K].cascade(M,J,this.stylesheet.transition||{},this.animationLoop)}this.fire("change")}},_recalculate:function(N){for(var K in this.sources){this.sources[K].used=!1}this._updateZoomHistory(N),this.rasterFadeDuration=300;for(K in this._layers){var M=this._layers[K];M.recalculate(N,this.zoomHistory)&&M.source&&(this.sources[M.source].used=!0)}var J=300;Math.floor(this.z)!==Math.floor(N)&&this.animationLoop.set(J),this.z=N,this.fire("zoom")},_updateZoomHistory:function(K){var J=this.zoomHistory;void 0===J.lastIntegerZoom&&(J.lastIntegerZoom=Math.floor(K),J.lastIntegerZoomTime=0,J.lastZoom=K),Math.floor(J.lastZoom)<Math.floor(K)?(J.lastIntegerZoom=Math.floor(K),J.lastIntegerZoomTime=Date.now()):Math.floor(J.lastZoom)>Math.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.minzoom||this.maxzoom&&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(),B<this.endTime){var A=this.oldTransition.at(z,w,this.startTime),v=this.ease((B-this.startTime-this.delay)/this.duration);C=this.interp(A,C,v)}return C}},{"../util/interpolate":102,"../util/util":106}],62:[function(q,r,p){function o(u,v,w,z){this.x=u,this.y=v,this.angle=w,void 0!==z&&(this.segment=z)}var s=q("point-geometry");r.exports=o,o.prototype=Object.create(s.prototype),o.prototype.clone=function(){return new o(this.x,this.y,this.angle,this.segment)}},{"point-geometry":137}],63:[function(p,q,o){function r(t,s){this.width=t,this.height=s,this.free=[{x:0,y:0,w:t,h:s}]}q.exports=r,r.prototype.release=function(u){for(var t=0;t<this.free.length;t++){var s=this.free[t];if(s.y===u.y&&s.h===u.h&&s.x+s.w===u.x){s.w+=u.w}else{if(s.x===u.x&&s.w===u.w&&s.y+s.h===u.y){s.h+=u.h}else{if(u.y===s.y&&u.h===s.h&&u.x+u.w===s.x){s.x=u.x,s.w+=u.w}else{if(u.x!==s.x||u.w!==s.w||u.y+u.h!==s.y){continue}s.y=u.y,s.h+=u.h}}}return this.free.splice(t,1),void this.release(s)}this.free.push(u)},r.prototype.allocate=function(B,z){for(var v={x:1/0,y:1/0,w:1/0,h:1/0},u=-1,w=0;w<this.free.length;w++){var A=this.free[w];B<=A.w&&z<=A.h&&A.y<=v.y&&A.x<=v.x&&(v=A,u=w)}return 0>u?{x:-1,y:-1}:(this.free.splice(u,1),v.w<v.h?(v.w>B&&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<G.length;z++){for(var v,D=G[z],I=0;I<D.length-1;I++){var H=D[I],B=D[I+1];H.x<F&&B.x<F||(H.x<F?H=new r(F,H.y+(B.y-H.y)*((F-H.x)/(B.x-H.x))):B.x<F&&(B=new r(F,H.y+(B.y-H.y)*((F-H.x)/(B.x-H.x)))),H.y<A&&B.y<A||(H.y<A?H=new r(H.x+(B.x-H.x)*((A-H.y)/(B.y-H.y)),A):B.y<A&&(B=new r(H.x+(B.x-H.x)*((A-H.y)/(B.y-H.y)),A)),H.x>=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;G<C.boxes.length;G++){var J=C.boxes[G],E=J.anchorPoint.matMult(O),D=E.x,N=E.y;J[0]=D+J.x1,J[1]=N+J.y1*K,J[2]=D+J.x2,J[3]=N+J.y2*K;for(var H=this.tree.search(J),P=0;P<H.length;P++){var A=H[P],I=A.anchorPoint.matMult(O),z=(A.x1-J.x2)/(D-I.x),B=(A.x2-J.x1)/(D-I.x),v=(A.y1-J.y2)*K/(N-I.y),F=(A.y2-J.y1)*K/(N-I.y);(isNaN(z)||isNaN(B))&&(z=B=1),(isNaN(v)||isNaN(F))&&(v=F=1);var w=Math.min(Math.max(z,B),Math.max(v,F));if(w>A.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;v<z.length;v++){z[v].placementScale=u}u<this.maxScale&&this.tree.load(z)}},{rbush:139}],69:[function(r,s,p){function v(F,w,J,H,A,z,B,D){var C=H?0.6*z*B:0,G=Math.max(H?H.right-H.left:0,A?A.right-A.left:0);if(0===F[0].x||4096===F[0].x||0===F[0].y||4096===F[0].y){var I=!0}w/4>w-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;E<R.length-1;E++){for(var P=R[E],H=R[E+1],z=P.dist(H),Q=H.angleTo(P);N+z>S+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;u<z.h;u++){for(var v=this.width*(z.y+u)+z.x,B=0;B<z.w;B++){C[v+B]=0}}this.dirty=!0,this.bin.release(z),delete this.index[w],delete this.ids[w]}}this.updateTexture(this.gl)},r.prototype.addGlyph=function(N,D,G,P){if(!G){return null}var F=D+"#"+G.id;if(this.index[F]){return this.ids[F].indexOf(N)<0&&this.ids[F].push(N),this.index[F]}if(!G.bitmap){return null}var K=G.width+2*P,v=G.height+2*P,A=1,H=K+2*A,B=v+2*A;H+=4-H%4,B+=4-B%4;var z=this.bin.allocate(H,B);if(z.x<0){return console.warn("glyph bitmap overflow"),{glyph:G,rect:null}}this.index[F]=z,this.ids[F]=[N];for(var I=this.data,w=G.bitmap,M=0;v>M;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;B<this.data.length;B++,A+=4){v.data[A]=this.data[B],v.data[A+1]=this.data[B],v.data[A+2]=this.data[B],v.data[A+3]=255}this.ctx.putImageData(v,0,0),this.ctx.strokeStyle="red";for(var z=0;z<this.bin.free.length;z++){var u=this.bin.free[z];this.ctx.strokeRect(u.x,u.y,u.w,u.h)}}this.dirty=!1}}},{"./bin_pack":63}],71:[function(p,o,q){function u(A,B){this.url=A&&s(A),this.glyphAtlas=B,this.stacks=[],this.loading={}}function v(B,D,C){var A=1;this.advance=B.advance,this.left=B.left-C-A,this.top=B.top+C+A,this.rect=D}function r(B,D,C,A){return A=A||"abc",C.replace("{s}",A[B.length%A.length]).replace("{fontstack}",B).replace("{range}",D)}var s=p("../util/mapbox").normalizeGlyphsURL,t=p("../util/ajax").getArrayBuffer,z=p("../util/glyphs"),w=p("pbf");o.exports=u,u.prototype.getSimpleGlyphs=function(Q,J,A,F){void 0===this.stacks[Q]&&(this.stacks[Q]={});for(var E,O={},R=this.stacks[Q],G=this.glyphAtlas,C=3,D={},B=0,P=0;P<J.length;P++){var I=J[P];if(E=Math.floor(I/256),R[E]){var N=R[E].glyphs[I],M=G.addGlyph(A,Q,N,C);N&&(O[I]=new v(N,M,C))}else{void 0===D[E]&&(D[E]=[],B++),D[E].push(I)}}B||F(void 0,O);var H=function(X,S,U){if(!X){for(var T=this.stacks[Q][S]=U.stacks[0],W=0;W<D[S].length;W++){var Z=D[S][W],Y=T.glyphs[Z],V=G.addGlyph(A,Q,Y,C);Y&&(O[Z]=new v(Y,V,C))}}B--,B||F(void 0,O)}.bind(this);for(var K in D){this.loadRange(Q,K,H)}},u.prototype.loadRange=function(D,F,E){if(256*F>65535){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;G<C[F].length;G++){C[F][G](I,F,H)}delete C[F]})}}},{"../util/ajax":94,"../util/glyphs":101,"../util/mapbox":103,pbf:136}],72:[function(p,q,o){q.exports=function(P,C,H){function E(s){J.push(P[s]),R.push(H[s]),A.push(C[s]),M++}function B(v,s,T){var u=O[v];return delete O[v],O[s]=u,R[u][0].pop(),R[u][0]=R[u][0].concat(T[0]),u}function K(v,s,T){var u=S[s];return delete S[s],S[v]=u,R[u][0].shift(),R[u][0]=T[0].concat(R[u][0]),u}function G(v,s,T){var u=T?s[0][s[0].length-1]:s[0][0];return v+":"+u.x+":"+u.y}var D,S={},O={},J=[],R=[],A=[],M=0;for(D=0;D<P.length;D++){var F=H[D],Q=C[D];if(F){if(Q){var N=G(Q,F),z=G(Q,F,!0);if(N in O&&z in S&&O[N]!==S[z]){var I=K(N,z,F),w=B(N,z,R[I]);delete S[N],delete O[z],O[G(Q,R[w],!0)]=w,R[I]=null}else{N in O?B(N,z,F):z in S?K(N,z,F):(E(D),S[N]=M-1,O[z]=M-1)}}else{E(D)}}}return{features:J,textFeatures:A,geometries:R}}},{}],73:[function(s,p,t){function o(H,G,F,B,D,A,z,E,C){this.anchorPoint=H,this.tl=G,this.tr=F,this.bl=B,this.br=D,this.tex=A,this.angle=z,this.minScale=E,this.maxScale=C}function w(G,X,V,K,Q,J){var I=X.image.rect,R=1,O=X.left-R,H=O+I.w,N=X.top-R,F=N+I.h,W=new v(O,N),T=new v(H,N),B=new v(H,F),A=new v(O,F),U=Q["icon-rotate"]*Math.PI/180;if(J){var C=K[G.segment];U+=Math.atan2(G.y-C.y,G.x-C.x)}if(U){var z=Math.sin(U),E=Math.cos(U),D=[E,-z,z,E];W=W.matMult(D),T=T.matMult(D),A=A.matMult(D),B=B.matMult(D)}return[new o(new v(G.x,G.y),W,T,A,B,X.image.rect,0,r,1/0)]}function q(ab,av,aq,ah,am,ag){for(var ad=am["text-rotate"]*Math.PI/180,an=am["text-keep-upright"],aj=av.positionedGlyphs,ac=[],ai=0;ai<aj.length;ai++){var aa=aj[ai],at=aa.glyph,ao=at.rect;if(ao){var J,H=(aa.x+at.advance/2)*aq,ap=r;ag?(J=[],ap=u(J,ab,H,ah,ab.segment,!0),an&&(ap=Math.min(ap,u(J,ab,H,ah,ab.segment,!1)))):J=[{anchorPoint:new v(ab.x,ab.y),offset:0,angle:0,maxScale:1/0,minScale:r}];for(var W=aa.x+at.left,E=aa.y-at.top,Z=W+ao.w,X=E+ao.h,af=new v(W,E),Y=new v(Z,E),ar=new v(W,X),K=new v(Z,X),au=0;au<J.length;au++){var F=J[au],N=af,ak=Y,ae=ar,aw=K,al=F.angle+ad;if(al){var V=Math.sin(al),U=Math.cos(al),T=[U,-V,V,U];N=N.matMult(T),ak=ak.matMult(T),ae=ae.matMult(T),aw=aw.matMult(T)}var R=Math.max(F.minScale,ap),O=(ab.angle+ad+F.offset+2*Math.PI)%(2*Math.PI);ac.push(new o(F.anchorPoint,N,ak,ae,aw,ao,O,R,F.maxScale))}}}return ac}function u(O,K,H,B,E,A){var z=!A;0>H&&(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;w<A.length;w++){A[w]!==v&&(v=A[w],z[v]||B.push(A[w]))}return B}function s(w,v){return w-v}var p=q("../util/token");r.exports=u},{"../util/token":105}],76:[function(q,o,v){function u(D,C,F,E){this.codePoint=D,this.x=C,this.y=F,this.glyph=E}function t(D,C,H,F,G,E){this.positionedGlyphs=D,this.text=C,this.top=H,this.bottom=F,this.left=G,this.right=E}function A(S,H,F,M,E,I,P,T,C){for(var G=[],K=new t(G,S,C[1],C[1],C[0],C[0]),O=-17,D=C[0],R=C[1]+O,N=0;N<S.length;N++){var J=S.charCodeAt(N),Q=H[J];Q&&(G.push(new u(J,D,R,Q)),D+=Q.advance+T)}return G.length?(B(K,H,M,F,E,I,P),K):!1}function B(H,Q,N,U,M,R,X){var I=null,J=0,O=0,T=0,W=0,K=H.positionedGlyphs;if(U){for(var G=0;G<K.length;G++){var V=K[G];if(V.x-=J,V.y+=N*T,V.x>U&&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<K.length;F++){K[F].x+=M,K[F].y+=C}}function w(E,D){if(!E||!E.rect){return null}var J=D["icon-offset"][0],H=D["icon-offset"][1],I=J-E.width/2,G=I+E.width,C=H-E.height/2,F=C+E.height;return new p(E,C,F,I,G)}function p(D,C,G,E,F){this.image=D,this.top=C,this.bottom=G,this.left=E,this.right=F}o.exports={shapeText:A,shapeIcon:w};var s={32:!0}},{}],77:[function(r,s,q){function o(w,v){this.width=w,this.height=v,this.bin=new t(w,v),this.images={},this.data=!1,this.texture=0,this.filter=0,this.pixelRatio=1,this.dirty=!0}function p(K,C,F,D,J,M,v,z,A,B,w){var G,H,I=D*C+F,E=z*M+v;if(w){for(E-=M,H=-1;B>=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<this.data.length;z++){this.data[z]=0}}},o.prototype.copy=function(z,w,C){if(this.sprite.img.data){var B=new Uint32Array(this.sprite.img.data.buffer);this.allocate();var v=this.data,A=1;p(B,this.sprite.img.width,w.x,w.y,v,this.width*this.pixelRatio,(z.x+A)*this.pixelRatio,(z.y+A)*this.pixelRatio,w.width,w.height,C),this.dirty=!0}},o.prototype.setSprite=function(v){this.sprite=v},o.prototype.addIcons=function(w,v){for(var z=0;z<w.length;z++){this.getImage(w[z])}v(null,this.images)},o.prototype.bind=function(z,w){var D=!1;this.texture?z.bindTexture(z.TEXTURE_2D,this.texture):(this.texture=z.createTexture(),z.bindTexture(z.TEXTURE_2D,this.texture),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,z.CLAMP_TO_EDGE),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,z.CLAMP_TO_EDGE),D=!0);var B=w?z.LINEAR:z.NEAREST;if(B!==this.filter&&(z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MIN_FILTER,B),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MAG_FILTER,B),this.filter=B),this.dirty&&(this.allocate(),D?z.texImage2D(z.TEXTURE_2D,0,z.RGBA,this.width*this.pixelRatio,this.height*this.pixelRatio,0,z.RGBA,z.UNSIGNED_BYTE,new Uint8Array(this.data.buffer)):z.texSubImage2D(z.TEXTURE_2D,0,0,0,this.width*this.pixelRatio,this.height*this.pixelRatio,z.RGBA,z.UNSIGNED_BYTE,new Uint8Array(this.data.buffer)),this.dirty=!1,this.ctx)){var v=this.ctx.getImageData(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio);v.data.set(new Uint8ClampedArray(this.data.buffer)),this.ctx.putImageData(v,0,0),this.ctx.strokeStyle="red";for(var A=0;A<this.bin.free.length;A++){var C=this.bin.free[A];this.ctx.strokeRect(C.x*this.pixelRatio,C.y*this.pixelRatio,C.w*this.pixelRatio,C.h*this.pixelRatio)}}}},{"./bin_pack":63}],78:[function(p,o,r){var t=p("../util/util"),w=p("../util/interpolate"),s=p("../util/browser"),z=p("../geo/lng_lat"),q=p("../geo/lng_lat_bounds"),v=p("point-geometry"),u=o.exports=function(){};t.extend(u.prototype,{getCenter:function(){return this.transform.center},setCenter:function(A){return this.jumpTo({center:A}),this},panBy:function(B,A){return this.panTo(this.transform.center,t.extend({offset:v.convert(B).mult(-1)},A)),this},panTo:function(B,A){this.stop(),B=z.convert(B),A=t.extend({duration:500,easing:t.ease,offset:[0,0]},A);var D=this.transform,F=v.convert(A.offset).rotate(-D.angle),E=D.point,C=D.project(B).sub(F);return A.noMoveStart||this.fire("movestart"),this._ease(function(G){D.center=D.unproject(E.add(C.sub(E).mult(G))),this.fire("move")},function(){this.fire("moveend")},A),this},getZoom:function(){return this.transform.zoom},setZoom:function(A){return this.jumpTo({zoom:A}),this},zoomTo:function(B,A){this.stop(),A=t.extend({duration:500},A),A.easing=this._updateEasing(A.duration,B,A.easing);var C=this.transform,E=C.center,D=C.zoom;return A.around?E=z.convert(A.around):A.offset&&(E=C.pointLocation(C.centerPoint.add(v.convert(A.offset)))),A.animate===!1&&(A.duration=0),this.zooming||(this.zooming=!0,this.fire("movestart")),this._ease(function(F){C.setZoomAround(w(D,B,F),E),this.fire("move").fire("zoom")},function(){this.ease=null,A.duration>=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())<this.options.bearingSnap?this.resetNorth(A):this},getPitch:function(){return this.transform.pitch},setPitch:function(A){return this.jumpTo({pitch:A}),this},fitBounds:function(H,D){D=t.extend({padding:0,offset:[0,0],maxZoom:1/0},D),H=q.convert(H);var F=v.convert(D.offset),C=this.transform,B=C.project(H.getNorthWest()),A=C.project(H.getSouthEast()),I=A.sub(B),G=(C.width-2*D.padding-2*Math.abs(F.x))/I.x,E=(C.height-2*D.padding-2*Math.abs(F.y))/I.y;return D.center=C.unproject(B.add(A).div(2)),D.zoom=Math.min(C.scaleZoom(C.scale*Math.min(G,E)),D.maxZoom),D.bearing=0,D.linear?this.easeTo(D):this.flyTo(D)},jumpTo:function(B){this.stop();var A=this.transform,C=!1,E=!1,D=!1;return"center" in B&&(A.center=z.convert(B.center)),"zoom" in B&&A.zoom!==+B.zoom&&(C=!0,A.zoom=+B.zoom),"bearing" in B&&A.bearing!==+B.bearing&&(E=!0,A.bearing=+B.bearing),"pitch" in B&&A.pitch!==+B.pitch&&(D=!0,A.pitch=+B.pitch),this.fire("movestart").fire("move"),C&&this.fire("zoom"),E&&this.fire("rotate"),D&&this.fire("pitch"),this.fire("moveend")},easeTo:function(M){this.stop(),M=t.extend({offset:[0,0],duration:500,easing:t.ease},M);var E=this.transform,H=v.convert(M.offset).rotate(-E.angle),C=E.point,B=this.getZoom(),A=this.getBearing(),N=this.getPitch(),J="zoom" in M?+M.zoom:B,F="bearing" in M?this._normalizeBearing(M.bearing,A):A,K="pitch" in M?+M.pitch:N,G=E.zoomScale(J-B),I="center" in M?E.project(z.convert(M.center)).sub(H.div(G)):C,D=z.convert(M.around);return J!==B&&(this.zooming=!0),A!==F&&(this.rotating=!0),this.zooming&&!D&&(D=E.pointLocation(E.centerPoint.add(I.sub(C).div(1-1/G)))),this.fire("movestart"),this._ease(function(O){this.zooming?E.setZoomAround(w(B,J,O),D):E.center=E.unproject(C.add(I.sub(C).mult(O))),this.rotating&&(E.bearing=w(A,F,O)),K!==N&&(E.pitch=w(N,K,O)),this.fire("move"),this.zooming&&this.fire("zoom"),this.rotating&&this.fire("rotate")},function(){this.zooming=!1,this.rotating=!1,this.fire("moveend")},M),this},flyTo:function(I){function V(M){var B=(E*E-ac*ac+(M?-1:1)*C*C*ae*ae)/(2*(M?E:ac)*C*ae);return Math.log(Math.sqrt(B*B+1)-B)}function Z(B){return(Math.exp(B)-Math.exp(-B))/2}function Q(B){return(Math.exp(B)+Math.exp(-B))/2}function P(B){return Z(B)/Q(B)}this.stop(),I=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},I);var K=this.transform,J=v.convert(I.offset),ad=this.getZoom(),W=this.getBearing(),H="center" in I?z.convert(I.center):this.getCenter(),Y="zoom" in I?+I.zoom:ad,ab="bearing" in I?this._normalizeBearing(I.bearing,W):W,R=K.zoomScale(Y-ad),X=K.point,aa=K.project(H).sub(J.div(R)),O=K.worldSize,S=I.curve,G=I.speed,ac=Math.max(K.width,K.height),E=ac/R,ae=aa.sub(X).mag(),C=S*S,D=V(0),F=function(B){return Q(D)/Q(D+S*B)},A=function(B){return ac*((Q(D)*P(D+S*B)-Z(D))/C)/ae},N=(V(1)-D)/S;if(Math.abs(ae)<0.000001){if(Math.abs(ac-E)<0.000001){return this}var U=ac>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)<C&&(B-=360),Math.abs(B+360-A)<C&&(B+=360),B},_updateEasing:function(H,D,F){var C;if(this.ease){var B=this.ease,A=(Date.now()-B.start)/B.duration,I=B.easing(A+0.01)-B.easing(A),G=0.27/Math.sqrt(I*I+0.0001)*0.01,E=Math.sqrt(0.0729-G*G);C=t.bezier(G,E,0.25,1)}else{C=F?t.bezier.apply(t,F):t.ease}return this.ease={start:(new Date).getTime(),to:Math.pow(2,D),duration:H,easing:C},C}})},{"../geo/lng_lat":20,"../geo/lng_lat_bounds":21,"../util/browser":95,"../util/interpolate":102,"../util/util":106,"point-geometry":137}],79:[function(q,r,p){function s(){}var u=q("./control"),t=q("../../util/dom"),o=q("../../util/util");r.exports=s,s.prototype=o.inherit(u,{options:{position:"bottom-right"},onAdd:function(w){var v="mapboxgl-ctrl-attrib",z=this._container=t.create("div",v,w.getContainer());return this._update(),w.on("source.load",this._update.bind(this)),w.on("source.change",this._update.bind(this)),w.on("source.remove",this._update.bind(this)),w.on("moveend",this._updateEditLink.bind(this)),z},_update:function(){var w=[];if(this._map.style){for(var v in this._map.style.sources){var z=this._map.style.sources[v];z.attribution&&w.indexOf(z.attribution)<0&&w.push(z.attribution)}}this._container.innerHTML=w.join(" | "),this._editLink=this._container.getElementsByClassName("mapbox-improve-map")[0],this._updateEditLink()},_updateEditLink:function(){if(this._editLink){var v=this._map.getCenter();this._editLink.href="https://www.mapbox.com/map-feedback/#/"+v.lng+"/"+v.lat+"/"+Math.round(this._map.getZoom()+1)}}})},{"../../util/dom":98,"../../util/util":106,"./control":80}],80:[function(p,q,o){function r(){}q.exports=r,r.prototype={addTo:function(v){this._map=v;var u=this._container=this.onAdd(v);if(this.options&&this.options.position){var s=this.options.position,w=v._controlCorners[s];u.className+=" mapboxgl-ctrl",-1!==s.indexOf("bottom")?w.insertBefore(u,w.firstChild):w.appendChild(u)}return this},remove:function(){return this._container.parentNode.removeChild(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this}}},{}],81:[function(q,r,p){function u(v){o.setOptions(this,v)}var t=q("./control"),s=q("../../util/dom"),o=q("../../util/util");r.exports=u,u.prototype=o.inherit(t,{options:{position:"top-right"},onAdd:function(v){var A="mapboxgl-ctrl",w=this._container=s.create("div",A+"-group",v.getContainer());this._zoomInButton=this._createButton(A+"-icon "+A+"-zoom-in",v.zoomIn.bind(v)),this._zoomOutButton=this._createButton(A+"-icon "+A+"-zoom-out",v.zoomOut.bind(v)),this._compass=this._createButton(A+"-compass",v.resetNorth.bind(v));var z=this._compassCanvas=s.create("canvas",A+"-compass-canvas",this._compass);return z.style.cssText="width:30px; height:30px;",z.width=52,z.height=52,this._compass.addEventListener("mousedown",this._onCompassDown.bind(this)),this._onCompassMove=this._onCompassMove.bind(this),this._onCompassUp=this._onCompassUp.bind(this),this._compassCtx=z.getContext("2d"),v.on("rotate",this._drawNorth.bind(this)),this._drawNorth(),w},_onCompassDown:function(v){s.disableDrag(),document.addEventListener("mousemove",this._onCompassMove),document.addEventListener("mouseup",this._onCompassUp),this._prevX=v.screenX,v.stopPropagation()},_onCompassMove:function(v){var z=v.screenX,w=2>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;K<M.length;K++){this._classes[M[K]]=!0}this.style&&this.style._cascade(this._classes,N)},hasClass:function(K){return !!this._classes[K]},getClasses:function(){return Object.keys(this._classes)},resize:function(){var K=0,M=0;return this._container&&(K=this._container.offsetWidth||400,M=this._container.offsetHeight||300),this._canvas.resize(K,M),this.transform.width=K,this.transform.height=M,this.transform._constrain(),this.painter.resize(K,M),this.fire("movestart").fire("move").fire("resize").fire("moveend")},getBounds:function(){return new D(this.transform.pointLocation(new G(0,0)),this.transform.pointLocation(this.transform.size))},project:function(K){return this.transform.locationPoint(H.convert(K))},unproject:function(K){return this.transform.pointLocation(G.convert(K))},featuresAt:function(M,P,K){var O=this.unproject(M).wrap(),N=this.transform.locationCoordinate(O);return this.style.featuresAt(N,P,K),this},featuresIn:function(M,N,K){return"undefined"==typeof K&&(K=N,N=M,M=[G.convert([0,0]),G.convert([this.transform.width,this.transform.height])]),M=M.map(G.convert.bind(G)),M=[new G(Math.min(M[0].x,M[1].x),Math.min(M[0].y,M[1].y)),new G(Math.max(M[0].x,M[1].x),Math.max(M[0].y,M[1].y))].map(this.transform.pointCoordinate.bind(this.transform)),this.style.featuresIn(M,N,K),this},batch:function(K){this.style.batch(K),this.style._cascade(this._classes),this.update(!0)},setStyle:function(K){return this.style&&(this.style.off("load",this._onStyleLoad).off("error",this._forwardStyleEvent).off("change",this._onStyleChange).off("source.add",this._onSourceAdd).off("source.remove",this._onSourceRemove).off("source.load",this._onSourceUpdate).off("source.error",this._forwardSourceEvent).off("source.change",this._onSourceUpdate).off("layer.add",this._forwardLayerEvent).off("layer.remove",this._forwardLayerEvent).off("tile.add",this._forwardTileEvent).off("tile.remove",this._forwardTileEvent).off("tile.load",this.update).off("tile.error",this._forwardTileEvent).off("tile.stats",this._forwardTileEvent)._remove(),this.off("rotate",this.style._redoPlacement),this.off("pitch",this.style._redoPlacement)),K?(K instanceof o?this.style=K:this.style=new o(K,this.animationLoop),this.style.on("load",this._onStyleLoad).on("error",this._forwardStyleEvent).on("change",this._onStyleChange).on("source.add",this._onSourceAdd).on("source.remove",this._onSourceRemove).on("source.load",this._onSourceUpdate).on("source.error",this._forwardSourceEvent).on("source.change",this._onSourceUpdate).on("layer.add",this._forwardLayerEvent).on("layer.remove",this._forwardLayerEvent).on("tile.add",this._forwardTileEvent).on("tile.remove",this._forwardTileEvent).on("tile.load",this.update).on("tile.error",this._forwardTileEvent).on("tile.stats",this._forwardTileEvent),this.on("rotate",this.style._redoPlacement),this.on("pitch",this.style._redoPlacement),this):(this.style=null,this)},addSource:function(K,M){return this.style.addSource(K,M),this},removeSource:function(K){return this.style.removeSource(K),this},getSource:function(K){return this.style.getSource(K)},addLayer:function(K,M){return this.style.addLayer(K,M),this.style._cascade(this._classes),this},removeLayer:function(K){return this.style.removeLayer(K),this.style._cascade(this._classes),this},setFilter:function(K,M){return this.style.setFilter(K,M),this},setLayerZoomRange:function(M,N,K){return this.style.setLayerZoomRange(M,N,K),this},getFilter:function(K){return this.style.getFilter(K)},setPaintProperty:function(M,O,K,N){return this.batch(function(P){P.setPaintProperty(M,O,K,N)}),this},getPaintProperty:function(M,N,K){return this.style.getPaintProperty(M,N,K)},setLayoutProperty:function(M,N,K){return this.batch(function(O){O.setLayoutProperty(M,N,K)}),this},getLayoutProperty:function(K,M){return this.style.getLayoutProperty(K,M)},getContainer:function(){return this._container},getCanvasContainer:function(){return this._canvasContainer},getCanvas:function(){return this._canvas.getElement()},_setupContainer:function(){var M=this.options.container,P=this._container="string"==typeof M?document.getElementById(M):M;P.classList.add("mapboxgl-map");var K=this._canvasContainer=E.create("div","mapboxgl-canvas-container",P);this.options.interactive&&K.classList.add("mapboxgl-interactive"),this._canvas=new B(this,K);var O=E.create("div","mapboxgl-control-container",P),N=this._controlCorners={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(Q){N[Q]=E.create("div","mapboxgl-ctrl-"+Q,O)})},_setupPainter:function(){var K=this._canvas.getWebGLContext({failIfMajorPerformanceCaveat:this.options.failIfMajorPerformanceCaveat,preserveDrawingBuffer:this.options.preserveDrawingBuffer});return K?void (this.painter=new z(K,this.transform)):void console.error("Failed to initialize WebGL")},_contextLost:function(K){K.preventDefault(),this._frameId&&F.cancelFrame(this._frameId)},_contextRestored:function(){this._setupPainter(),this.resize(),this.update()},loaded:function(){return this._styleDirty||this._sourcesDirty?!1:this.style&&!this.style.loaded()?!1:!0},update:function(K){return this.style?(this._styleDirty=this._styleDirty||K,this._sourcesDirty=!0,this._rerender(),this):this},render:function(){return this.style&&this._styleDirty&&(this._styleDirty=!1,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&!this._sourcesDirtyTimeout&&(this._sourcesDirty=!1,this._sourcesDirtyTimeout=setTimeout(function(){this._sourcesDirtyTimeout=null}.bind(this),50),this.style._updateSources(this.transform)),this.painter.render(this.style,{debug:this.debug,vertices:this.vertices,rotating:this.rotating,zooming:this.zooming}),this.fire("render"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire("load")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||!this.animationLoop.stopped())&&this._rerender(),this},remove:function(){return this._hash&&this._hash.remove(),F.cancelFrame(this._frameId),clearTimeout(this._sourcesDirtyTimeout),this.setStyle(null),"undefined"!=typeof window&&window.removeEventListener("resize",this._onWindowResize,!1),this},onError:function(K){console.error(K.error)},_rerender:function(){this.style&&!this._frameId&&(this._frameId=F.frame(this.render))},_forwardStyleEvent:function(K){this.fire("style."+K.type,p.extend({style:K.target},K))},_forwardSourceEvent:function(K){this.fire(K.type,p.extend({style:K.target},K))},_forwardLayerEvent:function(K){this.fire(K.type,p.extend({style:K.target},K))},_forwardTileEvent:function(K){this.fire(K.type,p.extend({style:K.target},K))},_onStyleLoad:function(M){var N=new A,K=this.transform;K.center.lng===N.center.lng&&K.center.lat===N.center.lat&&K.zoom===N.zoom&&K.bearing===N.bearing&&K.pitch===N.pitch&&this.jumpTo(this.style.stylesheet),this.style._cascade(this._classes,{transition:!1}),this._forwardStyleEvent(M)},_onStyleChange:function(K){this.update(!0),this._forwardStyleEvent(K)},_onSourceAdd:function(K){var M=K.source;M.onAdd&&M.onAdd(this),this._forwardSourceEvent(K)},_onSourceRemove:function(K){var M=K.source;M.onRemove&&M.onRemove(this),this._forwardSourceEvent(K)},_onSourceUpdate:function(K){this.update(),this._forwardSourceEvent(K)},_onWindowResize:function(){this.stop().resize().update()}}),p.extendAll(s.prototype,{_debug:!1,get debugfunction(){return this._debug},set debugfunction(K){this._debug=K,this.update()},_collisionDebug:!1,get collisionDebugfunction(){return this._collisionDebug},set collisionDebugfunction(K){this._collisionDebug=K,this.style._redoPlacement()},_repaint:!1,get repaintfunction(){return this._repaint},set repaintfunction(K){this._repaint=K,this.update()},_vertices:!1,get verticesfunction(){return this._vertices},set verticesfunction(K){this._vertices=K,this.update()}})},{"../geo/lng_lat":20,"../geo/lng_lat_bounds":21,"../geo/transform":22,"../render/painter":37,"../style/animation_loop":51,"../style/style":56,"../util/browser":95,"../util/canvas":96,"../util/dom":98,"../util/evented":100,"../util/util":106,"./camera":78,"./control/attribution":79,"./hash":89,"./interaction":90,"point-geometry":137}],92:[function(q,s,p){function v(w){o.setOptions(this,w),o.bindAll(["_updatePosition","_onClickClose"],this)}s.exports=v;var o=q("../util/util"),r=q("../util/evented"),u=q("../util/dom"),t=q("../geo/lng_lat");v.prototype=o.inherit(r,{options:{closeButton:!0,closeOnClick:!0},addTo:function(w){return this._map=w,this._map.on("move",this._updatePosition),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this},remove:function(){return this._container&&this._container.parentNode.removeChild(this._container),this._map&&(this._map.off("move",this._updatePosition),this._map.off("click",this._onClickClose),delete this._map),this},getLngLat:function(){return this._lngLat},setLngLat:function(w){return this._lngLat=t.convert(w),this._update(),this},setText:function(w){return this._content=document.createTextNode(w),this._updateContent(),this},setHTML:function(z){this._content=document.createDocumentFragment();var w,A=document.createElement("body");for(A.innerHTML=z;;){if(w=A.firstChild,!w){break}this._content.appendChild(w)}return this._updateContent(),this},_update:function(){this._map&&(this._container||(this._container=u.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=u.create("div","mapboxgl-popup-tip",this._container),this._wrapper=u.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=u.create("button","mapboxgl-popup-close-button",this._wrapper),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClickClose))),this._updateContent(),this._updatePosition())},_updateContent:function(){if(this._content&&this._container){for(var w=this._wrapper;w.hasChildNodes();){w.removeChild(w.firstChild)}this.options.closeButton&&w.appendChild(this._closeButton),w.appendChild(this._content)}},_updatePosition:function(){if(this._lngLat&&this._container){var A=this._map.project(this._lngLat).round(),z=this.options.anchor;if(!z){var C=this._container.offsetWidth,D=this._container.offsetHeight;z=A.y<D?["top"]:A.y>this._map.transform.height-D?["bottom"]:[],A.x<C/2?z.push("left"):A.x>this._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("<response>"===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:"<response>",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<v.length;u++){var w=document.createElement("source");r(v[u])||(z.crossOrigin="Anonymous"),w.src=v[u],z.appendChild(w)}return z.getData=function(){return z},z}},{}],95:[function(q,r,p){var o=q("./canvas"),t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;p.frame=function(u){return t(u)};var s=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame;p.cancelFrame=function(u){s(u)},p.timed=function(z,w,v){function B(C){A||(window.performance||(C=Date.now()),C>=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;u<v.length;u++){if(!v[u]()){return !1}}return !0},p.hardwareConcurrency=navigator.hardwareConcurrency||8,Object.defineProperty(p,"devicePixelRatio",{get:function(){return window.devicePixelRatio}})},{"./canvas":96}],96:[function(s,t,q){function o(u,v){this.canvas=document.createElement("canvas"),u&&v&&(this.canvas.style.position="absolute",this.canvas.classList.add("mapboxgl-canvas"),this.canvas.addEventListener("webglcontextlost",u._contextLost.bind(u),!1),this.canvas.addEventListener("webglcontextrestored",u._contextRestored.bind(u),!1),this.canvas.setAttribute("tabindex",0),v.appendChild(this.canvas))}var p=s("../util");t.exports=o,o.prototype.resize=function(v,w){var u=window.devicePixelRatio||1;this.canvas.width=u*v,this.canvas.height=u*w,this.canvas.style.width=v+"px",this.canvas.style.height=w+"px"};var r={antialias:!1,alpha:!0,stencil:!0,depth:!1};o.prototype.getWebGLContext=function(u){return u=p.extend({},u,r),this.canvas.getContext("webgl",u)||this.canvas.getContext("experimental-webgl",u)},o.prototype.supportsWebGLContext=function(u){var v=p.extend({failIfMajorPerformanceCaveat:u},r);return"probablySupportsContext" in this.canvas?this.canvas.probablySupportsContext("webgl",v)||this.canvas.probablySupportsContext("experimental-webgl",v):"supportsContext" in this.canvas?this.canvas.supportsContext("webgl",v)||this.canvas.supportsContext("experimental-webgl",v):!!window.WebGLRenderingContext&&!!this.getWebGLContext(u)},o.prototype.getElement=function(){return this.canvas}},{"../util":106}],97:[function(r,s,q){function p(w,u){this.actors=[],this.currentActor=0;for(var z=0;w>z;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<this.actors.length;w++){this.actors[w].send(v,u)}},send:function(w,u,z,A,v){return("number"!=typeof A||isNaN(A))&&(A=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[A].send(w,u,z,v),A},remove:function(){for(var u=0;u<this.actors.length;u++){this.actors[u].target.terminate()}this.actors=[]}}},{"../../source/worker":49,"../actor":93,webworkify:149}],98:[function(q,p,r){function u(B){for(var A=0;A<B.length;A++){if(B[A] in t){return B[A]}}}function z(A){A.preventDefault(),A.stopPropagation(),window.removeEventListener("click",z,!0)}var v=q("point-geometry");r.create=function(C,A,B){var D=document.createElement(C);return A&&(D.className=A),B&&B.appendChild(D),D};var t=document.documentElement.style,o=u(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),s;r.disableDrag=function(){o&&(s=t[o],t[o]="none")},r.enableDrag=function(){o&&(t[o]=s)};var w=u(["transform","WebkitTransform"]);r.setTransform=function(B,A){B.style[w]=A},r.suppressClick=function(){window.addEventListener("click",z,!0),window.setTimeout(function(){window.removeEventListener("click",z,!0)},0)},r.mousePos=function(C,A){var B=C.getBoundingClientRect();return A=A.touches?A.touches[0]:A,new v(A.clientX-B.left-C.clientLeft,A.clientY-B.top-C.clientTop)}},{"point-geometry":137}],99:[function(p,q,o){q.exports={API_URL:"https://api.mapbox.com",REQUIRE_ACCESS_TOKEN:!0}},{}],100:[function(q,s,p){var o=q("./util"),r={on:function(u,v){return this._events=this._events||{},this._events[u]=this._events[u]||[],this._events[u].push(v),this},off:function(u,w){if(!u){return delete this._events,this}if(!this.listens(u)){return this}if(w){var v=this._events[u].indexOf(w);v>=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<w.length;u++){w[u].call(this,z)}return this},listens:function(u){return !(!this._events||!this._events[u])}};s.exports=r},{"./util":106}],101:[function(s,t,q){function p(v,w){this.stacks=v.readFields(r,[],w)}function r(v,A,z){if(1===v){var w=z.readMessage(o,{glyphs:{}});A.push(w)}}function o(v,A,z){if(1===v){A.name=z.readString()}else{if(2===v){A.range=z.readString()}else{if(3===v){var w=z.readMessage(u,{});A.glyphs[w.id]=w}}}}function u(v,z,w){1===v?z.id=w.readVarint():2===v?z.bitmap=w.readBytes():3===v?z.width=w.readVarint():4===v?z.height=w.readVarint():5===v?z.left=w.readSVarint():6===v?z.top=w.readSVarint():7===v&&(z.advance=w.readVarint())}t.exports=p},{}],102:[function(q,r,o){function p(s,u,v){return s*(1-v)+u*v}r.exports=p,p.number=p,p.vec2=function(s,u,v){return[p(s[0],u[0],v),p(s[1],u[1],v)]},p.color=function(s,u,v){return[p(s[0],u[0],v),p(s[1],u[1],v),p(s[2],u[2],v),p(s[3],u[3],v)]},p.array=function(s,u,v){return s.map(function(w,z){return p(w,u[z],v)})}},{}],103:[function(r,s,o){function t(v,u,w){if(w=w||q.ACCESS_TOKEN,!w&&q.REQUIRE_ACCESS_TOKEN){throw new Error("An API access token is required to use Mapbox GL. See https://www.mapbox.com/developers/api/#access-tokens")}if(v=v.replace(/^mapbox:\/\//,q.API_URL+u),v+=-1!==v.indexOf("?")?"&access_token=":"?access_token=",q.REQUIRE_ACCESS_TOKEN){if("s"===w[0]){throw new Error("Use a public access token (pk.*) with Mapbox GL JS, not a secret access token (sk.*). See https://www.mapbox.com/developers/api/#access-tokens")}v+=w}return v}var q=r("./config"),p=r("./browser");s.exports.normalizeStyleURL=function(z,w){if(!z.match(/^mapbox:\/\/styles\//)){return z}var A=z.split("/"),u=A[3],B=A[4],v=A[5]?"/draft":"";return t("mapbox://"+u+"/"+B+v,"/styles/v1/",w)},s.exports.normalizeSourceURL=function(v,u){return v.match(/^mapbox:\/\//)?t(v+".json","/v4/",u)+"&secure":v},s.exports.normalizeGlyphsURL=function(v,u){if(!v.match(/^mapbox:\/\//)){return v}var w=v.split("/")[3];return t("mapbox://"+w+"/{fontstack}/{range}.pbf","/fonts/v1/",u)},s.exports.normalizeSpriteURL=function(B,A,C,w){if(!B.match(/^mapbox:\/\/sprites\//)){return B+A+C}var D=B.split("/"),z=D[3],u=D[4],v=D[5]?"/draft":"";return t("mapbox://"+z+"/"+u+v+"/sprite"+A+C,"/styles/v1/",w)},s.exports.normalizeTileURL=function(v,u){return u&&u.match(/^mapbox:\/\//)?v.replace(/\.((?:png|jpg)\d*)(?=$|\?)/,p.devicePixelRatio>=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;v<arguments.length;v++){var u=arguments[v];if(null!==u&&void 0!==u){return u}}},o.asyncEach=function(B,v,w){function z(){0===--A&&w()}var A=B.length;if(0===A){return w()}for(var u=0;u<B.length;u++){v(B[u],z)}},o.asyncAll=function(B,v,w){var z=B.length,A=new Array(B.length),u=null;B.forEach(function(D,C){v(D,function(F,E){F&&(u=F),A[C]=E,0===--z&&w(u,A)})})},o.keysDifference=function(z,u){var v=[];for(var w in z){w in u||v.push(w)}return v},o.extend=function(z){for(var u=1;u<arguments.length;u++){var v=arguments[u];for(var w in v){z[w]=v[w]}}return z},o.extendAll=function(w,u){for(var v in u){Object.defineProperty(w,v,Object.getOwnPropertyDescriptor(u,v))}return w},o.inherit=function(z,u){var v="function"==typeof z?z.prototype:z,w=Object.create(v);return o.extendAll(w,u),w},o.pick=function(A,u){for(var v={},w=0;w<u.length;w++){var z=u[w];z in A&&(v[z]=A[z])}return v};var t=1;o.uniqueId=function(){return t++},o.throttle=function(D,z,A){var B,C,w,v;return v=function(){B=!1,C&&(w.apply(A,C),C=!1)},w=function(){B?C=arguments:(D.apply(A,arguments),setTimeout(v,z),B=!0)}},o.debounce=function(z,u){var v,w;return function(){w=arguments,clearTimeout(v),v=setTimeout(function(){z.apply(null,w)},u)}},o.bindAll=function(v,u){v.forEach(function(w){u[w]=u[w].bind(u)})},o.bindHandlers=function(v){for(var u in v){"function"==typeof v[u]&&0===u.indexOf("_on")&&(v[u]=v[u].bind(v))}},o.setOptions=function(w,u){w.hasOwnProperty("options")||(w.options=w.options?Object.create(w.options):{});for(var v in u){w.options[v]=u[v]}return w.options},o.getCoordinatesCenter=function(z){for(var F=1/0,v=1/0,B=-(1/0),w=-(1/0),A=0;A<z.length;A++){F=Math.min(F,z[A].column),v=Math.min(v,z[A].row),B=Math.max(B,z[A].column),w=Math.max(w,z[A].row)}var E=B-F,D=w-v,C=Math.max(E,D);return new s((F+B)/2,(v+w)/2,0).zoomTo(Math.floor(-Math.log(C)/Math.LN2))}},{"../geo/coordinate":19,unitbezier:141}],107:[function(r,p,u){function q(B){return B=Math.round(B),0>B?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<H.length;E++){var I,J,z=H[E],G=z.geometry,F=z.type;if(I=z.min[C],J=z.max[C],I>=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<D.length;w++){var z=D[w],B=z[C];B>=E&&A>=B&&v.push(z)}return v}function s(Q,I,D,F,K,C){for(var M=[],E=0;E<Q.length;E++){var G,N,R,S=0,H=0,P=null,O=Q[E],J=O.area,B=O.dist,A=O.length,z=[];for(N=0;A-1>N;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;F<E.features.length;F++){v(D,E.features[F],C)}}else{"Feature"===E.type?v(D,E,C):v(D,{geometry:E},C)}return D}function v(H,M,C){var D,E,J,G=M.geometry,I=G.type,F=G.coordinates,K=M.properties;if("Point"===I){H.push(r(K,1,[t(F)]))}else{if("MultiPoint"===I){H.push(r(K,1,z(F)))}else{if("LineString"===I){H.push(r(K,2,[z(F,C)]))}else{if("MultiLineString"===I||"Polygon"===I){for(J=[],D=0;D<F.length;D++){J.push(z(F[D],C))}H.push(r(K,"Polygon"===I?3:2,J))}else{if("MultiPolygon"===I){for(J=[],D=0;D<F.length;D++){for(E=0;E<F[D].length;E++){J.push(z(F[D][E],C))}}H.push(r(K,3,J))}else{if("GeometryCollection"!==I){throw new Error("Input data is not a valid GeoJSON object.")}for(D=0;D<G.geometries.length;D++){v(H,{geometry:G.geometries[D],properties:K},C)}}}}}}}function r(E,C,D){var F={geometry:D,type:C,tags:E||null,min:[2,1],max:[-1,0]};return s(F),F}function z(E,C){for(var D=[],F=0;F<E.length;F++){D.push(t(E[F]))}return C&&(B(D,C),u(D)),D}function t(E){var C=Math.sin(E[1]*Math.PI/180),D=E[0]/360+0.5,F=0.5-0.25*Math.log((1+C)/(1-C))/Math.PI;return F=-1>F?-1:F>1?1:F,[D,F,0]}function u(F){for(var D,E,G=0,H=0,C=0;C<F.length-1;C++){D=E||F[C],E=F[C+1],G+=D[0]*E[1]-E[0]*D[1],H+=Math.abs(E[0]-D[0])+Math.abs(E[1]-D[1])}F.area=Math.abs(G/2),F.dist=H}function s(E){var C=E.geometry,D=E.min,F=E.max;if(1===E.type){A(D,F,C)}else{for(var G=0;G<C.length;G++){A(D,F,C[G])}}return E}function A(E,C,D){for(var F,G=0;G<D.length;G++){F=D[G],E[0]=Math.min(F[0],E[0]),C[0]=Math.max(F[0],C[0]),E[1]=Math.min(F[1],E[1]),C[1]=Math.max(F[1],C[1])}}o.exports=w;var B=p("./simplify")},{"./simplify":112}],111:[function(v,r,w){function E(G,F){return new q(G,F)}function q(H,G){G=this.options=A(Object.create(this.options),G);var F=G.debug;F&&console.time("preprocess data");var I=1<<G.maxZoom,J=B(H,G.tolerance/(I*G.extent));this.tiles={},this.tileCoords=[],F&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",G.indexMaxZoom,G.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),J=p(J,G.buffer/G.extent,D),J.length&&this.splitTile(J,0,0,0),F&&(J.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function z(H,G,F){return 32*((1<<H)*F+G)+H}function D(H,G,F){return[F,(F-H[0])*(G[1]-H[1])/(G[0]-H[0])+H[1],1]}function C(H,G,F){return[(F-H[1])*(G[0]-H[0])/(G[1]-H[1])+H[0],F,1]}function A(H,G){for(var F in G){H[F]=G[F]}return H}function o(K,H,G){var M=K.source;if(1!==M.length){return !1}var N=M[0];if(3!==N.type||N.geometry.length>1){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<<Q,ah=z(Q,ac,X),aa=this.tiles[ah],af=Q===ak.maxZoom?0:ak.tolerance/(W*ak.extent);if(!aa&&(P>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<<Y-Q;if(ac!==Math.floor(U/K)||X!==Math.floor(R/K)){continue}}else{if(Q===ak.indexMaxZoom||aa.numPoints<=ak.indexMaxPoints){continue}}if(ak.solidChildren||!o(aa,ak.extent,ak.buffer)){aa.source=null,P>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<<N;S=(S%T+T)%T;var K=z(N,S,M);if(this.tiles[K]){return t.tile(this.tiles[K],I)}F>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<<N-O;K=z(O,Math.floor(S/J),Math.floor(M/J))}return this.tiles[K]?t.tile(this.tiles[K],I):null}},{"./clip":109,"./convert":110,"./tile":113,"./transform":114,"./wrap":115}],112:[function(q,r,o){function p(G,B){var E,w,v,H,z=B*B,D=G.length,F=0,A=D-1,C=[];for(G[F][2]=1,G[A][2]=1;A;){for(w=0,E=F+1;A>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;D<C.length;D++){v.numFeatures++,r(v,C[D],B,E);var G=C[D].min,A=C[D].max;G[0]<v.min[0]&&(v.min[0]=G[0]),G[1]<v.min[1]&&(v.min[1]=G[1]),A[0]>v.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;C<J.length;C++){w.push(J[C]),E.numPoints++,E.numSimplified++}}else{for(C=0;C<J.length;C++){if(v=J[C],A||!(2===B&&v.dist<I||3===B&&v.area<D)){var F=[];for(H=0;H<v.length;H++){G=v[H],(A||G[2]>D)&&(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;z<v.features.length;z++){var C=v.features[z],G=C.geometry,A=C.type;if(1===A){for(E=0;E<G.length;E++){G[E]=s(G[E],H,D,F,I)}}else{for(E=0;E<G.length;E++){var B=G[E];for(w=0;w<B.length;w++){B[w]=s(B[w],H,D,F,I)}}}}return v.transformed=!0,v}function s(w,v,C,A,B){var z=Math.round(v*(w[0]*C-A)),u=Math.round(v*(w[1]*C-B));return[z,u]}o.tile=r,o.point=s},{}],115:[function(q,r,p){function s(A,w,B){var C=A,v=t(A,1,-1-w,w,0,B,-1,2),z=t(A,1,1-w,2+w,0,B,-1,2);return(v||z)&&(C=t(A,1,-w,1+w,0,B,-1,2),v&&(C=o(v,1).concat(C)),z&&(C=C.concat(o(z,-1)))),C}function o(B,z){for(var C=[],D=0;D<B.length;D++){var v,A=B[D],w=A.type;if(1===w){v=u(A.geometry,z)}else{v=[];for(var E=0;E<A.geometry.length;E++){v.push(u(A.geometry[E],z))}}C.push({geometry:v,type:w,tags:A.tags,min:[A.min[0]+z,A.min[1]],max:[A.max[0]+z,A.max[1]]})}return C}function u(w,v){var z=[];z.area=w.area,z.dist=w.dist;for(var A=0;A<w.length;A++){z.push([w[A][0]+v,w[A][1],w[A][2]])}return z}var t=q("./clip");r.exports=s},{"./clip":109}],116:[function(p,q,o){o.glMatrix=p("./gl-matrix/common.js"),o.mat2=p("./gl-matrix/mat2.js"),o.mat2d=p("./gl-matrix/mat2d.js"),o.mat3=p("./gl-matrix/mat3.js"),o.mat4=p("./gl-matrix/mat4.js"),o.quat=p("./gl-matrix/quat.js"),o.vec2=p("./gl-matrix/vec2.js"),o.vec3=p("./gl-matrix/vec3.js"),o.vec4=p("./gl-matrix/vec4.js")},{"./gl-matrix/common.js":117,"./gl-matrix/mat2.js":118,"./gl-matrix/mat2d.js":119,"./gl-matrix/mat3.js":120,"./gl-matrix/mat4.js":121,"./gl-matrix/quat.js":122,"./gl-matrix/vec2.js":123,"./gl-matrix/vec3.js":124,"./gl-matrix/vec4.js":125}],117:[function(q,r,o){var p={};p.EPSILON=0.000001,p.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,p.RANDOM=Math.random,p.setMatrixArrayType=function(t){GLMAT_ARRAY_TYPE=t};var s=Math.PI/180;p.toRadian=function(t){return t*s},r.exports=p},{}],118:[function(q,r,o){var p=q("./common.js"),s={};s.create=function(){var u=new p.ARRAY_TYPE(4);return u[0]=1,u[1]=0,u[2]=0,u[3]=1,u},s.clone=function(u){var v=new p.ARRAY_TYPE(4);return v[0]=u[0],v[1]=u[1],v[2]=u[2],v[3]=u[3],v},s.copy=function(u,v){return u[0]=v[0],u[1]=v[1],u[2]=v[2],u[3]=v[3],u},s.identity=function(u){return u[0]=1,u[1]=0,u[2]=0,u[3]=1,u},s.transpose=function(u,w){if(u===w){var v=w[1];u[1]=w[2],u[2]=v}else{u[0]=w[0],u[1]=w[2],u[2]=w[1],u[3]=w[3]}return u},s.invert=function(z,D){var A=D[0],v=D[1],w=D[2],C=D[3],B=A*C-w*v;return B?(B=1/B,z[0]=C*B,z[1]=-v*B,z[2]=-w*B,z[3]=A*B,z):null},s.adjoint=function(u,w){var v=w[0];return u[0]=w[3],u[1]=-w[1],u[2]=-w[2],u[3]=v,u},s.determinant=function(u){return u[0]*u[3]-u[2]*u[1]},s.multiply=function(H,z,v){var F=z[0],G=z[1],w=z[2],D=z[3],B=v[0],A=v[1],E=v[2],C=v[3];return H[0]=F*B+w*A,H[1]=G*B+D*A,H[2]=F*E+w*C,H[3]=G*E+D*C,H},s.mul=s.multiply,s.rotate=function(F,z,v){var D=z[0],E=z[1],w=z[2],C=z[3],B=Math.sin(v),A=Math.cos(v);return F[0]=D*A+w*B,F[1]=E*A+C*B,F[2]=D*-B+w*A,F[3]=E*-B+C*A,F},s.scale=function(F,z,v){var D=z[0],E=z[1],w=z[2],C=z[3],B=v[0],A=v[1];return F[0]=D*B,F[1]=E*B,F[2]=w*A,F[3]=C*A,F},s.fromRotation=function(v,z){var w=Math.sin(z),u=Math.cos(z);return v[0]=u,v[1]=w,v[2]=-w,v[3]=u,v},s.fromScaling=function(u,v){return u[0]=v[0],u[1]=0,u[2]=0,u[3]=v[1],u},s.str=function(u){return"mat2("+u[0]+", "+u[1]+", "+u[2]+", "+u[3]+")"},s.frob=function(u){return Math.sqrt(Math.pow(u[0],2)+Math.pow(u[1],2)+Math.pow(u[2],2)+Math.pow(u[3],2))},s.LDU=function(v,z,w,u){return v[2]=u[2]/u[0],w[0]=u[0],w[1]=u[1],w[3]=u[3]-v[2]*w[1],[v,z,w]},r.exports=s},{"./common.js":117}],119:[function(q,r,o){var p=q("./common.js"),s={};s.create=function(){var u=new p.ARRAY_TYPE(6);return u[0]=1,u[1]=0,u[2]=0,u[3]=1,u[4]=0,u[5]=0,u},s.clone=function(u){var v=new p.ARRAY_TYPE(6);return v[0]=u[0],v[1]=u[1],v[2]=u[2],v[3]=u[3],v[4]=u[4],v[5]=u[5],v},s.copy=function(u,v){return u[0]=v[0],u[1]=v[1],u[2]=v[2],u[3]=v[3],u[4]=v[4],u[5]=v[5],u},s.identity=function(u){return u[0]=1,u[1]=0,u[2]=0,u[3]=1,u[4]=0,u[5]=0,u},s.invert=function(F,z){var v=z[0],D=z[1],w=z[2],E=z[3],C=z[4],B=z[5],A=v*E-D*w;return A?(A=1/A,F[0]=E*A,F[1]=-D*A,F[2]=-w*A,F[3]=v*A,F[4]=(w*B-E*C)*A,F[5]=(D*C-v*B)*A,F):null},s.determinant=function(u){return u[0]*u[3]-u[1]*u[2]},s.multiply=function(N,z,v){var J=z[0],w=z[1],K=z[2],F=z[3],C=z[4],A=z[5],I=v[0],H=v[1],E=v[2],B=v[3],G=v[4],D=v[5];return N[0]=J*I+K*H,N[1]=w*I+F*H,N[2]=J*E+K*B,N[3]=w*E+F*B,N[4]=J*G+K*D+C,N[5]=w*G+F*D+A,N},s.mul=s.multiply,s.rotate=function(H,z,v){var F=z[0],w=z[1],G=z[2],C=z[3],B=z[4],A=z[5],E=Math.sin(v),D=Math.cos(v);return H[0]=F*D+G*E,H[1]=w*D+C*E,H[2]=F*-E+G*D,H[3]=w*-E+C*D,H[4]=B,H[5]=A,H},s.scale=function(H,z,v){var F=z[0],w=z[1],G=z[2],C=z[3],B=z[4],A=z[5],E=v[0],D=v[1];return H[0]=F*E,H[1]=w*E,H[2]=G*D,H[3]=C*D,H[4]=B,H[5]=A,H},s.translate=function(H,z,v){var F=z[0],w=z[1],G=z[2],C=z[3],B=z[4],A=z[5],E=v[0],D=v[1];return H[0]=F,H[1]=w,H[2]=G,H[3]=C,H[4]=F*E+G*D+B,H[5]=w*E+C*D+A,H},s.fromRotation=function(v,z){var w=Math.sin(z),u=Math.cos(z);return v[0]=u,v[1]=w,v[2]=-w,v[3]=u,v[4]=0,v[5]=0,v},s.fromScaling=function(u,v){return u[0]=v[0],u[1]=0,u[2]=0,u[3]=v[1],u[4]=0,u[5]=0,u},s.fromTranslation=function(u,v){return u[0]=1,u[1]=0,u[2]=0,u[3]=1,u[4]=v[0],u[5]=v[1],u},s.str=function(u){return"mat2d("+u[0]+", "+u[1]+", "+u[2]+", "+u[3]+", "+u[4]+", "+u[5]+")"},s.frob=function(u){return Math.sqrt(Math.pow(u[0],2)+Math.pow(u[1],2)+Math.pow(u[2],2)+Math.pow(u[3],2)+Math.pow(u[4],2)+Math.pow(u[5],2)+1)},r.exports=s},{"./common.js":117}],120:[function(q,s,o){var p=q("./common.js"),r={};r.create=function(){var u=new p.ARRAY_TYPE(9);return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=0,u[7]=0,u[8]=1,u},r.fromMat4=function(u,v){return u[0]=v[0],u[1]=v[1],u[2]=v[2],u[3]=v[4],u[4]=v[5],u[5]=v[6],u[6]=v[8],u[7]=v[9],u[8]=v[10],u},r.clone=function(u){var v=new p.ARRAY_TYPE(9);return v[0]=u[0],v[1]=u[1],v[2]=u[2],v[3]=u[3],v[4]=u[4],v[5]=u[5],v[6]=u[6],v[7]=u[7],v[8]=u[8],v},r.copy=function(u,v){return u[0]=v[0],u[1]=v[1],u[2]=v[2],u[3]=v[3],u[4]=v[4],u[5]=v[5],u[6]=v[6],u[7]=v[7],u[8]=v[8],u},r.identity=function(u){return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=0,u[7]=0,u[8]=1,u},r.transpose=function(v,A){if(v===A){var w=A[1],u=A[2],z=A[5];v[1]=A[3],v[2]=A[6],v[3]=w,v[5]=A[7],v[6]=u,v[7]=z}else{v[0]=A[0],v[1]=A[3],v[2]=A[6],v[3]=A[1],v[4]=A[4],v[5]=A[7],v[6]=A[2],v[7]=A[5],v[8]=A[8]}return v},r.invert=function(O,A){var w=A[0],J=A[1],z=A[2],N=A[3],B=A[4],G=A[5],D=A[6],I=A[7],F=A[8],C=F*B-G*I,H=-F*N+G*D,K=I*N-B*D,E=w*C+J*H+z*K;return E?(E=1/E,O[0]=C*E,O[1]=(-F*J+z*I)*E,O[2]=(G*J-z*B)*E,O[3]=H*E,O[4]=(F*w-z*D)*E,O[5]=(-G*w+z*N)*E,O[6]=K*E,O[7]=(-I*w+J*D)*E,O[8]=(B*w-J*N)*E,O):null},r.adjoint=function(H,z){var v=z[0],F=z[1],w=z[2],G=z[3],A=z[4],D=z[5],B=z[6],E=z[7],C=z[8];return H[0]=A*C-D*E,H[1]=w*E-F*C,H[2]=F*D-w*A,H[3]=D*B-G*C,H[4]=v*C-w*B,H[5]=w*G-v*D,H[6]=G*E-A*B,H[7]=F*B-v*E,H[8]=v*A-F*G,H},r.determinant=function(G){var z=G[0],v=G[1],E=G[2],w=G[3],F=G[4],A=G[5],C=G[6],B=G[7],D=G[8];return z*(D*F-A*B)+v*(-D*w+A*C)+E*(B*w-F*C)},r.multiply=function(E,J,G){var W=J[0],I=J[1],D=J[2],K=J[3],T=J[4],O=J[5],V=J[6],S=J[7],N=J[8],A=G[0],C=G[1],P=G[2],H=G[3],F=G[4],B=G[5],U=G[6],z=G[7],Q=G[8];return E[0]=A*W+C*K+P*V,E[1]=A*I+C*T+P*S,E[2]=A*D+C*O+P*N,E[3]=H*W+F*K+B*V,E[4]=H*I+F*T+B*S,E[5]=H*D+F*O+B*N,E[6]=U*W+z*K+Q*V,E[7]=U*I+z*T+Q*S,E[8]=U*D+z*O+Q*N,E},r.mul=r.multiply,r.translate=function(N,A,w){var I=A[0],z=A[1],K=A[2],B=A[3],F=A[4],D=A[5],H=A[6],E=A[7],C=A[8],G=w[0],J=w[1];return N[0]=I,N[1]=z,N[2]=K,N[3]=B,N[4]=F,N[5]=D,N[6]=G*I+J*B+H,N[7]=G*z+J*F+E,N[8]=G*K+J*D+C,N},r.rotate=function(N,A,w){var I=A[0],z=A[1],K=A[2],B=A[3],F=A[4],D=A[5],H=A[6],E=A[7],C=A[8],G=Math.sin(w),J=Math.cos(w);return N[0]=J*I+G*B,N[1]=J*z+G*F,N[2]=J*K+G*D,N[3]=J*B-G*I,N[4]=J*F-G*z,N[5]=J*D-G*K,N[6]=H,N[7]=E,N[8]=C,N},r.scale=function(v,A,w){var u=w[0],z=w[1];return v[0]=u*A[0],v[1]=u*A[1],v[2]=u*A[2],v[3]=z*A[3],v[4]=z*A[4],v[5]=z*A[5],v[6]=A[6],v[7]=A[7],v[8]=A[8],v},r.fromTranslation=function(u,v){return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=v[0],u[7]=v[1],u[8]=1,u},r.fromRotation=function(v,z){var w=Math.sin(z),u=Math.cos(z);return v[0]=u,v[1]=w,v[2]=0,v[3]=-w,v[4]=u,v[5]=0,v[6]=0,v[7]=0,v[8]=1,v},r.fromScaling=function(u,v){return u[0]=v[0],u[1]=0,u[2]=0,u[3]=0,u[4]=v[1],u[5]=0,u[6]=0,u[7]=0,u[8]=1,u},r.fromMat2d=function(u,v){return u[0]=v[0],u[1]=v[1],u[2]=0,u[3]=v[2],u[4]=v[3],u[5]=0,u[6]=v[4],u[7]=v[5],u[8]=1,u},r.fromQuat=function(D,I){var F=I[0],S=I[1],H=I[2],C=I[3],J=F+F,Q=S+S,N=H+H,R=F*J,P=S*J,K=S*Q,z=H*J,B=H*Q,O=H*N,G=C*J,E=C*Q,A=C*N;return D[0]=1-K-O,D[3]=P-A,D[6]=z+E,D[1]=P+A,D[4]=1-R-O,D[7]=B-G,D[2]=z-E,D[5]=B+G,D[8]=1-R-K,D},r.normalFromMat4=function(O,Z){var S=Z[0],ak=Z[1],X=Z[2],K=Z[3],aa=Z[4],ah=Z[5],ad=Z[6],aj=Z[7],ag=Z[8],ab=Z[9],F=Z[10],J=Z[11],ae=Z[12],W=Z[13],Q=Z[14],I=Z[15],ai=S*ah-ak*aa,C=S*ad-X*aa,af=S*aj-K*aa,H=ak*ad-X*ah,G=ak*aj-K*ah,V=X*aj-K*ad,z=ag*W-ab*ae,B=ag*Q-F*ae,ac=ag*I-J*ae,U=ab*Q-F*W,N=ab*I-J*W,D=F*I-J*Q,al=ai*D-C*N+af*U+H*ac-G*B+V*z;return al?(al=1/al,O[0]=(ah*D-ad*N+aj*U)*al,O[1]=(ad*ac-aa*D-aj*B)*al,O[2]=(aa*N-ah*ac+aj*z)*al,O[3]=(X*N-ak*D-K*U)*al,O[4]=(S*D-X*ac+K*B)*al,O[5]=(ak*ac-S*N-K*z)*al,O[6]=(W*V-Q*G+I*H)*al,O[7]=(Q*af-ae*V-I*C)*al,O[8]=(ae*G-W*af+I*ai)*al,O):null},r.str=function(u){return"mat3("+u[0]+", "+u[1]+", "+u[2]+", "+u[3]+", "+u[4]+", "+u[5]+", "+u[6]+", "+u[7]+", "+u[8]+")"},r.frob=function(u){return Math.sqrt(Math.pow(u[0],2)+Math.pow(u[1],2)+Math.pow(u[2],2)+Math.pow(u[3],2)+Math.pow(u[4],2)+Math.pow(u[5],2)+Math.pow(u[6],2)+Math.pow(u[7],2)+Math.pow(u[8],2))},s.exports=r},{"./common.js":117}],121:[function(r,s,o){var q=r("./common.js"),p={};p.create=function(){var u=new q.ARRAY_TYPE(16);return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u},p.clone=function(v){var u=new q.ARRAY_TYPE(16);return u[0]=v[0],u[1]=v[1],u[2]=v[2],u[3]=v[3],u[4]=v[4],u[5]=v[5],u[6]=v[6],u[7]=v[7],u[8]=v[8],u[9]=v[9],u[10]=v[10],u[11]=v[11],u[12]=v[12],u[13]=v[13],u[14]=v[14],u[15]=v[15],u},p.copy=function(v,u){return v[0]=u[0],v[1]=u[1],v[2]=u[2],v[3]=u[3],v[4]=u[4],v[5]=u[5],v[6]=u[6],v[7]=u[7],v[8]=u[8],v[9]=u[9],v[10]=u[10],v[11]=u[11],v[12]=u[12],v[13]=u[13],v[14]=u[14],v[15]=u[15],v},p.identity=function(u){return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u},p.transpose=function(A,v){if(A===v){var B=v[1],E=v[2],D=v[3],C=v[6],z=v[7],w=v[11];A[1]=v[4],A[2]=v[8],A[3]=v[12],A[4]=B,A[6]=v[9],A[7]=v[13],A[8]=E,A[9]=C,A[11]=v[14],A[12]=D,A[13]=z,A[14]=w}else{A[0]=v[0],A[1]=v[4],A[2]=v[8],A[3]=v[12],A[4]=v[1],A[5]=v[5],A[6]=v[9],A[7]=v[13],A[8]=v[2],A[9]=v[6],A[10]=v[10],A[11]=v[14],A[12]=v[3],A[13]=v[7],A[14]=v[11],A[15]=v[15]}return A},p.invert=function(V,an){var X=an[0],ac=an[1],ab=an[2],aj=an[3],af=an[4],Q=an[5],G=an[6],ad=an[7],ag=an[8],al=an[9],ai=an[10],W=an[11],ae=an[12],N=an[13],aa=an[14],K=an[15],ah=X*Q-ac*af,D=X*G-ab*af,C=X*ad-aj*af,J=ac*G-ab*Q,H=ac*ad-aj*Q,B=ab*ad-aj*G,ak=ag*N-al*ae,Z=ag*aa-ai*ae,U=ag*K-W*ae,F=al*aa-ai*N,am=al*K-W*N,A=ai*K-W*aa,z=ah*A-D*am+C*F+J*U-H*Z+B*ak;return z?(z=1/z,V[0]=(Q*A-G*am+ad*F)*z,V[1]=(ab*am-ac*A-aj*F)*z,V[2]=(N*B-aa*H+K*J)*z,V[3]=(ai*H-al*B-W*J)*z,V[4]=(G*U-af*A-ad*Z)*z,V[5]=(X*A-ab*U+aj*Z)*z,V[6]=(aa*C-ae*B-K*D)*z,V[7]=(ag*B-ai*C+W*D)*z,V[8]=(af*am-Q*U+ad*ak)*z,V[9]=(ac*U-X*am-aj*ak)*z,V[10]=(ae*H-N*C+K*ah)*z,V[11]=(al*C-ag*H-W*ah)*z,V[12]=(Q*Z-af*F-G*ak)*z,V[13]=(X*F-ac*Z+ab*ak)*z,V[14]=(N*D-ae*J-aa*ah)*z,V[15]=(ag*J-al*D+ai*ah)*z,V):null},p.adjoint=function(D,S){var F=S[0],I=S[1],H=S[2],Q=S[3],N=S[4],C=S[5],z=S[6],J=S[7],O=S[8],R=S[9],P=S[10],E=S[11],K=S[12],B=S[13],G=S[14],A=S[15];return D[0]=C*(P*A-E*G)-R*(z*A-J*G)+B*(z*E-J*P),D[1]=-(I*(P*A-E*G)-R*(H*A-Q*G)+B*(H*E-Q*P)),D[2]=I*(z*A-J*G)-C*(H*A-Q*G)+B*(H*J-Q*z),D[3]=-(I*(z*E-J*P)-C*(H*E-Q*P)+R*(H*J-Q*z)),D[4]=-(N*(P*A-E*G)-O*(z*A-J*G)+K*(z*E-J*P)),D[5]=F*(P*A-E*G)-O*(H*A-Q*G)+K*(H*E-Q*P),D[6]=-(F*(z*A-J*G)-N*(H*A-Q*G)+K*(H*J-Q*z)),D[7]=F*(z*E-J*P)-N*(H*E-Q*P)+O*(H*J-Q*z),D[8]=N*(R*A-E*B)-O*(C*A-J*B)+K*(C*E-J*R),D[9]=-(F*(R*A-E*B)-O*(I*A-Q*B)+K*(I*E-Q*R)),D[10]=F*(C*A-J*B)-N*(I*A-Q*B)+K*(I*J-Q*C),D[11]=-(F*(C*E-J*R)-N*(I*E-Q*R)+O*(I*J-Q*C)),D[12]=-(N*(R*G-P*B)-O*(C*G-z*B)+K*(C*P-z*R)),D[13]=F*(R*G-P*B)-O*(I*G-H*B)+K*(I*P-H*R),D[14]=-(F*(C*G-z*B)-N*(I*G-H*B)+K*(I*z-H*C)),D[15]=F*(C*P-z*R)-N*(I*P-H*R)+O*(I*z-H*C),D},p.determinant=function(Q){var aj=Q[0],U=Q[1],Y=Q[2],X=Q[3],af=Q[4],ab=Q[5],K=Q[6],D=Q[7],Z=Q[8],ac=Q[9],ah=Q[10],ae=Q[11],T=Q[12],aa=Q[13],J=Q[14],W=Q[15],H=aj*ab-U*af,ad=aj*K-Y*af,B=aj*D-X*af,A=U*K-Y*ab,G=U*D-X*ab,F=Y*D-X*K,z=Z*aa-ac*T,ag=Z*J-ah*T,V=Z*W-ae*T,N=ac*J-ah*aa,C=ac*W-ae*aa,ai=ah*W-ae*J;return H*ai-ad*C+B*N+A*V-G*ag+F*z},p.multiply=function(H,aa,K){var Q=aa[0],O=aa[1],Y=aa[2],U=aa[3],G=aa[4],B=aa[5],S=aa[6],V=aa[7],Z=aa[8],X=aa[9],J=aa[10],T=aa[11],F=aa[12],N=aa[13],E=aa[14],W=aa[15],A=K[0],z=K[1],D=K[2],C=K[3];return H[0]=A*Q+z*G+D*Z+C*F,H[1]=A*O+z*B+D*X+C*N,H[2]=A*Y+z*S+D*J+C*E,H[3]=A*U+z*V+D*T+C*W,A=K[4],z=K[5],D=K[6],C=K[7],H[4]=A*Q+z*G+D*Z+C*F,H[5]=A*O+z*B+D*X+C*N,H[6]=A*Y+z*S+D*J+C*E,H[7]=A*U+z*V+D*T+C*W,A=K[8],z=K[9],D=K[10],C=K[11],H[8]=A*Q+z*G+D*Z+C*F,H[9]=A*O+z*B+D*X+C*N,H[10]=A*Y+z*S+D*J+C*E,H[11]=A*U+z*V+D*T+C*W,A=K[12],z=K[13],D=K[14],C=K[15],H[12]=A*Q+z*G+D*Z+C*F,H[13]=A*O+z*B+D*X+C*N,H[14]=A*Y+z*S+D*J+C*E,H[15]=A*U+z*V+D*T+C*W,H},p.mul=p.multiply,p.translate=function(D,S,F){var I,H,Q,N,C,z,J,O,R,P,E,K,B=F[0],G=F[1],A=F[2];return S===D?(D[12]=S[0]*B+S[4]*G+S[8]*A+S[12],D[13]=S[1]*B+S[5]*G+S[9]*A+S[13],D[14]=S[2]*B+S[6]*G+S[10]*A+S[14],D[15]=S[3]*B+S[7]*G+S[11]*A+S[15]):(I=S[0],H=S[1],Q=S[2],N=S[3],C=S[4],z=S[5],J=S[6],O=S[7],R=S[8],P=S[9],E=S[10],K=S[11],D[0]=I,D[1]=H,D[2]=Q,D[3]=N,D[4]=C,D[5]=z,D[6]=J,D[7]=O,D[8]=R,D[9]=P,D[10]=E,D[11]=K,D[12]=I*B+C*G+R*A+S[12],D[13]=H*B+z*G+P*A+S[13],D[14]=Q*B+J*G+E*A+S[14],D[15]=N*B+O*G+K*A+S[15]),D},p.scale=function(v,u,w){var B=w[0],A=w[1],z=w[2];return v[0]=u[0]*B,v[1]=u[1]*B,v[2]=u[2]*B,v[3]=u[3]*B,v[4]=u[4]*A,v[5]=u[5]*A,v[6]=u[6]*A,v[7]=u[7]*A,v[8]=u[8]*z,v[9]=u[9]*z,v[10]=u[10]*z,v[11]=u[11]*z,v[12]=u[12],v[13]=u[13],v[14]=u[14],v[15]=u[15],v},p.rotate=function(W,ao,Z,ad){var ac,ak,ag,U,G,ae,ah,am,aj,X,af,Q,ab,N,ai,D,C,K,J,B,al,aa,V,F,an=ad[0],A=ad[1],z=ad[2],H=Math.sqrt(an*an+A*A+z*z);return Math.abs(H)<q.EPSILON?null:(H=1/H,an*=H,A*=H,z*=H,ac=Math.sin(Z),ak=Math.cos(Z),ag=1-ak,U=ao[0],G=ao[1],ae=ao[2],ah=ao[3],am=ao[4],aj=ao[5],X=ao[6],af=ao[7],Q=ao[8],ab=ao[9],N=ao[10],ai=ao[11],D=an*an*ag+ak,C=A*an*ag+z*ac,K=z*an*ag-A*ac,J=an*A*ag-z*ac,B=A*A*ag+ak,al=z*A*ag+an*ac,aa=an*z*ag+A*ac,V=A*z*ag-an*ac,F=z*z*ag+ak,W[0]=U*D+am*C+Q*K,W[1]=G*D+aj*C+ab*K,W[2]=ae*D+X*C+N*K,W[3]=ah*D+af*C+ai*K,W[4]=U*J+am*B+Q*al,W[5]=G*J+aj*B+ab*al,W[6]=ae*J+X*B+N*al,W[7]=ah*J+af*B+ai*al,W[8]=U*aa+am*V+Q*F,W[9]=G*aa+aj*V+ab*F,W[10]=ae*aa+X*V+N*F,W[11]=ah*aa+af*V+ai*F,ao!==W&&(W[12]=ao[12],W[13]=ao[13],W[14]=ao[14],W[15]=ao[15]),W)},p.rotateX=function(J,H,v){var z=Math.sin(v),w=Math.cos(v),E=H[4],B=H[5],I=H[6],F=H[7],A=H[8],C=H[9],G=H[10],D=H[11];return H!==J&&(J[0]=H[0],J[1]=H[1],J[2]=H[2],J[3]=H[3],J[12]=H[12],J[13]=H[13],J[14]=H[14],J[15]=H[15]),J[4]=E*w+A*z,J[5]=B*w+C*z,J[6]=I*w+G*z,J[7]=F*w+D*z,J[8]=A*w-E*z,J[9]=C*w-B*z,J[10]=G*w-I*z,J[11]=D*w-F*z,J},p.rotateY=function(J,H,v){var z=Math.sin(v),w=Math.cos(v),E=H[0],B=H[1],I=H[2],F=H[3],A=H[8],C=H[9],G=H[10],D=H[11];return H!==J&&(J[4]=H[4],J[5]=H[5],J[6]=H[6],J[7]=H[7],J[12]=H[12],J[13]=H[13],J[14]=H[14],J[15]=H[15]),J[0]=E*w-A*z,J[1]=B*w-C*z,J[2]=I*w-G*z,J[3]=F*w-D*z,J[8]=E*z+A*w,J[9]=B*z+C*w,J[10]=I*z+G*w,J[11]=F*z+D*w,J},p.rotateZ=function(J,H,v){var z=Math.sin(v),w=Math.cos(v),E=H[0],B=H[1],I=H[2],F=H[3],A=H[4],C=H[5],G=H[6],D=H[7];return H!==J&&(J[8]=H[8],J[9]=H[9],J[10]=H[10],J[11]=H[11],J[12]=H[12],J[13]=H[13],J[14]=H[14],J[15]=H[15]),J[0]=E*w+A*z,J[1]=B*w+C*z,J[2]=I*w+G*z,J[3]=F*w+D*z,J[4]=A*w-E*z,J[5]=C*w-B*z,J[6]=G*w-I*z,J[7]=D*w-F*z,J},p.fromTranslation=function(v,u){return v[0]=1,v[1]=0,v[2]=0,v[3]=0,v[4]=0,v[5]=1,v[6]=0,v[7]=0,v[8]=0,v[9]=0,v[10]=1,v[11]=0,v[12]=u[0],v[13]=u[1],v[14]=u[2],v[15]=1,v},p.fromScaling=function(v,u){return v[0]=u[0],v[1]=0,v[2]=0,v[3]=0,v[4]=0,v[5]=u[1],v[6]=0,v[7]=0,v[8]=0,v[9]=0,v[10]=u[2],v[11]=0,v[12]=0,v[13]=0,v[14]=0,v[15]=1,v},p.fromRotation=function(G,E,v){var z,w,C,B=v[0],F=v[1],D=v[2],A=Math.sqrt(B*B+F*F+D*D);return Math.abs(A)<q.EPSILON?null:(A=1/A,B*=A,F*=A,D*=A,z=Math.sin(E),w=Math.cos(E),C=1-w,G[0]=B*B*C+w,G[1]=F*B*C+D*z,G[2]=D*B*C-F*z,G[3]=0,G[4]=B*F*C-D*z,G[5]=F*F*C+w,G[6]=D*F*C+B*z,G[7]=0,G[8]=B*D*C+F*z,G[9]=F*D*C-B*z,G[10]=D*D*C+w,G[11]=0,G[12]=0,G[13]=0,G[14]=0,G[15]=1,G)},p.fromXRotation=function(v,u){var w=Math.sin(u),z=Math.cos(u);return v[0]=1,v[1]=0,v[2]=0,v[3]=0,v[4]=0,v[5]=z,v[6]=w,v[7]=0,v[8]=0,v[9]=-w,v[10]=z,v[11]=0,v[12]=0,v[13]=0,v[14]=0,v[15]=1,v},p.fromYRotation=function(v,u){var w=Math.sin(u),z=Math.cos(u);return v[0]=z,v[1]=0,v[2]=-w,v[3]=0,v[4]=0,v[5]=1,v[6]=0,v[7]=0,v[8]=w,v[9]=0,v[10]=z,v[11]=0,v[12]=0,v[13]=0,v[14]=0,v[15]=1,v},p.fromZRotation=function(v,u){var w=Math.sin(u),z=Math.cos(u);return v[0]=z,v[1]=w,v[2]=0,v[3]=0,v[4]=-w,v[5]=z,v[6]=0,v[7]=0,v[8]=0,v[9]=0,v[10]=1,v[11]=0,v[12]=0,v[13]=0,v[14]=0,v[15]=1,v},p.fromRotationTranslation=function(D,T,F){var I=T[0],H=T[1],R=T[2],N=T[3],C=I+I,z=H+H,J=R+R,O=I*C,S=I*z,Q=I*J,E=H*z,K=H*J,B=R*J,G=N*C,A=N*z,P=N*J;return D[0]=1-(E+B),D[1]=S+P,D[2]=Q-A,D[3]=0,D[4]=S-P,D[5]=1-(O+B),D[6]=K+G,D[7]=0,D[8]=Q+A,D[9]=K-G,D[10]=1-(O+E),D[11]=0,D[12]=F[0],D[13]=F[1],D[14]=F[2],D[15]=1,D},p.fromRotationTranslationScale=function(H,aa,K,Q){var O=aa[0],Y=aa[1],U=aa[2],G=aa[3],B=O+O,S=Y+Y,V=U+U,Z=O*B,X=O*S,J=O*V,T=Y*S,F=Y*V,N=U*V,E=G*B,W=G*S,A=G*V,z=Q[0],D=Q[1],C=Q[2];return H[0]=(1-(T+N))*z,H[1]=(X+A)*z,H[2]=(J-W)*z,H[3]=0,H[4]=(X-A)*D,H[5]=(1-(Z+N))*D,H[6]=(F+E)*D,H[7]=0,H[8]=(J+W)*C,H[9]=(F-E)*C,H[10]=(1-(Z+T))*C,H[11]=0,H[12]=K[0],H[13]=K[1],H[14]=K[2],H[15]=1,H},p.fromRotationTranslationScaleOrigin=function(N,ag,Q,W,V){var ad=ag[0],Z=ag[1],J=ag[2],C=ag[3],X=ad+ad,aa=Z+Z,af=J+J,ac=ad*X,O=ad*aa,Y=ad*af,H=Z*aa,U=Z*af,G=J*af,ab=C*X,B=C*aa,A=C*af,F=W[0],D=W[1],z=W[2],ae=V[0],T=V[1],K=V[2];return N[0]=(1-(H+G))*F,N[1]=(O+A)*F,N[2]=(Y-B)*F,N[3]=0,N[4]=(O-A)*D,N[5]=(1-(ac+G))*D,N[6]=(U+ab)*D,N[7]=0,N[8]=(Y+B)*z,N[9]=(U-ab)*z,N[10]=(1-(ac+H))*z,N[11]=0,N[12]=Q[0]+ae-(N[0]*ae+N[4]*T+N[8]*K),N[13]=Q[1]+T-(N[1]*ae+N[5]*T+N[9]*K),N[14]=Q[2]+K-(N[2]*ae+N[6]*T+N[10]*K),N[15]=1,N},p.fromQuat=function(D,S){var F=S[0],I=S[1],H=S[2],Q=S[3],N=F+F,C=I+I,z=H+H,J=F*N,O=I*N,R=I*C,P=H*N,E=H*C,K=H*z,B=Q*N,G=Q*C,A=Q*z;return D[0]=1-R-K,D[1]=O+A,D[2]=P-G,D[3]=0,D[4]=O-A,D[5]=1-J-K,D[6]=E+B,D[7]=0,D[8]=P+G,D[9]=E-B,D[10]=1-J-R,D[11]=0,D[12]=0,D[13]=0,D[14]=0,D[15]=1,D},p.frustum=function(G,E,v,z,w,C,B){var F=1/(v-E),D=1/(w-z),A=1/(C-B);return G[0]=2*C*F,G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[5]=2*C*D,G[6]=0,G[7]=0,G[8]=(v+E)*F,G[9]=(w+z)*D,G[10]=(B+C)*A,G[11]=-1,G[12]=0,G[13]=0,G[14]=B*C*2*A,G[15]=0,G},p.perspective=function(w,u,z,C,B){var A=1/Math.tan(u/2),v=1/(C-B);return w[0]=A/z,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=A,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=(B+C)*v,w[11]=-1,w[12]=0,w[13]=0,w[14]=2*B*C*v,w[15]=0,w},p.perspectiveFromFieldOfView=function(G,E,v,z){var w=Math.tan(E.upDegrees*Math.PI/180),C=Math.tan(E.downDegrees*Math.PI/180),B=Math.tan(E.leftDegrees*Math.PI/180),F=Math.tan(E.rightDegrees*Math.PI/180),D=2/(B+F),A=2/(w+C);return G[0]=D,G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[5]=A,G[6]=0,G[7]=0,G[8]=-((B-F)*D*0.5),G[9]=(w-C)*A*0.5,G[10]=z/(v-z),G[11]=-1,G[12]=0,G[13]=0,G[14]=z*v/(v-z),G[15]=0,G},p.ortho=function(G,E,v,z,w,C,B){var F=1/(E-v),D=1/(z-w),A=1/(C-B);return G[0]=-2*F,G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[5]=-2*D,G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[10]=2*A,G[11]=0,G[12]=(E+v)*F,G[13]=(w+z)*D,G[14]=(B+C)*A,G[15]=1,G},p.lookAt=function(H,aa,K,Q){var O,Y,U,G,B,S,V,Z,X,J,T=aa[0],F=aa[1],N=aa[2],E=Q[0],W=Q[1],A=Q[2],z=K[0],D=K[1],C=K[2];return Math.abs(T-z)<q.EPSILON&&Math.abs(F-D)<q.EPSILON&&Math.abs(N-C)<q.EPSILON?p.identity(H):(V=T-z,Z=F-D,X=N-C,J=1/Math.sqrt(V*V+Z*Z+X*X),V*=J,Z*=J,X*=J,O=W*X-A*Z,Y=A*V-E*X,U=E*Z-W*V,J=Math.sqrt(O*O+Y*Y+U*U),J?(J=1/J,O*=J,Y*=J,U*=J):(O=0,Y=0,U=0),G=Z*U-X*Y,B=X*O-V*U,S=V*Y-Z*O,J=Math.sqrt(G*G+B*B+S*S),J?(J=1/J,G*=J,B*=J,S*=J):(G=0,B=0,S=0),H[0]=O,H[1]=G,H[2]=V,H[3]=0,H[4]=Y,H[5]=B,H[6]=Z,H[7]=0,H[8]=U,H[9]=S,H[10]=X,H[11]=0,H[12]=-(O*T+Y*F+U*N),H[13]=-(G*T+B*F+S*N),H[14]=-(V*T+Z*F+X*N),H[15]=1,H)},p.str=function(u){return"mat4("+u[0]+", "+u[1]+", "+u[2]+", "+u[3]+", "+u[4]+", "+u[5]+", "+u[6]+", "+u[7]+", "+u[8]+", "+u[9]+", "+u[10]+", "+u[11]+", "+u[12]+", "+u[13]+", "+u[14]+", "+u[15]+")"},p.frob=function(u){return Math.sqrt(Math.pow(u[0],2)+Math.pow(u[1],2)+Math.pow(u[2],2)+Math.pow(u[3],2)+Math.pow(u[4],2)+Math.pow(u[5],2)+Math.pow(u[6],2)+Math.pow(u[7],2)+Math.pow(u[8],2)+Math.pow(u[9],2)+Math.pow(u[10],2)+Math.pow(u[11],2)+Math.pow(u[12],2)+Math.pow(u[13],2)+Math.pow(u[14],2)+Math.pow(u[15],2))},s.exports=p},{"./common.js":117}],122:[function(r,u,o){var q=r("./common.js"),t=r("./mat3.js"),s=r("./vec3.js"),p=r("./vec4.js"),v={};v.create=function(){var w=new q.ARRAY_TYPE(4);return w[0]=0,w[1]=0,w[2]=0,w[3]=1,w},v.rotationTo=function(){var z=s.create(),w=s.fromValues(1,0,0),A=s.fromValues(0,1,0);return function(C,B,E){var D=s.dot(B,E);return -0.999999>D?(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<<I)-1,F=D>>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<<H)-1,G=D>>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<<E|K,H+=E;H>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;z<v.length;z++){w[z]=o(v[z],u[z],A)}return w}p.interpolated=function(v){if(!v.stops){return s(v)}var u=v.stops,z=v.base||1,w=Array.isArray(u[0][1])?t:o;return function(E){for(var H,A,C=0;C<u.length;C++){var B=u[C];if(B[0]<=E&&(H=B),B[0]>E){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;z<u.length;z++){if(u[z][0]>w){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&&J<I.minimum&&B(H,J,"%s is less than the minimum value %s",J,I.minimum),"maximum" in I&&J>I.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<F["min-length"]){return B(I,K,"array length at least %d expected, length %d found",F["min-length"],K.length)}var J={type:F.value};C.version<7&&(J["function"]=F["function"]),"object"===o(F.value)&&(J=F.value);for(var G=0;G<K.length;G++){(H||E)(I+"["+G+"]",K[G],J)}},E.filter=function(H,I){var F;if("array"!==o(I)){return B(H,I,"array expected, %s found",o(I))}if(I.length<1){return B(H,I,"filter array must have at least 1 element")}switch(E["enum"](H+"[0]",I[0],z.filter_operator),q(I[0])){case"<":case"<=":case">":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;G<I.length;G++){F=o(I[G]),"$type"==I[1]?E["enum"](H+"["+G+"]",I[G],z.geometry_type):"string"===F&&"@"===I[G][0]?B(H+"["+G+"]",I[G],"filter value cannot be a constant"):"string"!==F&&"number"!==F&&"boolean"!==F&&B(H+"["+G+"]",I[G],"string, number, or boolean expected, %s found",F)}break;case"any":case"all":case"none":for(G=1;G<I.length;G++){E.filter(H+"["+G+"]",I[G])}}},E["function"]=function(G,H,F){E.object(G,H,z["function"],{stops:function(K,J,M){var I=-(1/0);E.array(K,J,M,function(O,N){return"array"!==o(N)?B(O,N,"array expected, %s found",o(N)):2!==N.length?B(O,N,"array length %d expected, length %d found",2,N.length):(E(O+"[0]",N[0],{type:"number"}),E(O+"[1]",N[1],F),void ("number"===o(N[0])&&("piecewise-constant"===F["function"]&&N[0]%1!==0&&B(O+"[0]",N[0],"zoom level for piecewise-constant functions must be an integer"),N[0]<=I&&B(O+"[0]",N[0],"array stops must appear in ascending order and have no duplicates"),I=N[0])))}),"array"===o(J)&&0===J.length&&B(K,J,"array must have at least one stop")}})},E["enum"]=function(G,F,H){-1===H.values.indexOf(q(F))&&B(G,F,"expected one of [%s], %s found",H.values.join(", "),F)},E.color=function(G,F){var H=o(F);return"string"!==H?B(G,F,"color expected, %s found",H):null===u(F)?B(G,F,'color expected, "%s" found',F):void 0},E.number=D("number"),E.string=D("string"),E["boolean"]=D("boolean"),E["*"]=function(){},E("",C,z.$root),z.$version>7&&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://<mapid>`."},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<A.length;C++){this[B+C]=A[C]}},slice:function(z,A){return this.subarray(z,A)},copy:function(z,B){B=B||0;for(var A=0;A<this.length;A++){z[B+A]=this[A]}}},p.writeInt32LE=p.writeUInt32LE,r.byteLength=function(z){return t=z,v=u(z),v.length},r.isBuffer=function(z){return !(!z||!z._isBuffer)}},{ieee754:126}],136:[function(p,q,o){(function(r){function H(I){this.buf=v.isBuffer(I)?I:new v(I||0),this.pos=0,this.length=this.buf.length}function u(J,I){for(var K=0;K<J.length;K++){I.writeVarint(J[K])}}function s(J,I){for(var K=0;K<J.length;K++){I.writeSVarint(J[K])}}function A(J,I){for(var K=0;K<J.length;K++){I.writeFloat(J[K])}}function D(J,I){for(var K=0;K<J.length;K++){I.writeDouble(J[K])}}function G(J,I){for(var K=0;K<J.length;K++){I.writeBoolean(J[K])}}function E(J,I){for(var K=0;K<J.length;K++){I.writeFixed32(J[K])}}function w(J,I){for(var K=0;K<J.length;K++){I.writeSFixed32(J[K])}}function C(J,I){for(var K=0;K<J.length;K++){I.writeFixed64(J[K])}}function t(J,I){for(var K=0;K<J.length;K++){I.writeSFixed64(J[K])}}q.exports=H;var v=r.Buffer||p("./buffer");H.Varint=0,H.Fixed64=1,H.Bytes=2,H.Fixed32=5;var B=4294967296,F=1/B,z=Math.pow(2,63);H.prototype={destroy:function(){this.buf=null},readFields:function(J,I,N){for(N=N||this.length;this.pos<N;){var M=this.readVarint(),K=M>>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.pos<J;){I.push(this.readVarint())}return I},readPackedSVarint:function(){for(var J=this.readVarint()+this.pos,I=[];this.pos<J;){I.push(this.readSVarint())}return I},readPackedBoolean:function(){for(var J=this.readVarint()+this.pos,I=[];this.pos<J;){I.push(this.readBoolean())}return I},readPackedFloat:function(){for(var J=this.readVarint()+this.pos,I=[];this.pos<J;){I.push(this.readFloat())}return I},readPackedDouble:function(){for(var J=this.readVarint()+this.pos,I=[];this.pos<J;){I.push(this.readDouble())}return I},readPackedFixed32:function(){for(var J=this.readVarint()+this.pos,I=[];this.pos<J;){I.push(this.readFixed32())}return I},readPackedSFixed32:function(){for(var J=this.readVarint()+this.pos,I=[];this.pos<J;){I.push(this.readSFixed32())}return I},readPackedFixed64:function(){for(var J=this.readVarint()+this.pos,I=[];this.pos<J;){I.push(this.readFixed64())}return I},readPackedSFixed64:function(){for(var J=this.readVarint()+this.pos,I=[];this.pos<J;){I.push(this.readSFixed64())}return I},skip:function(J){var I=7&J;if(I===H.Varint){for(;this.buf[this.pos++]>127;){}}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<this.pos+J;){I*=2}if(I!==this.length){var K=new v(I);this.buf.copy(K),this.buf=K,this.length=I}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.slice(0,this.length)},writeFixed32:function(I){this.realloc(4),this.buf.writeUInt32LE(I,this.pos),this.pos+=4},writeSFixed32:function(I){this.realloc(4),this.buf.writeInt32LE(I,this.pos),this.pos+=4},writeFixed64:function(I){this.realloc(8),this.buf.writeInt32LE(-1&I,this.pos),this.buf.writeUInt32LE(Math.floor(I*F),this.pos+4),this.pos+=8},writeSFixed64:function(I){this.realloc(8),this.buf.writeInt32LE(-1&I,this.pos),this.buf.writeInt32LE(Math.floor(I*F),this.pos+4),this.pos+=8},writeVarint:function(J){if(J=+J,127>=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=[];++v<D;){u&&u[v].run()}v=-1,D=t.length}u=null,z=!1,clearTimeout(C)}}function r(C,D){this.fun=C,this.array=D}function A(){}var o=p.exports={},t=[],z=!1,u,v=-1;o.nextTick=function(D){var E=new Array(arguments.length-1);if(arguments.length>1){for(var C=1;C<arguments.length;C++){E[C-1]=arguments[C]}}t.push(new r(D,E)),1!==t.length||z||setTimeout(B,0)},r.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=A,o.addListener=A,o.once=A,o.off=A,o.removeListener=A,o.removeAllListeners=A,o.emit=A,o.binding=function(C){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(C){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],139:[function(p,q,o){!function(){function M(r,s){return this instanceof M?(this._maxEntries=Math.max(4,r||9),this._minEntries=Math.max(2,Math.ceil(0.4*this._maxEntries)),s&&this._initFormat(s),void this.clear()):new M(r,s)}function C(s,r){s.bbox=A(s,0,s.children.length,r)}function A(P,O,T,R){for(var S,u=F(),Q=O;T>Q;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.length<this._minEntries){for(var r=0,P=s.length;P>r;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<O.height){var u=this.data;this.data=O,O=u}this._insert(O,this.data.height-O.height-1,!0)}}else{this.data=O}return this},insert:function(r){return r&&this._insert(r,this.data.height-1),this},clear:function(){return this.data={children:[],height:1,bbox:F(),leaf:!0},this},remove:function(U){if(!U){return this}for(var Q,P,S,R,u=this.data,O=this.toBBox(U),T=[],V=[];u||T.length;){if(u||(u=T.pop(),P=T[T.length-1],Q=V.pop(),R=!0),u.leaf&&(S=u.children.indexOf(U),-1!==S)){return u.children.splice(S,1),T.push(u),this._condense(T),this}R||u.leaf||!E(u.bbox,O)?P?(Q++,u=P.children[Q],R=!1):u=null:(T.push(u),V.push(Q),Q=0,P=u,u=u.children[0])}return this},toBBox:function(r){return r},compareMinX:function(s,r){return s[0]-r[0]},compareMinY:function(s,r){return s[1]-r[1]},toJSON:function(){return this.data},fromJSON:function(r){return this.data=r,this},_all:function(s,r){for(var u=[];s;){s.leaf?r.push.apply(r,s.children):u.push.apply(u,s.children),s=u.pop()}return r},_build:function(Z,Q,U,S){var O,P=U-Q+1,X=this._maxEntries;if(X>=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)<w){return B}var v=this.sampleCurveDerivativeX(B);if(Math.abs(v)<0.000001){break}B-=A/v}if(D=0,C=1,B=z,D>B){return D}if(B>C){return C}for(;C>D;){if(A=this.sampleCurveX(B),Math.abs(A-z)<w){return B}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<arguments.length;ad++){af.push(ab(arguments[ad]))}return af.join(" ")}for(var ad=1,ai=arguments,ac=ai.length,ah=String(ag).replace(Q,function(ak){if("%%"===ak){return"%"}if(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<v;){if(!z){var u=w.readVarint();A=7&u,z=u>>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.x<this.xmin&&I.x>this.xmin||F.x>this.xmin&&I.x<this.xmin)&&(G=(this.xmin-F.x)/(I.x-F.x),w=F.y+G*(I.y-F.y),w<=this.ymin?v=!1:w>=this.ymax?v=!0:(C={},C.ratio=G,C.x=this.xmin,C.y=w,z.push(C))),(F.x<this.xmax&&I.x>this.xmax||F.x>this.xmax&&I.x<this.xmax)&&(G=(this.xmax-F.x)/(I.x-F.x),w=F.y+G*(I.y-F.y),w<=this.ymin?v=!1:w>=this.ymax?v=!0:(C={},C.ratio=G,C.x=this.xmax,C.y=w,z.push(C))),(F.y<this.ymin&&I.y>this.ymin||F.y>this.ymin&&I.y<this.ymin)&&(G=(this.ymin-F.y)/(I.y-F.y),H=F.x+G*(I.x-F.x),H<=this.xmin?B=!1:H>=this.xmax?B=!0:(C={},C.ratio=G,C.x=H,C.y=this.ymin,z.push(C))),(F.y<this.ymax&&I.y>this.ymax||F.y>this.ymax&&I.y<this.ymax)&&(G=(this.ymax-F.y)/(I.y-F.y),H=F.x+G*(I.x-F.x),H<=this.xmin?B=!1:H>=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;K<z.length;K++){this._lineTo(z[K].x,z[K].y,!0)}}}this._lineTo(I.x,I.y,!1)}}}this._prevIsIn=J,this._prevPt=new r(D,M)},s.prototype.closePolygon=function(){var v,u;this.line.length>0&&(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||(v<this.xmin&&(v=this.xmin),v>this.xmax&&(v=this.xmax),u<this.ymin&&(u=this.ymin),u>this.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||(w<this.xmin&&(w=this.xmin),w>this.xmax&&(w=this.xmax),v<this.ymin&&(v=this.ymin),v>this.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.pos<A;){var w=z._keys[B.readVarint()],C=z._values[B.readVarint()];z.properties[w]=C}}var s=q("point-geometry"),u=q("./vectortileclipper");r.exports=p,p.types=["Unknown","Point","LineString","Polygon"],p.prototype.loadGeometry=function(){var F;if(this.dz){var I=new u(this);F=I.loadGeometry()}else{for(var w=0,D=this.extent;D>4096;){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<B;){if(!z){var C=A.readVarint();J=7&C,z=C>>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<H;){if(!C){var G=E.readVarint();w=7&G,C=G>>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<B.length;z++){for(var E=B[z],I=0;I<E.length;I++){var C=E[I],G=180-360*(C.y+H)/D;E[I]=[360*(C.x+A)/D-180,360/Math.PI*Math.atan(Math.exp(G*Math.PI/180))-90]}}return"Point"===K&&1===B.length?B=B[0][0]:"Point"===K?(B=B[0],K="MultiPoint"):"LineString"===K&&1===B.length?B=B[0]:"LineString"===K&&(K="MultiLineString"),{type:"Feature",geometry:{type:K,coordinates:B},properties:this.properties}}},{"./vectortileclipper":146,"point-geometry":137}],148:[function(q,s,o){function t(w,v){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=w,this._keys=[],this._values=[],this._features=[],w.readFields(r,this,v),this.length=this._features.length}function r(z,v,w){15===z?v.version=w.readVarint():1===z?v.name=w.readString():5===z?v.extent=w.readVarint():2===z?v._features.push(w.pos):3===z?v._keys.push(w.readString()):4===z&&v._values.push(u(w))}function u(A){for(var w=null,z=A.readVarint()+A.pos;A.pos<z;){var v=A.readVarint()>>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('<span class="esri-dynamic-attribution">USGS, NOAA</span>')}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('<span class="esri-dynamic-attribution">'+this._copyrightText+"</span>")}}else{i.Util._getAttributionData("https://static.arcgis.com/attribution/World_Street_Map",k);k.attributionControl.addAttribution('<span class="esri-dynamic-attribution">USGS, NOAA</span>');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