New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mapbox

Package Overview
Dependencies
Maintainers
49
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapbox - npm Package Compare versions

Comparing version 1.0.0-beta5 to 1.0.0-beta6

lib/promise.js

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 1.0.0-beta6
- **Bug** Add `autocomplete` param to geocoding endpoint. [#126](https://github.com/mapbox/mapbox-sdk-js/pull/126)
- **Bug** Install Promise polyfill only when needed. [#122](https://github.com/mapbox/mapbox-sdk-js/pull/122)
- **Update** Update Map Matching to `v5`. [#128](https://github.com/mapbox/mapbox-sdk-js/pull/128)
- **Update** Update Directions to `v5`. [#68](https://github.com/mapbox/mapbox-sdk-js/pull/68)
## 1.0.0-beta5

@@ -2,0 +8,0 @@

4

dist/mapbox-sdk.min.js

@@ -1,2 +0,2 @@

!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.MapboxClient=t()}}(function(){var t;return function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var p=n[s]={exports:{}};t[s][0].call(p.exports,function(e){var n=t[s][1][e];return o(n?n:e)},p,p.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e){"use strict";"undefined"==typeof Promise&&t("../vendor/promise");var n=t("rest/interceptor"),r=n({success:function(t){var e=t&&t.callback;return"function"==typeof e&&e(null,t.entity,t),t},error:function(t){var e=t&&t.callback;if("function"==typeof e){var n=t.error||t.entity;"object"!=typeof n&&(n=new Error(n)),e(n)}return t}});e.exports=r},{"../vendor/promise":49,"rest/interceptor":24}],2:[function(t,e){"use strict";"undefined"==typeof Promise&&t("../vendor/promise");var n=t("rest"),r=t("./standard_response"),o=t("./callbackify");e.exports=function(e){return n.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/params")).wrap(t("rest/interceptor/defaultRequest"),{params:{access_token:e.accessToken}}).wrap(t("rest/interceptor/template")).wrap(r).wrap(o)}},{"../vendor/promise":49,"./callbackify":1,"./standard_response":17,rest:20,"rest/interceptor/defaultRequest":25,"rest/interceptor/errorCode":26,"rest/interceptor/mime":27,"rest/interceptor/params":28,"rest/interceptor/pathPrefix":29,"rest/interceptor/template":30}],3:[function(t,e){e.exports.DEFAULT_ENDPOINT="https://api.mapbox.com",e.exports.API_GEOCODING_FORWARD="/geocoding/v5/{dataset}/{query}.json{?proximity,country,types,bbox,limit}",e.exports.API_GEOCODING_REVERSE="/geocoding/v5/{dataset}/{longitude},{latitude}.json{?types,limit}",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}{?limit,start,fresh}",e.exports.API_DATASET_DATASET="/datasets/v1/{owner}/{dataset}",e.exports.API_DATASET_FEATURES="/datasets/v1/{owner}/{dataset}/features{?reverse,limit,start}",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}{?access_token}",e.exports.API_STYLES_LIST="/styles/v1/{owner}",e.exports.API_STYLES_CREATE="/styles/v1/{owner}",e.exports.API_STYLES_READ="/styles/v1/{owner}/{styleid}",e.exports.API_STYLES_UPDATE="/styles/v1/{owner}/{styleid}",e.exports.API_STYLES_DELETE="/styles/v1/{owner}/{styleid}",e.exports.API_STYLES_EMBED="/styles/v1/{owner}/{styleid}.html{?zoomwheel,title,access_token}",e.exports.API_STYLES_SPRITE="/styles/v1/{owner}/{styleid}/sprite{+retina}{.format}",e.exports.API_STYLES_SPRITE_ADD_ICON="/styles/v1/{owner}/{styleid}/sprite/{iconName}",e.exports.API_STYLES_SPRITE_DELETE_ICON="/styles/v1/{owner}/{styleid}/sprite/{iconName}",e.exports.API_STYLES_FONT_GLYPH_RANGES="/fonts/v1/{owner}/{font}/{start}-{end}.pbf"},{}],4:[function(t,e){"use strict";function n(t){return t.map(function(t){return r(t),t.longitude+","+t.latitude}).join(";")}var r=t("./invariant_location");e.exports=n},{"./invariant_location":6}],5:[function(t,e){"use strict";function n(t){var e=t.split(".")[1];if(!e)return null;e=e.replace(/-/g,"+").replace(/_/g,"/");var n=e.length%4;if(2===n&&(e+="=="),3===n&&(e+="="),1===n||n>3)return null;try{return JSON.parse(r.decode(e)).u}catch(o){return null}}var r=t("rest/util/base64");e.exports=n},{"rest/util/base64":39}],6:[function(t,e){"use strict";function n(t){r("number"==typeof t.latitude&&"number"==typeof t.longitude,"location must be an object with numeric latitude & longitude properties"),void 0!==t.zoom&&r("number"==typeof t.zoom,"zoom must be numeric")}var r=t("../vendor/invariant");e.exports=n},{"../vendor/invariant":48}],7:[function(t,e){"use strict";function n(t){function e(e,n){this.name=t,r("string"==typeof e,"accessToken required to instantiate Mapbox client");var a=o.DEFAULT_ENDPOINT;void 0!==n&&(r("object"==typeof n,"options must be an object"),n.endpoint&&(r("string"==typeof n.endpoint,"endpoint must be a string"),a=n.endpoint),n.account&&(r("string"==typeof n.account,"account must be a string"),this.owner=n.account)),this.client=i({endpoint:a,accessToken:e}),this.accessToken=e,this.endpoint=a,this.owner=this.owner||s(e),r(!!this.owner,"could not determine account from provided accessToken")}return e}var r=t("../vendor/invariant"),o=t("./constants"),i=t("./client"),s=t("./get_user");e.exports=n},{"../vendor/invariant":48,"./client":2,"./constants":3,"./get_user":5}],8:[function(t,e){"use strict";var n=t("./make_service"),r=t("../vendor/xtend").extendMutable,o=t("./get_user"),i=t("./services/geocoding"),s=t("./services/surface"),a=t("./services/directions"),u=t("./services/uploads"),c=t("./services/matching"),p=t("./services/datasets"),f=t("./services/distance"),l=t("./services/tilestats"),d=n("MapboxClient");r(d.prototype,i.prototype,s.prototype,a.prototype,f.prototype,c.prototype,p.prototype,u.prototype,l.prototype),d.getUser=o,e.exports=d},{"../vendor/xtend":50,"./get_user":5,"./make_service":7,"./services/datasets":9,"./services/directions":10,"./services/distance":11,"./services/geocoding":12,"./services/matching":13,"./services/surface":14,"./services/tilestats":15,"./services/uploads":16}],9:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../../vendor/hat"),o=t("../make_service"),i=t("../constants"),s=e.exports=o("MapboxDatasets");s.prototype.listDatasets=function(t,e){return"function"==typeof t&&(e=t,t={}),this.client({path:i.API_DATASET_DATASETS,params:{limit:t.limit,start:t.start,fresh:t.fresh,owner:this.owner},callback:e})},s.prototype.createDataset=function(t,e){return void 0===e&&"function"==typeof t&&(e=t,t={}),n("object"==typeof t,"options must be an object"),this.client({path:i.API_DATASET_DATASETS,params:{owner:this.owner},entity:t,callback:e})},s.prototype.readDataset=function(t,e){return n("string"==typeof t,"dataset must be a string"),this.client({path:i.API_DATASET_DATASET,params:{owner:this.owner,dataset:t},callback:e})},s.prototype.updateDataset=function(t,e,r){return n("string"==typeof t,"dataset must be a string"),n("object"==typeof e,"options must be an object"),n(!!e.name||!!e.description,"options must include a name or a description"),this.client({path:i.API_DATASET_DATASET,params:{owner:this.owner,dataset:t},method:"patch",entity:e,callback:r})},s.prototype.deleteDataset=function(t,e){return n("string"==typeof t,"dataset must be a string"),this.client({path:i.API_DATASET_DATASET,params:{owner:this.owner,dataset:t},method:"delete",callback:e})},s.prototype.listFeatures=function(t,e,r){void 0===r&&"function"==typeof e&&(r=e,e={}),n("string"==typeof t,"dataset must be a string"),n("object"==typeof e,"options must be a object");var o={owner:this.owner,dataset:t};return e.reverse&&(n("boolean"==typeof e.reverse,"reverse option must be a boolean"),o.reverse=e.reverse),e.limit&&(n("number"==typeof e.limit,"limit option must be a number"),o.limit=e.limit),e.start&&(n("string"==typeof e.start,"start option must be a string"),o.start=e.start),this.client({path:i.API_DATASET_FEATURES,params:o,callback:r})},s.prototype.insertFeature=function(t,e,o){n("string"==typeof e,"dataset must be a string");var s=t.id||r();return n("string"==typeof s,"The GeoJSON feature's id must be a string"),this.client({path:i.API_DATASET_FEATURE,params:{owner:this.owner,dataset:e,id:s},method:"put",entity:t,callback:o})},s.prototype.readFeature=function(t,e,r){return n("string"==typeof t,"id must be a string"),n("string"==typeof e,"dataset must be a string"),this.client({path:i.API_DATASET_FEATURE,params:{owner:this.owner,dataset:e,id:t},callback:r})},s.prototype.deleteFeature=function(t,e,r){return n("string"==typeof t,"id must be a string"),n("string"==typeof e,"dataset must be a string"),this.client({path:i.API_DATASET_FEATURE,params:{owner:this.owner,dataset:e,id:t},method:"delete",callback:r})}},{"../../vendor/hat":47,"../../vendor/invariant":48,"../constants":3,"../make_service":7}],10:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../format_points"),o=t("../make_service"),i=t("../constants"),s=o("MapboxDirections");s.prototype.getDirections=function(t,e,o){void 0===o&&"function"==typeof e?(o=e,e={}):void 0===e&&(e={}),n(Array.isArray(t),"waypoints must be an array"),n("object"==typeof e,"options must be an object");var s=r(t),a="mapbox.driving",u=!0,c=!0,p="geojson",f="text";return e.profile&&(n("string"==typeof e.profile,"profile option must be string"),a=e.profile),"undefined"!=typeof e.alternatives&&(n("boolean"==typeof e.alternatives,"alternatives option must be boolean"),u=e.alternatives),"undefined"!=typeof e.steps&&(n("boolean"==typeof e.steps,"steps option must be boolean"),c=e.steps),e.geometry&&(n("string"==typeof e.geometry,"geometry option must be string"),p=e.geometry),e.instructions&&(n("string"==typeof e.instructions,"instructions option must be string"),f=e.instructions),this.client({path:i.API_DIRECTIONS,params:{encodedWaypoints:s,profile:a,instructions:f,geometry:p,alternatives:u,steps:c},callback:o})},e.exports=s},{"../../vendor/invariant":48,"../constants":3,"../format_points":4,"../make_service":7}],11:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../make_service"),o=t("../constants"),i=r("MapboxDistance");i.prototype.getDistances=function(t,e,r){void 0===r&&"function"==typeof e&&(r=e,e={}),n(Array.isArray(t),"waypoints must be an array");var i="driving";return e.profile&&(n("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:r})},e.exports=i},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],12:[function(t,e){"use strict";function n(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}var r=t("../../vendor/invariant"),o=t("../make_service"),i=t("../constants"),s=o("MapboxGeocoding"),a=5,u=3;s.prototype.geocodeForward=function(t,e,o){if(void 0===o&&"function"==typeof e&&(o=e,e={}),Array.isArray(t)){if("mapbox.places-permanent"!==e.dataset)throw new Error("Batch geocoding is only available with the mapbox.places-permanent endpoint. See https://mapbox.com/api-documentation/#batch-requests for details");t=t.join(";")}r("string"==typeof t,"query must be a string"),r("object"==typeof e,"options must be an object");var s={query:t,dataset:"mapbox.places"},a=u;return e.precision&&(r("number"==typeof e.precision,"precision option must be number"),a=e.precision),e.proximity&&(r("number"==typeof e.proximity.latitude&&"number"==typeof e.proximity.longitude,"proximity must be an object with numeric latitude & longitude properties"),s.proximity=n(e.proximity.longitude,a)+","+n(e.proximity.latitude,a)),e.bbox&&(r("number"==typeof e.bbox[0]&&"number"==typeof e.bbox[1]&&"number"==typeof e.bbox[2]&&"number"==typeof e.bbox[3]&&4===e.bbox.length,"bbox must be an array with numeric values in the form [minX, minY, maxX, maxY]"),s.bbox=e.bbox[0]+","+e.bbox[1]+","+e.bbox[2]+","+e.bbox[3]),e.limit&&(r("number"==typeof e.limit,"limit must be a number"),s.limit=e.limit),e.dataset&&(r("string"==typeof e.dataset,"dataset option must be string"),s.dataset=e.dataset),e.country&&(r("string"==typeof e.country,"country option must be string"),s.country=e.country),e.types&&(r("string"==typeof e.types,"types option must be string"),s.types=e.types),"boolean"==typeof e.autocomplete&&(r("boolean"==typeof e.autocomplete,"autocomplete must be a boolean"),s.autocomplete=e.autocomplete),this.client({path:i.API_GEOCODING_FORWARD,params:s,callback:o})},s.prototype.geocodeReverse=function(t,e,o){void 0===o&&"function"==typeof e&&(o=e,e={}),r("object"==typeof t,"location must be an object"),r("object"==typeof e,"options must be an object"),r("number"==typeof t.latitude&&"number"==typeof t.longitude,"location must be an object with numeric latitude & longitude properties");var s={dataset:"mapbox.places"};e.dataset&&(r("string"==typeof e.dataset,"dataset option must be string"),s.dataset=e.dataset);var u=a;return e.precision&&(r("number"==typeof e.precision,"precision option must be number"),u=e.precision),e.types&&(r("string"==typeof e.types,"types option must be string"),s.types=e.types),e.limit&&(r("number"==typeof e.limit,"limit option must be a number"),r(1===e.types.split(",").length,"a single type must be specified to use the limit option"),s.limit=e.limit),s.longitude=n(t.longitude,u),s.latitude=n(t.latitude,u),this.client({path:i.API_GEOCODING_REVERSE,params:s,callback:o})},e.exports=s},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],13:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../make_service"),o=t("../constants"),i=r("MapboxMatching");i.prototype.matching=function(t,e,r){void 0===r&&"function"==typeof e&&(r=e,e={}),n("object"==typeof t,"trace must be an object"),n("object"==typeof e,"options must be an object");var i="mapbox.driving",s=4,a="geojson";return void 0!==e.gps_precision&&(n("number"==typeof e.gps_precision,"gps_precision must be a number"),s=e.gps_precision),e.profile&&(n("string"==typeof e.profile,"profile option must be string"),i=e.profile),e.geometry&&(n("string"==typeof e.geometry,"geometry option must be string"),a=e.geometry),this.client({path:o.API_MATCHING,params:{profile:i,geometry:a,gps_precision:s},method:"post",entity:t,callback:r})},e.exports=i},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],14:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../format_points"),o=t("../make_service"),i=t("../constants"),s=o("MapboxSurface");s.prototype.surface=function(t,e,o,s,a,u){void 0===u&&"function"==typeof a&&(u=a,a={}),n("string"==typeof t,"mapid must be a string"),n("string"==typeof e,"layer must be a string"),n(Array.isArray(o),"fields must be an array of strings"),n(Array.isArray(s)||"string"==typeof s,"path must be an array of objects or a string"),n("object"==typeof a,"options must be an object");var c=!0,p=!1;void 0!==a.interpolate&&(n("boolean"==typeof a.interpolate,"interpolate must be a boolean"),c=a.interpolate),void 0!==a.geojson&&(n("boolean"==typeof a.geojson,"geojson option must be boolean"),p=a.geojson);var f={geojson:p,layer:e,mapid:t,fields:o.join(","),interpolate:c};return Array.isArray(s)?f.points=r(s):f.encoded_polyline=s,void 0!==a.zoom&&(n("number"==typeof a.zoom,"zoom must be a number"),f.z=a.zoom),this.client({path:i.API_SURFACE,params:f,callback:u})},e.exports=s},{"../../vendor/invariant":48,"../constants":3,"../format_points":4,"../make_service":7}],15:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../make_service"),o=t("../constants"),i=e.exports=r("MapboxTilestats");i.prototype.getTilestats=function(t,e){n("string"==typeof t,"tileset must be a string");var r=t.split(".")[0];return r===t&&(r=this.owner),this.client({path:o.API_TILESTATS_STATISTICS,params:{owner:r,tileset:t},callback:e})},i.prototype.putTilestats=function(t,e,r){n("string"==typeof t,"tileset must be a string");var i=t.split(".")[0];return i===t&&(i=this.owner),this.client({path:o.API_TILESTATS_STATISTICS,params:{owner:i,tileset:t},entity:e,method:"put",callback:r})}},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],16:[function(t,e){"use strict";var n=t("../../vendor/invariant"),r=t("../make_service"),o=t("../constants"),i=e.exports=r("MapboxUploads");i.prototype.listUploads=function(t){return this.client({path:o.API_UPLOADS,params:{owner:this.owner},callback:t})},i.prototype.createUploadCredentials=function(t){return this.client({path:o.API_UPLOAD_CREDENTIALS,params:{owner:this.owner},callback:t})},i.prototype.createUpload=function(t,e){return n("object"==typeof t,"options must be an object"),this.client({path:o.API_UPLOADS,params:{owner:this.owner},entity:t,callback:e})},i.prototype.readUpload=function(t,e){return n("string"==typeof t,"upload must be a string"),this.client({path:o.API_UPLOAD,params:{owner:this.owner,upload:t},callback:e})},i.prototype.deleteUpload=function(t,e){return n("string"==typeof t,"upload must be a string"),this.client({method:"delete",path:o.API_UPLOAD,params:{owner:this.owner,upload:t},callback:e})}},{"../../vendor/invariant":48,"../constants":3,"../make_service":7}],17:[function(t,e){function n(t){return{url:t.url,status:t.status?t.status.code:void 0,headers:t.headers,entity:t.entity,error:t.error,callback:t.request.callback}}var r=t("rest/interceptor"),o=r({response:n});e.exports=o},{"rest/interceptor":24}],18:[function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(p===setTimeout)return setTimeout(t,0);if((p===n||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function i(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function s(){m&&d&&(m=!1,d.length?h=d.concat(h):y=-1,h.length&&a())}function a(){if(!m){var t=o(s);m=!0;for(var e=h.length;e;){for(d=h,h=[];++y<e;)d&&d[y].run();y=-1,e=h.length}d=null,m=!1,i(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var p,f,l=e.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:n}catch(t){p=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(t){f=r}}();var d,h=[],m=!1,y=-1;l.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];h.push(new u(t,e)),1!==h.length||m||o(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=c,l.addListener=c,l.once=c,l.off=c,l.removeListener=c,l.removeAllListeners=c,l.emit=c,l.binding=function(){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],19:[function(t,e){"use strict";function n(t,e){var n,r,o,i,a;if(n=t,o={},e){for(r in e)a=new RegExp("\\{"+r+"\\}"),a.test(n)?n=n.replace(a,encodeURIComponent(e[r]),"g"):o[r]=e[r];i=s.write(o),i&&(n+=-1===n.indexOf("?")?"?":"&",n+=i)}return n}function r(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=i({},this._params,e)):(this._template=(t||"").toString(),this._params=e||{})):new o(t,e)}var i,s,a,u,c,p;i=t("./util/mixin"),s=t("./mime/type/application/x-www-form-urlencoded"),u=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?(\/[^?#]*)?(\?[^#]*)?(#\S*)?/i,c=/^([a-z][a-z0-9\-\+\.]*:\/\/|\/)/i,p=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?\//i,o.prototype={append:function(t,e){return new o(this._template+t,i({},this._params,e))},fullyQualify:function(){if("undefined"==typeof location)return this;if(this.isFullyQualified())return this;var t=this._template;return r(t,"//")?t=a.protocol+t:r(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 p.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 n(this._template,i({},this._params,t))},toString:function(){return this.build()}},a="undefined"!=typeof location?new o(location.href).parts():void 0,e.exports=o},{"./mime/type/application/x-www-form-urlencoded":35,"./util/mixin":42}],20:[function(t,e){"use strict";var n=t("./client/default"),r=t("./client/xhr");n.setPlatformDefaultClient(r),e.exports=n},{"./client/default":22,"./client/xhr":23}],21:[function(t,e){"use strict";e.exports=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}},{}],22:[function(t,e){"use strict";function n(){return o.apply(void 0,arguments)}var r,o,i;r=t("../client"),"function"!=typeof Promise&&console&&console.log&&console.log("An ES6 Promise implementation is required to use rest.js. See https://github.com/cujojs/when/blob/master/docs/es6-promise-shim.md for using when.js as a Promise polyfill."),n.setDefaultClient=function(t){o=t},n.getDefaultClient=function(){return o},n.resetDefaultClient=function(){o=i},n.setPlatformDefaultClient=function(t){if(i)throw new Error("Unable to redefine platformDefaultClient");o=i=t},e.exports=r(n)},{"../client":21}],23:[function(t,e){"use strict";function n(t){var e={};return t?(t.trim().split(a).forEach(function(t){var n,r,i;n=t.indexOf(":"),r=o(t.substring(0,n).trim()),i=t.substring(n+1).trim(),e[r]?Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]:e[r]=i}),e):e}function r(t,e){return Object.keys(e||{}).forEach(function(n){if(e.hasOwnProperty(n)&&n in t)try{t[n]=e[n]}catch(r){}}),t}var o,i,s,a;o=t("../util/normalizeHeaderName"),i=t("../util/responsePromise"),s=t("../client"),a=/[\r|\n]+/,e.exports=s(function(t){return i.promise(function(e,o){var i,s,a,u,c,p,f,l;if(t="string"==typeof t?{path:t}:t||{},f={request:t},t.canceled)return f.error="precanceled",void o(f);if(l=t.engine||XMLHttpRequest,!l)return void o({request:t,error:"xhr-not-available"});c=t.entity,t.method=t.method||(c?"POST":"GET"),s=t.method,a=f.url=t.path||"";try{i=f.raw=new l,r(i,t.mixin),i.open(s,a,!0),r(i,t.mixin),u=t.headers;for(p in u)("Content-Type"!==p||"multipart/form-data"!==u[p])&&i.setRequestHeader(p,u[p]);t.canceled=!1,t.cancel=function(){t.canceled=!0,i.abort(),o(f)},i.onreadystatechange=function(){t.canceled||i.readyState===(l.DONE||4)&&(f.status={code:i.status,text:i.statusText},f.headers=n(i.getAllResponseHeaders()),f.entity=i.responseText,1223===f.status.code&&(f.status.code=204),f.status.code>0?e(f):setTimeout(function(){e(f)},0))};try{i.onerror=function(){f.error="loaderror",o(f)}}catch(d){}i.send(c)}catch(d){f.error="loaderror",o(f)}})})},{"../client":21,"../util/normalizeHeaderName":43,"../util/responsePromise":44}],24:[function(t,e){"use strict";function n(t){return t}function r(t){return t}function o(t){return t}function i(t){return this instanceof i?void u(this,t):new i(t)}function s(t){var e,s,u,f;return t=t||{},e=t.init||n,s=t.request||r,u=t.success||t.response||o,f=t.error||function(){return Promise.resolve((t.response||o).apply(this,arguments)).then(Promise.reject.bind(Promise))},function(n,r){function o(t){var e,a;return e={},a={arguments:Array.prototype.slice.call(arguments),client:o},t="string"==typeof t?{path:t}:t||{},t.originator=t.originator||o,c(s.call(e,t,r,a),function(t){var o,s,c;return c=n,t instanceof i&&(s=t.abort,c=t.client||c,o=t.response,t=t.request),o=o||Promise.resolve(t).then(function(t){return Promise.resolve(c(t)).then(function(t){return u.call(e,t,r,a)},function(t){return f.call(e,t,r,a)})}),s?Promise.race([o,s]):o},function(e){return Promise.reject({request:t,error:e})})}return"object"==typeof n&&(r=n),"function"!=typeof n&&(n=t.client||a),r=e(r||{}),p(o,n)}}var a,u,c,p;a=t("./client/default"),u=t("./util/mixin"),c=t("./util/responsePromise"),p=t("./client"),s.ComplexRequest=i,e.exports=s},{"./client":21,"./client/default":22,"./util/mixin":42,"./util/responsePromise":44}],25:[function(t,e){"use strict";var n,r,o;n=t("../interceptor"),r=t("../util/mixin"),o=function(){function t(t,e,n){(t in e||t in n)&&(e[t]=r({},n[t],e[t]))}function e(t,e,n){t in n&&!(t in e)&&(e[t]=n[t])}var n={method:e,path:e,params:t,headers:t,entity:e,mixin:t};return function(t,e){for(var r in n)n[r](r,t,e);return t}}(),e.exports=n({request:function(t,e){return o(t,e)}})},{"../interceptor":24,"../util/mixin":42}],26:[function(t,e){"use strict";var n;n=t("../interceptor"),e.exports=n({init:function(t){return t.code=t.code||400,t},response:function(t,e){return t.status&&t.status.code>=e.code?Promise.reject(t):t}})},{"../interceptor":24}],27:[function(t,e){"use strict";var n,r,o,i,s,a;n=t("../interceptor"),r=t("../mime"),o=t("../mime/registry"),a=t("../util/attempt"),i={read:function(t){return t},write:function(t){return t}},s={read:function(){throw"No read method found on converter"},write:function(){throw"No write method found on converter"}},e.exports=n({init:function(t){return t.registry=t.registry||o,t},request:function(t,e){var n,o;return o=t.headers||(t.headers={}),n=r.parse(o["Content-Type"]||e.mime||"text/plain"),o.Accept=o.Accept||e.accept||n.raw+", application/json;q=0.8, text/plain;q=0.5, */*;q=0.2","entity"in t?(o["Content-Type"]=n.raw,e.registry.lookup(n)["catch"](function(){if(e.permissive)return i;throw"mime-unknown"}).then(function(r){var o=e.client||t.originator,i=r.write||s.write;return a(i.bind(void 0,t.entity,{client:o,request:t,mime:n,registry:e.registry}))["catch"](function(){throw"mime-serialization"}).then(function(e){return t.entity=e,t})})):t},response:function(t,e){if(!(t.headers&&t.headers["Content-Type"]&&t.entity))return t;var n=r.parse(t.headers["Content-Type"]);return e.registry.lookup(n)["catch"](function(){return i}).then(function(r){var o=e.client||t.request&&t.request.originator,i=r.read||s.read;return a(i.bind(void 0,t.entity,{client:o,response:t,mime:n,registry:e.registry}))["catch"](function(e){throw t.error="mime-deserialization",t.cause=e,t}).then(function(e){return t.entity=e,t})})}})},{"../interceptor":24,"../mime":31,"../mime/registry":32,"../util/attempt":38}],28:[function(t,e){"use strict";var n,r;n=t("../interceptor"),r=t("../UrlBuilder"),e.exports=n({init:function(t){return t.params=t.params||{},t},request:function(t,e){var n,o;return n=t.path||"",o=t.params||{},t.path=new r(n,e.params).append("",o).build(),delete t.params,t}})},{"../UrlBuilder":19,"../interceptor":24}],29:[function(t,e){"use strict";function n(t,e){return 0===t.indexOf(e)}function r(t,e){return t.lastIndexOf(e)+e.length===t.length}var o,i;o=t("../interceptor"),i=t("../UrlBuilder"),e.exports=o({request:function(t,e){var o;return e.prefix&&!new i(t.path).isFullyQualified()&&(o=e.prefix,t.path&&(r(o,"/")||n(t.path,"/")||(o+="/"),o+=t.path),t.path=o),t}})},{"../UrlBuilder":19,"../interceptor":24}],30:[function(t,e){"use strict";var n,r,o;n=t("../interceptor"),r=t("../util/uriTemplate"),o=t("../util/mixin"),e.exports=n({init:function(t){return t.params=t.params||{},t.template=t.template||"",t},request:function(t,e){var n,i;return n=t.path||e.template,i=o({},t.params,e.params),t.path=r.expand(n,i),delete t.params,t}})},{"../interceptor":24,"../util/mixin":42,"../util/uriTemplate":46}],31:[function(t,e){"use strict";function n(t){var e,n;return e=t.split(";"),n=e[0].trim().split("+"),{raw:t,type:n[0],suffix:n[1]?"+"+n[1]:"",params:e.slice(1).reduce(function(t,e){return e=e.split("="),t[e[0].trim()]=e[1]?e[1].trim():void 0,t},{})}}e.exports={parse:n}},{}],32:[function(t,e){"use strict";function n(t){this.lookup=function(e){var n;return n="string"==typeof e?r.parse(e):e,t[n.raw]?t[n.raw]:t[n.type+n.suffix]?t[n.type+n.suffix]:t[n.type]?t[n.type]:t[n.suffix]?t[n.suffix]:Promise.reject(new Error('Unable to locate converter for mime "'+n.raw+'"'))},this.delegate=function(t){return{read:function(){var e=arguments;return this.lookup(t).then(function(t){return t.read.apply(this,e)}.bind(this))}.bind(this),write:function(){var e=arguments;return this.lookup(t).then(function(t){return t.write.apply(this,e)}.bind(this))}.bind(this)}},this.register=function(e,n){return t[e]=Promise.resolve(n),t[e]},this.child=function(){return new n(Object.create(t))}}var r,o;r=t("../mime"),o=new n({}),o.register("application/hal",t("./type/application/hal")),o.register("application/json",t("./type/application/json")),o.register("application/x-www-form-urlencoded",t("./type/application/x-www-form-urlencoded")),o.register("multipart/form-data",t("./type/multipart/form-data")),o.register("text/plain",t("./type/text/plain")),o.register("+json",o.delegate("application/json")),e.exports=o},{"../mime":31,"./type/application/hal":33,"./type/application/json":34,"./type/application/x-www-form-urlencoded":35,"./type/multipart/form-data":36,"./type/text/plain":37}],33:[function(t,e){"use strict";function n(t,e,n){Object.defineProperty(t,e,{value:n,configurable:!0,enumerable:!1,writeable:!0})}var r,o,i,s,a;r=t("../../../interceptor/pathPrefix"),o=t("../../../interceptor/template"),i=t("../../../util/find"),s=t("../../../util/lazyPromise"),a=t("../../../util/responsePromise"),e.exports={read:function(t,e){function u(t,e){(e&&p&&p.warn||p.log)&&(p.warn||p.log).call(p,"Relationship '"+t+"' is deprecated, see "+e)}var c,p;return e=e||{},c=e.client,p=e.console||p,e.registry.lookup(e.mime.suffix).then(function(n){return n.read(t,e)}).then(function(t){return i.findProperties(t,"_embedded",function(t,e,r){Object.keys(t).forEach(function(r){if(!(r in e)){var o=a({entity:t[r]});n(e,r,o)}}),n(e,r,t)}),i.findProperties(t,"_links",function(t,e,i){Object.keys(t).forEach(function(r){var i=t[r];r in e||n(e,r,a.make(s(function(){return i.deprecation&&u(r,i.deprecation),i.templated===!0?o(c)({path:i.href}):c({path:i.href})})))}),n(e,i,t),n(e,"clientFor",function(e,n){var i=t[e];if(!i)throw new Error("Unknown relationship: "+e);return i.deprecation&&u(e,i.deprecation),i.templated===!0?o(n||c,{template:i.href}):r(n||c,{prefix:i.href})}),n(e,"requestFor",function(t,e,n){var r=this.clientFor(t,n);return r(e)})}),t})},write:function(t,e){return e.registry.lookup(e.mime.suffix).then(function(n){return n.write(t,e)})}}},{"../../../interceptor/pathPrefix":29,"../../../interceptor/template":30,"../../../util/find":40,"../../../util/lazyPromise":41,"../../../util/responsePromise":44}],34:[function(t,e){"use strict";function n(t,e){return{read:function(e){return JSON.parse(e,t)},write:function(t){return JSON.stringify(t,e)},extend:n}}e.exports=n()},{}],35:[function(t,e){"use strict";function n(t){return t=encodeURIComponent(t),t.replace(i,"+")}function r(t){return t=t.replace(s," "),decodeURIComponent(t)}function o(t,e,r){return Array.isArray(r)?r.forEach(function(n){t=o(t,e,n)}):(t.length>0&&(t+="&"),t+=n(e),void 0!==r&&null!==r&&(t+="="+n(r))),t}var i,s;i=/%20/g,s=/\+/g,e.exports={read:function(t){var e={};return t.split("&").forEach(function(t){var n,o,i;n=t.split("="),o=r(n[0]),i=2===n.length?r(n[1]):null,
o in e?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(i)):e[o]=i}),e},write:function(t){var e="";return Object.keys(t).forEach(function(n){e=o(e,n,t[n])}),e}}},{}],36:[function(t,e){"use strict";function n(t){return t&&1===t.nodeType&&"FORM"===t.tagName}function r(t){var e,n=new FormData;for(var r in t)t.hasOwnProperty(r)&&(e=t[r],e instanceof File?n.append(r,e,e.name):e instanceof Blob?n.append(r,e):n.append(r,String(e)));return n}e.exports={write:function(t){if("undefined"==typeof FormData)throw new Error("The multipart/form-data mime serializer requires FormData support");if(t instanceof FormData)return t;if(n(t))return new FormData(t);if("object"==typeof t&&null!==t)return r(t);throw new Error("Unable to create FormData from object "+t)}}},{}],37:[function(t,e){"use strict";e.exports={read:function(t){return t},write:function(t){return t.toString()}}},{}],38:[function(t,e){"use strict";function n(t){try{return Promise.resolve(t())}catch(e){return Promise.reject(e)}}e.exports=n},{}],39:[function(t,e){"use strict";function n(t){if(/([^\u0000-\u00ff])/.test(t))throw new Error("Can't base64 encode non-ASCII characters.");for(var e,n,r,i=0,s=[];i<t.length;){switch(e=t.charCodeAt(i),r=i%3){case 0:s.push(o.charAt(e>>2));break;case 1:s.push(o.charAt((3&n)<<4|e>>4));break;case 2:s.push(o.charAt((15&n)<<2|e>>6)),s.push(o.charAt(63&e))}n=e,i+=1}return 0===r?(s.push(o.charAt((3&n)<<4)),s.push("==")):1===r&&(s.push(o.charAt((15&n)<<2)),s.push("=")),s.join("")}function r(t){if(t=t.replace(/\s/g,""),!/^[a-z0-9\+\/\s]+\={0,2}$/i.test(t)||t.length%4>0)throw new Error("Not a base64-encoded string.");var e,n,r,i=0,s=[];for(t=t.replace(/\=/g,"");i<t.length;){switch(e=o.indexOf(t.charAt(i)),r=i%4){case 1:s.push(String.fromCharCode(n<<2|e>>4));break;case 2:s.push(String.fromCharCode((15&n)<<4|e>>2));break;case 3:s.push(String.fromCharCode((3&n)<<6|e))}n=e,i+=1}return s.join("")}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports={encode:n,decode:r}},{}],40:[function(t,e){"use strict";e.exports={findProperties:function n(t,e,r){"object"==typeof t&&null!==t&&(e in t&&r(t[e],t,e),Object.keys(t).forEach(function(o){n(t[o],e,r)}))}}},{}],41:[function(t,e){"use strict";function n(t){var e,n,o,i;return e=!1,o=new Promise(function(t,e){n={resolve:t,reject:e}}),i=o.then,o.then=function(){return e||(e=!0,r(t).then(n.resolve,n.reject)),i.apply(o,arguments)},o}var r=t("./attempt");e.exports=n},{"./attempt":38}],42:[function(t,e){"use strict";function n(t){var e,n,o,i;for(t||(t={}),e=1,n=arguments.length;n>e;e+=1){o=arguments[e];for(i in o)i in t&&(t[i]===o[i]||i in r&&r[i]===o[i])||(t[i]=o[i])}return t}var r={};e.exports=n},{}],43:[function(t,e){"use strict";function n(t){return t.toLowerCase().split("-").map(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}).join("-")}e.exports=n},{}],44:[function(t,e){"use strict";function n(t,e){return t.then(function(t){return t&&t[e]},function(t){return Promise.reject(t&&t[e])})}function r(){return n(this,"entity")}function o(){return n(n(this,"status"),"code")}function i(){return n(this,"headers")}function s(t){return t=p(t),n(this.headers(),t)}function a(t){return t=[].concat(t),u(t.reduce(function(t,e){return t.then(function(t){if("string"==typeof e&&(e={rel:e}),"function"!=typeof t.entity.clientFor)throw new Error("Hypermedia response expected");var n=t.entity.clientFor(e.rel);return n({params:e.params})})},this))}function u(t){return t.status=o,t.headers=i,t.header=s,t.entity=r,t.follow=a,t}function c(t,e,n){return u(Promise.resolve(t).then(e,n))}var p=t("./normalizeHeaderName");c.make=u,c.reject=function(t){return u(Promise.reject(t))},c.promise=function(t){return u(new Promise(t))},e.exports=c},{"./normalizeHeaderName":43}],45:[function(t,e){"use strict";function n(t,e){if("string"!=typeof t)throw new Error("String required for URL encoding");return t.split("").map(function(t){if(e.hasOwnProperty(t))return t;var n=t.charCodeAt(0);if(127>=n){var r=n.toString(16).toUpperCase();return"%"+(r.length%2===1?"0":"")+r}return encodeURIComponent(t).toUpperCase()}).join("")}function r(t){return t=t||i.unreserved,function(e){return n(e,t)}}function o(t){return decodeURIComponent(t)}var i;i=function(){var t={alpha:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",digit:"0123456789"};return t.genDelims=":/?#[]@",t.subDelims="!$&'()*+,;=",t.reserved=t.genDelims+t.subDelims,t.unreserved=t.alpha+t.digit+"-._~",t.url=t.reserved+t.unreserved,t.scheme=t.alpha+t.digit+"+-.",t.userinfo=t.unreserved+t.subDelims+":",t.host=t.unreserved+t.subDelims,t.port=t.digit,t.pchar=t.unreserved+t.subDelims+":@",t.segment=t.pchar,t.path=t.segment+"/",t.query=t.pchar+"/?",t.fragment=t.pchar+"/?",Object.keys(t).reduce(function(e,n){return e[n]=t[n].split("").reduce(function(t,e){return t[e]=!0,t},{}),e},{})}(),e.exports={decode:o,encode:r(),encodeURL:r(i.url),encodeScheme:r(i.scheme),encodeUserInfo:r(i.userinfo),encodeHost:r(i.host),encodePort:r(i.port),encodePathSegment:r(i.segment),encodePath:r(i.path),encodeQuery:r(i.query),encodeFragment:r(i.fragment)}},{}],46:[function(t,e){"use strict";function n(t,e,n){return e.split(",").reduce(function(e,r){var o,s;if(o={},"*"===r.slice(-1)&&(r=r.slice(0,-1),o.explode=!0),a.test(r)){var u=a.exec(r);r=u[1],o.maxLength=parseInt(u[2])}return r=i.decode(r),s=n[r],void 0===s||null===s?e:(Array.isArray(s)?e=s.reduce(function(e,n){return e.length?(e+=o.explode?t.separator:",",t.named&&o.explode&&(e+=t.encoder(r),e+=n.length?"=":t.empty)):(e+=t.first,t.named&&(e+=t.encoder(r),e+=n.length?"=":t.empty)),e+=t.encoder(n)},e):"object"==typeof s?e=Object.keys(s).reduce(function(e,n){return e.length?e+=o.explode?t.separator:",":(e+=t.first,t.named&&!o.explode&&(e+=t.encoder(r),e+=s[n].length?"=":t.empty)),e+=t.encoder(n),e+=o.explode?"=":",",e+=t.encoder(s[n])},e):(s=String(s),o.maxLength&&(s=s.slice(0,o.maxLength)),e+=e.length?t.separator:t.first,t.named&&(e+=t.encoder(r),e+=s.length?"=":t.empty),e+=t.encoder(s)),e)},"")}function r(t,e){var r;if(r=s[t.slice(0,1)],r?t=t.slice(1):r=s[""],r.reserved)throw new Error("Reserved expression operations are not supported");return n(r,t,e)}function o(t,e){var n,o,i;for(i="",o=0;;){if(n=t.indexOf("{",o),-1===n){i+=t.slice(o);break}i+=t.slice(o,n),o=t.indexOf("}",n)+1,i+=r(t.slice(n+1,o-1),e)}return i}var i,s,a;i=t("./uriEncoder"),a=/^([^:]*):([0-9]+)$/,s={"":{first:"",separator:",",named:!1,empty:"",encoder:i.encode},"+":{first:"",separator:",",named:!1,empty:"",encoder:i.encodeURL},"#":{first:"#",separator:",",named:!1,empty:"",encoder:i.encodeURL},".":{first:".",separator:".",named:!1,empty:"",encoder:i.encode},"/":{first:"/",separator:"/",named:!1,empty:"",encoder:i.encode},";":{first:";",separator:";",named:!0,empty:"",encoder:i.encode},"?":{first:"?",separator:"&",named:!0,empty:"=",encoder:i.encode},"&":{first:"&",separator:"&",named:!0,empty:"=",encoder:i.encode},"=":{reserved:!0},",":{reserved:!0},"!":{reserved:!0},"@":{reserved:!0},"|":{reserved:!0}},e.exports={expand:o}},{"./uriEncoder":45}],47:[function(t,e){var n=e.exports=function(t,e){if(e||(e=16),void 0===t&&(t=128),0>=t)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(e),o=2;r===1/0;o*=2)r=Math.log(Math.pow(2,t/o))/Math.log(e)*o;for(var i=r-Math.floor(r),s="",o=0;o<Math.floor(r);o++){var a=Math.floor(Math.random()*e).toString(e);s=a+s}if(i){var u=Math.pow(e,i),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)?n(t,e):s}},{}],48:[function(t,e){(function(t){"use strict";var n=t.env.NODE_ENV,r=function(t,e,r,o,i,s,a,u){if("production"!==n&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,o,i,s,a,u],f=0;c=new Error(e.replace(/%s/g,function(){return p[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};e.exports=r}).call(this,t("_process"))},{_process:18}],49:[function(e,n,r){(function(o,i){!function(e){"object"==typeof r?n.exports=e():"function"==typeof t&&t.amd?t(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof i?i.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){var t;return function n(t,r,o){function i(a,u){if(!r[a]){if(!t[a]){var c="function"==typeof e&&e;if(!u&&c)return c(a,!0);if(s)return s(a,!0);throw new Error("Cannot find module '"+a+"'")}var p=r[a]={exports:{}};t[a][0].call(p.exports,function(e){var n=t[a][1][e];return i(n?n:e)},p,p.exports,n,t,r,o)}return r[a].exports}for(var s="function"==typeof e&&e,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(t,e){var n=t("../lib/decorators/unhandledRejection"),r=n(t("../lib/Promise"));e.exports="undefined"!=typeof i?i.Promise=r:"undefined"!=typeof self?self.Promise=r:r},{"../lib/Promise":2,"../lib/decorators/unhandledRejection":4}],2:[function(e,n){!function(t){"use strict";t(function(t){var e=t("./makePromise"),n=t("./Scheduler"),r=t("./env").asap;return e({scheduler:new n(r)})})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"./Scheduler":3,"./env":5,"./makePromise":7}],3:[function(e,n){!function(t){"use strict";t(function(){function t(t){this._async=t,this._running=!1,this._queue=this,this._queueLen=0,this._afterQueue={},this._afterQueueLen=0;var e=this;this.drain=function(){e._drain()}}return t.prototype.enqueue=function(t){this._queue[this._queueLen++]=t,this.run()},t.prototype.afterQueue=function(t){this._afterQueue[this._afterQueueLen++]=t,this.run()},t.prototype.run=function(){this._running||(this._running=!0,this._async(this.drain))},t.prototype._drain=function(){for(var t=0;t<this._queueLen;++t)this._queue[t].run(),this._queue[t]=void 0;for(this._queueLen=0,this._running=!1,t=0;t<this._afterQueueLen;++t)this._afterQueue[t].run(),this._afterQueue[t]=void 0;this._afterQueueLen=0},t})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],4:[function(e,n){!function(t){"use strict";t(function(t){function e(t){throw t}function n(){}var r=t("../env").setTimer,o=t("../format");return function(t){function i(t){t.handled||(d.push(t),p("Potentially unhandled rejection ["+t.id+"] "+o.formatError(t.value)))}function s(t){var e=d.indexOf(t);e>=0&&(d.splice(e,1),f("Handled previous rejection ["+t.id+"] "+o.formatObject(t.value)))}function a(t,e){l.push(t,e),null===h&&(h=r(u,0))}function u(){for(h=null;l.length>0;)l.shift()(l.shift())}var c,p=n,f=n;"undefined"!=typeof console&&(c=console,p="undefined"!=typeof c.error?function(t){c.error(t)}:function(t){c.log(t)},f="undefined"!=typeof c.info?function(t){c.info(t)}:function(t){c.log(t)}),t.onPotentiallyUnhandledRejection=function(t){a(i,t)},t.onPotentiallyUnhandledRejectionHandled=function(t){a(s,t)},t.onFatalRejection=function(t){a(e,t.value)};var l=[],d=[],h=null;return t}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"../env":5,"../format":6}],5:[function(e,n){!function(t){"use strict";t(function(t){function e(){return"undefined"!=typeof o&&"[object process]"===Object.prototype.toString.call(o)}function n(){return"function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver}function r(t){function e(){var t=n;n=void 0,t()}var n,r=document.createTextNode(""),o=new t(e);o.observe(r,{characterData:!0});var i=0;return function(t){n=t,r.data=i^=1}}var i,s="undefined"!=typeof setTimeout&&setTimeout,a=function(t,e){return setTimeout(t,e)},u=function(t){return clearTimeout(t)},c=function(t){return s(t,0)};if(e())c=function(t){return o.nextTick(t)};else if(i=n())c=r(i);else if(!s){var p=t,f=p("vertx");a=function(t,e){return f.setTimer(e,t)},u=f.cancelTimer,c=f.runOnLoop||f.runOnContext}return{setTimer:a,clearTimer:u,asap:c}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{}],6:[function(e,n){!function(t){"use strict";t(function(){function t(t){var n="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?n:n+" (WARNING: non-Error used)"}function e(t){var e=String(t);return"[object Object]"===e&&"undefined"!=typeof JSON&&(e=n(t,e)),e}function n(t,e){try{return JSON.stringify(t)}catch(n){return e}}return{formatError:t,formatObject:e,tryStringify:n}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],7:[function(e,n){!function(t){"use strict";t(function(){return function(t){function e(t,e){this._handler=t===w?e:n(t)}function n(t){function e(t){o.resolve(t)}function n(t){o.reject(t)}function r(t){o.notify(t)}var o=new _;try{t(e,n,r)}catch(i){n(i)}return o}function r(t){return U(t)?t:new e(w,new A(v(t)))}function i(t){return new e(w,new A(new E(t)))}function s(){return tt}function a(){return new e(w,new _)}function u(t,e){var n=new _(t.receiver,t.join().context);return new e(w,n)}function c(t){return f(Y,null,t)}function p(t,e){return f(F,t,e)}function f(t,n,r){function o(e,o,s){s.resolved||l(r,i,e,t(n,o,e),s)}function i(t,e,n){p[t]=e,0===--c&&n.become(new j(p))}for(var s,a="function"==typeof n?o:i,u=new _,c=r.length>>>0,p=new Array(c),f=0;f<r.length&&!u.resolved;++f)s=r[f],void 0!==s||f in r?l(r,a,f,s,u):--c;return 0===c&&u.become(new j(p)),new e(w,u)}function l(t,e,n,r,o){if(L(r)){var i=b(r),s=i.state();0===s?i.fold(e,n,void 0,o):s>0?e(n,i.value,o):(o.become(i),d(t,n+1,i))}else e(n,r,o)}function d(t,e,n){for(var r=e;r<t.length;++r)h(v(t[r]),n)}function h(t,e){if(t!==e){var n=t.state();0===n?t.visit(t,void 0,t._unreport):0>n&&t._unreport()}}function m(t){return"object"!=typeof t||null===t?i(new TypeError("non-iterable passed to race()")):0===t.length?s():1===t.length?r(t[0]):y(t)}function y(t){var n,r,o,i=new _;for(n=0;n<t.length;++n)if(r=t[n],void 0!==r||n in t){if(o=v(r),0!==o.state()){i.become(o),d(t,n+1,o);break}o.visit(i,i.resolve,i.reject)}return new e(w,i)}function v(t){return U(t)?t._handler.join():L(t)?g(t):new j(t)}function b(t){return U(t)?t._handler.join():g(t)}function g(t){try{var e=t.then;return"function"==typeof e?new T(e,t):new j(t)}catch(n){return new E(n)}}function w(){}function x(){}function _(t,n){e.createContext(this,n),this.consumers=void 0,this.receiver=t,this.handler=void 0,this.resolved=!1}function A(t){this.handler=t}function T(t,e){_.call(this),J.enqueue(new C(t,e,this))}function j(t){e.createContext(this),this.value=t}function E(t){e.createContext(this),this.id=++$,this.value=t,this.handled=!1,this.reported=!1,this._report()}function P(t,e){this.rejection=t,this.context=e}function S(t){this.rejection=t}function I(){return new E(new TypeError("Promise cycle"))}function k(t,e){this.continuation=t,this.handler=e}function D(t,e){this.handler=e,this.value=t}function C(t,e,n){this._then=t,this.thenable=e,this.resolver=n}function O(t,e,n,r,o){try{t.call(e,n,r,o)}catch(i){r(i)}}function R(t,e,n,r){this.f=t,this.z=e,this.c=n,this.to=r,this.resolver=K,this.receiver=this}function U(t){return t instanceof e}function L(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function q(t,n,r,o){return"function"!=typeof t?o.become(n):(e.enterContext(n),z(t,n.value,r,o),void e.exitContext())}function N(t,n,r,o,i){return"function"!=typeof t?i.become(r):(e.enterContext(r),H(t,n,r.value,o,i),void e.exitContext())}function M(t,n,r,o,i){return"function"!=typeof t?i.notify(n):(e.enterContext(r),Q(t,n,o,i),void e.exitContext())}function F(t,e,n){try{return t(e,n)}catch(r){return i(r)}}function z(t,e,n,r){try{r.become(v(t.call(n,e)))}catch(o){r.become(new E(o))}}function H(t,e,n,r,o){try{t.call(r,e,n,o)}catch(i){o.become(new E(i))}}function Q(t,e,n,r){try{r.notify(t.call(n,e))}catch(o){r.notify(o)}}function G(t,e){e.prototype=X(t.prototype),e.prototype.constructor=e}function Y(t,e){return e}function B(){}function W(){return"undefined"!=typeof o&&null!==o&&"function"==typeof o.emit?function(t,e){return"unhandledRejection"===t?o.emit(t,e.value,e):o.emit(t,e)}:"undefined"!=typeof self&&"function"==typeof CustomEvent?function(t,e,n){var r=!1;try{var o=new n("unhandledRejection");r=o instanceof n}catch(i){}return r?function(t,r){var o=new n(t,{detail:{reason:r.value,key:r},bubbles:!1,cancelable:!0});return!e.dispatchEvent(o)}:t}(B,self,CustomEvent):B}var J=t.scheduler,V=W(),X=Object.create||function(t){function e(){}return e.prototype=t,new e};e.resolve=r,e.reject=i,e.never=s,e._defer=a,e._handler=v,e.prototype.then=function(t,e,n){var r=this._handler,o=r.join().state();if("function"!=typeof t&&o>0||"function"!=typeof e&&0>o)return new this.constructor(w,r);var i=this._beget(),s=i._handler;return r.chain(s,r.receiver,t,e,n),i},e.prototype["catch"]=function(t){return this.then(void 0,t)},e.prototype._beget=function(){return u(this._handler,this.constructor)},e.all=c,e.race=m,e._traverse=p,e._visitRemaining=d,w.prototype.when=w.prototype.become=w.prototype.notify=w.prototype.fail=w.prototype._unreport=w.prototype._report=B,w.prototype._state=0,w.prototype.state=function(){return this._state},w.prototype.join=function(){for(var t=this;void 0!==t.handler;)t=t.handler;return t},w.prototype.chain=function(t,e,n,r,o){this.when({resolver:t,receiver:e,fulfilled:n,rejected:r,progress:o})},w.prototype.visit=function(t,e,n,r){this.chain(K,t,e,n,r)},w.prototype.fold=function(t,e,n,r){this.when(new R(t,e,n,r))},G(w,x),x.prototype.become=function(t){t.fail()};var K=new x;G(w,_),_.prototype._state=0,_.prototype.resolve=function(t){this.become(v(t))},_.prototype.reject=function(t){this.resolved||this.become(new E(t))},_.prototype.join=function(){if(!this.resolved)return this;for(var t=this;void 0!==t.handler;)if(t=t.handler,t===this)return this.handler=I();return t},_.prototype.run=function(){var t=this.consumers,e=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var n=0;n<t.length;++n)e.when(t[n])},_.prototype.become=function(t){this.resolved||(this.resolved=!0,this.handler=t,void 0!==this.consumers&&J.enqueue(this),void 0!==this.context&&t._report(this.context))},_.prototype.when=function(t){this.resolved?J.enqueue(new k(t,this.handler)):void 0===this.consumers?this.consumers=[t]:this.consumers.push(t)},_.prototype.notify=function(t){this.resolved||J.enqueue(new D(t,this))},_.prototype.fail=function(t){var e="undefined"==typeof t?this.context:t;this.resolved&&this.handler.join().fail(e)},_.prototype._report=function(t){this.resolved&&this.handler.join()._report(t)},_.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},G(w,A),A.prototype.when=function(t){J.enqueue(new k(t,this))},A.prototype._report=function(t){this.join()._report(t)},A.prototype._unreport=function(){this.join()._unreport()},G(_,T),G(w,j),j.prototype._state=1,j.prototype.fold=function(t,e,n,r){N(t,e,this,n,r)},j.prototype.when=function(t){q(t.fulfilled,this,t.receiver,t.resolver)};var $=0;G(w,E),E.prototype._state=-1,E.prototype.fold=function(t,e,n,r){r.become(this)},E.prototype.when=function(t){"function"==typeof t.rejected&&this._unreport(),q(t.rejected,this,t.receiver,t.resolver)},E.prototype._report=function(t){J.afterQueue(new P(this,t))},E.prototype._unreport=function(){this.handled||(this.handled=!0,J.afterQueue(new S(this)))},E.prototype.fail=function(t){this.reported=!0,V("unhandledRejection",this),e.onFatalRejection(this,void 0===t?this.context:t)},P.prototype.run=function(){this.rejection.handled||this.rejection.reported||(this.rejection.reported=!0,V("unhandledRejection",this.rejection)||e.onPotentiallyUnhandledRejection(this.rejection,this.context))},S.prototype.run=function(){this.rejection.reported&&(V("rejectionHandled",this.rejection)||e.onPotentiallyUnhandledRejectionHandled(this.rejection))},e.createContext=e.enterContext=e.exitContext=e.onPotentiallyUnhandledRejection=e.onPotentiallyUnhandledRejectionHandled=e.onFatalRejection=B;var Z=new w,tt=new e(w,Z);return k.prototype.run=function(){this.handler.join().when(this.continuation)},D.prototype.run=function(){var t=this.handler.consumers;if(void 0!==t)for(var e,n=0;n<t.length;++n)e=t[n],M(e.progress,this.value,this.handler,e.receiver,e.resolver)},C.prototype.run=function(){function t(t){r.resolve(t)}function e(t){r.reject(t)}function n(t){r.notify(t)}var r=this.resolver;O(this._then,this.thenable,t,e,n)},R.prototype.fulfilled=function(t){this.f.call(this.c,this.z,t,this.to)},R.prototype.rejected=function(t){this.to.reject(t)},R.prototype.progress=function(t){this.to.notify(t)},e}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}]},{},[1])(1)})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:18}],50:[function(t,e){function n(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)o.call(n,r)&&(t[r]=n[r])}return t}function r(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var r in n)o.call(n,r)&&(t[r]=n[r])}return t}e.exports.extendMutable=n,e.exports.extend=r;var o=Object.prototype.hasOwnProperty},{}]},{},[8])(8)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.MapboxClient=e()}}(function(){var e;return function t(e,r,n){function o(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var p=r[s]={exports:{}};e[s][0].call(p.exports,function(t){var r=e[s][1][t];return o(r?r:t)},p,p.exports,t,e,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t){"use strict";e("./promise");var r=e("rest/interceptor"),n=r({success:function(e){var t=e&&e.callback;return"function"==typeof t&&t(null,e.entity,e),e},error:function(e){var t=e&&e.callback;if("function"==typeof t){var r=e.error||e.entity;"object"!=typeof r&&(r=new Error(r)),t(r)}return e}});t.exports=n},{"./promise":9,"rest/interceptor":26}],2:[function(e,t){"use strict";e("./promise");var r=e("rest"),n=e("./standard_response"),o=e("./callbackify");t.exports=function(t){return r.wrap(e("rest/interceptor/errorCode")).wrap(e("rest/interceptor/pathPrefix"),{prefix:t.endpoint}).wrap(e("rest/interceptor/mime"),{mime:"application/json"}).wrap(e("rest/interceptor/params")).wrap(e("rest/interceptor/defaultRequest"),{params:{access_token:t.accessToken}}).wrap(e("rest/interceptor/template")).wrap(n).wrap(o)}},{"./callbackify":1,"./promise":9,"./standard_response":18,rest:22,"rest/interceptor/defaultRequest":27,"rest/interceptor/errorCode":28,"rest/interceptor/mime":29,"rest/interceptor/params":30,"rest/interceptor/pathPrefix":31,"rest/interceptor/template":32}],3:[function(e,t){t.exports.DEFAULT_ENDPOINT="https://api.mapbox.com",t.exports.API_GEOCODING_FORWARD="/geocoding/v5/{dataset}/{query}.json{?proximity,country,types,bbox,limit,autocomplete}",t.exports.API_GEOCODING_REVERSE="/geocoding/v5/{dataset}/{longitude},{latitude}.json{?types,limit}",t.exports.API_DIRECTIONS="/directions/v5/{account}/{profile}/{encodedWaypoints}.json{?alternatives,geometries,overview,radiuses,steps,continue_straight,bearings}",t.exports.API_DISTANCE="/distances/v1/mapbox/{profile}",t.exports.API_SURFACE="/v4/surface/{mapid}.json{?layer,fields,points,geojson,interpolate,encoded_polyline}",t.exports.API_UPLOADS="/uploads/v1/{owner}",t.exports.API_UPLOAD="/uploads/v1/{owner}/{upload}",t.exports.API_UPLOAD_CREDENTIALS="/uploads/v1/{owner}/credentials",t.exports.API_MATCHING="/matching/v5/{account}/{profile}/{coordinates}.json{?geometries,radiuses,steps,overview,timestamps,annotations}",t.exports.API_DATASET_DATASETS="/datasets/v1/{owner}{?limit,start,fresh}",t.exports.API_DATASET_DATASET="/datasets/v1/{owner}/{dataset}",t.exports.API_DATASET_FEATURES="/datasets/v1/{owner}/{dataset}/features{?reverse,limit,start}",t.exports.API_DATASET_FEATURE="/datasets/v1/{owner}/{dataset}/features/{id}",t.exports.API_TILESTATS_STATISTICS="/tilestats/v1/{owner}/{tileset}",t.exports.API_TILESTATS_LAYER="/tilestats/v1/{owner}/{tileset}/{layer}",t.exports.API_TILESTATS_ATTRIBUTE="/tilestats/v1/{owner}/{tileset}/{layer}/{attribute}",t.exports.API_STATIC="/v4/{mapid}{+overlay}/{+xyz}/{width}x{height}{+retina}{.format}{?access_token}",t.exports.API_STYLES_LIST="/styles/v1/{owner}",t.exports.API_STYLES_CREATE="/styles/v1/{owner}",t.exports.API_STYLES_READ="/styles/v1/{owner}/{styleid}",t.exports.API_STYLES_UPDATE="/styles/v1/{owner}/{styleid}",t.exports.API_STYLES_DELETE="/styles/v1/{owner}/{styleid}",t.exports.API_STYLES_EMBED="/styles/v1/{owner}/{styleid}.html{?zoomwheel,title,access_token}",t.exports.API_STYLES_SPRITE="/styles/v1/{owner}/{styleid}/sprite{+retina}{.format}",t.exports.API_STYLES_SPRITE_ADD_ICON="/styles/v1/{owner}/{styleid}/sprite/{iconName}",t.exports.API_STYLES_SPRITE_DELETE_ICON="/styles/v1/{owner}/{styleid}/sprite/{iconName}",t.exports.API_STYLES_FONT_GLYPH_RANGES="/fonts/v1/{owner}/{font}/{start}-{end}.pbf"},{}],4:[function(e,t){"use strict";function r(e){return e.map(function(e){return n(e),e.longitude+","+e.latitude}).join(";")}var n=e("./invariant_location");t.exports=r},{"./invariant_location":6}],5:[function(e,t){"use strict";function r(e){var t=e.split(".")[1];if(!t)return null;t=t.replace(/-/g,"+").replace(/_/g,"/");var r=t.length%4;if(2===r&&(t+="=="),3===r&&(t+="="),1===r||r>3)return null;try{return JSON.parse(n.decode(t)).u}catch(o){return null}}var n=e("rest/util/base64");t.exports=r},{"rest/util/base64":41}],6:[function(e,t){"use strict";function r(e){n("number"==typeof e.latitude&&"number"==typeof e.longitude,"location must be an object with numeric latitude & longitude properties"),void 0!==e.zoom&&n("number"==typeof e.zoom,"zoom must be numeric")}var n=e("../vendor/invariant");t.exports=r},{"../vendor/invariant":50}],7:[function(e,t){"use strict";function r(e){function t(t,r){this.name=e,n("string"==typeof t,"accessToken required to instantiate Mapbox client");var a=o.DEFAULT_ENDPOINT;void 0!==r&&(n("object"==typeof r,"options must be an object"),r.endpoint&&(n("string"==typeof r.endpoint,"endpoint must be a string"),a=r.endpoint),r.account&&(n("string"==typeof r.account,"account must be a string"),this.owner=r.account)),this.client=i({endpoint:a,accessToken:t}),this.accessToken=t,this.endpoint=a,this.owner=this.owner||s(t),n(!!this.owner,"could not determine account from provided accessToken")}return t}var n=e("../vendor/invariant"),o=e("./constants"),i=e("./client"),s=e("./get_user");t.exports=r},{"../vendor/invariant":50,"./client":2,"./constants":3,"./get_user":5}],8:[function(e,t){"use strict";var r=e("./make_service"),n=e("../vendor/xtend").extendMutable,o=e("./get_user"),i=e("./services/geocoding"),s=e("./services/surface"),a=e("./services/directions"),u=e("./services/uploads"),c=e("./services/matching"),p=e("./services/datasets"),l=e("./services/distance"),f=e("./services/tilestats"),d=r("MapboxClient");n(d.prototype,i.prototype,s.prototype,a.prototype,l.prototype,c.prototype,p.prototype,u.prototype,f.prototype),d.getUser=o,t.exports=d},{"../vendor/xtend":51,"./get_user":5,"./make_service":7,"./services/datasets":10,"./services/directions":11,"./services/distance":12,"./services/geocoding":13,"./services/matching":14,"./services/surface":15,"./services/tilestats":16,"./services/uploads":17}],9:[function(e,t){"use strict";"undefined"==typeof Promise&&e("es6-promise").polyfill(),t["export"]=Promise},{"es6-promise":19}],10:[function(e,t){"use strict";var r=e("../../vendor/invariant"),n=e("../../vendor/hat"),o=e("../make_service"),i=e("../constants"),s=t.exports=o("MapboxDatasets");s.prototype.listDatasets=function(e,t){return"function"==typeof e&&(t=e,e={}),this.client({path:i.API_DATASET_DATASETS,params:{limit:e.limit,start:e.start,fresh:e.fresh,owner:this.owner},callback:t})},s.prototype.createDataset=function(e,t){return void 0===t&&"function"==typeof e&&(t=e,e={}),r("object"==typeof e,"options must be an object"),this.client({path:i.API_DATASET_DATASETS,params:{owner:this.owner},entity:e,callback:t})},s.prototype.readDataset=function(e,t){return r("string"==typeof e,"dataset must be a string"),this.client({path:i.API_DATASET_DATASET,params:{owner:this.owner,dataset:e},callback:t})},s.prototype.updateDataset=function(e,t,n){return r("string"==typeof e,"dataset must be a string"),r("object"==typeof t,"options must be an object"),r(!!t.name||!!t.description,"options must include a name or a description"),this.client({path:i.API_DATASET_DATASET,params:{owner:this.owner,dataset:e},method:"patch",entity:t,callback:n})},s.prototype.deleteDataset=function(e,t){return r("string"==typeof e,"dataset must be a string"),this.client({path:i.API_DATASET_DATASET,params:{owner:this.owner,dataset:e},method:"delete",callback:t})},s.prototype.listFeatures=function(e,t,n){void 0===n&&"function"==typeof t&&(n=t,t={}),r("string"==typeof e,"dataset must be a string"),r("object"==typeof t,"options must be a object");var o={owner:this.owner,dataset:e};return t.reverse&&(r("boolean"==typeof t.reverse,"reverse option must be a boolean"),o.reverse=t.reverse),t.limit&&(r("number"==typeof t.limit,"limit option must be a number"),o.limit=t.limit),t.start&&(r("string"==typeof t.start,"start option must be a string"),o.start=t.start),this.client({path:i.API_DATASET_FEATURES,params:o,callback:n})},s.prototype.insertFeature=function(e,t,o){r("string"==typeof t,"dataset must be a string");var s=e.id||n();return r("string"==typeof s,"The GeoJSON feature's id must be a string"),this.client({path:i.API_DATASET_FEATURE,params:{owner:this.owner,dataset:t,id:s},method:"put",entity:e,callback:o})},s.prototype.readFeature=function(e,t,n){return r("string"==typeof e,"id must be a string"),r("string"==typeof t,"dataset must be a string"),this.client({path:i.API_DATASET_FEATURE,params:{owner:this.owner,dataset:t,id:e},callback:n})},s.prototype.deleteFeature=function(e,t,n){return r("string"==typeof e,"id must be a string"),r("string"==typeof t,"dataset must be a string"),this.client({path:i.API_DATASET_FEATURE,params:{owner:this.owner,dataset:t,id:e},method:"delete",callback:n})}},{"../../vendor/hat":49,"../../vendor/invariant":50,"../constants":3,"../make_service":7}],11:[function(e,t){"use strict";var r=e("../../vendor/invariant"),n=e("../format_points"),o=e("../make_service"),i=e("../constants"),s=o("MapboxDirections");s.prototype.getDirections=function(e,t,o){void 0===o&&"function"==typeof t?(o=t,t={}):void 0===t&&(t={}),r(Array.isArray(e),"waypoints must be an array"),r("object"==typeof t,"options must be an object");var s=n(e),a={encodedWaypoints:s,profile:"driving",account:"mapbox",alternatives:!0,steps:!0,geometries:"geojson"};t.profile&&(r("string"==typeof t.profile,"profile option must be string"),a.profile=t.profile),"undefined"!=typeof t.alternatives&&(r("boolean"==typeof t.alternatives,"alternatives option must be boolean"),a.alternatives=t.alternatives),t.radiuses&&(r(Array.isArray(t.radiuses),"radiuses must be an array"),r(t.radiuses.length===e.length,"There must be as many radiuses as there are waypoints in the request"),a.radiuses=t.radiuses.join(";")),"undefined"!=typeof t.steps&&(r("boolean"==typeof t.steps,"steps option must be boolean"),a.steps=t.steps);var u=["polyline","geojson"];t.geometries&&(r(-1!==u.indexOf(t.geometries),"geometries option must be "+u),a.geometries=t.geometries);var c=["simplified","full"];return t.overview&&(r(-1!==c.indexOf(t.overview),"overview option must be "+c),a.overview=t.overview),"undefined"!=typeof t.continue_straight&&(r("boolean"==typeof t.continue_straight,"continue_straight option must be boolean"),a.continue_straight=t.continue_straight),t.bearings&&(r(Array.isArray(t.radiuses),"bearings must be an array"),r(t.bearings.length===e.length,"There must be as many bearings as there are waypoints in the request"),a.bearings=t.bearings.join(";")),this.client({path:i.API_DIRECTIONS,params:a,callback:o})},t.exports=s},{"../../vendor/invariant":50,"../constants":3,"../format_points":4,"../make_service":7}],12:[function(e,t){"use strict";var r=e("../../vendor/invariant"),n=e("../make_service"),o=e("../constants"),i=n("MapboxDistance");i.prototype.getDistances=function(e,t,n){void 0===n&&"function"==typeof t&&(n=t,t={}),r(Array.isArray(e),"waypoints must be an array");var i="driving";return t.profile&&(r("string"==typeof t.profile,"profile option must be string"),i=t.profile),this.client({path:o.API_DISTANCE,params:{profile:i},entity:{coordinates:e},method:"post",callback:n})},t.exports=i},{"../../vendor/invariant":50,"../constants":3,"../make_service":7}],13:[function(e,t){"use strict";function r(e,t){var r=Math.pow(10,t);return Math.round(e*r)/r}var n=e("../../vendor/invariant"),o=e("../make_service"),i=e("../constants"),s=o("MapboxGeocoding"),a=5,u=3;s.prototype.geocodeForward=function(e,t,o){if(void 0===o&&"function"==typeof t&&(o=t,t={}),Array.isArray(e)){if("mapbox.places-permanent"!==t.dataset)throw new Error("Batch geocoding is only available with the mapbox.places-permanent endpoint. See https://mapbox.com/api-documentation/#batch-requests for details");e=e.join(";")}n("string"==typeof e,"query must be a string"),n("object"==typeof t,"options must be an object");var s={query:e,dataset:"mapbox.places"},a=u;return t.precision&&(n("number"==typeof t.precision,"precision option must be number"),a=t.precision),t.proximity&&(n("number"==typeof t.proximity.latitude&&"number"==typeof t.proximity.longitude,"proximity must be an object with numeric latitude & longitude properties"),s.proximity=r(t.proximity.longitude,a)+","+r(t.proximity.latitude,a)),t.bbox&&(n("number"==typeof t.bbox[0]&&"number"==typeof t.bbox[1]&&"number"==typeof t.bbox[2]&&"number"==typeof t.bbox[3]&&4===t.bbox.length,"bbox must be an array with numeric values in the form [minX, minY, maxX, maxY]"),s.bbox=t.bbox[0]+","+t.bbox[1]+","+t.bbox[2]+","+t.bbox[3]),t.limit&&(n("number"==typeof t.limit,"limit must be a number"),s.limit=t.limit),t.dataset&&(n("string"==typeof t.dataset,"dataset option must be string"),s.dataset=t.dataset),t.country&&(n("string"==typeof t.country,"country option must be string"),s.country=t.country),t.types&&(n("string"==typeof t.types,"types option must be string"),s.types=t.types),"boolean"==typeof t.autocomplete&&(n("boolean"==typeof t.autocomplete,"autocomplete must be a boolean"),s.autocomplete=t.autocomplete),this.client({path:i.API_GEOCODING_FORWARD,params:s,callback:o})},s.prototype.geocodeReverse=function(e,t,o){void 0===o&&"function"==typeof t&&(o=t,t={}),n("object"==typeof e,"location must be an object"),n("object"==typeof t,"options must be an object"),n("number"==typeof e.latitude&&"number"==typeof e.longitude,"location must be an object with numeric latitude & longitude properties");var s={dataset:"mapbox.places"};t.dataset&&(n("string"==typeof t.dataset,"dataset option must be string"),s.dataset=t.dataset);var u=a;return t.precision&&(n("number"==typeof t.precision,"precision option must be number"),u=t.precision),t.types&&(n("string"==typeof t.types,"types option must be string"),s.types=t.types),t.limit&&(n("number"==typeof t.limit,"limit option must be a number"),n(1===t.types.split(",").length,"a single type must be specified to use the limit option"),s.limit=t.limit),s.longitude=r(e.longitude,u),s.latitude=r(e.latitude,u),this.client({path:i.API_GEOCODING_REVERSE,params:s,callback:o})},t.exports=s},{"../../vendor/invariant":50,"../constants":3,"../make_service":7}],14:[function(e,t){"use strict";var r=e("../../vendor/invariant"),n=e("../make_service"),o=e("../constants"),i=n("MapboxMatching");i.prototype.matching=function(e,t,n){void 0===n&&"function"==typeof t&&(n=t,t={}),r(Array.isArray(e),"coordinates must be an array");var i={profile:"driving",account:"mapbox",geometries:"geojson",coordinates:e.join(";")};t.profile&&(r("string"==typeof t.profile,"profile option must be string"),i.profile=t.profile);var s=["polyline","geojson"];t.geometries&&(r(-1!==s.indexOf(t.geometries),"geometries option must be "+s),i.geometries=t.geometries),t.radiuses&&(r(Array.isArray(t.radiuses),"radiuses must be an array"),r(t.radiuses.length===e.length,"There must be as many radiuses as there are coordinates in the request"),i.radiuses=t.radiuses.join(";")),"undefined"!=typeof t.steps&&(r("boolean"==typeof t.steps,"steps option must be boolean"),i.steps=t.steps);var a=["full","simplified"];return"undefined"!=typeof t.overview&&(r(-1!==a.indexOf(t.overview)||t.overview===!1,"overview option must be "+a+" or false"),i.overview=t.overview),t.timestamps&&(r(Array.isArray(t.timestamps),"timestamps must be an array"),r(t.timestamps.length===e.length,"There must be as many timestamps as there are coordinates in the request"),i.timestamps=t.timestamps.join(";")),t.annotations&&(r(Array.isArray(t.annotations),"annotations must be an array"),i.annotations=t.annotations.join()),this.client({path:o.API_MATCHING,params:i,method:"get",callback:n})},t.exports=i},{"../../vendor/invariant":50,"../constants":3,"../make_service":7}],15:[function(e,t){"use strict";var r=e("../../vendor/invariant"),n=e("../format_points"),o=e("../make_service"),i=e("../constants"),s=o("MapboxSurface");s.prototype.surface=function(e,t,o,s,a,u){void 0===u&&"function"==typeof a&&(u=a,a={}),r("string"==typeof e,"mapid must be a string"),r("string"==typeof t,"layer must be a string"),r(Array.isArray(o),"fields must be an array of strings"),r(Array.isArray(s)||"string"==typeof s,"path must be an array of objects or a string"),r("object"==typeof a,"options must be an object");var c=!0,p=!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"),p=a.geojson);var l={geojson:p,layer:t,mapid:e,fields:o.join(","),interpolate:c};return Array.isArray(s)?l.points=n(s):l.encoded_polyline=s,void 0!==a.zoom&&(r("number"==typeof a.zoom,"zoom must be a number"),l.z=a.zoom),this.client({path:i.API_SURFACE,params:l,callback:u})},t.exports=s},{"../../vendor/invariant":50,"../constants":3,"../format_points":4,"../make_service":7}],16:[function(e,t){"use strict";var r=e("../../vendor/invariant"),n=e("../make_service"),o=e("../constants"),i=t.exports=n("MapboxTilestats");i.prototype.getTilestats=function(e,t){r("string"==typeof e,"tileset must be a string");var n=e.split(".")[0];return n===e&&(n=this.owner),this.client({path:o.API_TILESTATS_STATISTICS,params:{owner:n,tileset:e},callback:t})},i.prototype.putTilestats=function(e,t,n){r("string"==typeof e,"tileset must be a string");var i=e.split(".")[0];return i===e&&(i=this.owner),this.client({path:o.API_TILESTATS_STATISTICS,params:{owner:i,tileset:e},entity:t,method:"put",callback:n})}},{"../../vendor/invariant":50,"../constants":3,"../make_service":7}],17:[function(e,t){"use strict";var r=e("../../vendor/invariant"),n=e("../make_service"),o=e("../constants"),i=t.exports=n("MapboxUploads");i.prototype.listUploads=function(e){return this.client({path:o.API_UPLOADS,params:{owner:this.owner},callback:e})},i.prototype.createUploadCredentials=function(e){return this.client({path:o.API_UPLOAD_CREDENTIALS,params:{owner:this.owner},callback:e})},i.prototype.createUpload=function(e,t){return r("object"==typeof e,"options must be an object"),this.client({path:o.API_UPLOADS,params:{owner:this.owner},entity:e,callback:t})},i.prototype.readUpload=function(e,t){return r("string"==typeof e,"upload must be a string"),this.client({path:o.API_UPLOAD,params:{owner:this.owner,upload:e},callback:t})},i.prototype.deleteUpload=function(e,t){return r("string"==typeof e,"upload must be a string"),this.client({method:"delete",path:o.API_UPLOAD,params:{owner:this.owner,upload:e},callback:t})}},{"../../vendor/invariant":50,"../constants":3,"../make_service":7}],18:[function(e,t){function r(e){var t=void 0;return e.status&&(t=e.status.code),{url:e.url,status:t,headers:e.headers,entity:e.entity,error:e.error,callback:e.request.callback}}var n=e("rest/interceptor"),o=n({response:r});t.exports=o},{"rest/interceptor":26}],19:[function(t,r,n){(function(o,i){!function(t,o){"object"==typeof n&&"undefined"!=typeof r?r.exports=o():"function"==typeof e&&e.amd?e(o):t.ES6Promise=o()}(this,function(){"use strict";function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function r(e){return"function"==typeof e}function n(e){V=e}function s(e){X=e}function a(){return function(){return o.nextTick(f)}}function u(){return"undefined"!=typeof J?function(){J(f)}:l()}function c(){var e=0,t=new Z(f),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function p(){var e=new MessageChannel;return e.port1.onmessage=f,function(){return e.port2.postMessage(0)}}function l(){var e=setTimeout;return function(){return e(f,1)}}function f(){for(var e=0;W>e;e+=2){var t=re[e],r=re[e+1];t(r),re[e]=void 0,re[e+1]=void 0}W=0}function d(){try{var e=t,r=e("vertx");return J=r.runOnLoop||r.runOnContext,u()}catch(n){return l()}}function m(e,t){var r=arguments,n=this,o=new this.constructor(y);void 0===o[oe]&&R(o);var i=n._state;return i?!function(){var e=r[i-1];X(function(){return O(i,o,e,n._result)})}():j(n,o,e,t),o}function h(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(y);return T(r,e),r}function y(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function b(){return new TypeError("A promises callback cannot return that same promise.")}function g(e){try{return e.then}catch(t){return ue.error=t,ue}}function w(e,t,r,n){try{e.call(t,r,n)}catch(o){return o}}function _(e,t,r){X(function(e){var n=!1,o=w(r,t,function(r){n||(n=!0,t!==r?T(e,r):S(e,r))},function(t){n||(n=!0,P(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&o&&(n=!0,P(e,o))},e)}function x(e,t){t._state===se?S(e,t._result):t._state===ae?P(e,t._result):j(t,void 0,function(t){return T(e,t)},function(t){return P(e,t)})}function A(e,t,n){t.constructor===e.constructor&&n===m&&t.constructor.resolve===h?x(e,t):n===ue?P(e,ue.error):void 0===n?S(e,t):r(n)?_(e,t,n):S(e,t)}function T(t,r){t===r?P(t,v()):e(r)?A(t,r,g(r)):S(t,r)}function E(e){e._onerror&&e._onerror(e._result),I(e)}function S(e,t){e._state===ie&&(e._result=t,e._state=se,0!==e._subscribers.length&&X(I,e))}function P(e,t){e._state===ie&&(e._state=ae,e._result=t,X(E,e))}function j(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+se]=r,o[i+ae]=n,0===i&&e._state&&X(I,e)}function I(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n=void 0,o=void 0,i=e._result,s=0;s<t.length;s+=3)n=t[s],o=t[s+r],n?O(r,n,o,i):o(i);e._subscribers.length=0}}function D(){this.error=null}function k(e,t){try{return e(t)}catch(r){return ce.error=r,ce}}function O(e,t,n,o){var i=r(n),s=void 0,a=void 0,u=void 0,c=void 0;if(i){if(s=k(n,o),s===ce?(c=!0,a=s.error,s=null):u=!0,t===s)return void P(t,b())}else s=o,u=!0;t._state!==ie||(i&&u?T(t,s):c?P(t,a):e===se?S(t,s):e===ae&&P(t,s))}function C(e,t){try{t(function(t){T(e,t)},function(t){P(e,t)})}catch(r){P(e,r)}}function U(){return pe++}function R(e){e[oe]=pe++,e._state=void 0,e._result=void 0,e._subscribers=[]}function L(e,t){this._instanceConstructor=e,this.promise=new e(y),this.promise[oe]||R(this.promise),Q(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):P(this.promise,M())}function M(){return new Error("Array Methods must be provided an Array")}function q(e){return new L(this,e).promise}function N(e){var t=this;return new t(Q(e)?function(r,n){for(var o=e.length,i=0;o>i;i++)t.resolve(e[i]).then(r,n)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function F(e){var t=this,r=new t(y);return P(r,e),r}function z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Y(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function G(e){this[oe]=U(),this._result=this._state=void 0,this._subscribers=[],y!==e&&("function"!=typeof e&&z(),this instanceof G?C(this,e):Y())}function H(){var e=void 0;if("undefined"!=typeof i)e=i;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=e.Promise;if(r){var n=null;try{n=Object.prototype.toString.call(r.resolve())}catch(t){}if("[object Promise]"===n&&!r.cast)return}e.Promise=G}var B=void 0;B=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Q=B,W=0,J=void 0,V=void 0,X=function(e,t){re[W]=e,re[W+1]=t,W+=2,2===W&&(V?V(f):ne())},K="undefined"!=typeof window?window:void 0,$=K||{},Z=$.MutationObserver||$.WebKitMutationObserver,ee="undefined"==typeof self&&"undefined"!=typeof o&&"[object process]"==={}.toString.call(o),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,re=new Array(1e3),ne=void 0;ne=ee?a():Z?c():te?p():void 0===K&&"function"==typeof t?d():l();var oe=Math.random().toString(36).substring(16),ie=void 0,se=1,ae=2,ue=new D,ce=new D,pe=0;return L.prototype._enumerate=function(){for(var e=this.length,t=this._input,r=0;this._state===ie&&e>r;r++)this._eachEntry(t[r],r)},L.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===h){var o=g(e);if(o===m&&e._state!==ie)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(r===G){var i=new r(y);A(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new r(function(t){return t(e)}),t)}else this._willSettleAt(n(e),t)},L.prototype._settledAt=function(e,t,r){var n=this.promise;n._state===ie&&(this._remaining--,e===ae?P(n,r):this._result[t]=r),0===this._remaining&&S(n,this._result)},L.prototype._willSettleAt=function(e,t){var r=this;j(e,void 0,function(e){return r._settledAt(se,t,e)},function(e){return r._settledAt(ae,t,e)})},G.all=q,G.race=N,G.resolve=h,G.reject=F,G._setScheduler=n,G._setAsap=s,G._asap=X,G.prototype={constructor:G,then:m,"catch":function(e){return this.then(null,e)}},G.polyfill=H,G.Promise=G,G})}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:20}],20:[function(e,t){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(p===setTimeout)return setTimeout(e,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(e,0);try{return p(e,0)}catch(t){try{return p.call(null,e,0)}catch(t){return p.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===n||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function s(){h&&d&&(h=!1,d.length?m=d.concat(m):y=-1,m.length&&a())}function a(){if(!h){var e=o(s);h=!0;for(var t=m.length;t;){for(d=m,m=[];++y<t;)d&&d[y].run();y=-1,t=m.length}d=null,h=!1,i(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var p,l,f=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(e){p=r}try{l="function"==typeof clearTimeout?clearTimeout:n}catch(e){l=n}}();var d,m=[],h=!1,y=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];m.push(new u(e,t)),1!==m.length||h||o(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.binding=function(){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],21:[function(e,t){"use strict";function r(e,t){var r,n,o,i,a;if(r=e,o={},t){for(n in t)a=new RegExp("\\{"+n+"\\}"),a.test(r)?r=r.replace(a,encodeURIComponent(t[n]),"g"):o[n]=t[n];i=s.write(o),i&&(r+=-1===r.indexOf("?")?"?":"&",r+=i)}return r}function n(e,t){return 0===e.indexOf(t)}function o(e,t){return this instanceof o?void(e instanceof o?(this._template=e.template,this._params=i({},this._params,t)):(this._template=(e||"").toString(),this._params=t||{})):new o(e,t)}var i,s,a,u,c,p;i=e("./util/mixin"),s=e("./mime/type/application/x-www-form-urlencoded"),u=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?(\/[^?#]*)?(\?[^#]*)?(#\S*)?/i,c=/^([a-z][a-z0-9\-\+\.]*:\/\/|\/)/i,p=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?\//i,o.prototype={append:function(e,t){return new o(this._template+e,i({},this._params,t))},fullyQualify:function(){if("undefined"==typeof location)return this;if(this.isFullyQualified())return this;var e=this._template;return n(e,"//")?e=a.protocol+e:n(e,"/")?e=a.origin+e:this.isAbsolute()||(e=a.origin+a.pathname.substring(0,a.pathname.lastIndexOf("/")+1)),-1===e.indexOf("/",8)&&(e+="/"),new o(e,this._params)},isAbsolute:function(){return c.test(this.build())},isFullyQualified:function(){return p.test(this.build())},isCrossOrigin:function(){if(!a)return!0;var e=this.parts();return e.protocol!==a.protocol||e.hostname!==a.hostname||e.port!==a.port},parts:function(){var e,t;return e=this.fullyQualify().build().match(u),t={href:e[0],protocol:e[1],host:e[3]||"",hostname:e[4]||"",port:e[6],pathname:e[7]||"",search:e[8]||"",hash:e[9]||""},t.origin=t.protocol+"//"+t.host,t.port=t.port||("https:"===t.protocol?"443":"http:"===t.protocol?"80":""),t},build:function(e){return r(this._template,i({},this._params,e))},toString:function(){return this.build()}},a="undefined"!=typeof location?new o(location.href).parts():void 0,t.exports=o},{"./mime/type/application/x-www-form-urlencoded":37,"./util/mixin":44}],22:[function(e,t){"use strict";var r=e("./client/default"),n=e("./client/xhr");r.setPlatformDefaultClient(n),t.exports=r},{"./client/default":24,"./client/xhr":25}],23:[function(e,t){"use strict";t.exports=function(e,t){return t&&(e.skip=function(){return t}),e.wrap=function(t,r){return t(e,r)},e.chain=function(){return"undefined"!=typeof console&&console.log("rest.js: client.chain() is deprecated, use client.wrap() instead"),e.wrap.apply(this,arguments)},e}},{}],24:[function(e,t){"use strict";function r(){return o.apply(void 0,arguments)}var n,o,i;n=e("../client"),"function"!=typeof Promise&&console&&console.log&&console.log("An ES6 Promise implementation is required to use rest.js. See https://github.com/cujojs/when/blob/master/docs/es6-promise-shim.md for using when.js as a Promise polyfill."),r.setDefaultClient=function(e){o=e},r.getDefaultClient=function(){return o},r.resetDefaultClient=function(){o=i},r.setPlatformDefaultClient=function(e){if(i)throw new Error("Unable to redefine platformDefaultClient");o=i=e},t.exports=n(r)},{"../client":23}],25:[function(e,t){"use strict";function r(e){var t={};return e?(e.trim().split(a).forEach(function(e){var r,n,i;r=e.indexOf(":"),n=o(e.substring(0,r).trim()),i=e.substring(r+1).trim(),t[n]?Array.isArray(t[n])?t[n].push(i):t[n]=[t[n],i]:t[n]=i}),t):t}function n(e,t){return Object.keys(t||{}).forEach(function(r){if(t.hasOwnProperty(r)&&r in e)try{e[r]=t[r]}catch(n){}}),e}var o,i,s,a;o=e("../util/normalizeHeaderName"),i=e("../util/responsePromise"),s=e("../client"),a=/[\r|\n]+/,t.exports=s(function(e){return i.promise(function(t,o){var i,s,a,u,c,p,l,f;if(e="string"==typeof e?{path:e}:e||{},l={request:e},e.canceled)return l.error="precanceled",void o(l);if(f=e.engine||XMLHttpRequest,!f)return void o({request:e,error:"xhr-not-available"});c=e.entity,e.method=e.method||(c?"POST":"GET"),s=e.method,a=l.url=e.path||"";try{i=l.raw=new f,n(i,e.mixin),i.open(s,a,!0),n(i,e.mixin),u=e.headers;for(p in u)("Content-Type"!==p||"multipart/form-data"!==u[p])&&i.setRequestHeader(p,u[p]);e.canceled=!1,e.cancel=function(){e.canceled=!0,i.abort(),o(l)},i.onreadystatechange=function(){e.canceled||i.readyState===(f.DONE||4)&&(l.status={code:i.status,text:i.statusText},l.headers=r(i.getAllResponseHeaders()),l.entity=i.responseText,1223===l.status.code&&(l.status.code=204),l.status.code>0?t(l):setTimeout(function(){t(l)},0))};try{i.onerror=function(){l.error="loaderror",o(l)}}catch(d){}i.send(c)}catch(d){l.error="loaderror",o(l)}})})},{"../client":23,"../util/normalizeHeaderName":45,"../util/responsePromise":46}],26:[function(e,t){"use strict";function r(e){return e}function n(e){return e}function o(e){return e}function i(e){return this instanceof i?void u(this,e):new i(e)}function s(e){
var t,s,u,l;return e=e||{},t=e.init||r,s=e.request||n,u=e.success||e.response||o,l=e.error||function(){return Promise.resolve((e.response||o).apply(this,arguments)).then(Promise.reject.bind(Promise))},function(r,n){function o(e){var t,a;return t={},a={arguments:Array.prototype.slice.call(arguments),client:o},e="string"==typeof e?{path:e}:e||{},e.originator=e.originator||o,c(s.call(t,e,n,a),function(e){var o,s,c;return c=r,e instanceof i&&(s=e.abort,c=e.client||c,o=e.response,e=e.request),o=o||Promise.resolve(e).then(function(e){return Promise.resolve(c(e)).then(function(e){return u.call(t,e,n,a)},function(e){return l.call(t,e,n,a)})}),s?Promise.race([o,s]):o},function(t){return Promise.reject({request:e,error:t})})}return"object"==typeof r&&(n=r),"function"!=typeof r&&(r=e.client||a),n=t(n||{}),p(o,r)}}var a,u,c,p;a=e("./client/default"),u=e("./util/mixin"),c=e("./util/responsePromise"),p=e("./client"),s.ComplexRequest=i,t.exports=s},{"./client":23,"./client/default":24,"./util/mixin":44,"./util/responsePromise":46}],27:[function(e,t){"use strict";var r,n,o;r=e("../interceptor"),n=e("../util/mixin"),o=function(){function e(e,t,r){(e in t||e in r)&&(t[e]=n({},r[e],t[e]))}function t(e,t,r){e in r&&!(e in t)&&(t[e]=r[e])}var r={method:t,path:t,params:e,headers:e,entity:t,mixin:e};return function(e,t){for(var n in r)r[n](n,e,t);return e}}(),t.exports=r({request:function(e,t){return o(e,t)}})},{"../interceptor":26,"../util/mixin":44}],28:[function(e,t){"use strict";var r;r=e("../interceptor"),t.exports=r({init:function(e){return e.code=e.code||400,e},response:function(e,t){return e.status&&e.status.code>=t.code?Promise.reject(e):e}})},{"../interceptor":26}],29:[function(e,t){"use strict";var r,n,o,i,s,a;r=e("../interceptor"),n=e("../mime"),o=e("../mime/registry"),a=e("../util/attempt"),i={read:function(e){return e},write:function(e){return e}},s={read:function(){throw"No read method found on converter"},write:function(){throw"No write method found on converter"}},t.exports=r({init:function(e){return e.registry=e.registry||o,e},request:function(e,t){var r,o;return o=e.headers||(e.headers={}),r=n.parse(o["Content-Type"]||t.mime||"text/plain"),o.Accept=o.Accept||t.accept||r.raw+", application/json;q=0.8, text/plain;q=0.5, */*;q=0.2","entity"in e?(o["Content-Type"]=r.raw,t.registry.lookup(r)["catch"](function(){if(t.permissive)return i;throw"mime-unknown"}).then(function(n){var o=t.client||e.originator,i=n.write||s.write;return a(i.bind(void 0,e.entity,{client:o,request:e,mime:r,registry:t.registry}))["catch"](function(){throw"mime-serialization"}).then(function(t){return e.entity=t,e})})):e},response:function(e,t){if(!(e.headers&&e.headers["Content-Type"]&&e.entity))return e;var r=n.parse(e.headers["Content-Type"]);return t.registry.lookup(r)["catch"](function(){return i}).then(function(n){var o=t.client||e.request&&e.request.originator,i=n.read||s.read;return a(i.bind(void 0,e.entity,{client:o,response:e,mime:r,registry:t.registry}))["catch"](function(t){throw e.error="mime-deserialization",e.cause=t,e}).then(function(t){return e.entity=t,e})})}})},{"../interceptor":26,"../mime":33,"../mime/registry":34,"../util/attempt":40}],30:[function(e,t){"use strict";var r,n;r=e("../interceptor"),n=e("../UrlBuilder"),t.exports=r({init:function(e){return e.params=e.params||{},e},request:function(e,t){var r,o;return r=e.path||"",o=e.params||{},e.path=new n(r,t.params).append("",o).build(),delete e.params,e}})},{"../UrlBuilder":21,"../interceptor":26}],31:[function(e,t){"use strict";function r(e,t){return 0===e.indexOf(t)}function n(e,t){return e.lastIndexOf(t)+t.length===e.length}var o,i;o=e("../interceptor"),i=e("../UrlBuilder"),t.exports=o({request:function(e,t){var o;return t.prefix&&!new i(e.path).isFullyQualified()&&(o=t.prefix,e.path&&(n(o,"/")||r(e.path,"/")||(o+="/"),o+=e.path),e.path=o),e}})},{"../UrlBuilder":21,"../interceptor":26}],32:[function(e,t){"use strict";var r,n,o;r=e("../interceptor"),n=e("../util/uriTemplate"),o=e("../util/mixin"),t.exports=r({init:function(e){return e.params=e.params||{},e.template=e.template||"",e},request:function(e,t){var r,i;return r=e.path||t.template,i=o({},e.params,t.params),e.path=n.expand(r,i),delete e.params,e}})},{"../interceptor":26,"../util/mixin":44,"../util/uriTemplate":48}],33:[function(e,t){"use strict";function r(e){var t,r;return t=e.split(";"),r=t[0].trim().split("+"),{raw:e,type:r[0],suffix:r[1]?"+"+r[1]:"",params:t.slice(1).reduce(function(e,t){return t=t.split("="),e[t[0].trim()]=t[1]?t[1].trim():void 0,e},{})}}t.exports={parse:r}},{}],34:[function(e,t){"use strict";function r(e){this.lookup=function(t){var r;return r="string"==typeof t?n.parse(t):t,e[r.raw]?e[r.raw]:e[r.type+r.suffix]?e[r.type+r.suffix]:e[r.type]?e[r.type]:e[r.suffix]?e[r.suffix]:Promise.reject(new Error('Unable to locate converter for mime "'+r.raw+'"'))},this.delegate=function(e){return{read:function(){var t=arguments;return this.lookup(e).then(function(e){return e.read.apply(this,t)}.bind(this))}.bind(this),write:function(){var t=arguments;return this.lookup(e).then(function(e){return e.write.apply(this,t)}.bind(this))}.bind(this)}},this.register=function(t,r){return e[t]=Promise.resolve(r),e[t]},this.child=function(){return new r(Object.create(e))}}var n,o;n=e("../mime"),o=new r({}),o.register("application/hal",e("./type/application/hal")),o.register("application/json",e("./type/application/json")),o.register("application/x-www-form-urlencoded",e("./type/application/x-www-form-urlencoded")),o.register("multipart/form-data",e("./type/multipart/form-data")),o.register("text/plain",e("./type/text/plain")),o.register("+json",o.delegate("application/json")),t.exports=o},{"../mime":33,"./type/application/hal":35,"./type/application/json":36,"./type/application/x-www-form-urlencoded":37,"./type/multipart/form-data":38,"./type/text/plain":39}],35:[function(e,t){"use strict";function r(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!0,enumerable:!1,writeable:!0})}var n,o,i,s,a;n=e("../../../interceptor/pathPrefix"),o=e("../../../interceptor/template"),i=e("../../../util/find"),s=e("../../../util/lazyPromise"),a=e("../../../util/responsePromise"),t.exports={read:function(e,t){function u(e,t){(t&&p&&p.warn||p.log)&&(p.warn||p.log).call(p,"Relationship '"+e+"' is deprecated, see "+t)}var c,p;return t=t||{},c=t.client,p=t.console||p,t.registry.lookup(t.mime.suffix).then(function(r){return r.read(e,t)}).then(function(e){return i.findProperties(e,"_embedded",function(e,t,n){Object.keys(e).forEach(function(n){if(!(n in t)){var o=a({entity:e[n]});r(t,n,o)}}),r(t,n,e)}),i.findProperties(e,"_links",function(e,t,i){Object.keys(e).forEach(function(n){var i=e[n];n in t||r(t,n,a.make(s(function(){return i.deprecation&&u(n,i.deprecation),i.templated===!0?o(c)({path:i.href}):c({path:i.href})})))}),r(t,i,e),r(t,"clientFor",function(t,r){var i=e[t];if(!i)throw new Error("Unknown relationship: "+t);return i.deprecation&&u(t,i.deprecation),i.templated===!0?o(r||c,{template:i.href}):n(r||c,{prefix:i.href})}),r(t,"requestFor",function(e,t,r){var n=this.clientFor(e,r);return n(t)})}),e})},write:function(e,t){return t.registry.lookup(t.mime.suffix).then(function(r){return r.write(e,t)})}}},{"../../../interceptor/pathPrefix":31,"../../../interceptor/template":32,"../../../util/find":42,"../../../util/lazyPromise":43,"../../../util/responsePromise":46}],36:[function(e,t){"use strict";function r(e,t){return{read:function(t){return JSON.parse(t,e)},write:function(e){return JSON.stringify(e,t)},extend:r}}t.exports=r()},{}],37:[function(e,t){"use strict";function r(e){return e=encodeURIComponent(e),e.replace(i,"+")}function n(e){return e=e.replace(s," "),decodeURIComponent(e)}function o(e,t,n){return Array.isArray(n)?n.forEach(function(r){e=o(e,t,r)}):(e.length>0&&(e+="&"),e+=r(t),void 0!==n&&null!==n&&(e+="="+r(n))),e}var i,s;i=/%20/g,s=/\+/g,t.exports={read:function(e){var t={};return e.split("&").forEach(function(e){var r,o,i;r=e.split("="),o=n(r[0]),i=2===r.length?n(r[1]):null,o in t?(Array.isArray(t[o])||(t[o]=[t[o]]),t[o].push(i)):t[o]=i}),t},write:function(e){var t="";return Object.keys(e).forEach(function(r){t=o(t,r,e[r])}),t}}},{}],38:[function(e,t){"use strict";function r(e){return e&&1===e.nodeType&&"FORM"===e.tagName}function n(e){var t,r=new FormData;for(var n in e)e.hasOwnProperty(n)&&(t=e[n],t instanceof File?r.append(n,t,t.name):t instanceof Blob?r.append(n,t):r.append(n,String(t)));return r}t.exports={write:function(e){if("undefined"==typeof FormData)throw new Error("The multipart/form-data mime serializer requires FormData support");if(e instanceof FormData)return e;if(r(e))return new FormData(e);if("object"==typeof e&&null!==e)return n(e);throw new Error("Unable to create FormData from object "+e)}}},{}],39:[function(e,t){"use strict";t.exports={read:function(e){return e},write:function(e){return e.toString()}}},{}],40:[function(e,t){"use strict";function r(e){try{return Promise.resolve(e())}catch(t){return Promise.reject(t)}}t.exports=r},{}],41:[function(e,t){"use strict";function r(e){if(/([^\u0000-\u00ff])/.test(e))throw new Error("Can't base64 encode non-ASCII characters.");for(var t,r,n,i=0,s=[];i<e.length;){switch(t=e.charCodeAt(i),n=i%3){case 0:s.push(o.charAt(t>>2));break;case 1:s.push(o.charAt((3&r)<<4|t>>4));break;case 2:s.push(o.charAt((15&r)<<2|t>>6)),s.push(o.charAt(63&t))}r=t,i+=1}return 0===n?(s.push(o.charAt((3&r)<<4)),s.push("==")):1===n&&(s.push(o.charAt((15&r)<<2)),s.push("=")),s.join("")}function n(e){if(e=e.replace(/\s/g,""),!/^[a-z0-9\+\/\s]+\={0,2}$/i.test(e)||e.length%4>0)throw new Error("Not a base64-encoded string.");var t,r,n,i=0,s=[];for(e=e.replace(/\=/g,"");i<e.length;){switch(t=o.indexOf(e.charAt(i)),n=i%4){case 1:s.push(String.fromCharCode(r<<2|t>>4));break;case 2:s.push(String.fromCharCode((15&r)<<4|t>>2));break;case 3:s.push(String.fromCharCode((3&r)<<6|t))}r=t,i+=1}return s.join("")}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports={encode:r,decode:n}},{}],42:[function(e,t){"use strict";t.exports={findProperties:function r(e,t,n){"object"==typeof e&&null!==e&&(t in e&&n(e[t],e,t),Object.keys(e).forEach(function(o){r(e[o],t,n)}))}}},{}],43:[function(e,t){"use strict";function r(e){var t,r,o,i;return t=!1,o=new Promise(function(e,t){r={resolve:e,reject:t}}),i=o.then,o.then=function(){return t||(t=!0,n(e).then(r.resolve,r.reject)),i.apply(o,arguments)},o}var n=e("./attempt");t.exports=r},{"./attempt":40}],44:[function(e,t){"use strict";function r(e){var t,r,o,i;for(e||(e={}),t=1,r=arguments.length;r>t;t+=1){o=arguments[t];for(i in o)i in e&&(e[i]===o[i]||i in n&&n[i]===o[i])||(e[i]=o[i])}return e}var n={};t.exports=r},{}],45:[function(e,t){"use strict";function r(e){return e.toLowerCase().split("-").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join("-")}t.exports=r},{}],46:[function(e,t){"use strict";function r(e,t){return e.then(function(e){return e&&e[t]},function(e){return Promise.reject(e&&e[t])})}function n(){return r(this,"entity")}function o(){return r(r(this,"status"),"code")}function i(){return r(this,"headers")}function s(e){return e=p(e),r(this.headers(),e)}function a(e){return e=[].concat(e),u(e.reduce(function(e,t){return e.then(function(e){if("string"==typeof t&&(t={rel:t}),"function"!=typeof e.entity.clientFor)throw new Error("Hypermedia response expected");var r=e.entity.clientFor(t.rel);return r({params:t.params})})},this))}function u(e){return e.status=o,e.headers=i,e.header=s,e.entity=n,e.follow=a,e}function c(e,t,r){return u(Promise.resolve(e).then(t,r))}var p=e("./normalizeHeaderName");c.make=u,c.reject=function(e){return u(Promise.reject(e))},c.promise=function(e){return u(new Promise(e))},t.exports=c},{"./normalizeHeaderName":45}],47:[function(e,t){"use strict";function r(e,t){if("string"!=typeof e)throw new Error("String required for URL encoding");return e.split("").map(function(e){if(t.hasOwnProperty(e))return e;var r=e.charCodeAt(0);if(127>=r){var n=r.toString(16).toUpperCase();return"%"+(n.length%2===1?"0":"")+n}return encodeURIComponent(e).toUpperCase()}).join("")}function n(e){return e=e||i.unreserved,function(t){return r(t,e)}}function o(e){return decodeURIComponent(e)}var i;i=function(){var e={alpha:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",digit:"0123456789"};return e.genDelims=":/?#[]@",e.subDelims="!$&'()*+,;=",e.reserved=e.genDelims+e.subDelims,e.unreserved=e.alpha+e.digit+"-._~",e.url=e.reserved+e.unreserved,e.scheme=e.alpha+e.digit+"+-.",e.userinfo=e.unreserved+e.subDelims+":",e.host=e.unreserved+e.subDelims,e.port=e.digit,e.pchar=e.unreserved+e.subDelims+":@",e.segment=e.pchar,e.path=e.segment+"/",e.query=e.pchar+"/?",e.fragment=e.pchar+"/?",Object.keys(e).reduce(function(t,r){return t[r]=e[r].split("").reduce(function(e,t){return e[t]=!0,e},{}),t},{})}(),t.exports={decode:o,encode:n(),encodeURL:n(i.url),encodeScheme:n(i.scheme),encodeUserInfo:n(i.userinfo),encodeHost:n(i.host),encodePort:n(i.port),encodePathSegment:n(i.segment),encodePath:n(i.path),encodeQuery:n(i.query),encodeFragment:n(i.fragment)}},{}],48:[function(e,t){"use strict";function r(e,t,r){return t.split(",").reduce(function(t,n){var o,s;if(o={},"*"===n.slice(-1)&&(n=n.slice(0,-1),o.explode=!0),a.test(n)){var u=a.exec(n);n=u[1],o.maxLength=parseInt(u[2])}return n=i.decode(n),s=r[n],void 0===s||null===s?t:(Array.isArray(s)?t=s.reduce(function(t,r){return t.length?(t+=o.explode?e.separator:",",e.named&&o.explode&&(t+=e.encoder(n),t+=r.length?"=":e.empty)):(t+=e.first,e.named&&(t+=e.encoder(n),t+=r.length?"=":e.empty)),t+=e.encoder(r)},t):"object"==typeof s?t=Object.keys(s).reduce(function(t,r){return t.length?t+=o.explode?e.separator:",":(t+=e.first,e.named&&!o.explode&&(t+=e.encoder(n),t+=s[r].length?"=":e.empty)),t+=e.encoder(r),t+=o.explode?"=":",",t+=e.encoder(s[r])},t):(s=String(s),o.maxLength&&(s=s.slice(0,o.maxLength)),t+=t.length?e.separator:e.first,e.named&&(t+=e.encoder(n),t+=s.length?"=":e.empty),t+=e.encoder(s)),t)},"")}function n(e,t){var n;if(n=s[e.slice(0,1)],n?e=e.slice(1):n=s[""],n.reserved)throw new Error("Reserved expression operations are not supported");return r(n,e,t)}function o(e,t){var r,o,i;for(i="",o=0;;){if(r=e.indexOf("{",o),-1===r){i+=e.slice(o);break}i+=e.slice(o,r),o=e.indexOf("}",r)+1,i+=n(e.slice(r+1,o-1),t)}return i}var i,s,a;i=e("./uriEncoder"),a=/^([^:]*):([0-9]+)$/,s={"":{first:"",separator:",",named:!1,empty:"",encoder:i.encode},"+":{first:"",separator:",",named:!1,empty:"",encoder:i.encodeURL},"#":{first:"#",separator:",",named:!1,empty:"",encoder:i.encodeURL},".":{first:".",separator:".",named:!1,empty:"",encoder:i.encode},"/":{first:"/",separator:"/",named:!1,empty:"",encoder:i.encode},";":{first:";",separator:";",named:!0,empty:"",encoder:i.encode},"?":{first:"?",separator:"&",named:!0,empty:"=",encoder:i.encode},"&":{first:"&",separator:"&",named:!0,empty:"=",encoder:i.encode},"=":{reserved:!0},",":{reserved:!0},"!":{reserved:!0},"@":{reserved:!0},"|":{reserved:!0}},t.exports={expand:o}},{"./uriEncoder":47}],49:[function(e,t){var r=t.exports=function(e,t){if(t||(t=16),void 0===e&&(e=128),0>=e)return"0";for(var n=Math.log(Math.pow(2,e))/Math.log(t),o=2;n===1/0;o*=2)n=Math.log(Math.pow(2,e/o))/Math.log(t)*o;for(var i=n-Math.floor(n),s="",o=0;o<Math.floor(n);o++){var a=Math.floor(Math.random()*t).toString(t);s=a+s}if(i){var u=Math.pow(t,i),a=Math.floor(Math.random()*u).toString(t);s=a+s}var c=parseInt(s,t);return c!==1/0&&c>=Math.pow(2,e)?r(e,t):s}},{}],50:[function(e,t){(function(e){"use strict";var r=e.env.NODE_ENV,n=function(e,t,n,o,i,s,a,u){if("production"!==r&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,o,i,s,a,u],l=0;c=new Error(t.replace(/%s/g,function(){return p[l++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};t.exports=n}).call(this,e("_process"))},{_process:20}],51:[function(e,t){function r(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)o.call(r,n)&&(e[n]=r[n])}return e}function n(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)o.call(r,n)&&(e[n]=r[n])}return e}t.exports.extendMutable=r,t.exports.extend=n;var o=Object.prototype.hasOwnProperty},{}]},{},[8])(8)});
'use strict';
if (typeof Promise === 'undefined') {
// install ES6 Promise polyfill
require('../vendor/promise');
}
// install ES6 Promise polyfill
require('./promise');

@@ -8,0 +6,0 @@ var interceptor = require('rest/interceptor');

'use strict';
if (typeof Promise === 'undefined') {
// install ES6 Promise polyfill
require('../vendor/promise');
}
// install ES6 Promise polyfill
require('./promise');

@@ -8,0 +6,0 @@ var rest = require('rest');

@@ -6,6 +6,6 @@ // We keep all of the constants that declare endpoints in one

module.exports.API_GEOCODING_FORWARD = '/geocoding/v5/{dataset}/{query}.json{?proximity,country,types,bbox,limit}';
module.exports.API_GEOCODING_FORWARD = '/geocoding/v5/{dataset}/{query}.json{?proximity,country,types,bbox,limit,autocomplete}';
module.exports.API_GEOCODING_REVERSE = '/geocoding/v5/{dataset}/{longitude},{latitude}.json{?types,limit}';
module.exports.API_DIRECTIONS = '/v4/directions/{profile}/{encodedWaypoints}.json{?alternatives,instructions,geometry,steps}';
module.exports.API_DIRECTIONS = '/directions/v5/{account}/{profile}/{encodedWaypoints}.json{?alternatives,geometries,overview,radiuses,steps,continue_straight,bearings}';
module.exports.API_DISTANCE = '/distances/v1/mapbox/{profile}';

@@ -19,3 +19,3 @@

module.exports.API_MATCHING = '/matching/v4/{profile}.json';
module.exports.API_MATCHING = '/matching/v5/{account}/{profile}/{coordinates}.json{?geometries,radiuses,steps,overview,timestamps,annotations}';

@@ -43,2 +43,2 @@ module.exports.API_DATASET_DATASETS = '/datasets/v1/{owner}{?limit,start,fresh}';

module.exports.API_STYLES_FONT_GLYPH_RANGES = '/fonts/v1/{owner}/{font}/{start}-{end}.pbf'
module.exports.API_STYLES_FONT_GLYPH_RANGES = '/fonts/v1/{owner}/{font}/{start}-{end}.pbf';

@@ -14,4 +14,8 @@ 'use strict';

*
* @param {Object} [opts={}] list options
* @param {string} opts.start start location, for paging
* @param {number} opts.limit limit, for paging
* @param {boolean} opts.fresh whether to request fresh data
* @param {Function} callback called with (err, datasets)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -67,3 +71,3 @@ * var MapboxClient = require('mapbox');

* @param {Function} callback called with (err, dataset)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -109,3 +113,3 @@ * var MapboxClient = require('mapbox');

* @param {Function} callback called with (err, dataset)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -148,3 +152,3 @@ * var MapboxClient = require('mapbox');

* @param {Function} callback called with (err, dataset)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -189,3 +193,3 @@ * var MapboxClient = require('mapbox');

* @param {Function} callback called with (err)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -222,3 +226,3 @@ * var MapboxClient = require('mapbox');

* @param {Function} callback called with (err, collection)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -300,3 +304,3 @@ * var MapboxClient = require('mapbox');

* @param {Function} callback called with (err, feature)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -386,3 +390,3 @@ * // Insert a brand new feature without an id

* @param {Function} callback called with (err, feature)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -428,3 +432,3 @@ * var MapboxClient = require('mapbox');

* @param {Function} callback called with (err)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -431,0 +435,0 @@ * var MapboxClient = require('mapbox');

'use strict';
var invariant = require('../../vendor/invariant'),
formatPoints = require('../format_points'),
makeService = require('../make_service'),
constants = require('../constants');
var invariant = require('../../vendor/invariant');
var formatPoints = require('../format_points');
var makeService = require('../make_service');
var constants = require('../constants');

@@ -20,3 +20,3 @@ var MapboxDirections = makeService('MapboxDirections');

* the request
* @param {string} [options.profile=mapbox.driving] the directions
* @param {string} [options.profile=driving] the directions
* profile, which determines how to prioritize different routes.

@@ -30,5 +30,3 @@ * Options are `'mapbox.driving'`, which assumes transportation via an

* alternative routes along with the preferred route.
* @param {string} [options.instructions=text] format for turn-by-turn
* instructions along the route.
* @param {string} [options.geometry=geojson] format for the returned
* @param {string} [options.geometries=geojson] format for the returned
* route. Options are `'geojson'`, `'polyline'`, or `false`: `polyline`

@@ -40,4 +38,33 @@ * yields more compact responses which can be decoded on the client side.

* omits the geometry entirely and only returns instructions.
* @param {string} [options.overview=simplified] type of returned overview
* geometry. Can be `full` (the most detailed geometry available), `simplified`
* (a simplified version of the full geometry), or `false`.
* @param {Array<number|string>} [options.radiuses] an array of integers in meters
* indicating the maximum distance each coordinate is allowed to move when
* snapped to a nearby road segment. There must be as many radiuses as there
* are coordinates in the request. Values can be any number greater than `0` or
* they can be the string `unlimited`. If no routable road is found within the
* radius, a `NoSegment` error is returned.
* @param {boolean} [options.steps=false] whether to return steps and
* turn-by-turn instructions. Can be `true` or `false`.
* @param {boolean} [options.continue_straight] sets allowed direction of travel
* when departing intermediate waypoints. If `true` the route will continue in
* the same direction of travel. If `false` the route may continue in the
* opposite direction of travel. Defaults to `true` for the `driving` profile
* and `false` for the `walking` and `cycling` profiles.
* @param {Array<Array>} [options.bearings] used to filter the road
* segment the waypoint will be placed on by direction and dictates the angle
* of approach. This option should always be used in conjunction with the
* `radiuses` option. The parameter takes two values per waypoint: the first is
* an angle clockwise from true north between `0` and `360`. The second is the
* range of degrees the angle can deviate by. We recommend a value of `45` or
* `90` for the range, as bearing measurements tend to be inaccurate. This is
* useful for making sure we reroute vehicles on new routes that continue
* traveling in their current direction. A request that does this would provide
* bearing and radius values for the first waypoint and leave the remaining
* values empty.If provided, the list of bearings must be the same length as
* the list of waypoints, but you can skip a coordinate and show its position
* by providing an empty array.
* @param {Function} callback called with (err, results)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @memberof MapboxClient

@@ -60,3 +87,2 @@ * @example

* profile: 'mapbox.walking',
* instructions: 'html',
* alternatives: false,

@@ -84,11 +110,14 @@ * geometry: 'polyline'

var profile = 'mapbox.driving',
alternatives = true,
steps = true,
geometry = 'geojson',
instructions = 'text';
var params = {
encodedWaypoints: encodedWaypoints,
profile: 'driving',
account: 'mapbox',
alternatives: true,
steps: true,
geometries: 'geojson'
};
if (options.profile) {
invariant(typeof options.profile === 'string', 'profile option must be string');
profile = options.profile;
params.profile = options.profile;
}

@@ -98,30 +127,42 @@

invariant(typeof options.alternatives === 'boolean', 'alternatives option must be boolean');
alternatives = options.alternatives;
params.alternatives = options.alternatives;
}
if (options.radiuses) {
invariant(Array.isArray(options.radiuses), 'radiuses must be an array');
invariant(options.radiuses.length === waypoints.length, 'There must be as many radiuses as there are waypoints in the request');
params.radiuses = options.radiuses.join(';');
}
if (typeof options.steps !== 'undefined') {
invariant(typeof options.steps === 'boolean', 'steps option must be boolean');
steps = options.steps;
params.steps = options.steps;
}
if (options.geometry) {
invariant(typeof options.geometry === 'string', 'geometry option must be string');
geometry = options.geometry;
var allowedGeometries = ['polyline', 'geojson'];
if (options.geometries) {
invariant(allowedGeometries.indexOf(options.geometries) !== -1, 'geometries option must be ' + allowedGeometries);
params.geometries = options.geometries;
}
if (options.instructions) {
invariant(typeof options.instructions === 'string', 'instructions option must be string');
instructions = options.instructions;
var allowedOverviews = ['simplified', 'full'];
if (options.overview) {
invariant(allowedOverviews.indexOf(options.overview) !== -1, 'overview option must be ' + allowedOverviews);
params.overview = options.overview;
}
if (typeof options.continue_straight !== 'undefined') {
invariant(typeof options.continue_straight === 'boolean', 'continue_straight option must be boolean');
params.continue_straight = options.continue_straight;
}
if (options.bearings) {
invariant(Array.isArray(options.radiuses), 'bearings must be an array');
invariant(options.bearings.length === waypoints.length, 'There must be as many bearings as there are waypoints in the request');
params.bearings = options.bearings.join(';');
}
return this.client({
path: constants.API_DIRECTIONS,
params: {
encodedWaypoints: encodedWaypoints,
profile: profile,
instructions: instructions,
geometry: geometry,
alternatives: alternatives,
steps: steps
},
params: params,
callback: callback

@@ -128,0 +169,0 @@ });

@@ -27,3 +27,3 @@ 'use strict';

* @param {Function} callback called with (err, results)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @memberof MapboxClient

@@ -30,0 +30,0 @@ * @example

@@ -37,7 +37,7 @@ 'use strict';

* for available types.
* @param {number=5} options.limit is the maximum number of results to return, between 1 and 10 inclusive.
* @param {number} [options.limit=5] is the maximum number of results to return, between 1 and 10 inclusive.
* Some very specific queries may return fewer results than the limit.
* @param {string} options.country a comma separated list of country codes to
* limit results to specified country or countries.
* @param {boolean=true} options.autocomplete whether to include results that include
* @param {boolean} [options.autocomplete=true] whether to include results that include
* the query only as a prefix. This is useful for UIs where users type

@@ -50,3 +50,3 @@ * values, but if you have complete addresses as input, you'll want to turn it off

* @param {Function} callback called with (err, results)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @memberof MapboxClient

@@ -82,3 +82,3 @@ * @example

if (options.dataset !== 'mapbox.places-permanent') {
throw new Error('Batch geocoding is only available with the mapbox.places-permanent endpoint. See https://mapbox.com/api-documentation/#batch-requests for details')
throw new Error('Batch geocoding is only available with the mapbox.places-permanent endpoint. See https://mapbox.com/api-documentation/#batch-requests for details');
} else {

@@ -96,3 +96,2 @@ query = query.join(';');

var autocomplete = true;
var precision = FORWARD_GEOCODING_PROXIMITY_PRECISION;

@@ -118,3 +117,3 @@ if (options.precision) {

'bbox must be an array with numeric values in the form [minX, minY, maxX, maxY]');
queryOptions.bbox = options.bbox[0] + "," + options.bbox[1] + "," + options.bbox[2] + "," + options.bbox[3];
queryOptions.bbox = options.bbox[0] + ',' + options.bbox[1] + ',' + options.bbox[2] + ',' + options.bbox[3];
}

@@ -168,3 +167,3 @@

* for available types.
* @param {number=1} options.limit is the maximum number of results to return, between 1 and 5
* @param {number} [options.limit=1] is the maximum number of results to return, between 1 and 5
* inclusive. Requires a single options.types to be specified (see example).

@@ -176,3 +175,3 @@ * @param {string} [options.dataset=mapbox.places] the desired data to be

* @param {Function} callback called with (err, results)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -179,0 +178,0 @@ * var mapboxClient = new MapboxGeocoding('ACCESSTOKEN');

'use strict';
var invariant = require('../../vendor/invariant'),
makeService = require('../make_service'),
constants = require('../constants');
var invariant = require('../../vendor/invariant');
var makeService = require('../make_service');
var constants = require('../constants');

@@ -11,59 +11,59 @@ var MapboxMatching = makeService('MapboxMatching');

* Snap recorded location traces to roads and paths from OpenStreetMap.
* Consult the [Map Matching API](https://www.mapbox.com/developers/api/map-matching/)
* Consult the [Map Matching API](https://www.mapbox.com/api-documentation/#map-matching)
* for more documentation.
*
* @param {Object} trace a single [GeoJSON](http://geojson.org/)
* Feature with a LineString geometry, containing up to 100 positions.
* @param {Array<Array<number>>} coordinates an array of coordinate pairs
* in [longitude, latitude] order. Up to 100 coordinates can be specified.
* @param {Object} [options={}] additional options meant to tune
* the request
* @param {string} [options.profile=mapbox.driving] the directions
* @param {string} [options.profile=driving] the directions
* profile, which determines how to prioritize different routes.
* Options are `'mapbox.driving'`, which assumes transportation via an
* automobile and will use highways, `'mapbox.walking'`, which avoids
* streets without sidewalks, and `'mapbox.cycling'`, which prefers streets
* Options are `'driving'`, which assumes transportation via an
* automobile and will use highways, `'walking'`, which avoids
* streets without sidewalks, and `'cycling'`, which prefers streets
* with bicycle lanes and lower speed limits for transportation via
* bicycle.
* @param {string} [options.geometry=geojson] format for the returned
* route. Options are `'geojson'`, `'polyline'`, or `false`: `polyline`
* yields more compact responses which can be decoded on the client side.
* [GeoJSON](http://geojson.org/), the default, is compatible with libraries
* like [Mapbox GL](https://www.mapbox.com/mapbox-gl/),
* Leaflet and [Mapbox.js](https://www.mapbox.com/mapbox.js/). `false`
* omits the geometry entirely and only returns matched points.
* @param {number} [options.gps_precision=4] An integer in meters indicating
* the assumed precision of the used tracking device. Use higher
* numbers (5-10) for noisy traces and lower numbers (1-3) for clean
* traces. The default value is 4.
* @param {string} [options.geometries=geojson] format of the returned geometry.
* Allowed values are: `'geojson'` (as LineString), `'polyline'` with
* precision 5, `'polyline6'`. `'polyline'` yields more compact responses which
* can be decoded on the client side. [GeoJSON](http://geojson.org/), the
* default, is compatible with libraries like
* [Mapbox GL](https://www.mapbox.com/mapbox-gl/), Leaflet and
* [Mapbox.js](https://www.mapbox.com/mapbox.js/).
* @param {Array<number>} [options.radiuses] an array of integers in meters
* indicating the assumed precision of the used tracking device. There must be
* as many radiuses as there are coordinates in the request. Values can be a
* number between 0 and 30. Use higher numbers (20-30) for noisy traces and
* lower numbers (1-10) for clean traces. The default value is 5.
* @param {boolean} [options.steps=false] Whether to return steps and
* turn-by-turn instructions. Can be `true` or `false`.
* @param {string|boolean} [options.overview=simplified] type of returned
* overview geometry. Can be `'full'` (the most detailed geometry available),
* `'simplified'` (a simplified version of the full geometry), or `false`.
* @param {Array<number>} [options.timestamps] an array of timestamps
* corresponding to each coordinate provided in the request; must be numbers in
* [Unix time](https://en.wikipedia.org/wiki/Unix_time)
* (seconds since the Unix epoch). There must be as many timestamps as there
* are coordinates in the request.
* @param {Array<string>} [options.annotations] an array of fields that return
* additional metadata for each coordinate along the match geometry. Can be any
* of `'duration'`, `'distance'`, or `'nodes'`.
* @param {Function} callback called with (err, results)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @memberof MapboxClient
* @example
* var mapboxClient = new MapboxClient('ACCESSTOKEN');
* mapboxClient.matching({
* "type": "Feature",
* "properties": {
* "coordTimes": [
* "2015-04-21T06:00:00Z",
* "2015-04-21T06:00:05Z",
* "2015-04-21T06:00:10Z",
* "2015-04-21T06:00:15Z",
* "2015-04-21T06:00:20Z"
* ]
* },
* "geometry": {
* "type": "LineString",
* "coordinates": [
* [ 13.418946862220764, 52.50055852688439 ],
* [ 13.419011235237122, 52.50113000479732 ],
* [ 13.419756889343262, 52.50171780290061 ],
* [ 13.419885635375975, 52.50237416816131 ],
* [ 13.420631289482117, 52.50294888790448 ]
* ]
* }
* },
* function(err, res) {
* // res is a document with directions
* mapboxClient.matching([
* [-95.4431142, 33.6875431],
* [-95.0431142, 33.6875431],
* [-95.0431142, 33.0875431],
* [-95.0431142, 33.0175431],
* [-95.4831142, 33.6875431]
* ], {
* overview: 'full'
* }, function(err, res) {
* // res is a match response object
* });
*/
MapboxMatching.prototype.matching = function(trace, options, callback) {
MapboxMatching.prototype.matching = function(coordinates, options, callback) {

@@ -77,34 +77,54 @@ // permit the options argument to be omitted

// typecheck arguments
invariant(typeof trace === 'object', 'trace must be an object');
invariant(typeof options === 'object', 'options must be an object');
invariant(Array.isArray(coordinates), 'coordinates must be an array');
var profile = 'mapbox.driving',
gps_precision = 4,
geometry = 'geojson';
var params = {
profile: 'driving',
account: 'mapbox',
geometries: 'geojson',
coordinates: coordinates.join(';')
};
if (options.profile) {
invariant(typeof options.profile === 'string', 'profile option must be string');
params.profile = options.profile;
}
if (options.gps_precision !== undefined) {
invariant(typeof options.gps_precision === 'number', 'gps_precision must be a number');
gps_precision = options.gps_precision;
var allowedGeometries = ['polyline', 'geojson'];
if (options.geometries) {
invariant(allowedGeometries.indexOf(options.geometries) !== -1, 'geometries option must be ' + allowedGeometries);
params.geometries = options.geometries;
}
if (options.profile) {
invariant(typeof options.profile === 'string', 'profile option must be string');
profile = options.profile;
if (options.radiuses) {
invariant(Array.isArray(options.radiuses), 'radiuses must be an array');
invariant(options.radiuses.length === coordinates.length, 'There must be as many radiuses as there are coordinates in the request');
params.radiuses = options.radiuses.join(';');
}
if (options.geometry) {
invariant(typeof options.geometry === 'string', 'geometry option must be string');
geometry = options.geometry;
if (typeof options.steps !== 'undefined') {
invariant(typeof options.steps === 'boolean', 'steps option must be boolean');
params.steps = options.steps;
}
var allowedOverview = ['full', 'simplified'];
if (typeof options.overview !== 'undefined') {
invariant(allowedOverview.indexOf(options.overview) !== -1 || options.overview === false, 'overview option must be ' + allowedOverview + ' or false');
params.overview = options.overview;
}
if (options.timestamps) {
invariant(Array.isArray(options.timestamps), 'timestamps must be an array');
invariant(options.timestamps.length === coordinates.length, 'There must be as many timestamps as there are coordinates in the request');
params.timestamps = options.timestamps.join(';');
}
if (options.annotations) {
invariant(Array.isArray(options.annotations), 'annotations must be an array');
params.annotations = options.annotations.join();
}
return this.client({
path: constants.API_MATCHING,
params: {
profile: profile,
geometry: geometry,
gps_precision: gps_precision
},
method: 'post',
entity: trace,
params: params,
method: 'get',
callback: callback

@@ -111,0 +131,0 @@ });

'use strict';
var invariant = require('../../vendor/invariant'),
hat = require('../../vendor/hat'),
uriTemplate = require('rest/util/uriTemplate'),

@@ -15,3 +14,3 @@ makeService = require('../make_service'),

* @param {Function} callback called with (err, datasets)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -55,3 +54,3 @@ * var MapboxClient = require('mapbox');

* @param {Function} callback called with (err, datasets)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -87,5 +86,5 @@ * var MapboxClient = require('mapbox');

* @param {Object} style Mapbox GL Style Spec object
* @param {string} id style id
* @param {string} styleid style id
* @param {Function} callback called with (err, datasets)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -152,3 +151,3 @@ * var MapboxClient = require('mapbox');

* @param {Function} callback called with (err)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -182,3 +181,3 @@ * var MapboxClient = require('mapbox');

* @param {Function} callback called with (err)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -238,3 +237,3 @@ * var MapboxClient = require('mapbox');

* @param {Function} callback called with (err)
* @returns {Promise}
* @returns {Promise} response
* @example

@@ -267,7 +266,7 @@ * var MapboxClient = require('mapbox');

*
* @param {string} style the id for an existing style
* @param {string} styleid the id for an existing style
* @param {string} iconName icon's name
* @param {Buffer} icon icon content as a buffer
* @param {Function} callback called with (err)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -305,6 +304,6 @@ * var MapboxClient = require('mapbox');

*
* @param {string} style the id for an existing style
* @param {string} styleid the id for an existing style
* @param {string} iconName icon's name
* @param {Function} callback called with (err)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -336,7 +335,7 @@ * var MapboxClient = require('mapbox');

*
* @param {string} style the id for an existing style
* @param {Object} options
* @param {boolean=false} options.title If true, shows a title box in upper right
* @param {string} styleid the id for an existing style
* @param {Object} options optional params
* @param {boolean} [options.title=false] If true, shows a title box in upper right
* corner with map title and owner
* @param {boolean=true} options.zoomwheel Disables zooming with mouse scroll wheel
* @param {boolean} [options.zoomwheel=true] Disables zooming with mouse scroll wheel
* @returns {string} URL of style embed page

@@ -343,0 +342,0 @@ * @example

@@ -37,3 +37,3 @@ 'use strict';

* @memberof MapboxClient
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -40,0 +40,0 @@ * var mapboxClient = new MapboxClient('ACCESSTOKEN');

@@ -14,3 +14,3 @@ 'use strict';

* @param {Function} callback called with (err, tilestats)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -66,3 +66,3 @@ * var client = new MapboxClient('ACCESSTOKEN');

* @param {Function} callback called with (err, tilestats)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -69,0 +69,0 @@ * var client = new MapboxClient('ACCESSTOKEN');

@@ -15,3 +15,3 @@ 'use strict';

* @param {Function} callback called with (err, uploads)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -61,3 +61,3 @@ * var mapboxClient = new MapboxClient('ACCESSTOKEN');

* @param {Function} callback called with (err, credentials)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -113,3 +113,3 @@ * var mapboxClient = new MapboxClient('ACCESSTOKEN');

* @param {Function} callback called with (err, upload)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -161,3 +161,3 @@ * var mapboxClient = new MapboxClient('ACCESSTOKEN');

* @param {Function} callback called with (err, upload)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -197,4 +197,5 @@ * var mapboxClient = new MapboxClient('ACCESSTOKEN');

*
* @param {string} upload upload identifier
* @param {Function} callback called with (err)
* @returns {undefined} nothing, calls callback
* @returns {Promise} response
* @example

@@ -201,0 +202,0 @@ * var mapboxClient = new MapboxClient('ACCESSTOKEN');

@@ -8,5 +8,9 @@ var interceptor = require('rest/interceptor');

function transform(response) {
var status = undefined;
if (response.status) {
status = response.status.code;
}
return {
url: response.url,
status: response.status ? response.status.code : undefined,
status: status,
headers: response.headers,

@@ -17,4 +21,4 @@ entity: response.entity,

};
};
}
module.exports = standardResponse;
{
"name": "mapbox",
"version": "1.0.0-beta5",
"version": "1.0.0-beta6",
"description": "interface to mapbox services",
"main": "lib/mapbox.js",
"scripts": {
"lint": "eslint --no-eslintrc -c .eslintrc lib test/*.js",
"test": "tap --coverage test/browser.js test/*.js",
"test": "npm run lint && npm run unit-test",
"lint": "eslint lib test/*.js",
"unit-test": "tap --coverage test/browser.js test/*.js",
"browser-test": "browserify -t envify -t brfs test/*.js test/helpers/close.js | smokestack | tap-status",
"browser-test-ff": "browserify -t envify -t brfs test/*.js test/helpers/close.js | smokestack -b firefox | tap-status",
"browser-test-build": "echo '<script>' > test_bundle.html && browserify -t envify -t brfs test/directions.js >> test_bundle.html && echo '</script>' >> test_bundle.html",
"browser-test-build": "echo '<script>' > test_bundle.html && browserify -t envify -t brfs test/matching.js >> test_bundle.html && echo '</script>' >> test_bundle.html",
"docs": "documentation -f md > API.md",

@@ -50,7 +51,7 @@ "prepublish": "npm run build",

"envify": "^3.4.0",
"eslint": "^0.24.1",
"eslint": "^3.10.2",
"geojson-random": "^0.2.2",
"geojsonhint": "^1.1.0",
"smokestack": "^3.3.0",
"tap": "^1.3.1",
"tap": "^8.0.1",
"tap-status": "^1.0.1",

@@ -61,4 +62,5 @@ "tape": "^4.2.0",

"dependencies": {
"es6-promise": "^4.0.5",
"rest": "^2.0.0"
}
}

@@ -23,2 +23,4 @@ # mapbox-sdk-js

* Instructions as text or HTML
* [Datasets](https://www.mapbox.com/api-documentation/#datasets)
* Retrieve, add, and edit datasets.

@@ -36,8 +38,2 @@ Contact help@mapbox.com for information

Not currently public
* Datasets
* Retrieve, add, and edit datasets.
* **Note: The Mapbox Datasets API is in private beta. Currently, all end user requests to this API from outside of Mapbox will 404.**
## Installation

@@ -74,3 +70,4 @@

* directions: `require('mapbox/lib/services/directions')`
* datasets: `require('mapbox/lib/services/datasets')`
## [API](API.md)

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc