UNPKG

mapbox-gl

Version:
2 lines 130 kB
!function t(e,n,r){function i(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[s]={exports:{}};e[s][0].call(f.exports,function(t){var n=e[s][1][t];return i(n?n:t)},f,f.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=t("./src/directions"),o=r(i);window.mapboxgl?mapboxgl.Directions=o["default"]:"undefined"!=typeof e&&(e.exports=o["default"])},{"./src/directions":116}],2:[function(t,e,n){function r(t,e){return d.isUndefined(e)?""+e:d.isNumber(e)&&!isFinite(e)?e.toString():d.isFunction(e)||d.isRegExp(e)?e.toString():e}function i(t,e){return d.isString(t)?t.length<e?t:t.slice(0,e):t}function o(t){return i(JSON.stringify(t.actual,r),128)+" "+t.operator+" "+i(JSON.stringify(t.expected,r),128)}function s(t,e,n,r,i){throw new m.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function a(t,e){t||s(t,!0,e,"==",m.ok)}function u(t,e){if(t===e)return!0;if(d.isBuffer(t)&&d.isBuffer(e)){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return d.isDate(t)&&d.isDate(e)?t.getTime()===e.getTime():d.isRegExp(t)&&d.isRegExp(e)?t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase:d.isObject(t)||d.isObject(e)?f(t,e):t==e}function c(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function f(t,e){if(d.isNullOrUndefined(t)||d.isNullOrUndefined(e))return!1;if(t.prototype!==e.prototype)return!1;if(d.isPrimitive(t)||d.isPrimitive(e))return t===e;var n=c(t),r=c(e);if(n&&!r||!n&&r)return!1;if(n)return t=h.call(t),e=h.call(e),u(t,e);var i,o,s=v(t),a=v(e);if(s.length!=a.length)return!1;for(s.sort(),a.sort(),o=s.length-1;o>=0;o--)if(s[o]!=a[o])return!1;for(o=s.length-1;o>=0;o--)if(i=s[o],!u(t[i],e[i]))return!1;return!0}function l(t,e){return t&&e?"[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e?!0:e.call({},t)===!0:!1}function p(t,e,n,r){var i;d.isString(n)&&(r=n,n=null);try{e()}catch(o){i=o}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&s(i,n,"Missing expected exception"+r),!t&&l(i,n)&&s(i,n,"Got unwanted exception"+r),t&&i&&n&&!l(i,n)||!t&&i)throw i}var d=t("util/"),h=Array.prototype.slice,y=Object.prototype.hasOwnProperty,m=e.exports=a;m.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var e=t.stackStartFunction||s;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=e.name,a=r.indexOf("\n"+i);if(a>=0){var u=r.indexOf("\n",a+1);r=r.substring(u+1)}this.stack=r}}},d.inherits(m.AssertionError,Error),m.fail=s,m.ok=a,m.equal=function(t,e,n){t!=e&&s(t,e,n,"==",m.equal)},m.notEqual=function(t,e,n){t==e&&s(t,e,n,"!=",m.notEqual)},m.deepEqual=function(t,e,n){u(t,e)||s(t,e,n,"deepEqual",m.deepEqual)},m.notDeepEqual=function(t,e,n){u(t,e)&&s(t,e,n,"notDeepEqual",m.notDeepEqual)},m.strictEqual=function(t,e,n){t!==e&&s(t,e,n,"===",m.strictEqual)},m.notStrictEqual=function(t,e,n){t===e&&s(t,e,n,"!==",m.notStrictEqual)},m["throws"]=function(t,e,n){p.apply(this,[!0].concat(h.call(arguments)))},m.doesNotThrow=function(t,e){p.apply(this,[!1].concat(h.call(arguments)))},m.ifError=function(t){if(t)throw t};var v=Object.keys||function(t){var e=[];for(var n in t)y.call(t,n)&&e.push(n);return e}},{"util/":6}],3:[function(t,e,n){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},{}],4:[function(t,e,n){function r(){f=!1,a.length?c=a.concat(c):l=-1,c.length&&i()}function i(){if(!f){var t=setTimeout(r);f=!0;for(var e=c.length;e;){for(a=c,c=[];++l<e;)a&&a[l].run();l=-1,e=c.length}a=null,f=!1,clearTimeout(t)}}function o(t,e){this.fun=t,this.array=e}function s(){}var a,u=e.exports={},c=[],f=!1,l=-1;u.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new o(t,e)),1!==c.length||f||setTimeout(i,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=s,u.addListener=s,u.once=s,u.off=s,u.removeListener=s,u.removeAllListeners=s,u.emit=s,u.binding=function(t){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(t){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],5:[function(t,e,n){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],6:[function(t,e,n){(function(e,r){function i(t,e){var r={seen:[],stylize:s};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(e)?r.showHidden=e:e&&n._extend(r,e),w(r.showHidden)&&(r.showHidden=!1),w(r.depth)&&(r.depth=2),w(r.colors)&&(r.colors=!1),w(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,t,r.depth)}function o(t,e){var n=i.styles[e];return n?"["+i.colors[n][0]+"m"+t+"["+i.colors[n][1]+"m":t}function s(t,e){return t}function a(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function u(t,e,r){if(t.customInspect&&e&&A(e.inspect)&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return b(i)||(i=u(t,i,r)),i}var o=c(t,e);if(o)return o;var s=Object.keys(e),y=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(e)),T(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(e);if(0===s.length){if(A(e)){var m=e.name?": "+e.name:"";return t.stylize("[Function"+m+"]","special")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(j(e))return t.stylize(Date.prototype.toString.call(e),"date");if(T(e))return f(e)}var v="",g=!1,_=["{","}"];if(h(e)&&(g=!0,_=["[","]"]),A(e)){var w=e.name?": "+e.name:"";v=" [Function"+w+"]"}if(x(e)&&(v=" "+RegExp.prototype.toString.call(e)),j(e)&&(v=" "+Date.prototype.toUTCString.call(e)),T(e)&&(v=" "+f(e)),0===s.length&&(!g||0==e.length))return _[0]+v+_[1];if(0>r)return x(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var E;return E=g?l(t,e,r,y,s):s.map(function(n){return p(t,e,r,y,n,g)}),t.seen.pop(),d(E,v,_)}function c(t,e){if(w(e))return t.stylize("undefined","undefined");if(b(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return g(e)?t.stylize(""+e,"number"):y(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,n,r,i){for(var o=[],s=0,a=e.length;a>s;++s)k(e,String(s))?o.push(p(t,e,n,r,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(p(t,e,n,r,i,!0))}),o}function p(t,e,n,r,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),k(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=m(n)?u(t,c.value,null):u(t,c.value,n-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function d(t,e,n){var r=0,i=t.reduce(function(t,e){return r++,e.indexOf("\n")>=0&&r++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function h(t){return Array.isArray(t)}function y(t){return"boolean"==typeof t}function m(t){return null===t}function v(t){return null==t}function g(t){return"number"==typeof t}function b(t){return"string"==typeof t}function _(t){return"symbol"==typeof t}function w(t){return void 0===t}function x(t){return E(t)&&"[object RegExp]"===O(t)}function E(t){return"object"==typeof t&&null!==t}function j(t){return E(t)&&"[object Date]"===O(t)}function T(t){return E(t)&&("[object Error]"===O(t)||t instanceof Error)}function A(t){return"function"==typeof t}function S(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function O(t){return Object.prototype.toString.call(t)}function I(t){return 10>t?"0"+t.toString(10):t.toString(10)}function R(){var t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":");return[t.getDate(),N[t.getMonth()],e].join(" ")}function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var D=/%[sdj%]/g;n.format=function(t){if(!b(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(i(arguments[n]));return e.join(" ")}for(var n=1,r=arguments,o=r.length,s=String(t).replace(D,function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return t}}),a=r[n];o>n;a=r[++n])s+=m(a)||!E(a)?" "+a:" "+i(a);return s},n.deprecate=function(t,i){function o(){if(!s){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),s=!0}return t.apply(this,arguments)}if(w(r.process))return function(){return n.deprecate(t,i).apply(this,arguments)};if(e.noDeprecation===!0)return t;var s=!1;return o};var C,P={};n.debuglog=function(t){if(w(C)&&(C=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!P[t])if(new RegExp("\\b"+t+"\\b","i").test(C)){var r=e.pid;P[t]=function(){var e=n.format.apply(n,arguments);console.error("%s %d: %s",t,r,e)}}else P[t]=function(){};return P[t]},n.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=h,n.isBoolean=y,n.isNull=m,n.isNullOrUndefined=v,n.isNumber=g,n.isString=b,n.isSymbol=_,n.isUndefined=w,n.isRegExp=x,n.isObject=E,n.isDate=j,n.isError=T,n.isFunction=A,n.isPrimitive=S,n.isBuffer=t("./support/isBuffer");var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",R(),n.format.apply(n,arguments))},n.inherits=t("inherits"),n._extend=function(t,e){if(!e||!E(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":5,_process:4,inherits:3}],7:[function(t,e,n){function r(t,e,n){function r(){v&&clearTimeout(v),d&&clearTimeout(d),b=0,d=v=g=void 0}function o(e,n){n&&clearTimeout(n),d=v=g=void 0,e&&(b=c(),h=t.apply(m,p),v||d||(p=m=void 0))}function u(){var t=e-(c()-y);0>=t||t>e?o(g,d):v=setTimeout(u,t)}function f(){o(w,v)}function l(){if(p=arguments,y=c(),m=this,g=w&&(v||!x),_===!1)var n=x&&!v;else{d||x||(b=y);var r=_-(y-b),i=0>=r||r>_;i?(d&&(d=clearTimeout(d)),b=y,h=t.apply(m,p)):d||(d=setTimeout(f,r))}return i&&v?v=clearTimeout(v):v||e===_||(v=setTimeout(u,e)),n&&(i=!0,h=t.apply(m,p)),!i||v||d||(p=m=void 0),h}var p,d,h,y,m,v,g,b=0,_=!1,w=!0;if("function"!=typeof t)throw new TypeError(s);if(e=0>e?0:+e||0,n===!0){var x=!0;w=!1}else i(n)&&(x=!!n.leading,_="maxWait"in n&&a(+n.maxWait||0,e),w="trailing"in n?!!n.trailing:w);return l.cancel=r,l}function i(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var o=t("lodash._getnative"),s="Expected a function",a=Math.max,u=o(Date,"now"),c=u||function(){return(new Date).getTime()};e.exports=r},{"lodash._getnative":8}],8:[function(t,e,n){function r(t){return!!t&&"object"==typeof t}function i(t,e){var n=null==t?void 0:t[e];return a(n)?n:void 0}function o(t){return s(t)&&d.call(t)==u}function s(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function a(t){return null==t?!1:o(t)?h.test(l.call(t)):r(t)&&c.test(t)}var u="[object Function]",c=/^\[object .+?Constructor\]$/,f=Object.prototype,l=Function.prototype.toString,p=f.hasOwnProperty,d=f.toString,h=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=i},{}],9:[function(t,e,n){function r(t,e,n,r){n="function"==typeof n?o(n,r,3):void 0;var s=n?n(t,e):void 0;return void 0===s?i(t,e,n):!!s}var i=t("lodash._baseisequal"),o=t("lodash._bindcallback");e.exports=r},{"lodash._baseisequal":10,"lodash._bindcallback":16}],10:[function(t,e,n){function r(t){return!!t&&"object"==typeof t}function i(t,e){for(var n=-1,r=t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function o(t,e,n,i,a,u){return t===e?!0:null==t||null==e||!f(t)&&!r(e)?t!==t&&e!==e:s(t,e,o,n,i,a,u)}function s(t,e,n,r,i,o,s){var f=l(t),d=l(e),m=y,v=y;f||(m=T.call(t),m==h?m=_:m!=_&&(f=p(t))),d||(v=T.call(e),v==h?v=_:v!=_&&(d=p(e)));var g=m==_,b=v==_,w=m==v;if(w&&!f&&!g)return u(t,e,m);if(!i){var x=g&&j.call(t,"__wrapped__"),E=b&&j.call(e,"__wrapped__");if(x||E)return n(x?t.value():t,E?e.value():e,r,i,o,s)}if(!w)return!1;o||(o=[]),s||(s=[]);for(var A=o.length;A--;)if(o[A]==t)return s[A]==e;o.push(t),s.push(e);var S=(f?a:c)(t,e,n,r,i,o,s);return o.pop(),s.pop(),S}function a(t,e,n,r,o,s,a){var u=-1,c=t.length,f=e.length;if(c!=f&&!(o&&f>c))return!1;for(;++u<c;){var l=t[u],p=e[u],d=r?r(o?p:l,o?l:p,u):void 0;if(void 0!==d){if(d)continue;return!1}if(o){if(!i(e,function(t){return l===t||n(l,t,r,o,s,a)}))return!1}else if(l!==p&&!n(l,p,r,o,s,a))return!1}return!0}function u(t,e,n){switch(n){case m:case v:return+t==+e;case g:return t.name==e.name&&t.message==e.message;case b:return t!=+t?e!=+e:t==+e;case w:case x:return t==e+""}return!1}function c(t,e,n,r,i,o,s){var a=d(t),u=a.length,c=d(e),f=c.length;if(u!=f&&!i)return!1;for(var l=u;l--;){var p=a[l];if(!(i?p in e:j.call(e,p)))return!1}for(var h=i;++l<u;){p=a[l];var y=t[p],m=e[p],v=r?r(i?m:y,i?y:m,p):void 0;if(!(void 0===v?n(y,m,r,i,o,s):v))return!1;h||(h="constructor"==p)}if(!h){var g=t.constructor,b=e.constructor;if(g!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b))return!1}return!0}function f(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var l=t("lodash.isarray"),p=t("lodash.istypedarray"),d=t("lodash.keys"),h="[object Arguments]",y="[object Array]",m="[object Boolean]",v="[object Date]",g="[object Error]",b="[object Number]",_="[object Object]",w="[object RegExp]",x="[object String]",E=Object.prototype,j=E.hasOwnProperty,T=E.toString;e.exports=o},{"lodash.isarray":11,"lodash.istypedarray":12,"lodash.keys":13}],11:[function(t,e,n){function r(t){return!!t&&"object"==typeof t}function i(t,e){var n=null==t?void 0:t[e];return u(n)?n:void 0}function o(t){return"number"==typeof t&&t>-1&&t%1==0&&g>=t}function s(t){return a(t)&&y.call(t)==f}function a(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function u(t){return null==t?!1:s(t)?m.test(d.call(t)):r(t)&&l.test(t)}var c="[object Array]",f="[object Function]",l=/^\[object .+?Constructor\]$/,p=Object.prototype,d=Function.prototype.toString,h=p.hasOwnProperty,y=p.toString,m=RegExp("^"+d.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),v=i(Array,"isArray"),g=9007199254740991,b=v||function(t){return r(t)&&o(t.length)&&y.call(t)==c};e.exports=b},{}],12:[function(t,e,n){function r(t){return"number"==typeof t&&t>-1&&t%1==0&&s>=t}function i(t){return!!t&&"object"==typeof t}function o(t){return i(t)&&r(t.length)&&!!R[D.call(t)]}var s=9007199254740991,a="[object Arguments]",u="[object Array]",c="[object Boolean]",f="[object Date]",l="[object Error]",p="[object Function]",d="[object Map]",h="[object Number]",y="[object Object]",m="[object RegExp]",v="[object Set]",g="[object String]",b="[object WeakMap]",_="[object ArrayBuffer]",w="[object Float32Array]",x="[object Float64Array]",E="[object Int8Array]",j="[object Int16Array]",T="[object Int32Array]",A="[object Uint8Array]",S="[object Uint8ClampedArray]",O="[object Uint16Array]",I="[object Uint32Array]",R={};R[w]=R[x]=R[E]=R[j]=R[T]=R[A]=R[S]=R[O]=R[I]=!0,R[a]=R[u]=R[_]=R[c]=R[f]=R[l]=R[p]=R[d]=R[h]=R[y]=R[m]=R[v]=R[g]=R[b]=!1;var k=Object.prototype,D=k.toString;e.exports=o},{}],13:[function(t,e,n){function r(t){return function(e){return null==e?void 0:e[t]}}function i(t){return null!=t&&s(g(t))}function o(t,e){return t="number"==typeof t||d.test(t)?+t:-1,e=null==e?v:e,t>-1&&t%1==0&&e>t}function s(t){return"number"==typeof t&&t>-1&&t%1==0&&v>=t}function a(t){for(var e=c(t),n=e.length,r=n&&t.length,i=!!r&&s(r)&&(p(t)||l(t)),a=-1,u=[];++a<n;){var f=e[a];(i&&o(f,r)||y.call(t,f))&&u.push(f)}return u}function u(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function c(t){if(null==t)return[];u(t)||(t=Object(t));var e=t.length;e=e&&s(e)&&(p(t)||l(t))&&e||0;for(var n=t.constructor,r=-1,i="function"==typeof n&&n.prototype===t,a=Array(e),c=e>0;++r<e;)a[r]=r+"";for(var f in t)c&&o(f,e)||"constructor"==f&&(i||!y.call(t,f))||a.push(f);return a}var f=t("lodash._getnative"),l=t("lodash.isarguments"),p=t("lodash.isarray"),d=/^\d+$/,h=Object.prototype,y=h.hasOwnProperty,m=f(Object,"keys"),v=9007199254740991,g=r("length"),b=m?function(t){var e=null==t?void 0:t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&i(t)?a(t):u(t)?m(t):[]}:a;e.exports=b},{"lodash._getnative":14,"lodash.isarguments":15,"lodash.isarray":11}],14:[function(t,e,n){arguments[4][8][0].apply(n,arguments)},{dup:8}],15:[function(t,e,n){function r(t){return function(e){return null==e?void 0:e[t]}}function i(t){return s(t)&&m.call(t,"callee")&&(!g.call(t,"callee")||v.call(t)==p)}function o(t){return null!=t&&u(b(t))&&!a(t)}function s(t){return f(t)&&o(t)}function a(t){var e=c(t)?v.call(t):"";return e==d||e==h}function u(t){return"number"==typeof t&&t>-1&&t%1==0&&l>=t}function c(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function f(t){return!!t&&"object"==typeof t}var l=9007199254740991,p="[object Arguments]",d="[object Function]",h="[object GeneratorFunction]",y=Object.prototype,m=y.hasOwnProperty,v=y.toString,g=y.propertyIsEnumerable,b=r("length");e.exports=i},{}],16:[function(t,e,n){function r(t,e,n){if("function"!=typeof t)return i;if(void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)};case 5:return function(n,r,i,o,s){return t.call(e,n,r,i,o,s)}}return function(){return t.apply(e,arguments)}}function i(t){return t}e.exports=r},{}],17:[function(t,e,n){function r(t){return"\\"+T[t]}function i(t){return!!t&&"object"==typeof t}function o(t,e,n,r){return void 0!==t&&S.call(r,n)?t:e}function s(t,e,n){for(var r=-1,i=y(e),o=i.length;++r<o;){var s=i[r],a=t[s],u=n(a,e[s],s,t,e);(u===u?u===a:a!==a)&&(void 0!==a||s in t)||(t[s]=u)}return t}function a(t,e){return null==e?t:f(e,y(e),t)}function u(t){return i(t)&&"string"==typeof t.message&&O.call(t)==g}function c(t,e,n){var i=v.imports._.templateSettings||v;n&&d(t,e,n)&&(e=n=void 0),t=l(t),e=s(a({},n||e),i,o);var c,f,m=s(a({},e.imports),i.imports,o),g=y(m),T=p(m,g),A=0,S=e.interpolate||E,O="__p += '",R=RegExp((e.escape||E).source+"|"+S.source+"|"+(S===h?x:E).source+"|"+(e.evaluate||E).source+"|$","g"),k="sourceURL"in e?"//# sourceURL="+e.sourceURL+"\n":"";t.replace(R,function(e,n,i,o,s,a){return i||(i=o),O+=t.slice(A,a).replace(j,r),n&&(c=!0,O+="' +\n__e("+n+") +\n'"),s&&(f=!0,O+="';\n"+s+";\n__p += '"),i&&(O+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),A=a+e.length,e}),O+="';\n";var D=e.variable;D||(O="with (obj) {\n"+O+"\n}\n"),O=(f?O.replace(b,""):O).replace(_,"$1").replace(w,"$1;"),O="function("+(D||"obj")+") {\n"+(D?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(c?", __e = _.escape":"")+(f?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+O+"return __p\n}";var C=I(function(){return Function(g,k+"return "+O).apply(void 0,T)});if(C.source=O,u(C))throw C;return C}var f=t("lodash._basecopy"),l=t("lodash._basetostring"),p=t("lodash._basevalues"),d=t("lodash._isiterateecall"),h=t("lodash._reinterpolate"),y=t("lodash.keys"),m=t("lodash.restparam"),v=t("lodash.templatesettings"),g="[object Error]",b=/\b__p \+= '';/g,_=/\b(__p \+=) '' \+/g,w=/(__e\(.*?\)|\b__t\)) \+\n'';/g,x=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,E=/($^)/,j=/['\n\r\u2028\u2029\\]/g,T={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},A=Object.prototype,S=A.hasOwnProperty,O=A.toString,I=m(function(t,e){try{return t.apply(void 0,e)}catch(n){return u(n)?n:new Error(n)}});e.exports=c},{"lodash._basecopy":18,"lodash._basetostring":19,"lodash._basevalues":20,"lodash._isiterateecall":21,"lodash._reinterpolate":22,"lodash.keys":25,"lodash.restparam":29,"lodash.templatesettings":30}],18:[function(t,e,n){function r(t,e,n){n||(n={});for(var r=-1,i=e.length;++r<i;){var o=e[r];n[o]=t[o]}return n}e.exports=r},{}],19:[function(t,e,n){function r(t){return null==t?"":t+""}e.exports=r},{}],20:[function(t,e,n){function r(t,e){for(var n=-1,r=e.length,i=Array(r);++n<r;)i[n]=t[e[n]];return i}e.exports=r},{}],21:[function(t,e,n){function r(t){return function(e){return null==e?void 0:e[t]}}function i(t){return null!=t&&a(l(t))}function o(t,e){return t="number"==typeof t||c.test(t)?+t:-1,e=null==e?f:e,t>-1&&t%1==0&&e>t}function s(t,e,n){if(!u(n))return!1;var r=typeof e;if("number"==r?i(n)&&o(e,n.length):"string"==r&&e in n){var s=n[e];return t===t?t===s:s!==s}return!1}function a(t){return"number"==typeof t&&t>-1&&t%1==0&&f>=t}function u(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var c=/^\d+$/,f=9007199254740991,l=r("length");e.exports=s},{}],22:[function(t,e,n){var r=/<%=([\s\S]+?)%>/g;e.exports=r},{}],23:[function(t,e,n){function r(t){return d[t]}function i(t){return!!t&&"object"==typeof t}function o(t){return"symbol"==typeof t||i(t)&&y.call(t)==f}function s(t){if("string"==typeof t)return t;if(null==t)return"";if(o(t))return m?g.call(t):"";var e=t+"";return"0"==e&&1/t==-c?"-0":e}function a(t){return t=s(t),t&&p.test(t)?t.replace(l,r):t}var u=t("lodash._root"),c=1/0,f="[object Symbol]",l=/[&<>"'`]/g,p=RegExp(l.source),d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},h=Object.prototype,y=h.toString,m=u.Symbol,v=m?m.prototype:void 0,g=m?v.toString:void 0;e.exports=a},{"lodash._root":24}],24:[function(t,e,n){(function(t){function r(t){return t&&t.Object===Object?t:null}var i={"function":!0,object:!0},o=i[typeof n]&&n&&!n.nodeType?n:void 0,s=i[typeof e]&&e&&!e.nodeType?e:void 0,a=r(o&&s&&"object"==typeof t&&t),u=r(i[typeof self]&&self),c=r(i[typeof window]&&window),f=r(i[typeof this]&&this),l=a||c!==(f&&f.window)&&c||u||f||Function("return this")();e.exports=l}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],25:[function(t,e,n){arguments[4][13][0].apply(n,arguments)},{dup:13,"lodash._getnative":26,"lodash.isarguments":27,"lodash.isarray":28}],26:[function(t,e,n){arguments[4][8][0].apply(n,arguments)},{dup:8}],27:[function(t,e,n){arguments[4][15][0].apply(n,arguments)},{dup:15}],28:[function(t,e,n){arguments[4][11][0].apply(n,arguments)},{dup:11}],29:[function(t,e,n){function r(t,e){if("function"!=typeof t)throw new TypeError(i);return e=o(void 0===e?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,i=o(n.length-e,0),s=Array(i);++r<i;)s[r]=n[e+r];switch(e){case 0:return t.call(this,s);case 1:return t.call(this,n[0],s);case 2:return t.call(this,n[0],n[1],s)}var a=Array(e+1);for(r=-1;++r<e;)a[r]=n[r];return a[e]=s,t.apply(this,a)}}var i="Expected a function",o=Math.max;e.exports=r},{}],30:[function(t,e,n){var r=t("lodash.escape"),i=t("lodash._reinterpolate"),o=/<%-([\s\S]+?)%>/g,s=/<%([\s\S]+?)%>/g,a={escape:o,evaluate:s,interpolate:i,variable:"",imports:{_:{escape:r}}};e.exports=a},{"lodash._reinterpolate":22,"lodash.escape":23}],31:[function(t,e,n){"use strict";function r(t){i("number"==typeof t.latitude&&"number"==typeof t.longitude,"location must be an object with numeric latitude & longitude properties"),void 0!==t.zoom&&i("number"==typeof t.zoom,"zoom must be numeric")}var i=t("assert");e.exports=r},{assert:2}],32:[function(t,e,n){"use strict";e.exports=function(t){return window.atob(t)}},{}],33:[function(t,e,n){"use strict";var r=t("rest/interceptor"),i=r({success:function(t){var e=t&&t.request,n=e&&e.callback;return"function"==typeof n&&n(null,t.entity),t},error:function(t){var e=t&&t.request,n=e&&e.callback;if("function"==typeof n){var r=t.error||t.entity;"object"!=typeof r&&(r=new Error(r)),n(r)}return t}});e.exports=i},{"rest/interceptor":55}],34:[function(t,e,n){"use strict";var r=t("rest"),i=t("./callbackify");e.exports=function(e){return r.wrap(t("rest/interceptor/errorCode")).wrap(t("rest/interceptor/pathPrefix"),{prefix:e.endpoint}).wrap(t("rest/interceptor/mime"),{mime:"application/json"}).wrap(t("rest/interceptor/defaultRequest"),{params:{access_token:e.accessToken}}).wrap(t("rest/interceptor/template")).wrap(i)}},{"./callbackify":33,rest:51,"rest/interceptor/defaultRequest":56,"rest/interceptor/errorCode":57,"rest/interceptor/mime":58,"rest/interceptor/pathPrefix":59,"rest/interceptor/template":60}],35:[function(t,e,n){e.exports.DEFAULT_ENDPOINT="https://api.mapbox.com",e.exports.API_GEOCODER_FORWARD="/geocoding/v5/{dataset}/{query}.json{?proximity}",e.exports.API_GEOCODER_REVERSE="/geocoding/v5/{dataset}/{longitude},{latitude}.json",e.exports.API_DIRECTIONS="/v4/directions/{profile}/{encodedWaypoints}.json{?alternatives,instructions,geometry,steps}",e.exports.API_DISTANCE="/distances/v1/mapbox/{profile}",e.exports.API_SURFACE="/v4/surface/{mapid}.json{?layer,fields,points,geojson,interpolate,encoded_polyline}",e.exports.API_UPLOADS="/uploads/v1/{owner}",e.exports.API_UPLOAD="/uploads/v1/{owner}/{upload}",e.exports.API_UPLOAD_CREDENTIALS="/uploads/v1/{owner}/credentials",e.exports.API_MATCHING="/matching/v4/{profile}.json",e.exports.API_DATASET_DATASETS="/datasets/v1/{owner}",e.exports.API_DATASET_DATASET="/datasets/v1/{owner}/{dataset}",e.exports.API_DATASET_FEATURES="/datasets/v1/{owner}/{dataset}/features",e.exports.API_DATASET_FEATURE="/datasets/v1/{owner}/{dataset}/features/{id}",e.exports.API_TILESTATS_STATISTICS="/tilestats/v1/{owner}/{tileset}",e.exports.API_TILESTATS_LAYER="/tilestats/v1/{owner}/{tileset}/{layer}",e.exports.API_TILESTATS_ATTRIBUTE="/tilestats/v1/{owner}/{tileset}/{layer}/{attribute}",e.exports.API_STATIC="/v4/{mapid}{+overlay}/{+xyz}/{width}x{height}{+retina}{.format}"},{}],36:[function(t,e,n){"use strict";function r(t){return t.map(function(t){return i(t),t.longitude+","+t.latitude}).join(";")}var i=t("./assert_location");e.exports=r},{"./assert_location":31}],37:[function(t,e,n){(function(n){"use strict";function r(t){var e=t.split(".")[1];if(!e)return null;if(e=e.replace(/-/g,"+").replace(/_/g,"/"),n.browser)e=e.replace(/=/g,"");else{var r=e.length%4;if(2===r&&(e+="=="),3===r&&(e+="="),1===r||r>3)return null}try{return JSON.parse(i(e)).u}catch(o){return null}}var i=t("atob");e.exports=r}).call(this,t("_process"))},{_process:4,atob:32}],38:[function(t,e,n){"use strict";function r(t){function e(e,n){this.name=t,i("string"==typeof e,"accessToken required to instantiate Mapbox client");var r=o.DEFAULT_ENDPOINT;void 0!==n&&(i("object"==typeof n,"options must be an object"),n.endpoint&&(i("string"==typeof n.endpoint,"endpoint must be a string"),r=n.endpoint),n.account&&(i("string"==typeof n.account,"account must be a string"),this.owner=n.account)),this.client=s({endpoint:r,accessToken:e}),this.accessToken=e,this.endpoint=r,this.owner=this.owner||a(e),i(!!this.owner,"could not determine account from provided accessToken")}return e}var i=t("assert"),o=t("./constants"),s=t("./client"),a=t("./get_user");e.exports=r},{"./client":34,"./constants":35,"./get_user":37,assert:2}],39:[function(t,e,n){"use strict";var r=t("./make_service"),i=t("xtend/mutable"),o=t("./services/geocoder"),s=t("./services/surface"),a=t("./services/directions"),u=t("./services/uploads"),c=t("./services/matching"),f=t("./services/datasets"),l=t("./services/distance"),p=t("./services/tilestats"),d=r("MapboxClient");i(d.prototype,o.prototype,s.prototype,a.prototype,l.prototype,c.prototype,f.prototype,u.prototype,p.prototype),e.exports=d},{"./make_service":38,"./services/datasets":40,"./services/directions":41,"./services/distance":42,"./services/geocoder":43,"./services/matching":44,"./services/surface":45,"./services/tilestats":46,"./services/uploads":47,"xtend/mutable":93}],40:[function(t,e,n){"use strict";var r=t("assert"),i=t("geojsonhint/object"),o=t("hat"),s=t("../make_service"),a=t("../constants"),u=e.exports=s("MapboxDatasets");u.prototype.listDatasets=function(t){r("function"==typeof t,"callback must be a function"),this.client({path:a.API_DATASET_DATASETS,params:{owner:this.owner},callback:t})},u.prototype.createDataset=function(t,e){void 0===e&&"function"==typeof t&&(e=t,t={}),r("object"==typeof t,"options must be an object"),r("function"==typeof e,"callback must be a function"),this.client({path:a.API_DATASET_DATASETS,params:{owner:this.owner},entity:t,callback:e})},u.prototype.readDataset=function(t,e){r("string"==typeof t,"dataset must be a string"),r("function"==typeof e,"callback must be a function"),this.client({path:a.API_DATASET_DATASET,params:{owner:this.owner,dataset:t},callback:e})},u.prototype.updateDataset=function(t,e,n){r("string"==typeof t,"dataset must be a string"),r("function"==typeof n,"callback must be a function"),r("object"==typeof e,"options must be an object"),r(!!e.name||!!e.description,"options must include a name or a description"),this.client({path:a.API_DATASET_DATASET,params:{owner:this.owner,dataset:t},method:"patch",entity:e,callback:n})},u.prototype.deleteDataset=function(t,e){r("string"==typeof t,"dataset must be a string"),r("function"==typeof e,"callback must be a function"),this.client({path:a.API_DATASET_DATASET,params:{owner:this.owner,dataset:t},method:"delete",callback:e})},u.prototype.listFeatures=function(t,e){r("string"==typeof t,"dataset must be a string"),r("function"==typeof e,"callback must be a function"),this.client({path:a.API_DATASET_FEATURES,params:{owner:this.owner,dataset:t},callback:e})},u.prototype.insertFeature=function(t,e,n){r("string"==typeof e,"dataset must be a string"),r("function"==typeof n,"callback must be a function"),r(0===i.hint(t).length,"feature must be valid GeoJSON");var s=t.id||o();r("string"==typeof s,"The GeoJSON feature's id must be a string"),this.client({path:a.API_DATASET_FEATURE,params:{owner:this.owner,dataset:e,id:s},method:"put",entity:t,callback:n})},u.prototype.readFeature=function(t,e,n){r("string"==typeof t,"id must be a string"),r("string"==typeof e,"dataset must be a string"),r("function"==typeof n,"callback must be a function"),this.client({path:a.API_DATASET_FEATURE,params:{owner:this.owner,dataset:e,id:t},callback:n})},u.prototype.deleteFeature=function(t,e,n){r("string"==typeof t,"id must be a string"),r("string"==typeof e,"dataset must be a string"), r("function"==typeof n,"callback must be a function"),this.client({path:a.API_DATASET_FEATURE,params:{owner:this.owner,dataset:e,id:t},method:"delete",callback:n})},u.prototype.bulkFeatureUpdate=function(t,e,n){r("object"==typeof t,"update must be an object"),r("string"==typeof e,"dataset must be a string"),r("function"==typeof n,"callback must be a function");var o=t.put||[],s=t["delete"]||[];r(0===i.hint({type:"FeatureCollection",features:o}).length,"update.put must be an array of valid GeoJSON features"),r(o.every(function(t){return t.id}),"inserted GeoJSON features must include ids"),r(s.every(function(t){return"string"==typeof t}),"update.delete must be an array of strings"),this.client({path:a.API_DATASET_FEATURES,params:{owner:this.owner,dataset:e},method:"post",entity:{put:o,"delete":s},callback:n})}},{"../constants":35,"../make_service":38,assert:2,"geojsonhint/object":48,hat:49}],41:[function(t,e,n){"use strict";var r=t("assert"),i=t("../format_points"),o=t("../make_service"),s=t("../constants"),a=o("MapboxDirections");a.prototype.getDirections=function(t,e,n){void 0===n&&"function"==typeof e&&(n=e,e={}),r(Array.isArray(t),"waypoints must be an array"),r("object"==typeof e,"options must be an object"),r("function"==typeof n,"callback must be a function");var o=i(t),a="mapbox.driving",u=!0,c=!0,f="geojson",l="text";e.profile&&(r("string"==typeof e.profile,"profile option must be string"),a=e.profile),"undefined"!=typeof e.alternatives&&(r("boolean"==typeof e.alternatives,"alternatives option must be boolean"),u=e.alternatives),"undefined"!=typeof e.steps&&(r("boolean"==typeof e.steps,"steps option must be boolean"),c=e.steps),e.geometry&&(r("string"==typeof e.geometry,"geometry option must be string"),f=e.geometry),e.instructions&&(r("string"==typeof e.instructions,"instructions option must be string"),l=e.instructions),this.client({path:s.API_DIRECTIONS,params:{encodedWaypoints:o,profile:a,instructions:l,geometry:f,alternatives:u,steps:c},callback:n})},e.exports=a},{"../constants":35,"../format_points":36,"../make_service":38,assert:2}],42:[function(t,e,n){"use strict";var r=t("assert"),i=t("../make_service"),o=t("../constants"),s=i("MapboxDistance");s.prototype.getDistances=function(t,e,n){void 0===n&&"function"==typeof e&&(n=e,e={}),r(Array.isArray(t),"waypoints must be an array");var i="driving";e.profile&&(r("string"==typeof e.profile,"profile option must be string"),i=e.profile),this.client({path:o.API_DISTANCE,params:{profile:i},entity:{coordinates:t},method:"post",callback:n})},e.exports=s},{"../constants":35,"../make_service":38,assert:2}],43:[function(t,e,n){"use strict";function r(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}var i=t("assert"),o=t("../make_service"),s=t("../constants"),a=o("MapboxGeocoder"),u=5,c=3;a.prototype.geocodeForward=function(t,e,n){void 0===n&&"function"==typeof e&&(n=e,e={}),i("string"==typeof t,"query must be a string"),i("object"==typeof e,"options must be an object"),i("function"==typeof n,"callback must be a function");var o={query:t,dataset:"mapbox.places"},a=c;e.precision&&(i("number"==typeof e.precision,"precision option must be number"),a=e.precision),e.proximity&&(i("number"==typeof e.proximity.latitude&&"number"==typeof e.proximity.longitude,"proximity must be an object with numeric latitude & longitude properties"),o.proximity=r(e.proximity.longitude,a)+","+r(e.proximity.latitude,a)),e.dataset&&(i("string"==typeof e.dataset,"dataset option must be string"),o.dataset=e.dataset),this.client({path:s.API_GEOCODER_FORWARD,params:o,callback:n})},a.prototype.geocodeReverse=function(t,e,n){void 0===n&&"function"==typeof e&&(n=e,e={}),i("object"==typeof t,"location must be an object"),i("object"==typeof e,"options must be an object"),i("function"==typeof n,"callback must be a function"),i("number"==typeof t.latitude&&"number"==typeof t.longitude,"location must be an object with numeric latitude & longitude properties");var o="mapbox.places";e.dataset&&(i("string"==typeof e.dataset,"dataset option must be string"),o=e.dataset);var a=u;e.precision&&(i("number"==typeof e.precision,"precision option must be number"),a=e.precision),this.client({path:s.API_GEOCODER_REVERSE,params:{longitude:r(t.longitude,a),latitude:r(t.latitude,a),dataset:o},callback:n})},e.exports=a},{"../constants":35,"../make_service":38,assert:2}],44:[function(t,e,n){"use strict";var r=t("assert"),i=t("geojsonhint/object"),o=t("../make_service"),s=t("../constants"),a=o("MapboxMatching");a.prototype.matching=function(t,e,n){void 0===n&&"function"==typeof e&&(n=e,e={}),r(0===i.hint(t).length,"trace must be valid GeoJSON"),r("object"==typeof e,"options must be an object"),r("function"==typeof n,"callback must be a function");var o="mapbox.driving",a=4,u="geojson";void 0!==e.gps_precision&&(r("number"==typeof e.gps_precision,"gps_precision must be a number"),a=e.gps_precision),e.profile&&(r("string"==typeof e.profile,"profile option must be string"),o=e.profile),e.geometry&&(r("string"==typeof e.geometry,"geometry option must be string"),u=e.geometry),this.client({path:s.API_MATCHING,params:{profile:o,geometry:u,gps_precision:a},method:"post",entity:t,callback:n})},e.exports=a},{"../constants":35,"../make_service":38,assert:2,"geojsonhint/object":48}],45:[function(t,e,n){"use strict";var r=t("assert"),i=t("../format_points"),o=t("../make_service"),s=t("../constants"),a=o("MapboxSurface");a.prototype.surface=function(t,e,n,o,a,u){void 0===u&&"function"==typeof a&&(u=a,a={}),r("string"==typeof t,"mapid must be a string"),r("string"==typeof e,"layer must be a string"),r(Array.isArray(n),"fields must be an array of strings"),r(Array.isArray(o)||"string"==typeof o,"path must be an array of objects or a string"),r("object"==typeof a,"options must be an object"),r("function"==typeof u,"callback must be a function");var c=!0,f=!1;void 0!==a.interpolate&&(r("boolean"==typeof a.interpolate,"interpolate must be a boolean"),c=a.interpolate),void 0!==a.geojson&&(r("boolean"==typeof a.geojson,"geojson option must be boolean"),f=a.geojson);var l={geojson:f,layer:e,mapid:t,fields:n.join(","),interpolate:c};Array.isArray(o)?l.points=i(o):l.encoded_polyline=o,void 0!==a.zoom&&(r("number"==typeof a.zoom,"zoom must be a number"),l.z=a.zoom),this.client({path:s.API_SURFACE,params:l,callback:u})},e.exports=a},{"../constants":35,"../format_points":36,"../make_service":38,assert:2}],46:[function(t,e,n){"use strict";var r=t("assert"),i=t("../make_service"),o=t("../constants"),s=e.exports=i("MapboxTilestats");s.prototype.createTilestats=function(t,e,n){r("string"==typeof t,"tileset must be a string"),r("function"==typeof n,"callback must be a function"),r(Array.isArray(e),"layers must be an array"),r(e.every(function(t){return"string"==typeof t}),"layers must be an array of strings");var i=t.split(".")[0];i===t&&(i=this.owner),this.client({path:o.API_TILESTATS_STATISTICS,params:{owner:i,tileset:t},entity:{layers:e},method:"post",callback:n})},s.prototype.deleteTilestats=function(t,e){r("string"==typeof t,"tileset must be a string"),r("function"==typeof e,"callback must be a function");var n=t.split(".")[0];n===t&&(n=this.owner),this.client({path:o.API_TILESTATS_STATISTICS,params:{owner:n,tileset:t},method:"delete",callback:e})},s.prototype.getTilestats=function(t,e){r("string"==typeof t,"tileset must be a string"),r("function"==typeof e,"callback must be a function");var n=t.split(".")[0];n===t&&(n=this.owner),this.client({path:o.API_TILESTATS_STATISTICS,params:{owner:n,tileset:t},callback:e})},s.prototype.updateTilestatsLayer=function(t,e,n,i){r("string"==typeof t,"tileset must be a string"),r("function"==typeof i,"callback must be a function"),r("string"==typeof e,"layer must be a string"),r("object"==typeof n,"geometries must be an object");var s=t.split(".")[0];s===t&&(s=this.owner),this.client({path:o.API_TILESTATS_LAYER,params:{owner:s,tileset:t,layer:e},entity:n,method:"post",callback:i})},s.prototype.updateTilestatsAttribute=function(t,e,n,i,s){r("string"==typeof t,"tileset must be a string"),r("function"==typeof s,"callback must be a function"),r("string"==typeof e,"layer must be a string"),r("string"==typeof n,"attribute must be a string"),r("object"==typeof i,"stats must be an object");var a=t.split(".")[0];a===t&&(a=this.owner),this.client({path:o.API_TILESTATS_ATTRIBUTE,params:{owner:a,tileset:t,layer:e,attribute:n},entity:i,method:"post",callback:s})},s.prototype.getTilestatsAttribute=function(t,e,n,i){r("string"==typeof t,"tileset must be a string"),r("function"==typeof i,"callback must be a function"),r("string"==typeof e,"layer must be a string"),r("string"==typeof n,"attribute must be a string");var s=t.split(".")[0];s===t&&(s=this.owner),this.client({path:o.API_TILESTATS_ATTRIBUTE,params:{owner:s,tileset:t,layer:e,attribute:n},callback:i})}},{"../constants":35,"../make_service":38,assert:2}],47:[function(t,e,n){"use strict";var r=t("assert"),i=t("../make_service"),o=t("../constants"),s=e.exports=i("MapboxUploads");s.prototype.listUploads=function(t){r("function"==typeof t,"callback must be a function"),this.client({path:o.API_UPLOADS,params:{owner:this.owner},callback:t})},s.prototype.createUploadCredentials=function(t){r("function"==typeof t,"callback must be a function"),this.client({path:o.API_UPLOAD_CREDENTIALS,params:{owner:this.owner},callback:t})},s.prototype.createUpload=function(t,e){r("object"==typeof t,"options must be an object"),r("function"==typeof e,"callback must be a function"),this.client({path:o.API_UPLOADS,params:{owner:this.owner},entity:t,callback:e})},s.prototype.readUpload=function(t,e){r("string"==typeof t,"upload must be a string"),r("function"==typeof e,"callback must be a function"),this.client({path:o.API_UPLOAD,params:{owner:this.owner,upload:t},callback:e})},s.prototype.deleteUpload=function(t,e){r("string"==typeof t,"upload must be a string"),r("function"==typeof e,"callback must be a function"),this.client({method:"delete",path:o.API_UPLOAD,params:{owner:this.owner,upload:t},callback:e})}},{"../constants":35,"../make_service":38,assert:2}],48:[function(t,e,n){function r(t,e){function n(t){e&&e.noDuplicateMembers===!1||!t.__duplicateProperties__||g.push({message:"An object contained duplicate members, making parsing ambigous: "+t.__duplicateProperties__.join(", "),line:t.__line__}),t.type?b[t.type]?t&&b[t.type](t):g.push({message:"The type "+t.type+" is unknown",line:t.__line__}):g.push({message:"The type property is required and was not found",line:t.__line__})}function r(t,e){return t.every(function(t){return null!==t&&typeof t===e})}function i(t,e,n){if("undefined"==typeof t[e])return g.push({message:'"'+e+'" property required',line:t.__line__});if("array"===n){if(!Array.isArray(t[e]))return g.push({message:'"'+e+'" property should be an array, but is an '+typeof t[e]+" instead",line:t.__line__})}else if(n&&typeof t[e]!==n)return g.push({message:'"'+e+'" property should be '+n+", but is an "+typeof t[e]+" instead",line:t.__line__})}function o(t){if(u(t),c(t),!i(t,"features","array")){if(!r(t.features,"object"))return g.push({message:"Every feature must be an object",line:t.__line__});t.features.forEach(v)}}function s(t,e){return Array.isArray(t)?t.length<2?g.push({message:"position must have 2 or more elements",line:t.__line__||e}):r(t,"number")?void 0:g.push({message:"each element in a position must be a number",line:t.__line__||e}):g.push({message:"position should be an array, is a "+typeof t+" instead",line:t.__line__||e})}function a(t,e,n,r){if(void 0===r&&void 0!==t.__line__&&(r=t.__line__),0===n)return s(t,r);if(1===n&&e)if("LinearRing"===e){if(!Array.isArray(t[t.length-1]))return g.push({message:"a number was found where a coordinate array should have been found: this needs to be nested more deeply",line:r});t.length<4&&g.push({message:"a LinearRing of coordinates needs to have four or more positions",line:r}),!t.length||t[t.length-1].length===t[0].length&&t[t.length-1].every(function(e,n){return t[0][n]===e})||g.push({message:"the first and last positions in a LinearRing of coordinates must be the same",line:r})}else"Line"===e&&t.length<2&&g.push({message:"a line needs to have two or more coordinates to be valid",line:r});t.forEach(function(t){a(t,e,n-1,t.__line__||r)})}function u(t){if(t.crs)if("object"==typeof t.crs){var e=i(t.crs,"type","string"),n=i(t.crs,"properties","object");e||n||("name"===t.crs.type?i(t.crs.properties,"name","string"):"link"===t.crs.type&&i(t.crs.properties,"href","string"))}else g.push({message:"the value of the crs property must be an object, not a "+typeof t.crs,line:t.__line__})}function c(t){if(t.bbox)if(Array.isArray(t.bbox)){if(!r(t.bbox,"number"))return g.push({message:"each element in a bbox property must be a number",line:t.bbox.__line__})}else g.push({message:"bbox property must be an array of numbers, but is a "+typeof t.bbox,line:t.__line__})}function f(t){u(t),c(t),i(t,"coordinates","array")||s(t.coordinates)}function l(t){u(t),c(t),i(t,"coordinates","array")||a(t.coordinates,"LinearRing",2)}function p(t){u(t),c(t),i(t,"coordinates","array")||a(t.coordinates,"LinearRing",3)}function d(t){u(t),c(t),i(t,"coordinates","array")||a(t.coordinates,"Line",1)}function h(t){u(t),c(t),i(t,"coordinates","array")||a(t.coordinates,"Line",2)}function y(t){u(t),c(t),i(t,"coordinates","array")||a(t.coordinates,"",1)}function m(t){u(t),c(t),i(t,"geometries","array")||t.geometries.forEach(function(t){t&&n(t)})}function v(t){u(t),c(t),void 0!==t.id&&"string"!=typeof t.id&&"number"!=typeof t.id&&g.push({message:'Feature "id" property must have a string or number value',line:t.__line__}),"Feature"!==t.type&&g.push({message:"GeoJSON features must have a type=feature property",line:t.__line__}),i(t,"properties","object"),i(t,"geometry","object")||t.geometry&&n(t.geometry)}var g=[],b={Point:f,Feature:v,MultiPoint:y,LineString:d,MultiLineString:h,FeatureCollection:o,GeometryCollection:m,Polygon:l,MultiPolygon:p};return"object"!=typeof t||null===t||void 0===t?(g.push({message:"The root of a GeoJSON object must be an object.",line:0}),g):(n(t),g.forEach(function(t){t.hasOwnProperty("line")&&void 0===t.line&&delete t.line}),g)}e.exports.hint=r},{}],49:[function(t,e,n){var r=e.exports=function(t,e){if(e||(e=16),void 0===t&&(t=128),0>=t)return"0";for(var n=Math.log(Math.pow(2,t))/Math.log(e),i=2;n===1/0;i*=2)n=Math.log(Math.pow(2,t/i))/Math.log(e)*i;for(var o=n-Math.floor(n),s="",i=0;i<Math.floor(n);i++){var a=Math.floor(Math.random()*e).toString(e);s=a+s}if(o){var u=Math.pow(e,o),a=Math.floor(Math.random()*u).toString(e);s=a+s}var c=parseInt(s,e);return c!==1/0&&c>=Math.pow(2,t)?r(t,e):s};r.rack=function(t,e,n){var i=function(i){var s=0;do{if(s++>10){if(!n)throw new Error("too many ID collisions, use more bits");t+=n}var a=r(t,e)}while(Object.hasOwnProperty.call(o,a));return o[a]=i,a},o=i.hats={};return i.get=function(t){return i.hats[t]},i.set=function(t,e){return i.hats[t]=e,i},i.bits=t||128,i.base=e||16,i}},{}],50:[function(t,e,n){!function(t,e){"use strict";var n;t(function(t){function r(t,e){var n,r,i,o;if(n=t,i={},e){for(r in e)o=new RegExp("\\{"+r+"\\}"),o.test(n)?n=n.replace(o,encodeURIComponent(e[r]),"g"):i[r]=e[r];for(r in i)n+=-1===n.indexOf("?")?"?":"&",n+=encodeURIComponent(r),null!==i[r]&&void 0!==i[r]&&(n+="=",n+=encodeURIComponent(i[r]))}return n}function i(t,e){return 0===t.indexOf(e)}function o(t,e){return this instanceof o?void(t instanceof o?(this._template=t.template,this._params=s({},this._params,e)):(this._template=(t||"").toString(),this._params=e||{})):new o(t,e)}var s,a,u,c,f;return s=t("./util/mixin"),u=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?(\/[^?#]*)?(\?[^#]*)?(#\S*)?/i,c=/^([a-z][a-z0-9\-\+\.]*:\/\/|\/)/i,f=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?\//i,o.prototype={append:function(t,e){return new o(this._template+t,s({},this._params,e))},fullyQualify:function(){if(!e)return this;if(this.isFullyQualified())return this;var t=this._template;return i(t,"//")?t=a.protocol+t:i(t,"/")?t=a.origin+t:this.isAbsolute()||(t=a.origin+a.pathname.substring(0,a.pathname.lastIndexOf("/")+1)),-1===t.indexOf("/",8)&&(t+="/"),new o(t,this._params)},isAbsolute:function(){return c.test(this.build())},isFullyQualified:function(){return f.test(this.build())},isCrossOrigin:function(){if(!a)return!0;var t=this.parts();return t.protocol!==a.protocol||t.hostname!==a.hostname||t.port!==a.port},parts:function(){var t,e;return t=this.fullyQualify().build().match(u),e={href:t[0],protocol:t[1],host:t[3]||"",hostname:t[4]||"",port:t[6],pathname:t[7]||"",search:t[8]||"",hash:t[9]||""},e.origin=e.protocol+"//"+e.host,e.port=e.port||("https:"===e.protocol?"443":"http:"===e.protocol?"80":""),e},build:function(t){return r(this._template,s({},this._params,t))},toString:function(){return this.build()}},a=e?new o(e.href).parts():n,o})}("function"==typeof define&&define.amd?define:function(n){e.exports=n(t)},"undefined"!=typeof window?window.location:void 0)},{"./util/mixin":88}],51:[function(t,e,n){!function(t){"use strict";t(function(t){var e=t("./client/default"),n=t("./client/xhr");return e.setPlatformDefaultClient(n),e})}("function"==typeof define&&define.amd?define:function(n){e.exports=n(t)})},{"./client/default":53,"./client/xhr":54}],52:[function(t,e,n){!function(t){"use strict";t(function(){return function(t,e){return e&&(t.skip=function(){return e}),t.wrap=function(e,n){return e(t,n)},t.chain=function(){return"undefined"!=typeof console&&console.log("rest.js: client.chain() is deprecated, use client.wrap() instead"),t.wrap.apply(this,arguments)},t}})}("function"==typeof define&&define.amd?define:function(n){e.exports=n(t)})},{}],53:[function(t,e,n){!function(t){"use strict";var e;t(function(t){function n(){return i.apply(e,arguments)}var r,i,o;return r=t("../client"),n.setDefaultClient=function(t){i=t},n.getDefaultClient=function(){return i},n.resetDefaultClient=function(){i=o},n.setPlatformDefaultClient=function(t){if(o)thr