varK=r(5),Q=r(7),$=r(8);e.Buffer=a,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:n(),e.kMaxLength=i(),a.poolSize=8192,a._augment=function(t){returnt.__proto__=a.prototype,t},a.from=function(t,e,r){returns(null,t,e,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeofSymbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,r){returnl(null,t,e,r)},a.allocUnsafe=function(t){returnc(null,t)},a.allocUnsafeSlow=function(t){returnc(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))thrownewTypeError("Arguments must be Buffers");if(t===e)return0;for(varr=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}returnr<n?-1:n<r?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!$(t))thrownewTypeError('"list" argument must be an Array of Buffers');if(0===t.length)returna.alloc(0);varr;if(void0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;varn=a.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){varo=t[r];if(!a.isBuffer(o))thrownewTypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}returnn},a.byteLength=v,a.prototype._isBuffer=!0,a.prototype.swap16=function(){vart=this.length;if(t%2!==0)thrownewRangeError("Buffer size must be a multiple of 16-bits");for(vare=0;e<t;e+=2)_(this,e,e+1);returnthis},a.prototype.swap32=function(){vart=this.length;if(t%4!==0)thrownewRangeError("Buffer size must be a multiple of 32-bits");for(vare=0;e<t;e+=4)_(this,e,e+3),_(this,e+1,e+2);returnthis},a.prototype.swap64=function(){vart=this.length;if(t%8!==0)thrownewRangeError("Buffer size must be a multiple of 64-bits");for(vare=0;e<t;e+=8)_(this,e,e+7),_(this,e+1,e+6),_(this,e+2,e+5),_(this,e+3,e+4);returnthis},a.prototype.toString=function(){vart=0|this.length;return0===t?"":0===arguments.length?P(this,0,t):g.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))thrownewTypeError("Argument must be a Buffer");returnthis===t||0===a.compare(this,t)},a.prototype.inspect=function(){vart="",r=e.INSPECT_MAX_BYTES;returnthis.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,e,r,n,i){if(!a.isBuffer(t))thrownewTypeError("Argument must be a Buffer");if(void0===e&&(e=0),void0===r&&(r=t?t.length:0),void0===n&&(n=0),void0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)thrownewRangeError("out of range index");if(n>=i&&e>=r)return0;if(n>=i)return-1;if(e>=r)return1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return0;for(varo=i-n,s=r-e,u=Math.min(o,s),l=this.slice(n,i),c=t.slice(e,r),p=0;p<u;++p)if(l[p]!==c[p]){o=l[p],s=c[p];break}returno<s?-1:s<o?1:0},a.prototype.includes=function(t,e,r){returnthis.indexOf(t,e,r)!==-1},a.prototype.indexOf=function(t,e,r){returnx(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){returnx(this,t,e,r,!1)},a.prototype.write=function(t,e,r,n){if(void0===e)n="utf8",r=this.length,e=0;elseif(void0===r&&"string"==typeofe)n=e,r=this.length,e=0;else{if(!isFinite(e))thrownewError("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void0===n&&(n="utf8")):(n=r,r=void0)}vari=this.length-e;if((void0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)thrownewRangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(varo=!1;;)switch(n){case"hex":returnw(this,t,e,r);case"utf8":case"utf-8":returnE(this,t,e,r);case"ascii":returnT(this,t,e,r);case"latin1":case"binary":returnS(this,t,e,r);case"base64":returnz(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":returnA(thi
vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec2 a_pos;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform vec2 u_gl_units_to_pixels;\nuniform mediump float u_width;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n\nvoid main() {\n #pragma mapbox: initialize lowp vec4 color\n #pragma mapbox: initialize lowp float blur\n #pragma mapbox: initialize lowp float opacity\n #pragma mapbox: initialize mediump float gapwidth\n #pragma mapbox: initialize lowp float offset\n\n vec2 a_extrude = a_data.xy - 128.0;\n float a_direction = mod(a_data.z, 4.0) - 1.0;\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n // We store the texture normals in the most insignificant bit\n // transform y so that 0 => -1 and 1 => 1\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\n // y is 1 if the normal points up, and -1 if it points down\n mediump vec2 normal = mod(a_pos, 2.0);\n normal.y = sign(normal.y - 0.5);\n v_normal = normal;\n\n // these transformations used to be applied in the JS and native code bases. \n // moved them into the shader for clarity and simplicity. \n gapwidth = gapwidth / 2.0;\n float width = u_width / 2.0;\n offset = -1.0 * offset;\n \n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\n\n // Scale the extrusion vector down to a normal and then up by the line width\n // of this vertex.\n mediump vec2 dist =outset * a_extrude * scale;\n\n // Calculate the offset when drawing a line that is to the side of the actual line.\n // We do this by creating a vector that points towards the extrude, but rotate\n // it when we're drawing round end points (a_direction = -1 or 1) since their\n // extrude vector points in another direction.\n mediump float u = 0.5 * a_direction;\n mediump float t = 1.0 - abs(u);\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n // Remove the texture normal bit to get the position\n vec2 pos = floor(a_pos * 0.5);\n\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n // calculate how much the perspective view squishes or stretches the extrude\n float extrude_length_without_perspective = length(dist);\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x, normal.y * u_patternscale_a.y + u_tex_y_a);\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n v_width2 = vec2(outset, inset);\n}\n"},raster:{fragmentSou
sources:c.mapObject(this.sourceCaches,function(t){returnt.serialize()}),layers:this._order.map(function(e){returnt._layers[e].serialize()})},function(t){returnvoid0!==t})},e.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]="reload"),this._changed=!0},e.prototype._flattenRenderedFeatures=function(t){for(vare=this,r=[],n=this._order.length-1;n>=0;n--)for(vari=e._order[n],o=0,a=t;o<a.length;o+=1){vars=a[o],u=s[i];if(u)for(varl=0,c=u;l<c.length;l+=1){varp=c[l];r.push(p)}}returnr},e.prototype.queryRenderedFeatures=function(t,e,r,n){vari=this;e&&e.filter&&this._validate(y.filter,"queryRenderedFeatures.filter",e.filter);varo={};if(e&&e.layers)for(vara=0,s=e.layers;a<s.length;a+=1){varu=s[a],l=i._layers[u];if(!l)returnvoidi.fire("error",{error:"The layer '"+u+"' does not exist in the map's style and cannot be queried for features."});o[l.source]=!0}varc=[];for(varpinthis.sourceCaches)if(!e.layers||o[p]){varh=g.rendered(i.sourceCaches[p],i._layers,t,e,r,n);c.push(h)}returnthis._flattenRenderedFeatures(c)},e.prototype.querySourceFeatures=function(t,e){e&&e.filter&&this._validate(y.filter,"querySourceFeatures.filter",e.filter);varr=this.sourceCaches[t];returnr?g.source(r,e):[]},e.prototype.addSourceType=function(t,e,r){returnv.getType(t)?r(newError('A source type called "'+t+'" already exists.')):(v.setType(t,e),e.workerSourceURL?voidthis.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},r):r(null,null))},e.prototype.getLight=function(){returnthis.light.getLight()},e.prototype.setLight=function(t,e){this._checkLoaded();varr=this.light.getLight(),n=!1;for(variint)if(!c.deepEqual(t[i],r[i])){n=!0;break}if(n){varo=this.stylesheet.transition||{};this.light.setLight(t),this.light.updateLightTransitions(e||{transition:!0},o,this.animationLoop)}},e.prototype._validate=function(t,e,r,n,i){return(!i||i.validate!==!1)&&y.emitErrors(this,t.call(y,c.extend({key:e,style:this.serialize(),value:r,styleSpec:x},n)))},e.prototype._remove=function(){vart=this;for(vareinthis.sourceCaches)t.sourceCaches[e].clearTiles();this.dispatcher.remove()},e.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},e.prototype._reloadSource=function(t){this.sourceCaches[t].reload()},e.prototype._updateSources=function(t){vare=this;for(varrinthis.sourceCaches)e.sourceCaches[r].update(t)},e.prototype._redoPlacement=function(){vart=this;for(vareinthis.sourceCaches)t.sourceCaches[e].redoPlacement()},e.prototype.getIcons=function(t,e,r){varn=this,i=function(){n.spriteAtlas.setSprite(n.sprite),n.spriteAtlas.addIcons(e.icons,r)};this.sprite.loaded()?i():this.sprite.on("data",i)},e.prototype.getGlyphs=function(t,e,r){functionn(t,e,n){t&&console.error(t),s[n]=e,a--,0===a&&r(null,s)}vari=this,o=e.stacks,a=Object.keys(o).length,s={};for(varuino)i.glyphSource.getSimpleGlyphs(u,o[u],e.uid,n)},e}(n);e.exports=A},{"../global_worker_pool":22,"../render/line_atlas":35,"../source/query_features":46,"../source/source":48,"../source/source_cache":49,"../symbol/glyph_source":81,"../symbol/sprite_atlas":86,"../util/ajax":107,"../util/browser":108,"../util/dispatcher":114,"../util/evented":116,"../util/mapbox":123,"../util/util":127,"./animation_loop":57,"./image_sprite":58,"./light":59,"./style_layer":63,"./style_spec":70,"./validate_style":72,"mapbox-gl-function":161,"mapbox-gl-style-spec/lib/deref":162,"mapbox-gl-style-spec/lib/diff":163}],62:[function(t,e,r){"use strict";varn=t("mapbox-gl-function"),i=t("./parse_color"),o=t("../util/util"),a=function(t,e){varr=this;this.value=o.clone(e),this.isFunction=n.isFunctionDefinition(e),this.json=JSON.stringify(this.value),this.minimum=t.minimum,this.isColor="color"===t.type;vara=this.isColor&&this.value?i(this.value):e,s=t.default;if(s&&"color"===t.type&&(s=i(s)),this.function=n[t.function||"piecewise-constant"](a,s),this.isFeatureConstant=this.function.isFeatureConstant,this.isZoomConstant=this.function.isZoomConstant,!this.isFeatureConstant&&!this.isZoomConstant){
this.target.removeEventListener("message",this.receive,!1)},e.exports=n},{}],107:[function(t,e,r){"use strict";functionn(t){vare=i.document.createElement("a");returne.href=t,e.protocol===i.document.location.protocol&&e.host===i.document.location.host}vari=t("./window");r.getJSON=function(t,e){varr=newi.XMLHttpRequest;returnr.open("GET",t,!0),r.setRequestHeader("Accept","application/json"),r.onerror=function(t){e(t)},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){vart;try{t=JSON.parse(r.response)}catch(t){returne(t)}e(null,t)}elsee(newError(r.statusText))},r.send(),r},r.getArrayBuffer=function(t,e){varr=newi.XMLHttpRequest;returnr.open("GET",t,!0),r.responseType="arraybuffer",r.onerror=function(t){e(t)},r.onload=function(){return0===r.response.byteLength&&200===r.status?e(newError("http status 200 returned without content.")):void(r.status>=200&&r.status<300&&r.response?e(null,r.response):e(newError(r.statusText)))},r.send(),r};varo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";r.getImage=function(t,e){returnr.getArrayBuffer(t,function(t,r){if(t)returne(t);varn=newi.Image,a=i.URL||i.webkitURL;n.onload=function(){e(null,n),a.revokeObjectURL(n.src)};vars=newi.Blob([newUint8Array(r)],{type:"image/png"});n.src=r.byteLength?a.createObjectURL(s):o})},r.getVideo=function(t,e){varr=i.document.createElement("video");r.onloadstart=function(){e(null,r)};for(varo=0;o<t.length;o++){vara=i.document.createElement("source");n(t[o])||(r.crossOrigin="Anonymous"),a.src=t[o],r.appendChild(a)}returnr}},{"./window":110}],108:[function(t,e,r){"use strict";varn=t("./window");e.exports.now=function(){returnn.performance&&n.performance.now?n.performance.now.bind(n.performance):Date.now.bind(Date)}();vari=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||n.msRequestAnimationFrame;r.frame=function(t){returni(t)};varo=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||n.msCancelAnimationFrame;r.cancelFrame=function(t){o(t)},r.timed=function(t,n,i){functiono(u){a||(u=e.exports.now(),u>=s+n?t.call(i,1):(t.call(i,(u-s)/n),r.frame(o)))}if(!n)returnt.call(i,1),null;vara=!1,s=e.exports.now();returnr.frame(o),function(){a=!0}},r.getImageData=function(t){vare=n.document.createElement("canvas"),r=e.getContext("2d");returne.width=t.width,e.height=t.height,r.drawImage(t,0,0),r.getImageData(0,0,t.width,t.height).data},r.supported=t("mapbox-gl-supported"),r.hardwareConcurrency=n.navigator.hardwareConcurrency||4,Object.defineProperty(r,"devicePixelRatio",{get:function(){returnn.devicePixelRatio}}),r.supportsWebp=!1;vara=n.document.createElement("img");a.onload=function(){r.supportsWebp=!0},a.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="},{"./window":110,"mapbox-gl-supported":190}],109:[function(t,e,r){"use strict";varn=t("webworkify"),i=t("../window"),o=i.URL.createObjectURL(newn(t("../../source/worker"),{bare:!0}));e.exports=function(){returnnewi.Worker(o)}},{"../../source/worker":55,"../window":110,webworkify:211}],110:[function(t,e,r){"use strict";e.exports=self},{}],111:[function(t,e,r){"use strict";functionn(t,e){returne.area-t.area}vari=t("quickselect"),o=t("./util").calculateSignedArea;e.exports=function(t,e){varr=t.length;if(r<=1)return[t];for(vara,s,u=[],l=0;l<r;l++){varc=o(t[l]);0!==c&&(t[l].area=Math.abs(c),void0===s&&(s=c<0),s===c<0?(a&&u.push(a),a=[t[l]]):a.push(t[l]))}if(a&&u.push(a),e>1)for(varp=0;p<u.length;p++)u[p].length<=e||(i(u[p],e,1,u[p].length-1,n),u[p]=u[p].slice(0,e));returnu}},{"./util":127,quickselect:196}],112:[function(t,e,r){"use strict";varn={API_URL:"https://api.mapbox.com",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null};e.exports=n},{}],113:[function(t,e,r){"use strict";varn=function(t){vare=this;this._stringToNumber={},this._numberToString=[];for(varr=0;r<t.length;r++){varn=t[r];e._stringToNumber[n]=r,e._numberToString[r]=n}};n.prototype.encode=function(t){returnthis._stringToNumber[t]},n.p
this.realloc(4),this.buf.writeFloatLE(t,this.pos),this.pos+=4},writeDouble:function(t){this.realloc(8),this.buf.writeDoubleLE(t,this.pos),this.pos+=8},writeBytes:function(t){vare=t.length;this.writeVarint(e),this.realloc(e);for(varr=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;varr=this.pos;t(e,this);varn=this.pos-r;n>=128&&a(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,n.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,s,e)},writePackedSVarint:function(t,e){this.writeMessage(t,u,e)},writePackedBoolean:function(t,e){this.writeMessage(t,p,e)},writePackedFloat:function(t,e){this.writeMessage(t,l,e)},writePackedDouble:function(t,e){this.writeMessage(t,c,e)},writePackedFixed32:function(t,e){this.writeMessage(t,h,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,f,e)},writePackedFixed64:function(t,e){this.writeMessage(t,d,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,n.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,n.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,n.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,n.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}}).call(this,"undefined"!=typeofr?r:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{"./buffer":192}],194:[function(t,e,r){"use strict";functionn(t,e){this.x=t,this.y=e}e.exports=n,n.prototype={clone:function(){returnnewn(this.x,this.y)},add:function(t){returnthis.clone()._add(t)},sub:function(t){returnthis.clone()._sub(t)},mult:function(t){returnthis.clone()._mult(t)},div:function(t){returnthis.clone()._div(t)},rotate:function(t){returnthis.clone()._rotate(t)},matMult:function(t){returnthis.clone()._matMult(t)},unit:function(){returnthis.clone()._unit()},perp:function(){returnthis.clone()._perp()},round:function(){returnthis.clone()._round()},mag:function(){returnMath.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){returnthis.x===t.x&&this.y===t.y},dist:function(t){returnMath.sqrt(this.distSqr(t))},distSqr:function(t){vare=t.x-this.x,r=t.y-this.y;returne*e+r*r},angle:function(){returnMath.atan2(this.y,this.x)},angleTo:function(t){returnMath.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){returnthis.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){returnMath.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){vare=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;returnthis.x=e,this.y=r,this},_add:function(t){returnthis.x+=t.x,this.y+=t.y,this},_sub:function(t){returnthis.x-=t.x,this.y-=t.y,this},_mult:function(t){returnthis.x*=t,this.y*=t,this},_div:function(t){returnthis.x/=t,this.y/=t,this},_unit:function(){returnthis._div(this.mag()),this},_perp:function(){vart=this.y;returnthis.y=this.x,this.x=-t,this},_rotate:function(t){vare=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;returnthis.x=n,this.y=i,this},_round:function(){returnthis.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){returntinstanceofn?t:Array.isArray(t)?newn(t[0],t[1]):t}},{}],195:[function(t,e,r){functionn(){thrownewError("setTimeout has not been defined")}functioni(){thrownewError("clearTimeout has not been defined")}functiono(t){if(p===setTimeout)returnsetTimeout(t,0);if((p===n||!p)&&setTimeout)returnp=setTimeout,setTimeout(t,0);try{returnp(t,0)}catch(e){t
varh=c.value,f=r.i(s.a)(h.location),d=document.createElement("option");d.setAttribute("value",h.slug),d.dataset.latitude=f.latitude,d.dataset.longitude=f.longitude,d.appendChild(document.createTextNode(h.name)),n.appendChild(d)}}catch(t){u=!0,l=t}finally{try{!a&&p.return&&p.return()}finally{if(u)throwl}}}returnn.addEventListener("change",function(){if("no-location"!==n.value){vart=n[n.selectedIndex].dataset.latitude,e=n[n.selectedIndex].dataset.longitude;map.flyTo({center:[e,t]})}}),n}},function(t,e,r){"use strict";functionn(){vart=document.querySelector("fieldset"),e=document.createElement("div");e.classList.add("map"),t.appendChild(e),navigator.geolocation.getCurrentPosition(function(t){e.dataset.latitude=t.coords.latitude,e.dataset.longitude=t.coords.longitude,e.dataset.accuracy=t.coords.accuracy,r.i(i.a)(t)})}vari=r(12);e.a=n},function(t,e,r){"use strict";functionn(map){vart=document.createElement("button");returnt.setAttribute("type","button"),t.setAttribute("id","create-new-place"),t.appendChild(document.createTextNode("Create New Place?")),t.addEventListener("click",function(){vart=document.createElement("div"),e=document.createElement("label");e.setAttribute("for","place-name"),e.classList.add("place-label"),e.appendChild(document.createTextNode("Name:"));varn=document.createElement("input");n.setAttribute("placeholder","Name"),n.setAttribute("name","place-name"),n.setAttribute("id","place-name"),n.setAttribute("type","text"),t.appendChild(e),t.appendChild(n);varo=document.createElement("div"),a=document.createElement("label");a.setAttribute("for","place-description"),a.classList.add("place-label"),a.appendChild(document.createTextNode("Description:"));vars=document.createElement("input");s.setAttribute("placeholder","Description"),s.setAttribute("name","place-description"),s.setAttribute("id","place-description"),s.setAttribute("type","text"),o.appendChild(a),o.appendChild(s);varu=document.createElement("div"),l=document.createElement("label");l.setAttribute("for","place-latitude"),l.classList.add("place-label"),l.appendChild(document.createTextNode("Latitude:"));varc=document.createElement("input");c.setAttribute("name","place-latitude"),c.setAttribute("id","place-latitude"),c.setAttribute("type","text"),c.value=map.getCenter().lat,u.appendChild(l),u.appendChild(c);varp=document.createElement("div"),h=document.createElement("label");h.setAttribute("for","place-longitude"),h.classList.add("place-label"),h.appendChild(document.createTextNode("Longitude:"));varf=document.createElement("input");f.setAttribute("name","place-longitude"),f.setAttribute("id","place-longitude"),f.setAttribute("type","text"),f.value=map.getCenter().lng,p.appendChild(h),p.appendChild(f);vard=document.createElement("button");d.setAttribute("id","place-submit"),d.setAttribute("name","place-submit"),d.setAttribute("type","button"),d.appendChild(document.createTextNode("Submit New Place")),d.addEventListener("click",function(){r.i(i.a)(map)});varm=document.querySelector("fieldset");m.appendChild(t),m.appendChild(o),m.appendChild(u),m.appendChild(p),m.appendChild(d)}),t}vari=r(15);e.a=n},function(t,e,r){"use strict";functionn(map){vart=newFormData;t.append("place-name",document.querySelector("#place-name").value),t.append("place-description",document.querySelector("#place-description").value),t.append("place-latitude",document.querySelector("#place-latitude").value),t.append("place-longitude",document.querySelector("#place-longitude").value),fetch("/places/new",{credentials:"same-origin",method:"post",body:t}).then(function(t){returnt.json()}).then(function(t){if(t.error===!0)thrownewError(t.error_description);vare=document.querySelector("fieldset"),r=document.querySelectorAll(".place-label"),n=!0,i=!1,o=void0;try{for(vara,s=r[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){varu=a.value;e.removeChild(u.parentNode)}}catch(t){i=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throwo}}e.removeChild(document.querySelector("#place-submit"));varl=document.querySelector("#create-new-place");l.parentNode.remov
!function(e,r){t.exports=r()}(this,function(){returnfunction(t){functione(n){if(r[n])returnr[n].exports;vari=r[n]={exports:{},id:n,loaded:!1};returnt[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}varr={};returne.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";functionn(t){returnt&&t.__esModule?t:{default:t}}functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});varo=function(){functiont(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}returnfunction(e,r,n){returnr&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(1),s=n(a),u=r(2),l=n(u),c=r(3),p=n(c),h=r(4),f=n(h),d=r(5),m=n(d),y=r(6),v=n(y),g=r(7),_=n(g),x={driver:localStorage,name:"webStorage"},b={set:"setItem",set_err:"setItemError",get:"getItem",get_err:"getItemError",remove:"removeItem",clear:"clear"},w=function(){functiont(e){if(i(this,t),e=(0,f.default)({},x,e),null==e.name||""===(0,p.default)(e.name))throw"You must use a valid name for the database.";this.options=e,this.storeKeyPrefix=(0,v.default)(this),s.default.apply(Object.getPrototypeOf(this))}returno(t,[{key:"createInstance",value:function(e){returnnewt(e)}},{key:"config",value:function(t){if(t=(0,f.default)({},x,t),null==t.name||""===(0,p.default)(t.name))throw"You must use a valid name for the database.";this.options=t,this.storeKeyPrefix=(0,v.default)(this)}},{key:"getItem",value:function(t){vare=this.options.driver.getItem(this.storeKeyPrefix+t);try{varr=JSON.parse(e);returnthis.dispatchEvent({type:b.get,data:r}),r}catch(t){throwthis.dispatchEvent({type:b.get_err,data:t}),t}}},{key:"setItem",value:function(t,e){try{returne=null==e?null:e,t=this.storeKeyPrefix+t,this.options.driver.setItem(t,JSON.stringify(e)),this.dispatchEvent({type:b.set,data:e}),e}catch(t){throwthis.dispatchEvent({type:b.set_err,data:t}),t}}},{key:"removeItem",value:function(t){this.dispatchEvent({type:b.remove,data:t}),this.options.driver.removeItem(this.storeKeyPrefix+t)}},{key:"clear",value:function(t){vare=this.options.driver;t===!0?e.clear():(0,_.default)(this,function(t){e.removeItem(t)}),this.dispatchEvent({type:b.clear})}},{key:"keys",value:function(){vart=[],e=this.storeKeyPrefix;return(0,_.default)(this,function(r){t.push((0,l.default)(r,e))}),t}},{key:"length",value:function(){vart=0;return(0,_.default)(this,function(){t+=1}),t}},{key:"iterate",value:function(t){vare=this.storeKeyPrefix;(0,_.default)(this,function(r,n,i){varo=(0,l.default)(r,e),a=JSON.parse(n);if(t&&t(o,a,i)===!1)return!1})}},{key:"quota",value:function(){vart={},e=0;return(0,_.default)(this,function(r,n){vari=2*n.length/1024/1024;e+=i,t[r]=i}),{total:e,items:t}}},{key:"supported",value:function(){return(0,m.default)(this.options.driver)}}]),t}();e.default=neww,t.exports=e.default},function(t,e,r){varn,i;!function(o,a,s){"use strict";n=s,i="function"==typeofn?n.call(e,r,e,t):n,!(void0!==i&&(t.exports=i))}("eventDispatcher",this,function(t){"use strict";vare={nonExtensible:'Cannot apply "'+t+'" on an non extensible object'},r={addEventListener:function(t,r){varn;if(!Object.isExtensible(this))thrownewTypeError(e.nonExtensible);return"undefined"==typeofthis._listeners&&(this._listeners={}),n=this._listeners,"undefined"==typeofn[t]&&(n[t]=[]),n[t].indexOf(r)===-1&&n[t].push(r),this},hasEventListener:function(t,e){varr;return"undefined"!=typeofthis._listeners&&(r=this._listeners,"undefined"!=typeofr[t]&&r[t].indexOf(e)!==-1)},removeEventListener:function(t,e){varr,n,i;if("undefined"!=typeofthis._listeners)returnr=this._listeners,n=r[t],"undefined"!=typeofn&&(i=n.indexOf(e),i!==-1&&n.splice(i,1)),this},dispatchEvent:function(t){vare,r,n,i;if("undefined"!=typeofthis._listeners){if(e=this._listeners,r=e[t.type],"undefined"!=typeofr)for(t.target=this,i=r.length,n=0;n<i;n+=1)r[n].call(this,t);returnthis}}},n=Object.create(r,{apply:{value:function(t){if(!Object.isExtensible(t))thrownewTypeError(e.nonExtensible);returnt.a